Commit c9356223 authored by Andrei's avatar Andrei

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

Fixed the assert to restore pre-refactoring condition for
calling set_error() equivalent.
parent e9aac091
...@@ -1957,7 +1957,8 @@ int ha_rollback_trans(THD *thd, bool all) ...@@ -1957,7 +1957,8 @@ int ha_rollback_trans(THD *thd, bool all)
Thanks to possibility of MDL deadlock rollback request can come even if Thanks to possibility of MDL deadlock rollback request can come even if
transaction hasn't been started in any transactional storage engine. 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->transaction.xid_state.set_error(thd->get_stmt_da()->sql_errno());
thd->has_waiter= false; thd->has_waiter= false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment