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

SET planning #6487

Merged
merged 19 commits into from
Aug 20, 2020
Merged

SET planning #6487

merged 19 commits into from
Aug 20, 2020

Conversation

systay
Copy link
Collaborator

@systay systay commented Jul 28, 2020

This PR enhances the planner so that we can plan SETting system variables that change Vitess' behaviour. It's the last important part of SET planning that was missing.

The settings that are now being handled by planning are:

autocommit
client_found_rows
skip_query_plan_cache
tx_read_only
transaction_read_only
sql_select_limit
transaction_mode
workload
charset
names

systay and others added 3 commits August 10, 2020 12:32
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
When evaluating expressions, MySQL has special rules
when the expression is on the RHS of a system setting
that is a boolean, such as:

   set autocommit = on

In these cases, expressions that would have been handled
as columns are instead treated as string literals. This
change tries to mimic this behaviour.

Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
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 and others added 6 commits August 12, 2020 15:56
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
…error

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
@harshit-gangal harshit-gangal marked this pull request as ready for review August 14, 2020 09:12
Comment on lines 69 to 70
in: "@@session.x.foo = 42",
expected: "session `x.foo` = 42",
Copy link
Member

Choose a reason for hiding this comment

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

same test cases added twice.

Copy link
Contributor

@sougou sougou left a comment

Choose a reason for hiding this comment

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

Looks good from eyeballing. I'll let @harshit-gangal do the nit-picking.
The PR does need a detailed comment.

Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
@harshit-gangal harshit-gangal merged commit 600fba4 into vitessio:master Aug 20, 2020
@harshit-gangal harshit-gangal deleted the sysset-vitess-aware branch August 20, 2020 12:49
@deepthi deepthi added this to the v8.0 milestone Sep 22, 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.

4 participants