mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
5932fa7890
compiled for debugging, when the server goes down This happens in the following scenario: - Server gets a shutdown message - Servers sends error ER_CONNECTION_KILLED to the clients connection - The client sends a query to the server, before the server has time to close the connection to the client - Client reads the ER_CONNECTION_KILLED error message In the above case, the packet number for the reply is one less than what the client expected and the client prints "Packets out of order". Fixed the following way: - The client accepts now error packages with a packet number one less than expected. - To ensure that this issue can be detected early in my_real_read(), error messages sent to the client are not compressed, even when compressed protocol is used.
28 lines
699 B
PHP
28 lines
699 B
PHP
#
|
|
# Include this script to wait until the connection to the
|
|
# server has been restored or timeout occurs.
|
|
# You should have done --enable_reconnect first
|
|
# When you change this file you may have to chance its cousin
|
|
# wait_until_disconnected.inc
|
|
|
|
--disable_result_log
|
|
--disable_query_log
|
|
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,1927
|
|
show status;
|
|
|
|
dec $counter;
|
|
if (!$counter)
|
|
{
|
|
--die Server failed to restart
|
|
}
|
|
--sleep 0.1
|
|
}
|
|
--enable_query_log
|
|
--enable_result_log
|