Re: [sqlite] Usage of temporary files of SQLite3 on Android / SQLite commands fail

2018-06-10 Thread Kevin Benson
On Sun, Jun 10, 2018 at 12:45 PM skywind mailing lists <
mailingli...@skywind.eu> wrote:

> Hi,
>
> but to which directory should I set it? There is no general tmp directory
> accessible.
>
> Regards,
> Hartwig
>
> > Am 2018-06-10 um 02:30 schrieb Bob Friesenhahn <
> bfrie...@simple.dallas.tx.us>:
> >
> > On Sat, 9 Jun 2018, skywind mailing lists wrote:
> >
> >> Hi,
> >>
> >> currently I am not creating large subqueries or views and therefore
> storing the temporary data in memory is a solution but I would like to have
> a future proof solution. And I do not like to think about it anymore in the
> future.
> >
> > Have you tried setting the POSIX standard TMPDIR environment variable?
> This might have useful influence under Android.
> >
> > Bob
>
>
Android is foreign to me, but the thread below mentions: /data/local/tmp

https://stackoverflow.com/a/41105574/1828624
--
   --
  --
 --Ö¿Ö--
K e V i N
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Usage of temporary files of SQLite3 on Android / SQLite commands fail

2018-06-10 Thread Thomas Kurz
I suggest using a tmp directory within in your private app directory.

- Original Message - 
From: skywind mailing lists 
To: SQLite mailing list 
Sent: Sunday, June 10, 2018, 18:44:45
Subject: [sqlite] Usage of temporary files of SQLite3 on Android / SQLite 
commands fail

Hi,

but to which directory should I set it? There is no general tmp directory 
accessible.

Regards,
Hartwig

> Am 2018-06-10 um 02:30 schrieb Bob Friesenhahn :

> On Sat, 9 Jun 2018, skywind mailing lists wrote:

>> Hi,

>> currently I am not creating large subqueries or views and therefore storing 
>> the temporary data in memory is a solution but I would like to have a future 
>> proof solution. And I do not like to think about it anymore in the future.

> Have you tried setting the POSIX standard TMPDIR environment variable? This 
> might have useful influence under Android.

> Bob
> -- 
> Bob Friesenhahn
> bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
> GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Usage of temporary files of SQLite3 on Android / SQLite commands fail

2018-06-10 Thread skywind mailing lists
Hi,

but to which directory should I set it? There is no general tmp directory 
accessible.

Regards,
Hartwig

> Am 2018-06-10 um 02:30 schrieb Bob Friesenhahn :
> 
> On Sat, 9 Jun 2018, skywind mailing lists wrote:
> 
>> Hi,
>> 
>> currently I am not creating large subqueries or views and therefore storing 
>> the temporary data in memory is a solution but I would like to have a future 
>> proof solution. And I do not like to think about it anymore in the future.
> 
> Have you tried setting the POSIX standard TMPDIR environment variable? This 
> might have useful influence under Android.
> 
> Bob
> -- 
> Bob Friesenhahn
> bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
> GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> 

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Usage of temporary files of SQLite3 on Android / SQLite commands fail

2018-06-09 Thread Simon Slavin
On 10 Jun 2018, at 1:30am, Bob Friesenhahn  wrote:

> On Sat, 9 Jun 2018, skywind mailing lists wrote:
> 
>> storing the temporary data in memory is a solution but I would like to have 
>> a future proof solution. And I do not like to think about it anymore in the 
>> future.
> 
> Have you tried setting the POSIX standard TMPDIR environment variable? This 
> might have useful influence under Android.

I am surprised that this problem has not been solved.  There are at least two 
well-known SQLite libraries for Android.  Do they include a setting indicating 
a directory which an Android App is able to use ?

Sorry I can't solve the problem myself.  I have nothing that runs Android.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Usage of temporary files of SQLite3 on Android / SQLite commands fail

2018-06-09 Thread Bob Friesenhahn

On Sat, 9 Jun 2018, skywind mailing lists wrote:


Hi,

currently I am not creating large subqueries or views and therefore storing the 
temporary data in memory is a solution but I would like to have a future proof 
solution. And I do not like to think about it anymore in the future.


Have you tried setting the POSIX standard TMPDIR environment variable? 
This might have useful influence under Android.


Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Usage of temporary files of SQLite3 on Android / SQLite commands fail

