diff options
author | unknown <monty@donna.mysql.com> | 2000-09-16 04:27:49 +0300 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2000-09-16 04:27:49 +0300 |
commit | 8c6b365e7d8f19985e4732024524ac666f0c596c (patch) | |
tree | b87f72722c003b64cdf08c50143e2cb3b2778317 /sql/sql_delete.cc | |
parent | ff1216a5a9c453b5c131f08687a99105dc1a391a (diff) | |
parent | 19b678eefe59529761691ddebece604107dcb42b (diff) | |
download | mariadb-git-8c6b365e7d8f19985e4732024524ac666f0c596c.tar.gz |
Merge work:/home/bk/mysql into donna.mysql.com:/home/my/bk/mysql
Docs/manual.texi:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 64e823d53a5..3662895a4a3 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -89,9 +89,12 @@ 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; |