From aaf4a8b514c38e22903a40904f5401c2af4021c7 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Mon, 5 Aug 2024 20:18:38 +0800 Subject: [PATCH 1/5] pd: add an example for pd-recover (#18479) --- pd-recover.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pd-recover.md b/pd-recover.md index bc74a66c1f9ff..7e8bb9464200b 100644 --- a/pd-recover.md +++ b/pd-recover.md @@ -145,7 +145,7 @@ Before deploying a new PD cluster, you need to stop the existing PD cluster and ### Step 4: Use pd-recover -You only need to run `pd-recover` on one PD node. +You only need to run `pd-recover` on one PD node. Note that to avoid reallocation, it is recommended to set the `-alloc-id` parameter to a value larger than the allocated ID. For example, if the maximum allocated ID obtained from monitoring or logs is `9000`, it is recommended to pass `10000` or a larger value to the `-alloc-id` parameter. {{< copyable "shell-regular" >}} From a74683f8e8dc3410336637f2856f3623acf1bd34 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Tue, 6 Aug 2024 10:50:09 +0800 Subject: [PATCH 2/5] tidb: add a bugfix about issue https://github.com/pingcap/tidb/issues/54652 (#18484) --- releases/release-7.5.3.md | 1 + 1 file changed, 1 insertion(+) diff --git a/releases/release-7.5.3.md b/releases/release-7.5.3.md index 82c34249fb256..42dfa497dc966 100644 --- a/releases/release-7.5.3.md +++ b/releases/release-7.5.3.md @@ -78,6 +78,7 @@ Quick access: [Quick start](https://docs.pingcap.com/tidb/v7.5/quick-start-with- - Fix the issue that the `STATE` field in the `INFORMATION_SCHEMA.TIDB_TRX` table is empty due to the `size` of the `STATE` field not being defined [#53026](https://github.com/pingcap/tidb/issues/53026) @[cfzjywxk](https://github.com/cfzjywxk) - Fix the issue that the `tidb_enable_async_merge_global_stats` and `tidb_analyze_partition_concurrency` system variables do not take effect during automatic statistics collection [#53972](https://github.com/pingcap/tidb/issues/53972) @[hi-rustin](https://github.com/hi-rustin) - Fix the issue that using `CURRENT_DATE()` as the default value for a column results in incorrect query results [#53746](https://github.com/pingcap/tidb/issues/53746) @[tangenta](https://github.com/tangenta) + - Fix the issue of reusing wrong point get plans for `SELECT ... FOR UPDATE` [#54652](https://github.com/pingcap/tidb/issues/54652) @[qw4990](https://github.com/qw4990) + TiKV From f38fed7cbbc7dc86f16e9c400c33712dd5391c3d Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Tue, 6 Aug 2024 13:26:08 +0800 Subject: [PATCH 3/5] sql: delete PLACEMENT(S) in keywords (#18493) --- keywords.md | 1 - 1 file changed, 1 deletion(-) diff --git a/keywords.md b/keywords.md index 45ebdaf0b5ded..88fa295dcb6e1 100644 --- a/keywords.md +++ b/keywords.md @@ -500,7 +500,6 @@ The following list shows the keywords in TiDB. Reserved keywords are marked with - PER_DB - PER_TABLE - PESSIMISTIC -- PLACEMENT (S) - PLUGINS - POINT - POLICY From 129a30237b3c46be94e17fc17622ecc4aebe6fda Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Tue, 6 Aug 2024 18:26:09 +0800 Subject: [PATCH 4/5] update the maximum region size for TiFlash (#18501) --- tune-region-performance.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tune-region-performance.md b/tune-region-performance.md index cbd7c40381374..869771f6ea47a 100644 --- a/tune-region-performance.md +++ b/tune-region-performance.md @@ -25,9 +25,7 @@ To reduce the performance overhead of many Regions, you can also enable [Hiberna > + Decreased query performance, especially for queries that deal with a large range of data > + Slower Region scheduling -To adjust the Region size, you can use the [`coprocessor.region-split-size`](/tikv-configuration-file.md#region-split-size) configuration item. When TiFlash is used, the Region size should not exceed 256 MiB. - -When the Dumpling tool is used, the Region size should not exceed 1 GiB. In this case, you need to reduce the concurrency after increasing the Region size; otherwise, TiDB might run out of memory. +To adjust the Region size, you can use the [`coprocessor.region-split-size`](/tikv-configuration-file.md#region-split-size) configuration item. When TiFlash or the Dumpling tool is used, the Region size should not exceed 1 GiB. After increasing the Region size, you need to reduce the concurrency if the Dumpling tool is used; otherwise, TiDB might run out of memory. ## Use bucket to increase concurrency From 42069ea2cd9c9fbd79d195fa493087e39b8ec05d Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Tue, 6 Aug 2024 18:32:10 +0800 Subject: [PATCH 5/5] partitioned tables: add some restrictions (#18483) --- partitioned-table.md | 6 ++++++ sql-statements/sql-statement-create-table.md | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/partitioned-table.md b/partitioned-table.md index 8733e29bcdba3..7bfe1e7849564 100644 --- a/partitioned-table.md +++ b/partitioned-table.md @@ -1468,6 +1468,12 @@ Partition selection is supported for all types of table partitioning, including This section introduces some restrictions and limitations on partitioned tables in TiDB. +- Using the [`ALTER TABLE ... CHANGE COLUMN`](/sql-statements/sql-statement-change-column.md) statement to change column types of partitioned tables is not supported. +- Using the [`ALTER TABLE ... CACHE`](/cached-tables.md) statement to set partitioned tables to cached tables is not supported. +- [Temporary tables](/temporary-tables.md) in TiDB are **NOT** compatible with partitioned tables. +- Creating a [foreign key](/foreign-key.md) on a partitioned table is not supported. +- The [`ORDER_INDEX(t1_name, idx1_name [, idx2_name ...])`](/optimizer-hints.md#order_indext1_name-idx1_name--idx2_name-) hint does not work for partitioned tables and their related indexes, because indexes on partitioned tables cannot be read in order. + ### Partitioning keys, primary keys and unique keys This section discusses the relationship of partitioning keys with primary keys and unique keys. The rule governing this relationship can be expressed as follows: **Every unique key on the table must use every column in the table's partitioning expression**. This also includes the table's primary key, because it is by definition a unique key. diff --git a/sql-statements/sql-statement-create-table.md b/sql-statements/sql-statement-create-table.md index f9250151c55d3..78be305013231 100644 --- a/sql-statements/sql-statement-create-table.md +++ b/sql-statements/sql-statement-create-table.md @@ -258,7 +258,7 @@ mysql> DESC t1; * The `[ASC | DESC]` in `index_col_name` is currently parsed but ignored (MySQL 5.7 compatible behavior). * The `COMMENT` attribute does not support the `WITH PARSER` option. * TiDB supports 1017 columns in a single table by default and 4096 columns at most. The corresponding number limit in InnoDB is 1017 columns, and the hard limit in MySQL is 4096 columns. For details, see [TiDB Limitations](/tidb-limitations.md). -* For partitioned tables, only Range, Hash and Range Columns (single column) are supported. For details, see [partitioned table](/partitioned-table.md). +* TiDB supports `HASH`, `RANGE`, `LIST`, and `KEY` [partitioning types](/partitioned-table.md#partitioning-types). For an unsupported partition type, TiDB returns `Warning: Unsupported partition type %s, treat as normal table`, where `%s` is the specific unsupported partition type. ## See also