• 's avatar
    Bug #50914 mysqlbinlog not handling drop of current default database · 27b4d039
    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.
    27b4d039
mysqlbinlog.test 18 KB