diff options
Diffstat (limited to 'sql/rpl_parallel.cc')
-rw-r--r-- | sql/rpl_parallel.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index c0a08d9d703..a39472f9d4d 100644 --- a/sql/rpl_parallel.cc +++ b/sql/rpl_parallel.cc @@ -2583,14 +2583,16 @@ rpl_parallel::find(uint32 domain_id, Relay_log_info *rli) e->pause_sub_id= (uint64)ULONGLONG_MAX; e->pending_start_alters= 0; e->rli= rli; + mysql_mutex_init(key_LOCK_parallel_entry, &e->LOCK_parallel_entry, + MY_MUTEX_INIT_FAST); + 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); return NULL; } - mysql_mutex_init(key_LOCK_parallel_entry, &e->LOCK_parallel_entry, - MY_MUTEX_INIT_FAST); - mysql_cond_init(key_COND_parallel_entry, &e->COND_parallel_entry, NULL); } else { |