~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to mysql-test/include/wait_time_until_connected_again.inc

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Include this script to wait until the connection to the
 
3
# server has been restored or timeout occurs
 
4
# Unlike wait_until_connected_again the variable counter must be set outside as var. 
 
5
# set WAIT_COUNT before executinmg this include file.
 
6
--disable_result_log
 
7
--disable_query_log
 
8
let $counter= $WAIT_COUNT;
 
9
let $mysql_errno= 9999;
 
10
while ($mysql_errno)
 
11
{
 
12
  # Strangely enough, the server might return "Too many connections"
 
13
  # while being shutdown, thus 1040 is an "allowed" error
 
14
  # See BUG#36228
 
15
  --error 0,1040,1053,2002,2003,2006,2013
 
16
  show status;
 
17
 
 
18
  dec $counter;
 
19
  if (!$counter)
 
20
  {
 
21
    --echo Waited $WAIT_COUNT * 0.5 sec.
 
22
    --die Server failed to restart
 
23
  }
 
24
  --sleep 0.5
 
25
}
 
26
--enable_query_log
 
27
--enable_result_log