Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions sql/log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2737,11 +2737,10 @@ bool MYSQL_QUERY_LOG::write(THD *thd, time_t current_time,
(ulong) thd->sent_row_count,
(ulong) thd->examined_row_count) == (uint) -1)
tmp_errno= errno;
if (thd->db && strcmp(thd->db, db))
{ // Database changed
if (thd->db)
{ // Write use statement to every log entry
if (my_b_printf(&log_file,"use %s;\n",thd->db) == (uint) -1)
tmp_errno= errno;
strmov(db,thd->db);
}
if (thd->stmt_depends_on_first_successful_insert_id_in_prev_stmt)
{
Expand Down