summaryrefslogtreecommitdiff
path: root/mysql-test/r/range.result
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2004-04-21 13:15:43 +0300
committerunknown <marko@hundin.mysql.fi>2004-04-21 13:15:43 +0300
commitc9e1538298ccfc2172d4db06df54f0f321b7db09 (patch)
treeae59a3c9912d8e259bde8cadb1f3c324bda1e419 /mysql-test/r/range.result
parentfd6ae5aa21906a221caf8fd34aabbaee1ef6a447 (diff)
downloadmariadb-git-c9e1538298ccfc2172d4db06df54f0f321b7db09.tar.gz
Introduce keys in child tables corresponding to FOREIGN KEYs
Remove redundant keys in CREATE TABLE and ALTER TABLE mysql-test/r/constraints.result: Remove redundant keys mysql-test/r/create.result: Remove redundant keys mysql-test/r/innodb.result: Remove redundant keys mysql-test/r/range.result: Remove redundant keys mysql-test/t/range.test: Remove redundant keys sql/sql_class.cc: Equality comparison of keys (ignoring name) sql/sql_class.h: Equality comparison of keys (ignoring name) sql/sql_table.cc: Remove redundant keys sql/sql_yacc.yy: Introduce keys in child tables corresponding to FOREIGN KEYs
Diffstat (limited to 'mysql-test/r/range.result')
-rw-r--r--mysql-test/r/range.result8
1 files changed, 2 insertions, 6 deletions
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result
index d1a5dd00370..290e72d3b55 100644
--- a/mysql-test/r/range.result
+++ b/mysql-test/r/range.result
@@ -249,18 +249,14 @@ explain select count(*) from t1 where x in (1,2);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range x x 5 NULL 2 Using where; Using index
drop table t1;
-CREATE TABLE t1 (key1 int(11) NOT NULL default '0', KEY i1 (key1), KEY i2 (key1));
+CREATE TABLE t1 (key1 int(11) NOT NULL default '0', KEY i1 (key1));
INSERT INTO t1 VALUES (0),(0),(1),(1);
CREATE TABLE t2 (keya int(11) NOT NULL default '0', KEY j1 (keya));
INSERT INTO t2 VALUES (0),(0),(1),(1),(2),(2);
explain select * from t1, t2 where (t1.key1 <t2.keya + 1) and t2.keya=3;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref j1 j1 4 const 1 Using where; Using index
-1 SIMPLE t1 ALL i1,i2 NULL NULL NULL 4 Range checked for each record (index map: 0x3)
-explain select * from t1 force index(i2), t2 where (t1.key1 <t2.keya + 1) and t2.keya=3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref j1 j1 4 const 1 Using where; Using index
-1 SIMPLE t1 ALL i2 NULL NULL NULL 4 Range checked for each record (index map: 0x2)
+1 SIMPLE t1 ALL i1 NULL NULL NULL 4 Range checked for each record (index map: 0x1)
DROP TABLE t1,t2;
CREATE TABLE t1 (
a int(11) default NULL,