From d1f0bd99ff0571a3c802e8eb31e5ef14431bdb80 Mon Sep 17 00:00:00 2001 From: Frank945946 <108602632+Frank945946@users.noreply.github.com> Date: Thu, 11 Sep 2025 10:37:30 +0800 Subject: [PATCH 1/4] Update TiDB configuration max-index-length --- tidb-configuration-file.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 14c0a2c778ac1..24d6df5f5c10a 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -157,7 +157,12 @@ The TiDB configuration file supports more options than command-line parameters. - Sets the maximum allowable length of the newly created index. - Default value: `3072` - Unit: byte -- Currently, the valid value range is `[3072, 3072*4]`. MySQL and TiDB (version < v3.0.11) do not have this configuration item, but both limit the length of the newly created index. This limit in MySQL is `3072`. In TiDB (version =< 3.0.7), this limit is `3072*4`. In TiDB (3.0.7 < version < 3.0.11), this limit is `3072`. This configuration is added to be compatible with MySQL and earlier versions of TiDB. +- Value range: `[3072, 3072*4]` +- Version history: +- - MySQL: The maximum index length is fixed at 3072 Bytes. +- - TiDB v3.0.7 and earlier: The limit is 3072 × 4 Bytes. +- - TiDB v3.0.8 ~ v3.0.10: The limit is 3072 Bytes. +- - TiDB v3.0.11 and later: Introduced the `max-index-length` configuration option to ensure compatibility with different TiDB versions and MySQL. ### `table-column-count-limit` New in v5.0 From 61d3c16995d19c993b30a160f325539212d98c4d Mon Sep 17 00:00:00 2001 From: Frank945946 <108602632+Frank945946@users.noreply.github.com> Date: Thu, 11 Sep 2025 11:01:39 +0800 Subject: [PATCH 2/4] Apply suggestions from code review Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- tidb-configuration-file.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 24d6df5f5c10a..0f3d704bf484d 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -159,10 +159,10 @@ The TiDB configuration file supports more options than command-line parameters. - Unit: byte - Value range: `[3072, 3072*4]` - Version history: -- - MySQL: The maximum index length is fixed at 3072 Bytes. -- - TiDB v3.0.7 and earlier: The limit is 3072 × 4 Bytes. -- - TiDB v3.0.8 ~ v3.0.10: The limit is 3072 Bytes. -- - TiDB v3.0.11 and later: Introduced the `max-index-length` configuration option to ensure compatibility with different TiDB versions and MySQL. +- - MySQL: The maximum index length is fixed at 3072 bytes. +- - TiDB v3.0.7 and earlier: The limit is 3072 * 4 bytes. +- - TiDB v3.0.8 ~ v3.0.10: The limit is 3072 bytes. +- - TiDB v3.0.11 and later: Introduces the `max-index-length` configuration option to ensure compatibility with different TiDB versions and MySQL. ### `table-column-count-limit` New in v5.0 From 489572aaf4cb7d10b5aa697d91d8af570ecc58aa Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 11 Sep 2025 11:50:02 +0800 Subject: [PATCH 3/4] sync with zh --- tidb-configuration-file.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index 0f3d704bf484d..bbd5136730997 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -157,12 +157,13 @@ The TiDB configuration file supports more options than command-line parameters. - Sets the maximum allowable length of the newly created index. - Default value: `3072` - Unit: byte -- Value range: `[3072, 3072*4]` -- Version history: -- - MySQL: The maximum index length is fixed at 3072 bytes. -- - TiDB v3.0.7 and earlier: The limit is 3072 * 4 bytes. -- - TiDB v3.0.8 ~ v3.0.10: The limit is 3072 bytes. -- - TiDB v3.0.11 and later: Introduces the `max-index-length` configuration option to ensure compatibility with different TiDB versions and MySQL. +- Range: `[3072, 3072*4]` +- Compatibility: + - MySQL: the maximum index length is fixed at 3072 bytes. + - Earlier versions of TiDB: + - v3.0.7 and earlier: the maximum index length is fixed at 3072 × 4 bytes. + - v3.0.8 ~ v3.0.10: the maximum index length is fixed at 3072 bytes. + - v3.0.11 and later versions: introduces the `max-index-length` configuration item to ensure compatibility with different TiDB versions and with MySQL. ### `table-column-count-limit` New in v5.0 From 2d6fe9582da11f609f03dedcfe1fbb73dcdcf8be Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 11 Sep 2025 13:47:48 +0800 Subject: [PATCH 4/4] Update tidb-configuration-file.md --- tidb-configuration-file.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tidb-configuration-file.md b/tidb-configuration-file.md index bbd5136730997..a8248eac1b8d5 100644 --- a/tidb-configuration-file.md +++ b/tidb-configuration-file.md @@ -157,13 +157,13 @@ The TiDB configuration file supports more options than command-line parameters. - Sets the maximum allowable length of the newly created index. - Default value: `3072` - Unit: byte -- Range: `[3072, 3072*4]` +- Range: `[3072, 3072*4]` - Compatibility: - MySQL: the maximum index length is fixed at 3072 bytes. - Earlier versions of TiDB: - v3.0.7 and earlier: the maximum index length is fixed at 3072 × 4 bytes. - v3.0.8 ~ v3.0.10: the maximum index length is fixed at 3072 bytes. - - v3.0.11 and later versions: introduces the `max-index-length` configuration item to ensure compatibility with different TiDB versions and with MySQL. + - v3.0.11 and later versions: TiDB introduces the `max-index-length` configuration item to ensure compatibility with different TiDB versions and with MySQL. ### `table-column-count-limit` New in v5.0