Skip to content

Commit 4547487

Browse files
qiancaiti-chi-bot
authored andcommitted
This is an automated cherry-pick of pingcap#18483
Signed-off-by: ti-chi-bot <[email protected]>
1 parent 88fb8ca commit 4547487

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

partitioned-table.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,12 @@ Partition selection is supported for all types of table partitioning, including
13601360

13611361
This section introduces some restrictions and limitations on partitioned tables in TiDB.
13621362

1363+
- Using the [`ALTER TABLE ... CHANGE COLUMN`](/sql-statements/sql-statement-change-column.md) statement to change column types of partitioned tables is not supported.
1364+
- Using the [`ALTER TABLE ... CACHE`](/cached-tables.md) statement to set partitioned tables to cached tables is not supported.
1365+
- [Temporary tables](/temporary-tables.md) in TiDB are **NOT** compatible with partitioned tables.
1366+
- Creating a [foreign key](/foreign-key.md) on a partitioned table is not supported.
1367+
- 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.
1368+
13631369
### Partitioning keys, primary keys and unique keys
13641370

13651371
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.

sql-statements/sql-statement-create-table.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,12 @@ mysql> DESC t1;
255255
* The `[ASC | DESC]` in `index_col_name` is currently parsed but ignored (MySQL 5.7 compatible behavior).
256256
* The `COMMENT` attribute does not support the `WITH PARSER` option.
257257
* 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).
258+
<<<<<<< HEAD
258259
* For partitioned tables, only Range, Hash and Range Columns (single column) are supported. For details, see [partitioned table](/partitioned-table.md).
259260
* `CHECK` constraints are parsed but ignored (MySQL 5.7 compatible behavior). For details, see [Constraints](/constraints.md).
261+
=======
262+
* 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.
263+
>>>>>>> 42069ea2cd (partitioned tables: add some restrictions (#18483))
260264
261265
## See also
262266

0 commit comments

Comments
 (0)