From a5493b231414870fe763779b472824dc1d4dc7cf Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Tue, 1 Sep 2026 15:42:21 +0900 Subject: [PATCH 1/5] functions-and-operators, releases: clarify TIDB_DECODE_SQL_DIGESTS wording Reword "a form without formats and arguments" to "without value formats or arguments" to remove the redundant use of "form"/"formats" -- when translated, both words map to the identical term in some languages, making the parenthetical read as self-contradictory (a "form" without "format"). --- functions-and-operators/tidb-functions.md | 6 +++--- releases/release-5.2.0.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/functions-and-operators/tidb-functions.md b/functions-and-operators/tidb-functions.md index 35a0cce7c88d8..21d799fdc7449 100644 --- a/functions-and-operators/tidb-functions.md +++ b/functions-and-operators/tidb-functions.md @@ -17,7 +17,7 @@ The following functions are TiDB extensions, and are not present in MySQL: | [`TIDB_DECODE_BINARY_PLAN()`](#tidb_decode_binary_plan) | Decodes binary plans. | | [`TIDB_DECODE_KEY()`](#tidb_decode_key) | Decodes a TiDB-encoded key entry into a JSON structure containing `_tidb_rowid` and `table_id`. These encoded keys can be found in some system tables and logging outputs. | | [`TIDB_DECODE_PLAN()`](#tidb_decode_plan) | Decodes a TiDB execution plan. | -| [`TIDB_DECODE_SQL_DIGESTS()`](#tidb_decode_sql_digests) | Queries the normalized SQL statements (a form without formats and arguments) corresponding to a set of SQL digests in the cluster. | +| [`TIDB_DECODE_SQL_DIGESTS()`](#tidb_decode_sql_digests) | Queries the normalized SQL statements (without value formats or arguments) corresponding to a set of SQL digests in the cluster. | | [`TIDB_ENCODE_INDEX_KEY()`](#tidb_encode_index_key) | Encodes an index key. | | [`TIDB_ENCODE_RECORD_KEY()`](#tidb_encode_record_key) | Encodes a record key. | | [`TIDB_ENCODE_SQL_DIGEST()`](#tidb_encode_sql_digest) | Gets a digest for a query string. | @@ -42,7 +42,7 @@ The following functions are TiDB extensions, and are not present in MySQL: | [`TIDB_DECODE_BINARY_PLAN()`](#tidb_decode_binary_plan) | Decodes binary plans. | | [`TIDB_DECODE_KEY()`](#tidb_decode_key) | Decodes a TiDB-encoded key entry into a JSON structure containing `_tidb_rowid` and `table_id`. These encoded keys can be found in some system tables and logging outputs. | | [`TIDB_DECODE_PLAN()`](#tidb_decode_plan) | Decodes a TiDB execution plan. | -| [`TIDB_DECODE_SQL_DIGESTS()`](#tidb_decode_sql_digests) | Queries the normalized SQL statements (a form without formats and arguments) corresponding to a set of SQL digests in the cluster. | +| [`TIDB_DECODE_SQL_DIGESTS()`](#tidb_decode_sql_digests) | Queries the normalized SQL statements (without value formats or arguments) corresponding to a set of SQL digests in the cluster. | | [`TIDB_ENCODE_INDEX_KEY()`](#tidb_encode_index_key) | Encodes an index key. | | [`TIDB_ENCODE_RECORD_KEY()`](#tidb_encode_record_key) | Encodes a record key. | | [`TIDB_ENCODE_SQL_DIGEST()`](#tidb_encode_sql_digest) | Gets a digest for a query string. | @@ -294,7 +294,7 @@ SELECT tidb_decode_plan('8QIYMAkzMV83CQEH8E85LjA0CWRhdGE6U2VsZWN0aW9uXzYJOTYwCXR ## TIDB_DECODE_SQL_DIGESTS -The `TIDB_DECODE_SQL_DIGESTS()` function is used to query the normalized SQL statements (a form without formats and arguments) corresponding to the set of SQL digests in the cluster. This function accepts 1 or 2 arguments: +The `TIDB_DECODE_SQL_DIGESTS()` function is used to query the normalized SQL statements (without value formats or arguments) corresponding to the set of SQL digests in the cluster. This function accepts 1 or 2 arguments: * `digests`: A string. This parameter is in the format of a JSON string array, and each string in the array is a SQL digest. * `stmtTruncateLength`: An integer (optional). It is used to limit the length of each SQL statement in the returned result. If a SQL statement exceeds the specified length, the statement is truncated. `0` means that the length is unlimited. diff --git a/releases/release-5.2.0.md b/releases/release-5.2.0.md index 5d84db700fac8..eb31e4c5ec89d 100644 --- a/releases/release-5.2.0.md +++ b/releases/release-5.2.0.md @@ -113,7 +113,7 @@ In v5.2, the key new features and improvements are as follows: In v5.2, the following enhancements are made to Lock View: - In addition to the SQL digest column in the Lock View-related tables, add a column to these tables that shows the corresponding normalized SQL text. You do not have to manually query the statement corresponding to a SQL digest. - - Add the `TIDB_DECODE_SQL_DIGESTS` function to query the normalized SQL statements (a form without formats and arguments) corresponding to a set of SQL digests in the cluster. This simplifies the operation of querying the statements that have been historically executed by a transaction. + - Add the `TIDB_DECODE_SQL_DIGESTS` function to query the normalized SQL statements (without value formats or arguments) corresponding to a set of SQL digests in the cluster. This simplifies the operation of querying the statements that have been historically executed by a transaction. - Add a column in the `DATA_LOCK_WAITS` and `DEADLOCKS` system tables to show the table name, row ID, index value, and other key information interpreted from a key. This simplifies the operations such as locating the table to which a key belongs and interpreting the key information. - Support collecting the information of retryable deadlock errors in the `DEADLOCKS` table, which makes it easier to troubleshoot issues caused by such errors. The error collection is disabled by default and can be enabled using the `pessimistic-txn.deadlock-history-collect-retryable` configuration. - Support distinguishing query-executing transactions from idle transactions on the `TIDB_TRX` system table. The `Normal` state is now divided into `Running` and `Idle` states. From b3fdb17705646cf5c5885ba3348eaf01c91b8f8b Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Thu, 3 Sep 2026 15:34:53 +0900 Subject: [PATCH 2/5] Update functions-and-operators/tidb-functions.md Co-authored-by: Grace Cai --- functions-and-operators/tidb-functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions-and-operators/tidb-functions.md b/functions-and-operators/tidb-functions.md index 21d799fdc7449..62cd90801d9c7 100644 --- a/functions-and-operators/tidb-functions.md +++ b/functions-and-operators/tidb-functions.md @@ -42,7 +42,7 @@ The following functions are TiDB extensions, and are not present in MySQL: | [`TIDB_DECODE_BINARY_PLAN()`](#tidb_decode_binary_plan) | Decodes binary plans. | | [`TIDB_DECODE_KEY()`](#tidb_decode_key) | Decodes a TiDB-encoded key entry into a JSON structure containing `_tidb_rowid` and `table_id`. These encoded keys can be found in some system tables and logging outputs. | | [`TIDB_DECODE_PLAN()`](#tidb_decode_plan) | Decodes a TiDB execution plan. | -| [`TIDB_DECODE_SQL_DIGESTS()`](#tidb_decode_sql_digests) | Queries the normalized SQL statements (without value formats or arguments) corresponding to a set of SQL digests in the cluster. | +| [`TIDB_DECODE_SQL_DIGESTS()`](#tidb_decode_sql_digests) | Queries the normalized SQL statements (in which literal values are replaced with placeholders such as `?` or `...`) corresponding to a set of SQL digests in the cluster. | | [`TIDB_ENCODE_INDEX_KEY()`](#tidb_encode_index_key) | Encodes an index key. | | [`TIDB_ENCODE_RECORD_KEY()`](#tidb_encode_record_key) | Encodes a record key. | | [`TIDB_ENCODE_SQL_DIGEST()`](#tidb_encode_sql_digest) | Gets a digest for a query string. | From 6af0ea0997b48040703f3f94fde4b4fac6cc2186 Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Thu, 3 Sep 2026 15:35:03 +0900 Subject: [PATCH 3/5] Update functions-and-operators/tidb-functions.md Co-authored-by: Grace Cai --- functions-and-operators/tidb-functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions-and-operators/tidb-functions.md b/functions-and-operators/tidb-functions.md index 62cd90801d9c7..e42b0fe251448 100644 --- a/functions-and-operators/tidb-functions.md +++ b/functions-and-operators/tidb-functions.md @@ -294,7 +294,7 @@ SELECT tidb_decode_plan('8QIYMAkzMV83CQEH8E85LjA0CWRhdGE6U2VsZWN0aW9uXzYJOTYwCXR ## TIDB_DECODE_SQL_DIGESTS -The `TIDB_DECODE_SQL_DIGESTS()` function is used to query the normalized SQL statements (without value formats or arguments) corresponding to the set of SQL digests in the cluster. This function accepts 1 or 2 arguments: +The `TIDB_DECODE_SQL_DIGESTS()` function is used to query the normalized SQL statements (in which literal values are replaced with placeholders such as `?` or `...`) corresponding to the set of SQL digests in the cluster. This function accepts 1 or 2 arguments: * `digests`: A string. This parameter is in the format of a JSON string array, and each string in the array is a SQL digest. * `stmtTruncateLength`: An integer (optional). It is used to limit the length of each SQL statement in the returned result. If a SQL statement exceeds the specified length, the statement is truncated. `0` means that the length is unlimited. From 5aa13ad45b3ac4592a112a703758ae1fa042304b Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Thu, 3 Sep 2026 15:35:13 +0900 Subject: [PATCH 4/5] Update releases/release-5.2.0.md Co-authored-by: Grace Cai --- releases/release-5.2.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/release-5.2.0.md b/releases/release-5.2.0.md index eb31e4c5ec89d..b6850f1755172 100644 --- a/releases/release-5.2.0.md +++ b/releases/release-5.2.0.md @@ -113,7 +113,7 @@ In v5.2, the key new features and improvements are as follows: In v5.2, the following enhancements are made to Lock View: - In addition to the SQL digest column in the Lock View-related tables, add a column to these tables that shows the corresponding normalized SQL text. You do not have to manually query the statement corresponding to a SQL digest. - - Add the `TIDB_DECODE_SQL_DIGESTS` function to query the normalized SQL statements (without value formats or arguments) corresponding to a set of SQL digests in the cluster. This simplifies the operation of querying the statements that have been historically executed by a transaction. + - Add the `TIDB_DECODE_SQL_DIGESTS` function to query the normalized SQL statements (in which literal values are replaced with placeholders such as `?` or `...`) corresponding to a set of SQL digests in the cluster. This simplifies the operation of querying the statements that have been historically executed by a transaction. - Add a column in the `DATA_LOCK_WAITS` and `DEADLOCKS` system tables to show the table name, row ID, index value, and other key information interpreted from a key. This simplifies the operations such as locating the table to which a key belongs and interpreting the key information. - Support collecting the information of retryable deadlock errors in the `DEADLOCKS` table, which makes it easier to troubleshoot issues caused by such errors. The error collection is disabled by default and can be enabled using the `pessimistic-txn.deadlock-history-collect-retryable` configuration. - Support distinguishing query-executing transactions from idle transactions on the `TIDB_TRX` system table. The `Normal` state is now divided into `Running` and `Idle` states. From 825612679fca220c5c2b77b0eed4419a04efa4a8 Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Thu, 3 Sep 2026 15:36:44 +0900 Subject: [PATCH 5/5] Update functions-and-operators/tidb-functions.md Co-authored-by: Grace Cai --- functions-and-operators/tidb-functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions-and-operators/tidb-functions.md b/functions-and-operators/tidb-functions.md index e42b0fe251448..9fc8e3f44098a 100644 --- a/functions-and-operators/tidb-functions.md +++ b/functions-and-operators/tidb-functions.md @@ -17,7 +17,7 @@ The following functions are TiDB extensions, and are not present in MySQL: | [`TIDB_DECODE_BINARY_PLAN()`](#tidb_decode_binary_plan) | Decodes binary plans. | | [`TIDB_DECODE_KEY()`](#tidb_decode_key) | Decodes a TiDB-encoded key entry into a JSON structure containing `_tidb_rowid` and `table_id`. These encoded keys can be found in some system tables and logging outputs. | | [`TIDB_DECODE_PLAN()`](#tidb_decode_plan) | Decodes a TiDB execution plan. | -| [`TIDB_DECODE_SQL_DIGESTS()`](#tidb_decode_sql_digests) | Queries the normalized SQL statements (without value formats or arguments) corresponding to a set of SQL digests in the cluster. | +| [`TIDB_DECODE_SQL_DIGESTS()`](#tidb_decode_sql_digests) | Queries the normalized SQL statements (in which literal values are replaced with placeholders such as `?` or `...`) corresponding to a set of SQL digests in the cluster. | | [`TIDB_ENCODE_INDEX_KEY()`](#tidb_encode_index_key) | Encodes an index key. | | [`TIDB_ENCODE_RECORD_KEY()`](#tidb_encode_record_key) | Encodes a record key. | | [`TIDB_ENCODE_SQL_DIGEST()`](#tidb_encode_sql_digest) | Gets a digest for a query string. |