summaryrefslogtreecommitdiff
path: root/mysql-test/t/user_var.test
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2012-03-09 15:04:49 +0200
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2012-03-09 15:04:49 +0200
commitbc7d8dc623b829e32f409ecbbed00333a86b160d (patch)
treea990125f7d3483f930365a582a79772c487d7362 /mysql-test/t/user_var.test
parent6242d245ba0ed81a66fe590471a59fd5d59c6fa5 (diff)
downloadmariadb-git-bc7d8dc623b829e32f409ecbbed00333a86b160d.tar.gz
Bug #12408412: GROUP_CONCAT + ORDER BY + INPUT/OUTPUT SAME
USER VARIABLE = CRASH Moved the preparation of the variables that receive the output from SELECT INTO from execution time (JOIN:execute) to compile time (JOIN::prepare). This ensures that if the same variable is used in the SELECT part of SELECT INTO it will be properly marked as non-const for this query. Test case added. Used proper fast iterator.
Diffstat (limited to 'mysql-test/t/user_var.test')
-rw-r--r--mysql-test/t/user_var.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test
index 6a64343b609..fa23d118634 100644
--- a/mysql-test/t/user_var.test
+++ b/mysql-test/t/user_var.test
@@ -404,4 +404,13 @@ SELECT f1, f2 FROM t1 ORDER BY f2;
DROP TRIGGER trg1;
DROP TABLE t1;
+
+--echo #
+--echo # Bug #12408412: GROUP_CONCAT + ORDER BY + INPUT/OUTPUT
+--echo # SAME USER VARIABLE = CRASH
+--echo #
+
+SET @bug12408412=1;
+SELECT GROUP_CONCAT(@bug12408412 ORDER BY 1) INTO @bug12408412;
+
--echo End of 5.5 tests