• 's avatar
    BUG#45574 CREATE IF NOT EXISTS is not binlogged if the object exists · 10e90a1f
    authored
    There is an inconsistency with DROP DATABASE|TABLE|EVENT IF EXISTS and
    CREATE DATABASE|TABLE|EVENT IF NOT EXISTS. DROP IF EXISTS statements are
    binlogged even if either the DB, TABLE or EVENT does not exist. In
    contrast, Only the CREATE EVENT IF NOT EXISTS is binlogged when the EVENT
    exists.  
    
    This patch fixes the following cases for all the replication formats:
    CREATE DATABASE IF NOT EXISTS.
    CREATE TABLE IF NOT EXISTS,
    CREATE TABLE IF NOT EXISTS ... LIKE,
    CREAET TABLE IF NOT EXISTS ... SELECT.
    10e90a1f
sql_db.cc 57.4 KB