1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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
This commit is contained in:
Michael Widenius
2014-04-24 18:20:57 +03:00
parent 64d33032a6
commit b17a053cc9
5 changed files with 36 additions and 9 deletions

View File

@ -1643,3 +1643,14 @@ FROM t1 JOIN t2 ON c = b GROUP BY b WITH ROLLUP;
DROP TABLE t1,t2;
--echo #
--echo # MDEV-6129: Server crashes during UNION with ORDER BY field IS NULL
--echo #
SET sql_mode='ONLY_FULL_GROUP_BY';
SELECT 1 AS test UNION SELECT 2 AS test ORDER BY test IS NULL ASC;
SET sql_mode='';
#
# End of MariaDB 5.5 tests
#