-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
session: refactor non-transactional DML to make it ready for more DML types #38197
Conversation
Signed-off-by: ekexium <[email protected]>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
68cf5a2
to
06713d6
Compare
Signed-off-by: ekexium <[email protected]>
06713d6
to
1e35121
Compare
Signed-off-by: ekexium <[email protected]>
Signed-off-by: ekexium <[email protected]>
Emm, is it really just a refactoring? I think it supports |
Yes. It's not a full implementation though. I'd prefer merge the part first so that following work on |
Signed-off-by: ekexium <[email protected]>
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. Please fix the conflicts.
/run-build |
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.
rest LGTM
tk.MustQuery(fmt.Sprintf("batch on a limit %d update t set b = b * 2", c.batchSize)).Check(testkit.Rows(fmt.Sprintf("%d all succeeded", (c.tableSize+c.batchSize-1)/c.batchSize))) | ||
tk.MustQuery("select coalesce(sum(b), 0) from t").Check(testkit.Rows(fmt.Sprintf("%d", (c.tableSize-1)*c.tableSize*2))) | ||
tk.MustQuery(fmt.Sprintf("batch on a limit %d delete from t", c.batchSize)).Check(testkit.Rows(fmt.Sprintf("%d all succeeded", (c.tableSize+c.batchSize-1)/c.batchSize))) | ||
tk.MustQuery("select count(*) from t").Check(testkit.Rows("0")) |
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.
Make a line break here.
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.
Sorry I didn't get it. What is a line break for?
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.
The lines here are too long(not fully displayed on my screen).
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.
OK that makes sense. I used to turn on the auto hard wrap. But it always changes existing code that I'd rather not touch in a PR. Sadly we don't have a hard standard for this :(
Signed-off-by: ekexium <[email protected]>
Signed-off-by: ekexium <[email protected]>
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 1e1c440
|
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 438fa3d
|
/run-check_dev_2 |
TiDB MergeCI notify✅ Well Done! New fixed [1] after this pr merged.
|
Signed-off-by: ekexium [email protected]
What problem does this PR solve?
Issue Number: ref #33485
Problem Summary:
To support
update
andinsert into select
later, first refactor the existing code specific todelete
.What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.