wvelandia / spatialite-android

Automatically exported from code.google.com/p/spatialite-android
0 stars 0 forks source link

Large result (>8000 rows) - Error #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When making a select with a large number of results the SQLite DB engine seems 
to try to create a temp file where the results are stored. Maybe this does not 
work on the android system.

The creation of this temp file seems to create the following error:

jsqlite.Exception: SQL logic error or missing database

The error occurs when executing the stmt.step() command.

Workarround:

Call db.exec("PRAGMA temp_store = 2", null);

This causes the SQLite db not to create temp files and to do everything in 
memory. The error does not occur any more.

Attached you find a sqlite database with a table with about 9000 entries to 
reproduce the problem.

Original issue reported on code.google.com by michael....@gmail.com on 28 Jul 2012 at 3:51

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by efroh...@gmail.com on 28 Jul 2012 at 9:01

GoogleCodeExporter commented 9 years ago
http://www.sqlite.org/tempfiles.html

Original comment by efroh...@gmail.com on 29 Jul 2012 at 1:36

GoogleCodeExporter commented 9 years ago
I was unable to reproduce this on my Galaxy Nexus.  Can you provide more 
details on the device used?

Original comment by efroh...@gmail.com on 28 Aug 2012 at 2:20

GoogleCodeExporter commented 9 years ago
Hi,

I had the error on the Emulator.

Google API Level 10
SDCard Size 512 MB
Skin Buildin HVGA

Memory Configuration:

Max VM application Heap size 200 MB
Device RAM Size 512 MB
(Ok, Ok it is not really much - but maybe because of this the SQLite DB 
starts building a tempory file and crashes.)

Original comment by michael....@gmail.com on 30 Aug 2012 at 7:18