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

[Doc] Add example for setting multiple variables (backport #35940) #35948

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/en/sql-reference/sql-statements/Administration/SET.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,12 @@ Example 2: Set the `exec_mem_limit` to `2147483648` globally.
mysql> SET GLOBAL exec_mem_limit = 2147483648;
Query OK, 0 rows affected (0.00 sec)
```

Example 3: Set multiple global variables. The `GLOBAL` keyword needs to be preposed for each variable.

```Plain
mysql> SET
GLOBAL exec_mem_limit = 2147483648,
GLOBAL time_zone = "Asia/Shanghai";
Query OK, 0 rows affected (0.00 sec)
```
9 changes: 9 additions & 0 deletions docs/zh/sql-reference/sql-statements/Administration/SET.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,12 @@ Query OK, 0 rows affected (0.00 sec)
mysql> SET GLOBAL exec_mem_limit = 2147483648;
Query OK, 0 rows affected (0.00 sec)
```

示例三:同时设置多个全局变量。需要在所有变量名前添加 `GLOBAL` 关键字。

```Plain
mysql> SET
GLOBAL exec_mem_limit = 2147483648,
GLOBAL time_zone = "Asia/Shanghai";
Query OK, 0 rows affected (0.00 sec)
```