mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed "Trying to lock uninitialized mutex' in parallel replication
The problem was that mutex_init() was called after the worker was put into the domain_hash, which allowed other threads to access it before mutex was initialized.
This commit is contained in:
@ -2317,9 +2317,7 @@ rpl_parallel::find(uint32 domain_id)
|
|||||||
mysql_cond_init(key_COND_parallel_entry, &e->COND_parallel_entry, NULL);
|
mysql_cond_init(key_COND_parallel_entry, &e->COND_parallel_entry, NULL);
|
||||||
if (my_hash_insert(&domain_hash, (uchar *)e))
|
if (my_hash_insert(&domain_hash, (uchar *)e))
|
||||||
{
|
{
|
||||||
mysql_cond_destroy(&e->COND_parallel_entry);
|
free_rpl_parallel_entry(e);
|
||||||
mysql_mutex_destroy(&e->LOCK_parallel_entry);
|
|
||||||
my_free(e);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user