[MDEV-18391] Print ENGINE INNODB STATUS in machine parsable format Created: 2019-01-28  Updated: 2021-11-16

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Fix Version/s: None

Type: Task Priority: Major
Reporter: Claudio Nanni Assignee: Unassigned
Resolution: Unresolved Votes: 5
Labels: None

Issue Links:
Relates
relates to MDEV-16580 Remove unused monitor counters from I... Closed
relates to MDEV-18698 Show InnoDB's internal background thr... Open
relates to MDEV-21566 Lock monitor doesn't print a name for... Closed
relates to MDEV-22087 Increase buffer size for query in SHO... Open
relates to MDEV-17237 thread IDs are printed in different f... Open
relates to MDEV-18429 Consistent non-locking reads do not a... Closed
relates to MDEV-18572 Thread executing DROP TABLE listed tw... Open
relates to MDEV-18582 Port status variables related to SHOW... Closed
relates to MDEV-21330 Lock monitor doesn't print a semaphor... Closed
relates to MDEV-21390 lock_print_info_summary() should work... Closed

 Description   

I think it would greatly help to have a SHOW ENGINE INNODB STATUS; in a machine parsable format.
Currently it requires too many regex expressions to extract info.
It should have the same info (or more) but with some strategy to easily extract data.
It can be useful for trends, comparisons, graphing over multiple outputs.
It could be any implementation, from prepending a label to each data field, to use tabular format for such info, it should keep allowing human to easily read it like it is now.
Eventually there could be an option to select the format output.



 Comments   
Comment by Marko Mäkelä [ 2019-01-28 ]

I agree that the SHOW ENGINE INNODB STATUS is difficult to handle.

Which are the most interesting pieces of output? Some (such as "history list length") are not currently exported via any other interface. Could someone compose a full list, preferrably with suggestions of how to export, say, SHOW VARIABLES or via performance_schema. My preference would be SHOW VARIABLES except when some history is needed.

I’d prefer to phase out SHOW ENGINE INNODB STATUS. However, if some parts of the output are not feasible to export in more structural ways, I guess that we could keep it. In that case, we would need a formal grammar for this, both as a specification for implementation, and for testing that the revised output actually conforms to the formal grammar.

Comment by Geoff Montee (Inactive) [ 2019-02-22 ]

The status variables that XtraDB exported are listed in MDEV-18582.

If we create a replacement for SHOW ENGINE INNODB STATUS, then it may be a good idea for that replacement to be designed to do some of the things that SHOW ENGINE INNODB STATUS can't do, like the things described in MDEV-18429, MDEV-18698, etc.

Comment by Rick James [ 2021-11-15 ]

When helping novices, the first thing I look for is the SQL statements that conflicted in a deadlock. Maybe put that pair of statements could be inserted (replaced) in a P_S entry or a "deadlock" table, thereby making a simple SELECT sufficient for my need.

Comment by Marko Mäkelä [ 2021-11-16 ]

rjasdfiii, MDEV-24738 in 10.6 introduced a configuration parameter innodb_deadlock_report that controls what will be included in the SHOW ENGINE INNODB STATUS output:

  • innodb_deadlock_report=off: Do not report any details of deadlocks.
  • innodb_deadlock_report=basic: Report transactions and waiting locks.
  • innodb_deadlock_report=full (default): Report also the blocking locks.

If innodb_print_all_deadlocks=ON, information about deadlocks will also be written to the server error log.

Generated at Thu Feb 08 08:43:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.