Commit 56da6252 authored by Jan Lindström's avatar Jan Lindström

Improve InnoDB transaction lock output by providing number of table locks

this transaction is currently holding and total number of table locks to
the table where lock is held.
parent a2578018
......@@ -5163,7 +5163,14 @@ lock_rec_print(
fprintf(file, "RECORD LOCKS space id %lu page no %lu n bits %lu ",
(ulong) space, (ulong) page_no,
(ulong) lock_rec_get_n_bits(lock));
dict_index_name_print(file, lock->trx, lock->index);
/* Print number of table locks */
fprintf(file, " trx table locks %lu total table locks %lu ",
ib_vector_size(lock->trx->lock.table_locks),
UT_LIST_GET_LEN(lock->index->table->locks));
fprintf(file, " trx id " TRX_ID_FMT, lock->trx->id);
if (lock_get_mode(lock) == LOCK_S) {
......
......@@ -5199,7 +5199,14 @@ lock_rec_print(
fprintf(file, "RECORD LOCKS space id %lu page no %lu n bits %lu ",
(ulong) space, (ulong) page_no,
(ulong) lock_rec_get_n_bits(lock));
dict_index_name_print(file, lock->trx, lock->index);
/* Print number of table locks */
fprintf(file, " trx table locks %lu total table locks %lu ",
ib_vector_size(lock->trx->lock.table_locks),
UT_LIST_GET_LEN(lock->index->table->locks));
fprintf(file, " trx id " TRX_ID_FMT, lock->trx->id);
if (lock_get_mode(lock) == LOCK_S) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment