| 1 |
# |
| 2 |
# Include this script to wait until the connection to the |
| 3 |
# server has been restored or timeout occurs |
| 4 |
--disable_result_log |
| 5 |
--disable_query_log |
| 6 |
let $counter= 500; |
| 7 |
if ($VALGRIND_TEST) { |
| 8 |
let $counter= 3000; |
| 9 |
} |
| 10 |
let $mysql_errno= 9999; |
| 11 |
while ($mysql_errno) |
| 12 |
{ |
| 13 |
|
| 14 |
# Strangely enough, the server might return "Too many connections" |
| 15 |
# while being shutdown, thus 1040 is an "allowed" error |
| 16 |
# See BUG#36228 |
| 17 |
--error 0,1040,1053,2002,2003,2006,2013,1045,ER_SECURE_TRANSPORT_REQUIRED,2017,2016 |
| 18 |
show session status; |
| 19 |
if ($mysql_errno == 1045){ |
| 20 |
let mysql_errno=0; |
| 21 |
} |
| 22 |
if ($mysql_errname == ER_SECURE_TRANSPORT_REQUIRED){ |
| 23 |
let mysql_errno=0; |
| 24 |
} |
| 25 |
dec $counter; |
| 26 |
if (!$counter) |
| 27 |
{ |
| 28 |
--die Server failed to restart |
| 29 |
} |
| 30 |
--sleep 0.1 |
| 31 |
} |
| 32 |
--enable_query_log |
| 33 |
--enable_result_log |