On Sun, Sep 20, 2015 at 5:53 PM, Nicolas J?ger <jagernicolas at legtux.org>
wrote:

> hi,
>
>
> Scott Robison wrote:
>
> >
> > 3. Some time passes and some external process may alter the schema.
> >
>
> is it really possible ? if the answer is yes (I thought when a process
> open a communication with
> the DB, other processes can't alter the DB), for me that would mean that
> the design(s) of the
> program(s) wich communicates with the DB is bad.
>
> If I would like several process to communicate with a DB, I write first a
> `demon` wich receive/send
> the querries one by one to the DB and send one-by-one the results to the
> processes. So with that
> design I consider avoiding any overlapping.
>

It is possible and is by design. Whether or not you have to worry about
this is a different story: if you don't have any processes changing the
schema, it is unlikely the schema will change under you.

The reason the sqlite3_prepare_v2 interfaces were created was because of
the need to recompile queries if the schema changed. The older interfaces
returned an error when the schema changed, and the v2 interfaces automated
the process. The only time this should be possible is after a prepared
statement has been stepped until done, then restarted. There is a window of
opportunity where another process can execute other queries, including
schema changing queries.


>
> regards,
> nicolas
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Scott Robison

Reply via email to