summaryrefslogtreecommitdiff
path: root/storage/innobase/include/lock0priv.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-01-04 15:30:34 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2021-01-04 15:30:34 +0200
commitbd52f1a2dd1cb56c8bd9da9fc978f760b36ca701 (patch)
tree4af4b69e8943ce7fd5431e39904712cc099602ba /storage/innobase/include/lock0priv.h
parent3dabe637ca972d9139819848449f76867dd0f7ef (diff)
downloadmariadb-git-bd52f1a2dd1cb56c8bd9da9fc978f760b36ca701.tar.gz
Cleanup: Remove lock_number_of_rows_locked()
Let us access trx->lock.n_rec_locks directly.
Diffstat (limited to 'storage/innobase/include/lock0priv.h')
-rw-r--r--storage/innobase/include/lock0priv.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/storage/innobase/include/lock0priv.h b/storage/innobase/include/lock0priv.h
index aa1cb964e53..28b6fc463b7 100644
--- a/storage/innobase/include/lock0priv.h
+++ b/storage/innobase/include/lock0priv.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2018, MariaDB Corporation.
+Copyright (c) 2015, 2021, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -515,6 +515,7 @@ lock_rec_set_nth_bit(
@return previous value of the bit */
inline byte lock_rec_reset_nth_bit(lock_t* lock, ulint i)
{
+ lock_sys.mutex_assert_locked();
ut_ad(lock_get_type_low(lock) == LOCK_REC);
ut_ad(i < lock->un_member.rec_lock.n_bits);
@@ -524,8 +525,9 @@ inline byte lock_rec_reset_nth_bit(lock_t* lock, ulint i)
*b &= byte(~mask);
if (bit != 0) {
- ut_ad(lock->trx->lock.n_rec_locks > 0);
- --lock->trx->lock.n_rec_locks;
+ ut_d(auto n=)
+ lock->trx->lock.n_rec_locks--;
+ ut_ad(n);
}
return(bit);