Skip to content

Evaluate system variables#6708

Merged
systay merged 9 commits intovitessio:masterfrom
planetscale:evaluate-sysvars
Sep 17, 2020
Merged

Evaluate system variables#6708
systay merged 9 commits intovitessio:masterfrom
planetscale:evaluate-sysvars

Conversation

@systay
Copy link
Copy Markdown
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>
…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