summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2005-08-27 02:33:06 +0400
committerunknown <sergefp@mysql.com>2005-08-27 02:33:06 +0400
commit9bc3976c79d484c380ed9265c51918a942cd22b7 (patch)
treec1da247a061c35537652a59670be0d73b7861a51 /sql/sql_delete.cc
parent4d0513127c180e4fa4483dc3f149a73bee6979d0 (diff)
downloadmariadb-git-9bc3976c79d484c380ed9265c51918a942cd22b7.tar.gz
Slightly amended Monty's SP replication code cleanup patch
sql/item.cc: Code cleanup sql/item.h: Code cleanup sql/log.cc: Added comments sql/sp_head.cc: Code cleanup patch from Monty: in subst_spvars() - Move local variables first in block - Use res|= instead of res |= - Use strmake() instead of alloc + memcpy Added: - Fail the query if we don't have enough memory to produce a binlog-suitable query string: if we're so low on memory we're likely to fail the query anyway, and failing now removes the need for hack with THD::query_str_binlog_suitable. sql/sql_class.cc: Remove THD::query_str_binlog_unsuitable sql/sql_class.h: Remove THD::query_str_binlog_unsuitable sql/sql_delete.cc: Remove THD::query_str_binlog_unsuitable sql/sql_insert.cc: Remove THD::query_str_binlog_unsuitable sql/sql_parse.cc: Code cleanup sql/sql_update.cc: Remove THD::query_str_binlog_unsuitable
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 7c012e3b442..4ec5b43f8e7 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -14,15 +14,12 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-
/*
Delete of records and truncate of tables.
Multi-table deletes were introduced by Monty and Sinisa
*/
-
-
#include "mysql_priv.h"
#include "ha_innodb.h"
#include "sql_select.h"
@@ -254,8 +251,7 @@ cleanup:
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
transactional_table, FALSE);
- if ((thd->query_str_binlog_unsuitable || mysql_bin_log.write(&qinfo))
- && transactional_table)
+ if (mysql_bin_log.write(&qinfo) && transactional_table)
error=1;
}
if (!transactional_table)
@@ -720,8 +716,7 @@ bool multi_delete::send_eof()
thd->clear_error();
Query_log_event qinfo(thd, thd->query, thd->query_length,
transactional_tables, FALSE);
- if ((thd->query_str_binlog_unsuitable || mysql_bin_log.write(&qinfo))
- && !normal_tables)
+ if (mysql_bin_log.write(&qinfo) && !normal_tables)
local_error=1; // Log write failed: roll back the SQL statement
}
if (!transactional_tables)