mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint BitKeeper/etc/ignore: auto-union Makefile.am: Auto merged cmd-line-utils/readline/display.c: Auto merged configure.in: Auto merged extra/yassl/include/buffer.hpp: Auto merged extra/yassl/include/crypto_wrapper.hpp: Auto merged extra/yassl/include/yassl_imp.hpp: Auto merged extra/yassl/include/yassl_int.hpp: Auto merged extra/yassl/src/crypto_wrapper.cpp: Auto merged extra/yassl/taocrypt/include/algebra.hpp: Auto merged extra/yassl/taocrypt/include/des.hpp: Auto merged extra/yassl/taocrypt/include/hash.hpp: Auto merged extra/yassl/taocrypt/include/hmac.hpp: Auto merged extra/yassl/taocrypt/include/modarith.hpp: Auto merged extra/yassl/taocrypt/include/modes.hpp: Auto merged extra/yassl/taocrypt/include/rsa.hpp: Auto merged extra/yassl/taocrypt/include/type_traits.hpp: Auto merged extra/yassl/taocrypt/mySTL/list.hpp: Auto merged extra/yassl/taocrypt/src/aes.cpp: Auto merged extra/yassl/taocrypt/src/algebra.cpp: Auto merged extra/yassl/taocrypt/src/asn.cpp: Auto merged extra/yassl/testsuite/testsuite.cpp: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/mysqltest.result: Auto merged mysql-test/t/mysqltest.test: Auto merged mysys/default.c: Auto merged sql/field.cc: Auto merged sql/item.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_sum.cc: Auto merged sql/mysql_priv.h: Auto merged sql/net_serv.cc: Auto merged sql/repl_failsafe.cc: Auto merged sql/set_var.cc: Auto merged sql/set_var.h: Auto merged sql/slave.cc: Auto merged sql/sql_parse.cc: Auto merged sql-common/client.c: Auto merged sql/sql_select.cc: Auto merged extra/yassl/taocrypt/test/test.cpp: Manual merge mysql-test/r/grant.result: Manual merge mysql-test/r/select.result: Manual merge mysql-test/t/grant.test: Manual merge mysql-test/t/select.test: Manual merge sql/field.h: Manual merge sql/mysqld.cc: Manual merge
This commit is contained in:
commit
8c6fe3587c
305 changed files with 6063 additions and 3946 deletions
26
sql/slave.cc
26
sql/slave.cc
|
|
@ -73,6 +73,7 @@ static int request_table_dump(MYSQL* mysql, const char* db, const char* table);
|
|||
static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db,
|
||||
const char* table_name, bool overwrite);
|
||||
static int get_master_version_and_clock(MYSQL* mysql, MASTER_INFO* mi);
|
||||
static Log_event* next_event(RELAY_LOG_INFO* rli);
|
||||
|
||||
/*
|
||||
Find out which replications threads are running
|
||||
|
|
@ -1326,12 +1327,12 @@ bool show_master_info(THD* thd, MASTER_INFO* mi)
|
|||
if ((mi->slave_running == MYSQL_SLAVE_RUN_CONNECT) &&
|
||||
mi->rli.slave_running)
|
||||
{
|
||||
long tmp= (long)((time_t)time((time_t*) 0)
|
||||
- mi->rli.last_master_timestamp)
|
||||
- mi->clock_diff_with_master;
|
||||
long time_diff= ((long)((time_t)time((time_t*) 0)
|
||||
- mi->rli.last_master_timestamp)
|
||||
- mi->clock_diff_with_master);
|
||||
/*
|
||||
Apparently on some systems tmp can be <0. Here are possible reasons
|
||||
related to MySQL:
|
||||
Apparently on some systems time_diff can be <0. Here are possible
|
||||
reasons related to MySQL:
|
||||
- the master is itself a slave of another master whose time is ahead.
|
||||
- somebody used an explicit SET TIMESTAMP on the master.
|
||||
Possible reason related to granularity-to-second of time functions
|
||||
|
|
@ -1349,8 +1350,8 @@ bool show_master_info(THD* thd, MASTER_INFO* mi)
|
|||
last_master_timestamp == 0 (an "impossible" timestamp 1970) is a
|
||||
special marker to say "consider we have caught up".
|
||||
*/
|
||||
protocol->store((longlong)(mi->rli.last_master_timestamp ? max(0, tmp)
|
||||
: 0));
|
||||
protocol->store((longlong)(mi->rli.last_master_timestamp ?
|
||||
max(0, time_diff) : 0));
|
||||
}
|
||||
else
|
||||
protocol->store_null();
|
||||
|
|
@ -2051,15 +2052,16 @@ after reconnect");
|
|||
|
||||
while (!io_slave_killed(thd,mi))
|
||||
{
|
||||
bool suppress_warnings= 0;
|
||||
ulong event_len;
|
||||
suppress_warnings= 0;
|
||||
/*
|
||||
We say "waiting" because read_event() will wait if there's nothing to
|
||||
read. But if there's something to read, it will not wait. The
|
||||
important thing is to not confuse users by saying "reading" whereas
|
||||
we're in fact receiving nothing.
|
||||
*/
|
||||
thd->proc_info = "Waiting for master to send event";
|
||||
ulong event_len = read_event(mysql, mi, &suppress_warnings);
|
||||
thd->proc_info= "Waiting for master to send event";
|
||||
event_len= read_event(mysql, mi, &suppress_warnings);
|
||||
if (io_slave_killed(thd,mi))
|
||||
{
|
||||
if (global_system_variables.log_warnings)
|
||||
|
|
@ -2860,6 +2862,8 @@ int queue_event(MASTER_INFO* mi,const char* buf, ulong event_len)
|
|||
pthread_mutex_t *log_lock= rli->relay_log.get_log_lock();
|
||||
DBUG_ENTER("queue_event");
|
||||
|
||||
LINT_INIT(inc_pos);
|
||||
|
||||
if (mi->rli.relay_log.description_event_for_queue->binlog_version<4 &&
|
||||
buf[EVENT_TYPE_OFFSET] != FORMAT_DESCRIPTION_EVENT /* a way to escape */)
|
||||
DBUG_RETURN(queue_old_event(mi,buf,event_len));
|
||||
|
|
@ -3001,7 +3005,7 @@ int queue_event(MASTER_INFO* mi,const char* buf, ulong event_len)
|
|||
|
||||
err:
|
||||
pthread_mutex_unlock(&mi->data_lock);
|
||||
DBUG_PRINT("info", ("error=%d", error));
|
||||
DBUG_PRINT("info", ("error: %d", error));
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue