Inconsistent line Endings when trying to open backup file in MySqlWorkBench :

Developer
Nov 19, 2012 at 1:07 AM
Edited Nov 19, 2012 at 1:09 AM

 

I tried to open the backup file using mysql workbench application, and a pop up saying "Inconsistent line Endings". the sql that i tried to open has blob columns with some more than 3mb of data i think.

Below are the exact words from the pop up.

 

-------------------------------------------------------

Line Endings are inconsistent.
Select the line ending format to apply.
Result of conversion will replace original file contents if file is saved afetrwards.

Line Ending Format: CR+LF,CR,LF

--------------------------------------------------------

 

"Line Ending Format: LF,CR,CR+LF" is a drop down with 3 options

Developer
Nov 19, 2012 at 2:19 AM
Edited Nov 19, 2012 at 2:56 AM

I created the back up again but this time a unchecked the following

Export Stored Procedures
Export Functions
Export Triggers
Export Events
Export Views

and then i open the file in workbench and the "Inconsistent Line Ending" pop is gone, One of the list above has created this inconsistent line endings.

by the way i'm using "1.4.5 beta", do we have a solution for this on "1.5.2 beta"? i haven't tested the "1.5.2 beta".

 

Thanks,

Coordinator
Nov 20, 2012 at 2:22 PM

hi, crayzyivan, 

yes, the line ending in 1.5.2 is  CR+LF and it is consistent. You may want to try it with 1.5.2.

However, there are some changes of code structure between 1.4.5 and 1.5.2. You may want to have a look at the documentation for 1.5.

Note: Latest release is 1.5.3 beta.

good luck.

Developer
Nov 21, 2012 at 11:19 PM

Hi Adrian,

 

i sent you a message last tme by using the contact button of codeplex but seem you did not receive the message, anyway i have a question can we add the feature to the back that we can only select which table to backup the rows. without affecting the database in long run? Ex. we backup table1,table2,table3. but we only want to export rows of table1 and table2, and the table3 is structure only?

https://hotfile.com/dl/180100617/c5641a1/MySQLBackup.rar.html

 

Thanks

Coordinator
Nov 22, 2012 at 2:35 PM
Edited Nov 22, 2012 at 2:38 PM

Hi crayzyivan, i did not receive the message. Perhaps the message had been redirected into spam mail box and I had missed it.

you may try this:

C#:

Dictionary dic = new Dictionary();
dic["table1"] = "SELECT * FROM `table1`;";
dic["table2"] = "SELECT * FROM `table2`;";
dic["table3"] = "SELECT * FROM `table3` where 1 = 2;";
string con = "server=localhost;user=root;pwd=1234;database=test;";
string file = "C:\\backup.sql";
MySqlBackup mb = new MySqlBackup(con);
mb.ExportInfo.TableCustomSql = dic;
mb.ExportInfo.FileName = file;
mb.Export();

VB.NET:

Dim dic As New Dictionary()
dic("table1") = "SELECT * FROM `table1`;"
dic("table2") = "SELECT * FROM `table2`;"
dic("table3") = "SELECT * FROM `table3` where 1 = 2;"
Dim con As String = "server=localhost;user=root;pwd=1234;database=test;"
Dim file As String = "C:\backup.sql"
Dim mb As New MySqlBackup(con)
mb.ExportInfo.TableCustomSql = dic
mb.ExportInfo.FileName = file
mb.Export()

Developer
Nov 23, 2012 at 12:42 AM

yup, this is it. thanks...