mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch '10.2' into 10.3
This commit is contained in:
@ -58,7 +58,7 @@ if (`SELECT HEX(@commands) = HEX('configure')`)
|
|||||||
--eval CREATE TEMPORARY TABLE nt_tmp_xx_1 ( id INT ) ENGINE = MyIsam
|
--eval CREATE TEMPORARY TABLE nt_tmp_xx_1 ( id INT ) ENGINE = MyIsam
|
||||||
|
|
||||||
#
|
#
|
||||||
# Creates a Temporary N-table that is never dropped.
|
# Creates a Temporary T-table that is never dropped.
|
||||||
#
|
#
|
||||||
--eval CREATE TEMPORARY TABLE tt_tmp_xx_1 ( id INT ) ENGINE = Innodb
|
--eval CREATE TEMPORARY TABLE tt_tmp_xx_1 ( id INT ) ENGINE = Innodb
|
||||||
|
|
||||||
|
@ -483,6 +483,65 @@ SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp Te R';
|
|||||||
SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp NeT-trig R';
|
SET @commands= 'B N N-Temp T-SELECT-T-Temp N-Temp NeT-trig R';
|
||||||
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
|
||||||
|
--echo # > MDEV-26833
|
||||||
|
--echo # Errored out and rolled back Te statement should not produce any event to binlog
|
||||||
|
--echo # in the following cases:
|
||||||
|
|
||||||
|
SET @sav_var = @@session.binlog_direct_non_transactional_updates;
|
||||||
|
|
||||||
|
SET @@session.binlog_direct_non_transactional_updates = ON;
|
||||||
|
SET @commands= 'B T Drop-Temp-TT-Temp Te C';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te C';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
SET @commands= 'B T Drop-Temp-TN-Temp Te C';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
SET @commands= 'B T N-Temp Te C';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TT-Temp Te R';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te R';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
SET @commands= 'B T Drop-Temp-TN-Temp Te R';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
SET @commands= 'B T N-Temp Te R';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
|
||||||
|
--echo # Non-transactional side effects.
|
||||||
|
SET @commands= 'B T N-Temp Te Ne C';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
SET @commands= 'B T N-Temp Te Ne R';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
|
||||||
|
SET @@session.binlog_direct_non_transactional_updates = OFF;
|
||||||
|
SET @commands= 'B T Drop-Temp-TT-Temp Te C';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te C';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
SET @commands= 'B T Drop-Temp-TN-Temp Te C';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
SET @commands= 'B T N-Temp Te C';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TT-Temp Te R';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te R';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
SET @commands= 'B T Drop-Temp-TN-Temp Te R';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
SET @commands= 'B T N-Temp Te R';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
|
||||||
|
--echo # Non-transactional side effects.
|
||||||
|
SET @commands= 'B T N-Temp Te Ne C';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
SET @commands= 'B T N-Temp Te Ne R';
|
||||||
|
--source suite/rpl/include/rpl_drop_create_temp_table.inc
|
||||||
|
|
||||||
|
SET @@session.binlog_direct_non_transactional_updates = @sav_var;
|
||||||
|
--echo # < MDEV-26833
|
||||||
|
|
||||||
--echo ###################################################################################
|
--echo ###################################################################################
|
||||||
--echo # CHECK CONSISTENCY
|
--echo # CHECK CONSISTENCY
|
||||||
--echo ###################################################################################
|
--echo ###################################################################################
|
||||||
@ -495,8 +554,7 @@ if (`select @@session.binlog_format != 'STATEMENT'`)
|
|||||||
{
|
{
|
||||||
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLD_DATADIR/test-temporary-master.sql
|
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLD_DATADIR/test-temporary-master.sql
|
||||||
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLD_DATADIR/test-temporary-slave.sql
|
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLD_DATADIR/test-temporary-slave.sql
|
||||||
# uncomment when anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y from mysql-5.6 is merged
|
--diff_files $MYSQLD_DATADIR/test-temporary-master.sql $MYSQLD_DATADIR/test-temporary-slave.sql
|
||||||
#--diff_files $MYSQLD_DATADIR/test-temporary-master.sql $MYSQLD_DATADIR/test-temporary-slave.sql
|
|
||||||
}
|
}
|
||||||
|
|
||||||
--echo #########################################################################
|
--echo #########################################################################
|
||||||
|
@ -2119,6 +2119,374 @@ master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
|||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp NeT-trig R << -e-e-e-e-e-e-e-e-e-e-e-
|
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp NeT-trig R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
# > MDEV-26833
|
||||||
|
# Errored out and rolled back Te statement should not produce any event to binlog
|
||||||
|
# in the following cases:
|
||||||
|
SET @sav_var = @@session.binlog_direct_non_transactional_updates;
|
||||||
|
SET @@session.binlog_direct_non_transactional_updates = ON;
|
||||||
|
SET @commands= 'B T Drop-Temp-TT-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (7), (7);
|
||||||
|
ERROR 23000: Duplicate entry '7' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te C';
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
|
||||||
|
INSERT INTO tt_error_1() VALUES (8), (8);
|
||||||
|
ERROR 23000: Duplicate entry '8' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-T-Temp B T Create-T-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-T-Temp B T Create-T-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TN-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (9), (9);
|
||||||
|
ERROR 23000: Duplicate entry '9' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (10), (10);
|
||||||
|
ERROR 23000: Duplicate entry '10' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TT-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (11), (11);
|
||||||
|
ERROR 23000: Duplicate entry '11' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te R';
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
|
||||||
|
INSERT INTO tt_error_1() VALUES (12), (12);
|
||||||
|
ERROR 23000: Duplicate entry '12' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-T-Temp B T Create-T-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-T-Temp B T Create-T-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TN-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (13), (13);
|
||||||
|
ERROR 23000: Duplicate entry '13' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (14), (14);
|
||||||
|
ERROR 23000: Duplicate entry '14' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
Warnings:
|
||||||
|
Warning # Some non-transactional changed tables couldn't be rolled back
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
# Non-transactional side effects.
|
||||||
|
SET @commands= 'B T N-Temp Te Ne C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (15), (15);
|
||||||
|
ERROR 23000: Duplicate entry '15' for key 'PRIMARY'
|
||||||
|
INSERT INTO nt_error_1() VALUES (13), (13);
|
||||||
|
ERROR 23000: Duplicate entry '13' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te Ne C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (13), (13)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.nt_error_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te Ne C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te Ne R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (16), (16);
|
||||||
|
ERROR 23000: Duplicate entry '16' for key 'PRIMARY'
|
||||||
|
INSERT INTO nt_error_1() VALUES (14), (14);
|
||||||
|
ERROR 23000: Duplicate entry '14' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
Warnings:
|
||||||
|
Warning # Some non-transactional changed tables couldn't be rolled back
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te Ne R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (14), (14)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.nt_error_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te Ne R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @@session.binlog_direct_non_transactional_updates = OFF;
|
||||||
|
SET @commands= 'B T Drop-Temp-TT-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (17), (17);
|
||||||
|
ERROR 23000: Duplicate entry '17' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te C';
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
|
||||||
|
INSERT INTO tt_error_1() VALUES (18), (18);
|
||||||
|
ERROR 23000: Duplicate entry '18' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-T-Temp B T Create-T-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-T-Temp B T Create-T-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TN-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (19), (19);
|
||||||
|
ERROR 23000: Duplicate entry '19' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (20), (20);
|
||||||
|
ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TT-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (21), (21);
|
||||||
|
ERROR 23000: Duplicate entry '21' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te R';
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
|
||||||
|
INSERT INTO tt_error_1() VALUES (22), (22);
|
||||||
|
ERROR 23000: Duplicate entry '22' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-T-Temp B T Create-T-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-T-Temp B T Create-T-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TN-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (23), (23);
|
||||||
|
ERROR 23000: Duplicate entry '23' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (24), (24);
|
||||||
|
ERROR 23000: Duplicate entry '24' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
Warnings:
|
||||||
|
Warning # Some non-transactional changed tables couldn't be rolled back
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
# Non-transactional side effects.
|
||||||
|
SET @commands= 'B T N-Temp Te Ne C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (25), (25);
|
||||||
|
ERROR 23000: Duplicate entry '25' for key 'PRIMARY'
|
||||||
|
INSERT INTO nt_error_1() VALUES (15), (15);
|
||||||
|
ERROR 23000: Duplicate entry '15' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te Ne C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (15), (15)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.nt_error_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te Ne C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te Ne R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (26), (26);
|
||||||
|
ERROR 23000: Duplicate entry '26' for key 'PRIMARY'
|
||||||
|
INSERT INTO nt_error_1() VALUES (16), (16);
|
||||||
|
ERROR 23000: Duplicate entry '16' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
Warnings:
|
||||||
|
Warning # Some non-transactional changed tables couldn't be rolled back
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te Ne R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (16), (16)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.nt_error_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te Ne R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @@session.binlog_direct_non_transactional_updates = @sav_var;
|
||||||
|
# < MDEV-26833
|
||||||
###################################################################################
|
###################################################################################
|
||||||
# CHECK CONSISTENCY
|
# CHECK CONSISTENCY
|
||||||
###################################################################################
|
###################################################################################
|
||||||
|
@ -619,9 +619,6 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
|||||||
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 # Annotate_rows # # INSERT INTO tt_error_1() VALUES (1), (1)
|
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.tt_error_1)
|
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
|
||||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
@ -1163,9 +1160,6 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
|||||||
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 # Annotate_rows # # INSERT INTO tt_error_1() VALUES (2), (2)
|
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.tt_error_1)
|
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
|
||||||
master-bin.000001 # Query # # ROLLBACK
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-NN-Temp N Drop-Temp-NN-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
@ -1633,12 +1627,6 @@ ERROR 23000: Duplicate entry '3' for key 'PRIMARY'
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
-b-b-b-b-b-b-b-b-b-b-b- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
-b-b-b-b-b-b-b-b-b-b-b- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
include/show_binlog_events.inc
|
include/show_binlog_events.inc
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
|
||||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
|
||||||
master-bin.000001 # Annotate_rows # # INSERT INTO tt_error_1() VALUES (3), (3)
|
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.tt_error_1)
|
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
|
||||||
master-bin.000001 # Query # # COMMIT
|
|
||||||
-e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
-e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp NeT-trig C';
|
SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp NeT-trig C';
|
||||||
@ -1725,12 +1713,6 @@ ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
|
|||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
-b-b-b-b-b-b-b-b-b-b-b- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
-b-b-b-b-b-b-b-b-b-b-b- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
include/show_binlog_events.inc
|
include/show_binlog_events.inc
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
|
||||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
|
||||||
master-bin.000001 # Annotate_rows # # INSERT INTO tt_error_1() VALUES (4), (4)
|
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.tt_error_1)
|
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
|
||||||
master-bin.000001 # Query # # ROLLBACK
|
|
||||||
-e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
-e-e-e-e-e-e-e-e-e-e-e- >> B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp NeT-trig R';
|
SET @commands= 'B Drop-Temp-T-Temp Create-T-Temp Drop-Temp-T-Temp Drop-Temp-T-Temp NeT-trig R';
|
||||||
@ -2066,6 +2048,374 @@ master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
|||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp NeT-trig R << -e-e-e-e-e-e-e-e-e-e-e-
|
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp NeT-trig R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
# > MDEV-26833
|
||||||
|
# Errored out and rolled back Te statement should not produce any event to binlog
|
||||||
|
# in the following cases:
|
||||||
|
SET @sav_var = @@session.binlog_direct_non_transactional_updates;
|
||||||
|
SET @@session.binlog_direct_non_transactional_updates = ON;
|
||||||
|
SET @commands= 'B T Drop-Temp-TT-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (7), (7);
|
||||||
|
ERROR 23000: Duplicate entry '7' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te C';
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
|
||||||
|
INSERT INTO tt_error_1() VALUES (8), (8);
|
||||||
|
ERROR 23000: Duplicate entry '8' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-T-Temp B T Create-T-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-T-Temp B T Create-T-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TN-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (9), (9);
|
||||||
|
ERROR 23000: Duplicate entry '9' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (10), (10);
|
||||||
|
ERROR 23000: Duplicate entry '10' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TT-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (11), (11);
|
||||||
|
ERROR 23000: Duplicate entry '11' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te R';
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
|
||||||
|
INSERT INTO tt_error_1() VALUES (12), (12);
|
||||||
|
ERROR 23000: Duplicate entry '12' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-T-Temp B T Create-T-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-T-Temp B T Create-T-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TN-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (13), (13);
|
||||||
|
ERROR 23000: Duplicate entry '13' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (14), (14);
|
||||||
|
ERROR 23000: Duplicate entry '14' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
Warnings:
|
||||||
|
Warning # Some non-transactional changed tables couldn't be rolled back
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
# Non-transactional side effects.
|
||||||
|
SET @commands= 'B T N-Temp Te Ne C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (15), (15);
|
||||||
|
ERROR 23000: Duplicate entry '15' for key 'PRIMARY'
|
||||||
|
INSERT INTO nt_error_1() VALUES (13), (13);
|
||||||
|
ERROR 23000: Duplicate entry '13' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te Ne C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (13), (13)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.nt_error_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te Ne C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te Ne R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (16), (16);
|
||||||
|
ERROR 23000: Duplicate entry '16' for key 'PRIMARY'
|
||||||
|
INSERT INTO nt_error_1() VALUES (14), (14);
|
||||||
|
ERROR 23000: Duplicate entry '14' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
Warnings:
|
||||||
|
Warning # Some non-transactional changed tables couldn't be rolled back
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te Ne R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (14), (14)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.nt_error_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te Ne R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @@session.binlog_direct_non_transactional_updates = OFF;
|
||||||
|
SET @commands= 'B T Drop-Temp-TT-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (17), (17);
|
||||||
|
ERROR 23000: Duplicate entry '17' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te C';
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
|
||||||
|
INSERT INTO tt_error_1() VALUES (18), (18);
|
||||||
|
ERROR 23000: Duplicate entry '18' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-T-Temp B T Create-T-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-T-Temp B T Create-T-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TN-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (19), (19);
|
||||||
|
ERROR 23000: Duplicate entry '19' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (20), (20);
|
||||||
|
ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TT-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (21), (21);
|
||||||
|
ERROR 23000: Duplicate entry '21' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te R';
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
|
||||||
|
INSERT INTO tt_error_1() VALUES (22), (22);
|
||||||
|
ERROR 23000: Duplicate entry '22' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-T-Temp B T Create-T-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-T-Temp B T Create-T-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TN-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (23), (23);
|
||||||
|
ERROR 23000: Duplicate entry '23' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (24), (24);
|
||||||
|
ERROR 23000: Duplicate entry '24' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
Warnings:
|
||||||
|
Warning # Some non-transactional changed tables couldn't be rolled back
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
# Non-transactional side effects.
|
||||||
|
SET @commands= 'B T N-Temp Te Ne C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (25), (25);
|
||||||
|
ERROR 23000: Duplicate entry '25' for key 'PRIMARY'
|
||||||
|
INSERT INTO nt_error_1() VALUES (15), (15);
|
||||||
|
ERROR 23000: Duplicate entry '15' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te Ne C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (15), (15)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.nt_error_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.tt_xx_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te Ne C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te Ne R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (26), (26);
|
||||||
|
ERROR 23000: Duplicate entry '26' for key 'PRIMARY'
|
||||||
|
INSERT INTO nt_error_1() VALUES (16), (16);
|
||||||
|
ERROR 23000: Duplicate entry '16' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
Warnings:
|
||||||
|
Warning # Some non-transactional changed tables couldn't be rolled back
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te Ne R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # INSERT INTO nt_error_1() VALUES (16), (16)
|
||||||
|
master-bin.000001 # Table_map # # table_id: # (test.nt_error_1)
|
||||||
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te Ne R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @@session.binlog_direct_non_transactional_updates = @sav_var;
|
||||||
|
# < MDEV-26833
|
||||||
###################################################################################
|
###################################################################################
|
||||||
# CHECK CONSISTENCY
|
# CHECK CONSISTENCY
|
||||||
###################################################################################
|
###################################################################################
|
||||||
|
@ -2195,6 +2195,388 @@ master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1 SELECT * FROM tt_t
|
|||||||
master-bin.000001 # Query # # ROLLBACK
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp NeT-trig R << -e-e-e-e-e-e-e-e-e-e-e-
|
-e-e-e-e-e-e-e-e-e-e-e- >> B N N-Temp T-SELECT-T-Temp N-Temp NeT-trig R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
# > MDEV-26833
|
||||||
|
# Errored out and rolled back Te statement should not produce any event to binlog
|
||||||
|
# in the following cases:
|
||||||
|
SET @sav_var = @@session.binlog_direct_non_transactional_updates;
|
||||||
|
SET @@session.binlog_direct_non_transactional_updates = ON;
|
||||||
|
SET @commands= 'B T Drop-Temp-TT-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (7), (7);
|
||||||
|
ERROR 23000: Duplicate entry '7' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1`,`tt_tmp_2` /* generated by server */
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te C';
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
|
||||||
|
INSERT INTO tt_error_1() VALUES (8), (8);
|
||||||
|
ERROR 23000: Duplicate entry '8' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-T-Temp B T Create-T-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-T-Temp B T Create-T-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TN-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (9), (9);
|
||||||
|
ERROR 23000: Duplicate entry '9' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
|
||||||
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (10), (10);
|
||||||
|
ERROR 23000: Duplicate entry '10' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TT-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (11), (11);
|
||||||
|
ERROR 23000: Duplicate entry '11' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1`,`tt_tmp_2` /* generated by server */
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te R';
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
|
||||||
|
INSERT INTO tt_error_1() VALUES (12), (12);
|
||||||
|
ERROR 23000: Duplicate entry '12' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-T-Temp B T Create-T-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-T-Temp B T Create-T-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TN-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (13), (13);
|
||||||
|
ERROR 23000: Duplicate entry '13' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
|
||||||
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (14), (14);
|
||||||
|
ERROR 23000: Duplicate entry '14' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
Warnings:
|
||||||
|
Warning # Some non-transactional changed tables couldn't be rolled back
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
# Non-transactional side effects.
|
||||||
|
SET @commands= 'B T N-Temp Te Ne C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (15), (15);
|
||||||
|
ERROR 23000: Duplicate entry '15' for key 'PRIMARY'
|
||||||
|
INSERT INTO nt_error_1() VALUES (13), (13);
|
||||||
|
ERROR 23000: Duplicate entry '13' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te Ne C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO nt_error_1() VALUES (13), (13)
|
||||||
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te Ne C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te Ne R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (16), (16);
|
||||||
|
ERROR 23000: Duplicate entry '16' for key 'PRIMARY'
|
||||||
|
INSERT INTO nt_error_1() VALUES (14), (14);
|
||||||
|
ERROR 23000: Duplicate entry '14' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
Warnings:
|
||||||
|
Warning # Some non-transactional changed tables couldn't be rolled back
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te Ne R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO nt_error_1() VALUES (14), (14)
|
||||||
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te Ne R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @@session.binlog_direct_non_transactional_updates = OFF;
|
||||||
|
SET @commands= 'B T Drop-Temp-TT-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (17), (17);
|
||||||
|
ERROR 23000: Duplicate entry '17' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1`,`tt_tmp_2` /* generated by server */
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te C';
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
|
||||||
|
INSERT INTO tt_error_1() VALUES (18), (18);
|
||||||
|
ERROR 23000: Duplicate entry '18' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-T-Temp B T Create-T-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-T-Temp B T Create-T-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TN-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (19), (19);
|
||||||
|
ERROR 23000: Duplicate entry '19' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
|
||||||
|
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (20), (20);
|
||||||
|
ERROR 23000: Duplicate entry '20' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TT-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_1, tt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (21), (21);
|
||||||
|
ERROR 23000: Duplicate entry '21' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TT-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_1`,`tt_tmp_2` /* generated by server */
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TT-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'Drop-Temp-T-Temp B T Create-T-Temp Te R';
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb;
|
||||||
|
INSERT INTO tt_error_1() VALUES (22), (22);
|
||||||
|
ERROR 23000: Duplicate entry '22' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> Drop-Temp-T-Temp B T Create-T-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE tt_tmp_2 ( id INT ) engine= Innodb
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> Drop-Temp-T-Temp B T Create-T-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T Drop-Temp-TN-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE tt_tmp_2, nt_tmp_2;
|
||||||
|
INSERT INTO tt_error_1() VALUES (23), (23);
|
||||||
|
ERROR 23000: Duplicate entry '23' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T Drop-Temp-TN-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `nt_tmp_2` /* generated by server */
|
||||||
|
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt_tmp_2` /* generated by server */
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T Drop-Temp-TN-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (24), (24);
|
||||||
|
ERROR 23000: Duplicate entry '24' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
Warnings:
|
||||||
|
Warning # Some non-transactional changed tables couldn't be rolled back
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
# Non-transactional side effects.
|
||||||
|
SET @commands= 'B T N-Temp Te Ne C';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (25), (25);
|
||||||
|
ERROR 23000: Duplicate entry '25' for key 'PRIMARY'
|
||||||
|
INSERT INTO nt_error_1() VALUES (15), (15);
|
||||||
|
ERROR 23000: Duplicate entry '15' for key 'PRIMARY'
|
||||||
|
COMMIT;
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te Ne C << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO nt_error_1() VALUES (15), (15)
|
||||||
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te Ne C << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @commands= 'B T N-Temp Te Ne R';
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO tt_xx_1() VALUES (1);
|
||||||
|
INSERT INTO nt_tmp_xx_1() VALUES (1);
|
||||||
|
INSERT INTO tt_error_1() VALUES (26), (26);
|
||||||
|
ERROR 23000: Duplicate entry '26' for key 'PRIMARY'
|
||||||
|
INSERT INTO nt_error_1() VALUES (16), (16);
|
||||||
|
ERROR 23000: Duplicate entry '16' for key 'PRIMARY'
|
||||||
|
ROLLBACK;
|
||||||
|
Warnings:
|
||||||
|
Warning # Some non-transactional changed tables couldn't be rolled back
|
||||||
|
-b-b-b-b-b-b-b-b-b-b-b- >> B T N-Temp Te Ne R << -b-b-b-b-b-b-b-b-b-b-b-
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO tt_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO nt_tmp_xx_1() VALUES (1)
|
||||||
|
master-bin.000001 # Query # # use `test`; INSERT INTO nt_error_1() VALUES (16), (16)
|
||||||
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
|
-e-e-e-e-e-e-e-e-e-e-e- >> B T N-Temp Te Ne R << -e-e-e-e-e-e-e-e-e-e-e-
|
||||||
|
|
||||||
|
SET @@session.binlog_direct_non_transactional_updates = @sav_var;
|
||||||
|
# < MDEV-26833
|
||||||
###################################################################################
|
###################################################################################
|
||||||
# CHECK CONSISTENCY
|
# CHECK CONSISTENCY
|
||||||
###################################################################################
|
###################################################################################
|
||||||
|
@ -1729,9 +1729,13 @@ struct THD_TRANS
|
|||||||
/*
|
/*
|
||||||
Define the type of statements which cannot be rolled back safely.
|
Define the type of statements which cannot be rolled back safely.
|
||||||
Each type occupies one bit in m_unsafe_rollback_flags.
|
Each type occupies one bit in m_unsafe_rollback_flags.
|
||||||
|
MODIFIED_NON_TRANS_TABLE is limited to mark only the temporary
|
||||||
|
non-transactional table *when* it's cached along with the transactional
|
||||||
|
events; the regular table is covered by the "namesake" bool var.
|
||||||
*/
|
*/
|
||||||
enum unsafe_statement_types
|
enum unsafe_statement_types
|
||||||
{
|
{
|
||||||
|
MODIFIED_NON_TRANS_TABLE= 1,
|
||||||
CREATED_TEMP_TABLE= 2,
|
CREATED_TEMP_TABLE= 2,
|
||||||
DROPPED_TEMP_TABLE= 4,
|
DROPPED_TEMP_TABLE= 4,
|
||||||
DID_WAIT= 8,
|
DID_WAIT= 8,
|
||||||
@ -1739,6 +1743,14 @@ struct THD_TRANS
|
|||||||
EXECUTED_TABLE_ADMIN_CMD= 0x20
|
EXECUTED_TABLE_ADMIN_CMD= 0x20
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void mark_modified_non_trans_temp_table()
|
||||||
|
{
|
||||||
|
m_unsafe_rollback_flags|= MODIFIED_NON_TRANS_TABLE;
|
||||||
|
}
|
||||||
|
bool has_modified_non_trans_temp_table() const
|
||||||
|
{
|
||||||
|
return (m_unsafe_rollback_flags & MODIFIED_NON_TRANS_TABLE) != 0;
|
||||||
|
}
|
||||||
void mark_executed_table_admin_cmd()
|
void mark_executed_table_admin_cmd()
|
||||||
{
|
{
|
||||||
DBUG_PRINT("debug", ("mark_executed_table_admin_cmd"));
|
DBUG_PRINT("debug", ("mark_executed_table_admin_cmd"));
|
||||||
|
37
sql/log.cc
37
sql/log.cc
@ -263,7 +263,7 @@ class binlog_cache_data
|
|||||||
public:
|
public:
|
||||||
binlog_cache_data(): m_pending(0), status(0),
|
binlog_cache_data(): m_pending(0), status(0),
|
||||||
before_stmt_pos(MY_OFF_T_UNDEF),
|
before_stmt_pos(MY_OFF_T_UNDEF),
|
||||||
incident(FALSE), changes_to_non_trans_temp_table_flag(FALSE),
|
incident(FALSE),
|
||||||
saved_max_binlog_cache_size(0), ptr_binlog_cache_use(0),
|
saved_max_binlog_cache_size(0), ptr_binlog_cache_use(0),
|
||||||
ptr_binlog_cache_disk_use(0)
|
ptr_binlog_cache_disk_use(0)
|
||||||
{ }
|
{ }
|
||||||
@ -312,16 +312,6 @@ public:
|
|||||||
return(incident);
|
return(incident);
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_changes_to_non_trans_temp_table()
|
|
||||||
{
|
|
||||||
changes_to_non_trans_temp_table_flag= TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool changes_to_non_trans_temp_table()
|
|
||||||
{
|
|
||||||
return (changes_to_non_trans_temp_table_flag);
|
|
||||||
}
|
|
||||||
|
|
||||||
void reset()
|
void reset()
|
||||||
{
|
{
|
||||||
bool cache_was_empty= empty();
|
bool cache_was_empty= empty();
|
||||||
@ -333,7 +323,6 @@ public:
|
|||||||
if (truncate_file)
|
if (truncate_file)
|
||||||
my_chsize(cache_log.file, 0, 0, MYF(MY_WME));
|
my_chsize(cache_log.file, 0, 0, MYF(MY_WME));
|
||||||
|
|
||||||
changes_to_non_trans_temp_table_flag= FALSE;
|
|
||||||
status= 0;
|
status= 0;
|
||||||
incident= FALSE;
|
incident= FALSE;
|
||||||
before_stmt_pos= MY_OFF_T_UNDEF;
|
before_stmt_pos= MY_OFF_T_UNDEF;
|
||||||
@ -432,12 +421,6 @@ private:
|
|||||||
*/
|
*/
|
||||||
bool incident;
|
bool incident;
|
||||||
|
|
||||||
/*
|
|
||||||
This flag indicates if the cache has changes to temporary tables.
|
|
||||||
@TODO This a temporary fix and should be removed after BUG#54562.
|
|
||||||
*/
|
|
||||||
bool changes_to_non_trans_temp_table_flag;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function computes binlog cache and disk usage.
|
This function computes binlog cache and disk usage.
|
||||||
*/
|
*/
|
||||||
@ -1977,13 +1960,12 @@ static int binlog_prepare(handlerton *hton, THD *thd, bool all)
|
|||||||
*/
|
*/
|
||||||
static bool trans_cannot_safely_rollback(THD *thd, bool all)
|
static bool trans_cannot_safely_rollback(THD *thd, bool all)
|
||||||
{
|
{
|
||||||
binlog_cache_mngr *const cache_mngr=
|
DBUG_ASSERT(ending_trans(thd, all));
|
||||||
(binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton);
|
|
||||||
|
|
||||||
return ((thd->variables.option_bits & OPTION_KEEP_LOG) ||
|
return ((thd->variables.option_bits & OPTION_KEEP_LOG) ||
|
||||||
(trans_has_updated_non_trans_table(thd) &&
|
(trans_has_updated_non_trans_table(thd) &&
|
||||||
thd->wsrep_binlog_format() == BINLOG_FORMAT_STMT) ||
|
thd->wsrep_binlog_format() == BINLOG_FORMAT_STMT) ||
|
||||||
(cache_mngr->trx_cache.changes_to_non_trans_temp_table() &&
|
(thd->transaction.all.has_modified_non_trans_temp_table() &&
|
||||||
thd->wsrep_binlog_format() == BINLOG_FORMAT_MIXED) ||
|
thd->wsrep_binlog_format() == BINLOG_FORMAT_MIXED) ||
|
||||||
(trans_has_updated_non_trans_table(thd) &&
|
(trans_has_updated_non_trans_table(thd) &&
|
||||||
ending_single_stmt_trans(thd,all) &&
|
ending_single_stmt_trans(thd,all) &&
|
||||||
@ -2134,17 +2116,19 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all)
|
|||||||
/*
|
/*
|
||||||
Truncate the cache if:
|
Truncate the cache if:
|
||||||
. aborting a single or multi-statement transaction or;
|
. aborting a single or multi-statement transaction or;
|
||||||
. the OPTION_KEEP_LOG is not active and;
|
. the current statement created or dropped a temporary table
|
||||||
|
while having actual STATEMENT format;
|
||||||
. the format is not STMT or no non-trans table was
|
. the format is not STMT or no non-trans table was
|
||||||
updated and;
|
updated and;
|
||||||
. the format is not MIXED or no temporary non-trans table
|
. the format is not MIXED or no temporary non-trans table
|
||||||
was updated.
|
was updated.
|
||||||
*/
|
*/
|
||||||
else if (ending_trans(thd, all) ||
|
else if (ending_trans(thd, all) ||
|
||||||
(!(thd->variables.option_bits & OPTION_KEEP_LOG) &&
|
(!(thd->transaction.stmt.has_created_dropped_temp_table() &&
|
||||||
|
!thd->is_current_stmt_binlog_format_row()) &&
|
||||||
(!stmt_has_updated_non_trans_table(thd) ||
|
(!stmt_has_updated_non_trans_table(thd) ||
|
||||||
thd->wsrep_binlog_format() != BINLOG_FORMAT_STMT) &&
|
thd->wsrep_binlog_format() != BINLOG_FORMAT_STMT) &&
|
||||||
(!cache_mngr->trx_cache.changes_to_non_trans_temp_table() ||
|
(!thd->transaction.stmt.has_modified_non_trans_temp_table() ||
|
||||||
thd->wsrep_binlog_format() != BINLOG_FORMAT_MIXED)))
|
thd->wsrep_binlog_format() != BINLOG_FORMAT_MIXED)))
|
||||||
error= binlog_truncate_trx_cache(thd, cache_mngr, all);
|
error= binlog_truncate_trx_cache(thd, cache_mngr, all);
|
||||||
}
|
}
|
||||||
@ -6340,9 +6324,8 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info, my_bool *with_annotate)
|
|||||||
cache_data= cache_mngr->get_binlog_cache_data(is_trans_cache);
|
cache_data= cache_mngr->get_binlog_cache_data(is_trans_cache);
|
||||||
file= &cache_data->cache_log;
|
file= &cache_data->cache_log;
|
||||||
|
|
||||||
if (thd->lex->stmt_accessed_non_trans_temp_table())
|
if (thd->lex->stmt_accessed_non_trans_temp_table() && is_trans_cache)
|
||||||
cache_data->set_changes_to_non_trans_temp_table();
|
thd->transaction.stmt.mark_modified_non_trans_temp_table();
|
||||||
|
|
||||||
thd->binlog_start_trans_and_stmt();
|
thd->binlog_start_trans_and_stmt();
|
||||||
}
|
}
|
||||||
DBUG_PRINT("info",("event type: %d",event_info->get_type_code()));
|
DBUG_PRINT("info",("event type: %d",event_info->get_type_code()));
|
||||||
|
@ -3379,8 +3379,13 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
|
|||||||
It's reset further in the common code part.
|
It's reset further in the common code part.
|
||||||
It's merged with the saved parent's value at the exit of this func.
|
It's merged with the saved parent's value at the exit of this func.
|
||||||
*/
|
*/
|
||||||
bool parent_modified_non_trans_table= thd->transaction.stmt.modified_non_trans_table;
|
bool parent_modified_non_trans_table=
|
||||||
|
thd->transaction.stmt.modified_non_trans_table;
|
||||||
|
unsigned int parent_unsafe_rollback_flags=
|
||||||
|
thd->transaction.stmt.m_unsafe_rollback_flags;
|
||||||
thd->transaction.stmt.modified_non_trans_table= FALSE;
|
thd->transaction.stmt.modified_non_trans_table= FALSE;
|
||||||
|
thd->transaction.stmt.m_unsafe_rollback_flags= 0;
|
||||||
|
|
||||||
DBUG_ASSERT(!thd->derived_tables);
|
DBUG_ASSERT(!thd->derived_tables);
|
||||||
DBUG_ASSERT(thd->Item_change_list::is_empty());
|
DBUG_ASSERT(thd->Item_change_list::is_empty());
|
||||||
/*
|
/*
|
||||||
@ -3496,6 +3501,7 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp,
|
|||||||
what is needed from the substatement gained
|
what is needed from the substatement gained
|
||||||
*/
|
*/
|
||||||
thd->transaction.stmt.modified_non_trans_table |= parent_modified_non_trans_table;
|
thd->transaction.stmt.modified_non_trans_table |= parent_modified_non_trans_table;
|
||||||
|
thd->transaction.stmt.m_unsafe_rollback_flags |= parent_unsafe_rollback_flags;
|
||||||
|
|
||||||
TRANSACT_TRACKER(add_trx_state_from_thd(thd));
|
TRANSACT_TRACKER(add_trx_state_from_thd(thd));
|
||||||
|
|
||||||
|
@ -4816,7 +4816,8 @@ public:
|
|||||||
transaction.all.modified_non_trans_table= TRUE;
|
transaction.all.modified_non_trans_table= TRUE;
|
||||||
transaction.all.m_unsafe_rollback_flags|=
|
transaction.all.m_unsafe_rollback_flags|=
|
||||||
(transaction.stmt.m_unsafe_rollback_flags &
|
(transaction.stmt.m_unsafe_rollback_flags &
|
||||||
(THD_TRANS::DID_WAIT | THD_TRANS::CREATED_TEMP_TABLE |
|
(THD_TRANS::MODIFIED_NON_TRANS_TABLE |
|
||||||
|
THD_TRANS::DID_WAIT | THD_TRANS::CREATED_TEMP_TABLE |
|
||||||
THD_TRANS::DROPPED_TEMP_TABLE | THD_TRANS::DID_DDL |
|
THD_TRANS::DROPPED_TEMP_TABLE | THD_TRANS::DID_DDL |
|
||||||
THD_TRANS::EXECUTED_TABLE_ADMIN_CMD));
|
THD_TRANS::EXECUTED_TABLE_ADMIN_CMD));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user