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

DDL reorg does not respect @@timestamp variable #56066

Open
lcwangchao opened this issue Sep 13, 2024 · 0 comments
Open

DDL reorg does not respect @@timestamp variable #56066

lcwangchao opened this issue Sep 13, 2024 · 0 comments
Labels
component/ddl This issue is related to DDL of TiDB. severity/moderate type/bug The issue is confirmed as a bug.

Comments

@lcwangchao
Copy link
Collaborator

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

> set @@time_zone='UTC';
> create table t(a int);
> insert into t values(NULL);
> set @@timestamp=36000;
> alter table t modify column a timestamp not null;
> select a from t;

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

In MySQL:

mysql> select a from t;
+---------------------+
| a                   |
+---------------------+
| 1970-01-01 10:00:00 |
+---------------------+

3. What did you see instead (Required)

In TiDB, it still use the system time ignoring the @@timestamp

> select a from t;
+---------------------+
| a                   |
+---------------------+
| 2024-09-13 12:42:49 |
+---------------------+

4. What is your TiDB version? (Required)

t> select tidb_version();
+-----------------------------------------------------------+
| tidb_version()                                            |
+-----------------------------------------------------------+
| Release Version: v8.2.0                                   |
| Edition: Community                                        |
| Git Commit Hash: 821e491a20fbab36604b36b647b5bae26a2c1418 |
| Git Branch: HEAD                                          |
| UTC Build Time: 2024-07-05 09:16:37                       |
| GoVersion: go1.21.10                                      |
| Race Enabled: false                                       |
| Check Table Before Drop: false                            |
| Store: tikv                                               |
+-----------------------------------------------------------+

But I think it affects all versions of tidb

@lcwangchao lcwangchao added type/bug The issue is confirmed as a bug. severity/moderate component/ddl This issue is related to DDL of TiDB. labels Sep 13, 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. severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

1 participant