diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
commit | 06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/precedence_bugs.test | |
parent | Initial commit. (diff) | |
download | mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/precedence_bugs.test')
-rw-r--r-- | mysql-test/main/precedence_bugs.test | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/mysql-test/main/precedence_bugs.test b/mysql-test/main/precedence_bugs.test new file mode 100644 index 00000000..ae35ca91 --- /dev/null +++ b/mysql-test/main/precedence_bugs.test @@ -0,0 +1,57 @@ +--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 +--echo # +create table t1 (a int, b decimal(10,2)); +insert into t1 values (1, 10.2); +create view v1 as select avg(b) / (2 + a) from t1; +query_vertical show create view v1; +drop view v1; +drop table t1; + +--echo # +--echo # MDEV-17408 VIEW is incorrectly defined for a combination of = and BETWEEN +--echo # +create view v1 as select 1 like (now() between '2000-01-01' and '2012-12-12' ); +query_vertical show create view v1; +drop view v1; + +--echo # +--echo # MDEV-30082 View definition losing brackets changes semantics of the query and causes wrong result +--echo # +create table t1 (a varchar(1), b bool) engine=myisam; +insert into t1 values ('u',1),('s',1); +select * from t1 where t1.b in (t1.a <= all (select 'a')); +create view v as select * from t1 where t1.b in (t1.a <= all (select 'a')); +select * from v; +show create view v; +drop view v; +drop table t1; + +--echo # +--echo # End of 10.3 results +--echo # |