On 6/4/2013 09:22, Philip Goetz wrote:

Is it caused by using a 32-bit sqlite3?

> How does a 32-bit app access a 5G file?

According to https://www.sqlite.org/limits.html, SQLite doesn't really have a 32-bit limit. It's not trying to load all 5 GiB into RAM at once. It manipulates the DB file in chunks, so the limit is in the terabytes, regardless of platform.

Is there a 64-bit Windows or Linux SQLite available?

There is a 64-bit Cygwin in development, which you can download here:

        ftp://cygwin.com/pub/cygwin/64bit/

It is far from complete, but my SQLite packages are already in it.

I'd suggest that you try one or both of these things first, though:

1. Say "pragma temp_store=2" before your other SQL commands. This will force SQLite to use in-memory temporary tables, avoiding disk. It may be that this will bypass the bug that causes the error.

If this succeeds, I'd like to hear back. There's currently been some speculation on the Cygwin mailing list as to whether in-memory temp files are suitable for such large DBs on 32-bit systems. It would be nice to have a concrete test that shows that it does work.

2. Try the 32-bit Cygwin SQLite testing packages, here:

        http://etr-usa.com/cygwin/sqlite3/

You may need to download up to 4 different files, three of which are buried a level deep in that tree. Basically, you want to unpack any of the files called *3.7.17-2* into the root of your Cygwin tree. Only download files corresponding to the ones you already have downloaded. You probably haven't installed the repo version of the -debuginfo package already, for example, so don't bother installing the test version, either.

These test packages have a purpose entirely different from what it sounds like your issue is, but they happen to be built with the "TEMP_STORE=2" mode by default. (Don't count on this build choice to make it to the official release. I haven't decided yet.)

For what it's worth, the main purpose of these packages is that they are trying to make Cygwin SQLite switchable between POSIX or BSD advisory locks and Windows mandatory locks. The current method interoperates well with native Windows SQLite, but not with programs ported to Cygwin that assume POSIX advisory locks. To test this new feature, you need to install Cygwin 1.7.19. You should also skim this Cygwin mailing list thread:

        http://cygwin.com/ml/cygwin/2013-06/msg00034.html

If nothing else, the second half of this post:

        http://cygwin.com/ml/cygwin/2013-06/msg00078.html

Beware, these packages do not pass the SQLite test suite. (That mainly because no one has yet gotten the test suite to run under Cygwin!) Back up your DB first!
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to