This topic introduces the DDL statements supported for synchronization between MySQL-compatible tenants of OceanBase Database.
Notice
If an index created in the source table already exists in the target table, the data migration service automatically ignores the index without interrupting the synchronization process.
Supported DDL statements
ALTER TABLE ADD COLUMNALTER TABLE MODIFY COLUMNNotice
You can increase the column length, but you cannot modify the column type.
ALTER TABLE ALTER COLUMN SET DEFAULTandALTER TABLE ALTER COLUMN DROP DEFAULTALTER TABLE DROP COLUMNCREATE TABLENotice
CREATE TABLE AS SELECTis not supported.DROP TABLETRUNCATE TABLECREATE INDEXandALTER TABLE ADD INDEXDROP INDEXandALTER TABLE DROP INDEXRENAME TABLEandALTER TABLE RENAME
Limitations
If the tables to be synchronized involve unsupported DDL statements, the migration task may be interrupted, causing data inconsistency, and the data may not be able to be recovered.
It is not advisable to perform frequent DDL operations on a single table. After the store completes the current DDL operation (based on the timestamp), the next DDL operation should be performed. Otherwise, the store may experience abnormal termination or cause unrecoverable data exceptions.
Make sure that no DDL operations are performed before you create a store and when a store is being started. If log pulling is involved, make sure that no DDL operations are performed from the time point when the logs are pulled to the current time point. Otherwise, the store may experience abnormal termination or cause unrecoverable data exceptions.
The table names before and after the
RENAME TABLEoperation must be present in the list of tables to be synchronized.