-
Notifications
You must be signed in to change notification settings - Fork 681
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
system-variables: update from generated source #7737
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -294,13 +294,6 @@ This variable is an alias for `last_insert_id`. | |
> | ||
> Unlike in MySQL, the `max_execution_time` system variable currently works on all kinds of statements in TiDB, not only restricted to the `SELECT` statement. The precision of the timeout value is roughly 100ms. This means the statement might not be terminated in accurate milliseconds as you specify. | ||
|
||
### placement_checks <span class="version-mark">New in v5.3.0</span> | ||
|
||
- Scope: SESSION | GLOBAL | ||
- Default value: `ON` | ||
- This variable controls whether DDL statements validate [Placement Rules in SQL](/placement-rules-in-sql.md). | ||
- It is intended to be used by logical dump/restore tools to ensure that tables can always be created even if placement rules are violated. This is similar to how mysqldump writes `SET FOREIGN_KEY_CHECKS=0;` to the start of every dump file. | ||
|
||
### plugin_dir | ||
|
||
- Scope: INSTANCE | ||
|
@@ -427,7 +420,7 @@ This variable is an alias for `last_insert_id`. | |
### tidb_allow_function_for_expression_index <span class="version-mark">New in v5.2.0</span> | ||
|
||
- Scope: NONE | ||
- Default value: `lower, md5, reverse, upper, vitess_hash` | ||
- Default value: `lower, md5, reverse, tidb_shard, upper, vitess_hash` | ||
Comment on lines
-430
to
+423
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is according to the generated source. The default has changed. |
||
- This variable is used to show the functions that are allowed to be used for creating expression indexes. | ||
|
||
### tidb_allow_mpp <span class="version-mark">New in v5.0</span> | ||
|
@@ -520,7 +513,7 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a | |
|
||
### tidb_capture_plan_baselines <span class="version-mark">New in v4.0</span> | ||
|
||
- Scope: SESSION | GLOBAL | ||
- Scope: GLOBAL | ||
Comment on lines
-523
to
+516
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This behavior change is intentional and only affects master. See: https://github.com/pingcap/tidb/blob/master/docs/design/2021-12-08-instance-scope.md |
||
- Default value: `OFF` | ||
- This variable is used to control whether to enable the [baseline capturing](/sql-plan-management.md#baseline-capturing) feature. This feature depends on the statement summary, so you need to enable the statement summary before you use baseline capturing. | ||
- After this feature is enabled, the historical SQL statements in the statement summary are traversed periodically, and bindings are automatically created for SQL statements that appear at least twice. | ||
|
@@ -659,16 +652,6 @@ Constraint checking is always performed in place for pessimistic transactions (d | |
> - If you have enabled TiDB Binlog, enabling this variable cannot improve the performance. To improve the performance, it is recommended to use [TiCDC](/ticdc/ticdc-overview.md) instead. | ||
> - Enabling this parameter only means that one-phase commit becomes an optional mode of transaction commit. In fact, the most suitable mode of transaction commit is determined by TiDB. | ||
|
||
### tidb_enable_alter_placement | ||
|
||
> **Warning:** | ||
> | ||
> Currently, Placement Rules in SQL is an experimental feature. It is not recommended that you use it in production environments. | ||
|
||
- Scope: GLOBAL | ||
- Default value: `OFF` | ||
- This variable enables or disables [Placement Rules in SQL](/placement-rules-in-sql.md). | ||
|
||
Comment on lines
-662
to
-671
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an experimental flag, but the feature is being declared stable in master. |
||
### tidb_enable_amend_pessimistic_txn <span class="version-mark">New in v4.0.7</span> | ||
|
||
- Scope: SESSION | GLOBAL | ||
|
@@ -767,10 +750,6 @@ Constraint checking is always performed in place for pessimistic transactions (d | |
|
||
### tidb_enable_index_merge <span class="version-mark">New in v4.0</span> | ||
|
||
- Scope: SESSION | GLOBAL | ||
- Default value: `ON` | ||
- This variable is used to control whether to enable the index merge feature. | ||
|
||
> **Note:** | ||
> | ||
> - After upgrading a TiDB cluster from versions earlier than v4.0.0 to v5.4.0 or later, this variable is disabled by default to prevent performance regression due to changes of execution plans. | ||
|
@@ -779,6 +758,10 @@ Constraint checking is always performed in place for pessimistic transactions (d | |
> | ||
> - Since v5.4.0, for a newly deployed TiDB cluster, this variable is enabled by default. | ||
|
||
- Scope: SESSION | GLOBAL | ||
- Default value: `ON` | ||
- This variable is used to control whether to enable the index merge feature. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This just moves the comment above the feature specification, to be consistent. We generate it this way in every other case. |
||
|
||
### tidb_enable_list_partition <span class="version-mark">New in v5.0</span> | ||
|
||
> **Warning:** | ||
|
@@ -833,7 +816,7 @@ Constraint checking is always performed in place for pessimistic transactions (d | |
|
||
- Scope: SESSION | GLOBAL | ||
- Default value: `ON` | ||
- This variable controls whether to enable the dynamic memory control feature for the operator that reads data. By default, this operator enables the maximum number of threads that [`tidb_distsql_scan_concurrency`](/system-variables.md#tidb_distsql_scan_concurrency) allows to read data. When the memory usage of a single SQL statement exceeds [`tidb_mem_quota_query`](/system-variables.md#tidb_mem_quota_query) each time, the operator that reads data stops one thread. | ||
- This variable controls whether to enable the dynamic memory control feature for the operator that reads data. By default, this operator enables the maximum number of threads that [`tidb_disql_scan_concurrency`](/system-variables.md#tidb_distsql_scan_concurrency) allows to read data. When the memory usage of a single SQL statement exceeds [`tidb_mem_quota_query`](/system-variables.md#tidb_mem_quota_query) each time, the operator that reads data stops one thread. | ||
- When the operator that reads data has only one thread left and the memory usage of a single SQL statement continues to exceed [`tidb_mem_quota_query`](/system-variables.md#tidb_mem_quota_query), this SQL statement triggers other memory control behaviors, such as [spilling data to disk](/tidb-configuration-file.md#oom-use-tmp-storage). | ||
|
||
### tidb_enable_slow_log | ||
|
@@ -844,7 +827,7 @@ Constraint checking is always performed in place for pessimistic transactions (d | |
|
||
### tidb_enable_stmt_summary <span class="version-mark">New in v3.0.4</span> | ||
|
||
- Scope: SESSION | GLOBAL | ||
- Scope: GLOBAL | ||
Comment on lines
-847
to
+830
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This behavior change is intentional and only affects master. See: https://github.com/pingcap/tidb/blob/master/docs/design/2021-12-08-instance-scope.md |
||
- Default value: `ON` | ||
- This variable is used to control whether to enable the statement summary feature. If enabled, SQL execution information like time consumption is recorded to the `information_schema.STATEMENTS_SUMMARY` system table to identify and troubleshoot SQL performance issues. | ||
|
||
|
@@ -888,6 +871,16 @@ Query OK, 0 rows affected (0.09 sec) | |
- Default value: `ON` | ||
- This variable is used to dynamically control whether the telemetry collection in TiDB is enabled. By setting the value to `OFF`, the telemetry collection is disabled. If the [`enable-telemetry`](/tidb-configuration-file.md#enable-telemetry-new-in-v402) TiDB configuration item is set to `false` on all TiDB instances, the telemetry collection is always disabled and this system variable will not take effect. See [Telemetry](/telemetry.md) for details. | ||
|
||
### tidb_enable_top_sql <span class="version-mark">New in v5.4.0</span> | ||
|
||
> **Warning:** | ||
> | ||
> Currently, Top SQL is an experimental feature. It is not recommended that you use it for production environments. | ||
|
||
- Scope: GLOBAL | ||
- Default value: `OFF` | ||
- This variable is used to control whether to enable the [Top SQL](/dashboard/top-sql.md) feature. | ||
|
||
Comment on lines
+874
to
+883
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was previously at the bottom of the page (non alphabetical order). Chronological order doesn't make sense to users, so the order is fixed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the default value of tidb_enable_top_sql is "ON" in v6.0.0 |
||
### tidb_enable_tso_follower_proxy <span class="version-mark">New in v5.3.0</span> | ||
|
||
- Scope: GLOBAL | ||
|
@@ -1451,10 +1444,10 @@ Usage example: | |
SET tidb_query_log_max_len = 20 | ||
``` | ||
|
||
### `tidb_read_staleness` <span class="version-mark">New in v5.4.0</span> | ||
### tidb_read_staleness <span class="version-mark">New in v5.4.0</span> | ||
|
||
- Scope: SESSION | ||
- Default value: `0` | ||
- Default value: "" | ||
Comment on lines
-1457
to
+1450
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According the the source, the default is "". But it might be a bug: pingcap/tidb#32763 In either case, it's correct right now - but it should be changed in future to be numeric. This will also help improve the docs as the type is shown. |
||
- This variable is used to set the time range of historical data that TiDB can read in the current session. After setting the value, TiDB selects a timestamp as new as possible from the range allowed by this variable, and all subsequent read operations are performed against this timestamp. For example, if the value of this variable is set to `-5`, on the condition that TiKV has the corresponding historical version's data, TiDB selects a timestamp as new as possible within a 5-second time range. | ||
|
||
### tidb_record_plan_in_slow_log | ||
|
@@ -1566,73 +1559,63 @@ SET tidb_slow_log_threshold = 200; | |
- Default value: "" | ||
- This variable is used to set the time point at which the data is read by the session. For example, when you set the variable to "2017-11-11 20:20:20" or a TSO number like "400036290571534337", the current session reads the data of this moment. | ||
|
||
### tidb_stats_load_sync_wait <span class="version-mark">New in v5.4.0</span> | ||
### tidb_stats_load_pseudo_timeout <span class="version-mark">New in v5.4.0</span> | ||
|
||
> **WARNING:** | ||
> **Warning:** | ||
Comment on lines
+1562
to
+1564
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These two variables were in the wrong alphabetical order. Warning is also in upper case (inconsistent). |
||
> | ||
> Currently, synchronously loading statistics is an experimental feature. It is not recommended that you use it in production environments. | ||
|
||
- Scope: SESSION | GLOBAL | ||
- Default value: `0` | ||
- Unit: milliseconds | ||
- Range: `[0, 4294967295]` | ||
- This variable controls whether to enable the synchronously loading statistics feature. The default value `0` means that the feature is disabled. To enable the feature, you can set this variable to a timeout (in milliseconds) that SQL optimization can wait for at most to synchronously load complete column statistics. For details, see [Load statistics](/statistics.md#load-statistics). | ||
- Scope: GLOBAL | ||
- Default value: `OFF` | ||
- This variable controls how TiDB behaves when the waiting time of SQL optimization reaches the timeout to synchronously load complete column statistics. The default value `OFF` means that SQL execution fails after the timeout. If you set this variable to `ON`, the SQL optimization gets back to using pseudo statistics after the timeout. | ||
|
||
### `tidb_stats_load_pseudo_timeout` <span class="version-mark">New in v5.4.0</span> | ||
### tidb_stats_load_sync_wait <span class="version-mark">New in v5.4.0</span> | ||
|
||
> **WARNING:** | ||
> **Warning:** | ||
> | ||
> Currently, synchronously loading statistics is an experimental feature. It is not recommended that you use it in production environments. | ||
|
||
- Scope: GLOBAL | ||
- Default value: `OFF` | ||
- This variable controls how TiDB behaves when the waiting time of SQL optimization reaches the timeout to synchronously load complete column statistics. The default value `OFF` means that SQL execution fails after the timeout. If you set this variable to `ON`, the SQL optimization gets back to using pseudo statistics after the timeout. | ||
- Scope: SESSION | GLOBAL | ||
- Default value: `0` | ||
- Range: `[0, 2147483647]` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the value range changed? from [0, 4294967295]` changed to [0, 2147483647]? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not specifically changed, it was always wrong. See: pingcap/tidb#30026 where it was introduced. math.MaxInt32 == 32 bit signed integer (max = 2147483647). |
||
- Unit: Milliseconds | ||
- This variable controls whether to enable the synchronously loading statistics feature. The default value `0` means that the feature is disabled. To enable the feature, you can set this variable to a timeout (in milliseconds) that SQL optimization can wait for at most to synchronously load complete column statistics. For details, see [Load statistics](/statistics.md#load-statistics). | ||
|
||
### tidb_stmt_summary_history_size <span class="version-mark">New in v4.0</span> | ||
|
||
- Scope: SESSION | GLOBAL | ||
- Scope: GLOBAL | ||
- Default value: `24` | ||
- Range: `[0, 255]` | ||
- This variable is used to set the history capacity of [statement summary tables](/statement-summary-tables.md). | ||
|
||
### tidb_stmt_summary_internal_query <span class="version-mark">New in v4.0</span> | ||
|
||
- Scope: SESSION | GLOBAL | ||
- Scope: GLOBAL | ||
- Default value: `OFF` | ||
- This variable is used to control whether to include the SQL information of TiDB in [statement summary tables](/statement-summary-tables.md). | ||
|
||
### tidb_stmt_summary_max_sql_length <span class="version-mark">New in v4.0</span> | ||
|
||
- Scope: SESSION | GLOBAL | ||
- Scope: GLOBAL | ||
- Default value: `4096` | ||
- Range: `[0, 2147483647]` | ||
- This variable is used to control the length of the SQL string in [statement summary tables](/statement-summary-tables.md). | ||
|
||
### tidb_stmt_summary_max_stmt_count <span class="version-mark">New in v4.0</span> | ||
|
||
- Scope: SESSION | GLOBAL | ||
- Scope: GLOBAL | ||
- Default value: `3000` | ||
- Range: `[1, 32767]` | ||
- This variable is used to set the maximum number of statements that [statement summary tables](/statement-summary-tables.md) store in memory. | ||
|
||
### tidb_stmt_summary_refresh_interval <span class="version-mark">New in v4.0</span> | ||
|
||
- Scope: SESSION | GLOBAL | ||
Comment on lines
-1593
to
-1620
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This behavior change is intentional and only affects master. See: https://github.com/pingcap/tidb/blob/master/docs/design/2021-12-08-instance-scope.md |
||
- Scope: GLOBAL | ||
- Default value: `1800` | ||
- Range: `[1, 2147483647]` | ||
- Unit: Seconds | ||
- This variable is used to set the refresh time of [statement summary tables](/statement-summary-tables.md). | ||
|
||
### `tidb_enable_top_sql` <span class="version-mark">New in v5.4.0</span> | ||
|
||
- Scope: GLOBAL | ||
- Default value: `OFF` | ||
- This variable is used to control whether to enable the [Top SQL](/dashboard/top-sql.md) feature. | ||
|
||
> **Warning:** | ||
> | ||
> Currently, Top SQL is an experimental feature. It is not recommended that you use it for production environments. | ||
|
||
Comment on lines
-1626
to
-1635
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was moved higher up in the document (correct alphabetical order). |
||
### tidb_store_limit <span class="version-mark">New in v3.0.4 and v4.0</span> | ||
|
||
- Scope: GLOBAL | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable has been removed in TiDB 5.4. A new variable tidb_placement_mode exists instead (I will document it separately).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change will be in 5.4.1? i checked in 5.4.0, 'placement_checks' still exist, and no 'tidb_placement_mode' in system variable list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the PR: pingcap/tidb#31093
It looks like it was created before 5.4 code freeze, but merged after. So my understanding was not correct - it is a 6.0 only change.