Sha256: ae8691d5a8a220d3cf52ce365973c6dde89c0a23a5836b2758192cdb39cf9423
Contents?: true
Size: 532 Bytes
Versions: 38
Compression:
Stored size: 532 Bytes
Contents
require_relative 'binlog_query_handler' module Mysql class DdlQueryHandler < BinlogQueryHandler DDL_TABLE_QUERY = /^(?:(?:ALTER|CREATE|DROP|RENAME) +(?:\w+ +)*TABLE +([^ ]+)|TRUNCATE +(?:TABLE +)?([^ ]+))/i def acceptable_db?(record) db_name = record["db_name"] if DDL_TABLE_QUERY =~ record["query"] table_name_in_query = $1 ? $1 : $2 if (idx = table_name_in_query.index(".")) db_name = table_name_in_query[0...idx].tr("`", "") end end supported_database == db_name end end end
Version data entries
38 entries across 38 versions & 1 rubygems