summaryrefslogtreecommitdiff
path: root/mysql-test/r/group_by.result
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2014-04-24 18:20:57 +0300
committerMichael Widenius <monty@askmonty.org>2014-04-24 18:20:57 +0300
commitb17a053cc997adbf3f410aec4a6fab6739a8e15c (patch)
tree9b880d74dc711ab70bc8e856b78f00a03c995677 /mysql-test/r/group_by.result
parent64d33032a6b780a345418ebcab2edd5fb68bfe0d (diff)
downloadmariadb-git-b17a053cc997adbf3f410aec4a6fab6739a8e15c.tar.gz
MDEV-6129: Server crashes during UNION with ORDER BY field IS NULL
Fixed crashing bug for union queries where there was no real tables. mysql-test/r/group_by.result: Added test case mysql-test/t/group_by.test: Added test case sql/db.opt: Removed genrated file sql/item.cc: Handled case when table_list->pos_in_tables is not set. Can only happens when there is no real tables in query
Diffstat (limited to 'mysql-test/r/group_by.result')
-rw-r--r--mysql-test/r/group_by.result9
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index a9e91199949..3de20ac6df4 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -2473,3 +2473,12 @@ c 1c
v 2v,2v
NULL 1c,2v,2v
DROP TABLE t1,t2;
+#
+# MDEV-6129: Server crashes during UNION with ORDER BY field IS NULL
+#
+SET sql_mode='ONLY_FULL_GROUP_BY';
+SELECT 1 AS test UNION SELECT 2 AS test ORDER BY test IS NULL ASC;
+test
+1
+2
+SET sql_mode='';