diff options
author | unknown <monty@mysql.com> | 2004-03-19 15:17:56 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-03-19 15:17:56 +0200 |
commit | 67ea8aac5e9e9ae98a22aff063c48053ea68e5de (patch) | |
tree | 788ab6bf4fc7ac236c7c862ab122f19dcdd83768 /sql/repl_failsafe.cc | |
parent | d212d76094f83b1b7ce0692663439f3a67a432ad (diff) | |
parent | 6b465557670093b038cb3d2be930e6a036292192 (diff) | |
download | mariadb-git-67ea8aac5e9e9ae98a22aff063c48053ea68e5de.tar.gz |
merge with 4.0 (to get compiler error fixes for innodb)
client/mysqltest.c:
Auto merged
include/errmsg.h:
Auto merged
include/mysql_version.h.in:
Auto merged
innobase/que/que0que.c:
Auto merged
mysql-test/t/rpl000009.test:
Auto merged
sql/set_var.cc:
Auto merged
libmysql/errmsg.c:
merge with 4.0
libmysql/libmysql.c:
merge with 4.0
mysql-test/mysql-test-run.sh:
merge with 4.0
mysql-test/r/rpl000009.result:
merge with 4.0
scripts/mysql_fix_privilege_tables.sh:
merge with 4.0
sql/repl_failsafe.cc:
merge with 4.0
Diffstat (limited to 'sql/repl_failsafe.cc')
-rw-r--r-- | sql/repl_failsafe.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 6cd07e16647..78e4e3386b2 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -895,7 +895,7 @@ int load_master_data(THD* thd) cleanup_mysql_results(db_res, cur_table_res - 1, table_res); - // adjust position in the master + // adjust replication coordinates from the master if (master_status_res) { MYSQL_ROW row = mysql_fetch_row(master_status_res); @@ -908,10 +908,18 @@ int load_master_data(THD* thd) */ if (row && row[0] && row[1]) { + /* + If the slave's master info is not inited, we init it, then we write + the new coordinates to it. Must call init_master_info() *before* + setting active_mi, because init_master_info() sets active_mi with + defaults. + */ + if (init_master_info(active_mi, master_info_file, relay_log_info_file, 0)) + send_error(&thd->net, ER_MASTER_INFO); strmake(active_mi->master_log_name, row[0], sizeof(active_mi->master_log_name)); active_mi->master_log_pos = strtoull(row[1], (char**) 0, 10); - /* don't hit the magic number */ + /* at least in recent versions, the condition below should be false */ if (active_mi->master_log_pos < BIN_LOG_HEADER_SIZE) active_mi->master_log_pos = BIN_LOG_HEADER_SIZE; /* |