summaryrefslogtreecommitdiff
path: root/mysql-test/r/heap_hash.result
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2004-10-12 18:21:25 +0400
committerunknown <sergefp@mysql.com>2004-10-12 18:21:25 +0400
commit612c83b845822e13a6653af3985c4e3395cb8259 (patch)
tree9fbb4447b3d2c377cbca04976cb29c19bdea3683 /mysql-test/r/heap_hash.result
parent99e1b8179eb88ad64e8cae7a6acd7822b94dda1f (diff)
downloadmariadb-git-612c83b845822e13a6653af3985c4e3395cb8259.tar.gz
Fix for bug#5138 continued: added comments, removed extra debug printf calls, changed ha_heap::records_in_range to use table->rec_per_key.
heap/hp_block.c: Fix for bug#5138 continued: Added comments. heap/hp_delete.c: Fix for bug#5138 continued: Added comments. heap/hp_write.c: Fix for bug#5138 continued: Added comments, removed unneeded printf include/heap.h: Fix for bug#5138 continued: Added comments. mysql-test/r/heap_hash.result: Fix for bug#5138 continued: added FLUSH TABLES and rec_per_key estimates tests, updated test results mysql-test/t/heap_hash.test: Fix for bug#5138 continued: added FLUSH TABLES and rec_per_key estimates tests, updated test results sql/ha_heap.cc: Fix for bug#5138 continued: fixed comments to be correct removed unneded printf use TABLE::rec_per_key for records_in_range statistics
Diffstat (limited to 'mysql-test/r/heap_hash.result')
-rw-r--r--mysql-test/r/heap_hash.result34
1 files changed, 25 insertions, 9 deletions
diff --git a/mysql-test/r/heap_hash.result b/mysql-test/r/heap_hash.result
index 29287b23745..4f5de197858 100644
--- a/mysql-test/r/heap_hash.result
+++ b/mysql-test/r/heap_hash.result
@@ -233,6 +233,19 @@ id select_type table type possible_keys key key_len ref rows Extra
insert into t1 select * from t1;
explain select * from t1 where a='aaaa';
id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref a a 8 const 1 Using where
+explain select * from t1 where a='aaab';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref a a 8 const 1 Using where
+explain select * from t1 where a='aaac';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref a a 8 const 1 Using where
+explain select * from t1 where a='aaad';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref a a 8 const 1 Using where
+flush tables;
+explain select * from t1 where a='aaaa';
+id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a a 8 const 2 Using where
explain select * from t1 where a='aaab';
id select_type table type possible_keys key key_len ref rows Extra
@@ -248,16 +261,16 @@ delete from t1;
insert into t1 select * from t2;
explain select * from t1 where a='aaaa';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref a a 8 const 2 Using where
+1 SIMPLE t1 ref a a 8 const 1 Using where
explain select * from t1 where a='aaab';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref a a 8 const 2 Using where
+1 SIMPLE t1 ref a a 8 const 1 Using where
explain select * from t1 where a='aaac';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref a a 8 const 2 Using where
+1 SIMPLE t1 ref a a 8 const 1 Using where
explain select * from t1 where a='aaad';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref a a 8 const 2 Using where
+1 SIMPLE t1 ref a a 8 const 1 Using where
drop table t1, t2;
create table t1 (
id int unsigned not null primary key auto_increment,
@@ -305,6 +318,7 @@ insert into t1 (name) select name from t2;
insert into t1 (name) select name from t2;
insert into t1 (name) select name from t2;
insert into t1 (name) select name from t2;
+flush tables;
select count(*) from t1 where name='Matt';
count(*)
7
@@ -314,9 +328,8 @@ id select_type table type possible_keys key key_len ref rows Extra
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 0 PRIMARY 1 id NULL 91 NULL NULL HASH
-t1 1 heap_idx 1 name NULL 15 NULL NULL HASH
+t1 1 heap_idx 1 name NULL 13 NULL NULL HASH
t1 1 btree_idx 1 name A NULL NULL NULL BTREE
-flush tables;
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 0 PRIMARY 1 id NULL 91 NULL NULL HASH
@@ -333,9 +346,12 @@ show index from t3;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t3 1 a 1 a NULL NULL NULL NULL HASH
t3 1 a 2 b NULL 15 NULL NULL HASH
-flush tables;
show index from t3;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t3 1 a 1 a NULL NULL NULL NULL HASH
-t3 1 a 2 b NULL 13 NULL NULL HASH
-drop table t1,t2;
+t3 1 a 2 b NULL 15 NULL NULL HASH
+explain select * from t1 ignore key(btree_idx), t3 where t1.name='matt' and t3.a = concat('',t1.name) and t3.b=t1.name;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 ref heap_idx heap_idx 20 const 7 Using where
+1 SIMPLE t3 ref a a 40 func,const 6 Using where
+drop table t1, t2, t3;