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

Rename partitioned table may leave some partition on the old database #9132

Closed
JaySon-Huang opened this issue Jun 7, 2024 · 0 comments · Fixed by #9133
Closed

Rename partitioned table may leave some partition on the old database #9132

JaySon-Huang opened this issue Jun 7, 2024 · 0 comments · Fixed by #9133
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. component/storage severity/major type/bug The issue is confirmed as a bug.

Comments

@JaySon-Huang
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

minimal reproduce step

CREATE TABLE employees (
    id INT NOT NULL,
    store_id INT NOT NULL
)PARTITION BY RANGE (store_id) (
    PARTITION p0 VALUES LESS THAN (6),
    PARTITION p1 VALUES LESS THAN (11),
    PARTITION p2 VALUES LESS THAN (16),
    PARTITION p3 VALUES LESS THAN (21)
);
alter table employees set tiflash replica 2;

-- (1,1),(2,2),(3,3) => p0
-- p1 is empty
-- (11,11) => p2
-- (16,16) => p3
insert into employees(id, store_id) values(1,1),(2,2),(3,3),(11,11),(16,16);
rename test.employees to mytest.employees;

original post on https://asktug.com/t/topic/1026991/34

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

All partitions are renamed to the new database and tiflash run normally

3. What did you see instead (Required)

Some partition is not renamed to the new database. If the schema of partition table changed, tiflash may fail to restart.

4. What is your TiFlash version? (Required)

v7.5.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. component/storage severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant