summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/log.cc b/sql/log.cc
index d3bb44b3083..9d9f500fe80 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1560,6 +1560,7 @@ void MYSQL_LOG::start_union_events(THD *thd)
thd->binlog_evt_union.do_union= TRUE;
thd->binlog_evt_union.unioned_events= FALSE;
thd->binlog_evt_union.unioned_events_trans= FALSE;
+ thd->binlog_evt_union.first_query_id= thd->query_id;
}
void MYSQL_LOG::stop_union_events(THD *thd)
@@ -1568,6 +1569,12 @@ void MYSQL_LOG::stop_union_events(THD *thd)
thd->binlog_evt_union.do_union= FALSE;
}
+bool MYSQL_LOG::is_query_in_union(THD *thd, query_id_t query_id_param)
+{
+ return (thd->binlog_evt_union.do_union &&
+ query_id_param >= thd->binlog_evt_union.first_query_id);
+}
+
/*
Write an event to the binary log
*/