Skip to content
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

Insert useless key range when add index finished #55014

Closed
Defined2014 opened this issue Jul 29, 2024 · 0 comments · Fixed by #55020
Closed

Insert useless key range when add index finished #55014

Defined2014 opened this issue Jul 29, 2024 · 0 comments · Fixed by #55020
Assignees
Labels
component/ddl This issue is related to DDL of TiDB. component/tablepartition This issue is related to Table Partition of TiDB. severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@Defined2014
Copy link
Contributor

Defined2014 commented Jul 29, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

set tidb_enable_global_index = true;
create table t(a int, b int) partition by hash(b) partitions 64;
alter table t add unique index idx(a);
select count(*) from mysql.gc_delete_range_done group by job_id order by job_id desc limit 1;

2. What did you expect to see? (Required)

mysql> select count(*) from mysql.gc_delete_range_done group by job_id order by job_id desc limit 1;
+----------+
| count(*) |
+----------+
|        1 |
+----------+
1 row in set (0.03 sec)

3. What did you see instead (Required)

mysql> select count(*) from mysql.gc_delete_range_done group by job_id order by job_id desc limit 1;
+----------+
| count(*) |
+----------+
|       64 |
+----------+
1 row in set (0.03 sec)

4. What is your TiDB version? (Required)

mysql> select tidb_version();
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                 |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v8.2.0-alpha-320-g5c0d73719b-dirty
Edition: Community
Git Commit Hash: 5c0d73719b10f98ad198afb90e7a1f21e3ff4c24
Git Branch: master
UTC Build Time: 2024-06-25 10:37:01
GoVersion: go1.21.0
Race Enabled: false
Check Table Before Drop: false
Store: unistore |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
@Defined2014 Defined2014 added type/bug The issue is confirmed as a bug. sig/sql-infra SIG: SQL Infra severity/moderate component/tablepartition This issue is related to Table Partition of TiDB. component/ddl This issue is related to DDL of TiDB. labels Jul 29, 2024
@Defined2014 Defined2014 self-assigned this Jul 29, 2024
@ti-chi-bot ti-chi-bot bot closed this as completed in 0ad2ca6 Jul 31, 2024
hawkingrei pushed a commit to hawkingrei/tidb that referenced this issue Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/ddl This issue is related to DDL of TiDB. component/tablepartition This issue is related to Table Partition of TiDB. severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant