mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
43 lines
1.2 KiB
Text
43 lines
1.2 KiB
Text
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
|
|
0 0 0 1
|
|
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
|
|
0 0 0 1
|