[MDEV-32751] sys schema view session_ssl_status is empty Created: 2023-11-09  Updated: 2023-12-14  Resolved: 2023-12-13

Status: Closed
Project: MariaDB Server
Component/s: Performance Schema
Affects Version/s: 10.11.4, 11.2.1
Fix Version/s: 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3

Type: Bug Priority: Major
Reporter: Oli Sennhauser Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: beginner-friendly, performance_schema, ssl, sys, tls
Environment:

Ubuntu 22.04, n.a.



 Description   

The view sys.session_ssl_status is empty:

MariaDB [sys]> select * from sys.session_ssl_status;
Empty set (0.005 sec)

Even thought the P_S is enabled:

show global variables like 'performance_schema';
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| performance_schema | ON    |
+--------------------+-------+

The reason is, that the performance_schema.status_by thread does NOT contain any entry about ssl:

select variable_name from `performance_schema`.`status_by_thread` where `VARIABLE_NAME` LIKE 'S%';
+---------------------------+
| variable_name             |
+---------------------------+
| Select_full_join          |
| Select_full_range_join    |
| Select_range              |
| Select_range_check        |
| Select_scan               |
| Slave_connections         |
| Slow_queries              |
| Sort_merge_passes         |
| Sort_priority_queue_sorts |
| Sort_range                |
| Sort_rows                 |
| Sort_scan                 |
+---------------------------+

It should contain more or less:

SQL> select variable_name from `performance_schema`.`status_by_thread` where `VARIABLE_NAME` LIKE 'Ssl%';
+-----------------------+
| variable_name         |
+-----------------------+
| Ssl_cipher            |
| Ssl_cipher_list       |
| Ssl_default_timeout   |
| Ssl_server_not_after  |
| Ssl_server_not_before |
| Ssl_sessions_reused   |
| Ssl_verify_depth      |
| Ssl_verify_mode       |
| Ssl_version           |
| Ssl_cipher            |
| Ssl_cipher_list       |
| Ssl_default_timeout   |
| Ssl_server_not_after  |
| Ssl_server_not_before |
| Ssl_sessions_reused   |
| Ssl_verify_depth      |
| Ssl_verify_mode       |
| Ssl_version           |
+-----------------------+

to produce such a result:

SQL> select * from sys.session_ssl_status;
+-----------+-------------+------------------------+---------------------+
| thread_id | ssl_version | ssl_cipher             | ssl_sessions_reused |
+-----------+-------------+------------------------+---------------------+
|      6213 |             |                        | 0                   |
|      6219 | TLSv1.3     | TLS_AES_256_GCM_SHA384 | 0                   |
+-----------+-------------+------------------------+---------------------+



 Comments   
Comment by Oli Sennhauser [ 2023-11-24 ]

Tss, tss. I did not know, Sergei, that you are a beginner...

Comment by Sergei Golubchik [ 2023-11-25 ]

I simply wanted to see why performance_schema doesn't show ssl variables and after that it was difficult to stop and not to fix it

Comment by Nikita Malyavin [ 2023-12-13 ]

d9cb1a2b7e7 is ok to push

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