mariadb/storage/innobase/lock
mariadb-DebarunBanerjee afe9632913 MDEV-33593 Auto increment deadlock error causes ASSERT in subsequent save point
The issue here is ha_innobase::get_auto_increment() could cause a
deadlock involving auto-increment lock and rollback the transaction
implicitly. For such cases, storage engines usually call
thd_mark_transaction_to_rollback() to inform SQL engine about it which
in turn takes appropriate actions and close the transaction. In innodb,
we call it while converting Innodb error code to MySQL.

However, since ::innobase_get_autoinc() returns void, we skip the call
for error code conversion and also miss marking the transaction for
rollback for deadlock error. We assert eventually while releasing a
savepoint as the transaction state is not active.

Since convert_error_code_to_mysql() is handling some generic error
handling part, like invoking the callback when needed, we should call
that function in ha_innobase::get_auto_increment() even if we don't
return the resulting mysql error code back.
2024-03-07 21:54:06 +05:30
..
lock0iter.cc Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
lock0lock.cc MDEV-33593 Auto increment deadlock error causes ASSERT in subsequent save point 2024-03-07 21:54:06 +05:30
lock0prdt.cc Merge remote-tracking branch 'origin/10.4' into 10.5 2022-09-14 16:24:51 +04:00
lock0wait.cc Merge branch '10.4' into 10.5 2023-11-08 12:59:00 +01:00