summaryrefslogtreecommitdiff
path: root/sql/item_jsonfunc.cc
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2017-08-08 13:49:29 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2017-08-08 13:49:29 +0400
commit01a4eb8f761eb669fe2ae5139c73a7434b141a8f (patch)
treed380d27a5df766b228d1abfdd3decbb2d463cfdb /sql/item_jsonfunc.cc
parentbb71d9abf26aa5a0f8bb703d4541e3c064eed003 (diff)
downloadmariadb-git-01a4eb8f761eb669fe2ae5139c73a7434b141a8f.tar.gz
MDEV-12732 json.json_no_table fails with valgrind in buildbot and
outside. The result_limit variable wasn't always initialized in Item_func_json_array::fix_length_and_dec().
Diffstat (limited to 'sql/item_jsonfunc.cc')
-rw-r--r--sql/item_jsonfunc.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc
index 3f001771e7c..315443fdcd2 100644
--- a/sql/item_jsonfunc.cc
+++ b/sql/item_jsonfunc.cc
@@ -1485,6 +1485,8 @@ void Item_func_json_array::fix_length_and_dec()
ulonglong char_length= 2;
uint n_arg;
+ result_limit= 0;
+
if (arg_count == 0)
{
collation.set(&my_charset_utf8_general_ci);
@@ -1501,7 +1503,6 @@ void Item_func_json_array::fix_length_and_dec()
fix_char_length_ulonglong(char_length);
tmp_val.set_charset(collation.collation);
- result_limit= 0;
}