summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2017-08-07 16:04:38 +0300
committerSergei Petrunia <psergey@askmonty.org>2017-08-07 16:04:38 +0300
commit0b30ce4f31cfbaad9582432d35e3c38464eba08e (patch)
tree425696ae6cffc0a330fb1df395712933942f4eb1 /mysql-test
parentc508691a9303579e5d614159bc872eeb65b8f84c (diff)
downloadmariadb-git-0b30ce4f31cfbaad9582432d35e3c38464eba08e.tar.gz
MDEV-13374: Server crashes in first_linear_tab / st_select_lex::set_explain_type
- Support first_linear_tab() traversal for degenerate joins
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/win.result12
-rw-r--r--mysql-test/t/win.test11
2 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/r/win.result b/mysql-test/r/win.result
index c6707bd51bc..14628cd0d44 100644
--- a/mysql-test/r/win.result
+++ b/mysql-test/r/win.result
@@ -3173,3 +3173,15 @@ Nth_value(i,1) OVER()
1
1
DROP TABLE t1;
+#
+# A regression after MDEV-13351:
+# MDEV-13374 : Server crashes in first_linear_tab / st_select_lex::set_explain_type
+# upon UNION with aggregate function
+#
+CREATE TABLE t1 (i INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1),(2);
+SELECT i AS fld FROM t1 UNION SELECT COUNT(*) AS fld FROM t1;
+fld
+1
+2
+DROP TABLE t1;
diff --git a/mysql-test/t/win.test b/mysql-test/t/win.test
index 77ca755378d..3dedc1227fd 100644
--- a/mysql-test/t/win.test
+++ b/mysql-test/t/win.test
@@ -1954,3 +1954,14 @@ UNION ALL
;
DROP TABLE t1;
+--echo #
+--echo # A regression after MDEV-13351:
+--echo # MDEV-13374 : Server crashes in first_linear_tab / st_select_lex::set_explain_type
+--echo # upon UNION with aggregate function
+--echo #
+
+CREATE TABLE t1 (i INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (1),(2);
+SELECT i AS fld FROM t1 UNION SELECT COUNT(*) AS fld FROM t1;
+DROP TABLE t1;
+