mariadb/storage/innobase/row
Marko Mäkelä 1509363970 MDEV-23484 Rollback unnecessarily acquires dict_operation_lock for every row
InnoDB transaction rollback includes an unnecessary work-around for
a data corruption bug that was fixed by me in MySQL 5.6.12
mysql/mysql-server@935ba09d52
and ported to MariaDB 10.0.8 by
commit c291ddfdf7
in 2013 and 2014, respectively.

By acquiring and releasing dict_operation_lock in shared mode,
row_undo() hopes to prevent the table from being dropped while
the undo log record is being rolled back. But, thanks to mentioned fix,
debug assertions (that we are adding) show that the rollback is
protected by transactional locks (table IX lock, in addition to
implicit or explicit exclusive locks on the records that had been modified).

Because row_drop_table_for_mysql() would invoke
row_add_table_to_background_drop_list() if any locks exist on the table,
the mere existence of locks (which is guaranteed during ROLLBACK) is
enough to protect the table from disappearing. Hence, acquiring and
releasing dict_operation_lock for every row that is being rolled back is
unnecessary.

row_undo(): Remove the unnecessary acquisition and release of
dict_operation_lock.

Note: row_add_table_to_background_drop_list() is mostly working around
bugs outside InnoDB:
MDEV-21175 (insufficient MDL protection of FOREIGN KEY operations)
MDEV-21602 (incorrect error handling of CREATE TABLE...SELECT).
2020-08-18 17:30:34 +03:00
..
row0ext.cc MDEV-20377: Make WITH_MSAN more usable 2020-07-01 17:23:00 +03:00
row0ftsort.cc MDEV-20377: Make WITH_MSAN more usable 2020-07-01 17:23:00 +03:00
row0import.cc Merge 10.1 into 10.2 2020-07-20 14:53:24 +03:00
row0ins.cc MDEV-20377: Make WITH_MSAN more usable 2020-07-01 17:23:00 +03:00
row0log.cc MDEV-20377: Make WITH_MSAN more usable 2020-07-01 17:23:00 +03:00
row0merge.cc MDEV-20377: Make WITH_MSAN more usable 2020-07-01 17:23:00 +03:00
row0mysql.cc MDEV-22934 Table disappear after two alter table command 2020-08-18 15:05:23 +05:30
row0purge.cc MDEV-22769 Shutdown hang or crash due to XA breaking locks 2020-06-05 15:22:46 +03:00
row0quiesce.cc Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
row0row.cc MDEV-21595: innodb offset_t rename to rec_offs 2020-04-29 12:02:47 +03:00
row0sel.cc MDEV-20377: Make WITH_MSAN more usable 2020-07-01 17:23:00 +03:00
row0trunc.cc MDEV-20638 Remove the deadcode from srv_master_thread() and srv_active_wake_master_thread_low() 2020-07-23 16:23:20 +05:30
row0uins.cc MDEV-23484 Rollback unnecessarily acquires dict_operation_lock for every row 2020-08-18 17:30:34 +03:00
row0umod.cc MDEV-23484 Rollback unnecessarily acquires dict_operation_lock for every row 2020-08-18 17:30:34 +03:00
row0undo.cc MDEV-23484 Rollback unnecessarily acquires dict_operation_lock for every row 2020-08-18 17:30:34 +03:00
row0upd.cc MDEV-20377: Make WITH_MSAN more usable 2020-07-01 17:23:00 +03:00
row0vers.cc MDEV-23198 Crash in REPLACE 2020-07-31 11:54:35 +03:00