|
1 | 1 | # |
| 2 | +# Bug#6726: NOT BETWEEN parse failure |
| 3 | +# |
| 4 | +create table t1 (a int, b int); |
| 5 | +insert into t1 values (1,2), (2,3), (3,4), (4,5); |
| 6 | +select * from t1 where a not between 1 and 2; |
| 7 | +a b |
| 8 | +3 4 |
| 9 | +4 5 |
| 10 | +select * from t1 where a not between 1 and 2 and b not between 3 and 4; |
| 11 | +a b |
| 12 | +4 5 |
| 13 | +drop table t1; |
| 14 | +# |
| 15 | +# MDEV-13673 Bad result in view |
| 16 | +# |
| 17 | +explain extended select (3-2)+1, (3/2)*1, 3-(2+1), 3/(2*1); |
| 18 | +id select_type table type possible_keys key key_len ref rows filtered Extra |
| 19 | +1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used |
| 20 | +Warnings: |
| 21 | +Note 1003 select 3 - 2 + 1 AS `(3-2)+1`,3 / 2 * 1 AS `(3/2)*1`,3 - (2 + 1) AS `3-(2+1)`,3 / (2 * 1) AS `3/(2*1)` |
| 22 | +# |
| 23 | +# MDEV-11784 View is created with invalid definition which causes ERROR 1241 (21000): Operand should contain 1 column(s) |
| 24 | +# |
| 25 | +create table t1 (i int, j int); |
| 26 | +insert t1 values (1,1),(2,2); |
| 27 | +create view v1 as select (2, 3) not in (select i, j from t1); |
| 28 | +select * from v1; |
| 29 | +(2, 3) not in (select i, j from t1) |
| 30 | +1 |
| 31 | +show create view v1; |
| 32 | +View v1 |
| 33 | +Create View CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select !((2,3) in (select `t1`.`i`,`t1`.`j` from `t1`)) AS `(2, 3) not in (select i, j from t1)` |
| 34 | +character_set_client latin1 |
| 35 | +collation_connection latin1_swedish_ci |
| 36 | +drop view v1; |
| 37 | +drop table t1; |
| 38 | +# |
2 | 39 | # MDEV-23656 view: removal of parentheses results in wrong result |
3 | 40 | # |
4 | 41 | create table t1 (a int, b decimal(10,2)); |
|
0 commit comments