Fixed things missing in merge between 10.0-base and 10.0
Updated --help text to declare --slave-parallel-threads as an alpha feature mysql-test/r/mysqld--help.result: Updated --help text sql/slave.cc: Added missing trans_retries++ that caused rpl_deadlock_innodb.test to fail. This is safe as this part is never run in parallel. sql/sql_base.cc: Fixed temporary table handling (part of merge) sql/sys_vars.cc: Updated --help text to declare --slave-parallel-threads as an alpha feature
This commit is contained in:
parent
57a267a8c0
commit
de9d9792ab
@ -878,9 +878,10 @@ The following options may be given as the first argument:
|
|||||||
relay log looking for opportunities for parallel
|
relay log looking for opportunities for parallel
|
||||||
replication. Only used when --slave-parallel-threads > 0.
|
replication. Only used when --slave-parallel-threads > 0.
|
||||||
--slave-parallel-threads=#
|
--slave-parallel-threads=#
|
||||||
If non-zero, number of threads to spawn to apply in
|
Alpha feature, to only be used by developers doing
|
||||||
parallel events on the slave that were group-committed on
|
testing! If non-zero, number of threads to spawn to apply
|
||||||
the master or were logged with GTID in different
|
in parallel events on the slave that were group-committed
|
||||||
|
on the master or were logged with GTID in different
|
||||||
replication domains.
|
replication domains.
|
||||||
--slave-skip-errors=name
|
--slave-skip-errors=name
|
||||||
Tells the slave thread to continue replication when a
|
Tells the slave thread to continue replication when a
|
||||||
|
@ -3498,6 +3498,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
|
|||||||
slave_sleep(thd, MY_MIN(serial_rgi->trans_retries,
|
slave_sleep(thd, MY_MIN(serial_rgi->trans_retries,
|
||||||
MAX_SLAVE_RETRY_PAUSE),
|
MAX_SLAVE_RETRY_PAUSE),
|
||||||
sql_slave_killed, serial_rgi);
|
sql_slave_killed, serial_rgi);
|
||||||
|
serial_rgi->trans_retries++;
|
||||||
mysql_mutex_lock(&rli->data_lock); // because of SHOW STATUS
|
mysql_mutex_lock(&rli->data_lock); // because of SHOW STATUS
|
||||||
rli->retried_trans++;
|
rli->retried_trans++;
|
||||||
statistic_increment(slave_retried_transactions, LOCK_status);
|
statistic_increment(slave_retried_transactions, LOCK_status);
|
||||||
|
@ -1500,26 +1500,16 @@ TABLE *find_temporary_table(THD *thd, const char *db, const char *table_name)
|
|||||||
|
|
||||||
TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl)
|
TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl)
|
||||||
{
|
{
|
||||||
const char *key;
|
const char *tmp_key;
|
||||||
|
char key[MAX_DBKEY_LENGTH];
|
||||||
uint key_length;
|
uint key_length;
|
||||||
char key_suffix[TMP_TABLE_KEY_EXTRA];
|
|
||||||
TABLE *table;
|
|
||||||
|
|
||||||
key_length= get_table_def_key(tl, &key);
|
key_length= get_table_def_key(tl, &tmp_key);
|
||||||
|
memcpy(key, tmp_key, key_length);
|
||||||
|
int4store(key + key_length, thd->variables.server_id);
|
||||||
|
int4store(key + key_length + 4, thd->variables.pseudo_thread_id);
|
||||||
|
|
||||||
int4store(key_suffix, thd->variables.server_id);
|
return find_temporary_table(thd, key, key_length + TMP_TABLE_KEY_EXTRA);
|
||||||
int4store(key_suffix + 4, thd->variables.pseudo_thread_id);
|
|
||||||
|
|
||||||
for (table= thd->temporary_tables; table; table= table->next)
|
|
||||||
{
|
|
||||||
if ((table->s->table_cache_key.length == key_length +
|
|
||||||
TMP_TABLE_KEY_EXTRA) &&
|
|
||||||
!memcmp(table->s->table_cache_key.str, key, key_length) &&
|
|
||||||
!memcmp(table->s->table_cache_key.str + key_length, key_suffix,
|
|
||||||
TMP_TABLE_KEY_EXTRA))
|
|
||||||
return table;
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -5606,9 +5596,9 @@ bool open_temporary_table(THD *thd, TABLE_LIST *tl)
|
|||||||
*/
|
*/
|
||||||
DBUG_ASSERT(!tl->derived && !tl->schema_table);
|
DBUG_ASSERT(!tl->derived && !tl->schema_table);
|
||||||
|
|
||||||
if (tl->open_type == OT_BASE_ONLY)
|
if (tl->open_type == OT_BASE_ONLY || !thd->have_temporary_tables())
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("skip_temporary is set"));
|
DBUG_PRINT("info", ("skip_temporary is set or no temporary tables"));
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1726,6 +1726,7 @@ fix_slave_parallel_threads(sys_var *self, THD *thd, enum_var_type type)
|
|||||||
|
|
||||||
static Sys_var_ulong Sys_slave_parallel_threads(
|
static Sys_var_ulong Sys_slave_parallel_threads(
|
||||||
"slave_parallel_threads",
|
"slave_parallel_threads",
|
||||||
|
"Alpha feature, to only be used by developers doing testing! "
|
||||||
"If non-zero, number of threads to spawn to apply in parallel events "
|
"If non-zero, number of threads to spawn to apply in parallel events "
|
||||||
"on the slave that were group-committed on the master or were logged "
|
"on the slave that were group-committed on the master or were logged "
|
||||||
"with GTID in different replication domains.",
|
"with GTID in different replication domains.",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user