diff options
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 175791ef31e..45b76e44f28 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -237,7 +237,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, } #ifndef EMBEDDED_LIBRARY - if (!opt_old_rpl_compat && mysql_bin_log.is_open()) + if (mysql_bin_log.is_open()) { lf_info.thd = thd; lf_info.ex = ex; @@ -313,7 +313,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, if (transactional_table) ha_autocommit_or_rollback(thd,error); #ifndef EMBEDDED_LIBRARY - 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. @@ -360,28 +360,16 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, #ifndef EMBEDDED_LIBRARY 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); } } #endif /*!EMBEDDED_LIBRARY*/ @@ -698,7 +686,7 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs, if (get_it_from_net) cache.read_function = _my_b_net_read; - 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; #endif |