summaryrefslogtreecommitdiff
path: root/mysql-test/t/union.test
diff options
context:
space:
mode:
authorholyfoot/hf@hfmain.(none) <>2007-03-09 16:51:32 +0400
committerholyfoot/hf@hfmain.(none) <>2007-03-09 16:51:32 +0400
commiteca8b1a62d6adcf626e1620e6a988b1077f49ca7 (patch)
tree21132a2634a78e6b5d8c1aa06b42bae2e2ec4aa0 /mysql-test/t/union.test
parent71e6d69647ca4f483cf4fed359b642bb616c8cc5 (diff)
parente10d74cff9dd08fb1d5376f79da8d0dbf215e8dd (diff)
downloadmariadb-git-eca8b1a62d6adcf626e1620e6a988b1077f49ca7.tar.gz
Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt
into mysql.com:/home/hf/work/mrg/mysql-5.1-opt
Diffstat (limited to 'mysql-test/t/union.test')
-rw-r--r--mysql-test/t/union.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index 2bdf8420d6d..cc93fbd715a 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -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