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
c6cd61a5
Commit
c6cd61a5
authored
Nov 17, 2006
by
anozdrin/alik@alik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polishing: generate more warnings and make code warnings-free.
parent
8c55f474
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
39 additions
and
17 deletions
+39
-17
server-tools/instance-manager/Makefile.am
server-tools/instance-manager/Makefile.am
+1
-1
server-tools/instance-manager/commands.cc
server-tools/instance-manager/commands.cc
+13
-9
server-tools/instance-manager/commands.h
server-tools/instance-manager/commands.h
+20
-0
server-tools/instance-manager/instance.cc
server-tools/instance-manager/instance.cc
+1
-1
server-tools/instance-manager/mysql_connection.cc
server-tools/instance-manager/mysql_connection.cc
+3
-3
server-tools/instance-manager/parse.cc
server-tools/instance-manager/parse.cc
+0
-1
server-tools/instance-manager/user_map.cc
server-tools/instance-manager/user_map.cc
+0
-1
server-tools/instance-manager/user_map.h
server-tools/instance-manager/user_map.h
+1
-1
No files found.
server-tools/instance-manager/Makefile.am
View file @
c6cd61a5
...
...
@@ -61,7 +61,7 @@ client_settings.h:
libexec_PROGRAMS
=
mysqlmanager
mysqlmanager_CXXFLAGS
=
-Werror
mysqlmanager_CXXFLAGS
=
-W
all
-Wextra
-W
error
mysqlmanager_SOURCES
=
command.cc command.h mysqlmanager.cc
\
manager.h manager.cc log.h log.cc
\
...
...
server-tools/instance-manager/commands.cc
View file @
c6cd61a5
...
...
@@ -130,7 +130,7 @@ Instance_name::Instance_name(const LEX_STRING *name)
ER_OUT_OF_RESOURCES Not enough resources to complete the operation
*/
int
Show_instances
::
execute
(
st_net
*
net
,
ulong
connection_id
)
int
Show_instances
::
execute
(
st_net
*
net
,
ulong
/* connection_id */
)
{
int
err_code
;
...
...
@@ -309,7 +309,8 @@ int Show_instance_status::execute_impl(st_net *net, Instance *instance)
}
int
Show_instance_status
::
send_ok_response
(
st_net
*
net
,
ulong
connection_id
)
int
Show_instance_status
::
send_ok_response
(
st_net
*
net
,
ulong
/* connection_id */
)
{
if
(
send_eof
(
net
)
||
net_flush
(
net
))
return
ER_OUT_OF_RESOURCES
;
...
...
@@ -429,7 +430,8 @@ int Show_instance_options::execute_impl(st_net *net, Instance *instance)
}
int
Show_instance_options
::
send_ok_response
(
st_net
*
net
,
ulong
connection_id
)
int
Show_instance_options
::
send_ok_response
(
st_net
*
net
,
ulong
/* connection_id */
)
{
if
(
send_eof
(
net
)
||
net_flush
(
net
))
return
ER_OUT_OF_RESOURCES
;
...
...
@@ -512,7 +514,7 @@ Start_instance::Start_instance(const LEX_STRING *instance_name_arg)
ER_OUT_OF_RESOURCES Not enough resources to complete the operation
*/
int
Start_instance
::
execute_impl
(
st_net
*
net
,
Instance
*
instance
)
int
Start_instance
::
execute_impl
(
st_net
*
/* net */
,
Instance
*
instance
)
{
int
err_code
;
...
...
@@ -553,7 +555,7 @@ Stop_instance::Stop_instance(const LEX_STRING *instance_name_arg)
ER_OUT_OF_RESOURCES Not enough resources to complete the operation
*/
int
Stop_instance
::
execute_impl
(
st_net
*
net
,
Instance
*
instance
)
int
Stop_instance
::
execute_impl
(
st_net
*
/* net */
,
Instance
*
instance
)
{
int
err_code
;
...
...
@@ -803,7 +805,7 @@ Drop_instance::Drop_instance(const LEX_STRING *instance_name_arg)
ER_OUT_OF_RESOURCES Not enough resources to complete the operation
*/
int
Drop_instance
::
execute_impl
(
st_net
*
net
,
Instance
*
instance
)
int
Drop_instance
::
execute_impl
(
st_net
*
/* net */
,
Instance
*
instance
)
{
int
err_code
;
...
...
@@ -899,7 +901,8 @@ int Show_instance_log::execute_impl(st_net *net, Instance *instance)
}
int
Show_instance_log
::
send_ok_response
(
st_net
*
net
,
ulong
connection_id
)
int
Show_instance_log
::
send_ok_response
(
st_net
*
net
,
ulong
/* connection_id */
)
{
if
(
send_eof
(
net
)
||
net_flush
(
net
))
return
ER_OUT_OF_RESOURCES
;
...
...
@@ -1030,7 +1033,8 @@ int Show_instance_log_files::execute_impl(st_net *net, Instance *instance)
}
int
Show_instance_log_files
::
send_ok_response
(
st_net
*
net
,
ulong
connection_id
)
int
Show_instance_log_files
::
send_ok_response
(
st_net
*
net
,
ulong
/* connection_id */
)
{
if
(
send_eof
(
net
)
||
net_flush
(
net
))
return
ER_OUT_OF_RESOURCES
;
...
...
@@ -1689,7 +1693,7 @@ int Unset_option::process_option(Instance *instance, Named_value *option)
Implementation of Syntax_error.
**************************************************************************/
int
Syntax_error
::
execute
(
st_net
*
net
,
ulong
connection_id
)
int
Syntax_error
::
execute
(
st_net
*
/* net */
,
ulong
/* connection_id */
)
{
return
ER_SYNTAX_ERROR
;
}
server-tools/instance-manager/commands.h
View file @
c6cd61a5
...
...
@@ -37,6 +37,10 @@
class
Show_instances
:
public
Command
{
public:
Show_instances
()
{
}
public:
int
execute
(
st_net
*
net
,
ulong
connection_id
);
...
...
@@ -53,6 +57,10 @@ class Show_instances : public Command
class
Flush_instances
:
public
Command
{
public:
Flush_instances
()
{
}
public:
int
execute
(
st_net
*
net
,
ulong
connection_id
);
};
...
...
@@ -311,6 +319,10 @@ class Abstract_option_cmd : public Command
class
Set_option
:
public
Abstract_option_cmd
{
public:
Set_option
()
{
}
protected:
virtual
bool
parse_args
(
const
char
**
text
);
virtual
int
process_option
(
Instance
*
instance
,
Named_value
*
option
);
...
...
@@ -324,6 +336,10 @@ class Set_option : public Abstract_option_cmd
class
Unset_option
:
public
Abstract_option_cmd
{
public:
Unset_option
()
{
}
protected:
virtual
bool
parse_args
(
const
char
**
text
);
virtual
int
process_option
(
Instance
*
instance
,
Named_value
*
option
);
...
...
@@ -341,6 +357,10 @@ class Unset_option: public Abstract_option_cmd
class
Syntax_error
:
public
Command
{
public:
Syntax_error
()
{
}
public:
int
execute
(
st_net
*
net
,
ulong
connection_id
);
};
...
...
server-tools/instance-manager/instance.cc
View file @
c6cd61a5
...
...
@@ -429,7 +429,7 @@ void Instance::set_crash_flag_n_wake_all()
Instance
::
Instance
(
Thread_registry
&
thread_registry_arg
)
:
crashed
(
FALSE
),
configured
(
FALSE
),
thread_registry
(
thread_registry_arg
)
thread_registry
(
thread_registry_arg
),
crashed
(
FALSE
),
configured
(
FALSE
)
{
pthread_mutex_init
(
&
LOCK_instance
,
0
);
pthread_cond_init
(
&
COND_instance_stopped
,
0
);
...
...
server-tools/instance-manager/mysql_connection.cc
View file @
c6cd61a5
...
...
@@ -86,7 +86,7 @@ class Mysql_connection_thread: public Mysql_connection_thread_args
int
check_connection
();
int
do_command
();
int
dispatch_command
(
enum
enum_server_command
command
,
const
char
*
text
,
uint
len
);
const
char
*
text
);
};
...
...
@@ -317,12 +317,12 @@ int Mysql_connection_thread::do_command()
(
uchar
)
*
packet
;
log_info
(
"connection %d: packet_length=%d, command=%d"
,
(
int
)
connection_id
,
(
int
)
packet_length
,
(
int
)
command
);
return
dispatch_command
(
command
,
packet
+
1
,
packet_length
-
1
);
return
dispatch_command
(
command
,
packet
+
1
);
}
}
int
Mysql_connection_thread
::
dispatch_command
(
enum
enum_server_command
command
,
const
char
*
packet
,
uint
len
)
const
char
*
packet
)
{
switch
(
command
)
{
case
COM_QUIT
:
// client exit
...
...
server-tools/instance-manager/parse.cc
View file @
c6cd61a5
...
...
@@ -274,7 +274,6 @@ Command *parse_command(const char *text)
uint
word_len
;
LEX_STRING
instance_name
;
Command
*
command
=
0
;
const
char
*
saved_text
=
text
;
Token
tok1
=
shift_token
(
&
text
,
&
word_len
);
...
...
server-tools/instance-manager/user_map.cc
View file @
c6cd61a5
...
...
@@ -186,7 +186,6 @@ int User_map::load(const char *password_file_name, const char **err_msg)
2
+
/* for newline */
1
];
/* for trailing zero */
User
*
user
;
int
rc
=
1
;
if
(
my_access
(
password_file_name
,
F_OK
)
!=
0
)
{
...
...
server-tools/instance-manager/user_map.h
View file @
c6cd61a5
...
...
@@ -60,7 +60,7 @@ class User_map
{
public:
Iterator
(
User_map
*
user_map_arg
)
:
cur_idx
(
0
),
user_map
(
user_map_arg
)
user_map
(
user_map_arg
),
cur_idx
(
0
)
{
}
public:
...
...
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