diff options
author | unknown <igor@olga.mysql.com> | 2007-04-03 22:24:57 -0700 |
---|---|---|
committer | unknown <igor@olga.mysql.com> | 2007-04-03 22:24:57 -0700 |
commit | 201a343a7106d73dc35b825764af15a50e0b879d (patch) | |
tree | 2fce445cd79ac12743f1ee44b8611e6594450116 /mysql-test | |
parent | da037917b22ad522062ddcb15f96bc6249084fd3 (diff) | |
parent | e488e6f23a14490b619d5bbbf2fc4db65dc4b9ef (diff) | |
download | mariadb-git-201a343a7106d73dc35b825764af15a50e0b879d.tar.gz |
Merge olga.mysql.com:/home/igor/mysql-4.1-opt
into olga.mysql.com:/home/igor/mysql-5.0-opt
mysql-test/r/order_by.result:
Manual merge
mysql-test/t/order_by.test:
Manual merge
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/order_by.result | 25 | ||||
-rw-r--r-- | mysql-test/t/order_by.test | 6 |
2 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 5eeb9bd6190..eedc2fa476b 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -964,6 +964,31 @@ x1 x2 4 1 2 +SELECT a, a IN (1,2) FROM t1 ORDER BY a IN (1,2); +a a IN (1,2) +3 0 +4 0 +2 1 +1 1 +SELECT a FROM t1 ORDER BY a IN (1,2); +a +3 +4 +2 +1 +SELECT a+10 FROM t1 ORDER BY a IN (1,2); +a+10 +13 +14 +12 +11 +SELECT a, IF(a IN (1,2), a, a+10) FROM t1 +ORDER BY IF(a IN (3,4), a, a+10); +a IF(a IN (1,2), a, a+10) +3 13 +4 14 +1 1 +2 2 DROP TABLE t1; create table t1 (a int not null, b int not null, c int not null); insert t1 values (1,1,1),(1,1,2),(1,2,1); diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index 6ad62ee8127..3e8fa07dfb7 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -658,6 +658,12 @@ SELECT IF(a IN (1,2), a, '') as x1, IF(a NOT IN (1,2), a, '') as x2 SELECT IF(a IN (1,2), a, '') as x1, IF(a NOT IN (1,2), a, '') as x2 FROM t1 GROUP BY x1, IF(a NOT IN (1,2), a, ''); +# The remaining queries are for better coverage +SELECT a, a IN (1,2) FROM t1 ORDER BY a IN (1,2); +SELECT a FROM t1 ORDER BY a IN (1,2); +SELECT a+10 FROM t1 ORDER BY a IN (1,2); +SELECT a, IF(a IN (1,2), a, a+10) FROM t1 + ORDER BY IF(a IN (3,4), a, a+10); DROP TABLE t1; # End of 4.1 |