Re: [android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-20 Thread Anthony Prieur
From my guess the database gets corrupted because of (some) flash disk 
controllers that lie to the OS and do not flush/sync properly the FS before 
crash/reboot, so even with transactions the DB gets corrupted in some 
cases. 

Le vendredi 20 septembre 2013 02:34:51 UTC+2, Kostya Vasilyev a écrit :

  Yes, but if the database can't be opened at sqlite level, it would only 
 help the app know that, not recover the data... And there are other ways to 
 detect that. Back to square one: why do they get corrupted in the first 
 place?

 Nathan 20 пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ 2013пїЅпїЅ. 4:05:53 
 пїЅпїЅпїЅпїЅпїЅпїЅпїЅ: 



 On Thursday, September 19, 2013 4:31:23 PM UTC-7, Kostya Vasilyev wrote:

  
 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.1_r2/android/database/sqlite/SQLiteDatabase.java

 Look for a method called onCorruption.


 It looks like we could, in 4.0+, define a custom DatabaseErrorHandler that 
 could do something different. 

 I have not done so. 

 Nathan
  

 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 
 android-d...@googlegroups.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 --- 
 You received this message because you are subscribed to the Google Groups 
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to android-developers+unsubscr...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.

 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-20 Thread Kostya Vasilyev
If that's really it, I wonder why you never see ads or reviews saying
This 32 core, 6GHz device with a 6 4x HD screen can corrupt your
data up to four times faster than the closest competitor!

Seriously, why is this not part of the compatibility test (I realize
it maybe a difficult thing to detect, but it's users' data at stake).

Some of us still shiver from all the data storage issues that the
original Galaxy S had.

Curiously, I'm also getting - admittedly rare - reports of shared
prefs values randomly changing, including some in files that the user
can't touch in the app's UI.

On the other hand, if this is flash memory going bad on some specific
devices (as opposed to device models), then how does the user run
chkdsk / fsck / surface scan / whatever to detect it?

-- K


2013/9/20 Anthony Prieur anthony.pri...@gmail.com:
 From my guess the database gets corrupted because of (some) flash disk
 controllers that lie to the OS and do not flush/sync properly the FS before
 crash/reboot, so even with transactions the DB gets corrupted in some cases.

 Le vendredi 20 septembre 2013 02:34:51 UTC+2, Kostya Vasilyev a écrit :

 Yes, but if the database can't be opened at sqlite level, it would only
 help the app know that, not recover the data... And there are other ways to
 detect that. Back to square one: why do they get corrupted in the first
 place?


 Nathan 20 пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ 2013пїЅпїЅ. 4:05:53
 пїЅпїЅпїЅпїЅпїЅпїЅпїЅ:



 On Thursday, September 19, 2013 4:31:23 PM UTC-7, Kostya Vasilyev wrote:


 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.1_r2/android/database/sqlite/SQLiteDatabase.java

 Look for a method called onCorruption.


 It looks like we could, in 4.0+, define a custom DatabaseErrorHandler that
 could do something different.

 I have not done so.

 Nathan


 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-d...@googlegroups.com

 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-19 Thread Nathan
Also interested in any other reasons I might be getting 
SQLiteDiskIOException disk I/O error (code 1802) at random times in the 
field. 

After thinking this was a real breakthrough, I heard back from people 
saying that their database was less than 1 GB anyway. This could be not a 
real problem, or it could be just one of many problems. 

Data from the (singleton) SQliteDatabase can be read from multiple threads, 
but from my best understanding of SQLiteDatabases, reads and writes will 
simply block until they get access. 

Nathan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-19 Thread Michael Banzon
Sorry for turning the discussion in another direction but I have to
ask out of curiosity: What kind of data do you have in the database to
make it 2GB or above?

On Thu, Sep 19, 2013 at 7:09 PM, Nathan nathan.d.mel...@gmail.com wrote:
 Also interested in any other reasons I might be getting
 SQLiteDiskIOException disk I/O error (code 1802) at random times in the
 field.

 After thinking this was a real breakthrough, I heard back from people saying
 that their database was less than 1 GB anyway. This could be not a real
 problem, or it could be just one of many problems.

 Data from the (singleton) SQliteDatabase can be read from multiple threads,
 but from my best understanding of SQLiteDatabases, reads and writes will
 simply block until they get access.

 Nathan

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.



-- 
Michael Banzon
http://michaelbanzon.com/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-19 Thread Kostya Vasilyev
I also get -- rare and very unpleasant -- support emails with this
error, also database disk image is malformed.

Sometimes it's one of the databases used internally by WebView (and
yet, a crash is a crash).

Then there are rare cases when the app's database just disappears.

The framework has code to detect corrupted databases and delete them.
Most likely it's this code that kicks in. I doubt it was added into
the framework just for my app.

SQLite is supposedly the best tested piece of software ever. However,
there was one case when its developer admitted on a mailing list that
a particular version, which happened to be included in a particular
Android release, could corrupt its in-memory buffer, albeit not disk
image (if my memory serves me). So nothing is perfect, all software
has bugs, yada yada yada...

I don't even have a theory on what the root cause is: other SQLite
bugs, Android's use of ext4, memory chips going bad... I just look at
it as a given.

-- K

2013/9/19 Nathan nathan.d.mel...@gmail.com:
 Also interested in any other reasons I might be getting
 SQLiteDiskIOException disk I/O error (code 1802) at random times in the
 field.

 After thinking this was a real breakthrough, I heard back from people saying
 that their database was less than 1 GB anyway. This could be not a real
 problem, or it could be just one of many problems.

 Data from the (singleton) SQliteDatabase can be read from multiple threads,
 but from my best understanding of SQLiteDatabases, reads and writes will
 simply block until they get access.

 Nathan

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-19 Thread Nobu Games
I just did some digging around and your error code translates into the 
following define constant: 
*SQLITE_IOERR_FSTAT*http://sqlite.org/c3ref/c_abort_rollback.html

So basically it's an fstat error which according to this 
threadhttp://sqlite.1065341.n5.nabble.com/reasons-for-SQLITE-IOERR-FSTAT-td66646.htmlcan
 happen when you try to access the database after it (or one of the 
journal files) have been deleted. 
Othershttp://t3391.codeinpro.us/q/51502007e8432c04261a3ca8also mention that 
this error has to do with changing data while another 
thread is trying to read it simultaneously. I guess the write-ahead 
journaling of SQLite does not mix well with thread concurrency. In my 
experience you should try to synchronize all concurrent read and write 
access to your SQLite database yourself and not rely on the built-in 
locking facilities (they never worked for me correctly).


On Wednesday, September 18, 2013 7:22:34 PM UTC-5, Nathan wrote:

 I am investigating the cause of some handled exceptions: 
 SQLiteDiskIOException disk I/O error (code 1802) 

 I ran across this thread which implies that, due to a bug in Android's 
 version of SQLite, I should be limiting SQlite Databases to 2GB. 


 https://groups.google.com/forum/#!searchin/android-developers/Sqlitediskioexception/android-developers/eYNJrIgabxU/e7sKm9QCfN4J

 I am already restricting users to 4GB because I believe most SD Cards 
 limit a single file to that size. 
 Of course some power users are going to bug me about allowing them more 
 for extFat. I have resisted because: 
 A. I don't know how to automatically detect that. 
 B. Users aren't sophisticated enough to know how their 

 But now, it looks like I will have to limit them to 2 GB. Is that true?

 And, in fact, it does appear that some users have seen data disappear and 
 reappear, and it could be tied to handled SQLiteDiskIOExceptions, and that 
 could be tied to this bug. 

 And does it differ by Android version?

 Nathan


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-19 Thread Nathan


On Thursday, September 19, 2013 11:48:46 AM UTC-7, mbanzon wrote:

 Sorry for turning the discussion in another direction but I have to 
 ask out of curiosity: What kind of data do you have in the database to 
 make it 2GB or above? 


Apology not accepted, but your deed will be forgiven if the discussion gets 
around to solving the problem. A bunch of tiled images such as for 
reconstructing a map of a national forest, etc.   

Please just skip telling me that I (or my customers) shouldn't be using 
that big of a database, that I should instead store it as loose files (that 
has its own ugly problems), or that all databases should be kept in app 
internal space (like a 2 gig file would fit there anyway). 

Nathan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-19 Thread Nathan


On Thursday, September 19, 2013 12:50:27 PM UTC-7, Nobu Games wrote:

 I just did some digging around and your error code translates into the 
 following define constant: 
 *SQLITE_IOERR_FSTAT*http://sqlite.org/c3ref/c_abort_rollback.html

 So basically it's an fstat error which according to this 
 threadhttp://sqlite.1065341.n5.nabble.com/reasons-for-SQLITE-IOERR-FSTAT-td66646.htmlcan
  happen when you try to access the database after it (or one of the 
 journal files) have been deleted. 
 Othershttp://t3391.codeinpro.us/q/51502007e8432c04261a3ca8also mention that 
 this error has to do with changing data while another 
 thread is trying to read it simultaneously. I guess the write-ahead 
 journaling of SQLite does not mix well with thread concurrency. In my 
 experience you should try to synchronize all concurrent read and write 
 access to your SQLite database yourself and not rely on the built-in 
 locking facilities (they never worked for me correctly).


Your eyes are sharp, I couldn't decode that one. 

I do think I will have to tighten up the concurrency, without knowing 
beforehand if it will help. 

At the time this occurs, nothing *should* be writing, but I already know of 
one bug that may make that untrue. Multiple threads could be reading. I 
think they just block but who knows.  
I am not using write ahead, which the docs tell me should be off by 
default. 

Nathan

 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-19 Thread Nathan


On Thursday, September 19, 2013 12:38:19 PM UTC-7, Kostya Vasilyev wrote:

 I also get -- rare and very unpleasant -- support emails with this 
 error, also database disk image is malformed. 

 Sometimes it's one of the databases used internally by WebView (and 
 yet, a crash is a crash). 

 Then there are rare cases when the app's database just disappears. 

 The framework has code to detect corrupted databases and delete them. 
 Most likely it's this code that kicks in. I doubt it was added into 
 the framework just for my app. 

 SQLite is supposedly the best tested piece of software ever. However, 
 there was one case when its developer admitted on a mailing list that 
 a particular version, which happened to be included in a particular 
 Android release, could corrupt its in-memory buffer, albeit not disk 
 image (if my memory serves me). So nothing is perfect, all software 
 has bugs, yada yada yada... 

 I don't even have a theory on what the root cause is: other SQLite 
 bugs, Android's use of ext4, memory chips going bad... I just look at 
 it as a given. 


My experience matches yours in that some databases just disappear. I would 
like to look at the frameworks code for doing that if you know where I 
should look. 

The unusual part, as I've seen, is that people are seeing data disappear 
and sometimes reappear, within a database where other data may be intact. 
It can drive one insane, and I've been able to eliminate user error ( I 
think) in many cases. 

To sum up, I've got at least three issues. 

1. Databases disappear and I can't stop them. 
2. Some weird file thing could be preventing me from getting to the file 
(do devices unmount and mount their storage whenever they feel like it?) 
3. I could be seeing conflicts in threads. Shouldn't happen if they are all 
reader , but . .. 
4 (Maybe). Databases above 2 Gigabytes cause undefined behavior in SQLite. 

In the thread I cited, Diane Hackborn said (two years ago):
Yeah it's actually very likely the problem.  Android for various reasons 
defines off_t to be 32 bit, so if you want to support  2GB files you need 
to use off64_t.  That unfortunately makes it easy to have code paths that 
break like this.

https://groups.google.com/forum/#!searchin/android-developers/Sqlitediskioexception/android-developers/eYNJrIgabxU/e7sKm9QCfN4J

I don't know where in the framework to look for off_t and where it is used 
for SQLite files. Any pointers would help. 

I would really like to know for what versions of Android this is a problem, 
if at all. 

If this 2 gigabyte thing *isn't a problem*, then I want to hold off on 
telling my users that it is. Some already find 4 Gigabytes restrictive. 
Somebody just told me they are using 8 gigabytes safely on seven different 
devices and sharing them among a group of 200 people. Which means he got 
around my checks in the code to prevent from going over 4 gigabytes. Maybe 
he is just getting lucky, because if the 2 gig problem is real, it seems 
like it would fail rather often. 

Nathan

 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-19 Thread Nathan
I'm hoping I can get Jeff Brown to comment on this commit:

https://github.com/android/platform_external_sqlite/commit/af4ab8b27c84e71dcdd6edf9e05967a3f9c3e5f2

It looks like it might fix, er . ., something for Bionic, for everything 
but Bionic, or fix something that was only a problem on Bionic. 

Jeff Brown, are you on this forum?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-19 Thread Kostya Vasilyev

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.1_r2/android/database/sqlite/SQLiteDatabase.java

Look for a method called onCorruption.




Nathan nathan.d.mel...@gmail.com 20 сентября 2013 г. 2:20:05 написал:



On Thursday, September 19, 2013 12:38:19 PM UTC-7, Kostya Vasilyev wrote:

 I also get -- rare and very unpleasant -- support emails with this error, 
also database disk image is malformed. 
 Sometimes it's one of the databases used internally by WebView (and yet, 
a crash is a crash). 

 Then there are rare cases when the app's database just disappears. 
 The framework has code to detect corrupted databases and delete them. 
Most likely it's this code that kicks in. I doubt it was added into the 
framework just for my app. 
 SQLite is supposedly the best tested piece of software ever. However, 
there was one case when its developer admitted on a mailing list that a 
particular version, which happened to be included in a particular Android 
release, could corrupt its in-memory buffer, albeit not disk image (if my 
memory serves me). So nothing is perfect, all software has bugs, yada yada 
yada... 
 I don't even have a theory on what the root cause is: other SQLite bugs, 
Android's use of ext4, memory chips going bad... I just look at it as a 
given. 


My experience matches yours in that some databases just disappear. I would 
like to look at the frameworks code for doing that if you know where I 
should look.
The unusual part, as I've seen, is that people are seeing data disappear 
and sometimes reappear, within a database where other data may be intact. 
It can drive one insane, and I've been able to eliminate user error ( I 
think) in many cases.

To sum up, I've got at least three issues.
1. Databases disappear and I can't stop them. 2. Some weird file thing 
could be preventing me from getting to the file (do devices unmount and 
mount their storage whenever they feel like it?) 3. I could be seeing 
conflicts in threads. Shouldn't happen if they are all reader , but . .. 4 
(Maybe). Databases above 2 Gigabytes cause undefined behavior in SQLite.

In the thread I cited, Diane Hackborn said (two years ago):
Yeah it's actually very likely the problem.  Android for various reasons 
defines off_t to be 32 bit, so if you want to support  2GB files you need 
to use off64_t.  That unfortunately makes it easy to have code paths that 
break like this.


https://groups.google.com/forum/#!searchin/android-developers/Sqlitediskioexception/android-developers/eYNJrIgabxU/e7sKm9QCfN4J

I don't know where in the framework to look for off_t and where it is used 
for SQLite files. Any pointers would help.
I would really like to know for what versions of Android this is a problem, 
if at all.
If this 2 gigabyte thing *isn't a problem*, then I want to hold off on 
telling my users that it is. Some already find 4 Gigabytes restrictive. 
Somebody just told me they are using 8 gigabytes safely on seven different 
devices and sharing them among a group of 200 people. Which means he got 
around my checks in the code to prevent from going over 4 gigabytes. Maybe 
he is just getting lucky, because if the 2 gig problem is real, it seems 
like it would fail rather often.

Nathan



--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- You received this message because you are subscribed to the Google 
Groups Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an 
email to android-developers+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-19 Thread Nathan


On Thursday, September 19, 2013 4:31:23 PM UTC-7, Kostya Vasilyev wrote:

  
 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.1_r2/android/database/sqlite/SQLiteDatabase.java

 Look for a method called onCorruption.


It looks like we could, in 4.0+, define a custom DatabaseErrorHandler that 
could do something different. 

I have not done so. 

Nathan
 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [android-developers] Re: Should SQLiteDatabases be limited to 2Gig?

2013-09-19 Thread Kostya Vasilyev
Yes, but if the database can't be opened at sqlite level, it would only 
help the app know that, not recover the data... And there are other ways to 
detect that. Back to square one: why do they get corrupted in the first place?



Nathan nathan.d.mel...@gmail.com 20 сентября 2013 г. 4:05:53 написал:



On Thursday, September 19, 2013 4:31:23 PM UTC-7, Kostya Vasilyev wrote:

 
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.1_r2/android/database/sqlite/SQLiteDatabase.java


 Look for a method called onCorruption.


It looks like we could, in 4.0+, define a custom DatabaseErrorHandler that 
could do something different.

I have not done so.
Nathan


--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- You received this message because you are subscribed to the Google 
Groups Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an 
email to android-developers+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


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

To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.