| 1 |
reset master; |
| 2 |
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); |
| 3 |
select @@innodb_autoinc_lock_mode; |
| 4 |
@@innodb_autoinc_lock_mode |
| 5 |
2 |
| 6 |
select @@binlog_format; |
| 7 |
@@binlog_format |
| 8 |
MIXED |
| 9 |
create table t1 (a int not null auto_increment,b int, primary key (a)) engine=InnoDB; |
| 10 |
insert into t1 values (NULL,1); |
| 11 |
include/show_binlog_events.inc |
| 12 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 13 |
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
| 14 |
master-bin.000001 # Query # # use `mtr`; INSERT INTO test_suppressions (pattern) VALUES ( NAME_CONST('pattern',_utf8mb4'Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT' COLLATE 'utf8mb4_uca1400_ai_ci')) |
| 15 |
master-bin.000001 # Query # # COMMIT |
| 16 |
master-bin.000001 # Gtid # # GTID #-#-# |
| 17 |
master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment,b int, primary key (a)) engine=InnoDB |
| 18 |
master-bin.000001 # Gtid # # BEGIN GTID #-#-# |
| 19 |
master-bin.000001 # Annotate_rows # # insert into t1 values (NULL,1) |
| 20 |
master-bin.000001 # Table_map # # table_id: # (test.t1) |
| 21 |
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F |
| 22 |
master-bin.000001 # Xid # # COMMIT /* XID */ |
| 23 |
set global binlog_format=STATEMENT; |
| 24 |
connect con1,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK; |
| 25 |
insert into t1 values (NULL,1); |
| 26 |
Warnings: |
| 27 |
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave |
| 28 |
insert into t1 values (NULL,1); |
| 29 |
Warnings: |
| 30 |
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the slave |
| 31 |
disconnect con1; |
| 32 |
connection default; |
| 33 |
set global binlog_format=MIXED; |
| 34 |
DROP TABLE t1; |