sanhua.zh wrote: > 1. Conn A: Open, PRAGMA journal_mode=WAL > 2.ConnB: Open, PRAGMA journal_mode=WAL > 3.ConnA: CREATE TABLE sample (i INTEGER); > 4.ConnB: PRAGMA table_info('sample') > > Firstly, both thread 1 and 2 do initialization for their own conn, which is > to read to schema into memory. > Then, Conn A creates a table with Conn A. > Finally, `PRAGMA table_info(sample)` is called in thread 2 with Conn B and it > returns nothing. > > I do know the reason should be the expired in-memory-schema.
No, SQLite automatically detects schema changes. It's likely that the second connection started its transaction before the first connection committed its own, so it still sees the old state of the database. Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users