Skip to content

Commit c935622

Browse files
committed
MDEV-19555 assert Diagnostics_area::sql_errno() in ha_rollback_trans
Fixed the assert to restore pre-refactoring condition for calling set_error() equivalent.
1 parent e9aac09 commit c935622

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/handler.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1957,7 +1957,8 @@ int ha_rollback_trans(THD *thd, bool all)
19571957
Thanks to possibility of MDL deadlock rollback request can come even if
19581958
transaction hasn't been started in any transactional storage engine.
19591959
*/
1960-
if (thd->transaction_rollback_request)
1960+
if (thd->transaction_rollback_request &&
1961+
thd->transaction.xid_state.is_explicit_XA())
19611962
thd->transaction.xid_state.set_error(thd->get_stmt_da()->sql_errno());
19621963

19631964
thd->has_waiter= false;

0 commit comments

Comments
 (0)