diff options
author | Andrei Elkin <andrei.elkin@oracle.com> | 2013-03-26 19:24:01 +0200 |
---|---|---|
committer | Andrei Elkin <andrei.elkin@oracle.com> | 2013-03-26 19:24:01 +0200 |
commit | 9eb64ec5c034c2935047a75773d754a4258c3832 (patch) | |
tree | 9ed54e46d66e1251664e6f846302bd79ecd1ac96 /sql/log_event.h | |
parent | 7a4c361552f27ff5c27f7f7ec4bbddd1d2192f3b (diff) | |
download | mariadb-git-9eb64ec5c034c2935047a75773d754a4258c3832.tar.gz |
Bug#16541422 LOG-SLAVE-UPDATES + REPLICATE-WILD-IGNORE-TABLE FAILS FOR USER VARIABLES
At logging a first Query referring a user var, the slave missed to log the user var.
It appears that at execution of a Uservar event the slaver applier
thought of the variable as already logged.
The reason of misjudgement is in coincidence of query id:s: of one that the thread
holds at Uservar execution and another one that the thread sees at the Query applying.
While the two are naturally different in the regular execution branch (as two computational
events are separated as individual events), in the deferred applying case the User var execution
effectively belongs to its Query processing.
Fixed with storing the Uservar parsing time (where desicion to defer is taken) query id
to temporarily substitute with it the actual query id at the Uservar execution time
(along with its query).
Such manipulation mimics behaviour of the regular applying branch.
sql/log_event.cc:
Storing the Uservar parsing time query id into a new member of the event
to to temporarily substitute
with it the actual thread id at the Uservar execution time.
sql/log_event.h:
Storage for keeping query-id in User-var intance is added.
Diffstat (limited to 'sql/log_event.h')
-rw-r--r-- | sql/log_event.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/log_event.h b/sql/log_event.h index 63b31454011..5b22a1a324b 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -2524,6 +2524,7 @@ public: bool is_null; #ifndef MYSQL_CLIENT bool deferred; + query_id_t query_id; User_var_log_event(THD* thd_arg, char *name_arg, uint name_len_arg, char *val_arg, ulong val_len_arg, Item_result type_arg, uint charset_number_arg) @@ -2548,7 +2549,11 @@ public: and which case the applier adjusts execution path. */ bool is_deferred() { return deferred; } - void set_deferred() { deferred= true; } + /* + In case of the deffered applying the variable instance is flagged + and the parsing time query id is stored to be used at applying time. + */ + void set_deferred(query_id_t qid) { deferred= true; query_id= qid; } #endif bool is_valid() const { return name != 0; } |