summaryrefslogtreecommitdiff
path: root/sql/log_event.h
diff options
context:
space:
mode:
authorguilhem@mysql.com <>2003-10-29 14:23:35 +0100
committerguilhem@mysql.com <>2003-10-29 14:23:35 +0100
commit59d0872aa05e8b02e78db16b1afbe2837af333cf (patch)
treefce8da3a99c175419b43436ce7e5ca6b3d7c8618 /sql/log_event.h
parentc238a9256ab484a4fdbe14a461c3ca96cfcebca8 (diff)
downloadmariadb-git-59d0872aa05e8b02e78db16b1afbe2837af333cf.tar.gz
Fix for BUG#1686
"If 2 master threads with same-name temp table, slave makes bad binlog" and (two birds with one stone) for BUG#1240 "slave of slave breaks when STOP SLAVE was issud on parent slave and temp tables". Here is the design change: in a slave running with --log-slave-updates, events are now logged with the thread id they had on the master. So no more id conflicts between master threads, but introduces id conflicts between one master thread and one normal client thread connected to the slave. This is solved by storing the server id in the temp table's name. New test which requires mysql-test-run to be run with --manager, otherwise it will be skipped. Undoing a Monty's change (hum, a chill runs down my spine ;) which was "Cleanup temporary tables when slave ends" in ChangeSet 1.1572.1.1.
Diffstat (limited to 'sql/log_event.h')
-rw-r--r--sql/log_event.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/log_event.h b/sql/log_event.h
index 227c0243b9c..2e6b7373dc2 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -320,6 +320,13 @@ public:
uint32 db_len;
uint16 error_code;
ulong thread_id;
+ /*
+ For events created by Query_log_event::exec_event (and
+ Load_log_event::exec_event()) we need the *original* thread id, to be able
+ to log the event with the original (=master's) thread id (fix for
+ BUG#1686).
+ */
+ ulong slave_proxy_id;
#ifndef MYSQL_CLIENT
Query_log_event(THD* thd_arg, const char* query_arg, ulong query_length,
@@ -390,6 +397,7 @@ protected:
public:
ulong thread_id;
+ ulong slave_proxy_id;
uint32 table_name_len;
uint32 db_len;
uint32 fname_len;