1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-28095 crash in multi-update and implicit grouping

disallow implicit grouping in multi-update.
explicit GROUP BY is not allowed by the grammar.
This commit is contained in:
Sergei Golubchik
2022-03-17 16:57:56 +01:00
parent 6a2d88c132
commit ecb6f9c894
3 changed files with 39 additions and 0 deletions

View File

@ -207,4 +207,19 @@ ERROR 23000: Duplicate entry '0000-00-00 00:00:00' for key 'f2k'
DROP VIEW v1;
DROP TABLE t3,t4;
SET @@sql_mode=@save_sql_mode;
#
# End of 10.2 tests
#
#
# MDEV-28095 crash in multi-update and implicit grouping
#
CREATE TABLE t1 (a int) engine=innodb;
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b int);
INSERT INTO t2 VALUES (1),(2);
UPDATE t1 NATURAL JOIN t2 SET a = 1 ORDER BY AVG (a) ;
ERROR HY000: Invalid use of group function
DROP TABLE t1, t2;
#
# End of 10.3 tests
#