summaryrefslogtreecommitdiff
path: root/mysql-test/main/range_innodb.result
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2018-03-09 14:05:35 +0200
committerMonty <monty@mariadb.org>2018-03-29 13:59:44 +0300
commita7abddeffa6a760ce948c2dfb007cdf3f1a369d5 (patch)
tree70eb743fa965a17380bbc0ac88ae79ca1075b896 /mysql-test/main/range_innodb.result
parentab1941266c59a19703a74b5593cf3f508a5752d7 (diff)
downloadmariadb-git-a7abddeffa6a760ce948c2dfb007cdf3f1a369d5.tar.gz
Create 'main' test directory and move 't' and 'r' there
Diffstat (limited to 'mysql-test/main/range_innodb.result')
-rw-r--r--mysql-test/main/range_innodb.result39
1 files changed, 39 insertions, 0 deletions
diff --git a/mysql-test/main/range_innodb.result b/mysql-test/main/range_innodb.result
new file mode 100644
index 00000000000..794e6c7b3cc
--- /dev/null
+++ b/mysql-test/main/range_innodb.result
@@ -0,0 +1,39 @@
+#
+# Range optimizer (and related) tests that need InnoDB.
+#
+drop table if exists t0, t1, t2;
+#
+# MDEV-6735: Range checked for each record used with key
+#
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1(a int);
+insert into t1 select A.a + B.a* 10 + C.a * 100 + D.a * 1000
+from t0 A, t0 B, t0 C, t0 D;
+create table t2 (
+a int,
+b int,
+filler1 char(100),
+filler2 char(100),
+filler3 char(100),
+filler4 char(100),
+key(a),
+key(b)
+) engine=innodb;
+insert into t2
+select
+a,a,
+repeat('0123456789', 10),
+repeat('0123456789', 10),
+repeat('0123456789', 10),
+repeat('0123456789', 10)
+from t1;
+analyze table t2;
+Table Op Msg_type Msg_text
+test.t2 analyze status OK
+# The following must not use "Range checked for each record":
+explain select * from t0 left join t2 on t2.a <t0.a and t2.b between 50 and 250;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 ALL NULL NULL NULL NULL 10
+1 SIMPLE t2 range a,b b 5 NULL 201 Using where; Using join buffer (flat, BNL join)
+drop table t0,t1,t2;