summaryrefslogtreecommitdiff
path: root/mysql-test/r/ndb_binlog_multi.result
blob: 81f42a4f5b820c63416849bfa2d43b41f501b0fa (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
32
33
34
35
36
37
38
39
40
41
drop table if exists t1,t2;
drop table if exists t1,t2;
SHOW TABLES;
Tables_in_test
CREATE TABLE t2 (a INT PRIMARY KEY, b int) ENGINE = NDB;
show tables;
Tables_in_test
t2
INSERT INTO t2 VALUES (1,1),(2,2);
select * from t2 order by a;
a	b
1	1
2	2
SELECT @the_epoch:=epoch,inserts,updates,deletes,schemaops FROM 
cluster.binlog_index ORDER BY epoch DESC LIMIT 1;
@the_epoch:=epoch	inserts	updates	deletes	schemaops
<the_epoch>	2	0	0	0
SELECT * FROM t2 ORDER BY a;
a	b
1	1
2	2
SELECT inserts,updates,deletes,schemaops FROM 
cluster.binlog_index WHERE epoch=<the_epoch>;
inserts	updates	deletes	schemaops
2	0	0	0
DROP TABLE t2;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE = NDB;
INSERT INTO t1 VALUES (1),(2);
SELECT @the_epoch2:=epoch,inserts,updates,deletes,schemaops FROM 
cluster.binlog_index ORDER BY epoch DESC LIMIT 1;
@the_epoch2:=epoch	inserts	updates	deletes	schemaops
<the_epoch2>	2	0	0	0
SELECT inserts,updates,deletes,schemaops FROM
cluster.binlog_index WHERE epoch > <the_epoch> AND epoch < <the_epoch2>;
inserts	updates	deletes	schemaops
drop table t1;
SHOW TABLES;
Tables_in_test
SELECT inserts,updates,deletes,schemaops FROM
cluster.binlog_index WHERE epoch > <the_epoch> AND epoch < <the_epoch2>;
inserts	updates	deletes	schemaops