What Are Syntax Differences Between MySQL or MariaDB Versions?
If the source and destination database versions are different, syntax compatibility issues may occur due to feature differences between the source and destination database versions.
The source database binlogs received by DRS contain the original SQL statements, which will be executed in the destination database. If the destination database does not support the syntax constraints of the SQL statements in the source database, DRS will report an error and the task will fail.
For example, the syntax of the source database is incompatible with that of the destination database in the following scenarios (not all scenarios):
- In the source database MySQL 5.7.34, the DDL create table t1 (id int, c1 varchar(16), FULLTEXT INDEX (c1 ASC)) ENGINE = INNODB is executed to create a table structure. The DDL stored in the source database Binlog is the preceding native SQL statement. During the incremental synchronization, an error is reported when the DDL is executed in the destination database MySQL 8.0.27, and the error information is 1221 - Incorrect usage of spatial/fulltext/hash index and explicit index order. The destination database MySQL 8.0.27 does not support collation rules on full-text indexes.
- In the source database MariaDB 10.5.8, the DDL statement create table t1(id INT, c1 VARCHAR(32)) ENGINE = INNODB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_nopad_bin is executed to create a table structure. The DDL stored in the source database Binlog is the preceding native SQL statement. During the incremental synchronization, an error is reported when the DDL is executed in the destination database MySQL 8.0.27, and the error information is 1273 - Unknown collation: 'utf8mb4_nopad_bin'. The destination database MySQL 8.0.27 does not support the utf8mb4_nopad_bin collation character set.
- In the source database MariaDB 10.5.8, the DDL statement create table t1(c1 INT, c2 VARCHAR(32) NOT NULL DEFAULT UUID()) ENGINE = INNODB is executed to create a table structure. The DDL stored in the source database Binlog is the preceding native SQL statement. During the incremental synchronization, an error is reported when the DDL is executed in the destination database MySQL 8.0.27, and the error information is 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near UUID(). The destination database MySQL 8.0.27 does not support functions whose default value is UUID().
- In the source database MariaDB 10.5.8, the DDL statement create table t1(c1 int, c2 inet6) ENGINE = INNODB is executed to create a table structure. The DDL stored in the source database Binlog is the preceding native SQL statement. During the incremental synchronization, an error is reported when the DDL is executed in the destination database MySQL 8.0.27, and the error information is 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near inet6. The destination database MySQL 8.0.27 does not support data of the inet6 type.
Real-Time Synchronization FAQs
- Can DRS Sync Tables of Different Schemas to the Same Schema?
- Can Online DDL Tools Be Used for Real-time Synchronization?
- Does DRS Support Bidirectional Real-time Synchronization?
- Why Do I Use the SCAN IP Address to Connect to an Oracle RAC Cluster?
- How Do I Check Supplemental Logging of the Source Oracle Database?
- Which Specifications Should I Select for My DRS Task to Synchronize Data to GaussDB(DWS)?
- Suggestions on Synchronizing Data to GaussDB(DWS)
- Character Set Compatibility Between Oracle and GaussDB
- Garbled Characters or Synchronization Failure Due to Incompatible Character Sets
- How Do I Specify the Start Point for DRS Incremental Synchronization?
- What Are Syntax Differences Between MySQL or MariaDB Versions?
- Configuring Remote Connection to a GaussDB Database
- Connection and Port Description for Incremental Synchronization from GaussDB
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore