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

Daylight saving times are not properly handled during add index #47426

Closed
tangenta opened this issue Oct 7, 2023 · 0 comments · Fixed by #47425
Closed

Daylight saving times are not properly handled during add index #47426

tangenta opened this issue Oct 7, 2023 · 0 comments · Fixed by #47425
Labels
affects-6.5 affects-7.1 affects-7.4 component/ddl This issue is related to DDL of TiDB. severity/critical type/bug The issue is confirmed as a bug.

Comments

@tangenta
Copy link
Contributor

tangenta commented Oct 7, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> create table t (a timestamp);
Query OK, 0 rows affected (0.14 sec)

mysql> SET time_zone = 'Asia/Shanghai';
Query OK, 0 rows affected (0.00 sec)

mysql> insert into t values('1991-07-21 00:00:00');
Query OK, 1 row affected (0.01 sec)

mysql> alter table t add index idx(a);
Query OK, 0 rows affected (2.72 sec)

mysql> admin check table t;
ERROR 8223 (HY000): data inconsistency in table: t, index: idx, handle: 1, index-values:"handle: 1, values: [KindMysqlTime 1991-07-20 23:00:00]" != record-values:"handle: 1, values: [KindMysqlTime 1991-07-21 00:00:00]"

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

Admin check passed.

3. What did you see instead (Required)

Admin check failed.

4. What is your TiDB version? (Required)

master 35d5765

@ti-chi-bot ti-chi-bot bot added may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 labels Oct 7, 2023
@tangenta tangenta removed may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 labels Oct 7, 2023
@jebter jebter added the component/ddl This issue is related to DDL of TiDB. label Oct 8, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 8, 2023
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this issue Oct 8, 2023
ti-chi-bot pushed a commit to ti-chi-bot/tidb that referenced this issue Oct 8, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 8, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 9, 2023
ti-chi-bot bot pushed a commit that referenced this issue Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 affects-7.1 affects-7.4 component/ddl This issue is related to DDL of TiDB. severity/critical type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants