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
537ad02d
Commit
537ad02d
authored
Oct 10, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into mysql.com:/home/cps/mysql/trees/mysql-5.0-virgin
parents
f20d34f4
777bab98
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
5 deletions
+23
-5
server-tools/instance-manager/instance_map.cc
server-tools/instance-manager/instance_map.cc
+3
-1
server-tools/instance-manager/manager.cc
server-tools/instance-manager/manager.cc
+17
-1
server-tools/instance-manager/options.cc
server-tools/instance-manager/options.cc
+2
-2
server-tools/instance-manager/options.h
server-tools/instance-manager/options.h
+1
-1
No files found.
server-tools/instance-manager/instance_map.cc
View file @
537ad02d
...
...
@@ -215,6 +215,8 @@ int Instance_map::flush_instances()
hash_init
(
&
hash
,
default_charset_info
,
START_HASH_SIZE
,
0
,
0
,
get_instance_key
,
delete_instance
,
0
);
rc
=
load
();
/* don't init guardian if we failed to load instances */
if
(
!
rc
)
guardian
->
init
();
// TODO: check error status.
pthread_mutex_unlock
(
&
LOCK_instance_map
);
guardian
->
unlock
();
...
...
server-tools/instance-manager/manager.cc
View file @
537ad02d
...
...
@@ -104,6 +104,19 @@ int my_sigwait(const sigset_t *set, int *sig)
#endif
void
stop_all
(
Guardian_thread
*
guardian
,
Thread_registry
*
registry
)
{
/*
Let guardian thread know that it should break it's processing cycle,
once it wakes up.
*/
guardian
->
request_shutdown
(
true
);
/* wake guardian */
pthread_cond_signal
(
&
guardian
->
COND_guardian
);
/* stop all threads */
registry
->
deliver_shutdown
();
}
/*
manager - entry point to the main instance manager process: start
listener thread, write pid file and enter into signal handling.
...
...
@@ -210,7 +223,8 @@ void manager(const Options &options)
log_error
(
"Cannot init instances repository. This might be caused by "
"the wrong config file options. For instance, missing mysqld "
"binary. Aborting."
);
return
;
stop_all
(
&
guardian_thread
,
&
thread_registry
);
goto
err
;
}
/* create the listener */
...
...
@@ -227,6 +241,7 @@ void manager(const Options &options)
if
(
rc
)
{
log_error
(
"manager(): set_stacksize_n_create_thread(listener) failed"
);
stop_all
(
&
guardian_thread
,
&
thread_registry
);
goto
err
;
}
...
...
@@ -245,6 +260,7 @@ void manager(const Options &options)
if
((
status
=
my_sigwait
(
&
mask
,
&
signo
))
!=
0
)
{
log_error
(
"sigwait() failed"
);
stop_all
(
&
guardian_thread
,
&
thread_registry
);
goto
err
;
}
...
...
server-tools/instance-manager/options.cc
View file @
537ad02d
...
...
@@ -45,10 +45,10 @@ const char *default_password_file_name= QUOTE(DEFAULT_PASSWORD_FILE_NAME);
const
char
*
default_log_file_name
=
QUOTE
(
DEFAULT_LOG_FILE_NAME
);
const
char
*
Options
::
config_file
=
QUOTE
(
DEFAULT_CONFIG_FILE
);
const
char
*
Options
::
angel_pid_file_name
=
NULL
;
const
char
*
Options
::
socket_file_name
=
QUOTE
(
DEFAULT_SOCKET_FILE_NAME
);
#endif
const
char
*
Options
::
log_file_name
=
default_log_file_name
;
const
char
*
Options
::
pid_file_name
=
QUOTE
(
DEFAULT_PID_FILE_NAME
);
const
char
*
Options
::
socket_file_name
=
QUOTE
(
DEFAULT_SOCKET_FILE_NAME
);
const
char
*
Options
::
password_file_name
=
default_password_file_name
;
const
char
*
Options
::
default_mysqld_path
=
QUOTE
(
DEFAULT_MYSQLD_PATH
);
const
char
*
Options
::
bind_address
=
0
;
/* No default value */
...
...
@@ -106,11 +106,11 @@ static struct my_option my_long_options[] =
(
gptr
*
)
&
Options
::
angel_pid_file_name
,
(
gptr
*
)
&
Options
::
angel_pid_file_name
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#endif
{
"socket"
,
OPT_SOCKET
,
"Socket file to use for connection."
,
(
gptr
*
)
&
Options
::
socket_file_name
,
(
gptr
*
)
&
Options
::
socket_file_name
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#endif
{
"passwd"
,
'P'
,
"Prepare entry for passwd file and exit."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
...
...
server-tools/instance-manager/options.h
View file @
537ad02d
...
...
@@ -36,11 +36,11 @@ struct Options
static
char
run_as_service
;
/* handle_options doesn't support bool */
static
const
char
*
user
;
static
const
char
*
angel_pid_file_name
;
static
const
char
*
socket_file_name
;
#endif
static
bool
is_forced_default_file
;
static
const
char
*
log_file_name
;
static
const
char
*
pid_file_name
;
static
const
char
*
socket_file_name
;
static
const
char
*
password_file_name
;
static
const
char
*
default_mysqld_path
;
/* the option which should be passed to process_default_option_files */
...
...
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