Sha256: 8c1782f0eaf5de2a12abaa16cf5a50ed5d013ef76bbfd61428922be88591c873
Contents?: true
Size: 902 Bytes
Versions: 37
Compression:
Stored size: 902 Bytes
Contents
require 'flydata/source_mysql/plugin_support/ddl_query_handler' module Flydata module SourceMysql module PluginSupport class DropDatabaseQueryHandler < DatabaseDdlQueryHandler # For MySQL, database and schema are exchangable PATTERN = /^DROP (DATABASE|SCHEMA)/i def initialize(context) super end def pattern PATTERN end def process(record) #Issuing warning message only for the current database. if acceptable_db?(record) #record["db_name"] == @context.database $log.error("DROP DATABASE detected. A full re-sync is required to provide sync consistency. - db_name:'#{record["db_name"]}' query:'#{record["query"]}' normalized query:'#{record['normalized_query']}' binlog_pos:'#{binlog_pos(record)}'") end #NOTE: No emit_record here because this record should not be sent to data servers for now end end end end end
Version data entries
37 entries across 37 versions & 1 rubygems