ifsnop / mysqldump-php

PHP version of mysqldump cli that comes with MySQL
https://github.com/ifsnop/mysqldump-php
GNU General Public License v3.0
1.25k stars 300 forks source link

virtual cols: fix unwanted insert on bit+hex-blob #214

Closed beuss closed 1 year ago

beuss commented 3 years ago

When hex-blob was specified and virtual columns of type blob or bit existed, produced dump file was invalid.

Move the "virtual-column" case on the top of the getColumnStmt process to totally ignore generated columns & switch to complete insert even if hex-blob is specified and we've a bit generated column.

ifsnop commented 3 years ago

Thanks for your contribution, are you able to share a small table dump and a list of options for mysqldump-php that would lead to this bug? I would like to add it to the test cases.

El lun., 30 nov. 2020 10:54, Sébastien Le Ray notifications@github.com escribió:

When hex-blob was specified and virtual columns of type blob or bit existed, produced dump file was invalid.

Move the "virtual-column" case on the top of the getColumnStmt process to totally ignore generated columns & switch to complete insert even if hex-blob is specified and we've a bit generated column.

You can view, comment on, or merge this pull request online at:

https://github.com/ifsnop/mysqldump-php/pull/214 Commit Summary

  • virtual cols: fix unwanted insert on bit+hex-blob

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ifsnop/mysqldump-php/pull/214, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHMH2G65JQ7BFZTY7FEEHLSSNTV3ANCNFSM4UHKQ7SA .

ifsnop commented 1 year ago

Finally got some time to implement tests and a fix.