-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Support last_insert_id()
with argument
#17295
Open
systay
wants to merge
5
commits into
vitessio:main
Choose a base branch
from
planetscale:last-insert-id-with-args
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+445
−31
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
vitess-bot
bot
added
NeedsBackportReason
If backport labels have been applied to a PR, a justification is required
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsIssue
A linked issue is missing for this Pull Request
NeedsWebsiteDocsUpdate
What it says
labels
Nov 28, 2024
systay
added
Type: Feature
Component: Query Serving
and removed
NeedsDescriptionUpdate
The description is not clear or comprehensive enough, and needs work
NeedsWebsiteDocsUpdate
What it says
NeedsIssue
A linked issue is missing for this Pull Request
NeedsBackportReason
If backport labels have been applied to a PR, a justification is required
labels
Nov 28, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17295 +/- ##
==========================================
- Coverage 67.40% 67.40% -0.01%
==========================================
Files 1574 1576 +2
Lines 253221 253405 +184
==========================================
+ Hits 170690 170795 +105
- Misses 82531 82610 +79 ☔ View full report in Codecov by Sentry. |
systay
changed the title
feat: make last_insert_id with argument work for sharded plans
Support Nov 28, 2024
last_insert_id()
with argument
systay
requested review from
harshit-gangal,
frouioui,
GuptaManan100,
arthurschreiber and
deepthi
as code owners
November 28, 2024 16:44
Signed-off-by: Andres Taylor <[email protected]>
…nsharded select queries Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
systay
force-pushed
the
last-insert-id-with-args
branch
from
November 28, 2024 17:01
8871387
to
2792a28
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for
LAST_INSERT_ID(expr)
in Vitess. The feature allows the argumentexpr
to be evaluated and stored as the session’s last insert ID, aligning with MySQL’s behavior. This extends Vitess’ compatibility for queries that rely on setting or retrieving session-level last insert ID values programmatically.Note: this implementation only handles this correctly when
last_insert_id(expr)
was used in one of the SELECT expressions. It's not supported in DMLs or in the WHERE/GROUP BY/ORDER BY clauses.Related Issue(s)
Fixes #6087
Checklist