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

information_schema.variables_info DEFAULT_VALUE is incorrect #49461

Closed
together-wang opened this issue Dec 14, 2023 · 1 comment · Fixed by #49524
Closed

information_schema.variables_info DEFAULT_VALUE is incorrect #49461

together-wang opened this issue Dec 14, 2023 · 1 comment · Fixed by #49524
Assignees
Labels
affects-6.5 affects-7.1 affects-7.5 first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. found/gs found by gs help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. severity/minor sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@together-wang
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use variables_info to select DEFAULT_VALUE is incorrect.
for example tidb_enable_1pc and tidb_enable_async_commit's DEFAULT is on

mysql> select * from information_schema.variables_info where variable_name in ('tidb_enable_async_commit','tidb_enable_1pc');
+--------------------------+----------------+---------------+---------------+-----------+-----------+-----------------+---------+
| VARIABLE_NAME            | VARIABLE_SCOPE | DEFAULT_VALUE | CURRENT_VALUE | MIN_VALUE | MAX_VALUE | POSSIBLE_VALUES | IS_NOOP |
+--------------------------+----------------+---------------+---------------+-----------+-----------+-----------------+---------+
| tidb_enable_async_commit | SESSION,GLOBAL | OFF           | ON            |      NULL |      NULL | NULL            | NO      |
| tidb_enable_1pc          | SESSION,GLOBAL | OFF           | ON            |      NULL |      NULL | NULL            | NO      |
+--------------------------+----------------+---------------+---------------+-----------+-----------+-----------------+---------+
2 rows in set (0.01 sec)

mysql> show variables like 'tidb_enable_async_commit';
+--------------------------+-------+
| Variable_name            | Value |
+--------------------------+-------+
| tidb_enable_async_commit | ON    |
+--------------------------+-------+
1 row in set (0.01 sec)

mysql> show variables like 'tidb_enable_1pc';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| tidb_enable_1pc | ON    |
+-----------------+-------+
1 row in set (0.00 sec)

2. What did you expect to see? (Required)

information_schema.variables_info DEFAULT_VALUE show correctly

3. What did you see instead (Required)

image

4. What is your TiDB version? (Required)

master

mysql> select tidb_version();
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                             |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v7.6.0-alpha
Edition: Community
Git Commit Hash: 918df0ae50568ebc54bd6d89f2d9a49bc9b79b06
Git Branch: heads/refs/tags/v7.6.0-alpha
UTC Build Time: 2023-12-14 04:07:56
GoVersion: go1.21.5
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
@together-wang together-wang added the type/bug The issue is confirmed as a bug. label Dec 14, 2023
@together-wang
Copy link
Author

/found gs

@ti-chi-bot ti-chi-bot bot added the found/gs found by gs label Dec 14, 2023
@seiya-annie seiya-annie added the sig/sql-infra SIG: SQL Infra label Dec 17, 2023
@djshow832 djshow832 added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. labels Dec 22, 2023
ti-chi-bot bot pushed a commit that referenced this issue Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 affects-7.1 affects-7.5 first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. found/gs found by gs help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. severity/minor sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants