[sqlite] SQLITE_CANTOPEN on Android

2016-04-25 Thread Clemens Ladisch
Martin Trnovec wrote: > D?a 24.04.2016 o 8:39 Clemens Ladisch nap?sal(a): >> Android (and Chromium on Android) just use SQLITE_TEMP_STORE=3 for this >> reason >> >> Apparently, Martin's SQLite library was compiled differently. > > That's right we have our own build of sqlite included in c++ common

[sqlite] SQLITE_CANTOPEN on Android

2016-04-24 Thread Martin Trnovec
D?a 24.04.2016 o 8:39 Clemens Ladisch nap?sal(a): > Richard Hipp wrote: >> On 4/22/16, Christian Werner wrote: >>> On 04/22/2016 03:46 PM, Richard Hipp wrote: Why isn't /var/tmp or /tmp usable on Android? >>> There ain't no "/var/tmp" nor "/tmp" on droids. Best of all worst >>> alternatives

[sqlite] SQLITE_CANTOPEN on Android

2016-04-24 Thread Clemens Ladisch
Richard Hipp wrote: > On 4/22/16, Christian Werner wrote: >> On 04/22/2016 03:46 PM, Richard Hipp wrote: >>> Why isn't /var/tmp or /tmp usable on Android? >> >> There ain't no "/var/tmp" nor "/tmp" on droids. Best of all worst >> alternatives >> is to use the application's own directory or better

[sqlite] SQLITE_CANTOPEN on Android

2016-04-23 Thread Christian Werner
On 04/23/2016 02:10 PM, Richard Hipp wrote: > Is there a well-defined way to find the name of the application's own > directory? The SDL2 library uses this approach http://www.androwish.org/index.html/artifact/f90b192eadfe588218283717932d35528d84c715?txt=1&ln=1637-1682 i.e. calls android.conte

[sqlite] SQLITE_CANTOPEN on Android

2016-04-23 Thread Richard Hipp
On 4/22/16, Christian Werner wrote: > On 04/22/2016 03:46 PM, Richard Hipp wrote: > >> Why isn't /var/tmp or /tmp usable on Android? > > There ain't no "/var/tmp" nor "/tmp" on droids. Best of all worst > alternatives > is to use the application's own directory or better the subdir "cache" > there

[sqlite] SQLITE_CANTOPEN on Android

2016-04-22 Thread Christian Werner
On 04/22/2016 03:46 PM, Richard Hipp wrote: > Why isn't /var/tmp or /tmp usable on Android? There ain't no "/var/tmp" nor "/tmp" on droids. Best of all worst alternatives is to use the application's own directory or better the subdir "cache" therein. Best, Christian

[sqlite] SQLITE_CANTOPEN on Android

2016-04-22 Thread Martin Trnovec
Yes looks like that "." folder is correctly detected to not have access and sqlite returns "error: SQLITE_IOERR: disk I/O error" which confirms the fix but still is there a preffered way how to set directory for those transition files , should we use env "SQLITE_TMPDIR" or is there a better w

[sqlite] SQLITE_CANTOPEN on Android

2016-04-22 Thread Martin Trnovec
It seems that the problem is/was that the application can't create transient files in the "." directory returned by os_unix.c::unixTempFileDir due to Android os file restrictions. It also looks like that this function is not able to correctly check if the folder is writable for transient files

[sqlite] SQLITE_CANTOPEN on Android

2016-04-22 Thread Simon Slavin
On 22 Apr 2016, at 2:39pm, Martin Trnovec wrote: > but still is there a preffered way how to set directory for those transition > files , should we use env "SQLITE_TMPDIR" or is there a better way? Also, when is that variable read ? Is it read in sqlite3_initialize(), so you have to set it b

[sqlite] SQLITE_CANTOPEN on Android

2016-04-22 Thread Martin Trnovec
Hello, we are using sqlite 3.12.1 on Android device and we are tring to copy content of the one table into another table using INSERT OR REPLACE INTO SELECT * FROM This commad will fail on Android with error code SQLITE_CANTOPEN when - has any triggers configured (also empty one like "se

[sqlite] SQLITE_CANTOPEN on Android

2016-04-22 Thread Richard Hipp
On 4/22/16, Martin Trnovec wrote: > > but still is there a preffered way how to set directory for those > transition files , should we use env "SQLITE_TMPDIR" or is there a > better way? Setting SQLITE_TMPDIR is the preferred way. Why isn't /var/tmp or /tmp usable on Android? -- D. Richard Hip

[sqlite] SQLITE_CANTOPEN on Android

2016-04-22 Thread Richard Hipp
On 4/22/16, Martin Trnovec wrote: > It seems that the problem is/was that the application can't create > transient files in the "." directory returned by > os_unix.c::unixTempFileDir due to Android os file restrictions. Does the fix at https://www.sqlite.org/src/info/67985761aa93fb61 help? > It

[sqlite] SQLITE_CANTOPEN on Android

2016-04-22 Thread Richard Hipp
On 4/22/16, Martin Trnovec wrote: > Hello, > > we are using sqlite 3.12.1 on Android device and we are tring to copy > content of the one table into another table using > > INSERT OR REPLACE INTO SELECT * FROM > > This commad will fail on Android with error code SQLITE_CANTOPEN when >- has