[sqlite] Documentation error in async_cond_wait

2015-09-23 Thread Christian Werner
This sentence in .../ext/async/sqlite3async.c for async_cond_wait() ** It is guaranteed that no other thread will call async_cond_wait() when ** there is already a thread waiting on the condition variable. is wrong for both Win32 and POSIX implementations. It should be left out or read

[sqlite] Detect if db is already opened by another process?

2015-09-23 Thread Eduardo Morras
On Wed, 23 Sep 2015 18:01:47 +0200 Michael Schlenker wrote: > Hi, > > i just wondered if there is an API to detect if a sqlite database file > is already opened by another process. > > I can make the assumptions that: > > 1. WAL mode is in use > 2. Linux and Windows only > 3. No network filesy

[sqlite] Detect if db is already opened by another process?

2015-09-23 Thread R.Smith
On 2015-09-23 06:09 PM, Richard Hipp wrote: > On 9/23/15, Michael Schlenker wrote: >> Hi, >> >> i just wondered if there is an API to detect if a sqlite database file >> is already opened by another process. > Maybe try to change in or out of WAL mode? That only works if there > is a single con

[sqlite] Detect if db is already opened by another process?

2015-09-23 Thread Michael Schlenker
Hi, i just wondered if there is an API to detect if a sqlite database file is already opened by another process. I can make the assumptions that: 1. WAL mode is in use 2. Linux and Windows only 3. No network filesystems 4. I only care if the access is done by another SQLite library, not simpl

[sqlite] Detect if db is already opened by another process?

2015-09-23 Thread Simon Slavin
On 23 Sep 2015, at 5:01pm, Michael Schlenker wrote: > i just wondered if there is an API to detect if a sqlite database file > is already opened by another process. Thanks for your use-case and assumptions which makes this far simpler to answer. I don't know of any simple way to know if anothe

[sqlite] UPDATE silently failing

2015-09-23 Thread Nelson, Erik - 2
Hugues Bruant wrote on Wednesday, September 23, 2015 2:06 AM > > > in some cases the SIndex captured inside the first lambda (UPDATE > > > statement) appeared to be null even though it wasn't null in the > > > enclosing scope (setVersion_) > > > > Interesting (and disturbing) result. Is this with O

[sqlite] UPDATE silently failing

2015-09-23 Thread Rowan Worth
On 23 September 2015 at 12:32, Hugues Bruant wrote: > On Wed, Sep 23, 2015 at 12:00 AM, Rowan Worth wrote: > > > Has many possible explanations. > > I can't think of any that is consistent with the Java specification. > Yeah fair enough, SIndex looks watertight. It's still possible for some oth

[sqlite] Detect if db is already opened by another process?

2015-09-23 Thread Richard Hipp
On 9/23/15, Michael Schlenker wrote: > Hi, > > i just wondered if there is an API to detect if a sqlite database file > is already opened by another process. Maybe try to change in or out of WAL mode? That only works if there is a single connection to the database file. > > I can make the assum

[sqlite] UPDATE silently failing

2015-09-23 Thread Rowan Worth
> SIndex sidx is just a boxed immutable integer. If it were me I'd be reviewing this assumption very carefully. The sequence of events: 1. SIndex.getInt() returns 0 2. SIndex.toString() returns "1" 3. SIndex.getInt() returns 1 Has many possible explanations. You could also try 'final int sid = s

[sqlite] UPDATE silently failing

2015-09-23 Thread Hugues Bruant
> > in some cases the SIndex captured inside the first lambda > > (UPDATE statement) appeared to be null even though it wasn't null in the > > enclosing scope (setVersion_) > > Interesting (and disturbing) result. Is this with Oracle's java compiler? > Compiler is Oracle JDK 8u40-b25 on OSX Runtime

[sqlite] UPDATE silently failing

2015-09-23 Thread Hugues Bruant
On Wed, Sep 23, 2015 at 12:00 AM, Rowan Worth wrote: > > SIndex sidx is just a boxed immutable integer. > > If it were me I'd be reviewing this assumption very carefully. The sequence > of events: > public class SIndex { private final int _i; public SIndex(int i) { _i = i; } public int getInt(