Hi,

I try to use an in memory database which works as long as I use as db path 
":memory:".


To speed up pre-processing and importing of data I would like to grand several 
threads access to the same in memory database and have found the documentation 
on https://www.sqlite.org/inmemorydb.html saying that this is possible by 
opening the DB with sqlite3_open("file::memory:?cache=shared", &db) by each 
thread.


Unfortunately instead of being in memory, this creates a file on my Ubuntu box 
named file::memory:?cache=shared.


-rw-r--r-- 1 wgo wgo 3072 Nov 5 04:00 file::memory:?cache=shared


I used the sqlite3 sources and also pre-build libraries to check if this might 
be a problem of an outdated version, but in both cases I get the same results.


To demonstrate what I'm doing I created a git repository containing a test 
program.


https://gitlab.com/laiki/sqlshared


You might need to adapt the CMakeLists.txt file to reflect your path to the 
sqlite lib.


Am I doing something wrong, or is this a known behavior?


Kind regards


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

Reply via email to