require 'flydata/source/parse_dump_and_send' require 'flydata-core/table_def/mysql_table_def' require 'flydata/source_mysql/parser/dump_parser' require 'flydata-core/mysql/binlog_pos' module Flydata module SourceMysql class ParseDumpAndSend < Source::ParseDumpAndSend def value_converters FlydataCore::TableDef::MysqlTableDef::VALUE_CONVERTERS end def parse_dump(dump_pos_info, dmpio, create_table_block, insert_record_block, check_point_source_pos_block) check_point_binlog_block = Proc.new { |source_table, last_pos, bytesize, binlog_hash, state, substate| source_pos = FlydataCore::Mysql::BinlogPos.new(binlog_hash) # SourcePos object is BinlogPos in SourceMysql check_point_source_pos_block.call(source_table, last_pos, bytesize, source_pos, state, substate) } Parser::MysqlDumpParser.new(dump_pos_info).parse(dmpio, create_table_block, insert_record_block, check_point_binlog_block) end end end end