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

VitessAware system variables of type boolean return NULL when the query is not passed to MySQL #7301

Closed
frouioui opened this issue Jan 15, 2021 · 0 comments · Fixed by #7353
Labels
Component: Query Serving good first issue Good issue for new contributors

Comments

@frouioui
Copy link
Member

Overview of the Issue

When a query selects VitessAware system variables, without passing the query down to MySQL. A value of type NULL is returned.

This issue applies to boolean-typed variables.

Whenever the query implies being sent down to MySQL, the variable's value is correctly returned.

Reproduction Steps

Steps to reproduce this issue:

  1. Set the value of the, for instance, autocommit variable:
mysql> set @@autocommit = 1;
Query OK, 0 rows affected (0.00 sec)

Can also be set with on.

  1. Select the variable:
mysql> select @@autocommit;
+--------------+
| @@autocommit |
+--------------+
|         NULL |
+--------------+
1 row in set (0.01 sec)
  1. Test the correct behavior, by selecting from a table:
mysql> select @@autocommit from corder;
+--------------+
| @@autocommit |
+--------------+
|            1 |
|            1 |
|            1 |
|            1 |
|            1 |
+--------------+
5 rows in set (0.00 sec)

Binary version

Version: 36110d81b (Git branch 'master') built on Fri Jan 15 16:45:21 CET 2021 by [email protected] using go1.15.5 darwin/amd64

Operating system and Environment details

Ran on the 101 local example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Query Serving good first issue Good issue for new contributors
Projects
None yet
2 participants