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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
8a7f5ce3
Commit
8a7f5ce3
authored
Feb 22, 2007
by
anozdrin/alik@alik.opbmk
Browse files
Options
Browse Files
Download
Plain Diff
Merge alik.opbmk:/mnt/raid/alik/MySQL/devel/5.0-rt
into alik.opbmk:/mnt/raid/alik/MySQL/devel/5.1-rt-merge
parents
9abb43bf
76f813a5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
5 deletions
+31
-5
mysql-test/t/disabled.def
mysql-test/t/disabled.def
+0
-1
server-tools/instance-manager/listener.cc
server-tools/instance-manager/listener.cc
+3
-0
server-tools/instance-manager/manager.cc
server-tools/instance-manager/manager.cc
+4
-4
server-tools/instance-manager/thread_registry.cc
server-tools/instance-manager/thread_registry.cc
+21
-0
server-tools/instance-manager/thread_registry.h
server-tools/instance-manager/thread_registry.h
+3
-0
No files found.
mysql-test/t/disabled.def
View file @
8a7f5ce3
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
##############################################################################
##############################################################################
user_limits : Bug#23921 random failure of user_limits.test
user_limits : Bug#23921 random failure of user_limits.test
im_daemon_life_cycle : Bug#24415 see note: [19 Dec 23:17] Trudy Pelzer
im_options : Bug#20294 2006-07-24 stewart Instance manager test im_options fails randomly
im_options : Bug#20294 2006-07-24 stewart Instance manager test im_options fails randomly
concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences
concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences
ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
...
...
server-tools/instance-manager/listener.cc
View file @
8a7f5ce3
...
@@ -177,10 +177,13 @@ void Listener::run()
...
@@ -177,10 +177,13 @@ void Listener::run()
return
;
return
;
err:
err:
log_error
(
"Listener: failed to initialize. Initiate shutdown..."
);
// we have to close the ip sockets in case of error
// we have to close the ip sockets in case of error
for
(
i
=
0
;
i
<
num_sockets
;
i
++
)
for
(
i
=
0
;
i
<
num_sockets
;
i
++
)
closesocket
(
sockets
[
i
]);
closesocket
(
sockets
[
i
]);
thread_registry
->
set_error_status
();
thread_registry
->
unregister_thread
(
&
thread_info
);
thread_registry
->
unregister_thread
(
&
thread_info
);
thread_registry
->
request_shutdown
();
thread_registry
->
request_shutdown
();
return
;
return
;
...
...
server-tools/instance-manager/manager.cc
View file @
8a7f5ce3
...
@@ -181,6 +181,9 @@ void Manager::stop_all_threads()
...
@@ -181,6 +181,9 @@ void Manager::stop_all_threads()
/* Stop all threads. */
/* Stop all threads. */
p_thread_registry
->
deliver_shutdown
();
p_thread_registry
->
deliver_shutdown
();
/* Set error status in the thread registry. */
p_thread_registry
->
set_error_status
();
}
}
...
@@ -248,7 +251,6 @@ bool Manager::init_user_map(User_map *user_map)
...
@@ -248,7 +251,6 @@ bool Manager::init_user_map(User_map *user_map)
int
Manager
::
main
()
int
Manager
::
main
()
{
{
int
rc
=
1
;
bool
shutdown_complete
=
FALSE
;
bool
shutdown_complete
=
FALSE
;
pid_t
manager_pid
=
getpid
();
pid_t
manager_pid
=
getpid
();
...
@@ -442,8 +444,6 @@ int Manager::main()
...
@@ -442,8 +444,6 @@ int Manager::main()
log_info
(
"Manager: finished."
);
log_info
(
"Manager: finished."
);
rc
=
0
;
err:
err:
/* delete the pid file */
/* delete the pid file */
my_delete
(
Options
::
Main
::
pid_file_name
,
MYF
(
0
));
my_delete
(
Options
::
Main
::
pid_file_name
,
MYF
(
0
));
...
@@ -452,7 +452,7 @@ err:
...
@@ -452,7 +452,7 @@ err:
/* free alarm structures */
/* free alarm structures */
end_thr_alarm
(
1
);
end_thr_alarm
(
1
);
#endif
#endif
return
rc
;
return
thread_registry
.
get_error_status
()
?
1
:
0
;
}
}
...
...
server-tools/instance-manager/thread_registry.cc
View file @
8a7f5ce3
...
@@ -52,6 +52,7 @@ void Thread_info::init(bool send_signal_on_shutdown_arg)
...
@@ -52,6 +52,7 @@ void Thread_info::init(bool send_signal_on_shutdown_arg)
Thread_registry
::
Thread_registry
()
:
Thread_registry
::
Thread_registry
()
:
shutdown_in_progress
(
FALSE
)
shutdown_in_progress
(
FALSE
)
,
sigwait_thread_pid
(
pthread_self
())
,
sigwait_thread_pid
(
pthread_self
())
,
error_status
(
FALSE
)
{
{
pthread_mutex_init
(
&
LOCK_thread_registry
,
0
);
pthread_mutex_init
(
&
LOCK_thread_registry
,
0
);
pthread_cond_init
(
&
COND_thread_registry_is_empty
,
0
);
pthread_cond_init
(
&
COND_thread_registry_is_empty
,
0
);
...
@@ -391,3 +392,23 @@ bool Thread::join()
...
@@ -391,3 +392,23 @@ bool Thread::join()
return
pthread_join
(
id
,
NULL
)
!=
0
;
return
pthread_join
(
id
,
NULL
)
!=
0
;
}
}
int
Thread_registry
::
get_error_status
()
{
int
ret_error_status
;
pthread_mutex_lock
(
&
LOCK_thread_registry
);
ret_error_status
=
error_status
;
pthread_mutex_unlock
(
&
LOCK_thread_registry
);
return
ret_error_status
;
}
void
Thread_registry
::
set_error_status
()
{
pthread_mutex_lock
(
&
LOCK_thread_registry
);
error_status
=
TRUE
;
pthread_mutex_unlock
(
&
LOCK_thread_registry
);
}
server-tools/instance-manager/thread_registry.h
View file @
8a7f5ce3
...
@@ -143,6 +143,8 @@ public:
...
@@ -143,6 +143,8 @@ public:
pthread_mutex_t
*
mutex
);
pthread_mutex_t
*
mutex
);
int
cond_timedwait
(
Thread_info
*
info
,
pthread_cond_t
*
cond
,
int
cond_timedwait
(
Thread_info
*
info
,
pthread_cond_t
*
cond
,
pthread_mutex_t
*
mutex
,
struct
timespec
*
wait_time
);
pthread_mutex_t
*
mutex
,
struct
timespec
*
wait_time
);
int
get_error_status
();
void
set_error_status
();
private:
private:
void
interrupt_threads
();
void
interrupt_threads
();
...
@@ -154,6 +156,7 @@ private:
...
@@ -154,6 +156,7 @@ private:
pthread_mutex_t
LOCK_thread_registry
;
pthread_mutex_t
LOCK_thread_registry
;
pthread_cond_t
COND_thread_registry_is_empty
;
pthread_cond_t
COND_thread_registry_is_empty
;
pthread_t
sigwait_thread_pid
;
pthread_t
sigwait_thread_pid
;
bool
error_status
;
private:
private:
Thread_registry
(
const
Thread_registry
&
);
Thread_registry
(
const
Thread_registry
&
);
...
...
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