summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorheikki@hundin.mysql.fi <>2005-03-04 17:58:06 +0200
committerheikki@hundin.mysql.fi <>2005-03-04 17:58:06 +0200
commit474a910499afbb1263dfd3d716437010bddf614e (patch)
tree6101dc38ef27c36619d1a3a491b56e58cae352eb /innobase
parenta8aced1e64694debe77b78693f25a417cc0eefa7 (diff)
downloadmariadb-git-474a910499afbb1263dfd3d716437010bddf614e.tar.gz
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')
-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);