Bug #59342 innodb status prints "purge trx" next to any thread with id 0
Submitted: 7 Jan 2011 4:35 Modified: 13 Feb 2012 1:27
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:mysql-trunk OS:Any
Assigned to: Inaam Rana CPU Architecture:Any

[7 Jan 2011 4:35] Shane Bester
Description:
"purge trx" is printed for all threads that have no started transaction (id = 0), instead of just the purge thread:

LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started, process no 28662, OS thread id 454244112 purge trx
MySQL thread id 7, query id 209295 192.168.1.1 root
show engine innodb status

How to repeat:
without starting a transaction, run this:

show engine innodb status\G

Suggested fix:
if (trx->id == 0) {
         fputs(" purge trx", f);
}
This check needs to be improved.
[7 Jan 2011 9:20] Valeriy Kravchuk
Thank you for the bug report. Indeed, this is what we see:

------------
TRANSACTIONS
------------
Trx id counter B00
Purge done for trx's n:o < 705 undo n:o < 0
History list length 4
Total number of lock structs in row lock hash table 0
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started, OS thread id 2961182720 purge trx
MySQL thread id 1, query id 12 localhost root
show engine innodb status