mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
WL#2687 WL#5072 BUG#40278 BUG#47175
Non-transactional updates that take place inside a transaction present problems for logging because they are visible to other clients before the transaction is committed, and they are not rolled back even if the transaction is rolled back. It is not always possible to log correctly in statement format when both transactional and non-transactional tables are used in the same transaction. In the current patch, we ensure that such scenario is completely safe under the ROW and MIXED modes.
This commit is contained in:
44
mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
Normal file
44
mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
Normal file
@ -0,0 +1,44 @@
|
||||
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;
|
||||
call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT");
|
||||
call mtr.add_suppression("Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT");
|
||||
create table t1(n int);
|
||||
stop slave;
|
||||
start slave;
|
||||
stop slave io_thread;
|
||||
start slave io_thread;
|
||||
drop table t1;
|
||||
create table t1i(n int primary key) engine=innodb;
|
||||
create table t2m(n int primary key) engine=myisam;
|
||||
begin;
|
||||
insert into t1i values (1);
|
||||
insert into t1i values (2);
|
||||
insert into t1i values (3);
|
||||
commit;
|
||||
begin;
|
||||
insert into t1i values (5);
|
||||
begin;
|
||||
insert into t1i values (4);
|
||||
insert into t2m values (1);
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement binlogged in statement format since BINLOG_FORMAT = STATEMENT. Reason for unsafeness: Non-transactional reads or writes are unsafe if they occur after transactional reads or writes inside a transaction.
|
||||
insert into t1i values (5);
|
||||
commit;
|
||||
zero
|
||||
0
|
||||
stop slave;
|
||||
rollback;
|
||||
*** sql thread is *not* running: No ***
|
||||
*** the prove: the stopped slave has finished the current transaction ***
|
||||
five
|
||||
5
|
||||
zero
|
||||
0
|
||||
one
|
||||
1
|
||||
include/start_slave.inc
|
||||
drop table t1i, t2m;
|
Reference in New Issue
Block a user