WIP MDEV-21175 Remove dict_table_t::n_foreign_key_checks_running
The counter dict_table_t::n_foreign_key_checks_running was a work-around for missing meta-data locking (MDL) on the SQL layer. ER_TABLE_IN_FK_CHECK: Replaced with ER_UNUSED_26. HA_ERR_TABLE_IN_FK_CHECK: Remove. dict_table_t: Remove inc_fk_checks(), dec_fk_checks(), n_foreign_key_checks_running. row_ins_check_foreign_constraints(), row_upd_check_references_constraints(): Do not acquire a shared dict_sys latch nor touch the reference counters. row_drop_table_for_mysql(): Make the checks stricter. We will still employ row_mysql_drop_list for TRUNCATE TABLE and for dropping internal tables related to FULLTEXT INDEX. So, this will not fix MDEV-21283 yet. MDEV-21602 CREATE TABLE…PRIMARY KEY…SELECT workaround causes DROP TABLE to ignore locks The error handling of CREATE…SELECT would invoke handler::delete_table() while still holding locks on the table, due to not having invoked handlerton::rollback first. InnoDB used to work around this as well. In MDEV-742 this was worked around further by breaking MDL, causing MDEV-22733.
Showing
Please register or sign in to comment