Skip to content

make sure to add necessary bindvars when preparing queries#7493

Merged
systay merged 1 commit intovitessio:masterfrom
planetscale:fix-7379
Feb 16, 2021
Merged

make sure to add necessary bindvars when preparing queries#7493
systay merged 1 commit intovitessio:masterfrom
planetscale:fix-7379

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