Editing the Configurations During Migration from MySQL to GaussDB
Symptom |
Feature Name |
Recommended Setting |
---|---|---|
GaussDB 3.2 Enterprise Edition and later versions support the character set of specified tables. |
CHARSET |
Comment CHARSET. |
GaussDB 3.2 Enterprise Edition and later versions support COLLATE of specified tables. |
COLLATE |
Comment COLLATE. |
GaussDB does not support SECURITY clauses in views. |
SQL SECURITY clauses |
Migrate SECURITY clauses. |
GaussDB does not support CHECK OPTION clauses in views. |
CHECK OPTION clauses |
Migrate CHECK OPTION clauses. |
The range of the GaussDB TINYINT type is different from that of the MySQL TINYINT type. |
TINYINT type
NOTE:
This feature is available only in versions earlier than GaussDB 8.0. |
Convert the TINYINT type. |
GaussDB does not support the MEDIUMINT type and does not support specifying the display width and SIGNED keyword for an integer type. |
SIGNED INTEGER type
NOTE:
This feature is available only in versions earlier than GaussDB 8.0. |
The type remains unchanged (MEDIUMINT is specially converted to INTEGER), comment width and SIGNED keyword. |
GaussDB does not support the UNSIGNED INTEGER type. |
UNSIGNED INTEGER type
NOTE:
This feature is available only in versions earlier than GaussDB 8.0. |
Convert SMALLINT and MEDIUMINT to INTEGER, INT and INTEGER to BIGINT, BIGINT to NUMERIC(20). |
The FLOAT type of GaussDB is different from that of MySQL. |
FLOAT type |
Convert the type to FLOAT4 and comment precisions, scales, symbols, and padding keywords (such as UNSIGNED, SIGNED, and ZEROFILL). |
The DOUBLE type of GaussDB is different from that of MySQL. |
DOUBLE type
NOTE:
This feature is available only in versions earlier than GaussDB 8.0. |
Convert the type to DOUBLE PRECISION and comment precisions, scales, symbols, and padding keywords (such as UNSIGNED, SIGNED, and ZEROFILL). |
The TEXT type of GaussDB is different from that of MySQL. |
TEXT type
NOTE:
This feature is available only in versions earlier than GaussDB 8.0. |
Do not convert. Retain the TEXT data type and comment the length. |
GaussDB does not support LONGTEXT data type in CREATE TABLE statements. |
LONGTEXT data type
NOTE:
This feature is available only in versions earlier than GaussDB 8.0. |
Convert LONGTEXT to CLOB. The script will be migrated and a warning message will be displayed. |
GaussDB does not support LONGBLOB data type in CREATE TABLE statements. |
LONGBLOB data type |
Migrate the script and convert LONGBLOB to BYTEA. |
GaussDB does not support REAL data type in CREATE TABLE statements. |
REAL data type
NOTE:
This feature is available only in versions earlier than GaussDB 8.0. |
Convert REAL to DOUBLE PRECISION. |
GaussDB does not support ON UPDATE in columns of tables. |
ON UPDATE |
Comment ON UPDATE. |
The distributed GaussDB does not support generated columns. |
Generated columns
NOTE:
This feature is available only in distributed GaussDB. |
Comment expressions for generated columns and convert generated columns to common column. Triggers are used to configure this feature. |
In GaussDB, multiple columns cannot be used as the partition key in a table. |
Multi-column partition keys of partitioned tables |
Use the first column of the primary key or unique key as the partition key. |
In GaussDB, partition keys cannot be same as sub-partition keys. |
Same partition keys and sub-partition keys |
Comment SUB partitions. |
GaussDB temporary tables do not support AUTO INCREMENT. |
AUTO INCREMENT in temporary tables |
Comment AUTO INCREMENT. |
Distributed GaussDB does not support FOREIGN KEY constraints. |
FOREIGN KEY constraints
NOTE:
This feature is available only in distributed GaussDB. |
Comment FOREIGN KEY constraints. |
The character set length of GaussDB is different from that of MySQL. |
Character set length conversion
NOTE:
This feature is available only in versions earlier than GaussDB 8.0. |
Comment or extend character datatype length. |
In distributed GaussDB, distribution keys are part of the constraints. |
Unique constraints and indexes in a distributed environment
NOTE:
This feature is available only in distributed GaussDB 2.7 enterprise edition. |
If no distribution key exists in a unique constraint and unique index, add a distribution key. |
GaussDB does not support DEFINER in database objects. |
Definer |
If a user is specified when an object is created, convert it to ALTER OWNER. |
Data types are enlarged after being converted by UGO. |
CHECK constraints |
Add CHECK constraints. |
BLOB data types in GaussDB and MySQL are different. |
Binary BLOB data type
NOTE:
This feature is available only in versions earlier than GaussDB 8.0. |
Migrate the script and convert BLOB to BYTEA. |
GaussDB does not support system privileges. No system privileges will be given. |
System privileges |
Comment the entire SQL script. |
GaussDB does not support unsigned floating-point numbers and fixed-point numbers. |
UNSIGNED FLOATING-POINT and FIXED-POINT type
NOTE:
This feature is available only in GaussDB 8.0. |
Comment the UNSIGNED and ZEROFILL attributes. |
GaussDB does not support the ZEROFILL keyword. |
ZEROFILL keyword
NOTE:
This feature is available only in GaussDB 8.0. |
Comment ZEROFILL. If UNSIGNED does not exist, add UNSIGNED. |
GaussDB 2.0 does not support temporary tables with auto-increment columns. |
Temporary tables with auto-increment columns |
Comment AUTO INCREMENT. |
After stored procedures and functions are converted during the migration from MySQL to GaussDB, you can add keywords to statements. |
Adding the keyword or replace to a stored procedure or function |
Do not add or replace after the keyword create for a function or stored procedure. |
GaussDB does not allow reserved keywords that are not quoted by double quotation marks to be used as object names.
NOTE:
In GaussDB 8.100, backquote can be used to reference object names. |
Case conversion of object names containing reserved keywords
NOTE:
The priority is higher than case conversion for object names. |
If an object name contains reserved keywords, convert the case of the name to uppercase letters. |
In GaussDB, object names must be enclosed in double quotation marks. MySQL database names, table names, table aliases, and view names are case-sensitive.
NOTE:
In GaussDB 8.100, backquote can be used to reference object names. |
Case conversion for object names
NOTE:
The priority is lower than case conversion of object names containing reserved keywords. |
Convert the case of all object names to lowercase letters. |
DML operations are not blocked during index creation. |
CONCURRENTLY clause in CREATE INDEX statement |
Recommended value: Add the keyword CONCURRENTLY. Impact: When such indexes are created, there may be deadlocks. It takes longer to create an Astore table index than a normal table index. |
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.
Chatbot