diff options
author | Andrejs Kozlovs <andrejs.kozlovs@zabbix.com> | 2021-01-11 15:09:48 +0300 |
---|---|---|
committer | Andrejs Kozlovs <andrejs.kozlovs@zabbix.com> | 2021-01-13 18:04:33 +0300 |
commit | 51479783a8bcab55e3b49b9f597b8e8a637b58ee (patch) | |
tree | 156423a4bc85b65a79f13fe298769c07b6a00798 /database | |
parent | c2a9e2e430985a58f7dea06424be129c8ecdb6f3 (diff) |
....I..... [ZBXNEXT-6285] fixed buffer size
Diffstat (limited to 'database')
-rw-r--r-- | database/oracle/images.sql | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/database/oracle/images.sql b/database/oracle/images.sql index 7142d38844e..0d49f085a30 100644 --- a/database/oracle/images.sql +++ b/database/oracle/images.sql @@ -1,16 +1,16 @@ -- https://stackoverflow.com/questions/19539408/error-when-decoding-base-64-to-blob CREATE OR REPLACE FUNCTION base64_decode(p_content CLOB) RETURN BLOB IS - C_CHUNK_SIZE CONSTANT INTEGER := 12000; -- should be a multiple of 4 + C_CHUNK_SIZE CONSTANT INTEGER := 4000; -- should be a multiple of 4 C_NON_BASE64_SYM_PATTERN CONSTANT VARCHAR2(20) := '[^A-Za-z0-9+/]'; - l_chunk_buf VARCHAR2(12000); + l_chunk_buf VARCHAR2(4000); l_chunk_b64_buf RAW(9000); l_chunk_offset INTEGER := 1; l_chunk_size INTEGER; l_res BLOB; FUNCTION get_next_full_base64_chunk(l_data CLOB, p_cur_pos IN OUT INTEGER, p_desired_size INTEGER, p_cur_size IN OUT INTEGER) RETURN VARCHAR2 IS - l_res VARCHAR2(12000); + l_res VARCHAR2(4000); l_tail_desired_size INTEGER; BEGIN l_res := dbms_lob.substr(l_data, p_desired_size, p_cur_pos); |