summaryrefslogtreecommitdiff
path: root/sql/sql_update.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-03-17 16:57:56 +0100
committerSergei Golubchik <serg@mariadb.org>2022-03-17 16:58:48 +0100
commitecb6f9c894d3ebafeff1c6eb3b65cd248062296f (patch)
treefc73f1eb04255d81110ed0524abd8963469927eb /sql/sql_update.cc
parent6a2d88c132221ea07dd322060089c85ff5e469b5 (diff)
downloadmariadb-git-ecb6f9c894d3ebafeff1c6eb3b65cd248062296f.tar.gz
MDEV-28095 crash in multi-update and implicit grouping
disallow implicit grouping in multi-update. explicit GROUP BY is not allowed by the grammar.
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r--sql/sql_update.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 1e997b75c7d..a6a0b78259d 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -2150,6 +2150,11 @@ multi_update::initialize_tables(JOIN *join)
if (unlikely((thd->variables.option_bits & OPTION_SAFE_UPDATES) &&
error_if_full_join(join)))
DBUG_RETURN(1);
+ if (join->implicit_grouping)
+ {
+ my_error(ER_INVALID_GROUP_FUNC_USE, MYF(0));
+ DBUG_RETURN(1);
+ }
main_table=join->join_tab->table;
table_to_update= 0;