1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-24523 Execution of JSON_REPLACE failed on Spider

JSON_REPLACE() function executed with an error on Spider SE.
This patch fixes the problem, and it also fixes the MDEV-24541.

The problem is that Item_func_json_insert::func_name() returns
the wrong function name "json_update". 
The Spider SE reconstructs a query based on the return value
in some cases. Thus, if the return value is wrong, the Spider SE
may generate a wrong query.
This commit is contained in:
Yongxin Xu
2021-08-05 11:21:59 +08:00
committed by GitHub
parent 7f264997dd
commit fa6eaead21
6 changed files with 168 additions and 1 deletions

View File

@ -375,7 +375,7 @@ public:
const char *func_name() const
{
return mode_insert ?
(mode_replace ? "json_set" : "json_insert") : "json_update";
(mode_replace ? "json_set" : "json_insert") : "json_replace";
}
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_json_insert>(thd, this); }