summaryrefslogtreecommitdiff
path: root/mysql-test/t/range_innodb.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-04-01 10:24:36 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-04-01 10:24:36 +0300
commitf813131c7b235a490399764ba75c6138e602c23e (patch)
tree9360a0ff33952bf6f88771c4669eb18a9b438978 /mysql-test/t/range_innodb.test
parentf9639c2d1a5e24f1a1533b6277fe7eca3aa3c3c0 (diff)
parent24cb76b8dd86bf54f264352be41506995b6c89c4 (diff)
downloadmariadb-git-bb-10.1-merge.tar.gz
Merge 5.5 into 10.1bb-10.1-merge
Diffstat (limited to 'mysql-test/t/range_innodb.test')
-rw-r--r--mysql-test/t/range_innodb.test28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/t/range_innodb.test b/mysql-test/t/range_innodb.test
index a17ef3f1146..03e9e2f0678 100644
--- a/mysql-test/t/range_innodb.test
+++ b/mysql-test/t/range_innodb.test
@@ -46,6 +46,32 @@ explain select * from t0 left join t2 on t2.a <t0.a and t2.b between 50 and 250;
drop table t0,t1,t2;
+
+--echo #
+--echo # MDEV-10466: constructing an invalid SEL_ARG
+--echo #
+
+create table t1 (
+ pk int, a int, b int,
+ primary key (pk), index idx1(b), index idx2(b)
+) engine=innodb;
+insert into t1 values (1,6,0),(2,1,0),(3,5,2),(4,8,0);
+create table t2 (c int) engine=innodb;
+insert into t2 values (1),(2);
+create table t3 (d int) engine=innodb;
+insert into t3 values (3),(-1),(4);
+
+set @save_optimizer_switch=@@optimizer_switch;
+set optimizer_switch='extended_keys=on';
+
+explain
+select pk, a, b from t1,t2,t3 where b >= d and pk < c and b = '0';
+select pk, a, b from t1,t2,t3 where b >= d and pk < c and b = '0';
+
+set optimizer_switch=@save_optimizer_switch;
+
+drop table t1,t2,t3;
+
CREATE TABLE t1 (
pk INT PRIMARY KEY, f1 INT, f2 CHAR(1), f3 CHAR(1),
KEY(f1), KEY(f2)
@@ -87,3 +113,5 @@ select * from t1 where a=10 and b=10;
DROP TABLE t0,t1;
set @@global.debug_dbug="-d";
set @@optimizer_switch= @optimizer_switch_save;
+
+--echo # End of 10.1 tests