diff options
Diffstat (limited to 'sql/item_jsonfunc.h')
-rw-r--r-- | sql/item_jsonfunc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/item_jsonfunc.h b/sql/item_jsonfunc.h index 9472e184124..4aaf66ec695 100644 --- a/sql/item_jsonfunc.h +++ b/sql/item_jsonfunc.h @@ -376,6 +376,11 @@ class Item_func_json_length: public Item_long_func { bool check_arguments() const { + if (arg_count == 0 || arg_count > 2) + { + my_error(ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT, MYF(0), func_name()); + return true; + } return args[0]->check_type_can_return_text(func_name()) || (arg_count > 1 && args[1]->check_type_general_purpose_string(func_name())); |