Skip to content
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

make sure to add necessary bindvars when preparing queries #7493

Merged
merged 1 commit into from Feb 16, 2021

Conversation

systay
Copy link
Collaborator

@systay systay commented Feb 15, 2021

Fixes #7379

Some queries need extra bindvars injected before executing. The error here was that for the field type query during PREPARE, we were not setting all the required bindvars.

Signed-off-by: Andres Taylor andres@planetscale.com

Signed-off-by: Andres Taylor <andres@planetscale.com>
Comment on lines +2187 to +2191
sql := "select database()"
_, err := executorPrepare(executor, sql, map[string]*querypb.BindVariable{})
require.NoError(t, err)
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could assert that the bindvars were added.

@systay systay merged commit ece9517 into vitessio:master Feb 16, 2021
@systay systay deleted the fix-7379 branch February 16, 2021 06:06
@askdba askdba added this to the v10.0 milestone Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vtgate: query arguments missing for __vtdbname
3 participants