Switch branches/tags
Nothing to show
Commits on Jan 17, 2018
  1. Increase wait time before retry when database is busy

    pasin committed Jan 17, 2018
    * From couchbase/couchbase-lite-ios#1979 issue that the database could be busy for some more time when it is in the recovery process. The total wait time of 55ms doesn’t seem to be enough.
    * Increase wait time before retry when database is busy with the exponential backoff between attempts.
    * The total wait time of 10 retries increases to 4092ms.
Commits on Sep 27, 2016
  1. Oops, actually enable concurrent reads with writes

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

    snej committed Sep 7, 2016
    * 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.
Commits on Aug 16, 2016
Commits on Jul 28, 2016
  1. Enable readers concurrently with a writer (assumes WAL mode)

    snej committed Jul 28, 2016
    You can turn this off by setting CONCURRENT_READS to 0.
    For couchbase/couchbase-lite-ios#1389
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.

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

    snej committed Feb 27, 2014
    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.
Commits on Feb 24, 2014
Commits on Jan 24, 2014
  1. Better error handling in FMResultSet

    snej committed Jan 24, 2014
    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
Commits on Nov 8, 2013
Commits on Nov 7, 2013
  1. Added “CBL_” prefix to class names to avoid conflicts in apps

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

    snej committed Nov 7, 2013
    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.
  3. Improvements to -dataForColumnIndex:/-dataForColumn:

    snej committed Nov 7, 2013
    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.
  4. Use sqlite3_busy_timeout to handle busy/locked errors

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

    snej committed Nov 6, 2013
    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.
  2. Work around SQLite3 incompatibility betwween read-only and shared-cac…

    snej committed Nov 6, 2013
    …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.
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

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

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

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