1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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:
Monty
2023-04-29 20:39:50 +03:00
parent 4cb0d43ac6
commit 4f7317579e

View File

@ -2317,9 +2317,7 @@ rpl_parallel::find(uint32 domain_id)
mysql_cond_init(key_COND_parallel_entry, &e->COND_parallel_entry, NULL);
if (my_hash_insert(&domain_hash, (uchar *)e))
{
mysql_cond_destroy(&e->COND_parallel_entry);
mysql_mutex_destroy(&e->LOCK_parallel_entry);
my_free(e);
free_rpl_parallel_entry(e);
return NULL;
}
}