-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
severity/moderatesig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
1. Minimal reproduce step (Required)
-
Start TiDB cluster: tiup playground v8.0.0
-
Enable tidb_enable_column_tracking:
mysql> set global tidb_enable_column_tracking=1;
Query OK, 0 rows affected (0.02 sec)
mysql> select @@tidb_enable_column_tracking;
+-------------------------------+
| @@tidb_enable_column_tracking |
+-------------------------------+
| 1 |
+-------------------------------+
```sql
3. Create a table:
create table t (a int, b int);
4. Select the table:
select * from t where t.a > 1;
5. Wait for about 5m:
```sql
mysql> select * from mysql.column_stats_usage;
+----------+-----------+---------------------+------------------+
| table_id | column_id | last_used_at | last_analyzed_at |
+----------+-----------+---------------------+------------------+
| 104 | 1 | 2024-04-18 15:59:07 | NULL |
+----------+-----------+---------------------+------------------+
1 row in set (0.00 sec)
- Select a system table:
select * from mysql.column_stats_usage where column_id > 0; - Wait for another 5m:
mysql> select * from mysql.column_stats_usage;
+----------+-----------+---------------------+------------------+
| table_id | column_id | last_used_at | last_analyzed_at |
+----------+-----------+---------------------+------------------+
| 54 | 2 | 2024-04-18 16:02:00 | NULL |
| 104 | 1 | 2024-04-18 15:59:07 | NULL |
+----------+-----------+---------------------+------------------+
2 rows in set (0.00 sec)
- As you can see, we have a new record for the system table: column_stats_usage.
2. What did you expect to see? (Required)
There are no system tables.
3. What did you see instead (Required)
We collected system tables.
4. What is your TiDB version? (Required)
v8.0.0
Metadata
Metadata
Assignees
Labels
severity/moderatesig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.