diff options
author | unknown <istruewing@stella.local> | 2007-11-06 13:41:32 +0100 |
---|---|---|
committer | unknown <istruewing@stella.local> | 2007-11-06 13:41:32 +0100 |
commit | 42829c61b6a912b51e4cebf8697307cbddc7bffd (patch) | |
tree | 5765c27f08faee97340832a397794c8021051664 /mysql-test/README | |
parent | 6f12c924392e0d9ec480f60a7bcc1f6ea87e871b (diff) | |
download | mariadb-git-42829c61b6a912b51e4cebf8697307cbddc7bffd.tar.gz |
Bug#4692 - DISABLE/ENABLE KEYS waste a space
Disabling and enabling indexes on a non-empty table grows the
index file.
Disabling indexes just sets a flag per non-unique index and does not
free the index blocks of the affected indexes. Re-enabling indexes
creates new indexes with new blocks. The old blocks remain unused
in the index file.
Fixed by dropping and re-creating all indexes if non-empty disabled
indexes exist when enabling indexes. Dropping all indexes resets
the internal end-of-file marker to the end of the index file header.
It also clears the root block pointers of every index and clears the
deleted blocks chains. This way all blocks are declared as free.
myisam/mi_check.c:
Bug#4692 - DISABLE/ENABLE KEYS waste a space
Added function mi_drop_all_indexes() to support drop of all indexes
in case we want to re-enable non-empty disabled indexes.
Changed mi_repair(), mi_repair_by_sort(), and mi_repair_parallel()
to use the new function instead of duplicate drop index code.
mysql-test/r/myisam.result:
Bug#4692 - DISABLE/ENABLE KEYS waste a space
Added test result.
mysql-test/t/myisam.test:
Bug#4692 - DISABLE/ENABLE KEYS waste a space
Added test.
Diffstat (limited to 'mysql-test/README')
0 files changed, 0 insertions, 0 deletions