diff options
Diffstat (limited to 'sql/sql_rename.cc')
-rw-r--r-- | sql/sql_rename.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc index e1be78ada1c..c3acbac1bd2 100644 --- a/sql/sql_rename.cc +++ b/sql/sql_rename.cc @@ -87,9 +87,12 @@ end: } if (!error) { - mysql_update_log.write(thd->query,thd->query_length); - Query_log_event qinfo(thd, thd->query); - mysql_bin_log.write(&qinfo); + mysql_update_log.write(thd,thd->query,thd->query_length); + if (mysql_bin_log.is_open()) + { + Query_log_event qinfo(thd, thd->query); + mysql_bin_log.write(&qinfo); + } send_ok(&thd->net); } for (TABLE_LIST *table=table_list ; table != lock_table ; table=table->next) |