-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow row events in replication stream for slave in all cases
(even when configured with --binlog-format=statement). Before we got an error on the slave and the slave stopped if the master was configured with --binlog-format=mixed or --binlog-format=row.
- Loading branch information
Showing
5 changed files
with
59 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
include/master-slave.inc | ||
[connection master] | ||
use test; | ||
create table t1 (a int primary key); | ||
insert into t1 values (1),(2),(3),(4),(5); | ||
update t1 set a=a*10; | ||
use test; | ||
select * from t1; | ||
a | ||
10 | ||
20 | ||
30 | ||
40 | ||
50 | ||
include/show_binlog_events.inc | ||
Log_name Pos Event_type Server_id End_log_pos Info | ||
slave-bin.000001 # Gtid # # GTID #-#-# | ||
slave-bin.000001 # Query # # use `test`; create table t1 (a int primary key) | ||
slave-bin.000001 # Gtid # # BEGIN GTID #-#-# | ||
slave-bin.000001 # Table_map # # table_id: # (test.t1) | ||
slave-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F | ||
slave-bin.000001 # Query # # COMMIT | ||
slave-bin.000001 # Gtid # # BEGIN GTID #-#-# | ||
slave-bin.000001 # Table_map # # table_id: # (test.t1) | ||
slave-bin.000001 # Update_rows_v1 # # table_id: # flags: STMT_END_F | ||
slave-bin.000001 # Query # # COMMIT | ||
drop table t1; | ||
include/rpl_end.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--binlog-format=row |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--binlog-format=statement |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# | ||
# check that master starterd with log-format=ROW replication can replicate to | ||
# slave started with log-format=STATEMENT | ||
# | ||
|
||
--source include/have_binlog_format_row.inc | ||
--source include/master-slave.inc | ||
|
||
use test; | ||
|
||
create table t1 (a int primary key); | ||
insert into t1 values (1),(2),(3),(4),(5); | ||
update t1 set a=a*10; | ||
|
||
sync_slave_with_master; | ||
use test; | ||
select * from t1; | ||
source include/show_binlog_events.inc; | ||
|
||
connection master; | ||
drop table t1; | ||
|
||
--source include/rpl_end.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters