Skip to content

tidb_scatter_region variable should supports setting values in both upper/lower case #57669

@River2000i

Description

@River2000i

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> set global tidb_scatter_region = "table";
Query OK, 0 rows affected (0.01 sec)

mysql> set global tidb_scatter_region = "TABLE";
ERROR 1105 (HY000): invalid value for 'TABLE', it should be either '', 'table' or 'global'
mysql> set global tidb_scatter_region = "global";
Query OK, 0 rows affected (0.01 sec)

mysql> set global tidb_scatter_region = "GLOBAL";
ERROR 1105 (HY000): invalid value for 'GLOBAL', it should be either '', 'table' or 'global'
mysql> select @@tidb_scatter_region;
+-----------------------+
| @@tidb_scatter_region |
+-----------------------+
|                       |
+-----------------------+
1 row in set (0.00 sec)

mysql> set session tidb_scatter_region = "GLOBAL";
ERROR 1105 (HY000): invalid value for 'GLOBAL', it should be either '', 'table' or 'global'
mysql> set session tidb_scatter_region = "global";
Query OK, 0 rows affected (0.00 sec)

mysql> select @@tidb_scatter_region;
+-----------------------+
| @@tidb_scatter_region |
+-----------------------+
| global                |
+-----------------------+
1 row in set (0.00 sec)

mysql>

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

tidb_scatter_region should support setting values by uppercase

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

mysql> select tidb_version();
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                        |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v8.5.0-alpha-32-g1961f5e67c
Edition: Community
Git Commit Hash: 1961f5e67cf92262b594c9b90fb3aa62aa80cb72
Git Branch: HEAD
UTC Build Time: 2024-11-04 04:00:54
GoVersion: go1.23.2
Race Enabled: false
Check Table Before Drop: false
Store: unistore |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions