Skip to content

Commit d5d1199

Browse files
AliSQLAliSQL
authored andcommitted
[Bugfix] Issue#54 The ACK Receiver Thread didn't handle signal correctly
Description =========== Ack Receiver thread will be launched when booting the MySQL server, but it is before the signal register, so the thread can receive the signal, and can't deal with shutdown smoothly like 'SIGTERM, SIGHUP'.
1 parent a6cc59f commit d5d1199

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sql/mysqld.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4103,12 +4103,6 @@ int init_common_variables()
41034103
if (thread_running_high_watermark == 0)
41044104
thread_running_high_watermark= max_connections;
41054105

4106-
#ifdef HAVE_REPLICATION
4107-
if (repl_semisync_master.initObject() ||
4108-
repl_semisync_slave.initObject())
4109-
return 1;
4110-
#endif
4111-
41124106
unireg_init(opt_specialflag); /* Set up extern variabels */
41134107
if (!(my_default_lc_messages=
41144108
my_locale_by_name(lc_messages)))
@@ -5537,6 +5531,12 @@ int mysqld_main(int argc, char **argv)
55375531

55385532
my_init_signals();
55395533

5534+
#ifdef HAVE_REPLICATION
5535+
if (repl_semisync_master.initObject() ||
5536+
repl_semisync_slave.initObject())
5537+
unireg_abort(1); // Will do exit
5538+
#endif
5539+
55405540
size_t guardize= 0;
55415541
int retval= pthread_attr_getguardsize(&connection_attrib, &guardize);
55425542
DBUG_ASSERT(retval == 0);

0 commit comments

Comments
 (0)