~mysql/mysql-server/mysql-5.1-bugteam

Viewing all changes in revision 3536.

  • Committer:
  • Date: 2010-12-29 03:52:57 UTC
  • Revision ID: dao-gang.qu@sun.com-20101229035257-32f4p072xij1zkmj
Bug #50914      mysqlbinlog not handling drop of current default database

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.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: