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]In csv mode, **.dat** files occasionally start with 'INSERT INTO tabName VALUES' in the last line of records #695

Closed
huangzhiyong opened this issue May 20, 2022 · 0 comments · Fixed by #696
Labels

Comments

@huangzhiyong
Copy link
Contributor

huangzhiyong commented May 20, 2022

Describe the bug
With csv enabled, the exported file should be in plain text format. But there is a chance that the last line in the .dat file starts with 'INSERT INTO tabName VALUES'. as follows:

...(omit)
2020004998,...(omit)
INSERT INTO reconciledItem VALUES2020004999,...(omit)

To Reproduce
Command executed:
mydumper -T $tabName -h test.host -u xxxx -p xxxxx -B $DB -k -m -o $outputDir -L $logFile -t 12 --order-by-primary --csv --where "$pkName >= $minNum and $pkName < $curMax"

What mydumper and myloader version has been used?
mydumper 0.12.3-[1,2], built against MySQL 5.7.37-40

Expected behavior
In csv mode, it should be in plain text format, and no SQL should appear

Log
no error log

Environment (please complete the following information):

  • OS version: [e.g. CentOS 7.9, Ubuntu 20.04] 4.14.181-140.257.amzn2.x86_64
  • MyDumper version: [ mydumper --version ]: mydumper 0.12.3-[1,2], built against MySQL 5.7.37-40
@huangzhiyong huangzhiyong changed the title [BUG]In csv mode, dat files occasionally start with 'INSERT INTO tabName VALUES' in the last line of records [BUG]In csv mode, dat files occasionally start with 'INSERT INTO tabName VALUES' in the last line of records May 20, 2022
@huangzhiyong huangzhiyong changed the title [BUG]In csv mode, dat files occasionally start with 'INSERT INTO tabName VALUES' in the last line of records [BUG]In csv mode, **.dat** files occasionally start with 'INSERT INTO tabName VALUES' in the last line of records May 20, 2022
@davidducos davidducos linked a pull request May 20, 2022 that will close this issue
@davidducos davidducos added the bug label May 20, 2022
@davidducos davidducos added this to the Release 0.12.5-1 milestone May 20, 2022
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