diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result index 54cabeaa2c3..206547c7d7a 100644 --- a/mysql-test/main/func_json.result +++ b/mysql-test/main/func_json.result @@ -1742,9 +1742,14 @@ SELECT JSON_OVERLAPS('[1,2,{"A":B}]'); ERROR 42000: Incorrect parameter count in the call to native function 'JSON_OVERLAPS' SELECT JSON_OVERLAPS('',''); JSON_OVERLAPS('','') -1 +0 Warnings: Warning 4037 Unexpected end of JSON text in argument 1 to function 'json_overlaps' +SELECT JSON_OVERLAPS('true','tr'); +JSON_OVERLAPS('true','tr') +0 +Warnings: +Warning 4037 Unexpected end of JSON text in argument 2 to function 'json_overlaps' # # End of 10.9 test # diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test index b7c8826550d..1e7d29dd350 100644 --- a/mysql-test/main/func_json.test +++ b/mysql-test/main/func_json.test @@ -1084,6 +1084,7 @@ SELECT JSON_OVERLAPS('[1,2,{"A":B}]', '{"A":B}', '{"C":"string1"}'); --error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT SELECT JSON_OVERLAPS('[1,2,{"A":B}]'); SELECT JSON_OVERLAPS('',''); +SELECT JSON_OVERLAPS('true','tr'); --echo # --echo # End of 10.9 test diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc index a0dfcaae6e3..bf151baf9c4 100644 --- a/sql/item_jsonfunc.cc +++ b/sql/item_jsonfunc.cc @@ -4387,7 +4387,7 @@ error: report_json_error(js, &je, 0); if (ve.s.error) report_json_error(val, &ve, 1); - return 1; + return 0; } bool Item_func_json_overlaps::fix_length_and_dec()