summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorHe Zhenxing <zhenxing.he@sun.com>2009-04-09 07:42:51 +0800
committerHe Zhenxing <zhenxing.he@sun.com>2009-04-09 07:42:51 +0800
commit85cff45ef791c411abd0782fcae77e2da7f532ec (patch)
tree22e49a89755096df5a854d1016d5e19cc163820a /sql/sql_base.cc
parent440858b8167162e29d5f1619448768c93e870926 (diff)
parent51a91166387760546d563ebf72bfa037fcff24a8 (diff)
downloadmariadb-git-85cff45ef791c411abd0782fcae77e2da7f532ec.tar.gz
Manually merge BUG#37145 to 5.1-bugteam
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc16
1 files changed, 3 insertions, 13 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 4f08aa0c07f..0f0ee7c529e 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1541,19 +1541,8 @@ 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);
+ 0, FALSE, THD::NOT_KILLED);
thd->variables.character_set_client= cs_save;
- /*
- Imagine the thread had created a temp table, then was doing a
- SELECT, and the SELECT was killed. Then it's not clever to
- mark the statement above as "killed", because it's not really
- a statement updating data, and there are 99.99% chances it
- will succeed on slave. If a real update (one updating a
- persistent table) was killed on the master, then this real
- update will be logged with error_code=killed, rightfully
- causing the slave to stop.
- */
- qinfo.error_code= 0;
mysql_bin_log.write(&qinfo);
thd->variables.pseudo_thread_id= save_pseudo_thread_id;
}
@@ -4017,7 +4006,8 @@ retry:
end = strxmov(strmov(query, "DELETE FROM `"),
share->db.str,"`.`",share->table_name.str,"`", NullS);
thd->binlog_query(THD::STMT_QUERY_TYPE,
- query, (ulong)(end-query), FALSE, FALSE);
+ query, (ulong)(end-query),
+ FALSE, FALSE, THD::NOT_KILLED);
my_free(query, MYF(0));
}
else