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

[BUG] myloader 0.11.1 fails to restore dump with several databases #409

Closed
nerijus opened this issue Sep 24, 2021 · 3 comments · Fixed by #410
Closed

[BUG] myloader 0.11.1 fails to restore dump with several databases #409

nerijus opened this issue Sep 24, 2021 · 3 comments · Fixed by #410
Labels

Comments

@nerijus
Copy link

nerijus commented Sep 24, 2021

With 0.10.7-2 it works:

$ myloader -d export-20210924-061432  --threads=1 --verbose=3 -o 2> mydumper.log

mydumper.log:

** Message: 07:28:12.626: 1 threads created
** Message: 07:28:12.627: Dropping table or view (if exists) `ejabberd`.`archive`
** Message: 07:28:12.640: Creating table `ejabberd`.`archive`
...
** Message: 07:28:12.950: Dropping table or view (if exists) `reg_manager`.`schema_migrations`
** Message: 07:28:12.951: Creating table `reg_manager`.`schema_migrations`
...

With 0.11.1-1 or 0.11.1-2 it fails:

** Message: 07:31:00.659: Step 1 completed, Databases created
** Message: 07:31:00.661: Thread 1 restoring table `ejabberd`.`archive` from /var/opt/export-20210924-061432/ejabberd.archive-schema.sql.gz
** Message: 07:31:00.661: Dropping table or view (if exists) `ejabberd`.`archive`
** Message: 07:31:00.672: Creating table `ejabberd`.`archive` from /var/opt/export-20210924-061432/ejabberd.archive-schema.sql.gz
...
** Message: 07:31:00.947: Thread 1 restoring table `reg_manager`.`schema_migrations` from /var/opt/export-20210924-061432/reg_manager.schema_migrations-schema.sql.gz
** Message: 07:31:00.947: Dropping table or view (if exists) `reg_manager`.`schema_migrations`
** Message: 07:31:00.951: Creating table `reg_manager`.`schema_migrations` from /var/opt/export-20210924-061432/reg_manager.schema_migrations-schema.sql.gz

** (myloader:22565): CRITICAL **: 07:31:00.951: Error restoring: CREATE TABLE `schema_migrations` (
  `version` bigint(20) NOT NULL,
  `dirty` tinyint(1) NOT NULL,
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

** (myloader:22565): CRITICAL **: 07:31:00.951: Thread 1 issue restoring /var/opt/export-20210924-061432/reg_manager.schema_migrations-schema.sql.gz: Table 'schema_migrations' already exists
...
@nerijus
Copy link
Author

nerijus commented Sep 24, 2021

It seems the bug manifests itself when restoring 2nd database:

** Message: 07:31:00.920: Dropping table or view (if exists) `ejabberd`.`vcard_search`
** Message: 07:31:00.923: Creating table `ejabberd`.`vcard_search` from /var/opt/export-20210924-061432/ejabberd.vcard_search-schema.sql.gz
** Message: 07:31:00.947: Thread 1 restoring table `reg_manager`.`schema_migrations` from /var/opt/export-20210924-061432/reg_manager.schema_migrations-schema.sql.gz
** Message: 07:31:00.947: Dropping table or view (if exists) `reg_manager`.`schema_migrations`
** Message: 07:31:00.951: Creating table `reg_manager`.`schema_migrations` from /var/opt/export-20210924-061432/reg_manager.schema_migrations-schema.sql.gz

** (myloader:22565): CRITICAL **: 07:31:00.951: Error restoring: CREATE TABLE `schema_migrations` (
  `version` bigint(20) NOT NULL,
  `dirty` tinyint(1) NOT NULL,
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

** (myloader:22565): CRITICAL **: 07:31:00.951: Thread 1 issue restoring /var/opt/export-20210924-061432/reg_manager.schema_migrations-schema.sql.gz: Table 'schema_migrations' already exists

@nerijus nerijus changed the title [BUG] myloader 0.11.1 fails to restore dump [BUG] myloader 0.11.1 fails to restore dump with several databases Sep 24, 2021
@davidducos
Copy link
Member

Hi @nerijus, is schema_migrations present in other databases?

@davidducos
Copy link
Member

Hi @nerijus, I found the bug, actually, I fixed on https://github.com/maxbube/mydumper/tree/stream but didn't realize that it was on this one. Sorry! Pull request and new release is on its way

@davidducos davidducos added the bug label Sep 24, 2021
@davidducos davidducos added this to the Release 0.11.1-3 milestone Sep 24, 2021
@davidducos davidducos linked a pull request Sep 24, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants