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)
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 CONNECTIONS: 1 CONNECTIONS: 0
CONNECTED_ TIME: 2
BUSY_ TIME: 0
CPU_TIME: 0
BYTES_ RECEIVED: 55
BYTES_ SENT: 0 BYTES_WRITTEN: 0
ROWS_ FETCHED: 1
ROWS_ UPDATED: 0
TABLE_ROWS_ READ: 0
SELECT_ COMMANDS: 1
UPDATE_ COMMANDS: 0
OTHER_ COMMANDS: 0 TRANSACTIONS: 0 TRANSACTIONS: 0 CONNECTIONS: 0 CONNECTIONS: 0
ACCESS_ DENIED: 0
EMPTY_ QUERIES: 0
*******
TOTAL_
CONCURRENT_
BINLOG_
COMMIT_
ROLLBACK_
DENIED_
LOST_
1 row in set (0.00 sec)