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

« back to all changes in this revision

Viewing changes to mysql-test/suite/ndb_rpl/r/ndb_rpl_sync.result

  • 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
include/master-slave.inc
 
2
[connection master]
 
3
STOP SLAVE;
 
4
CREATE DATABASE ndbsynctest;
 
5
USE ndbsynctest;
 
6
CREATE DATABASE ndbsynctest;
 
7
USE ndbsynctest;
 
8
CREATE TABLE t1 (c1 BIT(1) NOT NULL, c2 BIT(1) NOT NULL, c3 CHAR(15), PRIMARY KEY(c3)) ENGINE = NDB ;
 
9
INSERT INTO t1 VALUES (1,1,"row1"),(0,1,"row2"),(1,0,"row3"),(0,0,"row4");
 
10
CREATE TABLE t2 (c1 CHAR(15), c2 BIT(1) NOT NULL, c3 BIT(1) NOT NULL, PRIMARY KEY(c1)) ENGINE = NDB ;
 
11
INSERT INTO t2 VALUES ("ABC",1,1),("BCDEF",0,1),("CD",1,0),("DEFGHIJKL",0,0);
 
12
SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
 
13
hex(c1) hex(c2) c3
 
14
1       1       row1
 
15
0       1       row2
 
16
1       0       row3
 
17
0       0       row4
 
18
SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1;
 
19
hex(c2) hex(c3) c1
 
20
1       1       ABC
 
21
0       1       BCDEF
 
22
1       0       CD
 
23
0       0       DEFGHIJKL
 
24
UPDATE t1 SET c2=0 WHERE c3="row2";
 
25
SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
 
26
hex(c1) hex(c2) c3
 
27
1       1       row1
 
28
0       0       row2
 
29
1       0       row3
 
30
0       0       row4
 
31
SHOW TABLES;
 
32
Tables_in_ndbsynctest
 
33
DROP DATABASE ndbsynctest;
 
34
CREATE DATABASE ndbsynctest;
 
35
USE ndbsynctest;
 
36
SHOW TABLES;
 
37
Tables_in_ndbsynctest
 
38
t1
 
39
t2
 
40
SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
 
41
hex(c1) hex(c2) c3
 
42
1       1       row1
 
43
0       1       row2
 
44
1       0       row3
 
45
0       0       row4
 
46
SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1;
 
47
hex(c2) hex(c3) c1
 
48
1       1       ABC
 
49
0       1       BCDEF
 
50
1       0       CD
 
51
0       0       DEFGHIJKL
 
52
SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status;
 
53
@the_epoch:=MAX(epoch)
 
54
<the_epoch>
 
55
@the_pos:=Position      @the_file:=SUBSTRING_INDEX(REPLACE(FILE,'\\','/'), '/', -1)
 
56
<the_pos>       master-bin.000001
 
57
CHANGE MASTER TO
 
58
master_log_file = 'master-bin.000001',
 
59
master_log_pos = <the_pos> ;
 
60
START SLAVE;
 
61
include/check_slave_is_running.inc
 
62
SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3;
 
63
hex(c1) hex(c2) c3
 
64
1       1       row1
 
65
0       0       row2
 
66
1       0       row3
 
67
0       0       row4
 
68
SELECT hex(c2),hex(c3),c1 FROM t2 ORDER BY c1;
 
69
hex(c2) hex(c3) c1
 
70
1       1       ABC
 
71
0       1       BCDEF
 
72
1       0       CD
 
73
0       0       DEFGHIJKL
 
74
DROP DATABASE ndbsynctest;
 
75
STOP SLAVE;
 
76
reset master;
 
77
select * from mysql.ndb_binlog_index;
 
78
Position        File    epoch   inserts updates deletes schemaops       orig_server_id  orig_epoch      gci
 
79
reset slave;
 
80
select * from mysql.ndb_apply_status;
 
81
server_id       epoch   log_name        start_pos       end_pos
 
82
include/rpl_end.inc