diff options
author | Sergei Golubchik <serg@mariadb.org> | 2021-12-06 21:38:43 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-12-06 22:23:07 +0100 |
commit | 153b75b5762eacff1ab257e6e22522efd53e7c3e (patch) | |
tree | f61a0b96a53c43cd5db830ec2d95ec7e09ef7806 /mysql-test | |
parent | 045f5f7b10d391fc1653583594b4efbb5a495c4d (diff) | |
parent | 71027eceac31c9f35c94c9893abb072e41867541 (diff) | |
download | mariadb-git-153b75b5762eacff1ab257e6e22522efd53e7c3e.tar.gz |
Merge branch '10.2' into 10.3
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/main/range.result | 24 | ||||
-rw-r--r-- | mysql-test/main/range.test | 24 | ||||
-rw-r--r-- | mysql-test/main/range_mrr_icp.result | 24 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 2 |
4 files changed, 73 insertions, 1 deletions
diff --git a/mysql-test/main/range.result b/mysql-test/main/range.result index 00b4cdda75b..c58fd29102a 100644 --- a/mysql-test/main/range.result +++ b/mysql-test/main/range.result @@ -3180,5 +3180,29 @@ pk i v a b 2 2 4 2 4 drop table t1, t2; # +# MDEV-26553: Always FALSE/NULL disjunct on top level of WHERE is removed +# +create table t1 (a int, b int, index idx(a,b)); +insert into t1 values (1,1), (1,2), (2,1), (2,2), (3,3); +create table t2 (c int); +insert into t2 values (5), (2), (3), (4); +select 1 from t1 s1 +where 1 not in (select 1 from t1 +where ((a = 1 or a = 2) and b = 1) or (b > 5 and b < 1)); +1 +select 1 from t1 s1 +where 1 not in (select 1 from t1 +where ((a = 1 or a = 2) and b = 1) or b = NULL); +1 +select c from t2 +where 2 not in (select 1 from t1 +where ((a=1 or a=2) and b = 1) or (b > 5 and b < 1)); +c +5 +2 +3 +4 +drop table t1,t2; +# # End of 10.2 tests # diff --git a/mysql-test/main/range.test b/mysql-test/main/range.test index 0a30d6bb8b7..caa10a690ce 100644 --- a/mysql-test/main/range.test +++ b/mysql-test/main/range.test @@ -2204,5 +2204,29 @@ select * from t1 inner join t2 on ( t2.b = t1.v or t2.a = t1.pk); drop table t1, t2; --echo # +--echo # MDEV-26553: Always FALSE/NULL disjunct on top level of WHERE is removed +--echo # + +create table t1 (a int, b int, index idx(a,b)); +insert into t1 values (1,1), (1,2), (2,1), (2,2), (3,3); + +create table t2 (c int); +insert into t2 values (5), (2), (3), (4); + +select 1 from t1 s1 + where 1 not in (select 1 from t1 + where ((a = 1 or a = 2) and b = 1) or (b > 5 and b < 1)); + +select 1 from t1 s1 + where 1 not in (select 1 from t1 + where ((a = 1 or a = 2) and b = 1) or b = NULL); + +select c from t2 + where 2 not in (select 1 from t1 + where ((a=1 or a=2) and b = 1) or (b > 5 and b < 1)); + +drop table t1,t2; + +--echo # --echo # End of 10.2 tests --echo # diff --git a/mysql-test/main/range_mrr_icp.result b/mysql-test/main/range_mrr_icp.result index efc24b05e25..a271fdcdc92 100644 --- a/mysql-test/main/range_mrr_icp.result +++ b/mysql-test/main/range_mrr_icp.result @@ -3192,6 +3192,30 @@ pk i v a b 2 2 4 2 4 drop table t1, t2; # +# MDEV-26553: Always FALSE/NULL disjunct on top level of WHERE is removed +# +create table t1 (a int, b int, index idx(a,b)); +insert into t1 values (1,1), (1,2), (2,1), (2,2), (3,3); +create table t2 (c int); +insert into t2 values (5), (2), (3), (4); +select 1 from t1 s1 +where 1 not in (select 1 from t1 +where ((a = 1 or a = 2) and b = 1) or (b > 5 and b < 1)); +1 +select 1 from t1 s1 +where 1 not in (select 1 from t1 +where ((a = 1 or a = 2) and b = 1) or b = NULL); +1 +select c from t2 +where 2 not in (select 1 from t1 +where ((a=1 or a=2) and b = 1) or (b > 5 and b < 1)); +c +5 +2 +3 +4 +drop table t1,t2; +# # End of 10.2 tests # set optimizer_switch=@mrr_icp_extra_tmp; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index cbacde8554e..b7d33b39cd7 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -5156,7 +5156,7 @@ sub mysqld_start ($$) { $mysqld->{'started_opts'}= $extra_opts; my $expect_file= "$opt_vardir/tmp/".$mysqld->name().".expect"; - return $oldexe eq $exe || + return $oldexe eq ($exe || '') || sleep_until_file_created($mysqld->value('pid-file'), $expect_file, $opt_start_timeout, $mysqld->{'proc'}, $warn_seconds); } |