2018-06-09 Thread skywind mailing lists
Hi,

currently I am not creating large subqueries or views and therefore storing the 
temporary data in memory is a solution but I would like to have a future proof 
solution. And I do not like to think about it anymore in the future.

Or can we stop deprecating sqlite3_temp_directory? Why was it at all 
deprecated? It seems to be (according to the comments) that there has been some 
trouble with assigning and releasing the variable but this can be overcome by 
not exposing it publicly and using an appropriate function instead.

Regards,
Hartwig

> Am 2018-06-09 um 19:16 schrieb Dan Kennedy :
> 
> On 06/10/2018 12:00 AM, skywind mailing lists wrote:
>> Hi,
>> 
>> what is your experience with temporary files requested by SQLite3 on 
>> Android? I am using SQLite3 natively on Android - I compiled SQLite3 by 
>> myself - and get an error when SQLite3 tries to create temporary files 
>> because:
>> 
>> - the directories
>>  /var/tmp
>>  /usr/tmp
>>  /tmp
>>  .
>>   are not accessible by a standard user (and therefore the app);
>> - getenv is not guaranteed to be supported (or?);
>> - sqlite3_temp_directory should not be used because it is deprecated.
>> 
>> What are you doing?
> 
> People usually end up building with:
> 
>   -DSQLITE_TEMP_STORE=3
> 
> This causes SQLite to use main memory for all temp files.
> 
> Dan.
> 
> 
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> 

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Usage of temporary files of SQLite3 on Android / SQLite commands fail

2018-06-09 Thread Dan Kennedy

On 06/10/2018 12:00 AM, skywind mailing lists wrote:

Hi,

what is your experience with temporary files requested by SQLite3 on Android? I 
am using SQLite3 natively on Android - I compiled SQLite3 by myself - and get 
an error when SQLite3 tries to create temporary files because:

- the directories
/var/tmp
/usr/tmp
/tmp
.
   are not accessible by a standard user (and therefore the app);
- getenv is not guaranteed to be supported (or?);
- sqlite3_temp_directory should not be used because it is deprecated.

What are you doing?


People usually end up building with:

   -DSQLITE_TEMP_STORE=3

This causes SQLite to use main memory for all temp files.

Dan.


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Usage of temporary files of SQLite3 on Android / SQLite commands fail

2018-06-09 Thread J. King
On June 9, 2018 1:08:07 PM EDT, J Decker  wrote:
>On Sat, Jun 9, 2018 at 10:00 AM skywind mailing lists <
>mailingli...@skywind.eu> wrote:
>
>> Hi,
>>
>> what is your experience with temporary files requested by SQLite3 on
>> Android? I am using SQLite3 natively on Android - I compiled SQLite3
>by
>> myself - and get an error when SQLite3 tries to create temporary
>files
>> because:
>>
>> - the directories
>> /var/tmp
>> /usr/tmp
>> /tmp
>> .
>>
>Do you really NEED it to be a file or could you just open it as
>:memory: ?
>
>
>>   are not accessible by a standard user (and therefore the app);
>> - getenv is not guaranteed to be supported (or?);
>> - sqlite3_temp_directory should not be used because it is deprecated.
>>
>> What are you doing?
>>
>> Regards,
>> Hartwig
>>
>> ___
>> sqlite-users mailing list
>> sqlite-users@mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>>
>___
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

SQLite also creates temp files in various circumstances:



This is definitely a valid question, though not one for which I have an answer. 
-- 
J. King
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Usage of temporary files of SQLite3 on Android / SQLite commands fail

2018-06-09 Thread J Decker
On Sat, Jun 9, 2018 at 10:00 AM skywind mailing lists <
mailingli...@skywind.eu> wrote:

> Hi,
>
> what is your experience with temporary files requested by SQLite3 on
> Android? I am using SQLite3 natively on Android - I compiled SQLite3 by
> myself - and get an error when SQLite3 tries to create temporary files
> because:
>
> - the directories
> /var/tmp
> /usr/tmp
> /tmp
> .
>
Do you really NEED it to be a file or could you just open it as :memory: ?


>   are not accessible by a standard user (and therefore the app);
> - getenv is not guaranteed to be supported (or?);
> - sqlite3_temp_directory should not be used because it is deprecated.
>
> What are you doing?
>
> Regards,
> Hartwig
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users