summaryrefslogtreecommitdiff
path: root/sql/sql_rename.cc
diff options
context:
space:
mode:
authormonty@donna.mysql.com <>2000-09-16 04:27:21 +0300
committermonty@donna.mysql.com <>2000-09-16 04:27:21 +0300
commit751f2d1f160a6ba6be4ee93ddf308f552527c254 (patch)
tree6e20280a8abcc28d14385983250a3e1823639028 /sql/sql_rename.cc
parenta99c1757be3ad053437a494442774227d61defbe (diff)
downloadmariadb-git-751f2d1f160a6ba6be4ee93ddf308f552527c254.tar.gz
Faster log::write() call, memory leak fix, flush master fix.
Diffstat (limited to 'sql/sql_rename.cc')
-rw-r--r--sql/sql_rename.cc9
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)