summaryrefslogtreecommitdiff
path: root/innobase/trx
diff options
context:
space:
mode:
authorheikki@hundin.mysql.fi <>2004-05-13 22:07:51 +0300
committerheikki@hundin.mysql.fi <>2004-05-13 22:07:51 +0300
commitd2649c110a3779196d0873378024a3c26d1a17f4 (patch)
treebeee046ed5311453bdb6ab92309349eb05cd9510 /innobase/trx
parent55e777572556eb5cd5ef001d6fc4218080849c13 (diff)
downloadmariadb-git-d2649c110a3779196d0873378024a3c26d1a17f4.tar.gz
ha_innodb.cc, trx0trx.h, lock0lock.c, trx0trx.c:
Reserve the MySQL LOCK_thread_count mutex when printing thd->query of an arbitrary transaction; if we are printing thd->query of a transaction that we know is currently executing inside InnoDB, then we know that MySQL cannot meanwhile change thd->query, and no need to reserve the MySQL mutex; note that this patch still leaves open the possibility of races in MySQL's thd->query_len
Diffstat (limited to 'innobase/trx')
-rw-r--r--innobase/trx/trx0trx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c
index 69cd6c7b22d..335e1f69228 100644
--- a/innobase/trx/trx0trx.c
+++ b/innobase/trx/trx0trx.c
@@ -1562,7 +1562,9 @@ trx_mark_sql_stat_end(
/**************************************************************************
Prints info about a transaction to the standard output. The caller must
-own the kernel mutex. */
+own the kernel mutex and must have called
+innobase_mysql_prepare_print_arbitrary_thd(), unless he knows that MySQL or
+InnoDB cannot meanwhile change the info printed here. */
void
trx_print(