From d04bf78af08885e17ebaae7f198f93bbf06817e7 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 25 Jul 2021 12:46:14 +0100 Subject: Support the rotate event to move to the next binlog file --- lib/output/pq/updateDatabase.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/output/pq/updateDatabase.cpp') diff --git a/lib/output/pq/updateDatabase.cpp b/lib/output/pq/updateDatabase.cpp index c43d8e4..9db672d 100644 --- a/lib/output/pq/updateDatabase.cpp +++ b/lib/output/pq/updateDatabase.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -384,4 +385,13 @@ namespace MyGrate::Output::Pq { afterEvent(e); } } + + void + UpdateDatabase::rotate(MariaDB_Event_Ptr e) + { + if ((e->flags & LOG_EVENT_ARTIFICIAL_F) == 0) { + output::pq::sql::updateSourceRotate::execute( + this, *e->event.rotate.filename, e->event.rotate.position, source); + } + } } -- cgit v1.2.3