Re: [sqlite] a question about data synchronization

2016-06-02 Thread Gelin Yan
On Thu, Jun 2, 2016 at 2:42 PM, Clemens Ladisch wrote: > Gelin Yan wrote: > >> In Process A > >> > >> insert a value into a table XX and commit. > >> > >> In Process B > >> > >> select from the same table XX > >> > >>and I didn't find the inserted record. > > > >I used python &

Re: [sqlite] a question about data synchronization

2016-06-01 Thread Clemens Ladisch
Gelin Yan wrote: >> In Process A >> >> insert a value into a table XX and commit. >> >> In Process B >> >> select from the same table XX >> >>and I didn't find the inserted record. > >I used python & its sqlite3 module for this trial, the autocommit mode > is default on. After I e

Re: [sqlite] a question about data synchronization

2016-06-01 Thread Gelin Yan
On Thu, Jun 2, 2016 at 12:08 AM, Hick Gunter wrote: > Process B can see only data that is committed before it's read transaction > is started. > > I suspect you are creating a transaction in process B right after > connecting to the database that remains open for the lifetime of the > connection.

Re: [sqlite] a question about data synchronization

2016-06-01 Thread Gelin Yan
On Thu, Jun 2, 2016 at 1:51 AM, Simon Slavin wrote: > > On 1 Jun 2016, at 4:15pm, Gelin Yan wrote: > > > In Process A > > > > insert a value into a table XX and commit. > > > > In Process B > > > > select from the same table XX > > > > and I didn't find the inserted record. > > Did you

Re: [sqlite] a question about data synchronization

2016-06-01 Thread Simon Slavin
On 1 Jun 2016, at 4:15pm, Gelin Yan wrote: > In Process A > > insert a value into a table XX and commit. > > In Process B > > select from the same table XX > > and I didn't find the inserted record. Did you do process A by explicitly declaring BEGIN or did you let SQLite make its

Re: [sqlite] a question about data synchronization

2016-06-01 Thread Hick Gunter
Process B can see only data that is committed before it's read transaction is started. I suspect you are creating a transaction in process B right after connecting to the database that remains open for the lifetime of the connection. This will force Process B to see the state as it was before i