From 1e2277aaafbcb8b3f1a6ed0c32f3254733e5bca4 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 3 Aug 2021 20:41:20 +0100 Subject: Add base handlers for gtid/xid events --- lib/eventHandlerBase.cpp | 2 ++ lib/eventHandlerBase.h | 2 ++ lib/eventHandlers.h | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/eventHandlerBase.cpp b/lib/eventHandlerBase.cpp index 25f0007..0d53c2f 100644 --- a/lib/eventHandlerBase.cpp +++ b/lib/eventHandlerBase.cpp @@ -7,4 +7,6 @@ namespace MyGrate { void EventHandlerBase::updateRow(MariaDB_Event_Ptr) { } void EventHandlerBase::deleteRow(MariaDB_Event_Ptr) { } void EventHandlerBase::rotate(MariaDB_Event_Ptr) { } + void EventHandlerBase::gtid(MariaDB_Event_Ptr) { } + void EventHandlerBase::xid(MariaDB_Event_Ptr) { } } diff --git a/lib/eventHandlerBase.h b/lib/eventHandlerBase.h index 07b0c5a..df7388c 100644 --- a/lib/eventHandlerBase.h +++ b/lib/eventHandlerBase.h @@ -14,6 +14,8 @@ namespace MyGrate { virtual void updateRow(MariaDB_Event_Ptr); virtual void deleteRow(MariaDB_Event_Ptr); virtual void rotate(MariaDB_Event_Ptr); + virtual void gtid(MariaDB_Event_Ptr); + virtual void xid(MariaDB_Event_Ptr); }; } diff --git a/lib/eventHandlers.h b/lib/eventHandlers.h index 0fb62ef..9d25fbb 100644 --- a/lib/eventHandlers.h +++ b/lib/eventHandlers.h @@ -30,7 +30,7 @@ namespace MyGrate { eh[RAND_EVENT] = {"RAND_EVENT", nullptr}; eh[USER_VAR_EVENT] = {"USER_VAR_EVENT", nullptr}; eh[FORMAT_DESCRIPTION_EVENT] = {"FORMAT_DESCRIPTION_EVENT", nullptr}; - eh[XID_EVENT] = {"XID_EVENT", nullptr}; + eh[XID_EVENT] = {"XID_EVENT", &MyGrate::EventHandlerBase::xid}; eh[BEGIN_LOAD_QUERY_EVENT] = {"BEGIN_LOAD_QUERY_EVENT", nullptr}; eh[EXECUTE_LOAD_QUERY_EVENT] = {"EXECUTE_LOAD_QUERY_EVENT", nullptr}; eh[TABLE_MAP_EVENT] = {"TABLE_MAP_EVENT", &MyGrate::EventHandlerBase::tableMap}; @@ -56,7 +56,7 @@ namespace MyGrate { eh[MARIA_EVENTS_BEGIN] = {"MARIA_EVENTS_BEGIN", nullptr}; eh[ANNOTATE_ROWS_EVENT] = {"ANNOTATE_ROWS_EVENT", nullptr}; eh[BINLOG_CHECKPOINT_EVENT] = {"BINLOG_CHECKPOINT_EVENT", nullptr}; - eh[GTID_EVENT] = {"GTID_EVENT", nullptr}; + eh[GTID_EVENT] = {"GTID_EVENT", &MyGrate::EventHandlerBase::gtid}; eh[GTID_LIST_EVENT] = {"GTID_LIST_EVENT", nullptr}; eh[START_ENCRYPTION_EVENT] = {"START_ENCRYPTION_EVENT", nullptr}; eh[QUERY_COMPRESSED_EVENT] = {"QUERY_COMPRESSED_EVENT", nullptr}; -- cgit v1.2.3