diff options
author | tomas@poseidon.ndb.mysql.com <> | 2006-01-12 19:51:02 +0100 |
---|---|---|
committer | tomas@poseidon.ndb.mysql.com <> | 2006-01-12 19:51:02 +0100 |
commit | 4b731ddfb47cb56bec07a2eded106efc1aa4e532 (patch) | |
tree | 5f26130f48df39314474782dafb7b845ebffb2ff /mysql-test/r/rpl_ndb_idempotent.result | |
parent | 582488e8ac264e4a6c0731cdc2caac62c3d19fe8 (diff) | |
download | mariadb-git-4b731ddfb47cb56bec07a2eded106efc1aa4e532.tar.gz |
wl2325 wl2324
Diffstat (limited to 'mysql-test/r/rpl_ndb_idempotent.result')
-rw-r--r-- | mysql-test/r/rpl_ndb_idempotent.result | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/mysql-test/r/rpl_ndb_idempotent.result b/mysql-test/r/rpl_ndb_idempotent.result new file mode 100644 index 00000000000..054ff599c23 --- /dev/null +++ b/mysql-test/r/rpl_ndb_idempotent.result @@ -0,0 +1,72 @@ +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; +CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ; +INSERT INTO t1 VALUES ("row1","will go away",1); +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row1 will go away 1 +SELECT @the_epoch:=MAX(epoch) FROM cluster_replication.apply_status; +@the_epoch:=MAX(epoch) +<the_epoch> +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row1 will go away 1 +SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) +FROM cluster_replication.binlog_index WHERE epoch = <the_epoch> ; +@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1) +<the_pos> master-bin.000001 +INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4); +DELETE FROM t1 WHERE c3 = 1; +UPDATE t1 SET c2="should go away" WHERE c3 = 2; +UPDATE t1 SET c2="C" WHERE c3 = 3; +DELETE FROM t1 WHERE c3 = 2; +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row3 C 3 +row4 D 4 +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row3 C 3 +row4 D 4 +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 Yes Yes <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> +STOP SLAVE; +CHANGE MASTER TO +master_log_file = 'master-bin.000001', +master_log_pos = <the_pos> ; +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 No No <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> +START SLAVE; +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row3 C 3 +row4 D 4 +SELECT * FROM t1 ORDER BY c3; +c1 c2 c3 +row3 C 3 +row4 D 4 +STOP SLAVE; +DROP TABLE t1; +RESET master; +DROP TABLE t1; +RESET slave; +START SLAVE; +CREATE TABLE t1 (c1 CHAR(15) NOT NULL, c2 CHAR(15) NOT NULL, c3 INT NOT NULL, PRIMARY KEY (c3)) ENGINE = NDB ; +INSERT INTO t1 VALUES ("row1","remove on slave",1); +DELETE FROM t1; +BEGIN; +UPDATE t1 SET c2="does not exist" WHERE c3=1; +INSERT INTO t1 VALUES ("row2","new on slave",2); +COMMIT; +SELECT * FROM t1; +c1 c2 c3 +row2 new on slave 2 +SHOW SLAVE STATUS; +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +<Slave_IO_State> 127.0.0.1 root MASTER_PORT 1 master-bin.000001 <Read_Master_Log_Pos> <Relay_Log_File> <Relay_Log_Pos> master-bin.000001 Yes Yes <Replicate_Ignore_Table> 0 0 <Exec_Master_Log_Pos> <Relay_Log_Space> None 0 No <Seconds_Behind_Master> |