[MDEV-21636] information_schema.innodb_mutexes.name column is not populated Created: 2020-02-02  Updated: 2020-02-03  Resolved: 2020-02-03

Status: Closed
Project: MariaDB Server
Component/s: Information Schema, Storage Engine - InnoDB
Affects Version/s: 10.2.2, 10.3.0, 10.3.7, 10.4.0, 10.5.0, 10.4
Fix Version/s: 10.5.1, 10.2.32, 10.3.23, 10.4.13

Type: Bug Priority: Major
Reporter: Valerii Kravchuk Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None


 Description   

Compare the outputs of the following statements:

C:\Program Files\MariaDB 10.3\bin>mysql -uroot -proot -P3316 test
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 10.3.7-MariaDB-log mariadb.org binary distribution
 
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [test]> select * from information_schema.innodb_mutexes;
+------+---------------------+-------------+----------+
| NAME | CREATE_FILE         | CREATE_LINE | OS_WAITS |
+------+---------------------+-------------+----------+
|      | log0log.cc          |         644 |        1 |
|      | combined buf0buf.cc |        1510 |        1 |
+------+---------------------+-------------+----------+
2 rows in set (0.005 sec)
 
MariaDB [test]> show engine innodb mutex;
+--------+-----------------------------+---------+
| Type   | Name                        | Status  |
+--------+-----------------------------+---------+
| InnoDB | rwlock: log0log.cc:644      | waits=1 |
| InnoDB | sum rwlock: buf0buf.cc:1510 | waits=1 |
+--------+-----------------------------+---------+
2 rows in set (0.005 sec)

One would expect Name column in the output of the first one to contain a mutex name, as the second one demonstrates (or more specific one). It looks like the name is always missing.



 Comments   
Comment by Marko Mäkelä [ 2020-02-03 ]

The column name is not populated ever since the InnoDB changes from MySQL 5.7.9 were applied to MariaDB, in the 10.2.2 release. The underlying data structure is missing.

At the same time, information_schema.innodb_mutexes actually stopped providing information about mutexes; it is only listing rw_lock_t, such as log_sys_t::checkpoint_lock and buf_block_t::lock in your sample output.

We can surely provide a redundant mutex name, like the Name column in the SHOW ENGINE INNODB MUTEX output. Also, perhaps we could always enable the compilation of mysql_pfs_key_t and extend it to record the names of mutexes and the creation file names and line numbers. In that way, each object could identify the type of the mutex with only one data field, instead of incurring the overhead of multiple fields for that purpose. I have mentioned this idea to serg.

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