Re: Re: [sqlite] Database Corruption and fix suggsted

2006-11-14 Thread jayanth KP
Hi Richard,

It is a linux platform compiled with glibc library. And os.c is not changed.

Regards
Jayanth





  


On Tue, 14 Nov 2006 [EMAIL PROTECTED] wrote :
>"jayanth KP" <[EMAIL PROTECTED]> wrote:
> >
> > 2.) I compiled sqlite 2.8.13 for a proprietary platform that we are using 
> > for development(little endian) and ran sqlite binary on the directory that 
> > had the journal also.
> >
> > RESULT:
> > ---
> > The file is getting corrupted.
> >
> >
> > Please can you suggest to me what could be the issue. Or suggest to me 
> > where to look for this issue.
> >
>
>Prohaps the customized os.c that you are using on your proprietary
>platform has some subtle bug.
>--
>D. Richard Hipp  <[EMAIL PROTECTED]>
>
>
>-
>To unsubscribe, send email to [EMAIL PROTECTED]
>-
>




Re: Re: [sqlite] Database Corruption and fix suggsted

2006-11-14 Thread jayanth KP
Hi Richard,

Thanks.. As you said. Now I tried to open the database that is not 
corrupted with sqlite 2.8.13 (that we have). I have an intresting observation.

1.) I compiled sqlite 2.8.13 for PC (little endian) and ran sqlite binary on 
the directory that had the journal also.

RESULT: 
---
It did a rollback successfully - So this means sqlite 2.8.13 is fine.


2.) I compiled sqlite 2.8.13 for a proprietary platform that we are using for 
development(little endian) and ran sqlite binary on the directory that had the 
journal also.

RESULT: 
---
The file is getting corrupted.


Please can you suggest to me what could be the issue. Or suggest to me where to 
look for this issue.

Thanks and Regards
Jayanth







  


On Mon, 13 Nov 2006 [EMAIL PROTECTED] wrote :
>"jayanth KP" <[EMAIL PROTECTED]> wrote:
> > Hi Richard,
> > I downloaded the sqlite-2.8.17.bin from sqlite.org 
> > (sqlite-2.8.17.bin.gz) and ran it on media.vdb.corrupt. I am getting the 
> > following error . I am confused how were you able to open this file. Plz 
> > open media..vdb.corrupt.
> >
>
>Once a file gets corrupted, there is nothing that can magically
>undo the corruption.
>
>What I did to open the file was put both the database as it
>appeared on disk after the power failure, but before it was
>opened by your broken version of sqlite, and the rollback
>journal together in the same directory.  Then I opened the
>database with a working version of SQLite and it recovered
>the database correctly.
>
>--
>D. Richard Hipp  <[EMAIL PROTECTED]>
>
>
>-
>To unsubscribe, send email to [EMAIL PROTECTED]
>-
>




Re: Re: [sqlite] Database Corruption and fix suggsted

2006-11-13 Thread jayanth KP
Hi Richard,
I downloaded the sqlite-2.8.17.bin from sqlite.org (sqlite-2.8.17.bin.gz) 
and ran it on media.vdb.corrupt. I am getting the following error . I am 
confused how were you able to open this file. Plz open media.vdb.corrupt.

---
 ./sqlite-2.8.17.bin  /home/jayanth/to_drh/media.vdb.corrupt
Unable to open database "/home/jayanth/to_drh/media.vdb": file is encrypted or 
is not a database


Regards
Jayanth


On Mon, 13 Nov 2006 [EMAIL PROTECTED] wrote :
>"jayanth KP" <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I am using sqlite 2.8.13 which is supposed to have fix for "Corrupt 
> > problem encountered on Windows NT platform" check this 
> > (http://www.sqlite.org/cvstrac/tktview?tn=599). But the code in pager.c 
> > still has the following rc = write32bits(&pPager->jfd, pPager->noSync ? 
> > 0x : 0); . But as suggested in the fix it should have been rc = 
> > write32bits(&pPager->jfd, 0x); .
> >
> > I also saw 2.8.13 and 2.8.12 code in sqlite CVS. Even that does not have 
> > the suggested change
> >
> > Can anybody Please  explain ..
> >
>
>I took the after-power-failure sample database you sent me and
>opened it using SQLite version 2.8.17.  That worked great.  There
>were no errors.  PRAGMA integrity_check showed that the database
>was recovered intact.
>
>I suggest you download the latest 2.8.17 code and recompile
>using that.
>--
>D. Richard Hipp  <[EMAIL PROTECTED]>
>
>
>-
>To unsubscribe, send email to [EMAIL PROTECTED]
>-
>