mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
8f35f7c907
When setting AUTOCOMMIT=1 after starting a transaction, the binary log did not commit the outstanding transaction. The reason was that the binary log commit function saw the values of the new settings, deciding that there were nothing to commit. Fixed the problem by moving the implicit commit to before the thread option flags were changed, so that the binary log sees the old values of the flags instead of the values they will take after the statement.
28 lines
601 B
Text
28 lines
601 B
Text
# First part: outside a transaction
|
|
RESET MASTER;
|
|
eval $prepare;
|
|
|
|
INSERT INTO t1 VALUES (1);
|
|
source include/show_binlog_events.inc;
|
|
eval $statement;
|
|
source include/show_binlog_events.inc;
|
|
if (`select '$cleanup' != ''`) {
|
|
eval $cleanup;
|
|
}
|
|
|
|
# Second part: inside a transaction
|
|
RESET MASTER;
|
|
eval $prepare;
|
|
BEGIN;
|
|
INSERT INTO t1 VALUES (2);
|
|
source include/show_binlog_events.inc;
|
|
eval $statement;
|
|
source include/show_binlog_events.inc;
|
|
INSERT INTO t1 VALUES (3);
|
|
source include/show_binlog_events.inc;
|
|
COMMIT;
|
|
source include/show_binlog_events.inc;
|
|
if (`select '$cleanup' != ''`) {
|
|
eval $cleanup;
|
|
}
|
|
|