Bug #16111 destroyed key cache still usable
Submitted: 31 Dec 2005 5:26 Modified: 10 Apr 2006 16:19
Reporter: Kolbe Kegel Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S3 (Non-critical)
Version:5.0.17 OS:Linux (Linux)
Assigned to: CPU Architecture:Any

[31 Dec 2005 5:26] Kolbe Kegel
Description:
Even after a key cache has been destroyed according to the technique specified in http://dev.mysql.com/doc/refman/5.0/en/multiple-key-caches.html, it is possible to assign a table's indexes to that key cache.

How to repeat:
CREATE TABLE t1 (col1 INT, KEY (col1));
CACHE INDEX t1 IN keycache1;
SET @@global.keycache1.key_buffer_size=10*1024;
CACHE INDEX t1 IN keycache1;

SET @@global.keycache1.key_buffer_size=0;
SELECT @@global.keycache1.key_buffer_size;

CREATE TABLE t2 (col1 INT, KEY (col1));
CACHE INDEX t2 IN keycache1;

Suggested fix:
It should not be possible to assign a table's indexes to a key cache that has been destroyed.