mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for BUG#2045 "Sending SIGHUP to mysqld crashes it if running with --log-bin".
The constructor of Rotate_log_event used when we are rotating our binlog or relay log, should not assume that there is a nonzero THD available. For example, when we are reacting to SIGHUP, the THD is 0. In fact we don't need to use the THD in this constructor; we can do like for Stop_log_event, and use the minimal Log_event constructor. If we were allowed to put Unix-specific commands in the testsuite, I'd add a test for this (<sigh>).
This commit is contained in:
@ -607,7 +607,7 @@ public:
|
||||
Rotate_log_event(THD* thd_arg, const char* new_log_ident_arg,
|
||||
uint ident_len_arg = 0,
|
||||
ulonglong pos_arg = LOG_EVENT_OFFSET)
|
||||
:Log_event(thd_arg,0,0), new_log_ident(new_log_ident_arg),
|
||||
:Log_event(), new_log_ident(new_log_ident_arg),
|
||||
pos(pos_arg),ident_len(ident_len_arg ? ident_len_arg :
|
||||
(uint) strlen(new_log_ident_arg)), alloced(0)
|
||||
{}
|
||||
|
Reference in New Issue
Block a user