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] changing the export folder name after mydumper --load-data will result in myloader failing to find the .dat files #576

Closed
matthewlenz opened this issue Feb 11, 2022 · 1 comment · Fixed by #578
Labels

Comments

@matthewlenz
Copy link

matthewlenz commented Feb 11, 2022

When building the corresponding files:

db_name.table_name.00000.dat.gz & db_name.table_name.00000.sql.gz

db_name.table_name.00000.sql.gz will contain something like the following:

LOAD DATA LOCAL INFILE 'export-20220210-105303/db_name.table_nbame.00000.dat.gz' REPLACE INTO TABLE `table_name` LINES TERMINATED BY '\n' (`id`,`some_col`);

If you rename the original folder from export-20220210-105303 to "some_folder" and then attempt to use myloader it will create the schema but then fail to load the data because the directory no longer exists. Instead mydumper should forgo placing the original export directory name in the .sql file and instead myloader should chdir into the dump --directory.

Unfortunately this fix will break myloader compatibility with previous dumps that used mydumper --load-data

@davidducos davidducos added the bug label Feb 14, 2022
@davidducos davidducos added this to the Release 0.12.1 milestone Feb 14, 2022
@davidducos
Copy link
Member

Ok, nice catch! I will be reviewing why I took the decision of doing in that way and if I don't find any good reason, I will be create a pull request to fix it.

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