mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 06:22:28 +01:00
19c380aaff
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.
42 lines
1.5 KiB
Text
42 lines
1.5 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;
|
|
drop database if exists mysqltest;
|
|
create database mysqltest;
|
|
create table mysqltest.t1 ( n int);
|
|
insert into mysqltest.t1 values(1)/
|
|
insert into mysqltest.t1 values(2);
|
|
insert into mysqltest.t1 values(3);
|
|
insert into mysqltest.t1 values(4);
|
|
insert into mysqltest.t1 values(5)/
|
|
select * from mysqltest.t1;
|
|
n
|
|
1
|
|
2
|
|
3
|
|
4
|
|
5
|
|
show binlog events from <binlog_start>;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000001 # Query # # drop database if exists mysqltest
|
|
master-bin.000001 # Query # # create database mysqltest
|
|
master-bin.000001 # Query # # use `test`; create table mysqltest.t1 ( n int)
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(1)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(2)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(3)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(4)
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Query # # use `test`; insert into mysqltest.t1 values(5)
|
|
master-bin.000001 # Query # # COMMIT
|
|
drop database mysqltest;
|