blob: b841b492cc0cd694bba2744b7ba7aa457066a54f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# Check that server has come out ot readonly mode
#
# wait for server to connect properly to cluster
#
--error 0,ER_CHECK_NO_SUCH_TABLE,ER_OPEN_AS_READONLY,ER_GET_ERRMSG,ER_KEY_NOT_FOUND
delete from mysql.ndb_apply_status where server_id=0;
let $mysql_errno= 1;
let $counter= 600;
while ($mysql_errno)
{
# Table is readonly until the mysqld has connected properly
--error 0,ER_CHECK_NO_SUCH_TABLE,ER_OPEN_AS_READONLY,ER_GET_ERRMSG
replace into mysql.ndb_apply_status values(0,0,"",0,0);
if ($mysql_errno)
{
if (!$counter)
{
die("Failed while waiting for mysqld to come out of readonly mode");
}
dec $counter;
--sleep 0.1
}
}
delete from mysql.ndb_apply_status where server_id=0;
#
# connected
#
|