1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00
This commit is contained in:
Ramil Kalimullin
2009-03-27 13:34:24 +04:00
3 changed files with 83 additions and 3 deletions

View File

@@ -1184,6 +1184,16 @@ end:
if (rw_trans)
start_waiting_global_read_lock(thd);
}
else if (all)
{
/*
A COMMIT of an empty transaction. There may be savepoints.
Destroy them. If the transaction is not empty
savepoints are cleared in ha_commit_one_phase()
or ha_rollback_trans().
*/
thd->transaction.cleanup();
}
#endif /* USING_TRANSACTIONS */
DBUG_RETURN(error);
}
@@ -1292,11 +1302,11 @@ int ha_rollback_trans(THD *thd, bool all)
thd->transaction.xid_state.xid.null();
}
if (all)
{
thd->variables.tx_isolation=thd->session_tx_isolation;
thd->transaction.cleanup();
}
}
/* Always cleanup. Even if there nht==0. There may be savepoints. */
if (all)
thd->transaction.cleanup();
#endif /* USING_TRANSACTIONS */
if (all)
thd->transaction_rollback_request= FALSE;