Commit 71a58572 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: move precedence tests into precedence_bugs.test

parent 2cd5df8c
......@@ -1766,8 +1766,3 @@ select 0=0, 0=-0, 0.0= -0.0, 0.0 = -(0.0), 0.0E1=-0.0E1, 0.0E1=-(0.0E1);
select CRC32(NULL), CRC32(''), CRC32('MySQL'), CRC32('mysql'), CRC32('01234567'), CRC32('012345678');
CRC32(NULL) CRC32('') CRC32('MySQL') CRC32('mysql') CRC32('01234567') CRC32('012345678')
NULL 0 3259397556 2501908538 763378421 939184570
explain extended select (3-2)+1, (3/2)*1, 3-(2+1), 3/(2*1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
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)`
......@@ -273,16 +273,6 @@ NULL
select mod(NULL, 2.0) as 'NULL';
NULL
NULL
create table t1 (a int, b int);
insert into t1 values (1,2), (2,3), (3,4), (4,5);
select * from t1 where a not between 1 and 2;
a b
3 4
4 5
select * from t1 where a not between 1 and 2 and b not between 3 and 4;
a b
4 5
drop table t1;
SELECT GREATEST(1,NULL) FROM DUAL;
GREATEST(1,NULL)
NULL
......
#
# Bug#6726: NOT BETWEEN parse failure
#
create table t1 (a int, b int);
insert into t1 values (1,2), (2,3), (3,4), (4,5);
select * from t1 where a not between 1 and 2;
a b
3 4
4 5
select * from t1 where a not between 1 and 2 and b not between 3 and 4;
a b
4 5
drop table t1;
#
# MDEV-13673 Bad result in view
#
explain extended select (3-2)+1, (3/2)*1, 3-(2+1), 3/(2*1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
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)`
#
# MDEV-11784 View is created with invalid definition which causes ERROR 1241 (21000): Operand should contain 1 column(s)
#
create table t1 (i int, j int);
insert t1 values (1,1),(2,2);
create view v1 as select (2, 3) not in (select i, j from t1);
select * from v1;
(2, 3) not in (select i, j from t1)
1
show create view v1;
View v1
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)`
character_set_client latin1
collation_connection latin1_swedish_ci
drop view v1;
drop table t1;
#
# MDEV-23656 view: removal of parentheses results in wrong result
#
create table t1 (a int, b decimal(10,2));
......
......@@ -6649,17 +6649,6 @@ INSERT INTO v (f1, f3) VALUES (1,1), (2,2);
ERROR HY000: Can not modify more than one base table through a join view 'test.v'
drop view v;
drop tables t1,t2,t3;
create table t1 (i int, j int);
insert t1 values (1,1),(2,2);
create view v1 as select (2, 3) not in (select i, j from t1);
select * from v1;
(2, 3) not in (select i, j from t1)
1
show create view v1;
View Create View character_set_client collation_connection
v1 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)` latin1 latin1_swedish_ci
drop view v1;
drop table t1;
#
# MDEV-10704: Assertion `field->field->table == table_arg'
# failed in fill_record(THD*, TABLE*, List<Item>&, List<Item>&,
......
......@@ -792,8 +792,3 @@ select 0=0, 0=-0, 0.0= -0.0, 0.0 = -(0.0), 0.0E1=-0.0E1, 0.0E1=-(0.0E1);
--echo #
select CRC32(NULL), CRC32(''), CRC32('MySQL'), CRC32('mysql'), CRC32('01234567'), CRC32('012345678');
#
# MDEV-13673 Bad result in view
#
explain extended select (3-2)+1, (3/2)*1, 3-(2+1), 3/(2*1);
......@@ -141,15 +141,6 @@ select mod(NULL, 2) as 'NULL';
select mod(NULL, 2.0) as 'NULL';
#
# Bug#6726: NOT BETWEEN parse failure
#
create table t1 (a int, b int);
insert into t1 values (1,2), (2,3), (3,4), (4,5);
select * from t1 where a not between 1 and 2;
select * from t1 where a not between 1 and 2 and b not between 3 and 4;
drop table t1;
#
# Test for bug #12791: one of the arguments of LEAST/GREATEST is NULL
#
......
--echo #
--echo # Bug#6726: NOT BETWEEN parse failure
--echo #
create table t1 (a int, b int);
insert into t1 values (1,2), (2,3), (3,4), (4,5);
select * from t1 where a not between 1 and 2;
select * from t1 where a not between 1 and 2 and b not between 3 and 4;
drop table t1;
--echo #
--echo # MDEV-13673 Bad result in view
--echo #
explain extended select (3-2)+1, (3/2)*1, 3-(2+1), 3/(2*1);
--echo #
--echo # MDEV-11784 View is created with invalid definition which causes ERROR 1241 (21000): Operand should contain 1 column(s)
--echo #
create table t1 (i int, j int);
insert t1 values (1,1),(2,2);
create view v1 as select (2, 3) not in (select i, j from t1);
select * from v1;
query_vertical show create view v1;
drop view v1;
drop table t1;
--echo #
--echo # MDEV-23656 view: removal of parentheses results in wrong result
......
......@@ -6362,17 +6362,6 @@ INSERT INTO v (f1, f3) VALUES (1,1), (2,2);
drop view v;
drop tables t1,t2,t3;
#
# MDEV-11784 View is created with invalid definition which causes ERROR 1241 (21000): Operand should contain 1 column(s)
#
create table t1 (i int, j int);
insert t1 values (1,1),(2,2);
create view v1 as select (2, 3) not in (select i, j from t1);
select * from v1;
show create view v1;
drop view v1;
drop table t1;
--echo #
--echo # MDEV-10704: Assertion `field->field->table == table_arg'
--echo # failed in fill_record(THD*, TABLE*, List<Item>&, List<Item>&,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment