diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2004-11-26 13:44:49 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2004-11-26 13:44:49 +0000 |
commit | 42af43e37542d27b8b53677174642c4d4326778e (patch) | |
tree | c7ac4c11ee0cfec1ed32d3fecc46d396019403e3 /sql | |
parent | 8d97c013664e878490f65f0158fb978a24451e60 (diff) | |
parent | b0d586e5648e78981c63e68059c6c836a228a082 (diff) | |
download | mariadb-git-42af43e37542d27b8b53677174642c4d4326778e.tar.gz |
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
BitKeeper/etc/logging_ok:
auto-union
innobase/buf/buf0buf.c:
Auto merged
innobase/buf/buf0lru.c:
Auto merged
innobase/row/row0mysql.c:
Auto merged
innobase/row/row0sel.c:
Auto merged
ndb/src/mgmsrv/main.cpp:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/repl_failsafe.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/slave.h:
Auto merged
sql/sql_repl.cc:
Auto merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_innodb.cc | 3 | ||||
-rw-r--r-- | sql/repl_failsafe.cc | 4 | ||||
-rw-r--r-- | sql/slave.cc | 14 | ||||
-rw-r--r-- | sql/slave.h | 3 | ||||
-rw-r--r-- | sql/sql_repl.cc | 6 |
5 files changed, 22 insertions, 8 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 091b2f46e06..c7384857d79 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -410,6 +410,9 @@ convert_error_code_to_mysql( } else if (error == (int) DB_NO_SAVEPOINT) { return(HA_ERR_NO_SAVEPOINT); + } else if (error == (int) DB_LOCK_TABLE_FULL) { + + return(HA_ERR_LOCK_TABLE_FULL); } else { return(-1); // Unknown error } diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 5f67143065b..f759be59ffb 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -917,8 +917,8 @@ bool load_master_data(THD* thd) */ int error; - if (init_master_info(active_mi, master_info_file, relay_log_info_file, - 0)) + if (init_master_info(active_mi, master_info_file, relay_log_info_file, + 0, (SLAVE_IO | SLAVE_SQL))) my_message(ER_MASTER_INFO, ER(ER_MASTER_INFO), MYF(0)); strmake(active_mi->master_log_name, row[0], sizeof(active_mi->master_log_name)); diff --git a/sql/slave.cc b/sql/slave.cc index 04ab4830312..dbe58275b9c 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -160,7 +160,7 @@ int init_slave() } if (init_master_info(active_mi,master_info_file,relay_log_info_file, - !master_host)) + !master_host, (SLAVE_IO | SLAVE_SQL))) { sql_print_error("Failed to initialize the master info structure"); goto err; @@ -1981,7 +1981,8 @@ void clear_until_condition(RELAY_LOG_INFO* rli) int init_master_info(MASTER_INFO* mi, const char* master_info_fname, const char* slave_info_fname, - bool abort_if_no_master_info_file) + bool abort_if_no_master_info_file, + int thread_mask) { int fd,error; char fname[FN_REFLEN+128]; @@ -1995,8 +1996,15 @@ int init_master_info(MASTER_INFO* mi, const char* master_info_fname, last time. If this case pos_in_file would be set and we would get a crash when trying to read the signature for the binary relay log. + + We only rewind the read position if we are starting the SQL + thread. The handle_slave_sql thread assumes that the read + position is at the beginning of the file, and will read the + "signature" and then fast-forward to the last position read. */ - my_b_seek(mi->rli.cur_log, (my_off_t) 0); + if (thread_mask & SLAVE_SQL) { + my_b_seek(mi->rli.cur_log, (my_off_t) 0); + } DBUG_RETURN(0); } diff --git a/sql/slave.h b/sql/slave.h index e73c81a1e6f..1abe166c944 100644 --- a/sql/slave.h +++ b/sql/slave.h @@ -520,7 +520,8 @@ void clear_until_condition(RELAY_LOG_INFO* rli); void clear_slave_error_timestamp(RELAY_LOG_INFO* rli); int init_master_info(MASTER_INFO* mi, const char* master_info_fname, const char* slave_info_fname, - bool abort_if_no_master_info_file); + bool abort_if_no_master_info_file, + int thread_mask); void end_master_info(MASTER_INFO* mi); int init_relay_log_info(RELAY_LOG_INFO* rli, const char* info_fname); void end_relay_log_info(RELAY_LOG_INFO* rli); diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index d2e3e72618d..0d1a7f3890d 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -779,7 +779,8 @@ int start_slave(THD* thd , MASTER_INFO* mi, bool net_report) thread_mask&= thd->lex->slave_thd_opt; if (thread_mask) //some threads are stopped, start them { - if (init_master_info(mi,master_info_file,relay_log_info_file, 0)) + if (init_master_info(mi,master_info_file,relay_log_info_file, 0, + thread_mask)) slave_errno=ER_MASTER_INFO; else if (server_id_supplied && *mi->host) { @@ -1074,7 +1075,8 @@ bool change_master(THD* thd, MASTER_INFO* mi) thd->proc_info = "Changing master"; LEX_MASTER_INFO* lex_mi= &thd->lex->mi; // TODO: see if needs re-write - if (init_master_info(mi, master_info_file, relay_log_info_file, 0)) + if (init_master_info(mi, master_info_file, relay_log_info_file, 0, + thread_mask)) { my_message(ER_MASTER_INFO, ER(ER_MASTER_INFO), MYF(0)); unlock_slave_threads(mi); |