On Thu, Jun 2, 2016 at 12:08 AM, Hick Gunter <h...@scigames.at> 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. > > This will force Process B to see the state as it was before it's > transaction started, i.e. before Process A committed it's changes. > > -----Ursprüngliche Nachricht----- > Von: sqlite-users-boun...@mailinglists.sqlite.org [mailto: > sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Gelin Yan > Gesendet: Mittwoch, 01. Juni 2016 17:16 > An: sqlite-users@mailinglists.sqlite.org > Betreff: [sqlite] a question about data synchronization > > Hi All > > I have a question about data synchronization. The question is: > > I have two process A & B. Both of them connect to the same database > > 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. > > If I close the connection in Process B and connect it again, I can > select this > > inserted record. > > Did I do something wrong? I expect the inserted data is available > without reconnection. > > BTW: I use the latest Sqlite version and WAL mode. > > Regards > > gelin yan > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > > ___________________________________________ > Gunter Hick > Software Engineer > Scientific Games International GmbH > FN 157284 a, HG Wien > Klitschgasse 2-4, A-1130 Vienna, Austria > Tel: +43 1 80100 0 > E-Mail: h...@scigames.at > > This communication (including any attachments) is intended for the use of > the intended recipient(s) only and may contain information that is > confidential, privileged or legally protected. Any unauthorized use or > dissemination of this communication is strictly prohibited. If you have > received this communication in error, please immediately notify the sender > by return e-mail message and delete all copies of the original > communication. Thank you for your cooperation. > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > Hi Hick I used python & its sqlite3 module for this trial, the autocommit mode is default on. After I explicitly called "BEGIN" & "COMMIT" for selecting record, I could see the inserted record. Regards gelin yan _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users