mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
Bug#4692 - DISABLE/ENABLE KEYS waste a space
Post-pushbuild fix Added a purecov comment and a test for coverage of parallel enable keys.
This commit is contained in:
parent
7491e15f21
commit
43a5312157
3 changed files with 15 additions and 1 deletions
|
@ -1487,7 +1487,7 @@ static int mi_drop_all_indexes(MI_CHECK *param, MI_INFO *info, my_bool force)
|
||||||
/* Remove all key blocks of this index file from key cache. */
|
/* Remove all key blocks of this index file from key cache. */
|
||||||
if ((error= flush_key_blocks(share->key_cache, share->kfile,
|
if ((error= flush_key_blocks(share->key_cache, share->kfile,
|
||||||
FLUSH_IGNORE_CHANGED)))
|
FLUSH_IGNORE_CHANGED)))
|
||||||
goto end;
|
goto end; /* purecov: inspected */
|
||||||
|
|
||||||
/* Clear index root block pointers. */
|
/* Clear index root block pointers. */
|
||||||
for (i= 0; i < share->base.keys; i++)
|
for (i= 0; i < share->base.keys; i++)
|
||||||
|
|
|
@ -1830,5 +1830,13 @@ ALTER TABLE t1 ENABLE KEYS;
|
||||||
SHOW TABLE STATUS LIKE 't1';
|
SHOW TABLE STATUS LIKE 't1';
|
||||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||||
t1 MyISAM 10 Fixed 1 # # # 3072 # # # # # # #
|
t1 MyISAM 10 Fixed 1 # # # 3072 # # # # # # #
|
||||||
|
# Enable keys with parallel repair
|
||||||
|
SET @@myisam_repair_threads=2;
|
||||||
|
ALTER TABLE t1 DISABLE KEYS;
|
||||||
|
ALTER TABLE t1 ENABLE KEYS;
|
||||||
|
SET @@myisam_repair_threads=1;
|
||||||
|
CHECK TABLE t1 EXTENDED;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 check status OK
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
End of 5.0 tests
|
End of 5.0 tests
|
||||||
|
|
|
@ -1185,6 +1185,12 @@ SHOW TABLE STATUS LIKE 't1';
|
||||||
#--exec ls -log var/master-data/test/t1.MYI
|
#--exec ls -log var/master-data/test/t1.MYI
|
||||||
#--exec myisamchk -dvv var/master-data/test/t1.MYI
|
#--exec myisamchk -dvv var/master-data/test/t1.MYI
|
||||||
#--exec myisamchk -iev var/master-data/test/t1.MYI
|
#--exec myisamchk -iev var/master-data/test/t1.MYI
|
||||||
|
--echo # Enable keys with parallel repair
|
||||||
|
SET @@myisam_repair_threads=2;
|
||||||
|
ALTER TABLE t1 DISABLE KEYS;
|
||||||
|
ALTER TABLE t1 ENABLE KEYS;
|
||||||
|
SET @@myisam_repair_threads=1;
|
||||||
|
CHECK TABLE t1 EXTENDED;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo End of 5.0 tests
|
--echo End of 5.0 tests
|
||||||
|
|
Loading…
Add table
Reference in a new issue