summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-09-16 04:27:21 +0300
committerunknown <monty@donna.mysql.com>2000-09-16 04:27:21 +0300
commit19b678eefe59529761691ddebece604107dcb42b (patch)
tree6e20280a8abcc28d14385983250a3e1823639028 /sql/sql_delete.cc
parentb35a18596c602e654b821ebef8e8a3147fae6dbf (diff)
downloadmariadb-git-19b678eefe59529761691ddebece604107dcb42b.tar.gz
Faster log::write() call, memory leak fix, flush master fix.
BUILD/compile-alpha-ccc: remove deps to get things to compile better Docs/manual.texi: Small fixes configure.in: Fix for mlockmem() include/my_sys.h: Made key_cache_inited global myisammrg/myrg_close.c: Fixed memory leak myisammrg/myrg_open.c: Initialize queue to avoid memory leak bug mysys/mf_format.c: Added overflow check mysys/mf_keycache.c: Made key_cache_init more secure to use mysys/my_static.h: Make key_cache_inite global sql/ChangeLog: Changes sql/lock.cc: Added logging of locktime sql/log.cc: Added logging of locktime sql/mysql_priv.h: Added locked_in_memory sql/mysqld.cc: Added logging of locktime + locked in memory sql/sql_acl.cc: Added thd to log::write() for faster call sql/sql_base.cc: Use global key_cache variable sql/sql_class.cc: Added result row counting sql/sql_class.h: Added thd to log::write() for faster call sql/sql_db.cc: Added thd to log::write() for faster call sql/sql_delete.cc: Added thd to log::write() for faster call sql/sql_insert.cc: Added thd to log::write() for faster call sql/sql_load.cc: Added thd to log::write() for faster call sql/sql_parse.cc: Added thd to log::write() for faster call sql/sql_rename.cc: Added thd to log::write() for faster call sql/sql_table.cc: Added thd to log::write() for faster call sql/sql_update.cc: Added thd to log::write() for faster call
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc18
1 files changed, 12 insertions, 6 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 5d21a089283..05bed157d27 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -89,9 +89,12 @@ static int generate_table(THD *thd, TABLE_LIST *table_list,
if (!error)
{
send_ok(&thd->net); // This should return record count
- 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);
+ }
}
DBUG_RETURN(error ? -1 : 0);
}
@@ -188,9 +191,12 @@ int mysql_delete(THD *thd,TABLE_LIST *table_list,COND *conds,ha_rows limit,
VOID(table->file->extra(HA_EXTRA_READCHECK));
if (deleted)
{
- 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);
+ }
}
if (ha_autocommit_or_rollback(thd,error >= 0))
error=1;