Comment 3 for bug 625045

Revision history for this message
Przemek (pmalkowski) wrote :

I can confirm this bug still exists in Percona Server 5.5.32:

mysql [localhost] {msandbox} (test) > CREATE TABLE `t1` (
    -> `id` int(11) DEFAULT NULL,
    -> KEY `id` (`id`)
    -> ) ENGINE=InnoDB;
Query OK, 0 rows affected (0.01 sec)

mysql [localhost] {msandbox} (test) > CREATE TABLE `p1` (
    -> `id` int(11) DEFAULT NULL,
    -> KEY `id` (`id`)
    -> ) ENGINE=InnoDB DEFAULT CHARSET=latin1
    -> /*!50100 PARTITION BY HASH (id)
    -> PARTITIONS 8 */;
Query OK, 0 rows affected (0.02 sec)

mysql [localhost] {msandbox} (test) > insert into p1 values (2),(33),(3),(100),(4);
Query OK, 5 rows affected (0.00 sec)
Records: 5 Duplicates: 0 Warnings: 0

mysql [localhost] {msandbox} (test) > insert into t1 values (2),(33),(3),(100),(4);
Query OK, 5 rows affected (0.00 sec)
Records: 5 Duplicates: 0 Warnings: 0

mysql [localhost] {msandbox} (test) > set global userstat=1;
Query OK, 0 rows affected (0.00 sec)

mysql [localhost] {msandbox} (test) > select * from t1;
+------+
| id |
+------+
| 2 |
| 3 |
| 4 |
| 33 |
| 100 |
+------+
5 rows in set (0.00 sec)

mysql [localhost] {msandbox} (test) > select * from p1;
+------+
| id |
+------+
| 2 |
| 3 |
| 4 |
| 33 |
| 100 |
+------+
5 rows in set (0.00 sec)

mysql [localhost] {msandbox} (test) > select * from INFORMATION_SCHEMA.INDEX_STATISTICS;
+--------------+------------+------------+-----------+
| TABLE_SCHEMA | TABLE_NAME | INDEX_NAME | ROWS_READ |
+--------------+------------+------------+-----------+
| test | t1 | id | 5 |
+--------------+------------+------------+-----------+
1 row in set (0.00 sec)

mysql [localhost] {msandbox} (test) > select * from INFORMATION_SCHEMA.TABLE_STATISTICS;
+--------------+------------+-----------+--------------+------------------------+
| TABLE_SCHEMA | TABLE_NAME | ROWS_READ | ROWS_CHANGED | ROWS_CHANGED_X_INDEXES |
+--------------+------------+-----------+--------------+------------------------+
| test | t1 | 5 | 5 | 5 |
+--------------+------------+-----------+--------------+------------------------+
1 row in set (0.00 sec)

While INFORMATION_SCHEMA.CLIENT_STATISTICS and INFORMATION_SCHEMA.THREAD_STATISTICS are not affected.