mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
post-review fixes
include/my_sys.h: added prototype for the defaults correction function libmysql/Makefile.shared: my_chsize added to libmysql to let my_correct_defaults_file be used from libmysql mysys/default.c: New defaults function added we use it to correct defaults file. Currently the function doesn't lock defaults file. This is because of the linking and backwards-compatibility issues. This needs to be fixed later. mysys/my_chsize.c: comment added server-tools/instance-manager/buffer.cc: cleanup server-tools/instance-manager/commands.cc: refactoring: removed do_command method from most of the classes server-tools/instance-manager/commands.h: cleanup server-tools/instance-manager/guardian.cc: cleanup server-tools/instance-manager/instance.cc: cleanup server-tools/instance-manager/instance_map.cc: cleanup server-tools/instance-manager/instance_options.cc: cleanup server-tools/instance-manager/instance_options.h: cleanup server-tools/instance-manager/listener.cc: cleanup server-tools/instance-manager/log.cc: cleanup server-tools/instance-manager/manager.cc: cleanup server-tools/instance-manager/messages.cc: new errors added server-tools/instance-manager/mysql_connection.cc: cleanup server-tools/instance-manager/mysql_manager_error.h: new error codes added server-tools/instance-manager/mysqlmanager.cc: clenup server-tools/instance-manager/options.cc: cleanup server-tools/instance-manager/parse.cc: removed unused function server-tools/instance-manager/parse.h: removed prototype server-tools/instance-manager/protocol.cc: cleanup server-tools/instance-manager/protocol.h: added enum to be used in protocol.cc instead of the constants
This commit is contained in:
@@ -261,10 +261,10 @@ int Mysql_connection_thread::check_connection()
|
||||
}
|
||||
client_capabilities|= ((ulong) uint2korr(net.read_pos + 2)) << 16;
|
||||
|
||||
pos= (char *) net.read_pos + 32;
|
||||
pos= (char*) net.read_pos + 32;
|
||||
|
||||
/* At least one byte for username and one byte for password */
|
||||
if (pos >= (char *) net.read_pos + pkt_len + 2)
|
||||
if (pos >= (char*) net.read_pos + pkt_len + 2)
|
||||
{
|
||||
/*TODO add user and password handling in error messages*/
|
||||
net_send_error(&net, ER_HANDSHAKE_ERROR);
|
||||
@@ -301,9 +301,7 @@ int Mysql_connection_thread::do_command()
|
||||
{
|
||||
/* Check if we can continue without closing the connection */
|
||||
if (net.error != 3) // what is 3 - find out
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (thread_registry.is_shutdown())
|
||||
return 1;
|
||||
net_send_error(&net, net.last_errno);
|
||||
@@ -346,14 +344,12 @@ int Mysql_connection_thread::dispatch_command(enum enum_server_command command,
|
||||
res= command->execute(&net, connection_id);
|
||||
delete command;
|
||||
if (!res)
|
||||
{
|
||||
log_info("query for connection %d executed ok",connection_id);
|
||||
}
|
||||
log_info("query for connection %d executed ok",connection_id);
|
||||
else
|
||||
{
|
||||
log_info("query for connection %d executed err=%d",connection_id,res);
|
||||
net_send_error(&net, res);
|
||||
return 0;
|
||||
log_info("query for connection %d executed err=%d",connection_id,res);
|
||||
net_send_error(&net, res);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user