mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-23542 Server crashes in thd_clear_errors()
1) Checked presence of mysys_var. 2) Removed unneeded thd_clear_errors, its content added to THD::change_user.
This commit is contained in:
committed by
Nikita Malyavin
parent
da63eb16c9
commit
0775ca315e
@ -299,17 +299,6 @@ THD *thd_get_current_thd()
|
|||||||
return current_thd;
|
return current_thd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
Clear errors from the previous THD
|
|
||||||
|
|
||||||
@param thd THD object
|
|
||||||
*/
|
|
||||||
void thd_clear_errors(THD *thd)
|
|
||||||
{
|
|
||||||
my_errno= 0;
|
|
||||||
thd->mysys_var->abort= 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Get thread attributes for connection threads
|
Get thread attributes for connection threads
|
||||||
@ -1422,7 +1411,10 @@ void THD::change_user(void)
|
|||||||
cleanup();
|
cleanup();
|
||||||
cleanup_done= 0;
|
cleanup_done= 0;
|
||||||
reset_killed();
|
reset_killed();
|
||||||
thd_clear_errors(this);
|
/* Clear errors from the previous THD */
|
||||||
|
my_errno= 0;
|
||||||
|
if (mysys_var)
|
||||||
|
mysys_var->abort= 0;
|
||||||
|
|
||||||
/* Clear warnings. */
|
/* Clear warnings. */
|
||||||
if (!get_stmt_da()->is_warning_info_empty())
|
if (!get_stmt_da()->is_warning_info_empty())
|
||||||
|
Reference in New Issue
Block a user