Re: [sqlite] Corrupted database (image is malformed): always the same size
On 21 Dec 2009, at 8:00am, Gianandrea Gobbo wrote: > At this stage, I cannot think of an applicative bug that leads to this > kind of corruption, where the database results always in the same size. The only time I ever saw a number of files all truncated to the same length, the fault was in hardware. I'm not saying that this is the cause of your problem, and it was 20 years ago and things have moved on significantly since then. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Corrupted database (image is malformed): always the same size
Max Vlasov ha scritto: > On Fri, Dec 18, 2009 at 6:27 PM, Gianandrea Gobbowrote: > > Gianandrea, I once had an experience with fixing a modified code that led to > database disk image malformation. If you can reproduce the bug with a > comparatively few number of steps, I'd recommend running the program with > checking PRAGMA integrity_check; almost on every step. It costs a little in > terms of performance, but in my case it helped, a report about invalid Index > entries was way ahead of this particular error so it helped to narrow it to > several queries and finally to the invalid code fragment > ___ > Unfortunately I'm not able to reproduce the error right now. The only informations I get are from the field, from the return boards. I will try to grab more data from the customers. At this stage, I cannot think of an applicative bug that leads to this kind of corruption, where the database results always in the same size. I'll try to reproduce the error, btw. I'll keep you informed. Thanks again for the help. g. -- Gianandrea Gobbo Sviluppo Software Prodotti go...@solari.it +39 0432 497 387 Solari di Udine Spa - via Gino Pieri, 29 - 33100 - Udine Centralino: +39 0432 4971 - Fax +39 0432 480 160 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Corrupted database (image is malformed): always the same size
I also using 2.8, but i wondering why your database has 200 kb from the beginning. my databases have only 3 or 4 kb's. But at my host if i am using sqlite queries which are $db-> like, i get the same error. funny thing, but the database is not malformed... > > On 18 Dec 2009, at 3:27pm, Gianandrea Gobbo wrote: > >> I'm using sqlite (2.8) on an embedded product, running a Linux kernel. >> I'm experiencing sometimes a database corruption, and listing some >> tables contents gets me a "SQL error: database disk image is malformed". >> Ok, there can be many reasons for this, but the strange thing that >> puzzles me is that the database file has always the same size: 409Kb >> (418816 bytes). > > Interesting. Did you compile your own version of sqlite ? If so, could > you show us the directives you used. If not, tell us which distribution > you downloaded with. > > Are you using any PRAGMAs, especially those which speed up sqlite3 by > telling it not to do caching, or locking, or something like that ? If so, > please tell us which ones you used. > > If you are in control of either of these, please try doing without them: > leave sqlite3 with its default settings, /even if this would make your > product unacceptably slow in real life/. If using all the defaults > prevents your file corruption, you will know that it's one of your own > settings which is causing the problem. > > Simon. > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > Artur Reilin sqlite.yuedream.de ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Corrupted database (image is malformed): always the same size
On Fri, Dec 18, 2009 at 6:27 PM, Gianandrea Gobbowrote: > I'm using sqlite (2.8) on an embedded product, running a Linux kernel. > I'm experiencing sometimes a database corruption, and listing some > tables contents gets me a "SQL error: database disk image is malformed". > Ok, there can be many reasons for this, but the strange thing that > puzzles me is that the database file has always the same size: 409Kb > (418816 bytes). > Gianandrea, I once had an experience with fixing a modified code that led to database disk image malformation. If you can reproduce the bug with a comparatively few number of steps, I'd recommend running the program with checking PRAGMA integrity_check; almost on every step. It costs a little in terms of performance, but in my case it helped, a report about invalid Index entries was way ahead of this particular error so it helped to narrow it to several queries and finally to the invalid code fragment ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Corrupted database (image is malformed): always the same size
On 18 Dec 2009, at 3:27pm, Gianandrea Gobbo wrote: > I'm using sqlite (2.8) on an embedded product, running a Linux kernel. > I'm experiencing sometimes a database corruption, and listing some > tables contents gets me a "SQL error: database disk image is malformed". > Ok, there can be many reasons for this, but the strange thing that > puzzles me is that the database file has always the same size: 409Kb > (418816 bytes). Interesting. Did you compile your own version of sqlite ? If so, could you show us the directives you used. If not, tell us which distribution you downloaded with. Are you using any PRAGMAs, especially those which speed up sqlite3 by telling it not to do caching, or locking, or something like that ? If so, please tell us which ones you used. If you are in control of either of these, please try doing without them: leave sqlite3 with its default settings, /even if this would make your product unacceptably slow in real life/. If using all the defaults prevents your file corruption, you will know that it's one of your own settings which is causing the problem. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Corrupted database (image is malformed): always the same size
I'm using sqlite (2.8) on an embedded product, running a Linux kernel. I'm experiencing sometimes a database corruption, and listing some tables contents gets me a "SQL error: database disk image is malformed". Ok, there can be many reasons for this, but the strange thing that puzzles me is that the database file has always the same size: 409Kb (418816 bytes). Normally, the file could grow up to 1.5 Megs, starting from 200 kb. This makes me thing that something may fail while sqlite expands the database size grows across this figure. Any hint or suggestion what to look for? Thanks in advance, Gianandrea. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users