Commits on Sep 27, 2016
  1. Oops, actually enable concurrent reads with writes

    The earlier commit (943213a) accidentally left the CONCURRENT_READS
    flag as 0, not 1, so concurrent reads weren't actually enabled...
    snej committed Sep 27, 2016
Commits on Sep 7, 2016
  1. More rigorous thread-safety checks

    * Ensure the test+set of the `inUse` flag is atomic
    * Wrapped begin/endUse around more sqlite3 calls, including in
    * Made warnInUse throw an assertion-failure, not just log a warning.
    snej committed Sep 7, 2016
Commits on Aug 16, 2016
Commits on Jul 28, 2016
  1. Enable readers concurrently with a writer (assumes WAL mode)

    You can turn this off by setting CONCURRENT_READS to 0.
    For couchbase/couchbase-lite-ios#1389
    snej committed Jul 28, 2016
Commits on Apr 28, 2016
Commits on Aug 3, 2015
Commits on Jan 29, 2015
Commits on Oct 23, 2014
Commits on Oct 10, 2014
Commits on Sep 15, 2014
Commits on Sep 13, 2014
Commits on Jul 29, 2014
Commits on Jul 19, 2014
Commits on Feb 27, 2014
  1. Extended draconian thread-safety check to support dispatch queues.

    If the CBLManager.dispatchQueue property has been set, databases will check for the
    correct queue, _not_ the correct thread.
    snej committed Feb 27, 2014
  2. Draconian thread-safety check for FMDatabase

    People keep trying to call CBLDatabases on multiple threads and don’t understand the generic “database in use”
    warnings. So I put in an explicit same-thread test that triggers an unblockable assertion failure with a very explicit
    message about CBL thread safety.
    snej committed Feb 27, 2014
Commits on Feb 24, 2014
Commits on Jan 24, 2014
  1. Better error handling in FMResultSet

    If the initial call to sqlite3_step fails when handling a SELECT query,
    the only response would be the FMResultSet’s first -next call returning
    NO. To the client that looks like a normal end-of-rows condition, not
    an error.
    I fixed this by having the first sqlite3_step call happen while creating
    the FMResultSet. That way if it fails, the caller (-executeQuery:…)
    will return nil, which is the normal way an error is signaled.
    Note: I haven’t been able to test this in an error condition because
    I’m not sure how to reliably cause an error on the first sqlite3_step
    call of a query.
    Fixes ccgus/fmdb#227
    snej committed Jan 24, 2014
Commits on Nov 8, 2013
Commits on Nov 7, 2013
  1. Added “CBL_” prefix to class names to avoid conflicts in apps

    If an app uses Couchbase Lite and regular FMDB, this way the FMDB
    classes won’t conflict and break everything.
    snej committed Nov 7, 2013
  2. Comment out FMDB code that’s unused by Couchbase Lite

    There’s a lot of FMDB that Couchbase Lite doesn’t use, but Objective-C
    methods can’t be dead-stripped by the linker. So I’ve gone and commented
    out the stuff we don’t use, to lower our code size.
    snej committed Nov 7, 2013
  3. Improvements to -dataForColumnIndex:/-dataForColumn:

    SQLite docs say sqlite3_column_blob should be called before
    sqlite_3_column_bytes in case the data has to be converted.
    Also allocate the NSData more efficiently.
    snej committed Nov 7, 2013
  4. Use sqlite3_busy_timeout to handle busy/locked errors

    This simplifies the code.
    snej committed Nov 7, 2013
Commits on Nov 6, 2013
  1. Make busyRetryTimeout a time interval, not an iteration count

    This makes more sense since the caller has no idea how often FMDB is
    going to retry a query.
    Also changed the internal retry interval from 20 microseconds(!) to
    20 milliseconds. I believe this was a typo on Gus's part.
    snej committed Nov 6, 2013
  2. Work around SQLite3 incompatibility betwween read-only and shared-cac…

    …he modes
    In shared-cache mode all shared connections inherit the read/write access of the first,
    so you can't have some connections read-only and some read-write. I'm working around
    this by manually checking for read-only violations when in shared-cache mode.
    snej committed Nov 6, 2013
Commits on Oct 31, 2013
Commits on Sep 30, 2013
  1. Added -explainQueryPlan.

    snej committed Sep 30, 2013
Commits on Sep 20, 2013
Commits on Sep 4, 2013
  1. Fixed misuse of SQLITE_STATIC with transient UTF8 string data

    This caused crashes, but only in optimized builds... Nasty.
    snej committed Sep 4, 2013
Commits on Dec 31, 2012
Commits on Jun 29, 2012
  1. Fix compiler warnings from newer Clang

    Most of these are printf format specifier inconsistencies, especially involving NSInteger and NSUInteger.
    snej committed Jun 29, 2012
Commits on May 29, 2012
  1. Fix issue binding an empty NSData parameter

    The object [NSData data] was binding to a SQL 'null', not an empty blob.
    See: ccgus#73
    snej committed May 29, 2012
Commits on Mar 27, 2012