From 8f17823a68600c92e2835bd1f7b4ef455815a225 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 Apr 2026 03:27:01 +0000 Subject: [PATCH 1/3] Auto-sync: Update English docs from Chinese PR Synced from: https://github.com/pingcap/docs-cn/pull/20357 Target PR: https://github.com/pingcap/docs/pull/22758 AI Provider: azure Co-authored-by: github-actions[bot] --- system-variables.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/system-variables.md b/system-variables.md index 89cee140d97d2..f56f68a361c84 100644 --- a/system-variables.md +++ b/system-variables.md @@ -2956,6 +2956,15 @@ Query OK, 0 rows affected (0.09 sec) +### `tidb_enable_ts_validation` New in v9.0.0 + +- Scope: GLOBAL +- Persists to cluster: Yes +- Controlled by the Hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No +- Type: Boolean +- Default value: `ON` +- This variable controls whether TiDB validates the legality of the timestamp in a request before sending the request to TiKV. If an illegal timestamp is detected in the request, TiDB rejects sending the request to avoid data corruption. + ### tidb_enable_tso_follower_proxy New in v5.3.0 > **Note:** @@ -4798,10 +4807,10 @@ mysql> desc select count(distinct a) from test.t; - Type: Enum - Default value: `DISABLE` - Possible values: `DISABLE`, `COST` -- Controls whether the optimizer can leverage the partial order of an index to optimize TopN computation when a query contains `ORDER BY ... LIMIT`. When the sort column matches the index order (for example, the sort column is an index column or has a prefix index), the data returned by the index scan is already partially ordered on that column. In this case, the optimizer can incrementally build the TopN result during the scan and stop early once the `LIMIT` is satisfied, thereby reducing sorting overhead. +- Controls whether the optimizer can leverage the partial order of an index to optimize TopN computation when a query contains `ORDER BY ... LIMIT`. When the sort column matches the index order (for example, the sort column is an index column or has a prefix index), the data returned by the index scan is already partially ordered on that column. In this case, the optimizer can incrementally build the TopN result during the scan and stop early once the `LIMIT` is satisfied, thereby reducing sorting overhead. - Usage scenarios: When the sort column in an `ORDER BY ... LIMIT` clause is a long string with only a prefix index, to reduce the TopN sorting overhead, you can set this variable to `COST` and specify a `USE INDEX` or `FORCE INDEX` hint in the query to enable the partial order TopN optimization. - - The default value is `DISABLE`, which means the partial order TopN optimization is disabled. In this case, the optimizer uses the standard global sorting approach for TopN. + - The default value is `DISABLE`, which means the partial order TopN optimization is disabled. In this case, the optimizer uses the standard global sorting approach for TopN. - To force the use of the partial order TopN optimization, set this variable to `COST` and specify a qualifying index in the query using `USE INDEX` or `FORCE INDEX`. If the specified index does not meet the prerequisites for this optimization (for example, the `ORDER BY` clause does not match the index prefix, or the query contains unsupported ordering patterns), the optimization might not be applied even when the variable is set to `COST`, and the execution plan falls back to the standard TopN approach. > **Note:** From 2d3267ea814319a0204f7b3230e8ea23dadfa011 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 15 Apr 2026 11:34:05 +0800 Subject: [PATCH 2/3] Apply suggestions from code review --- system-variables.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system-variables.md b/system-variables.md index f56f68a361c84..975dcc1ad4bcb 100644 --- a/system-variables.md +++ b/system-variables.md @@ -2960,10 +2960,10 @@ Query OK, 0 rows affected (0.09 sec) - Scope: GLOBAL - Persists to cluster: Yes -- Controlled by the Hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No +- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No - Type: Boolean - Default value: `ON` -- This variable controls whether TiDB validates the legality of the timestamp in a request before sending the request to TiKV. If an illegal timestamp is detected in the request, TiDB rejects sending the request to avoid data corruption. +- This variable controls whether TiDB validates the timestamp in a request before sending the request to TiKV. If an invalid timestamp is detected in the request, TiDB rejects sending it to avoid data corruption. ### tidb_enable_tso_follower_proxy New in v5.3.0 From 2279f31d3d95799018f59b28cd97f45a525d2d72 Mon Sep 17 00:00:00 2001 From: qiancai Date: Wed, 15 Apr 2026 12:04:19 +0800 Subject: [PATCH 3/3] Update system-variables.md --- system-variables.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system-variables.md b/system-variables.md index 975dcc1ad4bcb..17cb5f0b460c8 100644 --- a/system-variables.md +++ b/system-variables.md @@ -4807,10 +4807,10 @@ mysql> desc select count(distinct a) from test.t; - Type: Enum - Default value: `DISABLE` - Possible values: `DISABLE`, `COST` -- Controls whether the optimizer can leverage the partial order of an index to optimize TopN computation when a query contains `ORDER BY ... LIMIT`. When the sort column matches the index order (for example, the sort column is an index column or has a prefix index), the data returned by the index scan is already partially ordered on that column. In this case, the optimizer can incrementally build the TopN result during the scan and stop early once the `LIMIT` is satisfied, thereby reducing sorting overhead. +- Controls whether the optimizer can leverage the partial order of an index to optimize TopN computation when a query contains `ORDER BY ... LIMIT`. When the sort column matches the index order (for example, the sort column is an index column or has a prefix index), the data returned by the index scan is already partially ordered on that column. In this case, the optimizer can incrementally build the TopN result during the scan and stop early once the `LIMIT` is satisfied, thereby reducing sorting overhead. - Usage scenarios: When the sort column in an `ORDER BY ... LIMIT` clause is a long string with only a prefix index, to reduce the TopN sorting overhead, you can set this variable to `COST` and specify a `USE INDEX` or `FORCE INDEX` hint in the query to enable the partial order TopN optimization. - - The default value is `DISABLE`, which means the partial order TopN optimization is disabled. In this case, the optimizer uses the standard global sorting approach for TopN. + - The default value is `DISABLE`, which means the partial order TopN optimization is disabled. In this case, the optimizer uses the standard global sorting approach for TopN. - To force the use of the partial order TopN optimization, set this variable to `COST` and specify a qualifying index in the query using `USE INDEX` or `FORCE INDEX`. If the specified index does not meet the prerequisites for this optimization (for example, the `ORDER BY` clause does not match the index prefix, or the query contains unsupported ordering patterns), the optimization might not be applied even when the variable is set to `COST`, and the execution plan falls back to the standard TopN approach. > **Note:**