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

Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt

into  olga.mysql.com:/home/igor/mysql-5.0-opt
This commit is contained in:
igor@olga.mysql.com
2007-03-09 02:45:17 -08:00
3 changed files with 30 additions and 1 deletions

View File

@ -1370,4 +1370,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

View File

@ -855,4 +855,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