summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/slave.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index f0e4236c29d..0c43c992c22 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -857,7 +857,8 @@ static int exec_event(THD* thd, NET* net, MASTER_INFO* mi, int event_len)
thd->server_id = ev->server_id; // use the original server id for logging
thd->set_time(); // time the query
- ev->when = time(NULL);
+ if(!ev->when)
+ ev->when = time(NULL);
switch(type_code) {
case QUERY_EVENT: