Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
e4164cda
Commit
e4164cda
authored
Mar 23, 2007
by
serg@sergbook.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge sergbook.mysql.com:/usr/home/serg/Abk/mysql-4.1
into sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0-build
parents
3e9d98b0
d2d72bfc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
15 deletions
+12
-15
mysys/thr_alarm.c
mysys/thr_alarm.c
+4
-0
sql/mysqld.cc
sql/mysqld.cc
+8
-15
No files found.
mysys/thr_alarm.c
View file @
e4164cda
...
@@ -77,6 +77,10 @@ void init_thr_alarm(uint max_alarms)
...
@@ -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
...
...
sql/mysqld.cc
View file @
e4164cda
...
@@ -704,7 +704,7 @@ static void close_connections(void)
...
@@ -704,7 +704,7 @@ static void close_connections(void)
DBUG_PRINT
(
"info"
,(
"Waiting for select thread"
));
DBUG_PRINT
(
"info"
,(
"Waiting for select thread"
));
#ifndef DONT_USE_THR_ALARM
#ifndef DONT_USE_THR_ALARM
if
(
pthread_kill
(
select_thread
,
thr_client_alarm
))
if
(
pthread_kill
(
select_thread
,
THR_SERVER_ALARM
))
break
;
// allready dead
break
;
// allready dead
#endif
#endif
set_timespec
(
abstime
,
2
);
set_timespec
(
abstime
,
2
);
...
@@ -2180,17 +2180,6 @@ static void init_signals(void)
...
@@ -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,11 @@ static void init_signals(void)
...
@@ -2249,14 +2238,11 @@ static void init_signals(void)
#ifdef SIGTSTP
#ifdef SIGTSTP
sigaddset
(
&
set
,
SIGTSTP
);
sigaddset
(
&
set
,
SIGTSTP
);
#endif
#endif
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 +3418,13 @@ int main(int argc, char **argv)
...
@@ -3432,6 +3418,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
=
thd_lib_detected
==
SIGINT
;
#endif
#ifdef _CUSTOMSTARTUPCONFIG_
#ifdef _CUSTOMSTARTUPCONFIG_
if
(
_cust_check_startup
())
if
(
_cust_check_startup
())
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment