summaryrefslogtreecommitdiff
path: root/mysql-test/t/key_cache.test
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@oracle.com>2011-12-14 15:33:01 +0100
committerMattias Jonsson <mattias.jonsson@oracle.com>2011-12-14 15:33:01 +0100
commit7e63c8ac0dca423081296133090aad2dbf74b48b (patch)
tree4adb688db824badb3db784673d38d1ae5e61621a /mysql-test/t/key_cache.test
parentfc516afc88747ad58b14dc6d570f25d62057467a (diff)
parent52076824c988c036b0cb84ee3b8a382a48a66612 (diff)
downloadmariadb-git-7e63c8ac0dca423081296133090aad2dbf74b48b.tar.gz
merged bug#12361113.
Also added tests for partitions key caches.
Diffstat (limited to 'mysql-test/t/key_cache.test')
-rw-r--r--mysql-test/t/key_cache.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/t/key_cache.test b/mysql-test/t/key_cache.test
index a404e9bf15a..76b538c301d 100644
--- a/mysql-test/t/key_cache.test
+++ b/mysql-test/t/key_cache.test
@@ -251,3 +251,19 @@ SET GLOBAL key_cache_block_size= @bug28478_key_cache_block_size;
DROP TABLE t1;
# End of 4.1 tests
+
+--echo #
+--echo # Bug#12361113: crash when load index into cache
+--echo #
+
+--echo # Note that this creates an empty disabled key cache!
+SET GLOBAL key_cache_none.key_cache_block_size = 1024;
+CREATE TABLE t1 (a INT, b INTEGER NOT NULL, KEY (b) ) ENGINE = MYISAM;
+INSERT INTO t1 VALUES (1, 1);
+--error ER_UNKNOWN_KEY_CACHE
+CACHE INDEX t1 in key_cache_none;
+--echo # The bug crashed the server at LOAD INDEX below. Now it will succeed
+--echo # since the default cache is used due to CACHE INDEX failed for
+--echo # key_cache_none.
+LOAD INDEX INTO CACHE t1;
+DROP TABLE t1;