summaryrefslogtreecommitdiff
path: root/mysql-test/t/range.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/range.test')
-rw-r--r--mysql-test/t/range.test25
1 files changed, 24 insertions, 1 deletions
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test
index 890377ed977..7369b9d8a16 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -2232,6 +2232,29 @@ select * from t1 inner join t2 on ( t2.b = t1.v or t2.a = t1.pk);
drop table t1, t2;
--echo #
---echo # End of 10.2 tests
+--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 #