summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorHe Zhenxing <zhenxing.he@sun.com>2009-05-30 21:32:28 +0800
committerHe Zhenxing <zhenxing.he@sun.com>2009-05-30 21:32:28 +0800
commitabf5f8dac2a0840687dc99816cbd68fb8c515e50 (patch)
treea2efff0bf717227dce4199d6e283e4a7c112dfdd /sql/sql_base.cc
parent88e84c1fbfe9b60eeb9c3d24745ee31cfe29c38b (diff)
downloadmariadb-git-abf5f8dac2a0840687dc99816cbd68fb8c515e50.tar.gz
BUG#41948 Query_log_event constructor needlessly contorted
Make the caller of Query_log_event, Execute_load_log_event constructors and THD::binlog_query to provide the error code instead of having the constructors to figure out the error code. sql/log_event.cc: Changed constructors of Query_log_event and Execute_load_log_event to accept the error code argument instead of figuring it out by itself sql/log_event.h: Changed constructors of Query_log_event and Execute_load_log_event to accept the error code argument
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index d4d813d0fbd..de93c6609f7 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1541,7 +1541,7 @@ void close_temporary_tables(THD *thd)
thd->variables.character_set_client= system_charset_info;
Query_log_event qinfo(thd, s_query.ptr(),
s_query.length() - 1 /* to remove trailing ',' */,
- 0, FALSE, THD::NOT_KILLED);
+ 0, FALSE, 0);
thd->variables.character_set_client= cs_save;
mysql_bin_log.write(&qinfo);
thd->variables.pseudo_thread_id= save_pseudo_thread_id;
@@ -4015,9 +4015,10 @@ retry:
/* this DELETE FROM is needed even with row-based binlogging */
end = strxmov(strmov(query, "DELETE FROM `"),
share->db.str,"`.`",share->table_name.str,"`", NullS);
+ int errcode= query_error_code(thd, TRUE);
thd->binlog_query(THD::STMT_QUERY_TYPE,
query, (ulong)(end-query),
- FALSE, FALSE, THD::NOT_KILLED);
+ FALSE, FALSE, errcode);
my_free(query, MYF(0));
}
else