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

CLUSTER_INFO START_TIME column doesn't have native time format #45221

Closed
dveeden opened this issue Jul 6, 2023 · 0 comments · Fixed by #29771
Closed

CLUSTER_INFO START_TIME column doesn't have native time format #45221

dveeden opened this issue Jul 6, 2023 · 0 comments · Fixed by #29771
Assignees
Labels
severity/minor sig/sql-infra SIG: SQL Infra type/bug This issue is a bug.

Comments

@dveeden
Copy link
Contributor

dveeden commented Jul 6, 2023

Bug Report

The START_TIME column of the information_schema.CLUSTER_INFO table has a string that also isn't in MySQL timestamp format. Would be better to have this column as a real timestamp or date format.

1. Minimal reproduce step (Required)

mysql> SET @a:=CURRENT_TIMESTAMP(); DO SLEEP(5); SELECT TIMESTAMPDIFF(SECOND, @a, CURRENT_TIMESTAMP);
Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (5.01 sec)

+----------------------------------------------+
| TIMESTAMPDIFF(SECOND, @a, CURRENT_TIMESTAMP) |
+----------------------------------------------+
|                                            5 |
+----------------------------------------------+
1 row in set (0.01 sec)

mysql> SELECT START_TIME, TIMESTAMPDIFF(SECOND, START_TIME, CURRENT_TIMESTAMP) FROM information_schema.CLUSTER_INFO WHERE START_TIME<>'';
+---------------------------+------------------------------------------------------+
| START_TIME                | TIMESTAMPDIFF(SECOND, START_TIME, CURRENT_TIMESTAMP) |
+---------------------------+------------------------------------------------------+
| 2023-07-06T14:49:46+02:00 |                                                    0 |
+---------------------------+------------------------------------------------------+
1 row in set (0.01 sec)

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

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

mysql> SELECT TIDB_VERSION()\G
*************************** 1. row ***************************
TIDB_VERSION(): Release Version: v7.3.0-alpha-128-g967699a509
Edition: Community
Git Commit Hash: 967699a50938848bcd3504a43856d5487af2d0b3
Git Branch: master
UTC Build Time: 2023-07-06 12:42:35
GoVersion: go1.20.5
Race Enabled: false
Check Table Before Drop: false
Store: unistore
1 row in set (0.00 sec)

Related:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/minor sig/sql-infra SIG: SQL Infra type/bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants