Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command
On 12/21/2012 05:18 PM, Dan Kennedy wrote: Thanks. I think it's this: http://www.sqlite.org/src/info/0cfd98ee20 Dan. You are right. I have been re-reading our mail thread and this is exactly what happens. I have build a SQLite version from the latest version in the archive (3.7.16) and this version creates a correct backup. Thanks for the fix. -- Regards, Marco ten Thije ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command
On 12/21/2012 05:18 PM, Dan Kennedy wrote: Thanks. I think it's this: http://www.sqlite.org/src/info/0cfd98ee20 Dan. Thanks. I have looked into ticket, but we also see this problem when the backup is written and read by the same SQLite version (3.7.5). I have recreated a backup using the 3.7.5 version. These are the hexdumps of both the original file and the backup created with SQLite 3.7.5: The original file: 000 5153 694c 6574 6620 726f 616d 2074 0033 010 0004 0101 4000 2020 f1d0 7600 020 9700 2100 0300 0100 030 0100 040 050 0200 060 2d00 1de2 000d 0004 00e3 7202 2002 070 7301 e300 080 The backup created with SQLite 3.7.5: 000 5153 694c 6574 6620 726f 616d 2074 0033 010 0004 0101 4000 2020 0100 7600 020 9700 2100 0100 0100 030 0100 040 050 0100 060 2d00 1de2 000d 0004 00e3 7202 2002 070 7301 e300 080 -- Regards, Marco ten Thije ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command
54 is never used Page 55 is never used Page 58 is never used Page 65 is never used Page 66 is never used Page 68 is never used Page 73 is never used Page 82 is never used Page 89 is never used Page 91 is never used Page 93 is never used Page 98 is never used Page 99 is never used -- Regards, Marco ten Thije ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command
On 01/02/2013 11:03 AM, Marco ten Thije wrote: On 01/02/2013 10:04 AM, Dan Kennedy wrote: What series of commands did you pass to 3.7.5 to create this file? This file was copied from an existing product which uses QT 4.7 libraries to populate the database. I cannot reproduce the exact commands which resulted in this file, because it is populated dynamically by the software. I found out that QT 4.7 is using the 3.6.19 SQLite library. The databases were created using the 3.7.5 version, so you were right about this. The database is created with a 3.7.5 version and populated with 3.6.19 I did some more testing and found out that the backup database which SQLite 3.7.5 reports to be corrupted, is reported OK by SQLite 3.6.19, although this backup was created by the 3.7.5 SQLite version. I created a ASCII dump (using the .dump command) of the backup database using 3.6.19 and this dump is identical (except for the 'PRAGMA foreign_keys=OFF') to a dump of the original database. So it looks like SQLITE 3.7.5 and 3.7.15.1 (and probably all versions in between) have a problem reading the backup file, while 3.6.19 can read it. I have stored a copy of the original database on http://www.cbbio.nl/sqlite/energy.sqlite for further analysing Regards, Marco ten Thije ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command
Hello, We are facing a problem with the '.backup' command using the SQLite command line interface. The resulting backup-database seems to be corrupt. We ran into this problem on a ARM9 platform using SQLite 3.7.5, but it can also be reproduced on the latest 3.7.15.1 version on Intel. I have attached our database to this email. These are the steps to reproduce it: ./sqlite3 energy.sqlite SQLite version 3.7.15.1 2012-12-19 20:39:10 Enter .help for instructions Enter SQL statements terminated with a ; sqlite select count(*) from EnergyLogData; 3306 sqlite .backup backup.sqlite sqlite .exit The above shows the number of records in one of the tables and creates a backup to a new 'backup.sqlite' database file. But this new file seems to be corrupt: ./sqlite3 backup.sqlite SQLite version 3.7.15.1 2012-12-19 20:39:10 Enter .help for instructions Enter SQL statements terminated with a ; sqlite select count(*) from EnergyLogData; Error: database disk image is malformed sqlite .exit I have look into the Bug database and found ticket 3858, but that one should already be fixed and we are not writing to the database during the backup. Is this a bug or some other problem? -- Regards, Marco ten Thije *Use system engineering bv* Loc: Industriestraat 77 - 7482 EW HAAKSBERGEN - The Netherlands Mail Address: Postbus 236 - 7480 AE HAAKSBERGEN - The Netherlands T: +31 53 5741456 F: +31 53 5741458 E: marco.tenth...@usetechnology.nl mailto:marco.tenth...@usetechnology.nl I: www.usetechnology.nl http://www.usetechnology.nl/ Chamber of Commerce nr: Veluwe en Twente 528 98210 VAT nr.: NL 8506.54.713B01 /This message (including any attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorised use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. Use system engineering bv shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. Use system engineering bv does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference. / ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command
It returns 'ok': ./sqlite3 energy.sqlite SQLite version 3.7.15.1 2012-12-19 20:39:10 Enter .help for instructions Enter SQL statements terminated with a ; sqlite pragma integrity_check; ok sqlite So, the original database looks ok. I have compared the two databases (original and backup) and they only differ in a few bytes in the header. The sizes match. This is a diff between the hexdumps of both databases: diff energy.hex backup.hex 2,3c2,3 010 0004 0101 4000 2020 f1d0 7600 020 9700 2100 0300 0100 --- 010 0004 0101 4000 2020 0100 7600 020 9700 2100 0100 0100 6,7c6,7 050 0200 060 2d00 1de2 000d 0004 00e3 7202 2002 --- 050 0100 060 2d00 27e2 000d 0004 00e3 7202 2002 On 12/21/2012 02:34 PM, Eric Minbiole wrote: Can you please try running pragma integrity_check; on the original database? That will give an indication of whether the original database has any data corruption. On Fri, Dec 21, 2012 at 4:13 AM, Marco ten Thije marco.tenth...@usetechnology.nl wrote: Hello, We are facing a problem with the '.backup' command using the SQLite command line interface. The resulting backup-database seems to be corrupt. We ran into this problem on a ARM9 platform using SQLite 3.7.5, but it can also be reproduced on the latest 3.7.15.1 version on Intel. I have attached our database to this email. These are the steps to reproduce it: ./sqlite3 energy.sqlite SQLite version 3.7.15.1 2012-12-19 20:39:10 Enter .help for instructions Enter SQL statements terminated with a ; sqlite select count(*) from EnergyLogData; 3306 sqlite .backup backup.sqlite sqlite .exit The above shows the number of records in one of the tables and creates a backup to a new 'backup.sqlite' database file. But this new file seems to be corrupt: ./sqlite3 backup.sqlite SQLite version 3.7.15.1 2012-12-19 20:39:10 Enter .help for instructions Enter SQL statements terminated with a ; sqlite select count(*) from EnergyLogData; Error: database disk image is malformed sqlite .exit I have look into the Bug database and found ticket 3858, but that one should already be fixed and we are not writing to the database during the backup. Is this a bug or some other problem? -- Regards, Marco ten Thije --**--** *Use system engineering bv* Loc: Industriestraat 77 - 7482 EW HAAKSBERGEN - The Netherlands Mail Address: Postbus 236 - 7480 AE HAAKSBERGEN - The Netherlands T: +31 53 5741456 F: +31 53 5741458 E: marco.tenthije@usetechnology.** nlmarco.tenth...@usetechnology.nl mailto:marco.tenthije@** usetechnology.nlmarco.tenth...@usetechnology.nlI: www.usetechnology.nlhttp://www.usetechnology.nl/ Chamber of Commerce nr: Veluwe en Twente 528 98210 VAT nr.: NL 8506.54.713B01 --**--** /This message (including any attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorised use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. Use system engineering bv shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. Use system engineering bv does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference. / ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users -- Met een vriendelijke groet, Marco ten Thije *Use system engineering bv* Bezoekadres: Industriestraat 77 - 7482 EW HAAKSBERGEN - The Netherlands Postadres: Postbus 236 - 7480 AE HAAKSBERGEN - The Netherlands T: 053 5741456 F: 053 5741458 E: marco.tenth...@usetechnology.nl mailto:marco.tenth...@usetechnology.nl I: www.usetechnology.nl http://www.usetechnology.nl/ KvK nr: Veluwe en Twente 528 98210 BTW nr.: NL 8506.54.713B01 /Dit bericht (inclusief de eventuele bijlagen) is vertrouwelijk. Wanneer u dit bericht ten onrechte heeft ontvangen, dient u de afzender hiervan onmiddellijk per kerende e-mail op de hoogte te brengen en dit bericht te verwijderen uit uw systeem. Elk onbevoegd gebruik en/of onbevoegde verspreiding van dit bericht is niet
Re: [sqlite] Problems (maybe a bug) when creating a backup using the command line interface '.backup' command
What is the size of the two database files? The size of both files is 160768 bytes. Also, can we have the first 6 lines of each hex dump (i.e. enough to see the first 100 bytes)? The first bytes of the original database: 000 5153 694c 6574 6620 726f 616d 2074 0033 010 0004 0101 4000 2020 f1d0 7600 020 9700 2100 0300 0100 030 0100 040 050 0200 060 2d00 1de2 000d 0004 00e3 7202 2002 070 7301 e300 080 The first bytes of the backup database: 000 5153 694c 6574 6620 726f 616d 2074 0033 010 0004 0101 4000 2020 0100 7600 020 9700 2100 0100 0100 030 0100 040 050 0100 060 2d00 27e2 000d 0004 00e3 7202 2002 070 7301 e300 080 I can send the binary database, but the mailinglist strips the attachments. Best regards, Marco ten Thije // ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users