diff options
author | Alexander Nozdrin <alik@sun.com> | 2009-12-11 12:39:38 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2009-12-11 12:39:38 +0300 |
commit | 69cfd5c8ecd20bca0e651efcbb8b5affc24c1af4 (patch) | |
tree | 965519a5b0af3f33624c7e16fd61b58d15f42372 /sql/rpl_rli.cc | |
parent | 713ed2d2438dd0e5aecf8ea5138d0ca97c3bc519 (diff) | |
parent | 2757eab5444982e9375f77d9bca52992f55cc565 (diff) | |
download | mariadb-git-69cfd5c8ecd20bca0e651efcbb8b5affc24c1af4.tar.gz |
Manual merge from mysql-trunk.
Conflicts:
- client/mysqltest.cc
- mysql-test/collections/default.experimental
- mysql-test/suite/rpl/t/disabled.def
- sql/mysqld.cc
- sql/opt_range.cc
- sql/sp.cc
- sql/sql_acl.cc
- sql/sql_partition.cc
- sql/sql_table.cc
Diffstat (limited to 'sql/rpl_rli.cc')
-rw-r--r-- | sql/rpl_rli.cc | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc index a26717d7acf..a1403d2ff71 100644 --- a/sql/rpl_rli.cc +++ b/sql/rpl_rli.cc @@ -28,12 +28,13 @@ int init_intvar_from_file(int* var, IO_CACHE* f, int default_val); int init_strvar_from_file(char *var, int max_size, IO_CACHE *f, const char *default_val); - -Relay_log_info::Relay_log_info() +Relay_log_info::Relay_log_info(bool is_slave_recovery) :Slave_reporting_capability("SQL"), no_storage(FALSE), replicate_same_server_id(::replicate_same_server_id), - info_fd(-1), cur_log_fd(-1), save_temporary_tables(0), - cur_log_old_open_count(0), group_relay_log_pos(0), event_relay_log_pos(0), + info_fd(-1), cur_log_fd(-1), relay_log(&sync_relaylog_period), + sync_counter(0), is_relay_log_recovery(is_slave_recovery), + save_temporary_tables(0), cur_log_old_open_count(0), group_relay_log_pos(0), + event_relay_log_pos(0), #if HAVE_purify is_fake(FALSE), #endif @@ -207,7 +208,7 @@ a file name for --relay-log-index option", opt_relaylog_index_name); { sql_print_error("Failed to create a new relay log info file (\ file '%s', errno %d)", fname, my_errno); - msg= current_thd->main_da.message(); + msg= current_thd->stmt_da->message(); goto err; } if (init_io_cache(&rli->info_file, info_fd, IO_SIZE*2, READ_CACHE, 0L,0, @@ -215,7 +216,7 @@ file '%s', errno %d)", fname, my_errno); { sql_print_error("Failed to create a cache on relay log info file '%s'", fname); - msg= current_thd->main_da.message(); + msg= current_thd->stmt_da->message(); goto err; } @@ -282,6 +283,9 @@ Failed to open the existing relay log info file '%s' (errno %d)", rli->group_relay_log_pos= rli->event_relay_log_pos= relay_log_pos; rli->group_master_log_pos= master_log_pos; + if (rli->is_relay_log_recovery && init_recovery(rli->mi, &msg)) + goto err; + if (init_relay_log_pos(rli, rli->group_relay_log_name, rli->group_relay_log_pos, @@ -313,7 +317,10 @@ Failed to open the existing relay log info file '%s' (errno %d)", */ reinit_io_cache(&rli->info_file, WRITE_CACHE,0L,0,1); if ((error= flush_relay_log_info(rli))) - sql_print_error("Failed to flush relay log info file"); + { + msg= "Failed to flush relay log info file"; + goto err; + } if (count_relay_log_space(rli)) { msg="Error counting relay log space"; @@ -1212,7 +1219,6 @@ void Relay_log_info::cleanup_context(THD *thd, bool error) */ thd->options&= ~OPTION_NO_FOREIGN_KEY_CHECKS; thd->options&= ~OPTION_RELAXED_UNIQUE_CHECKS; - last_event_start_time= 0; DBUG_VOID_RETURN; } |