Fix bug# 18274 InnoDB auto_increment field reset on OPTIMIZE TABLE
OPTIMIZE TABLE recreates the whole table. That is why the counter gets reset. Making the next autoinc column persistent is a separate issue from resetting the value after an OPTIMIZE TABLE. We already have a check for ALTER TABLE and CREATE INDEX to preserve the value on table recreate. We should be able to add an additional check for OPTIMIZE TABLE to preserve the next value. rb://519 Approved by Jimmy Yang.
Showing
Please register or sign in to comment