diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/log_event.cc | 5 | ||||
-rw-r--r-- | sql/repl_failsafe.cc | 15 | ||||
-rw-r--r-- | sql/slave.cc | 1 | ||||
-rw-r--r-- | sql/sql_class.cc | 1 | ||||
-rw-r--r-- | sql/sql_class.h | 1 | ||||
-rw-r--r-- | sql/sql_parse.cc | 1 |
6 files changed, 18 insertions, 6 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 2a1669737f8..a4883599b2b 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -119,12 +119,11 @@ const char* Log_event::get_type_str() #ifndef MYSQL_CLIENT Log_event::Log_event(THD* thd_arg, uint16 flags_arg, bool using_trans) - :temp_buf(0), exec_time(0), cached_event_len(0), flags(flags_arg), - thd(thd_arg) + :log_pos(0), temp_buf(0), exec_time(0), cached_event_len(0), + flags(flags_arg), thd(thd_arg) { server_id = thd->server_id; when = thd->start_time; - log_pos = thd->log_pos; cache_stmt= (using_trans && (thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))); } diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 0a5f90617d1..dc3f3c87dde 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -249,6 +249,18 @@ static int find_target_pos(LEX_MASTER_INFO *mi, IO_CACHE *log, char *errmsg) /* Impossible */ } +/* + Before 4.0.15 we had a member of THD called log_pos, it was meant for + failsafe replication code in repl_failsafe.cc which is disabled until + it is reworked. Event's log_pos used to be preserved through + log-slave-updates to make code in repl_failsafe.cc work (this + function, SHOW NEW MASTER); but on the other side it caused unexpected + values in Exec_master_log_pos in A->B->C replication setup, + synchronization problems in master_pos_wait(), ... So we + (Dmitri & Guilhem) removed it. + + So for now this function is broken. +*/ int translate_master(THD* thd, LEX_MASTER_INFO* mi, char* errmsg) { @@ -414,6 +426,9 @@ static Slave_log_event* find_slave_event(IO_CACHE* log, return (Slave_log_event*)ev; } +/* + This function is broken now. See comment for translate_master(). + */ int show_new_master(THD* thd) { diff --git a/sql/slave.cc b/sql/slave.cc index 85a9bc0d49e..145144072c9 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2253,7 +2253,6 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli) if (!ev->when) ev->when = time(NULL); ev->thd = thd; - thd->log_pos = ev->log_pos; exec_res = ev->exec_event(rli); DBUG_ASSERT(rli->sql_thd==thd); delete ev; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 2a65291c273..132e0d7745f 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -125,7 +125,6 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0), where="field list"; server_id = ::server_id; slave_net = 0; - log_pos = 0; command=COM_CONNECT; set_query_id=1; db_access=NO_ACCESS; diff --git a/sql/sql_class.h b/sql/sql_class.h index c4511652b23..49a364856eb 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -472,7 +472,6 @@ public: */ ulong slave_proxy_id; NET* slave_net; // network connection from slave -> m. - my_off_t log_pos; /* Used by the sys_var class to store temporary values */ union diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 1d82ac6110b..1479a611b5a 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1458,6 +1458,7 @@ mysql_execute_command(void) { if (check_global_access(thd, REPL_SLAVE_ACL)) goto error; + /* This query don't work now. See comment in repl_failsafe.cc */ #ifndef WORKING_NEW_MASTER net_printf(&thd->net, ER_NOT_SUPPORTED_YET, "SHOW NEW MASTER"); res= 1; |