Class: Mysql::DropDatabaseQueryHandler

Inherits:
DatabaseDdlQueryHandler show all
Defined in:
lib/flydata/fluent-plugins/mysql/drop_database_query_handler.rb

Constant Summary collapse

PATTERN =

For MySQL, database and schema are exchangable

/^DROP DATABASE|SCHEMA/i

Constants inherited from DdlQueryHandler

Mysql::DdlQueryHandler::DDL_TABLE_QUERY

Constants inherited from BinlogRecordHandler

BinlogRecordHandler::RESPECT_ORDER, BinlogRecordHandler::SEQ, BinlogRecordHandler::SRC_POS, BinlogRecordHandler::TABLE_NAME, BinlogRecordHandler::TABLE_REV, BinlogRecordHandler::TYPE, BinlogRecordHandler::V

Instance Method Summary collapse

Methods inherited from DatabaseDdlQueryHandler

#emit_record

Methods inherited from DdlQueryHandler

#acceptable_db?, #table_info

Constructor Details

#initialize(context) ⇒ DropDatabaseQueryHandler

Returns a new instance of DropDatabaseQueryHandler.



8
9
10
# File 'lib/flydata/fluent-plugins/mysql/drop_database_query_handler.rb', line 8

def initialize(context)
  super
end

Instance Method Details

#patternObject



12
13
14
# File 'lib/flydata/fluent-plugins/mysql/drop_database_query_handler.rb', line 12

def pattern
  PATTERN
end

#process(record) ⇒ Object



16
17
18
19
# File 'lib/flydata/fluent-plugins/mysql/drop_database_query_handler.rb', line 16

def process(record)
  $log.warn("DROP DATABASE detected. A full re-sync is required to provide sync consistency")
  #NOTE: No emit_record here because this record should not be sent to data servers for now
end