7.5 Table VARIABLES_INFO: Explanation of the VARIABLE_SCOPE Field

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 7.5表VARIABLES_INFO变量作用域VARIABLE_SCOPE字段释义

| username: ShawnYan

Documentation is unclear or incomplete, please submit according to the template below:

  • Issue Category: Content too brief, ambiguous description, incomplete steps
  • Page where the issue occurs: Link + Screenshot
  • Issue Description:

VARIABLE_SCOPE: The scope of the system variable. SESSION means visible to the current session; INSTANCE means visible to the current TiDB instance; GLOBAL means visible within the cluster.

There is also a missing NONE which indicates a globally read-only variable.

MySQL [information_schema]> select version();
| version()          |
| 8.0.11-TiDB-v7.5.0 |
1 row in set (0.001 sec)

MySQL [information_schema]> select distinct VARIABLE_SCOPE from VARIABLES_INFO;
| SESSION        |
| GLOBAL         |
| NONE           | <-- here
| INSTANCE       |
5 rows in set (0.012 sec)
| username: Jellybean | Original post link

Shawn, the details are thorough, you’re a bug-catching expert, thumbs up :+1:

| username: dba远航 | Original post link

Thumbs up for the original poster’s dedication.

| username: Billmay表妹 | Original post link

Feedback provided~

| username: Billmay表妹 | Original post link

Fixed: update the variable scope by ran-huang · Pull Request #15655 · pingcap/docs-cn · GitHub

The related progress can be seen.

| username: oceanzhang | Original post link

Using “none” to represent a read-only variable, I couldn’t react immediately.

| username: ShawnYan | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.