summaryrefslogtreecommitdiff
path: root/mysql-test/include/ndb_not_readonly.inc
blob: df67dced8abe86ff2d0f97c51fd1ab34512d85b2 (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
28
29
30
31
# Check that server has come out ot readonly mode
--disable_query_log
let $counter= 100;
let $mysql_errno= 1;
while ($mysql_errno)
{
  --error 0, 1005
  create table check_read_only(a int) engine=NDB;
  sleep 0.1;
  if (!$counter)
  {
    die("Failed while waiting for mysqld to come out of readonly mode");
  }
  dec $counter;
}

let $counter= 100;
let $mysql_errno= 1;
while ($mysql_errno)
{
  --error 0, 1036
  insert into check_read_only values(1);
  sleep 0.1;
  if (!$counter)
  {
    die("Failed while waiting for mysqld to come out of readonly mode");
  }
  dec $counter;
}
drop table check_read_only;
--enable_query_log