druidfi/mysqldump-php

Virtual columns cause side effects (complete inserts switched on) and break gdpr-dump of Shopware 6

Closed this issue · 7 comments

amenk commented

When virtual columns appear during dumping, complete-inserts are switched on.

With generated columns it causes also a "Column count doesn't match value count"

See here for more details: Smile-SA/gdpr-dump#78

Maybe that setting value to true could be changed with some method e.g. disableCompleteInsert().

Could you provide a PR?

amenk commented

The real problem is, that dumping tables with generated columns is breaking when complete inserts are on; so we will probably need to try to fix this one first. The side effect is just strange, but might be neglectable - I am wondering why they are being switched on when there are virtual columns.

Dunno, that line comes from original ifsnop/mysqldump-php repo and I'm not familiar with whole complete-insert thing in general.

amenk commented

will try to make a PR

amenk commented

There is already test for GENERATED / VIRTUAL columns, which works. still need to make a minimal reproducible sample. Maybe it's related to the hex-blob option which is currently not set in the test. But simply setting it to true also does not make the test fail, maybe binary columns are needed....

amenk commented

Thank you