summaryrefslogtreecommitdiff
path: root/mysql-test/main/select.test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2022-04-14 11:50:34 +0400
committerAlexander Barkov <bar@mariadb.com>2022-04-14 11:50:34 +0400
commit9d734cdd61e4174589031431138bed2f85472a58 (patch)
tree820e10b38bf67f9be5326d13de60b4e72c87cb35 /mysql-test/main/select.test
parentf130a5ea3c1cc504acecbad7615fb27c6e28dbfa (diff)
parent767d8d8335f9d45efb86c77a9efa0b42aff1eb27 (diff)
downloadmariadb-git-9d734cdd61e4174589031431138bed2f85472a58.tar.gz
Merge remote-tracking branch 'origin/10.2' into 10.3
Diffstat (limited to 'mysql-test/main/select.test')
-rw-r--r--mysql-test/main/select.test46
1 files changed, 46 insertions, 0 deletions
diff --git a/mysql-test/main/select.test b/mysql-test/main/select.test
index 7ac76286a3e..7e9d6bcf0ad 100644
--- a/mysql-test/main/select.test
+++ b/mysql-test/main/select.test
@@ -4671,4 +4671,50 @@ select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined));
drop table t1;
+--echo #
+--echo # Bug MDEV-24262 Server crashes in st_join_table::cleanup upon
+--echo # erroneous GROUP_CONCAT
+--echo #
+
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1,10),(2,20);
+--error ER_BAD_FIELD_ERROR
+SELECT b, GROUP_CONCAT(b ORDER BY 2), MIN(a) AS f FROM t1 GROUP BY b ORDER BY f;
+
+DROP TABLE t1;
+
+--echo #
+--echo # Bug MDEV-24560 SIGSEGV in st_join_table::cleanup + server and client
+--echo # hang + cross-mysqld-interaction + double free or corruption (!prev)
+--echo #
+
+CREATE TABLE t1 (c INT);
+SET SESSION sql_buffer_result=1;
+SELECT GROUP_CONCAT(c ORDER BY 2) FROM t1;
+SELECT GROUP_CONCAT(c ORDER BY 0) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (grp INT,c CHAR);
+SET sql_buffer_result=1;
+SELECT grp,GROUP_CONCAT(c ORDER BY 2) FROM t1 GROUP BY grp;
+DROP TABLE t1;
+
+--echo #
+--echo # Bug MDEV-28077 "Wrong create options" with "big_tables" option enabled
+--echo #
+CREATE TABLE t1(a VARCHAR(16383) CHARACTER SET UTF32, KEY k(a));
+INSERT INTO t1 VALUES ('abc'), ('def'), ('FFF'), ('abc'), ('FFF');
+
+# big_tables are deprecated after some version
+--disable_warnings
+SET SESSION big_tables=ON;
+SELECT DISTINCT COUNT(DISTINCT a) FROM t1;
+
+PREPARE stmt FROM 'SELECT DISTINCT COUNT(DISTINCT a) FROM t1';
+EXECUTE stmt;
+EXECUTE stmt;
+
+--enable_warnings
+DROP TABLE t1;
+
--echo End of 10.0 tests