| 1 |
################################################################################ |
| 2 |
# BUG#27165446 PARALLEL REPLICATION OF CREATE/ALTER/DROP DATABASE DEADLOCK, |
| 3 |
# EARLY MDL RELEASE |
| 4 |
# |
| 5 |
# This test verify INSERT's last_committed is always equal to the sequence_number |
| 6 |
# of admin statements. Thus INSERT statement is scheduled post admin statement. |
| 7 |
################################################################################ |
| 8 |
--source include/have_debug_sync.inc |
| 9 |
--source include/have_binlog_format_statement.inc |
| 10 |
|
| 11 |
--connect(insert_conn, localhost, root) |
| 12 |
--connect(admin_conn, localhost, root) |
| 13 |
|
| 14 |
RESET MASTER; |
| 15 |
|
| 16 |
CREATE TABLE t1(c1 INT AUTO_INCREMENT PRIMARY KEY, c2 VARCHAR(200)) |
| 17 |
PARTITION BY HASH (c1) PARTITIONS 4; |
| 18 |
INSERT INTO t1 VALUES(1, ""), (2, ""), (3, ""),(4, ""); |
| 19 |
|
| 20 |
--echo # |
| 21 |
--echo # Verify INSERT after CREATE DATABASE logs correct last_committed |
| 22 |
--echo # |
| 23 |
--let $admin_statement= CREATE DATABASE d1 CHARACTER SET UTF8MB4 |
| 24 |
--source extra/binlog_tests/binlog_unsafe_commit_parent.inc |
| 25 |
--let $binlog_file= binlog.000001 |
| 26 |
--let $logical_timestamps= 3 4 |
| 27 |
--source include/assert_logical_timestamps.inc |
| 28 |
|
| 29 |
--echo # |
| 30 |
--echo # Verify INSERT after ALTER DATABASE logs correct last_committed |
| 31 |
--echo # |
| 32 |
--let $admin_statement= ALTER DATABASE d1 DEFAULT CHARACTER SET = 'latin1' |
| 33 |
--source extra/binlog_tests/binlog_unsafe_commit_parent.inc |
| 34 |
--let $binlog_file= binlog.000001 |
| 35 |
--let $logical_timestamps= 5 6 |
| 36 |
--source include/assert_logical_timestamps.inc |
| 37 |
|
| 38 |
--echo # |
| 39 |
--echo # Verify INSERT after DROP DATABASE logs correct last_committed |
| 40 |
--echo # |
| 41 |
--let $admin_statement= DROP DATABASE d1 |
| 42 |
--source extra/binlog_tests/binlog_unsafe_commit_parent.inc |
| 43 |
--let $binlog_file= binlog.000001 |
| 44 |
--let $logical_timestamps= 7 8 |
| 45 |
--source include/assert_logical_timestamps.inc |
| 46 |
|
| 47 |
DROP TABLE t1; |