[openxs@chief p5.1]$ bin/mysql --no-defaults -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.68 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create table t1 (id int primary key) engine=InnoDB;
Query OK, 0 rows affected (0.07 sec)
mysql> create table p1 (id int primary key) engine=InnoDB partition by hash(id) partitions 8;
Query OK, 0 rows affected (0.11 sec)
mysql> set global userstat=1;
ERROR 1193 (HY000): Unknown system variable 'userstat'
mysql> set global userstat_running=1;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from t1;
+-----+
| id |
+-----+
| 2 |
| 3 |
| 4 |
| 33 |
| 100 |
+-----+
5 rows in set (0.00 sec)
mysql> select * from p1;
+-----+
| id |
+-----+
| 2 |
| 3 |
| 4 |
| 33 |
| 100 |
+-----+
5 rows in set (0.00 sec)
mysql> select * from INFORMATION_SCHEMA.INDEX_STATISTICS;
+--------------+------------+------------+-----------+
| TABLE_SCHEMA | TABLE_NAME | INDEX_NAME | ROWS_READ |
+--------------+------------+------------+-----------+
| test | t1 | PRIMARY | 5 |
+--------------+------------+------------+-----------+
1 row in set (0.00 sec)
mysql> select * from INFORMATION_SCHEMA.TABLE_STATISTICS;
+--------------+------------+-----------+--------------+------------------------+
| TABLE_SCHEMA | TABLE_NAME | ROWS_READ | ROWS_CHANGED | ROWS_CHANGED_X_INDEXES |
+--------------+------------+-----------+--------------+------------------------+
| test | t1 | 5 | 0 | 0 |
+--------------+------------+-----------+--------------+------------------------+
1 row in set (0.00 sec)
PS 5.1 is also affected:
[openxs@chief p5.1]$ bin/mysql --no-defaults -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.68 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create table t1 (id int primary key) engine=InnoDB;
Query OK, 0 rows affected (0.07 sec)
mysql> create table p1 (id int primary key) engine=InnoDB partition by hash(id) partitions 8;
Query OK, 0 rows affected (0.11 sec)
mysql> insert into t1 values (2), (33), (3), (100), (4);
Query OK, 5 rows affected (0.01 sec)
Records: 5 Duplicates: 0 Warnings: 0
mysql> insert into p1 values (2), (33), (3), (100), (4);
Query OK, 5 rows affected (0.01 sec)
Records: 5 Duplicates: 0 Warnings: 0
mysql> set global userstat=1;
ERROR 1193 (HY000): Unknown system variable 'userstat'
mysql> set global userstat_running=1;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from t1;
+-----+
| id |
+-----+
| 2 |
| 3 |
| 4 |
| 33 |
| 100 |
+-----+
5 rows in set (0.00 sec)
mysql> select * from p1;
+-----+
| id |
+-----+
| 2 |
| 3 |
| 4 |
| 33 |
| 100 |
+-----+
5 rows in set (0.00 sec)
mysql> select * from INFORMATION_ SCHEMA. INDEX_STATISTIC S; ------- -+----- ------- +------ ------+ ------- ----+ ------- -+----- ------- +------ ------+ ------- ----+ ------- -+----- ------- +------ ------+ ------- ----+
+------
| TABLE_SCHEMA | TABLE_NAME | INDEX_NAME | ROWS_READ |
+------
| test | t1 | PRIMARY | 5 |
+------
1 row in set (0.00 sec)
mysql> select * from INFORMATION_ SCHEMA. TABLE_STATISTIC S; ------- -+----- ------- +------ -----+- ------- ------+ ------- ------- ------- ---+ X_INDEXES | ------- -+----- ------- +------ -----+- ------- ------+ ------- ------- ------- ---+ ------- -+----- ------- +------ -----+- ------- ------+ ------- ------- ------- ---+
+------
| TABLE_SCHEMA | TABLE_NAME | ROWS_READ | ROWS_CHANGED | ROWS_CHANGED_
+------
| test | t1 | 5 | 0 | 0 |
+------
1 row in set (0.00 sec)