Comment 5 for bug 728080

Revision history for this message
Alexey Kopytov (akopytov) wrote :

And the reason for issue #2, i.e. thread_statistics being an empty table, is that to enable thread statistics collection, setting userstat to ON is insufficient, one also has to set the thread_statistics variable to ON (5.5 also requires quoting until bug #997036 is fixed):

mysql> select @@userstat;
+------------+
| @@userstat |
+------------+
| 1 |
+------------+
1 row in set (0.00 sec)

mysql> select * from information_schema.thread_statistics;
Empty set (0.00 sec)

mysql> set global `thread_statistics`=on;
Query OK, 0 rows affected (0.01 sec)

mysql> select * from information_schema.thread_statistics\G
*************************** 1. row ***************************
             THREAD_ID: 1
     TOTAL_CONNECTIONS: 1
CONCURRENT_CONNECTIONS: 0
        CONNECTED_TIME: 2
             BUSY_TIME: 0
              CPU_TIME: 0
        BYTES_RECEIVED: 55
            BYTES_SENT: 0
  BINLOG_BYTES_WRITTEN: 0
          ROWS_FETCHED: 1
          ROWS_UPDATED: 0
       TABLE_ROWS_READ: 0
       SELECT_COMMANDS: 1
       UPDATE_COMMANDS: 0
        OTHER_COMMANDS: 0
   COMMIT_TRANSACTIONS: 0
 ROLLBACK_TRANSACTIONS: 0
    DENIED_CONNECTIONS: 0
      LOST_CONNECTIONS: 0
         ACCESS_DENIED: 0
         EMPTY_QUERIES: 0
1 row in set (0.00 sec)