Skip to content

Commit b4646c6

Browse files
committed
Misc. small cleanups unrelated to any particular MDEV
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
1 parent 23d5391 commit b4646c6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

sql/log.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7587,7 +7587,7 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry)
75877587
75887588
Setting this flag may or may not be seen by the other thread, but we
75897589
are safe in any case: The other thread will set queued_by_other under
7590-
its LOCK_wait_commit, and we will not check queued_by_other only after
7590+
its LOCK_wait_commit, and we will not check queued_by_other until after
75917591
we have been woken up.
75927592
*/
75937593
wfc->opaque_pointer= orig_entry;
@@ -7684,7 +7684,7 @@ MYSQL_BIN_LOG::queue_for_group_commit(group_commit_entry *orig_entry)
76847684
is pointed to by `last` (we do not use NULL to terminate the list).
76857685
76867686
As we process an entry, any waiters for that entry are added at the end of
7687-
the list, to be processed in subsequent iterations. The the entry is added
7687+
the list, to be processed in subsequent iterations. Then the entry is added
76887688
to the group_commit_queue. This continues until the list is exhausted,
76897689
with all entries ever added eventually processed.
76907690

sql/sql_class.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7643,7 +7643,7 @@ wait_for_commit::wait_for_prior_commit2(THD *thd)
76437643
{
76447644
PSI_stage_info old_stage;
76457645
wait_for_commit *loc_waitee;
7646-
bool backup_lock_released= 0;
7646+
bool backup_lock_released= false;
76477647

76487648
/*
76497649
Release MDL_BACKUP_COMMIT LOCK while waiting for other threads to commit
@@ -7653,7 +7653,7 @@ wait_for_commit::wait_for_prior_commit2(THD *thd)
76537653
*/
76547654
if (thd->backup_commit_lock && thd->backup_commit_lock->ticket)
76557655
{
7656-
backup_lock_released= 1;
7656+
backup_lock_released= true;
76577657
thd->mdl_context.release_lock(thd->backup_commit_lock->ticket);
76587658
thd->backup_commit_lock->ticket= 0;
76597659
}
@@ -7706,14 +7706,14 @@ wait_for_commit::wait_for_prior_commit2(THD *thd)
77067706
use within enter_cond/exit_cond.
77077707
*/
77087708
DEBUG_SYNC(thd, "wait_for_prior_commit_killed");
7709-
if (backup_lock_released)
7709+
if (unlikely(backup_lock_released))
77107710
thd->mdl_context.acquire_lock(thd->backup_commit_lock,
77117711
thd->variables.lock_wait_timeout);
77127712
return wakeup_error;
77137713

77147714
end:
77157715
thd->EXIT_COND(&old_stage);
7716-
if (backup_lock_released)
7716+
if (unlikely(backup_lock_released))
77177717
thd->mdl_context.acquire_lock(thd->backup_commit_lock,
77187718
thd->variables.lock_wait_timeout);
77197719
return wakeup_error;

0 commit comments

Comments
 (0)