Method: Flydata::SourceMysql::PluginSupport::DropTableQueryHandler#process

Defined in:
lib/flydata/source_mysql/plugin_support/drop_table_query_handler.rb

#process(record) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/flydata/source_mysql/plugin_support/drop_table_query_handler.rb', line 18

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