summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorVarun Gupta <varunraiko1803@gmail.com>2018-12-16 21:50:49 +0200
committerVarun Gupta <varunraiko1803@gmail.com>2018-12-16 21:50:49 +0200
commitd1f399408d245dd8b971ba331eaaedf488e083b6 (patch)
tree74e5ffbe98517ce105193c76c2ab9939d31cff55 /mysql-test/t
parent1a7158b88a117f6543e1318a7abdc490cdfd5e67 (diff)
downloadmariadb-git-d1f399408d245dd8b971ba331eaaedf488e083b6.tar.gz
MDEV-6453: Assertion `inited==NONE || (inited==RND && scan)' failed in handler::ha_rnd_init(bool)
with InnoDB, joins, AND/OR conditions The inited parameter handler is not initialised when we do a quick_select after a table scan.
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/range_innodb.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/t/range_innodb.test b/mysql-test/t/range_innodb.test
index f76794814ef..605006587cc 100644
--- a/mysql-test/t/range_innodb.test
+++ b/mysql-test/t/range_innodb.test
@@ -45,3 +45,20 @@ explain select * from t0 left join t2 on t2.a <t0.a and t2.b between 50 and 250;
drop table t0,t1,t2;
+CREATE TABLE t1 (
+ pk INT PRIMARY KEY, f1 INT, f2 CHAR(1), f3 CHAR(1),
+ KEY(f1), KEY(f2)
+) ENGINE=InnoDB;
+
+INSERT INTO t1 VALUES
+(1,4,'v',NULL),(2,6,'v',NULL),(3,7,'c',NULL),(4,1,'e',NULL),(5,0,'x',NULL),
+(6,7,'i',NULL),(7,7,'e',NULL),(8,1,'p',NULL),(9,7,'s',NULL),(10,1,'j',NULL),
+(11,5,'z',NULL),(12,2,'c',NULL),(13,0,'a',NULL),(14,1,'q',NULL),(15,8,'y',NULL),
+(16,1,'m',NULL),(17,1,'r',NULL),(18,9,'v',NULL),(19,1,'n',NULL);
+
+CREATE TABLE t2 (f4 INT, f5 CHAR(1)) ENGINE=InnoDB;
+INSERT INTO t2 VALUES (4,'q'),(NULL,'j');
+
+SELECT * FROM t1 AS t1_1, t1 AS t1_2, t2
+WHERE f5 = t1_2.f2 AND ( t1_1.f1 = 103 AND t1_1.f2 = 'o' OR t1_1.pk < f4 );
+drop table t1,t2;