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; ...@@ -306,7 +306,6 @@ char* log_error_file_ptr= log_error_file;
static pthread_t select_thread; static pthread_t select_thread;
static my_bool opt_noacl=0, opt_bootstrap=0, opt_myisam_log=0; 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_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_show_slave_auth_info, opt_sql_bin_update = 0;
my_bool opt_log_slave_updates= 0, opt_console= 0; my_bool opt_log_slave_updates= 0, opt_console= 0;
my_bool opt_readonly = 0; my_bool opt_readonly = 0;
...@@ -3198,7 +3197,7 @@ enum options_mysqld { ...@@ -3198,7 +3197,7 @@ enum options_mysqld {
OPT_HAVE_NAMED_PIPE, OPT_HAVE_NAMED_PIPE,
OPT_DO_PSTACK, OPT_REPORT_HOST, OPT_DO_PSTACK, OPT_REPORT_HOST,
OPT_REPORT_USER, OPT_REPORT_PASSWORD, OPT_REPORT_PORT, 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_SLAVE_LOAD_TMPDIR, OPT_NO_MIX_TYPE,
OPT_RPL_RECOVERY_RANK,OPT_INIT_RPL_ROLE, OPT_RPL_RECOVERY_RANK,OPT_INIT_RPL_ROLE,
OPT_RELAY_LOG, OPT_RELAY_LOG_INDEX, OPT_RELAY_LOG_INFO_FILE, OPT_RELAY_LOG, OPT_RELAY_LOG_INDEX, OPT_RELAY_LOG_INFO_FILE,
...@@ -3544,10 +3543,6 @@ Does nothing yet.", ...@@ -3544,10 +3543,6 @@ Does nothing yet.",
{"old-protocol", 'o', "Use the old (3.20) protocol client/server protocol", {"old-protocol", 'o', "Use the old (3.20) protocol client/server protocol",
(gptr*) &protocol_version, (gptr*) &protocol_version, 0, GET_UINT, NO_ARG, (gptr*) &protocol_version, (gptr*) &protocol_version, 0, GET_UINT, NO_ARG,
PROTOCOL_VERSION, 0, 0, 0, 0, 0}, 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 #ifdef ONE_THREAD
{"one-thread", OPT_ONE_THREAD, {"one-thread", OPT_ONE_THREAD,
"Only use one thread (for debugging under Linux)", 0, 0, 0, GET_NO_ARG, "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, ...@@ -220,7 +220,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
DBUG_RETURN(-1); // Can't allocate buffers 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.thd = thd;
lf_info.ex = ex; lf_info.ex = ex;
...@@ -287,7 +287,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, ...@@ -287,7 +287,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
{ {
if (transactional_table) if (transactional_table)
ha_autocommit_or_rollback(thd,error); 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. Make sure last block (the one which caused the error) gets logged.
...@@ -331,17 +331,6 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, ...@@ -331,17 +331,6 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
if (!log_delayed) if (!log_delayed)
thd->options|=OPTION_STATUS_NO_TRANS_UPDATE; thd->options|=OPTION_STATUS_NO_TRANS_UPDATE;
if (mysql_bin_log.is_open()) 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 As already explained above, we need to call end_io_cache() or the last
...@@ -355,7 +344,6 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, ...@@ -355,7 +344,6 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
mysql_bin_log.write(&e); mysql_bin_log.write(&e);
} }
} }
}
if (transactional_table) if (transactional_table)
error=ha_autocommit_or_rollback(thd,error); error=ha_autocommit_or_rollback(thd,error);
query_cache_invalidate3(thd, table_list, 0); query_cache_invalidate3(thd, table_list, 0);
...@@ -644,7 +632,7 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, String &field_term, ...@@ -644,7 +632,7 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, String &field_term,
cache.read_function = _my_b_net_read; cache.read_function = _my_b_net_read;
need_end_io_cache = 1; 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 = cache.pre_read = cache.pre_close =
(IO_CACHE_CALLBACK) log_loaded_block; (IO_CACHE_CALLBACK) log_loaded_block;
} }
......
...@@ -11,7 +11,7 @@ typedef struct st_slave_info ...@@ -11,7 +11,7 @@ typedef struct st_slave_info
THD* thd; THD* thd;
} SLAVE_INFO; } 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 char *master_host, *master_info_file;
extern bool server_id_supplied; extern bool server_id_supplied;
extern I_List<i_string> binlog_do_db, binlog_ignore_db; 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