summaryrefslogtreecommitdiff
path: root/mysql-test/main/null_key.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/null_key.result')
-rw-r--r--mysql-test/main/null_key.result15
1 files changed, 12 insertions, 3 deletions
diff --git a/mysql-test/main/null_key.result b/mysql-test/main/null_key.result
index 4b4a4b80dee..8eca97d5e70 100644
--- a/mysql-test/main/null_key.result
+++ b/mysql-test/main/null_key.result
@@ -18,9 +18,9 @@ id select_type table type possible_keys key key_len ref rows Extra
explain select * from t1 where a<=>b limit 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a 9 NULL 12 Using where; Using index
-explain select * from t1 where (a is null or a > 0 and a < 3) and b < 5 limit 3;
+explain select * from t1 where (a is null or a > 0 and a < 2) and b < 5 limit 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range a,b a 9 NULL 3 Using where; Using index
+1 SIMPLE t1 range a,b a 9 NULL 2 Using where; Using index
explain select * from t1 where (a is null or a = 7) and b=7;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref_or_null a,b a 9 const,const 2 Using where; Using index
@@ -257,10 +257,11 @@ uniq_id int(10) unsigned default NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,NULL),(2,NULL),(3,1),(4,2),(5,NULL),(6,NULL),(7,3),(8,4),(9,NULL),(10,NULL);
+INSERT INTO t1 VALUES (11,5),(12,6),(13,7),(14,8),(15,9);
INSERT INTO t2 VALUES (1,NULL),(2,NULL),(3,1),(4,2),(5,NULL),(6,NULL),(7,3),(8,4),(9,NULL),(10,NULL);
explain select id from t1 where uniq_id is null;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref idx1 idx1 5 const 5 Using index condition
+1 SIMPLE t1 ref idx1 idx1 5 const 6 Using index condition
explain select id from t1 where uniq_id =1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const idx1 idx1 5 const 1
@@ -290,6 +291,11 @@ id uniq_id
4 2
7 3
8 4
+11 5
+12 6
+13 7
+14 8
+15 9
SELECT * FROM t2 ORDER BY uniq_id, id;
id uniq_id
3 1
@@ -399,8 +405,11 @@ INSERT INTO t3 SELECT * FROM t4;
INSERT INTO t3 VALUES (2), (3);
ANALYZE table t1, t2, t3;
Table Op Msg_type Msg_text
+test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
+test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
+test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
SELECT COUNT(*) FROM t3;
COUNT(*)