mariadb/mysql-test/r/rpl_truncate_7ndb_2.result
unknown b58e990c74 Fixed failure with rpl_truncate_7ndb.test when using statement based replication.
is_injective -> table_flag() HA_HAS_OWN_BINLOGGING
(Faster and easier to understand)
Allow cluster_binlogging also in mixed replication mode.


mysql-test/t/rpl_truncate_7ndb.test:
  Ensure that test is only run with mixed or row based replication
sql/ha_ndbcluster.cc:
  Enforce row based replication if a cluster table is used
sql/ha_ndbcluster.h:
  Remove is_injective() (Is now a table flag)
sql/ha_ndbcluster_binlog.cc:
  Use cluster binlogging also in mixed binary logging
  (Using a cluster table will enforce row based replication in mixed mode, so this should be ok)
sql/handler.cc:
  is_injective -> HA_HAS_OWN_BINLOGGING
sql/handler.h:
  is_injective -> HA_HAS_OWN_BINLOGGING
mysql-test/include/have_binlog_format_mixed_or_row.inc:
  New BitKeeper file ``mysql-test/include/have_binlog_format_mixed_or_row.inc''
mysql-test/r/rpl_truncate_7ndb_2.result:
  New BitKeeper file ``mysql-test/r/rpl_truncate_7ndb_2.result''
mysql-test/t/rpl_truncate_7ndb_2-master.opt:
  New BitKeeper file ``mysql-test/t/rpl_truncate_7ndb_2-master.opt''
mysql-test/t/rpl_truncate_7ndb_2.test:
  New BitKeeper file ``mysql-test/t/rpl_truncate_7ndb_2.test''
2006-06-22 22:44:21 +03:00

91 lines
3.2 KiB
Text

stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
**** On Master ****
CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB;
INSERT INTO t1 VALUES (1,1), (2,2);
SELECT * FROM t1 ORDER BY a,b;
a b
1 1
2 2
**** On Slave ****
INSERT INTO t1 VALUE (3,3);
SELECT * FROM t1 ORDER BY a,b;
a b
1 1
2 2
3 3
**** On Master ****
TRUNCATE TABLE t1;
SELECT * FROM t1 ORDER BY a,b;
a b
**** On Slave ****
SELECT * FROM t1 ORDER BY a,b;
a b
**** On Master ****
DROP TABLE t1;
SHOW BINLOG EVENTS;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 102 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 102 Query 1 219 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
master-bin.000001 219 Query 1 283 BEGIN
master-bin.000001 283 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 323 Table_map 1 93 table_id: # (cluster.apply_status)
master-bin.000001 376 Write_rows 1 135 table_id: #
master-bin.000001 418 Write_rows 1 182 table_id: # flags: STMT_END_F
master-bin.000001 465 Query 1 530 COMMIT
master-bin.000001 530 Query 1 610 use `test`; TRUNCATE TABLE t1
master-bin.000001 610 Query 1 686 use `test`; DROP TABLE t1
**** On Master ****
CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB;
INSERT INTO t1 VALUES (1,1), (2,2);
SELECT * FROM t1 ORDER BY a,b;
a b
1 1
2 2
**** On Slave ****
INSERT INTO t1 VALUE (3,3);
SELECT * FROM t1 ORDER BY a,b;
a b
1 1
2 2
3 3
**** On Master ****
DELETE FROM t1;
SELECT * FROM t1 ORDER BY a,b;
a b
**** On Slave ****
SELECT * FROM t1 ORDER BY a,b;
a b
3 3
**** On Master ****
DROP TABLE t1;
SHOW BINLOG EVENTS;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 102 Server ver: SERVER_VERSION, Binlog ver: 4
master-bin.000001 102 Query 1 219 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
master-bin.000001 219 Query 1 283 BEGIN
master-bin.000001 283 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 323 Table_map 1 93 table_id: # (cluster.apply_status)
master-bin.000001 376 Write_rows 1 135 table_id: #
master-bin.000001 418 Write_rows 1 182 table_id: # flags: STMT_END_F
master-bin.000001 465 Query 1 530 COMMIT
master-bin.000001 530 Query 1 610 use `test`; TRUNCATE TABLE t1
master-bin.000001 610 Query 1 686 use `test`; DROP TABLE t1
master-bin.000001 686 Query 1 803 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
master-bin.000001 803 Query 1 867 BEGIN
master-bin.000001 867 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 907 Table_map 1 93 table_id: # (cluster.apply_status)
master-bin.000001 960 Write_rows 1 135 table_id: #
master-bin.000001 1002 Write_rows 1 182 table_id: # flags: STMT_END_F
master-bin.000001 1049 Query 1 1114 COMMIT
master-bin.000001 1114 Query 1 1178 BEGIN
master-bin.000001 1178 Table_map 1 40 table_id: # (test.t1)
master-bin.000001 1218 Table_map 1 93 table_id: # (cluster.apply_status)
master-bin.000001 1271 Write_rows 1 135 table_id: #
master-bin.000001 1313 Delete_rows 1 174 table_id: # flags: STMT_END_F
master-bin.000001 1352 Query 1 1417 COMMIT
master-bin.000001 1417 Query 1 1493 use `test`; DROP TABLE t1