summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2004-03-04 15:45:03 +0100
committerunknown <guilhem@mysql.com>2004-03-04 15:45:03 +0100
commiteadfe4ddfa810972daa323131f6cc1476eee8055 (patch)
treea86eca85218bae7ea79dc3c9f58144006274d189
parent53368efea3aee3ef99a82118c130c00d8f84b47c (diff)
parentc1f9f3b601782ed94fa7fbf8d87a5cd049e33190 (diff)
downloadmariadb-git-eadfe4ddfa810972daa323131f6cc1476eee8055.tar.gz
Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/mysql_src/mysql-4.0
-rw-r--r--sql/sql_base.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index e45471dabb8..95ef7acb5ab 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -582,6 +582,16 @@ void close_temporary_tables(THD *thd)
/* The -1 is to remove last ',' */
thd->clear_error();
Query_log_event qinfo(thd, query, (ulong)(end-query)-1, 0);
+ /*
+ 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->temporary_tables=0;