mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 10:57:54 +02:00
Merge mysql.com:/home/bk/MERGE/mysql-4.1-merge
into mysql.com:/home/bk/MERGE/mysql-5.0-merge BitKeeper/triggers/post-commit: Auto merged mysql-test/t/func_gconcat.test: Auto merged sql/item_sum.cc: Auto merged sql/sql_repl.cc: Auto merged sql/log_event.h: Manual merge sql/slave.cc: Manual merge
This commit is contained in:
commit
1613ad2c98
8 changed files with 109 additions and 8 deletions
21
sql/slave.cc
21
sql/slave.cc
|
|
@ -2895,6 +2895,13 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
|
|||
SYSTEM_THREAD_SLAVE_SQL : SYSTEM_THREAD_SLAVE_IO;
|
||||
thd->security_ctx->skip_grants();
|
||||
my_net_init(&thd->net, 0);
|
||||
/*
|
||||
Adding MAX_LOG_EVENT_HEADER_LEN to the max_allowed_packet on all
|
||||
slave threads, since a replication event can become this much larger
|
||||
than the corresponding packet (query) sent from client to master.
|
||||
*/
|
||||
thd->variables.max_allowed_packet= global_system_variables.max_allowed_packet
|
||||
+ MAX_LOG_EVENT_HEADER; /* note, incr over the global not session var */
|
||||
thd->net.read_timeout = slave_net_timeout;
|
||||
thd->slave_thread = 1;
|
||||
set_slave_thread_options(thd);
|
||||
|
|
@ -3483,11 +3490,19 @@ slave_begin:
|
|||
thd->proc_info = "Connecting to master";
|
||||
// we can get killed during safe_connect
|
||||
if (!safe_connect(thd, mysql, mi))
|
||||
{
|
||||
sql_print_information("Slave I/O thread: connected to master '%s@%s:%d',\
|
||||
replication started in log '%s' at position %s", mi->user,
|
||||
mi->host, mi->port,
|
||||
IO_RPL_LOG_NAME,
|
||||
llstr(mi->master_log_pos,llbuff));
|
||||
mi->host, mi->port,
|
||||
IO_RPL_LOG_NAME,
|
||||
llstr(mi->master_log_pos,llbuff));
|
||||
/*
|
||||
Adding MAX_LOG_EVENT_HEADER_LEN to the max_packet_size on the I/O
|
||||
thread, since a replication event can become this much larger than
|
||||
the corresponding packet (query) sent from client to master.
|
||||
*/
|
||||
mysql->net.max_packet_size= thd->net.max_packet_size+= MAX_LOG_EVENT_HEADER;
|
||||
}
|
||||
else
|
||||
{
|
||||
sql_print_information("Slave I/O thread killed while connecting to master");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue