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.
On Fri, Jan 14, 2011 at 9:48 AM, DanH <danhi...@ieee.org> wrote: > There are all sorts of possibilities. First off, it's not unlikely > that a 2+GB file is simply larger than Android and the Android > implementation of Sqlite can handle. 2147483647 is the largest signed > value that can be expressed in a 4-byte integer, and arithmetic with > numbers on that scale is apt to experience "overflow" issues that > confuse compare operations, etc. > > Additionally, if the database is not declared up front to be read- > only, Sqlite may make copies of pages as it operates, and will almost > definitely create a "journal" of what it's doing. This could occupy > enough additional space to "blow" the size of the SD card if it's not > at least (I would guess) 4GB. And in doing the sort of query > described Sqlite will need considerable working storage, which could > blow the SD card size limit. > > Plus there could simply be a bug in the Android "disk" access logic > when confronted with the intense "disk" activity this query would > generate. > > On Jan 14, 8:24 am, Menion <menion.as...@gmail.com> wrote: > > Hi, > > this was already discussed here, but I have another problem with > > database search. > > > > I'm testing on one big database, more then 2GB (stored on SD card of > > course) with around 1 million of rows in table 'tiles'. Database > > contain X, Y, Z coordinates as INT (map index) and byte[] image data. > > > > database is created with this SQLite string which cannot be changed! > > CREATE TABLE tiles (x INTEGER,y INTEGER,z INTEGER,s INTEGER,image > > BYTE, PRIMARY KEY (x, y, z, s)); > > > > And all I want is to get all available Z values in database like by > > this > > SELECT DISTINCT z FROM tiles > > > > But after around 5 minutes of loading (time isn't problem here) logcat > > return > > android.database.sqlite.SQLiteDiskIOException: disk I/O error > > > > have you please any tip how to solve this?? > > -- > 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<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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