summaryrefslogtreecommitdiff
path: root/sql/item_create.cc
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2016-12-04 23:57:26 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2016-12-05 01:03:30 +0400
commitc89c514ed32cc63b005078adced10750e26565c2 (patch)
treebdfab1bb4e34b5a5e0424f873d38e8e5d998bd16 /sql/item_create.cc
parent12897a5bba8a7980a7ca20115bebfc8e5f704a31 (diff)
downloadmariadb-git-c89c514ed32cc63b005078adced10750e26565c2.tar.gz
MDEV-11445 JSON_MERGE requires at least two arguments in MySQL, but not in MariaDB.
Create_func_json_merge::create_native fixed.
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r--sql/item_create.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc
index fb8aaf3d8f3..ac906b93c78 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -5192,7 +5192,7 @@ Create_func_json_merge::create_native(THD *thd, LEX_STRING name,
int arg_count;
if (item_list == NULL ||
- (arg_count= item_list->elements) == 0)
+ (arg_count= item_list->elements) < 2) // json, json
{
my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), name.str);
func= NULL;