D?a 24.04.2016 o 8:39 Clemens Ladisch nap?sal(a):
> Richard Hipp wrote:
>> On 4/22/16, Christian Werner <Christian.Werner at t-online.de> 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" 
>>> therein.
>> Is there a well-defined way to find the name of the application's own 
>> directory?
> In Java, there is Context.getCacheDir().
>
> It is available from C only if you have a reference to some Android
> object (Activity or Context), and do the dance of accessing the Java
> stuff:
> http://stackoverflow.com/questions/7595324/creating-temporary-files-in-android-with-ndk
>
> It would be possible for the Java code to set sqlite3_temp_directory,
> but the Android framework does not do it, and it would probably not be
> a good idea to require every app to do it.
>
>
> Android (and Chromium on Android) just use SQLITE_TEMP_STORE=3 for this
> reason:
> https://android.googlesource.com/platform/external/sqlite/+/master/dist/Android.mk
> https://bugs.chromium.org/p/chromium/issues/detail?id=138128
> https://codereview.chromium.org/10809015
>
> Apparently, Martin's SQLite library was compiled differently.
That's right we have our own build of sqlite included in c++ common 
library for all platforms, that's why we are facing this issue. We 
solved it by changing temp dir into application directory containg other 
files as well, but now i'am considering using memory 
(SQLITE_TEMP_STORE=3).  But there is a big but as we are using long and 
heavy transactions with long statments (INSERT OR REPLACE ... SELECT ... 
FROM ... )and we don't want that device is running out of memory so is 
the lenght of transaction somehow influencing size of temp file ?

kr
Martin
>
>
> Regards,
> Clemens
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
-------------------------------------------------------------------
Mgr Martin Trnovec
Head of development

Pipelinersales Inc.
R?ntgenova 26, 851 01 Bratislava, Slovakia

@: martin.trnovec at pipelinersales.com | www.pipelinersales.com
-------------------------------------------------------------------

Reply via email to