require 'flydata/parser/parser_provider' require 'flydata/source_mysql/plugin_support/ddl_query_handler' module Flydata module SourceMysql module PluginSupport class UnsupportedQueryHandler < TableDdlQueryHandler PATTERN = /.*/ # Catch all ddl def initialize(context) super end def pattern PATTERN end def process(record) query = record['normalized_query'] if acceptable_db?(record) && should_log?(query) $log.info({ type: :unsupported_query, query: query.to_s.strip}.to_s + " at \"#{binlog_pos(record)}\"") end end def should_log?(query) return false if query.to_s.empty? @context.tables.any?{|tbl| query.include?(tbl)} end end end end end