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

The result of show variables is not compatible with MySQL #9357

Closed
zimulala opened this issue Feb 19, 2019 · 1 comment
Closed

The result of show variables is not compatible with MySQL #9357

zimulala opened this issue Feb 19, 2019 · 1 comment
Labels
duplicate Issues or pull requests already exists. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/compatibility

Comments

@zimulala
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
select @@global.sql_log_bin;
show variables like "sql_log_bin";
  1. What did you expect to see?
    Your MySQL connection id is 172
    Server version: 5.7.20 Homebrew
mysql> select @@global.sql_log_bin;
+----------------------+
| @@global.sql_log_bin |
+----------------------+
|                    1 |
+----------------------+
1 row in set, 1 warning (0.00 sec)

mysql> show variables like "sql_log_bin";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| sql_log_bin   | ON    |
+---------------+-------+
1 row in set (0.00 sec)
  1. What did you see instead?
tidb> select @@global.sql_log_bin;
+----------------------+
| @@global.sql_log_bin |
+----------------------+
| 1                    |
+----------------------+
1 row in set (0.00 sec)

tidb> show variables like "sql_log_bin";
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| sql_log_bin   | 1     |
+---------------+-------+
1 row in set (0.02 sec)
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
    Release Version: v3.0.0-beta-69-g84d1513b0-dirty
    Git Commit Hash: 84d1513
    Git Branch: master
@zimulala zimulala added type/compatibility help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Feb 19, 2019
@ghost ghost added the duplicate Issues or pull requests already exists. label Aug 3, 2020
@ghost
Copy link

ghost commented Aug 3, 2020

This is a duplicate of #15131

It requires a type system for system variables, so that depending on context of @@ or show variables the value can be returned correctly.

I am going to close this to reduce duplication.

@ghost ghost closed this as completed Aug 3, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues or pull requests already exists. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/compatibility
Projects
None yet
Development

No branches or pull requests

1 participant