Commit 56e8554a authored by guilhem@mysql.com's avatar guilhem@mysql.com

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. 
parent ce3ee36d
......@@ -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,
......
......@@ -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;
}
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment