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

Evaluate system variables #6708

Merged
merged 9 commits into from
Sep 17, 2020
Merged

Conversation

systay
Copy link
Collaborator

@systay systay commented Sep 12, 2020

Some system variables influence Vitess' behaviour, and are kept in the session state and never sent down to the backing MySQL instances.

Earlier, if a query included the evaluation of such a system variable, for example in an simple query like:

select @@transaction_mode

Vitess didn't handle these expressions, and they were simply sent down to the backing MySQL instance. This PR rectifies this situation and rewrites away these expressions and injects the session value instead of relying of the underlying MySQL reflecting the same state.

Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
@harshit-gangal

This comment has been minimized.

Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
@systay systay marked this pull request as ready for review September 15, 2020 05:43
Signed-off-by: Andres Taylor <andres@planetscale.com>
go/vt/vtgate/vcursor_impl.go Show resolved Hide resolved
go/vt/vtgate/executor.go Outdated Show resolved Hide resolved
go/vt/vtgate/engine/set.go Show resolved Hide resolved
go/vt/sysvars/sysvars.go Outdated Show resolved Hide resolved
…variables

Only settings which are kept in the session state, and which cannot be changed
using vtgate startup flags are supported.

Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
@systay systay merged commit 09deb7a into vitessio:master Sep 17, 2020
@systay systay deleted the evaluate-sysvars branch September 17, 2020 17:47
@askdba askdba added this to the v8.0 milestone Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants