Skip to content

Conversation

@jboonstra70
Copy link
Contributor

When I use the restore command to restore previously backup made by dump, it seems everything works fine (no errors). But when I check the restored database it's only restored up to the first table with a big amount of rows. The dump is fine, because I can restore it succesfully with for example MySQL Workbench.

Found that the used scanner in databse restore package has a default buffer which has a maximum content which is too small for the long lines generated by dump. A possible work-around is to supply dump with maxAllowedPacket option with the max size of this default buffer.
Or supply the scanner with a buffer which can handle the long lines, like I did in this pull request.

  • Added scanner buffer to max size same as defaultMaxAllowPacket from dump.
  • Added error check scanner to alert something has gone wrong.

…ump.

Added error check scanner to alert something has gone wrong.
Copy link
Collaborator

@deitch deitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you.

@deitch deitch merged commit f131ccc into databacker:master Feb 5, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants