1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-19555 assert Diagnostics_area::sql_errno() in ha_rollback_trans

Fixed the assert to restore pre-refactoring condition for
calling set_error() equivalent.
This commit is contained in:
Andrei
2022-01-18 13:57:27 +02:00
parent e9aac09153
commit c9356223c9

View File

@ -1957,7 +1957,8 @@ int ha_rollback_trans(THD *thd, bool all)
Thanks to possibility of MDL deadlock rollback request can come even if
transaction hasn't been started in any transactional storage engine.
*/
if (thd->transaction_rollback_request)
if (thd->transaction_rollback_request &&
thd->transaction.xid_state.is_explicit_XA())
thd->transaction.xid_state.set_error(thd->get_stmt_da()->sql_errno());
thd->has_waiter= false;