mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +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:
@ -38,6 +38,7 @@ connection master;
|
||||
truncate table t1;
|
||||
# first scenario: duplicate on first row
|
||||
insert delayed into t1 values(10, "my name");
|
||||
flush table t1;
|
||||
if (`SELECT @@global.binlog_format = 'STATEMENT'`)
|
||||
{
|
||||
# statement below will be converted to non-delayed INSERT and so
|
||||
@ -49,7 +50,7 @@ if (`SELECT @@global.binlog_format != 'STATEMENT'`)
|
||||
{
|
||||
insert delayed into t1 values(10, "is Bond"), (20, "James Bond");
|
||||
}
|
||||
flush table t1; # to wait for INSERT DELAYED to be done
|
||||
flush table t1;
|
||||
select * from t1;
|
||||
sync_slave_with_master;
|
||||
# when bug existed in statement-based binlogging, t1 on slave had
|
||||
|
Reference in New Issue
Block a user