require 'flydata/command/sync' require 'flydata/command/mysql_command_base' module Flydata module Command class Mysqlbinlog < Sync include MysqlCommandBase def generate_command(dbconf, args) dbconf.delete('tables') dbconf[:custom_option_end] = args.join(' ') dbconf[:command] = 'mysqlbinlog' # --default-character-set=utf8 is not supported dbconf[:no_default_option] = true # ssl is not supported for mysql5.6 or older mysqlbinlog command dbconf.delete('ssl_ca') dbconf.delete('ssl_cipher') dbconf.delete('database') if args.empty? puts < mysql-bin-changelog.xxxxx EOT return end FlydataCore::Mysql::CommandGenerator::generate_mysql_cmd(dbconf) end end end end