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

Fixed bug mdev-5091.

The function SELECT_LEX::update_used_tables should process all
ORDER BY lists in any subselect of a union.
This commit is contained in:
Igor Babaev
2013-11-13 14:43:09 -08:00
parent 441192bfb0
commit ae40c72077
3 changed files with 35 additions and 1 deletions

View File

@ -1724,3 +1724,18 @@ foo
1
deallocate prepare stmt1;
End of 5.1 tests
#
# mdev-5091: Asseirtion failure for UNION with ORDER BY
# in one of selects
#
CREATE TABLE t1 (i int, c char(1)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (6,'b');
CREATE VIEW v1 AS SELECT * FROM t1;
( SELECT i FROM v1 GROUP BY i ORDER BY CONCAT( c, c ) LIMIT 1 )
UNION
( SELECT i FROM t1 );
i
6
DROP VIEW v1;
DROP TABLE t1;
End of 5.3 tests