Help Center/ Data Replication Service/ Troubleshooting/ Failure Cases/ Real-time Synchronization from MySQL to GaussDB(DWS)/ Full Synchronization Error: value too long for type character varying
Updated on 2022-09-21 GMT+08:00

Full Synchronization Error: value too long for type character varying

Scenarios

During full synchronization, an error is reported, and the log information is as follows: service DATAMOVE failed, cause by: apply event=[type=table_data, batch_index_in_shard= %s, table_schema= %s, table_name= %s, record_num= %s] occur error, msg=apply to %s failed: ERROR: value too long for type character varying( %s) Where: COPY %s, line 1, column remarks.

Possible Causes

The possible causes are as follows:

  • The length of the varchar column in the user-defined table in the destination database is insufficient. MySQL and GaussDB(DWS) define the length of the varchar data type differently. MySQL defines the length of the varchar data type as the number of characters, while GaussDB (DWS) defines the length of the varchar data type as the number of bytes.

Solution

Contact destination database O&M engineers to increase the field precision in the destination database table.