diff options
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index a440f010fa5..3a6daadd11a 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1733,7 +1733,8 @@ void Query_log_event::print_query_header(FILE* file, if (!(flags & LOG_EVENT_SUPPRESS_USE_F) && db) { - if (different_db= memcmp(print_event_info->db, db, db_len + 1)) + different_db= memcmp(print_event_info->db, db, db_len + 1); + if (different_db) memcpy(print_event_info->db, db, db_len + 1); if (db[0] && different_db) fprintf(file, "use %s%s\n", db, print_event_info->delimiter); |