mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
Backport of patch for Bug#46267.
Original revision: ------------------------------------------------------------ revno: 2801.10.16 committer: Vladislav Vaintroub <vvaintroub@mysql.com> branch nick: mysql-azalea-bugfixing timestamp: Mon 2009-08-10 13:26:23 +0200 message: Bug #46267 Shutdown with idle connection crash the server. The crash happens when mysqld logs a warning. The macro ER() used in sql_print_warning references thread local storage variable via current_thd(), to output the warning in "current user language". However, for the shutdown thread, current_thd() will return NULL, and mysqld will crash while derefencing NULL pointer. Solution: get error mesage text with ER_DEFAULT() macro instead of ER(), this does not current_thd() and will output errors in default language. ------------------------------------------------------------
This commit is contained in:
parent
8bc236e936
commit
f740dff0c9
1 changed files with 1 additions and 1 deletions
|
@ -1001,7 +1001,7 @@ static void close_connections(void)
|
|||
if (tmp->vio_ok())
|
||||
{
|
||||
if (global_system_variables.log_warnings)
|
||||
sql_print_warning(ER(ER_FORCING_CLOSE),my_progname,
|
||||
sql_print_warning(ER_DEFAULT(ER_FORCING_CLOSE),my_progname,
|
||||
tmp->thread_id,
|
||||
(tmp->main_security_ctx.user ?
|
||||
tmp->main_security_ctx.user : ""));
|
||||
|
|
Loading…
Reference in a new issue