> >The simple solution would just create a race condition... i think: > > > >1) INSERT INTO status_table FROM SELECT oldest task in queue > >2) DELETE oldest task in queue > > > >Right? > > It might work fine if you wrap it in an exclusive > transaction. > "exclusive transaction"? Great! How do I do that? :) >From reading http://www.sqlite.org/lockingv3.html it sounds like SQLite very >rarely will want to gain an exclusive lock. I think, not even issuing an >INSERT will do that until other factors cause it to flush to disk. Can someone with more knowledge of SQLite internals explain the right way to "atomic"-lly "pop"-off an item from table in SQlite? (And, in this case, also add it to a 2nd table.) Thank you, Allen _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
- Re: [sqlite] Sqlite as a FIFO buffer? Allen Fowler
- Re: [sqlite] Sqlite as a FIFO buf... Christopher Taylor
- Re: [sqlite] Sqlite as a FIFO... Douglas E. Fajardo
- Re: [sqlite] Sqlite as a FIFO... Christopher Taylor
- Re: [sqlite] Sqlite as a FIFO... Douglas E. Fajardo
- Re: [sqlite] Sqlite as a FIFO... Christopher Taylor
- Re: [sqlite] Sqlite as a FIFO... Allen Fowler
- Re: [sqlite] Sqlite as a FIFO buffer? Kees Nuyt
- Re: [sqlite] Sqlite as a FIFO buffer? (How make a... Allen Fowler
- Re: [sqlite] Sqlite as a FIFO buffer? (How ma... Kees Nuyt
- [sqlite] How make atomic? Was: Sqlite as ... Allen Fowler
- Re: [sqlite] How make atomic? Was: Sq... Roger Binns
- Re: [sqlite] How make atomic? Wa... Allen Fowler
- Re: [sqlite] How make atomic? Was: Sq... Doug Currie
- Re: [sqlite] How make atomic? Wa... Allen Fowler
- Re: [sqlite] How make atomic?... Allen Fowler
- Re: [sqlite] Sqlite as a FIFO buffer? Dennis Cote