Bug #113644 Confusing thread id vs processlist id information in SEIS
Submitted: 15 Jan 14:13 Modified: 15 Jan 15:59
Reporter: Przemyslaw Malkowski Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[15 Jan 14:13] Przemyslaw Malkowski
In MySQL diagnostics, there are two separate things - processlist id and thread id, which are not equal.
However, show engine innodb status output shows thread id information where in fact, the number it shows is the processlist id.
One may get confused when looking for the thread details and checking in the performance_schema.threads view.

How to repeat:
In the below, the "MySQL thread id 6871" refers to the PROCESSLIST_ID column of SEIS, not the THREAD_ID:

mysql > show engine innodb status\G                                                                                   
*************************** 1. row ***************************
---TRANSACTION 3690484, ACTIVE 2871 sec
3 lock struct(s), heap size 1136, 101 row lock(s), undo log entries 100
MySQL thread id 6871, OS thread handle 140102553798400, query id 36981751 localhost msandbox starting
show engine innodb status

mysql > select THREAD_ID,PROCESSLIST_ID,NAME from performance_schema.threads where type='FOREGROUND';
| THREAD_ID | PROCESSLIST_ID | NAME                           |
|        27 |              1 | thread/sql/compress_gtid_table |
|      6897 |           6871 | thread/sql/one_connection      |
|       763 |            737 | thread/sql/one_connection      |
|      7610 |           7584 | thread/sql/one_connection      |
|      7635 |           7609 | thread/sql/one_connection      |
|      7640 |           7614 | thread/sql/one_connection      |
|      7643 |           7617 | thread/sql/one_connection      |
|       838 |            812 | thread/sql/one_connection      |
8 rows in set (0.00 sec)

Suggested fix:
Rename the description accordingly to avoid confusion.
[15 Jan 14:43] MySQL Verification Team
Hi Mr. Malkowski,

Thank you for your bug report.

However, we are not certain what are you reporting here.

First of all, do note that both thread and process ID are including in the P_S output.

Where several threads belong to the same process ID , then thread ID is repeated.

Could you give us an example of what should  SEIS look like, in your opinion and why .....

Also, do set a Category correct. It is either Performance_Schema or InnoDB.

Do also note that 5.7 is no longer supported.

We are waiting on your feedback.

This also looks like a feature request, don't you agree ????/
[15 Jan 15:39] Przemyslaw Malkowski
Hi MySQL Verification Team,

There is nothing wrong with the performance_schema.threads view.

My point is that in SEIS, we can see "MySQL thread id" information for a given active transaction. Now, if someone wants to find out what this thread id is about, they will look at the THREAD_ID column in the P_S view, which is basically NOT what one should be looking for. SEIS, in fact, shows the processlist ID, and IMHO, it should be described as such. Don't you agree?
So, no, I don't think it's a feature request; I think it was inconsistently named in the first place.
[15 Jan 15:59] MySQL Verification Team

Thank you.

This is definitely an insignificant bug and discrepancy between SEID and P_S.

However, it is still a bug in the code, so we are verifying it.

For versions 8.0 and higher.