mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merge MariaDB 10.0-base to 10.0.
This commit is contained in:
@@ -765,6 +765,27 @@ rpl_parallel::wait_for_done()
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
rpl_parallel::workers_idle()
|
||||
{
|
||||
struct rpl_parallel_entry *e;
|
||||
uint32 i, max_i;
|
||||
|
||||
max_i= domain_hash.records;
|
||||
for (i= 0; i < max_i; ++i)
|
||||
{
|
||||
bool active;
|
||||
e= (struct rpl_parallel_entry *)my_hash_element(&domain_hash, i);
|
||||
mysql_mutex_lock(&e->LOCK_parallel_entry);
|
||||
active= e->current_sub_id > e->last_committed_sub_id;
|
||||
mysql_mutex_unlock(&e->LOCK_parallel_entry);
|
||||
if (active)
|
||||
break;
|
||||
}
|
||||
return (i == max_i);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
do_event() is executed by the sql_driver_thd thread.
|
||||
It's main purpose is to find a thread that can execute the query.
|
||||
|
Reference in New Issue
Block a user