diff options
-rw-r--r-- | storage/innobase/trx/trx0rec.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/trx/trx0rec.cc b/storage/innobase/trx/trx0rec.cc index 8d9a7d6f796..9447461e944 100644 --- a/storage/innobase/trx/trx0rec.cc +++ b/storage/innobase/trx/trx0rec.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1996, 2019, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, 2021, MariaDB Corporation. +Copyright (c) 2017, 2022, 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 @@ -1979,7 +1979,7 @@ static bool trx_has_lock_x(const trx_t &trx, dict_table_t& table) /* This thread is executing trx. No other thread can modify our table locks (only record locks might be created, in an implicit-to-explicit conversion). Hence, no mutex is needed here. */ - if (n == 1) + if (n) for (const lock_t *lock : trx.lock.table_locks) if (lock && lock->type_mode == (LOCK_X | LOCK_TABLE)) return true; |