diff options
author | unknown <sergefp@mysql.com> | 2005-02-08 23:44:51 +0300 |
---|---|---|
committer | unknown <sergefp@mysql.com> | 2005-02-08 23:44:51 +0300 |
commit | 37e2873fe38db47548ecac5bd3afaac23b8791be (patch) | |
tree | 6a54fa75f12baa5932602964a2ca08830e947d0a /mysql-test/t/heap_hash.test | |
parent | ffe417fddeb68274166153a357d9d534675d1823 (diff) | |
download | mariadb-git-37e2873fe38db47548ecac5bd3afaac23b8791be.tar.gz |
Fix for BUG#8371: wrong rec_per_key value for hash index on temporary table
mysql-test/r/heap_hash.result:
Testcase for BUG#8371: wrong rec_per_key value for hash index on temporary table
mysql-test/t/heap_hash.test:
Testcase for BUG#8371: wrong rec_per_key value for hash index on temporary table
sql/ha_heap.cc:
Fix for BUG#8371: wrong rec_per_key value for hash index on temporary table:
Don't assume that table->rec_per_key==NULL if table->tmp_table != NO_TMP_TABLE,
this is not true for tables created with "CREATE TEMPORARY TABLE" (while it holds
for temporary tables created during query execution)
sql/sql_select.cc:
Initialize rec_per_key for all keys in temporary table.
Diffstat (limited to 'mysql-test/t/heap_hash.test')
-rw-r--r-- | mysql-test/t/heap_hash.test | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/t/heap_hash.test b/mysql-test/t/heap_hash.test index 6d8fdec4b9e..6d27f19dfad 100644 --- a/mysql-test/t/heap_hash.test +++ b/mysql-test/t/heap_hash.test @@ -251,3 +251,9 @@ explain select * from t1 ignore key(btree_idx), t3 where t1.name='matt' and t3.a drop table t1, t2, t3; +# Fix for BUG#8371: wrong rec_per_key value for hash index on temporary table +create temporary table t1 ( a int, index (a) ) engine=memory; +insert into t1 values (1),(2),(3),(4),(5); +select a from t1 where a in (1,3); +explain select a from t1 where a in (1,3); +drop table t1; |