Commit 924a9708 authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-4.0

into mysql.com:/home/dlenev/src/mysql-4.0-bg-1086

parents de5d47c3 e3541b8a
......@@ -85,15 +85,15 @@ slave-bin.001 263 Query 1 263 use test; drop table t1
slave-bin.001 311 Query 1 311 use test; create table t1 (word char(20) not null)
slave-bin.001 386 Create_file 1 386 db=test;table=t1;file_id=1;block_len=581
slave-bin.001 1065 Exec_load 1 1056 ;file_id=1
slave-bin.001 1088 Query 1 1079 use test; drop table t1
slave-bin.001 1136 Query 1 4 use test; create table t5 (a int)
slave-bin.001 1194 Query 1 62 use test; drop table t5
slave-bin.001 1088 Query 1 1088 use test; drop table t1
slave-bin.001 1136 Query 1 1136 use test; create table t5 (a int)
slave-bin.001 1194 Query 1 1194 use test; drop table t5
slave-bin.001 1242 Rotate 2 1242 slave-bin.002;pos=4
show binlog events in 'slave-bin.002' from 4;
Log_name Pos Event_type Server_id Orig_log_pos Info
slave-bin.002 4 Query 1 110 use test; create table t1 (n int)
slave-bin.002 62 Query 1 168 use test; insert into t1 values (1)
slave-bin.002 122 Query 1 228 use test; drop table t1
slave-bin.002 4 Query 1 4 use test; create table t1 (n int)
slave-bin.002 62 Query 1 62 use test; insert into t1 values (1)
slave-bin.002 122 Query 1 122 use test; drop table t1
show slave status;
Master_Host Master_User Master_Port Connect_retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.002 276 slave-relay-bin.003 211 master-bin.002 Yes Yes 0 0 276 211
......
......@@ -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)));
}
......
......@@ -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)
{
......
......@@ -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;
......
......@@ -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;
......
......@@ -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
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment