Ok, so this is weird.  It seems that WAL mode is being activated from
the java code.
I just opened the bad database file in 3.7x and ran the command:
PRAGMA journal_mode=DELETE
to disable WAL.  I was then able to open the database file in the 3.6x version.

On Wed, Aug 3, 2011 at 11:56 PM, Miguel Morales <[email protected]> wrote:
> Yeah, that's right.  That makes sense.  I was going to try to read the
> bytes in and display the version but I'm too tired.
> But seems like that's the culprit of the issue.
> There might be a way of turning that off.
>
> On Wed, Aug 3, 2011 at 11:31 PM, Zsolt Vasvari <[email protected]> wrote:
>> This is what the end of the article says:
>>
>> "To prevent older versions of SQLite from trying to recover a WAL-mode
>> database (and making matters worse) the database file format version
>> numbers (bytes 18 and 19 in the database header) are increased from 1
>> to 2 in WAL mode. Thus, if an older version of SQLite attempts to
>> connect to an SQLite database that is operating in WAL mode, it will
>> report an error along the lines of "file is encrypted or is not a
>> database".
>>
>> To me that means that they deliberately preventing the DB to be opened
>> in pre-WAL versions, regardless if it's crashed or not.
>>
>>
>>
>> On Aug 4, 2:22 pm, Miguel Morales <[email protected]> wrote:
>>> It's still possible despite that, read the link I posted.
>>> If the file was in some sort of unfinished operation where the write
>>> ahead log it will change the file format.
>>> The file would still be readable by 3.7 by not by anything below.
>>>
>>> Read the file to determine its version.  Or send it over to the sqlite
>>> people as this appears not to be the expected behavior.
>>> Also, how is this database populated?  Via java code or through the
>>> sqlite command line?
>>>
>>> On Wed, Aug 3, 2011 at 11:14 PM, Zsolt Vasvari <[email protected]> wrote:
>>> >> Seems that something happened with that file, or it was in the middle
>>> >> of an operation or something.
>>>
>>> > No, it wasn't.  This is reproducible 100% of the time and the file is
>>> > not corrupted as it's openable and readable by 3.7.
>>>
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> > Groups "Android Developers" group.
>>> > To post to this group, send email to [email protected]
>>> > To unsubscribe from this group, send email to
>>> > [email protected]
>>> > For more options, visit this group at
>>> >http://groups.google.com/group/android-developers?hl=en
>>>
>>> --
>>> ~ Jeremiah:9:23-24
>>> Android 2D MMORPG:http://solrpg.com/, http://www.youtube.com/user/revoltingx
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> ~ Jeremiah:9:23-24
> Android 2D MMORPG: http://solrpg.com/, http://www.youtube.com/user/revoltingx
>



-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/, http://www.youtube.com/user/revoltingx

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to