Fix, or a workaround for Bug#19386 "Multiple alter causes crashed table"
The problem is that in a MyISAM table the following column after a varchar field gets corrupted, if varchar field is extended. This should be made to work without a copy in the future, but I'm not sure if this code is ready yet. This fix will force copy in this case. It will not do any harm to have it here, only makes alter table a bit slower in this case. If this should work for MyISAM, then the bug is somewhere else in that code. Until it works, I propose this as a temporary fix or a workaround. Test case for the bug has been added. mysql-test/r/alter_table.result: Added test case for Bug#19386: Multiple alter causes crashed table. mysql-test/t/alter_table.test: Added test case for Bug#19386: Multiple alter causes crashed table. sql/ha_myisam.cc: For MyISAM type, if varchar column is extended, it should return not compatible for now. In other words, it forces a copy of the table during alter table.
Showing
Please register or sign in to comment