summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2011-04-12 13:49:16 +0200
committerunknown <knielsen@knielsen-hq.org>2011-04-12 13:49:16 +0200
commit3a3a91ff051abe859589e33fab4b5588e325d55b (patch)
tree8e3bcb705d1b3d6ef1d31e8e04cb39d6f7b4b326
parent7a3a8b417e29f4c8add109d6de6da6d493b2afa2 (diff)
downloadmariadb-git-3a3a91ff051abe859589e33fab4b5588e325d55b.tar.gz
lp:732124: PBXT result file updates that were forgotten when patch was pushed.
-rw-r--r--mysql-test/suite/pbxt/r/union.result22
-rw-r--r--mysql-test/suite/pbxt/t/union.test9
2 files changed, 28 insertions, 3 deletions
diff --git a/mysql-test/suite/pbxt/r/union.result b/mysql-test/suite/pbxt/r/union.result
index cfcd17cf0d9..5d9dfb07965 100644
--- a/mysql-test/suite/pbxt/r/union.result
+++ b/mysql-test/suite/pbxt/r/union.result
@@ -362,7 +362,7 @@ a
2
select found_rows();
found_rows()
-6
+5
SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 100;
a
1
@@ -372,7 +372,7 @@ a
5
select found_rows();
found_rows()
-6
+5
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 100 UNION SELECT * FROM t2;
a
1
@@ -405,7 +405,7 @@ a
4
select found_rows();
found_rows()
-6
+5
SELECT SQL_CALC_FOUND_ROWS * FROM t1 limit 2,2 UNION SELECT * FROM t2;
a
3
@@ -1166,9 +1166,12 @@ a b
select * from ((select * from t1 limit 1) union (select * from t1 limit 1)) a;
a b
1 a
+2 b
select * from ((select * from t1 limit 1) union (select * from t1 limit 1) union (select * from t1 limit 1)) a;
a b
1 a
+2 b
+3 c
select * from ((((select * from t1))) union (select * from t1) union (select * from t1)) a;
a b
1 a
@@ -1426,4 +1429,17 @@ select _utf8'12' union select _latin1'12345';
12
12
12345
+create table t1 (a int);
+insert into t1 values (10),(10),(10),(2),(3),(4),(5),(6),(7),(8),(9),(1),(10);
+select a from t1 where false UNION select a from t1 limit 8;
+a
+10
+2
+3
+4
+5
+6
+7
+8
+drop table t1;
End of 5.0 tests
diff --git a/mysql-test/suite/pbxt/t/union.test b/mysql-test/suite/pbxt/t/union.test
index 02c73d4bb57..c216b3caceb 100644
--- a/mysql-test/suite/pbxt/t/union.test
+++ b/mysql-test/suite/pbxt/t/union.test
@@ -904,6 +904,15 @@ drop table t1, t2;
#
select _utf8'12' union select _latin1'12345';
+#
+# lp:732124 union + limit returns wrong result
+#
+create table t1 (a int);
+insert into t1 values (10),(10),(10),(2),(3),(4),(5),(6),(7),(8),(9),(1),(10);
+--sorted_result
+select a from t1 where false UNION select a from t1 limit 8;
+drop table t1;
+
--disable_query_log
drop database pbxt;