[MDEV-28255] "Error" instead of NULL in P_S.THREADS_CONNECTION_TYPE for background threads Created: 2022-04-07  Updated: 2022-04-09  Resolved: 2022-04-09

Status: Closed
Project: MariaDB Server
Component/s: Performance Schema
Affects Version/s: 10.5.15, 10.6.7, 10.7.3, 10.8.2
Fix Version/s: 10.5.16, 10.6.8, 10.7.4

Type: Bug Priority: Major
Reporter: Hartmut Holzgraefe Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None


 Description   

According to the KB the P_S.THREADS.CONNECTION_TYPE column should show NULL for background threads, and the source code has these possible states:

static const LEX_CSTRING vio_type_names[] =
{
  { STRING_WITH_LEN("Error") }, // cannot happen
  { STRING_WITH_LEN("TCP/IP") },
  { STRING_WITH_LEN("Socket") },
  { STRING_WITH_LEN("Named Pipe") },
  { STRING_WITH_LEN("SSL/TLS") },
  { STRING_WITH_LEN("Shared Memory") }
};

Yet it actually indeed shows "Error" instead of "NULL":

MariaDB [performance_schema]> select name, connection_type from threads where type="BACKGROUND";
+-----------------------------------+-----------------+
| name                              | connection_type |
+-----------------------------------+-----------------+
| thread/sql/main                   | Error           |
| thread/mysys/statement_timer      | Error           |
| thread/aria/checkpoint_background | Error           |
| thread/innodb/page_cleaner_thread | Error           |
| thread/innodb/thread_pool_thread  | Error           |
| thread/innodb/thread_pool_thread  | Error           |
| thread/innodb/thread_pool_thread  | Error           |
| thread/innodb/thread_pool_thread  | Error           |
| thread/innodb/thread_pool_thread  | Error           |
| thread/innodb/thread_pool_thread  | Error           |
| thread/sql/signal_handler         | Error           |
| thread/sql/manager                | Error           |
+-----------------------------------+-----------------+



 Comments   
Comment by Hartmut Holzgraefe [ 2022-04-07 ]

versions older than 10.5 are not affected as the column was first added there

I also tested the first 10.5 GA, it has been "Error" instead of NULL from the very beginning

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