diff options
author | guilhem@mysql.com <> | 2004-01-18 17:51:20 +0100 |
---|---|---|
committer | guilhem@mysql.com <> | 2004-01-18 17:51:20 +0100 |
commit | 56e8554aac6528f3bec4d8d866faa9728acdb90a (patch) | |
tree | d58180863bf683595c4abbe5ab5d27624b69bbbe | |
parent | ce3ee36d1ecf9dac9aeaf4c155152f678e78a8da (diff) | |
download | mariadb-git-56e8554aac6528f3bec4d8d866faa9728acdb90a.tar.gz |
BUG#2428 "--old-rpl-compat is broken":
I remove the --old-rpl-compat which produces broken binlogs readable
neither by 4.0 nor by 3.23.
This option is a leftover of the early replication of 4.0.0, when
it was still partly compatible with 3.23.
I explained this to the user in the bug report.
-rw-r--r-- | sql/mysqld.cc | 7 | ||||
-rw-r--r-- | sql/sql_load.cc | 36 | ||||
-rw-r--r-- | sql/sql_repl.h | 2 |
3 files changed, 14 insertions, 31 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 28cf466f5b3..b2b53e571c3 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -306,7 +306,6 @@ char* log_error_file_ptr= log_error_file; static pthread_t select_thread; static my_bool opt_noacl=0, opt_bootstrap=0, opt_myisam_log=0; my_bool opt_safe_user_create = 0, opt_no_mix_types = 0; -my_bool opt_old_rpl_compat; my_bool opt_show_slave_auth_info, opt_sql_bin_update = 0; my_bool opt_log_slave_updates= 0, opt_console= 0; my_bool opt_readonly = 0; @@ -3198,7 +3197,7 @@ enum options_mysqld { OPT_HAVE_NAMED_PIPE, OPT_DO_PSTACK, OPT_REPORT_HOST, OPT_REPORT_USER, OPT_REPORT_PASSWORD, OPT_REPORT_PORT, - OPT_SHOW_SLAVE_AUTH_INFO, OPT_OLD_RPL_COMPAT, + OPT_SHOW_SLAVE_AUTH_INFO, OPT_SLAVE_LOAD_TMPDIR, OPT_NO_MIX_TYPE, OPT_RPL_RECOVERY_RANK,OPT_INIT_RPL_ROLE, OPT_RELAY_LOG, OPT_RELAY_LOG_INDEX, OPT_RELAY_LOG_INFO_FILE, @@ -3544,10 +3543,6 @@ Does nothing yet.", {"old-protocol", 'o', "Use the old (3.20) protocol client/server protocol", (gptr*) &protocol_version, (gptr*) &protocol_version, 0, GET_UINT, NO_ARG, PROTOCOL_VERSION, 0, 0, 0, 0, 0}, - {"old-rpl-compat", OPT_OLD_RPL_COMPAT, - "Use old LOAD DATA format in the binary log (don't save data in file)", - (gptr*) &opt_old_rpl_compat, (gptr*) &opt_old_rpl_compat, 0, GET_BOOL, - NO_ARG, 0, 0, 0, 0, 0, 0}, #ifdef ONE_THREAD {"one-thread", OPT_ONE_THREAD, "Only use one thread (for debugging under Linux)", 0, 0, 0, GET_NO_ARG, diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 7c3e7b8e877..93dfcd84caf 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -220,7 +220,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, DBUG_RETURN(-1); // Can't allocate buffers } - if (!opt_old_rpl_compat && mysql_bin_log.is_open()) + if (mysql_bin_log.is_open()) { lf_info.thd = thd; lf_info.ex = ex; @@ -287,7 +287,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, { if (transactional_table) ha_autocommit_or_rollback(thd,error); - if (!opt_old_rpl_compat && mysql_bin_log.is_open()) + if (mysql_bin_log.is_open()) { /* Make sure last block (the one which caused the error) gets logged. @@ -332,28 +332,16 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, thd->options|=OPTION_STATUS_NO_TRANS_UPDATE; if (mysql_bin_log.is_open()) { - if (opt_old_rpl_compat) - { - if (!read_file_from_client) - { - Load_log_event qinfo(thd, ex, db, table->table_name, fields, - handle_duplicates, log_delayed); - mysql_bin_log.write(&qinfo); - } - } - else + /* + As already explained above, we need to call end_io_cache() or the last + block will be logged only after Execute_load_log_event (which is wrong), + when read_info is destroyed. + */ + read_info.end_io_cache(); + if (lf_info.wrote_create_file) { - /* - As already explained above, we need to call end_io_cache() or the last - block will be logged only after Execute_load_log_event (which is wrong), - when read_info is destroyed. - */ - read_info.end_io_cache(); - if (lf_info.wrote_create_file) - { - Execute_load_log_event e(thd, db, log_delayed); - mysql_bin_log.write(&e); - } + Execute_load_log_event e(thd, db, log_delayed); + mysql_bin_log.write(&e); } } if (transactional_table) @@ -644,7 +632,7 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, String &field_term, cache.read_function = _my_b_net_read; need_end_io_cache = 1; - if (!opt_old_rpl_compat && mysql_bin_log.is_open()) + if (mysql_bin_log.is_open()) cache.pre_read = cache.pre_close = (IO_CACHE_CALLBACK) log_loaded_block; } diff --git a/sql/sql_repl.h b/sql/sql_repl.h index c73744c4b7c..570c41c98f7 100644 --- a/sql/sql_repl.h +++ b/sql/sql_repl.h @@ -11,7 +11,7 @@ typedef struct st_slave_info THD* thd; } SLAVE_INFO; -extern my_bool opt_show_slave_auth_info, opt_old_rpl_compat; +extern my_bool opt_show_slave_auth_info; extern char *master_host, *master_info_file; extern bool server_id_supplied; extern I_List<i_string> binlog_do_db, binlog_ignore_db; |