thanks for the hint to https://sqlite.org/uri.html
I changed the open statement to make use of URI
sqlite3_open_v2("file::memory:?cache=shared", _shared, SQLITE_OPEN_URI |
SQLITE_OPEN_READWRITE, NULL )
and it works as expected :)
> Wasilios Goutas hat am 5. November 2018 um 21:25
> geschrieben:
>
>
> Hi Keith,
> https://sqlite.org/uri.html
>
> 1. I fixed the git repository. Now it does contain the source not the build
> results :)
>
>
> 2. to answer your questions, no I didn't compile the sqlite sources with
> SQLITE_USE_URI and I opened the DB using "file:memory:?cache=shared"
>
>
> Regards
>
>
> Wasili
>
>
> > Keith Medcalf < kmedc...@dessus.com> hat am 5. November 2018 um 16:59
> > geschrieben:
> >
> >
> > Did you compile sqlite3.c with SQLITE_USE_URI defined? Or use one of the
> > methods that tells the library that you are using a URI filename?
> >
> > https://sqlite.org/uri.html
> >
> > ---
> > The fact that there's a Highway to Hell but only a Stairway to Heaven says
> > a lot about anticipated traffic volume.
> >
> >
> > >-Original Message-
> > >From: sqlite-users [mailto:sqlite-users-
> > [boun...@mailinglists.sqlite.org"
> > data-mce-href="mailto:>boun...@mailinglists.sqlite.org">>boun...@mailinglists.sqlite.org](https://email.ionos.de/appsuite/mailto:)]
> > On Behalf Of Wasilios Goutas
> > >Sent: Monday, 5 November, 2018 08:28
> > >To: sqlite-users@mailinglists.sqlite.org
> > >Subject: [sqlite] sharing in memory db through threads
> > >
> > >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", ) 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"
> > data-mce-href="mailto:>sqlite-users@mailinglists.sqlite.org">>sqlite-users@mailinglists.sqlite.org](https://email.ionos.de/appsuite/mailto:)
> >
> > > 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