Updated on 2024-05-28 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

Prevent index/constraint names 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 configure mapping strategies for index/constraint names to ensure uniqueness.

Table, index

IGNORE

Retain the original name (default value).

The readability of the original name can be retained, but naming conflicts may occur in GaussDB. In GoldenDB, 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.

CONCAT

Concat the table name with the index or constraint name and separate them by underscores (_). If the concatenated name exceeds 63 bytes. an error will be reported.

The readability of the name is retained, and the uniqueness of the concatenated name is ensured. In GaussDB, the maximum length of an index or constraint name is 63 bytes. However, the length of the concatenated name may easily exceed the limit. No error is reported when an overlong name is inserted, instead the name will be truncated by GaussDB. For the truncated name, there may still have a name collision, so an error is reported when the name is too long.

HASH

Concat the table name with the index or constraint name to prevent name conflicts. If the concatenated name exceeds 63 bytes, perform a hash on the name using SHA-1.

The name conflict and ultra-long problems are solved. However, when the concatenated name is too long, the readability of the name is lost.