From 0e48c452f5ec01c0520d8c2f623798ac9e579f91 Mon Sep 17 00:00:00 2001 From: Airton Lastori Date: Mon, 17 Mar 2025 14:20:13 -0400 Subject: [PATCH 1/2] Add restriction for IMPORT INTO regarding empty partitions - Added a new restriction to the IMPORT INTO documentation specifying that the target table must be entirely empty for import operations, including all partitions. --- sql-statements/sql-statement-import-into.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sql-statements/sql-statement-import-into.md b/sql-statements/sql-statement-import-into.md index dee353d8fba2b..10a920ea8bf2c 100644 --- a/sql-statements/sql-statement-import-into.md +++ b/sql-statements/sql-statement-import-into.md @@ -21,6 +21,7 @@ The `IMPORT INTO` statement lets you import data to TiDB via the [Physical Impor ## Restrictions - `IMPORT INTO` only supports importing data into existing empty tables in the database. +- `IMPORT INTO` does not support importing data into an empty partition while other partitions of the same table already contain data. The target table must be entirely empty for import operations. - `IMPORT INTO` does not support importing data into a [temporary table](/temporary-tables.md) or a [cached table](/cached-tables.md). - `IMPORT INTO` does not support transactions or rollback. Executing `IMPORT INTO` within an explicit transaction (`BEGIN`/`END`) will return an error. - `IMPORT INTO` does not support working simultaneously with features such as [Backup & Restore](https://docs.pingcap.com/tidb/stable/backup-and-restore-overview), [`FLASHBACK CLUSTER`](/sql-statements/sql-statement-flashback-cluster.md), [acceleration of adding indexes](/system-variables.md#tidb_ddl_enable_fast_reorg-new-in-v630), data import using TiDB Lightning, data replication using TiCDC, or [Point-in-Time Recovery (PITR)](https://docs.pingcap.com/tidb/stable/br-log-architecture). For more compatibility information, see [Compatibility of TiDB Lightning and `IMPORT INTO` with TiCDC and Log Backup](https://docs.pingcap.com/tidb/stable/tidb-lightning-compatibility-and-scenarios). From bc3af15cf90297f8754ef0aac7e65018264b67fd Mon Sep 17 00:00:00 2001 From: Airton Lastori Date: Wed, 19 Mar 2025 03:18:48 -0400 Subject: [PATCH 2/2] Update sql-statements/sql-statement-import-into.md Co-authored-by: Aolin --- sql-statements/sql-statement-import-into.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql-statements/sql-statement-import-into.md b/sql-statements/sql-statement-import-into.md index 10a920ea8bf2c..6bf512c932ff6 100644 --- a/sql-statements/sql-statement-import-into.md +++ b/sql-statements/sql-statement-import-into.md @@ -21,7 +21,7 @@ The `IMPORT INTO` statement lets you import data to TiDB via the [Physical Impor ## Restrictions - `IMPORT INTO` only supports importing data into existing empty tables in the database. -- `IMPORT INTO` does not support importing data into an empty partition while other partitions of the same table already contain data. The target table must be entirely empty for import operations. +- `IMPORT INTO` does not support importing data into an empty partition if other partitions of the same table already contain data. The target table must be completely empty for import operations. - `IMPORT INTO` does not support importing data into a [temporary table](/temporary-tables.md) or a [cached table](/cached-tables.md). - `IMPORT INTO` does not support transactions or rollback. Executing `IMPORT INTO` within an explicit transaction (`BEGIN`/`END`) will return an error. - `IMPORT INTO` does not support working simultaneously with features such as [Backup & Restore](https://docs.pingcap.com/tidb/stable/backup-and-restore-overview), [`FLASHBACK CLUSTER`](/sql-statements/sql-statement-flashback-cluster.md), [acceleration of adding indexes](/system-variables.md#tidb_ddl_enable_fast_reorg-new-in-v630), data import using TiDB Lightning, data replication using TiCDC, or [Point-in-Time Recovery (PITR)](https://docs.pingcap.com/tidb/stable/br-log-architecture). For more compatibility information, see [Compatibility of TiDB Lightning and `IMPORT INTO` with TiCDC and Log Backup](https://docs.pingcap.com/tidb/stable/tidb-lightning-compatibility-and-scenarios).