mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Merge sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0-build
into sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0
This commit is contained in:
commit
aa42093553
3 changed files with 14 additions and 15 deletions
|
@ -61,7 +61,7 @@ fi
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
client_args="--silent --socket=$socket_path --connect_timeout=1 "
|
client_args="--no-defaults --silent --socket=$socket_path --connect_timeout=1 "
|
||||||
|
|
||||||
[ -n "$username" ] && client_args="$client_args --user=$username "
|
[ -n "$username" ] && client_args="$client_args --user=$username "
|
||||||
[ -n "$password" ] && client_args="$client_args --password=$password "
|
[ -n "$password" ] && client_args="$client_args --password=$password "
|
||||||
|
|
|
@ -77,6 +77,10 @@ void init_thr_alarm(uint max_alarms)
|
||||||
sigfillset(&full_signal_set); /* Neaded to block signals */
|
sigfillset(&full_signal_set); /* Neaded to block signals */
|
||||||
pthread_mutex_init(&LOCK_alarm,MY_MUTEX_INIT_FAST);
|
pthread_mutex_init(&LOCK_alarm,MY_MUTEX_INIT_FAST);
|
||||||
pthread_cond_init(&COND_alarm,NULL);
|
pthread_cond_init(&COND_alarm,NULL);
|
||||||
|
if (thd_lib_detected == THD_LIB_LT)
|
||||||
|
thr_client_alarm= SIGALRM;
|
||||||
|
else
|
||||||
|
thr_client_alarm= SIGUSR1;
|
||||||
#ifndef USE_ALARM_THREAD
|
#ifndef USE_ALARM_THREAD
|
||||||
if (thd_lib_detected != THD_LIB_LT)
|
if (thd_lib_detected != THD_LIB_LT)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2180,17 +2180,6 @@ static void init_signals(void)
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
DBUG_ENTER("init_signals");
|
DBUG_ENTER("init_signals");
|
||||||
|
|
||||||
if (thd_lib_detected == THD_LIB_LT)
|
|
||||||
{
|
|
||||||
thr_client_alarm= SIGALRM;
|
|
||||||
thr_kill_signal= SIGINT;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
thr_client_alarm= SIGUSR1;
|
|
||||||
thr_kill_signal= SIGUSR2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (test_flags & TEST_SIGINT)
|
if (test_flags & TEST_SIGINT)
|
||||||
{
|
{
|
||||||
my_sigset(thr_kill_signal, end_thread_signal);
|
my_sigset(thr_kill_signal, end_thread_signal);
|
||||||
|
@ -2249,14 +2238,13 @@ static void init_signals(void)
|
||||||
#ifdef SIGTSTP
|
#ifdef SIGTSTP
|
||||||
sigaddset(&set,SIGTSTP);
|
sigaddset(&set,SIGTSTP);
|
||||||
#endif
|
#endif
|
||||||
sigaddset(&set,THR_SERVER_ALARM);
|
if (thd_lib_detected != THD_LIB_LT)
|
||||||
|
sigaddset(&set,THR_SERVER_ALARM);
|
||||||
if (test_flags & TEST_SIGINT)
|
if (test_flags & TEST_SIGINT)
|
||||||
{
|
{
|
||||||
// May be SIGINT
|
// May be SIGINT
|
||||||
sigdelset(&set, thr_kill_signal);
|
sigdelset(&set, thr_kill_signal);
|
||||||
}
|
}
|
||||||
// For alarms
|
|
||||||
sigdelset(&set, thr_client_alarm);
|
|
||||||
sigprocmask(SIG_SETMASK,&set,NULL);
|
sigprocmask(SIG_SETMASK,&set,NULL);
|
||||||
pthread_sigmask(SIG_SETMASK,&set,NULL);
|
pthread_sigmask(SIG_SETMASK,&set,NULL);
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
|
@ -3432,6 +3420,13 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
DEBUGGER_OFF;
|
DEBUGGER_OFF;
|
||||||
|
|
||||||
|
/* Set signal used to kill MySQL */
|
||||||
|
#if defined(SIGUSR2)
|
||||||
|
thr_kill_signal= thd_lib_detected == THD_LIB_LT ? SIGINT : SIGUSR2;
|
||||||
|
#else
|
||||||
|
thr_kill_signal= SIGINT;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _CUSTOMSTARTUPCONFIG_
|
#ifdef _CUSTOMSTARTUPCONFIG_
|
||||||
if (_cust_check_startup())
|
if (_cust_check_startup())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue