Skip to content

Commit

Permalink
fix many rpl test failures
Browse files Browse the repository at this point in the history
* wait_until_connected_again.inc should expect ER_CONNECTION_KILLED now
* also fix MySQL BUG#36228
  • Loading branch information
vuvova committed Sep 15, 2016
1 parent ddc481b commit b138414
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 19 deletions.
2 changes: 1 addition & 1 deletion libmariadb
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ connection slave;
# '2003' CR_CONN_HOST_ERROR
# '2002' CR_CONNECTION_ERROR
# '2006' CR_SERVER_GONE_ERROR
# '1040' ER_CON_COUNT_ERROR
# '1053' ER_SERVER_SHUTDOWN
let $slave_io_errno= 1040, 1053, 2002, 2003, 2006, 2013;
let $slave_io_errno= 1053, 2002, 2003, 2006, 2013;
--let $slave_io_error_is_nonfatal= 1
source include/wait_for_slave_io_error.inc;

Expand Down
2 changes: 1 addition & 1 deletion mysql-test/include/wait_for_slave_io_error.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# $slave_io_errno
# The expected IO error numbers. This can be either a single
# number, or a comma-separated list of numbers. Examples:
# --let $slave_io_errno= 1040, 1053, 2002, 2003, 2006, 2013
# --let $slave_io_errno= 1053, 2002, 2003, 2006, 2013
# --let $slave_io_errno= 1045
# (After BUG#41956 has been fixed, this will be required to be
# symbolic names instead of numbers.)
Expand Down
5 changes: 1 addition & 4 deletions mysql-test/include/wait_until_connected_again.inc
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ let $counter= 5000;
let $mysql_errno= 9999;
while ($mysql_errno)
{
# Strangely enough, the server might return "Too many connections"
# while being shutdown, thus 1040 is an "allowed" error
# See BUG#36228
--error 0,1040,1053,2002,2003,2005,2006,2013
--error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,2002,2006,2013
show status;

dec $counter;
Expand Down
5 changes: 1 addition & 4 deletions mysql-test/include/wait_until_disconnected.inc
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ let $counter= 600;
let $mysql_errno= 0;
while (!$mysql_errno)
{
# Strangely enough, the server might return "Too many connections"
# while being shutdown, thus 1040 is an "allowed" error.
# See BUG#36228.
--error 0,1040,1053,2002,2003,2005,2006,2013
--error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,2002,2006,2013
show status;

dec $counter;
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/innodb/t/innodb_sys_semaphore_waits.test
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ let $counter= 80;
let $mysql_errno= 0;
while (!$mysql_errno)
{
--error 0,1040,1053,2002,2003,2006,2013
--error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,2002,2006,2013
show status;

--error 0,1040,1053,2002,2003,2006,2013
--error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,2002,2006,2013
select * from information_schema.innodb_sys_semaphore_waits;

dec $counter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include/rpl_stop_server.inc [server_number=1]
slave is unblocked
SET DEBUG_SYNC='now SIGNAL signal.get_unix_timestamp';
Check network error happened here
include/wait_for_slave_io_error.inc [errno=1040, 1053, 2002, 2003, 2006, 2013]
include/wait_for_slave_io_error.inc [errno=1053, 2002, 2003, 2006, 2013]
set @@global.debug = "-d,'debug_lock.before_get_UNIX_TIMESTAMP'";
include/rpl_start_server.inc [server_number=1]
include/wait_for_slave_param.inc [Slave_IO_Running]
Expand All @@ -24,7 +24,7 @@ include/rpl_stop_server.inc [server_number=1]
slave is unblocked
SET DEBUG_SYNC='now SIGNAL signal.get_server_id';
Check network error happened here
include/wait_for_slave_io_error.inc [errno=1040, 1053, 2002, 2003, 2006, 2013]
include/wait_for_slave_io_error.inc [errno=1053, 2002, 2003, 2006, 2013]
set @@global.debug = "-d,'debug_lock.before_get_SERVER_ID'";
include/rpl_start_server.inc [server_number=1]
include/wait_for_slave_param.inc [Slave_IO_Running]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ let $counter= 80;
let $mysql_errno= 0;
while (!$mysql_errno)
{
--error 0,1040,1053,2002,2003,2006,2013
--error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,2002,2006,2013
show status;

dec $counter;
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/t/ipv4_as_ipv6.test
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ echo =============Test of '::1' ========================;
let $IPv6= ::1;
--echo connect (con1, $IPv6, root, , test, MASTER_MYPORT,);
--disable_query_log
--error 2003,2006
--error 2002,2006
connect (con1, $IPv6, root, , test, $MASTER_MYPORT,);
--enable_query_log

Expand Down
2 changes: 1 addition & 1 deletion sql/mysqld.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6455,7 +6455,7 @@ static void create_new_thread(CONNECT *connect)
mysql_mutex_unlock(&LOCK_connection_count);
statistic_increment(denied_connections, &LOCK_status);
statistic_increment(connection_errors_max_connection, &LOCK_status);
connect->close_with_error(0, NullS, ER_CON_COUNT_ERROR);
connect->close_with_error(0, NullS, abort_loop ? ER_SERVER_SHUTDOWN : ER_CON_COUNT_ERROR);
DBUG_VOID_RETURN;
}

Expand Down

0 comments on commit b138414

Please sign in to comment.