-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TiDB can not update stats correctly after drop a partition #48182
Comments
After 5 minutes: mysql> select * from mysql.stats_meta;
+--------------------+----------+--------------+-------+----------+
| version | table_id | modify_count | count | snapshot |
+--------------------+----------+--------------+-------+----------+
| 445337974970777613 | 104 | 1 | 1 | 0 |
| 445337974983884805 | 105 | 1 | 1 | 0 |
| 445337974983884818 | 102 | 3 | 3 | 0 |
+--------------------+----------+--------------+-------+----------+
3 rows in set (0.00 sec) |
I dug into the code and there are some more details about this issue:
|
Based on this design doc, we will only update the |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
create table pt(a int, b varchar(10), index idx_b (b)) partition by range(a) (partition p0 values less than (10), partition p1 values less than (20), partition p2 values less than (30));
insert into pt values (1, "a"), (11, "b"), (21, "c");
alter table pt drop partition p0;
select * from pt;
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: