|
| 1 | +############################################################################### |
| 2 | +# Bug#22247668 SLAVE IS ~10X SLOWER TO EXECUTE SET OF STATEMENTS COMPARED TO |
| 3 | +# MASTER RBR |
| 4 | +# Problem: A new style of locking is implemented in Innodb. Starting from 5.6, |
| 5 | +# Innodb uses this new style of locking for all the cases except for the case |
| 6 | +# where for a simple (single/multi) row INSERTs, it fall back to old style |
| 7 | +# locking if another transaction has already acquired the AUTOINC lock on behalf of |
| 8 | +# a LOAD FILE or INSERT...SELECT etc. type of statement. But on |
| 9 | +# Slave, in RBR format, it is always using old style auto inc |
| 10 | +# algorithm. |
| 11 | +# |
| 12 | +# Steps to reproduce: |
| 13 | +# 1) Setup DEBUG simulation point on Slave to bring the server down |
| 14 | +# if the INSERT enters old style autoinc locking method. |
| 15 | +# |
| 16 | +# 2) Execute AUTOINC related work on Master. |
| 17 | +# |
| 18 | +# 3) Make sure that sync on slave happens without any issues. |
| 19 | +# |
| 20 | +############################################################################### |
| 21 | +--source include/have_debug.inc |
| 22 | +--source include/have_binlog_format_row.inc |
| 23 | +--source include/master-slave.inc |
| 24 | + |
| 25 | +# Initial setup |
| 26 | +CREATE TABLE t (i INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; |
| 27 | +--source include/sync_slave_sql_with_master.inc |
| 28 | + |
| 29 | +# Step-1 : Setup DEBUG simulation point on Slave to bring the server down |
| 30 | +# if the INSERT enters old style autoinc locking method. |
| 31 | +SET @save_debug=@@debug; |
| 32 | +SET GLOBAL DEBUG='+d,die_if_autoinc_old_lock_style_used'; |
| 33 | + |
| 34 | +# Step-2 :Execute AUTOINC related work on Master. |
| 35 | +--source include/rpl_connection_master.inc |
| 36 | +INSERT INTO t VALUES (1); |
| 37 | +DROP TABLE t; |
| 38 | + |
| 39 | +# Step-3: Due to above DEBUG simulation point, server will go down if it enters |
| 40 | +# old autoinc lock style. After fix, sync on Slave happens without any issues. |
| 41 | +--source include/sync_slave_sql_with_master.inc |
| 42 | + |
| 43 | +# Cleanup |
| 44 | +# Reset the simulation point on Slave. |
| 45 | +SET GLOBAL DEBUG=@save_debug; |
| 46 | +--source include/rpl_end.inc |
0 commit comments