diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2023-05-11 14:05:52 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2023-05-11 14:05:52 +0300 |
commit | cd5ca0b11882cfa8eafa8c687ed3084423bc7e52 (patch) | |
tree | 92045e255e18d9acbe7cd8385c64c9f1830db257 /sql/rpl_parallel.cc | |
parent | 78a1264cfae37667a2812c5bb5cc6638d9eed5ff (diff) | |
parent | c271057288f71746d1816824f338f2d9c47f67c1 (diff) | |
download | mariadb-git-bb-10.6-MDEV-29911.tar.gz |
Merge 10.6bb-10.6-MDEV-29911
Diffstat (limited to 'sql/rpl_parallel.cc')
-rw-r--r-- | sql/rpl_parallel.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sql/rpl_parallel.cc b/sql/rpl_parallel.cc index 341f01ad9fa..78d81d973e4 100644 --- a/sql/rpl_parallel.cc +++ b/sql/rpl_parallel.cc @@ -2400,14 +2400,16 @@ rpl_parallel::find(uint32 domain_id) e->domain_id= domain_id; e->stop_on_error_sub_id= (uint64)ULONGLONG_MAX; e->pause_sub_id= (uint64)ULONGLONG_MAX; + 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 e->force_abort= false; @@ -2933,7 +2935,12 @@ rpl_parallel::do_event(rpl_group_info *serial_rgi, Log_event *ev, if (mode <= SLAVE_PARALLEL_MINIMAL || !(gtid_flags & Gtid_log_event::FL_GROUP_COMMIT_ID) || - e->last_commit_id != gtid_ev->commit_id) + e->last_commit_id != gtid_ev->commit_id || + /* + MULTI_BATCH is also set when the current gtid even being a member + of a commit group is flagged as DDL which disallows parallel. + */ + (gtid_flags & Gtid_log_event::FL_DDL)) flags|= group_commit_orderer::MULTI_BATCH; /* Make sure we do not attempt to run DDL in parallel speculatively. */ if (gtid_flags & Gtid_log_event::FL_DDL) |