diff options
Diffstat (limited to 'mysql-test/r/order_by.result')
-rw-r--r-- | mysql-test/r/order_by.result | 25 |
1 files changed, 25 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); |