• Jan Lindström's avatar
    MDEV-7578 :Slave is ~10x slower to execute set of statements compared to master when using RBR · f66fbe8c
    Jan Lindström authored
    Analysis: On master when executing (single/multi) row INSERTs/REPLACEs
    InnoDB fallback to old style autoinc locks (table locks)
    only if another transaction has already acquired the AUTOINC lock.
    Instead on slave as we are executing log_events and sql_command
    is not correctly set, InnoDB does not use new style autoinc
    locks when it could.
    
    Fix: Use new style autoinc locks also when
    thd_sql_command(user_thd) == SQLCOM_END i.e. this is RBR event.
    f66fbe8c
ha_innodb.cc 356 KB