mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
Improved coverage for the code added to fix bug 27532.
This commit is contained in:
parent
0ee34b1ca2
commit
e488e6f23a
2 changed files with 31 additions and 0 deletions
|
@ -937,4 +937,29 @@ 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;
|
||||
|
|
|
@ -645,6 +645,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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue