Details
-
Bug
-
Status: Done
-
Medium
-
Resolution: Fixed
-
8.0.17-8
-
None
Description
While testing PS-5216, following observation is noticed. Details are furnished below:
1. I have 2 connected client sessions. Both are regular users. To verify:
mysql> select thread_id,PROCESSLIST_USER,instrumented,history from performance_schema.threads where type='FOREGROUND' and connection_type='Socket';
----------------------------------------------+
thread_id | PROCESSLIST_USER | instrumented | history |
----------------------------------------------+
47 | root | YES | YES |
53 | mohit | YES | YES |
----------------------------------------------+
2 rows in set (0.00 sec)
2. Now, I connect a client session from a utility user. To verify:
mysql> select thread_id,PROCESSLIST_USER,instrumented,history from performance_schema.threads where type='FOREGROUND' and connection_type='Socket';
----------------------------------------------+
thread_id | PROCESSLIST_USER | instrumented | history |
----------------------------------------------+
47 | root | YES | YES |
53 | mohit | YES | YES |
54 | NULL | NO | YES |
----------------------------------------------+
3 rows in set (0.00 sec)
3. Enabling the instrumentation for utility user session so that we can record the session activity:
mysql> update performance_schema.threads set instrumented='YES' where thread_id=54;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select thread_id,PROCESSLIST_USER,instrumented,history from performance_schema.threads where type='FOREGROUND' and connection_type='Socket';
----------------------------------------------+
thread_id | PROCESSLIST_USER | instrumented | history |
----------------------------------------------+
47 | root | YES | YES |
53 | mohit | YES | YES |
54 | NULL | YES | YES |
----------------------------------------------+
3 rows in set (0.00 sec)
4. Now I do an insert from utility user session:
mysql> insert into t2 values (1,'Mohit');
Query OK, 1 row affected (0.08 sec)
5.
mysql> select thread_id, sql_text from performance_schema.events_statements_current where thread_id=54;
--------------------------------------------+
thread_id | sql_text |
--------------------------------------------+
54 | insert into t2 values (1,'Mohit') |
--------------------------------------------+
1 row in set (0.00 sec)
The expected behaviour should be that there should not be a thread for the utility user client session
Attachments
Issue Links
- blocks
-
PS-5216 Re-Implement Utility User Feature in PS 8.0
-
- Done
-