Re: [sqlite] Unnecessary line breaks in .dump output

2009-03-31 Thread P Kishor
On Tue, Mar 31, 2009 at 5:46 AM, Francois Botha  wrote:
>>
>> Perhaps the OP should file a ticket to have this corrected
>> in the SQLite command line tool.
>>
>
> What's the OP?  Just want to know if I must log the bug or whether you're
> referring to somebody else.
>
> If the OP is somebody else, please log it and let me know what the ticket
> number is so that I can follow it.

You are the OP, the original poster of the message that started this thread.


>
> thanks,
> Francois
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Unnecessary line breaks in .dump output

2009-03-31 Thread Francois Botha
>
> Perhaps the OP should file a ticket to have this corrected
> in the SQLite command line tool.
>

What's the OP?  Just want to know if I must log the bug or whether you're
referring to somebody else.

If the OP is somebody else, please log it and let me know what the ticket
number is so that I can follow it.

thanks,
Francois
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Unnecessary line breaks in .dump output

2009-03-28 Thread Francois Botha
>
>
> Attachments don't make it through the mailing list,
>

Uhm, sorry. I'm new here.  I don't want to paste the SQL script in an email,
because it contains line breaks and I don't want the formatting to change
during email transport.

Try www.vwd.co.za/sqlitedump.zip

regards,
Francois
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Unnecessary line breaks in .dump output

2009-03-27 Thread Simon Davies
2009/3/27 Simon Davies :
> 2009/3/27 Francois Botha :
>>
>> Uhm, sorry. I'm new here.  I don't want to paste the SQL script in an email,
>> because it contains line breaks and I don't want the formatting to change
>> during email transport.
>>
>> Try www.vwd.co.za/sqlitedump.zip
>
> Confirm I get same result you are reporting.
>
> Don't believe it is sqlite issue tho.
>
> shell.c about line 704:
>    fprintf(p->out, "%s;\n", zSql);
>
> At this point zSql contains exactly the right characters. However, in
> the file resulting from the printf, extra '0D' characters appear.
>
> Note that this only occurs with redirection on the command line. Using
> ".output t.sql" at the sqlite shell prompt gives the result I would
> expect.
>
> Maybe people more familiar with micros*t internals could explain...
>
>>
>> regards,
>> Francois
>
> Rgds,
> Simon
>

Forgot to mention:
The extra '0D' characters appear where there are embeded newlines in
the CREATE statements.

Rgds,
Simon
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Unnecessary line breaks in .dump output

2009-03-27 Thread Simon Davies
2009/3/27 Francois Botha :
> (my apologies if this is a duplicate)
>
>
>> Attachments don't make it through the mailing list,
>>
>
> Uhm, sorry. I'm new here.  I don't want to paste the SQL script in an email,
> because it contains line breaks and I don't want the formatting to change
> during email transport.
>
> Try www.vwd.co.za/sqlitedump.zip

Confirm I get same result you are reporting.

Don't believe it is sqlite issue tho.

shell.c about line 704:
fprintf(p->out, "%s;\n", zSql);

At this point zSql contains exactly the right characters. However, in
the file resulting from the printf, extra '0D' characters appear.

Note that this only occurs with redirection on the command line. Using
".output t.sql" at the sqlite shell prompt gives the result I would
expect.

Maybe people more familiar with micros*t internals could explain...

>
> regards,
> Francois

Rgds,
Simon
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Unnecessary line breaks in .dump output

2009-03-27 Thread Francois Botha
(my apologies if this is a duplicate)


> Attachments don't make it through the mailing list,
>

Uhm, sorry. I'm new here.  I don't want to paste the SQL script in an email,
because it contains line breaks and I don't want the formatting to change
during email transport.

Try www.vwd.co.za/sqlitedump.zip

regards,
Francois
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Unnecessary line breaks in .dump output

2009-03-27 Thread Simon Davies
2009/3/27 Francois Botha :
>
> The example you used, works 100% for me.  I attach a sql script for which I
> experience the problem.
>

Attachments don't make it through the mailing list,

Rgds,
Simon
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Unnecessary line breaks in .dump output

2009-03-27 Thread Francois Botha
>
>
> See if you get same problem using data above.
> If not, then your data is relevant to the issue.
> If yes, then your sqlite is not the same as mine.
>
> Rgds,
> Simon


The example you used, works 100% for me.  I attach a sql script for which I
experience the problem.

Extract it and do:

C:\Utils>sqlite3 -init t.sql t.db .quit
-- Loading resources from t.sql

C:\Utils>sqlite3 t.db .dump > t1.sql

C:\Utils>del t.db

C:\Utils>sqlite3 -init t1.sql t.db .quit
-- Loading resources from t1.sql

C:\Utils>sqlite3 t.db .dump > t2.sql

C:\Utils>xd t1.sql > t1.dmp

C:\Utils>xd t2.sql > t2.dmp

C:\Utils>diff t1.dmp t2.dmp
5,107c5,107
< 40: 0A 5B 52 65 6C 61 74 69  76 65 50 61 74 68 5D 20
< 50: 56 41 52 43 48 41 52 28  31 30 30 29 20 20 4E 55
< 60: 4C 4C 2C 0D 0D 0A 5B 46  69 6C 65 4E 61 6D 65 5D

>670: 61 6C 6C 79 55 70 64 61  74 65 64 46 69 6C 65 73
>680: 22 20 56 41 4C 55 45 53  28 27 2E 27 2C 27 68 79
>690: 62 72 69 73 2E 65 78 65  27 2C 31 29 3B 0D 0A 43
>6A0: 4F 4D 4D 49 54 3B 0D 0A

C:\Utils>


regards,
Francois
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Unnecessary line breaks in .dump output

2009-03-27 Thread Francois Botha
Hi,

I noticed that there is unnecessary line breaks in the .dump output,
specifically \n characters, (not full \r\n 's).

To illustrate this

Put this in a loop (say about a 100) times:

sqlite3.exe MyDB.s3db .dump > MyDB.sql
del MyDB.s3db
sqlite3.exe -init MyDB.sql MyDB.s3db .quit


With each loop, the MyDB.sql file's size increases, although the structure
and contents of the .s3db remains exactly the same.

I'm using the command line client of Sqlite v3.6.11 on Windows XP.

Can anyone confirm whether this is a bug or stupidity on my side?

regards,
Francois Botha
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users