From fac4b3ff11121aa38a11f48195567d382101d5b8 Mon Sep 17 00:00:00 2001 From: MassimilianoPinto Date: Tue, 15 Sep 2015 19:10:23 +0200 Subject: [PATCH] Fix for MariaDB 10 Fix for MariaDB 10 --- server/modules/routing/binlog/blr_master.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/modules/routing/binlog/blr_master.c b/server/modules/routing/binlog/blr_master.c index d4d5139ae..20221b0ce 100644 --- a/server/modules/routing/binlog/blr_master.c +++ b/server/modules/routing/binlog/blr_master.c @@ -1825,6 +1825,7 @@ uint8_t hdbuf[19]; uint8_t *data; GWBUF *result; int n; +int event_limit; /* Get current binnlog position */ end_pos = router->current_pos; @@ -1889,8 +1890,9 @@ int n; hdr->next_pos = EXTRACT32(&hdbuf[13]); hdr->flags = EXTRACT16(&hdbuf[17]); - /* Add MariaDB 10 checks */ - if (hdr->event_type > MAX_EVENT_TYPE) + event_limit = router->mariadb10_compat ? MAX_EVENT_TYPE_MARIADB10 : MAX_EVENT_TYPE; + + if (hdr->event_type > event_limit) { LOGIF(LE, (skygw_log_write(LOGFILE_ERROR, "Error: Reading saved events: invalid event type 0x%x. "