This project has moved. For the latest updates, please go here.

incorrect work when ImportInfo.IgnoreSqlError is true


When you do import of the DB dump with ImportInfo.IgnoreSqlError = true option, and there is a line which causes an error in the process, the following happens:
1) Import_AppendLineAndExecute() thrown an error at _mySqlScript.Execute(); line, but new _sbImport stream reader is not created;
2) the exception bubbles up to Import_Start() where it is caught by try and logged if required.
3) while loop continues, but since (look #1) new _sbImport stream reader is not created, it already contains a line with error. New line is read and appended to stream reader, but it results in exception again when it comes to Import_AppendLineAndExecute().

Basically, the rest of the script is simply not executed after a line with error when ImportInfo.IgnoreSqlError is set to true.

create new _sbImport stream reader when error is caught in Import_Start(), so wrong line is not executed multiple times.

Or, if you know any side effects from proposed solution, you can apply proper fix.


adriancs wrote Jun 13, 2016 at 4:14 AM

Your information provided is clear.
Will look into this and fix.
Thanks for the report.