summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2005-01-25 23:13:36 -0800
committerunknown <igor@rurik.mysql.com>2005-01-25 23:13:36 -0800
commit235edc214452a870745264adc3841fed12925d4b (patch)
tree4ff3df3e7f3150e643021485d9b542bafb2461bb
parentffc492cdd1bef9ac3fa24e453f4e5c117a1caf41 (diff)
downloadmariadb-git-235edc214452a870745264adc3841fed12925d4b.tar.gz
order_by.result, order_by.test:
Added test case for bug #7672 that existed only in 4.0. mysql-test/t/order_by.test: Added test case for bug #7672 that existed only in 4.0. mysql-test/r/order_by.result: Added test case for bug #7672 that existed only in 4.0.
-rw-r--r--mysql-test/r/order_by.result17
-rw-r--r--mysql-test/t/order_by.test10
2 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
index ab71a6b53e6..ee8ca5f0328 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -771,3 +771,20 @@ sid wnid
39560 01019090000
37994 01019090000
drop table t1;
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (2), (1), (1), (2), (1);
+SELECT a FROM t1 ORDER BY a;
+a
+1
+1
+1
+2
+2
+(SELECT a FROM t1) ORDER BY a;
+a
+1
+1
+1
+2
+2
+DROP TABLE t1;
diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test
index ab5e93603e4..c6a77c71b2f 100644
--- a/mysql-test/t/order_by.test
+++ b/mysql-test/t/order_by.test
@@ -534,3 +534,13 @@ explain select * from t1 where wnid like '0101%' order by wnid;
select * from t1 where wnid like '0101%' order by wnid;
drop table t1;
+
+#
+# Bug #7672 - a wrong result for a select query in braces followed by order by
+#
+
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (2), (1), (1), (2), (1);
+SELECT a FROM t1 ORDER BY a;
+(SELECT a FROM t1) ORDER BY a;
+DROP TABLE t1;