-
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
Only override session.TargetString if it has not been set #5136
Only override session.TargetString if it has not been set #5136
Conversation
167334b
to
70360eb
Compare
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.
I'm confused why you still need to set c.SchemaName
and also I think a few more tests would be good to verify the behavior matches what we expect in that the use
target actually affects the query planner, not just to show the value of the vitess_target.
950b778
to
095dbd9
Compare
Signed-off-by: Jon Tirsen <[email protected]>
095dbd9
to
ad420aa
Compare
Signed-off-by: Jon Tirsen <[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.
Too bad the sandbox doesn't make it easier to properly test the keyspace-specific routing, but I agree with you this does most of what you wanted to test for the use statement.
For completeness you could test that the DbName can be overridden if invalid and cover the various other cases (prepare, etc). But I think this change is safe and straightforward enough that I wouldn't insist on the additional tests.
Yeah I agree. I spent a few hours digging into the sandbox and it doesn't look straightforward and certainly not worth the effort for this particular change. It would be nice with a more useful sandbox though! |
This fixes #5132
Signed-off-by: Jon Tirsen [email protected]