Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-3824

Re-opening a database with an Index causes failure

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 3.1.0
    • 3.1.0
    • LiteCore
    • Security Level: Public
    • None
    • LiteCore 92
    • 5

    Description

      I have code that does this:

      • Create a database
      • Add a couple of indexes
      • Close the database
      • Attempt to re-open it.

      The attempt to re-open fails with the LiteCore error:

      LiteCoreException{3, 1, "virtual tables may not be altered -- ALTER TABLE "kv_.test_scope_\Q6\No\Dzd\Ns\W\V\K.test_collection_\W\M\Tm\Xw\Nxnp\L\J::index2" ADD COLUMN expiration INTEGER; CREATE INDEX "kv_.test_scope_\Q6\No\Dzd\Ns\W\V\K.test_collection_\W\M\Tm\Xw\Nxnp\L\J::index2_expiration" ON "kv_.test_scope_\Q6\No\Dzd\Ns\W\V\K.test_collection_\W\M\Tm\Xw\Nxnp\L\J::index2" (expiration) WHERE expiration not null"}
      

      The failure is completely repeatable

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            callum.birks Callum Birks
            blake.meike Blake Meike
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty