summaryrefslogtreecommitdiff
path: root/storage/innobase/trx/trx0sys.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/trx/trx0sys.cc')
-rw-r--r--storage/innobase/trx/trx0sys.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/storage/innobase/trx/trx0sys.cc b/storage/innobase/trx/trx0sys.cc
index a253ea72e95..37aeb67a3e7 100644
--- a/storage/innobase/trx/trx0sys.cc
+++ b/storage/innobase/trx/trx0sys.cc
@@ -1390,7 +1390,7 @@ trx_undo_fake_prepared(
Check if there are any active (non-prepared) transactions.
@return total number of active transactions or 0 if none */
ulint
-trx_sys_any_active_transactions(void)
+trx_sys_any_active_transactions(bool with_prepared)
/*=================================*/
{
trx_sys_mutex_enter();
@@ -1431,7 +1431,9 @@ trx_sys_any_active_transactions(void)
}
ut_a(total_trx >= trx_sys->n_prepared_trx);
- total_trx -= trx_sys->n_prepared_trx;
+ if (!with_prepared) {
+ total_trx -= trx_sys->n_prepared_trx;
+ }
}
trx_sys_mutex_exit();