Updated on 2025-06-07 GMT+08:00

U0400012: GaussDB temporary tables do not support AUTO INCREMENT

Description

Database Type and Version

  • Source database type and version: MySQL 5.5, 5.6, 5.7, and 8.0
  • Target database type and version: all GaussDB versions

Syntax Example

By default, UGO comments out AUTO_INCREMENT of temporary tables. If Temporary table auto-increment is set to This config will not do the migration and the source script will be retained as it is, this error will be reported.

As described in U0400010: GaussDB Distributed does not support AUTO_INCREMENT, AUTO_INCREMENT is not supported by GaussDB Centralized of versions earlier than V2.0-3.1. By default, AUTO_INCREMENT is converted to a custom sequence column. However, GaussDB temporary tables do not support sequence integers, for example (custom sequence columns cannot be bound to the tables):

CREATE TEMPORARY TABLE temp_tale_test(
    id SERIAL,
    test varchar(64)
);

Suggestion

Modify Temporary table auto-increment.