Bug #98715 InnoDB_TRX table contain the read-only trnasaction
Submitted: 23 Feb 2020 11:44 Modified: 26 Feb 2020 19:36
Reporter: Zongzhi Chen (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[23 Feb 2020 11:44] Zongzhi Chen
Description:
The document said that:
https://dev.mysql.com/doc/refman/8.0/en/innodb-trx-table.html

The INNODB_TRX table provides information about every transaction (excluding read-only transactions) currently executing inside InnoDB, including whether the transaction is waiting for a lock, when the transaction started, and the SQL statement the transaction is executing, if any.

However the INNODB_TRX contain the read-only transaction..
as the comment and code said:

  /* NOTE: information of auto-commit non-locking read-only
  transactions will be omitted here. The information will be
  available from INFORMATION_SCHEMA.INNODB_TRX. */

And in the code trx/trx0i_s.cc:fill_trx_row(), it doesn't check whether the trx is read-only, when adding the trx to  information_schme.innodb_trx..

How to repeat:
read the code,  and running read-only transaction.

Then the read-only transaction appear in the information_schema.innodb_trx
[24 Feb 2020 14:40] MySQL Verification Team
Hi Mr. zongzhi,

Thank you for your bug report.

I have checked your report and, indeed, our documentation is not in line with our code.

Verified as a documentation bug.
[26 Feb 2020 19:36] Daniel Price
Posted by developer:
 
The referenced documentation was revised as suggested. Thank you for the bug report.
[27 Feb 2020 12:54] MySQL Verification Team
Thanks a lot, Daniel.