diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-08-18 17:30:34 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-08-18 17:30:34 +0300 |
commit | 1509363970e9cb574005e3af560299c055dda983 (patch) | |
tree | 4590a6b09f637c745a5069e0793dfca96f33d4b2 /strings/CMakeLists.txt | |
parent | 4c50120d1400eab236af70d36f1c683d2b30d59a (diff) | |
download | mariadb-git-1509363970e9cb574005e3af560299c055dda983.tar.gz |
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@935ba09d52c1908bde273ad1940b5ab919d9763d
and ported to MariaDB 10.0.8 by
commit c291ddfdf774b50c34b9741c6e39c57bae8fd1dc
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).
Diffstat (limited to 'strings/CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions