• Nirbhay Choubey's avatar
    MDEV-8617: Multiple galera tests failures with --ps-protocol · c18e0dab
    Nirbhay Choubey authored
    In galera cluster, when myisam replication is enabled
    (wsrep_replicate_myisam=ON), DML statements are replicated
    in open_tables(). However, in case of prepared statements,
    for an INSERT, open_tables() gets invoked twice. Once for
    COM_STMT_PREPARE (to validate and prepare INSERT) and later
    for COM_STMT_EXECUTE. As a result, the command gets replicated
    twice. Same happens for REPLACE, UPDATE and DELETE commands.
    Fixed by adding a check to not replicate during 'prepare'
    phase. Also changed the order of conditions to make it more
    efficient. Lastly, in order to support wsrep_dirty_reads, made
    changes to allow COM_STMT_XXX commands to continue past initial
    check even when wsrep is not ready.
    c18e0dab
sql_base.cc 326 KB