From 611316f6903d32ee734ca67687847e9e407a44d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Thu, 17 Oct 2024 19:42:25 +0200 Subject: [PATCH 1/6] Update docs for deprecate-integer-display-length=true --- data-type-numeric.md | 4 ++++ tidb-configuration-file.md | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/data-type-numeric.md b/data-type-numeric.md index 4406cc06f707a..f34ec86ceefdf 100644 --- a/data-type-numeric.md +++ b/data-type-numeric.md @@ -14,6 +14,10 @@ TiDB supports all the MySQL numeric types, including: ## Integer types +> **Warning:** +> +> Note that specifying an integer display width is not recommended. + TiDB supports all the MySQL integer types, including `INTEGER`/`INT`, `TINYINT`, `SMALLINT`, `MEDIUMINT`, and `BIGINT`. For more information, see [Integer Data Type Syntax in MySQL](https://dev.mysql.com/doc/refman/8.0/en/integer-types.html). The following table summarizes field descriptions: diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index b820950950c04..a08f37640cab0 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -181,7 +181,7 @@ The TiDB configuration file supports more options than command-line parameters. ### `deprecate-integer-display-length` - Deprecates the display width for integer types when this configuration item is set to `true`. -- Default value: `false` +- Default value: `true` ### `enable-tcp4-only` New in v5.0 From 391dd3e590c49776f1b3bb5bc780812a75bb2c73 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 18 Nov 2024 14:18:51 +0800 Subject: [PATCH 2/6] update the warning --- data-type-numeric.md | 8 ++++---- data-type-overview.md | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/data-type-numeric.md b/data-type-numeric.md index f34ec86ceefdf..2b9ef5c19b971 100644 --- a/data-type-numeric.md +++ b/data-type-numeric.md @@ -14,14 +14,14 @@ TiDB supports all the MySQL numeric types, including: ## Integer types -> **Warning:** -> -> Note that specifying an integer display width is not recommended. - TiDB supports all the MySQL integer types, including `INTEGER`/`INT`, `TINYINT`, `SMALLINT`, `MEDIUMINT`, and `BIGINT`. For more information, see [Integer Data Type Syntax in MySQL](https://dev.mysql.com/doc/refman/8.0/en/integer-types.html). The following table summarizes field descriptions: +> **Warning:** +> +> Starting from v8.5.0, integer display width is deprecated ([`deprecate-integer-display-length`](/tidb-configuration-file.md#deprecate-integer-display-length) is true by default). Specifying display width for integer types is NOT recommended. + | Syntax Element | Description | | -------- | ------------------------------- | | M | the display width of the type. Optional. | diff --git a/data-type-overview.md b/data-type-overview.md index d0fe1b8c59586..dc28369b7ba2a 100644 --- a/data-type-overview.md +++ b/data-type-overview.md @@ -12,5 +12,10 @@ The definitions used for datatypes are specified as `T(M[, D])`. Where by: - `T` indicates the specific data type. - `M` indicates the maximum display width for integer types. For floating-point and fixed-point types, `M` is the total number of digits that can be stored (the precision). For string types, `M` is the maximum length. The maximum permissible value of M depends on the data type. + + > **Warning:** + > + > Starting from v8.5.0, integer display width is deprecated ([`deprecate-integer-display-length`](/tidb-configuration-file.md#deprecate-integer-display-length) is true by default). Specifying display width for integer types is NOT recommended. + - `D` applies to floating-point and fixed-point types and indicates the number of digits following the decimal point (the scale). - `fsp` applies to the `TIME`, `DATETIME`, and `TIMESTAMP` types and represents the fractional seconds precision. The `fsp` value, if given, must be in the range 0 to 6. A value of 0 signifies that there is no fractional part. If omitted, the default precision is 0. From 7200ddaa925e0a703fcde3c0587f8e0878afefb0 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 18 Nov 2024 14:24:25 +0800 Subject: [PATCH 3/6] wrap true with backtick --- data-type-numeric.md | 2 +- data-type-overview.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data-type-numeric.md b/data-type-numeric.md index 2b9ef5c19b971..5b97b970041fe 100644 --- a/data-type-numeric.md +++ b/data-type-numeric.md @@ -20,7 +20,7 @@ The following table summarizes field descriptions: > **Warning:** > -> Starting from v8.5.0, integer display width is deprecated ([`deprecate-integer-display-length`](/tidb-configuration-file.md#deprecate-integer-display-length) is true by default). Specifying display width for integer types is NOT recommended. +> Starting from v8.5.0, integer display width is deprecated ([`deprecate-integer-display-length`](/tidb-configuration-file.md#deprecate-integer-display-length) is `true` by default). Specifying display width for integer types is NOT recommended. | Syntax Element | Description | | -------- | ------------------------------- | diff --git a/data-type-overview.md b/data-type-overview.md index dc28369b7ba2a..8de3d62b869cf 100644 --- a/data-type-overview.md +++ b/data-type-overview.md @@ -15,7 +15,7 @@ The definitions used for datatypes are specified as `T(M[, D])`. Where by: > **Warning:** > - > Starting from v8.5.0, integer display width is deprecated ([`deprecate-integer-display-length`](/tidb-configuration-file.md#deprecate-integer-display-length) is true by default). Specifying display width for integer types is NOT recommended. + > Starting from v8.5.0, integer display width is deprecated ([`deprecate-integer-display-length`](/tidb-configuration-file.md#deprecate-integer-display-length) is `true` by default). Specifying display width for integer types is NOT recommended. - `D` applies to floating-point and fixed-point types and indicates the number of digits following the decimal point (the scale). - `fsp` applies to the `TIME`, `DATETIME`, and `TIMESTAMP` types and represents the fractional seconds precision. The `fsp` value, if given, must be in the range 0 to 6. A value of 0 signifies that there is no fractional part. If omitted, the default precision is 0. From 4fe68d6b01a50f4a564eb4977bf3bda4da3aed45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Mon, 18 Nov 2024 07:45:07 +0100 Subject: [PATCH 4/6] Apply suggestions from code review Co-authored-by: Grace Cai --- tidb-configuration-file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index a08f37640cab0..10c23c0b5d96c 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -181,7 +181,7 @@ The TiDB configuration file supports more options than command-line parameters. ### `deprecate-integer-display-length` - Deprecates the display width for integer types when this configuration item is set to `true`. -- Default value: `true` +- Default value: `true`. Before v8.5.0, the default value is `false`. ### `enable-tcp4-only` New in v5.0 From 9fa10cab2c94a680239d6775191a34f4fe32f9ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Tue, 19 Nov 2024 08:39:12 +0100 Subject: [PATCH 5/6] Update for cloud --- data-type-numeric.md | 12 ++++++++++++ data-type-overview.md | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/data-type-numeric.md b/data-type-numeric.md index 5b97b970041fe..80b35b48260b6 100644 --- a/data-type-numeric.md +++ b/data-type-numeric.md @@ -18,10 +18,22 @@ TiDB supports all the MySQL integer types, including `INTEGER`/`INT`, `TINYINT`, The following table summarizes field descriptions: + + > **Warning:** > > Starting from v8.5.0, integer display width is deprecated ([`deprecate-integer-display-length`](/tidb-configuration-file.md#deprecate-integer-display-length) is `true` by default). Specifying display width for integer types is NOT recommended. + + + + +> **Warning:** +> +> Starting from v8.5.0, integer display width is deprecated. Specifying display width for integer types is NOT recommended. + + + | Syntax Element | Description | | -------- | ------------------------------- | | M | the display width of the type. Optional. | diff --git a/data-type-overview.md b/data-type-overview.md index 8de3d62b869cf..71e252e1c85bc 100644 --- a/data-type-overview.md +++ b/data-type-overview.md @@ -13,9 +13,21 @@ The definitions used for datatypes are specified as `T(M[, D])`. Where by: - `T` indicates the specific data type. - `M` indicates the maximum display width for integer types. For floating-point and fixed-point types, `M` is the total number of digits that can be stored (the precision). For string types, `M` is the maximum length. The maximum permissible value of M depends on the data type. + + > **Warning:** > > Starting from v8.5.0, integer display width is deprecated ([`deprecate-integer-display-length`](/tidb-configuration-file.md#deprecate-integer-display-length) is `true` by default). Specifying display width for integer types is NOT recommended. + + + + + > **Warning:** + > + > Starting from v8.5.0, integer display width is deprecated. Specifying display width for integer types is NOT recommended. + + + - `D` applies to floating-point and fixed-point types and indicates the number of digits following the decimal point (the scale). - `fsp` applies to the `TIME`, `DATETIME`, and `TIMESTAMP` types and represents the fractional seconds precision. The `fsp` value, if given, must be in the range 0 to 6. A value of 0 signifies that there is no fractional part. If omitted, the default precision is 0. From 58f403832d2e72487bdc6fb243105c4f07f02a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Tue, 19 Nov 2024 08:44:21 +0100 Subject: [PATCH 6/6] Fix MD046 --- data-type-overview.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data-type-overview.md b/data-type-overview.md index 71e252e1c85bc..b0188c60777c3 100644 --- a/data-type-overview.md +++ b/data-type-overview.md @@ -15,17 +15,17 @@ The definitions used for datatypes are specified as `T(M[, D])`. Where by: - > **Warning:** - > - > Starting from v8.5.0, integer display width is deprecated ([`deprecate-integer-display-length`](/tidb-configuration-file.md#deprecate-integer-display-length) is `true` by default). Specifying display width for integer types is NOT recommended. +> **Warning:** +> +> Starting from v8.5.0, integer display width is deprecated ([`deprecate-integer-display-length`](/tidb-configuration-file.md#deprecate-integer-display-length) is `true` by default). Specifying display width for integer types is NOT recommended. - > **Warning:** - > - > Starting from v8.5.0, integer display width is deprecated. Specifying display width for integer types is NOT recommended. +> **Warning:** +> +> Starting from v8.5.0, integer display width is deprecated. Specifying display width for integer types is NOT recommended.