Remove dict_table_t::rollback_instant(unsigned n)
On rollback of changes to SYS_COLUMNS, we can no longer assume that the change was the instant addition of a column at the end of the column list. The function dict_table_t::rollback_instant(unsigned n) was inherently incompatible with instantly dropping or reordering columns. When a change to SYS_COLUMNS is rolled back, we must simply evict the affected table definition, at the end of the rollback. We cannot free the table object immediately, because the current transaction that is being rolled back may be holding locks on the table. dict_table_remove_from_cache_low(): Replaced by dict_table_remove_from_cache(). dict_table_remove_from_cache(): Add a third parameter keep=false, so that the table can be freed by the caller. dict_table_t::rollback_instant(): Add the parameter old_n_fields, and simplify some logic. trx_lock_t::evicted_tables: List of tables on which trx_t::evict_table() was invoked. trx_t::evict_table(): Evict a table definition during rollback. trx_commit_in_memory(): Empty the trx->lock.evicted_tables list after the locks were released, by freeing the table objects. row_undo_ins_remove_clust_rec: Invoke trx_t::evict_table() on the affected table if a change to SYS_COLUMNS is being rolled back. row_undo_mod_clust_low(): FIXME: do the same
Showing
Please register or sign in to comment