tidb
tidb copied to clipboard
executor,infoschema: Change column type on information_schema.CLUSTER_INFO
What problem does this PR solve?
The START_TIME
column of information_schema.CLUSTER_INFO
was a VARCHAR
with values like 2021-11-15T07:32:19+01:00
. This changes the column to be a MySQL datetime format.
What is changed and how it works?
Check List
Tests
- [ ] Unit test
- [ ] Integration test
- [x] Manual test (add detailed scripts or steps below)
- [ ] No code
Side effects
- [ ] Performance regression: Consumes more CPU
- [ ] Performance regression: Consumes more Memory
- [x] Breaking backward compatibility
Documentation
- [x] Affects user behaviors
- [ ] Contains syntax changes
- [ ] Contains variable changes
- [ ] Contains experimental features
- [ ] Changes MySQL compatibility
Release note
The type of the `START_TIME` column of the `CLUSTER_INFO` table in the `information_schema` was changed from a `VARCHAR` to `DATETIME`.
[REVIEW NOTIFICATION]
This pull request has been approved by:
- morgo
To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer
in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer
in the comment to help you merge this pull request.
The full list of commands accepted by this bot can be found here.
Reviewer can indicate their review by submitting an approval review. Reviewer can cancel approval by submitting a request changes review.
/cc @yzwqf @crazycs520
@dveeden: GitHub didn't allow me to request PR reviews from the following users: yzwqf.
Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs.
In response to this:
/cc @yzwqf @crazycs520
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/cc @morgo
Is it ok to remove the suffix
+08:00
?
I think it is. Do you see any problem with that?
Is it ok to remove the suffix
+08:00
?I think it is. Do you see any problem with that?
I'm not sure, maybe we should request other people to review it.
@wjhuang2016 Any suggestions for additional reviewers?
[FORMAT CHECKER NOTIFICATION]
Notice: To remove the do-not-merge/needs-linked-issue
label, please provide the linked issue number on one line in the PR body, for example: Issue Number: close #123
or Issue Number: ref #456
.
:open_book: For more info, you can check the "Contribute Code" section in the development guide.
Is it possible to create a test case for this PR?
done
Without this PR:
mysql> SELECT START_TIME+1 FROM information_schema.CLUSTER_INFO;
+--------------+
| START_TIME+1 |
+--------------+
| 2024 |
| 1 |
+--------------+
2 rows in set, 1 warning (0.00 sec)
mysql> SHOW WARNINGS;
+---------+------+---------------------------------------------------------------+
| Level | Code | Message |
+---------+------+---------------------------------------------------------------+
| Warning | 1292 | Truncated incorrect DOUBLE value: '2023-07-06T13:52:40+02:00' |
+---------+------+---------------------------------------------------------------+
1 row in set (0.00 sec)
$ mysql --comments --host 127.0.0.1 --port 4000 -u root --column-type-info
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.25-TiDB-v7.3.0-alpha-137-g8c71149116 TiDB Server (Apache License 2.0) Community Edition, MySQL 8.0 compatible
Copyright (c) 2000, 2023, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SELECT START_TIME FROM information_schema.CLUSTER_INFO;
Field 1: `START_TIME`
Catalog: `def`
Database: `information_schema`
Table: `CLUSTER_INFO`
Org_table: `CLUSTER_INFO`
Type: DATETIME
Collation: binary (63)
Length: 19
Max_length: 19
Decimals: 0
Flags:
+---------------------+
| START_TIME |
+---------------------+
| 2023-07-06 14:58:14 |
| 0000-00-00 00:00:00 |
+---------------------+
2 rows in set (0.00 sec)
With TiKV:
mysql> SELECT TIMESTAMPDIFF(SECOND, START_TIME, CURRENT_TIMESTAMP) FROM information_schema.CLUSTER_INFO;
+------------------------------------------------------+
| TIMESTAMPDIFF(SECOND, START_TIME, CURRENT_TIMESTAMP) |
+------------------------------------------------------+
| 14 |
| 25 |
| 24 |
+------------------------------------------------------+
3 rows in set (0.00 sec)
With unistore there is a zero datetime in there, which causes some problems.
Update: This is fixed
/retest
@dveeden: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test
message.
In response to this:
/retest
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/ok-to-test
And pls fixed TestTiDBClusterInfo
test case
And pls fixed
TestTiDBClusterInfo
test case
Done
/test mysql-test
@dveeden: The specified target(s) for /test
were not found.
The following commands are available to trigger required jobs:
-
/test tiprow_fast_test
Use /test all
to run all jobs.
In response to this:
/test mysql-test
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/retest
Codecov Report
Merging #29771 (ddbe621) into master (3d176fc) will increase coverage by
1.5331%
. Report is 11 commits behind head on master. The diff coverage is100.0000%
.
Additional details and impacted files
@@ Coverage Diff @@
## master #29771 +/- ##
================================================
+ Coverage 71.1018% 72.6349% +1.5330%
================================================
Files 1365 1389 +24
Lines 404348 414551 +10203
================================================
+ Hits 287499 301109 +13610
+ Misses 96883 94539 -2344
+ Partials 19966 18903 -1063
Flag | Coverage Δ | |
---|---|---|
integration | 43.9944% <0.0000%> (?) |
|
unit | 71.1115% <100.0000%> (+0.0096%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Components | Coverage Δ | |
---|---|---|
dumpling | 53.9874% <ø> (ø) |
|
parser | ∅ <ø> (∅) |
|
br | 48.3831% <ø> (-4.7056%) |
:arrow_down: |
/retest
/test unit-test
@dveeden: The specified target(s) for /test
were not found.
The following commands are available to trigger required jobs:
-
/test tiprow_fast_test
Use /test all
to run all jobs.
In response to this:
/test unit-test
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: crazycs520, morgo, wjhuang2016
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [crazycs520,morgo,wjhuang2016]
- ~~pkg/infoschema/OWNERS~~ [wjhuang2016]
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
[LGTM Timeline notifier]
Timeline:
-
2023-11-17 12:44:38.981266244 +0000 UTC m=+4425876.568376391
: :ballot_box_with_check: agreed by wjhuang2016. -
2023-11-22 07:48:01.896411016 +0000 UTC m=+390510.561637208
: :ballot_box_with_check: agreed by crazycs520.
@dveeden: The following tests failed, say /retest
to rerun all failed tests or /retest-required
to rerun all mandatory failed tests:
Test name | Commit | Details | Required | Rerun command |
---|---|---|---|---|
pull-br-integration-test | 54d5206f6c5b94d1b109f24d9c1bc6b45f1bc4ef | link | true | /test pull-br-integration-test |
idc-jenkins-ci-tidb/unit-test | ddbe621fc3c5f4117ac367bdb832657ddafc5743 | link | unknown | /test unit-test |
Full PR test history. Your PR dashboard.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.
/retest