mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
Bug #31517: Potential crash due to access of NULL thd in mark_transaction_to_rollback()
Introduced in mark_transaction_to_rollback(), part of fix for bug 24989; fix is to check thd for NULL before using it.
This commit is contained in:
parent
e2bfd46b42
commit
ced64f8582
1 changed files with 5 additions and 2 deletions
|
@ -2241,8 +2241,11 @@ void THD::restore_sub_statement_state(Sub_statement_state *backup)
|
|||
|
||||
void mark_transaction_to_rollback(THD *thd, bool all)
|
||||
{
|
||||
thd->is_fatal_sub_stmt_error= TRUE;
|
||||
thd->transaction_rollback_request= all;
|
||||
if (thd)
|
||||
{
|
||||
thd->is_fatal_sub_stmt_error= TRUE;
|
||||
thd->transaction_rollback_request= all;
|
||||
}
|
||||
}
|
||||
/***************************************************************************
|
||||
Handling of XA id cacheing
|
||||
|
|
Loading…
Reference in a new issue