-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
expressions: make time func now related unit tests stable(#11412)(#11342) #11394
Conversation
/run-all-tests |
/run-unit-test-tests |
/run-all-tests |
eh .. seems tidb-test mysql-test failed, there should be a release branch "release-3.0" for "tidb-test" proj. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-integration-common-test |
/run-all-tests |
/run-all-tests |
/run-unit-test-tests |
/run-unit-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
seems 3.0 release client_fail_test still not fixed? |
[2019-08-01T02:54:37.232Z] FAIL: region_request_test.go:95: testRegionRequestSuite.TestOnSendFailedWithCloseKnownStoreThenUseNewOne |
Please resolve the conflicts, @cfzjywxk . |
/run-all-tests |
/run-unit-test |
@lamxTyler PTAL |
/run-all-tests |
/run-unit-test |
/run-unit-test |
1 similar comment
/run-unit-test |
What problem does this PR solve?
cherry-pick for #11342.
MySQL will set time to “”time_cache“ structure before doing one command(COM_XXX)
later expresission calculation will use this timestamp as time value
TiDB logic different and default column calculation and now expr calculation will try to get timestamp twice.
more details see jira issue#4391
eg:
TiDB
CREATE TABLE tt4 (
c1 timestamp DEFAULT CURRENT_TIMESTAMP,
c2 int(11) DEFAULT NULL,
c3 timestamp DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
insert into tt4 set c1 = current_timestamp, c2 = sleep(2);
mysql> select c1 = c3 from tt4;
+---------+
| c1 = c3 |
+---------+
| 0 |
+---------+
1 row in set (0.00 sec)
MySQL
insert into tt4 set c1 = current_timestamp, c2 = sleep(2);
select c1 = c3 from tt4;
+---------+
| c1 = c3 |
+---------+
| 1 |
+---------+
1 row in set (0.00 sec)
remove stmtCtx.sysTs unused variable
cache time value once in stmtCtx.nowTs
refactor nowTs usage, offer Unified function interface for get and reset nowTS. Generally, accessing variable directly is not a good way for further maintenance, refactor these usage code
What is changed and how it works?
Check List
Tests
Code changes
Side effects
Related changes