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 null into not-null generated column leads to wrong index record #58472

Open
joechenrh opened this issue Dec 23, 2024 · 0 comments · May be fixed by #58474
Open

insert null into not-null generated column leads to wrong index record #58472

joechenrh opened this issue Dec 23, 2024 · 0 comments · May be fixed by #58474
Labels
component/ddl This issue is related to DDL of TiDB. fuzz/randomtest impact/inconsistency incorrect/inconsistency/inconsistent may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 may-affects-8.1 may-affects-8.5 severity/major type/bug The issue is confirmed as a bug.

Comments

@joechenrh
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

drop table t3;
create table t3(
    id int primary key,
    c1 varchar(16) default null,
    c2 varchar(16) GENERATED ALWAYS AS (concat(c1, c1)) VIRTUAL NOT NULL,
    KEY idx (c2)
);

insert into t3(id, c1) values(1, "aaaa");
insert ignore into t3 set id = 1, c1 = "bbbb" on duplicate key update id = 2, c1 = null;
insert into t3 set id = 2, c1 = "cccc" on duplicate key update c1 = "dddd";

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

No error.

3. What did you see instead (Required)

ERROR 8141 (HY000): assertion failed: key: 7480000000000000715f69800000000000000100038000000000000002, assertion: Exist, start_ts: 454804733357457409, existing start ts: 0, existing commit ts: 0

4. What is your TiDB version? (Required)

@joechenrh joechenrh added the type/bug The issue is confirmed as a bug. label Dec 23, 2024
@jebter jebter added severity/major component/ddl This issue is related to DDL of TiDB. impact/inconsistency incorrect/inconsistency/inconsistent labels Dec 24, 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. fuzz/randomtest impact/inconsistency incorrect/inconsistency/inconsistent may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 may-affects-8.1 may-affects-8.5 severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants