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 abnormal value for tidb_enable_noop_variables don't report error or warning #36646

Closed
seiya-annie opened this issue Jul 28, 2022 · 2 comments
Assignees
Labels
affects-6.2 severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@seiya-annie
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> SET global tidb_enable_noop_variables = 2;
Query OK, 0 rows affected (0.01 sec)

mysql> show global variables like '%tidb_enable_noop_variables%';
+----------------------------+-------+
| Variable_name              | Value |
+----------------------------+-------+
| tidb_enable_noop_variables | OFF   |
+----------------------------+-------+
1 row in set (0.00 sec)
mysql> show global variables like '%tidb_enable_noop_variables%';
+----------------------------+-------+
| Variable_name              | Value |
+----------------------------+-------+
| tidb_enable_noop_variables | OFF   |
+----------------------------+-------+
1 row in set (0.01 sec)

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

return error
ERROR 1231 (42000): Variable 'tidb_enable_noop_variables' can't be set to the value of '2'

3. What did you see instead (Required)

no error, no warning

4. What is your TiDB version? (Required)

| Release Version: v6.2.0
Edition: Community
Git Commit Hash: 65f7e2e
Git Branch: heads/refs/tags/v6.2.0
UTC Build Time: 2022-07-27 10:10:50
GoVersion: go1.18.2

@seiya-annie seiya-annie added type/bug The issue is confirmed as a bug. severity/moderate labels Jul 28, 2022
@seiya-annie seiya-annie added the sig/sql-infra SIG: SQL Infra label Jul 28, 2022
@djshow832
Copy link
Contributor

This also applies to other system variables, such as tidb_multi_statement_mode.
We need to modify them all at once.

@morgo
Copy link
Contributor

morgo commented Aug 17, 2022

This was fixed by #36647

ENUM variables can be specified by ordinal value as well (this is a MySQL compatible behavior). In latest master, it now only supports 0/1. Ideally, it should actually be changed to a TypeBool now. But that's a minor issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.2 severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

4 participants