summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorYongxin Xu <55976466+yongxin-xu@users.noreply.github.com>2021-08-05 11:21:59 +0800
committerGitHub <noreply@github.com>2021-08-05 12:21:59 +0900
commitfa6eaead21eaec6ec9a463f3b890fe7537b2681c (patch)
treebfaf9c4ac35535038b22ca0c797ad7dcd5bf29c7 /sql
parent7f264997dd21c5126350a9a5f0cc0960afdd1229 (diff)
downloadmariadb-git-fa6eaead21eaec6ec9a463f3b890fe7537b2681c.tar.gz
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.
Diffstat (limited to 'sql')
-rw-r--r--sql/item_jsonfunc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_jsonfunc.h b/sql/item_jsonfunc.h
index c703533f799..798c5d502db 100644
--- a/sql/item_jsonfunc.h
+++ b/sql/item_jsonfunc.h
@@ -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); }