mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.11 into 11.0
This commit is contained in:
32
sql/slave.cc
32
sql/slave.cc
@@ -857,7 +857,7 @@ static void make_slave_transaction_retry_errors_printable(void)
|
||||
}
|
||||
|
||||
|
||||
#define DEFAULT_SLAVE_RETRY_ERRORS 9
|
||||
static constexpr uint DEFAULT_SLAVE_RETRY_ERRORS= 10;
|
||||
|
||||
bool init_slave_transaction_retry_errors(const char* arg)
|
||||
{
|
||||
@@ -899,9 +899,10 @@ bool init_slave_transaction_retry_errors(const char* arg)
|
||||
slave_transaction_retry_errors[3]= ER_NET_WRITE_INTERRUPTED;
|
||||
slave_transaction_retry_errors[4]= ER_LOCK_WAIT_TIMEOUT;
|
||||
slave_transaction_retry_errors[5]= ER_LOCK_DEADLOCK;
|
||||
slave_transaction_retry_errors[6]= ER_CONNECT_TO_FOREIGN_DATA_SOURCE;
|
||||
slave_transaction_retry_errors[7]= 2013; /* CR_SERVER_LOST */
|
||||
slave_transaction_retry_errors[8]= 12701; /* ER_SPIDER_REMOTE_SERVER_GONE_AWAY_NUM */
|
||||
slave_transaction_retry_errors[6]= ER_CHECKREAD;
|
||||
slave_transaction_retry_errors[7]= ER_CONNECT_TO_FOREIGN_DATA_SOURCE;
|
||||
slave_transaction_retry_errors[8]= 2013; /* CR_SERVER_LOST */
|
||||
slave_transaction_retry_errors[9]= 12701; /* ER_SPIDER_REMOTE_SERVER_GONE_AWAY_NUM */
|
||||
|
||||
/* Add user codes after this */
|
||||
for (p= arg, i= DEFAULT_SLAVE_RETRY_ERRORS; *p; )
|
||||
@@ -1339,6 +1340,8 @@ static bool io_slave_killed(Master_info* mi)
|
||||
DBUG_ENTER("io_slave_killed");
|
||||
|
||||
DBUG_ASSERT(mi->slave_running); // tracking buffer overrun
|
||||
if (mi->abort_slave || mi->io_thd->killed)
|
||||
DBUG_PRINT("info", ("killed"));
|
||||
DBUG_RETURN(mi->abort_slave || mi->io_thd->killed);
|
||||
}
|
||||
|
||||
@@ -2936,9 +2939,6 @@ void show_master_info_get_fields(THD *thd, List<Item> *field_list,
|
||||
field_list->push_back(new (mem_root)
|
||||
Item_empty_string(thd, "Slave_SQL_Running", 3),
|
||||
mem_root);
|
||||
field_list->push_back(new (mem_root)
|
||||
Item_empty_string(thd, "Replicate_Rewrite_DB", 23),
|
||||
mem_root);
|
||||
field_list->push_back(new (mem_root)
|
||||
Item_empty_string(thd, "Replicate_Do_DB", 20),
|
||||
mem_root);
|
||||
@@ -3087,6 +3087,21 @@ void show_master_info_get_fields(THD *thd, List<Item> *field_list,
|
||||
Item_return_int(thd, "Slave_Transactional_Groups", 20,
|
||||
MYSQL_TYPE_LONGLONG),
|
||||
mem_root);
|
||||
field_list->push_back(new (mem_root)
|
||||
Item_empty_string(thd, "Replicate_Rewrite_DB", 23),
|
||||
mem_root);
|
||||
|
||||
/*
|
||||
Note, we must never, _ever_, add extra rows to this output of SHOW SLAVE
|
||||
STATUS, except here at the end before the extra rows of SHOW ALL SLAVES
|
||||
STATUS. Otherwise, we break backwards compatibility with applications or
|
||||
scripts that parse the output!
|
||||
|
||||
This also means that we cannot add _any_ new rows in a GA version if a
|
||||
different row was already added in a later MariaDB version, as this would
|
||||
make it impossible to merge the change up while preserving the order of
|
||||
rows.
|
||||
*/
|
||||
|
||||
if (full)
|
||||
{
|
||||
@@ -3202,7 +3217,6 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
|
||||
&my_charset_bin);
|
||||
protocol->store(&slave_running[mi->slave_running], &my_charset_bin);
|
||||
protocol->store(mi->rli.slave_running ? &msg_yes : &msg_no, &my_charset_bin);
|
||||
protocol->store(rpl_filter->get_rewrite_db());
|
||||
protocol->store(rpl_filter->get_do_db());
|
||||
protocol->store(rpl_filter->get_ignore_db());
|
||||
|
||||
@@ -3362,6 +3376,7 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
|
||||
protocol->store(mi->total_ddl_groups);
|
||||
protocol->store(mi->total_non_trans_groups);
|
||||
protocol->store(mi->total_trans_groups);
|
||||
protocol->store(rpl_filter->get_rewrite_db());
|
||||
|
||||
if (full)
|
||||
{
|
||||
@@ -3536,6 +3551,7 @@ static int init_slave_thread(THD* thd, Master_info *mi,
|
||||
}
|
||||
|
||||
thd->security_ctx->skip_grants();
|
||||
thd->security_ctx->user=(char*) slave_user;
|
||||
thd->slave_thread= 1;
|
||||
thd->connection_name= mi->connection_name;
|
||||
thd->variables.sql_log_slow= !MY_TEST(thd->variables.log_slow_disabled_statements & LOG_SLOW_DISABLE_SLAVE);
|
||||
|
Reference in New Issue
Block a user