mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
1b4516d1f4
Removed error on seeing table map event when slave is in SBR mode and switching temporarily to RBR mode to replicate the rows. sql/log_event.cc: Settig binlog format to "row" on seeing a table map event. Resetting binlog format on error and seeing STMT_END_F. sql/sql_class.h: Adding method to unconditially set binlog format to "row". mysql-test/r/rpl_rbr_to_sbr.result: New BitKeeper file ``mysql-test/r/rpl_rbr_to_sbr.result'' mysql-test/t/rpl_rbr_to_sbr.test: New BitKeeper file ``mysql-test/t/rpl_rbr_to_sbr.test''
69 lines
2.2 KiB
Text
69 lines
2.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;
|
|
SET BINLOG_FORMAT=MIXED;
|
|
SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
|
|
@@GLOBAL.BINLOG_FORMAT @@SESSION.BINLOG_FORMAT
|
|
STATEMENT MIXED
|
|
SET GLOBAL BINLOG_FORMAT=MIXED;
|
|
SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
|
|
@@GLOBAL.BINLOG_FORMAT @@SESSION.BINLOG_FORMAT
|
|
MIXED MIXED
|
|
**** On Master ****
|
|
CREATE TABLE t1 (a INT, b LONG);
|
|
INSERT INTO t1 VALUES (1,1), (2,2);
|
|
INSERT INTO t1 VALUES (3,UUID()), (4,UUID());
|
|
SHOW BINLOG EVENTS;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000001 4 Format_desc 1 102 Server ver: 5.1.8-beta-debug-log, Binlog ver: 4
|
|
master-bin.000001 102 Query 1 196 use `test`; CREATE TABLE t1 (a INT, b LONG)
|
|
master-bin.000001 196 Query 1 293 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
|
master-bin.000001 293 Table_map 1 333 test.t1
|
|
master-bin.000001 333 Write_rows 1 450
|
|
**** On Slave ****
|
|
SHOW SLAVE STATUS;
|
|
Slave_IO_State #
|
|
Master_Host 127.0.0.1
|
|
Master_User root
|
|
Master_Port MASTER_PORT
|
|
Connect_Retry 1
|
|
Master_Log_File master-bin.000001
|
|
Read_Master_Log_Pos 450
|
|
Relay_Log_File #
|
|
Relay_Log_Pos #
|
|
Relay_Master_Log_File master-bin.000001
|
|
Slave_IO_Running Yes
|
|
Slave_SQL_Running Yes
|
|
Replicate_Do_DB
|
|
Replicate_Ignore_DB
|
|
Replicate_Do_Table
|
|
Replicate_Ignore_Table
|
|
Replicate_Wild_Do_Table
|
|
Replicate_Wild_Ignore_Table
|
|
Last_Errno 0
|
|
Last_Error
|
|
Skip_Counter 0
|
|
Exec_Master_Log_Pos 450
|
|
Relay_Log_Space #
|
|
Until_Condition None
|
|
Until_Log_File
|
|
Until_Log_Pos 0
|
|
Master_SSL_Allowed No
|
|
Master_SSL_CA_File
|
|
Master_SSL_CA_Path
|
|
Master_SSL_Cert
|
|
Master_SSL_Cipher
|
|
Master_SSL_Key
|
|
Seconds_Behind_Master #
|
|
SHOW BINLOG EVENTS;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
slave-bin.000001 4 Format_desc 2 102 Server ver: 5.1.8-beta-debug-log, Binlog ver: 4
|
|
slave-bin.000001 102 Query 2 212 use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9
|
|
slave-bin.000001 212 Query 1 306 use `test`; CREATE TABLE t1 (a INT, b LONG)
|
|
slave-bin.000001 306 Query 1 403 use `test`; INSERT INTO t1 VALUES (1,1), (2,2)
|
|
slave-bin.000001 403 Table_map 1 443 test.t1
|
|
slave-bin.000001 443 Write_rows 1 560
|
|
DROP TABLE IF EXISTS t1;
|