Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-5952

Utility user was visible in performance_schema.threads.

    XMLWordPrintable

    Details

      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

            Activity

              People

              Assignee:
              zsolt.parragi Zsolt Parragi
              Reporter:
              mohit.joshi Mohit Joshi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1 day, 6 hours, 5 minutes
                  1d 6h 5m

                    Smart Checklist