Sha256: e451799dcb1898bb80bcb3c1c5163e27d7d6732280e2677d15435b4e6824b1d4
Contents?: true
Size: 863 Bytes
Versions: 19
Compression:
Stored size: 863 Bytes
Contents
require 'flydata/source_mysql/plugin_support/ddl_query_handler' module Flydata module SourceMysql module PluginSupport class DropTableQueryHandler < TableDdlQueryHandler PATTERN = /^DROP TABLE/i def initialize(context) super end def pattern PATTERN end def process(record) if acceptable_db?(record) emit_record(:drop_table, record) do |opt| table_name = table_info(record)[:table_name] $log.info "type:drop_table table_name:'#{table_name}' query:'#{record["query"]}' binlog_pos:'#{binlog_pos(record)}'" opt[:increment_table_rev] = true # Set infinity to table binlog pos to ignore following events opt[:set_infinity_to_table_binlog_pos] = true { table_name: table_name, query: record["query"] } end end end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems