mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt
into mysql.com:/home/hf/work/mrg/mysql-5.1-opt
This commit is contained in:
@ -1426,4 +1426,15 @@ select _utf8'12' union select _latin1'12345';
|
||||
12
|
||||
12
|
||||
12345
|
||||
CREATE TABLE t1 (a int);
|
||||
INSERT INTO t1 VALUES (3),(1),(2),(4),(1);
|
||||
SELECT a FROM (SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a) AS test;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
SELECT a FROM (SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY c) AS test;
|
||||
ERROR 42S22: Unknown column 'c' in 'order clause'
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
|
@ -900,4 +900,17 @@ drop table t1, t2;
|
||||
#
|
||||
select _utf8'12' union select _latin1'12345';
|
||||
|
||||
#
|
||||
# Bug #26661: UNION with ORDER BY undefined column in FROM list
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (a int);
|
||||
INSERT INTO t1 VALUES (3),(1),(2),(4),(1);
|
||||
|
||||
SELECT a FROM (SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a) AS test;
|
||||
--error 1054
|
||||
SELECT a FROM (SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY c) AS test;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
Reference in New Issue
Block a user