1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-28255 "Error" instead of NULL in P_S.THREADS_CONNECTION_TYPE for background threads

use vio_type_names[] values as in MySQL
This commit is contained in:
Sergei Golubchik
2022-04-08 14:17:36 +02:00
parent d8463b64b3
commit cfdb621243
3 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,6 @@
SET GLOBAL event_scheduler = OFF; SET GLOBAL event_scheduler = OFF;
SELECT name, type, processlist_user, processlist_host, processlist_db, SELECT name, type, processlist_user, processlist_host, processlist_db,
processlist_command, processlist_info, processlist_command, processlist_info, connection_type,
IF(parent_thread_id IS NULL, parent_thread_id, 'unified parent_thread_id') IF(parent_thread_id IS NULL, parent_thread_id, 'unified parent_thread_id')
AS unified_parent_thread_id, AS unified_parent_thread_id,
role, instrumented role, instrumented
@ -14,6 +14,7 @@ processlist_host NULL
processlist_db mysql processlist_db mysql
processlist_command NULL processlist_command NULL
processlist_info NULL processlist_info NULL
connection_type NULL
unified_parent_thread_id NULL unified_parent_thread_id NULL
role NULL role NULL
instrumented YES instrumented YES
@ -24,6 +25,7 @@ processlist_host NULL
processlist_db NULL processlist_db NULL
processlist_command NULL processlist_command NULL
processlist_info NULL processlist_info NULL
connection_type NULL
unified_parent_thread_id unified parent_thread_id unified_parent_thread_id unified parent_thread_id
role NULL role NULL
instrumented YES instrumented YES
@ -34,13 +36,14 @@ processlist_host localhost
processlist_db test processlist_db test
processlist_command Query processlist_command Query
processlist_info SELECT name, type, processlist_user, processlist_host, processlist_db, processlist_info SELECT name, type, processlist_user, processlist_host, processlist_db,
processlist_command, processlist_info, processlist_command, processlist_info, connection_type,
IF(parent_thread_id IS NULL, parent_thread_id, 'unified parent_thread_id') IF(parent_thread_id IS NULL, parent_thread_id, 'unified parent_thread_id')
AS unified_parent_thread_id, AS unified_parent_thread_id,
role, instrumented role, instrumented
FROM performance_schema.threads FROM performance_schema.threads
WHERE name LIKE 'thread/sql%' WHERE name LIKE 'thread/sql%'
ORDER BY name ORDER BY name
connection_type Socket
unified_parent_thread_id unified parent_thread_id unified_parent_thread_id unified parent_thread_id
role NULL role NULL
instrumented YES instrumented YES
@ -51,6 +54,7 @@ processlist_host NULL
processlist_db NULL processlist_db NULL
processlist_command NULL processlist_command NULL
processlist_info NULL processlist_info NULL
connection_type NULL
unified_parent_thread_id unified parent_thread_id unified_parent_thread_id unified parent_thread_id
role NULL role NULL
instrumented YES instrumented YES

View File

@ -32,7 +32,7 @@ SET GLOBAL event_scheduler = OFF;
# Therefore we have to disable this protocol for the next statement. # Therefore we have to disable this protocol for the next statement.
--disable_ps_protocol --disable_ps_protocol
SELECT name, type, processlist_user, processlist_host, processlist_db, SELECT name, type, processlist_user, processlist_host, processlist_db,
processlist_command, processlist_info, processlist_command, processlist_info, connection_type,
IF(parent_thread_id IS NULL, parent_thread_id, 'unified parent_thread_id') IF(parent_thread_id IS NULL, parent_thread_id, 'unified parent_thread_id')
AS unified_parent_thread_id, AS unified_parent_thread_id,
role, instrumented role, instrumented

View File

@ -647,7 +647,7 @@ enum enum_vio_type vio_type(Vio* vio)
static const LEX_CSTRING vio_type_names[] = static const LEX_CSTRING vio_type_names[] =
{ {
{ STRING_WITH_LEN("Error") }, // cannot happen { STRING_WITH_LEN("") }, // internal threads
{ STRING_WITH_LEN("TCP/IP") }, { STRING_WITH_LEN("TCP/IP") },
{ STRING_WITH_LEN("Socket") }, { STRING_WITH_LEN("Socket") },
{ STRING_WITH_LEN("Named Pipe") }, { STRING_WITH_LEN("Named Pipe") },