• He Zhenxing's avatar
    BUG#45520 rpl_killed_ddl fails sporadically in pb2 · bc2b3d2c
    He Zhenxing authored
    There are three issues that caused rpl_killed_ddl fails sporadically
    in pb2:
    
     1) thd->clear_error() was not called before create Query event
    if operation is executed successfully.
     2) DATABASE d2 might do exist because the statement to CREATE or
    ALTER it was killed
     3) because of bug 43353, kill the query that do DROP FUNCTION or
        DROP PROCEDURE can result in SP not found
    
    This patch fixed all above issues by:
     1) Called thd->clear_error() if the operation succeeded.
     2) Add IF EXISTS to the DROP DATABASE d2 statement
     3) Temporarily disabled testing DROP FUNCTION/PROCEDURE IF EXISTS.
    
    mysql-test/t/rpl_killed_ddl.test:
      DATABASE d2 might not exists, add IF EXITS to the DROP statement
    sql/sql_db.cc:
      Called thd->clear_error() if the operation succeeded
    bc2b3d2c
rpl_killed_ddl.result 3.85 KB