• 's avatar
    Bug #50914 mysqlbinlog not handling drop of current default database · dbb832c0
    authored
    mysqlbinlog only prints "use $database" statements to its output stream
    when the active default database changes between events. This will cause
    "No Database Selected" error when dropping and recreating that database.
    
    To fix the problem, we clear print_event_info->db when printing an event
    of CREATE/DROP/ALTER database statements, so that the Query_log_event
    after such statements will be printed with the use 'db' anyway except
    transaction keywords.
    dbb832c0
mysqlbinlog.test 16.6 KB