Trouble with virtual generated columns

Open
#338 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
databases

Research direction

Start by tracing ghostferry's query preparation and how generated columns are included in insert statements; the issue does not name specific files or tests. Reproduce the MySQL error with a virtual generated column, then verify that migration inserts omit values for those columns without affecting other columns.

Written by the indexing model from the issue text.

Description

👋 We have a virtual generated column, but it seems like ghostferry is trying to insert data into the virtual generated column when it should not, resulting in an error like...

during prepare query near paginationKey <redacted>: Error 3105: The value specified for generated column '<redacted>' in table '<redacted>' is not allowed.

Seems like we should just not insert any data into virtual generated columns

Dominant language
Go
Stars
855
Forks
74
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Shopify/ghostferry

All issues in Shopify/ghostferry

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.