Skip to content

Commit

Permalink
[Bugfix] Issue#54 The ACK Receiver Thread didn't handle signal correctly
Browse files Browse the repository at this point in the history
 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'.
  • Loading branch information
AliSQL authored and AliSQL committed Oct 10, 2017
1 parent a6cc59f commit d5d1199
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sql/mysqld.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4103,12 +4103,6 @@ int init_common_variables()
if (thread_running_high_watermark == 0)
thread_running_high_watermark= max_connections;

#ifdef HAVE_REPLICATION
if (repl_semisync_master.initObject() ||
repl_semisync_slave.initObject())
return 1;
#endif

unireg_init(opt_specialflag); /* Set up extern variabels */
if (!(my_default_lc_messages=
my_locale_by_name(lc_messages)))
Expand Down Expand Up @@ -5537,6 +5531,12 @@ int mysqld_main(int argc, char **argv)

my_init_signals();

#ifdef HAVE_REPLICATION
if (repl_semisync_master.initObject() ||
repl_semisync_slave.initObject())
unireg_abort(1); // Will do exit
#endif

size_t guardize= 0;
int retval= pthread_attr_getguardsize(&connection_attrib, &guardize);
DBUG_ASSERT(retval == 0);
Expand Down

0 comments on commit d5d1199

Please sign in to comment.