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

U0400019: Multiple GaussDB tables cannot be updated or deleted

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: GaussDB Centralized of versions earlier than V2.0-3.1; GaussDB Distributed

Syntax Example

In GaussDB of some versions, multiple tables cannot be updated or deleted. This error is reported because UGO does not convert these tables.

The following example is not supported in GaussDB Centralized of versions earlier than V2.0-3.1 and GaussDB Distributed:

update sbtest2, sbtest1 set sbtest2.c='1' and sbtest1.id = 1;
delete from a,sub using test_keep a inner join test_keep1 sub on a.id=sub.id and sub.id=2 and a.fatherid=1;

Suggestion

Update and delete statements one by one, for example:

update sbtest2 set sbtest2.c='1';
update sbtest1 set sbtest1.id = 1;
delete from test_keep1 sub where sub.id=2 and sub.id in (select id from test_keep where fatherid=1);
delete from test_keep a where a.id=2 and a.fatherid=1;

Rewriting a single statement into multiple statements may increase the number of interactions between the client and the database and affect the performance.