mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Bug#12361113: CRASH WHEN "LOAD INDEX INTO CACHE" WITH TOO
SMALL KEY CACHE The server crashed on division by zero because the key cache was not initialized and the block length was 0 which was used in a division. The fix was to not allow CACHE INDEX if the key cache was not initiallized. Thus never try LOAD INDEX INTO CACHE for an uninitialized key cache. Also added some windows files/directories to .bzrignore.
This commit is contained in:
@@ -368,3 +368,19 @@ Variable_name Value
|
||||
key_cache_block_size 1536
|
||||
SET GLOBAL key_cache_block_size= @bug28478_key_cache_block_size;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#12361113: crash when load index into cache
|
||||
#
|
||||
# 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);
|
||||
CACHE INDEX t1 in key_cache_none;
|
||||
ERROR HY000: Unknown key cache 'key_cache_none'
|
||||
# The bug crashed the server at LOAD INDEX below. Now it will succeed
|
||||
# since the default cache is used due to CACHE INDEX failed for
|
||||
# key_cache_none.
|
||||
LOAD INDEX INTO CACHE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 preload_keys status OK
|
||||
DROP TABLE t1;
|
||||
|
||||
Reference in New Issue
Block a user