-
unknown authored
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>). sql/log.cc: A comment to warn that thd can be 0. The part about LOG_EVENT_FORCED_ROTATE_F is just to avoid segfault; this flag is already removed in 4.1 anyway. sql/log_event.cc: A comment. sql/log_event.h: 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. This fixes BUG#2045 "Sending SIGHUP to mysqld crashes it if running with --log-bin"
a50761a5