-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
component/statisticssig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
- Start a TiDB cluster:
tiup playground v8.5.1
- Run the below queries and do the same operation 1 million times.
CREATE DATABASE IF NOT EXISTS test;
USE test;
CREATE TABLE sbtest (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL
)
PARTITION BY RANGE (id) (
PARTITION p0 VALUES LESS THAN (100),
PARTITION p1 VALUES LESS THAN (200),
PARTITION p2 VALUES LESS THAN (300),
PARTITION p3 VALUES LESS THAN (400)
);
INSERT INTO sbtest (name) VALUES ('Test1'), ('Test2'), ('Test3'), ('Test4');
ANALYZE TABLE sbtest;
CREATE TABLE sbtest_new LIKE sbtest;
INSERT INTO sbtest_new SELECT * FROM sbtest;
DROP TABLE sbtest;
ALTER TABLE sbtest_new RENAME TO sbtest;
ANALYZE TABLE sbtest;
- Check how many rows in the mysql.stats_meta table:
select * from mysql.stats_meta
- Wait for 20 minutes and check again:
select * from mysql.stats_meta
2. What did you expect to see? (Required)
The old table's metadata has been deleted.
3. What did you see instead (Required)
It is still in the mysql.stats_meta table.
4. What is your TiDB version? (Required)
v8.5.1
Metadata
Metadata
Assignees
Labels
component/statisticssig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.