Updated on 2024-04-22 GMT+08:00

MySQL -> GaussDB

Parameter

Feature Name

Description

Affected Object

Parameter Value

Value Description

Remarks

longtext_support

LONGTEXT data type

GaussDB does not support LONGTEXT. This configuration will handle such type of requirements.

Table

Ignore

Ignore the migration. The scripts remain unchanged (default value).

GaussDB does not support LONGTEXT. This configuration will not migrate scripts.

error

Raise an error and record the error information.

GaussDB does not support LONGTEXT. This configuration does not migrate the scripts and logs an error.

text

Convert LONGTEXT to TEXT. A warning message is displayed.

The scripts will be migrated and a warning message is displayed during the migration. GaussDB TEXT supports a maximum size of 1 GB, whereas MySQL LONGTEX supports 4 GB.

charset_support

Character set

GaussDB does not support character sets for database objects. This configuration will handle such type of requirements.

Schema, table

retain

Ignore the migration. The scripts remain unchanged (default value).

GaussDB does not support character sets for database objects. This configuration will not migrate scripts.

comment

Comment charset statements

GaussDB does not support character sets for database objects. This configuration will comment the scripts.

error

Ignore the migration. An error is recorded.

GaussDB does not support character sets for database objects. This configuration does not migrate the scripts and logs an error.

integer_support

Integer

It is applicable if tables contain one or more INTEGER columns.

Table

integer

Convert INTEGER to INTEGER or SMALLINT.

The INTEGER type is converted to INTEGER or SMALLINT based on the precision of the integer type.

numeric

Convert INTEGER to NUMERIC (default value).

The INTEGER type is converted to NUMERIC type with the corresponding precision based on the precision of the INTEGER type.

parser_gauss_sql_support

Parsing converted SQL statements

It is applicable to parse the converted SQL statements.

All objects

ignore

Ignore parsing (default value).

The converted scripts are not parsed.

parse

Parse converted scripts.

The converted scripts are parsed.

default_on_update_support

DEFAULT ON UPDATE in tables

GaussDB does not support ON UPDATE in columns of tables. This configuration will handle such type of requirements.

Table

retain

Ignore the migration. The scripts remain unchanged (default value).

GaussDB does not support ON UPDATE in columns of tables. The configuration remains the scripts unchanged.

comment

Comment ON UPDATE.

GaussDB does not support ON UPDATE in columns of tables. This configuration will comment the scripts.

longblob_support

LONGBLOB

GaussDB does not support LONGBLOB. This configuration will handle such type of requirements.

Table

ignore

Ignore the migration. The scripts remain unchanged (default value).

GaussDB does not support LONGBLOB. This configuration will not migrate scripts.

error

Ignore the migration. An error is recorded.

GaussDB does not support LONGBLOB. This configuration does not migrate the scripts and logs an error.

BLOB

Convert LONGBLOB to BLOB. The script will be migrated and a warning message will be displayed.

The scripts will be migrated and a warning message is displayed during the migration. GaussDB BLOB supports a maximum size of 1 GB, whereas MySQL LONGBLOB supports 4 GB.

view_security_definer

SECURITY clauses in views

GaussDB does not support SECURITY clauses in views. This configuration will handle such type of requirements.

View

retain

(Default value) Do not migrate SECURITY clauses. The scripts remain unchanged.

GaussDB does not support SECURITY clauses in views. This configuration will not migrate scripts.

error

Do not migrate SECURITY clauses. The scripts remain unchanged and an error is recorded.

GaussDB does not support SECURITY clauses in views. This configuration does not migrate the scripts and logs an error.

comment

Comment SECURITY clauses. The scripts are migrated.

GaussDB does not support SECURITY clauses in views. This configuration will comment the scripts.

view_with_check_option

CHECK OPTION in views

GaussDB does not support CHECK OPTION in views. This configuration will handle such type of requirements.

View

retain

Do not migrate CHECK OPTION and remain the scripts unchanged.

GaussDB does not support CHECK OPTION in views. This configuration will not migrate scripts.

error

Do not migrate CHECK OPTION, remain the scripts unchanged, and log an error.

GaussDB does not support CHECK OPTION in views. This configuration does not migrate the scripts and logs an error.

comment

Comment CHECK POINT and migrate the scripts.

GaussDB does not support CHECK OPTION in views. This configuration will comment the scripts.

collate_support

COLLATE

GaussDB does not support COLLATE in tables. This configuration will handle such type of requirements.

Schema, table

retain

Ignore the migration. The scripts remain unchanged.

GaussDB does not support COLLATE in tables. This configuration will not migrate scripts.

comment

Comment COLLATE.

GaussDB does not support COLLATE in tables. This configuration will comment the scripts.

error

Ignore the migration. An error is recorded.

GaussDB does not support COLLATE in tables. This configuration does not migrate the scripts and logs an error.

real_as_float_in_sql_mode

REAL type conversion

It is applicable if tables contain one or more REAL columns.

Table

TRUE

Convert REAL to FLOAT.

The REAL data type is converted to FLOAT.

FALSE

Convert REAL to DOUBLE PRECISION.

The REAL data type is converted to DOUBLE PRECISION.

index_constraint_mapping_support

Mapping strategy for index/constraint names, preventing collision

The uniqueness scope of GaussDB indexes and constraints is different from that of MySQL indexes and constraints. When a conflict occurs, you can select this configuration to use the table name as the prefix to ensure uniqueness.

Table, index

IGNORE

(Default value) Preserver the original name.

The readability of the original name can be retained, but naming conflicts may occur in GaussDB. In MySQL, index names and constraint names are scoped within a table, allowing different tables to have identically named constraints and indexes. However, in GaussDB, the scoping is done at the schema level, and preserving original names after migration can result in naming conflicts.

HASH

Concat the table name as a prefix with the constraint name or index name. If the table name is too long, hash the table name and add the idx_ prefix.

The name conflict problem is solved. However, when the name is too long, the readability of the name is lost. In addition, in the subsequent maintenance processes such as DROP and RENAME, you need to use UGO to convert the SQL statement so that the name can be correctly executed.