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
420d8b07
Commit
420d8b07
authored
Nov 20, 2006
by
anozdrin/alik@booka.site
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polishing + make the code compiled on Windows.
parent
c136e8d5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
13 deletions
+18
-13
server-tools/instance-manager/listener.cc
server-tools/instance-manager/listener.cc
+2
-2
server-tools/instance-manager/listener.h
server-tools/instance-manager/listener.h
+13
-6
server-tools/instance-manager/manager.cc
server-tools/instance-manager/manager.cc
+1
-2
server-tools/instance-manager/manager.h
server-tools/instance-manager/manager.h
+1
-2
server-tools/instance-manager/thread_registry.cc
server-tools/instance-manager/thread_registry.cc
+1
-1
No files found.
server-tools/instance-manager/listener.cc
View file @
420d8b07
...
...
@@ -82,12 +82,12 @@ void Listener::run()
{
int
i
,
n
=
0
;
log_info
(
"Listener: started."
);
#ifndef __WIN__
struct
sockaddr_un
unix_socket_address
;
#endif
log_info
(
"Listener: started."
);
thread_registry
->
register_thread
(
&
thread_info
);
FD_ZERO
(
&
read_fds
);
...
...
server-tools/instance-manager/listener.h
View file @
420d8b07
...
...
@@ -34,21 +34,28 @@ class Listener: public Thread
{
public:
Listener
(
Thread_registry
*
thread_registry_arg
,
User_map
*
user_map_arg
);
protected:
virtual
void
run
();
private:
static
const
int
LISTEN_BACK_LOG_SIZE
=
5
;
/* standard backlog size */
private:
Thread_info
thread_info
;
Thread_registry
*
thread_registry
;
User_map
*
user_map
;
static
const
int
LISTEN_BACK_LOG_SIZE
=
5
;
/* standard backlog size */
ulong
total_connection_count
;
int
sockets
[
2
];
int
num_sockets
;
fd_set
read_fds
;
int
sockets
[
2
];
int
num_sockets
;
fd_set
read_fds
;
private:
void
handle_new_mysql_connection
(
struct
st_vio
*
vio
);
int
create_tcp_socket
();
int
create_unix_socket
(
struct
sockaddr_un
&
unix_socket_address
);
int
create_tcp_socket
();
int
create_unix_socket
(
struct
sockaddr_un
&
unix_socket_address
);
};
#endif // INCLUDES_MYSQL_INSTANCE_MANAGER_LISTENER_H
server-tools/instance-manager/manager.cc
View file @
420d8b07
...
...
@@ -114,7 +114,6 @@ Guardian *Manager::p_guardian;
Instance_map
*
Manager
::
p_instance_map
;
Thread_registry
*
Manager
::
p_thread_registry
;
User_map
*
Manager
::
p_user_map
;
pid_t
Manager
::
manager_pid
;
/*
manager - entry point to the main instance manager process: start
...
...
@@ -131,6 +130,7 @@ int Manager::main()
int
rc
=
1
;
const
char
*
err_msg
;
bool
shutdown_complete
=
FALSE
;
pid_t
manager_pid
=
getpid
();
Thread_registry
thread_registry
;
/*
...
...
@@ -146,7 +146,6 @@ int Manager::main()
Listener
listener
(
&
thread_registry
,
&
user_map
);
manager_pid
=
getpid
();
p_instance_map
=
&
instance_map
;
p_guardian
=
instance_map
.
guardian
=
&
guardian
;
p_thread_registry
=
&
thread_registry
;
...
...
server-tools/instance-manager/manager.h
View file @
420d8b07
...
...
@@ -38,12 +38,11 @@ class Manager
static
Guardian
*
get_guardian
()
{
return
p_guardian
;
}
static
Thread_registry
*
get_thread_registry
()
{
return
p_thread_registry
;
}
static
User_map
*
get_user_map
()
{
return
p_user_map
;
}
static
pid_t
get_manager_pid
()
{
return
manager_pid
;
}
private:
static
void
stop_all_threads
();
private:
static
pid_t
manager_pid
;
static
Guardian
*
p_guardian
;
static
Instance_map
*
p_instance_map
;
static
Thread_registry
*
p_thread_registry
;
...
...
server-tools/instance-manager/thread_registry.cc
View file @
420d8b07
...
...
@@ -371,7 +371,7 @@ bool Thread::start_detached()
pthread_attr_init
(
&
attr
);
pthread_attr_setdetachstate
(
&
attr
,
PTHREAD_CREATE_DETACHED
);
rc
=
set_stacksize_and_create_thread
(
&
thd_id
,
&
attr
,
Thread
::
thread_func
,
this
);
Thread
::
thread_func
,
this
);
pthread_attr_destroy
(
&
attr
);
return
rc
!=
0
;
...
...
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