Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbsake sieve --format=stream + filtering + multiple databases #79

Open
abg opened this issue Oct 20, 2014 · 0 comments
Open

dbsake sieve --format=stream + filtering + multiple databases #79

abg opened this issue Oct 20, 2014 · 0 comments
Assignees

Comments

@abg
Copy link
Owner

abg commented Oct 20, 2014

If there are multiple databases and filtering only matches one (or some subset) of these databases, the empty CREATE DATABASE ... / USE <database> sections are still output. If this output is imported into a MySQL database, then empty databases are created which is annoying.

I think here it might make sense to defer output of these "CREATE DATABASE" sections (or the trailing "USE database" sections during final view creation) until at least one table event is output - possibly with an option to --include-empty-databases?

This is complicated in the case of views, since view creation is deferred until the very end of the backup, so if we store the original CREATE DATABASE strings we may have to queue this for all databases. Even for thousands of databases, this isn't a terrible amount of data but still increases the memory footprint. This would be necessary to remember the original character set of the database, at least.

@abg abg added the enhancement label Dec 3, 2014
@abg abg self-assigned this Jan 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant