-
Notifications
You must be signed in to change notification settings - Fork 709
add show config statement #2863
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c6a3596
add show config statement
jackysp 5901c62
Merge branch 'master' into sw_add_show_config
yikeke 6a6d419
add to toc
jackysp 5666ced
Apply suggestions from code review
jackysp a8e21c0
Merge branch 'master' into sw_add_show_config
ran-huang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| --- | ||
| title: SHOW CONFIG | ||
| summary: Overview of the use of SHOW CONFIG in the TiDB database | ||
| category: reference | ||
| --- | ||
|
|
||
| # SHOW CONFIG | ||
|
|
||
| > **Warning:** | ||
| > | ||
| > This feature is currently an experimental feature. It is not recommended to use this feature in the production environment. | ||
|
|
||
| The `SHOW CONFIG` statement is used to show the current configuration of various components of TiDB. Note that the configuration and system variables act on different dimensions and should not be mixed up. If you want to obtain the system variable information, use the [SHOW VARIABLES](/sql-statements/sql-statement-show-variables.md) syntax. | ||
|
|
||
| ## Synopsis | ||
|
|
||
| **ShowStmt:** | ||
|
|
||
|  | ||
|
|
||
| **ShowTargetFilterable:** | ||
|
|
||
|  | ||
|
|
||
| ## Examples | ||
|
|
||
| Show all configurations: | ||
|
|
||
| {{< copyable "sql" >}} | ||
|
|
||
| ```sql | ||
| SHOW CONFIG; | ||
| ``` | ||
|
|
||
| ``` | ||
| +------+----------------+-------------------------------------------------+---------------------------------------------------------------------+ | ||
| | Type | Instance | Name | Value | | ||
| +------+----------------+-------------------------------------------------+---------------------------------------------------------------------+ | ||
| | tidb | 127.0.0.1:4000 | advertise-address | 127.0.0.1 | | ||
| | tidb | 127.0.0.1:4000 | alter-primary-key | false | | ||
| | tidb | 127.0.0.1:4000 | binlog.binlog-socket | | | ||
| | tidb | 127.0.0.1:4000 | binlog.enable | false | | ||
| ... | ||
| 120 rows in set (0.01 sec) | ||
| ``` | ||
|
|
||
| Show the configuration where the `type` is `tidb`: | ||
|
|
||
| {{< copyable "sql" >}} | ||
|
|
||
| ```sql | ||
| SHOW CONFIG WHERE type = 'tidb' AND name = 'advertise-address'; | ||
| ``` | ||
|
|
||
| ``` | ||
| +------+----------------+-------------------+-----------+ | ||
| | Type | Instance | Name | Value | | ||
| +------+----------------+-------------------+-----------+ | ||
| | tidb | 127.0.0.1:4000 | advertise-address | 127.0.0.1 | | ||
| +------+----------------+-------------------+-----------+ | ||
| 1 row in set (0.05 sec) | ||
| ``` | ||
|
|
||
| You can also use the `LIKE` clause to show the configuration where the `type` is `tidb`: | ||
|
|
||
| {{< copyable "sql" >}} | ||
|
|
||
| ```sql | ||
| SHOW CONFIG LIKE 'tidb'; | ||
| ``` | ||
|
|
||
| ``` | ||
| +------+----------------+-------------------------------------------------+---------------------------------------------------------------------+ | ||
| | Type | Instance | Name | Value | | ||
| +------+----------------+-------------------------------------------------+---------------------------------------------------------------------+ | ||
| | tidb | 127.0.0.1:4000 | advertise-address | 127.0.0.1 | | ||
| | tidb | 127.0.0.1:4000 | alter-primary-key | false | | ||
| | tidb | 127.0.0.1:4000 | binlog.binlog-socket | | | ||
| | tidb | 127.0.0.1:4000 | binlog.enable | false | | ||
| ... | ||
| 40 rows in set (0.01 sec) | ||
| ``` | ||
|
|
||
| ## MySQL compatibility | ||
|
|
||
| `SHOW CONFIG` is the extended syntax of TiDB, with no counterpart in MySQL. | ||
|
|
||
| ## See also | ||
|
|
||
| * [SHOW VARIABLES](/sql-statements/sql-statement-show-variables.md) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.