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

« back to all changes in this revision

Viewing changes to mysql-test/suite/ndb_binlog/t/ndb_binlog_discover.test

  • 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
-- source include/have_ndb.inc
 
2
-- source include/have_binlog_format_mixed_or_row.inc
 
3
-- source include/not_windows.inc
 
4
 
 
5
--disable_warnings
 
6
drop table if exists t1,t2;
 
7
--disable_query_log
 
8
set ndb_table_temporary=0;
 
9
--enable_query_log
 
10
--enable_warnings
 
11
 
 
12
#
 
13
# Bug #14516 Restart of cluster can cause NDB API replication failure
 
14
#
 
15
create table t2 (a int key) engine=ndb;
 
16
#
 
17
# Unreported bug, online altered table causes system restart to fail
 
18
#
 
19
alter table t2 rename t1;
 
20
reset master;
 
21
--exec $NDB_MGM --no-defaults -e "all restart -n" > /dev/null
 
22
--exec $NDB_WAITER --no-defaults --not-started > /dev/null
 
23
--exec $NDB_MGM --no-defaults -e "all start" > /dev/null
 
24
--exec $NDB_WAITER --no-defaults > /dev/null
 
25
 
 
26
--disable_query_log
 
27
let $mysql_errno= 1;
 
28
while ($mysql_errno)
 
29
{
 
30
  # Table t1 is readonly until the mysqld has reconnected properly
 
31
  --error 0,1036,1296
 
32
  insert into t1 values(1);
 
33
  if ($mysql_errno)
 
34
  {
 
35
    --sleep 0.1
 
36
  }
 
37
}
 
38
--enable_query_log
 
39
 
 
40
# check that data went in ok
 
41
select * from t1;
 
42
 
 
43
--source include/show_binlog_events2.inc
 
44
PURGE MASTER LOGS TO 'mysqld-bin.000002';
 
45
 
 
46
--source include/show_binlog_events2.inc
 
47
drop table t1;