[MDEV-32576] InnoDB deadlock output does not always include the full SQL statement Created: 2023-10-25  Updated: 2023-10-25

Status: Open
Project: MariaDB Server
Component/s: Server, Storage Engine - InnoDB
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2
Fix Version/s: 10.6, 10.11, 11.0, 11.1, 11.2

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 1
Labels: upstream-fix

Issue Links:
Relates
relates to MDEV-13983 Mariadb becomes unresponsive Closed
relates to MDEV-15359 Thread stay in "cleaning up" status a... Closed
relates to MDEV-30973 Enhance output of innodb deadlocks (S... Stalled
relates to MDEV-32579 Merge new release of InnoDB 5.7.44 to... Closed

 Description   

The recent release of MySQL 8.0.35 includes the following change:
Bug #23036096 - INNODB LAST DETECTED DEADLOCK NOT SHOWING FULL QUERY

The function innobase_mysql_print_thd() reserves a 1024-byte buffer for the output of a function that in MariaDB has been renamed to thd_get_error_context_description(). At most 600 first bytes of the SQL string will be copied to the buffer. The above fix is increasing that limit to 3000 bytes.

In MariaDB, at least starting with the fix of MDEV-15359, it is possible that no SQL statement will be output at all. In some MariaDB releases, there also was a lock order inversion problem that caused server hangs; see MDEV-13983 for some details.

In MariaDB Server 10.6, the locking subsystem was greatly refactored by MDEV-20612, MDEV-24738 and other changes. Therefore, it could make sense to not fix this bug in earlier major versions.


Generated at Thu Feb 08 10:32:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.