MySQL Error 3105 When Replicating from MySQL to Aurora

1

Hi,

I'm using the Database Migration Service to migrate data from a MySQL 5.7 instance to the Aurora equivalent. The initial migration load seems to be working fine but the replication has trouble with virtual columns. I'm getting a 3105 error when an INSERT is happening on a target with virtual columns which means the tool is trying to insert real data into the virtual column. Is this a known error with the latest version of the DMS tool, 3.5.1 I think?

This is completely holding up my migration at the moment.

Thanks in advance,

1 Answer
0

Hello, I'm Seungwon, the support engineer answering you with RDS issue.

I can only offer responses based on general possibilities.

Because, I can’t access your resource.

Your understanding in this matter is greatly appreciated.

First of all you need to check below limitations.

Generated column definitions have this syntax:

col_name data_type [GENERATED ALWAYS] AS (expr)

[VIRTUAL | STORED] [NOT NULL | NULL]

[UNIQUE [KEY]] [[PRIMARY] KEY]

[COMMENT 'string']

AS (expr) indicates that the column is generated and defines the expression used to compute column values. AS may be preceded by GENERATED ALWAYS to make the generated nature of the column more explicit.
Constructs that are permitted or prohibited in the expression are discussed later. The VIRTUAL or STORED keyword indicates how column values are stored, which has implications for column use:

  • VIRTUAL: Column values are not stored, but are evaluated when rows are read, immediately after any BEFORE triggers. A virtual column takes no storage. 
InnoDB supports secondary indexes on virtual columns. See Section 13.1.18.8, “Secondary Indexes and Generated Columns”.
  • STORED: Column values are evaluated and stored when rows are inserted or updated. A stored column does require storage space and can be indexed. [+] https://dev.mysql.com/doc/refman/5.7/en/create-table-generated-columns.html

from above explanation, we can see virtual column takes no storage. This means that values can’t be inserted directly to this column due to engine level behavior. Thus, Insert(CDC) operation not work well.

Additionally, DMS in FULL LOAD phase reads the data from source table using the select query, based on the table mapping rule and loads it on to the target DB.

In CDC replication phase, DMS reads the binary log events to get the changes to replicate it on to the target DB.

So when DMS tried to load or replicate the data in your case, target table is not accepting the data and throwing the above error.

In order to fix this issue, you need to avoid inserting the data for the virtual column on target during the migration.

[+] https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.Transformations.html

I hope that you found this information useful and the services mentioned above are suitable for your requirements and specific use-cases.

If further precise analysis and root cause identification are required, I recommend considering enrollment in an AWS Support Plan. This will ensure that an appropriate engineer is assigned to your case, enabling you to obtain the desired resolution.

[+] AWS Support Plan - https://aws.amazon.com/premiumsupport/plans/?nc1=h_ls

profile pictureAWS
SUPPORT ENGINEER
answered 8 months ago
profile picture
EXPERT
reviewed 18 days ago
  • Can you please give an example of such transformation rule?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions