Description:
myisamchk --unpack will recreate the table and use a small pointer size. This can cause issues when you subsequently try to add a lot of data to the table.
You then need to run an ALTER TABLE .. MAX_ROWS to enlarge the pointer size.
It would be nice to have it either restore the old pointer size (which I don't think is really possible), or to be able to specify the pointer size to use in the unpack operation.
How to repeat:
-- create table
CREATE TABLE packed (a varchar(1000)) ENGINE=myisam;
-- populate it
insert into packed values (repeat('a', 100)), (repeat('b', 100)), (repeat('c', 100)),(repeat('d', 100)),(repeat('e', 100)),(repeat('f', 100)),(repeat('g', 100)),(repeat('h', 100)),(repeat('i', 100)),(repeat('j', 100));
-- look at max_data_length prior to packing/unpacking
SHOW TABLE STATUS LIKE 'packed'\G
-- pack with myisampack
myisampack packed
-- unpack with myisamchk
myisamchk -u packed
-- flush tables and view max_data_length again
FLUSH TABLES;
SHOW TABLE STATUS LIKE 'packed'\G
Suggested fix:
Add an option to specify the size of the table to use (or myisam_data_pointer_size).