-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix sqlSelectLimit propagating to subqueries #18716
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
Open
ghostframe
wants to merge
1
commit into
vitessio:main
Choose a base branch
from
ghostframe:fix-limit-propagates-to-subqueries
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
fix sqlSelectLimit propagating to subqueries #18716
ghostframe
wants to merge
1
commit into
vitessio:main
from
ghostframe:fix-limit-propagates-to-subqueries
Conversation
This file contains hidden or 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
|
Signed-off-by: ghostframe <[email protected]>
fcbeb1e to
9048039
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #18716 +/- ##
==========================================
+ Coverage 67.49% 67.50% +0.01%
==========================================
Files 1606 1606
Lines 263729 263729
==========================================
+ Hits 178009 178040 +31
+ Misses 85720 85689 -31 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
timvaillancourt
approved these changes
Oct 17, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Backport to: release-22.0
Needs to be backport to release-22.0
Backport to: release-23.0
Needs to be backport to release-23.0
Component: VTGate
Component: VTTablet
Type: Bug
Type: Compatibility Bug
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
Addresses #9408
Setting SQL SELECT LIMIT through session variables or JDBC's .setMaxRows method, both apply to subqueries which yields erroneous results.
This query on its own, returns 3:
If you do
SET SESSION sql_select_limit = 1, run it again, then it returns 1, which is wrong - this is applying a LIMIT to the subquery instead.With the fixed branch ,it doesn't.
This is a long shot at fixing it, first PR here so please let me know of any edge cases
Related Issue(s)
Checklist
Deployment Notes
none
AI Disclosure
No AI used