-
Jon Olav Hauglid authored
IN ALTER TABLE The problem was that if in-place ALTER TABLE was killed while executing handler functions, the ALTER TABLE would end with ER_QUERY_INTERRUPTED but the ALTER TABLE operations could still have completed and thus changed the table. This also meant that the statement would not be binlogged thus breaking replication. The reason was that ALTER TABLE would check if it was killed after the changes had been committed, and report statement failure in this case even if the table had already been updated. This patch fixes the problem by not checking if the statement has been killed after the main phase of ALTER TABLE has completed. This means that once the table changes have been made, killing ALTER TABLE will not be possible. This is implemented by adding a new MYSQL_OPEN_IGNORE_KILLED flag that is set when reopening tables and that open_table() and mysql_lock_tables() will obey.
Jon Olav Hauglid authoredIN ALTER TABLE The problem was that if in-place ALTER TABLE was killed while executing handler functions, the ALTER TABLE would end with ER_QUERY_INTERRUPTED but the ALTER TABLE operations could still have completed and thus changed the table. This also meant that the statement would not be binlogged thus breaking replication. The reason was that ALTER TABLE would check if it was killed after the changes had been committed, and report statement failure in this case even if the table had already been updated. This patch fixes the problem by not checking if the statement has been killed after the main phase of ALTER TABLE has completed. This means that once the table changes have been made, killing ALTER TABLE will not be possible. This is implemented by adding a new MYSQL_OPEN_IGNORE_KILLED flag that is set when reopening tables and that open_table() and mysql_lock_tables() will obey.
Loading