summaryrefslogtreecommitdiff
path: root/innobase/trx
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2005-03-04 17:58:06 +0200
committerunknown <heikki@hundin.mysql.fi>2005-03-04 17:58:06 +0200
commit6736ce56fb51fa0c13315b19ef2d5b6160b8d5ea (patch)
tree6101dc38ef27c36619d1a3a491b56e58cae352eb /innobase/trx
parent8ef8cd7622fc5369e080de18e684e8a3d9ae33e3 (diff)
downloadmariadb-git-6736ce56fb51fa0c13315b19ef2d5b6160b8d5ea.tar.gz
trx0trx.c:
Do not assert, but print diagnostics if MySQL tries to free a trx where n_mysql_tables_in_use > 0 innobase/trx/trx0trx.c: Do not assert, but print diagnostics if MySQL tries to free a trx where n_mysql_tables_in_use > 0
Diffstat (limited to 'innobase/trx')
-rw-r--r--innobase/trx/trx0trx.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c
index af4f1979858..2fdee94b089 100644
--- a/innobase/trx/trx0trx.c
+++ b/innobase/trx/trx0trx.c
@@ -256,6 +256,20 @@ trx_free(
putc('\n', stderr);
}
+ if (trx->n_mysql_tables_in_use != 0
+ || trx->mysql_n_tables_locked != 0) {
+
+ ut_print_timestamp(stderr);
+ fprintf(stderr,
+" InnoDB: Error: MySQL is freeing a thd\n"
+"InnoDB: though trx->n_mysql_tables_in_use is %lu\n"
+"InnoDB: and trx->mysql_n_tables_locked is %lu.\n",
+ (ulong)trx->n_mysql_tables_in_use,
+ (ulong)trx->mysql_n_tables_locked);
+
+ trx_print(stderr, trx);
+ }
+
ut_a(trx->magic_n == TRX_MAGIC_N);
trx->magic_n = 11112222;
@@ -266,9 +280,6 @@ trx_free(
ut_a(trx->insert_undo == NULL);
ut_a(trx->update_undo == NULL);
-
- ut_a(trx->n_mysql_tables_in_use == 0);
- ut_a(trx->mysql_n_tables_locked == 0);
if (trx->undo_no_arr) {
trx_undo_arr_free(trx->undo_no_arr);