diff options
author | unknown <sergefp@mysql.com> | 2004-10-12 18:21:25 +0400 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2004-10-12 18:21:25 +0400 |
commit | 612c83b845822e13a6653af3985c4e3395cb8259 (patch) | |
tree | 9fbb4447b3d2c377cbca04976cb29c19bdea3683 /mysql-test/t/heap_hash.test | |
parent | 99e1b8179eb88ad64e8cae7a6acd7822b94dda1f (diff) | |
download | mariadb-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/t/heap_hash.test')
-rw-r--r-- | mysql-test/t/heap_hash.test | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/mysql-test/t/heap_hash.test b/mysql-test/t/heap_hash.test index df233633840..6d8fdec4b9e 100644 --- a/mysql-test/t/heap_hash.test +++ b/mysql-test/t/heap_hash.test @@ -168,6 +168,14 @@ explain select * from t1 where a='aaab'; explain select * from t1 where a='aaac'; explain select * from t1 where a='aaad'; insert into t1 select * from t1; + +explain select * from t1 where a='aaaa'; +explain select * from t1 where a='aaab'; +explain select * from t1 where a='aaac'; +explain select * from t1 where a='aaad'; + +# a known effect: table reload causes statistics to be updated: +flush tables; explain select * from t1 where a='aaaa'; explain select * from t1 where a='aaab'; explain select * from t1 where a='aaac'; @@ -203,7 +211,6 @@ insert into t1 (name) values ('Matt'), ('Lilu'), ('Corbin'), ('Carly'), ('Suzy'), ('Hoppy'), ('Burrito'), ('Mimi'), ('Sherry'), ('Ben'), ('Phil'), ('Emily'), ('Mike'); insert into t2 select * from t1; - explain select * from t1 where name='matt'; explain select * from t2 where name='matt'; @@ -222,12 +229,11 @@ 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'; explain select * from t1 ignore index (btree_idx) where name='matt'; show index from t1; -flush tables; show index from t1; create table t3 @@ -238,8 +244,10 @@ create table t3 ) engine=heap; insert into t3 select name, name from t1; show index from t3; -flush tables; show index from t3; -drop table t1,t2; +# test rec_per_key use for joins. +explain select * from t1 ignore key(btree_idx), t3 where t1.name='matt' and t3.a = concat('',t1.name) and t3.b=t1.name; + +drop table t1, t2, t3; |