Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-2422

Cassim and underscored databases

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Database Core
    • None

    Description

      1. Run dev cluster

      2. Create _users database

      http PUT http://localhost:15984/_users
      HTTP/1.1 201 Created
      Cache-Control: must-revalidate
      Content-Length: 12
      Content-Type: text/plain; charset=utf-8
      Date: Fri, 31 Oct 2014 10:36:19 GMT
      Location: http://localhost:15984/_users
      Server: CouchDB/9938fac (Erlang OTP/17)
      X-Couch-Request-ID: f273be89
      X-CouchDB-Body-Time: 0
      
      {"ok":true}
      
      

      3. Create cassim database

      http PUT http://localhost:15984/cassim
      HTTP/1.1 201 Created
      Cache-Control: must-revalidate
      Content-Length: 12
      Content-Type: text/plain; charset=utf-8
      Date: Fri, 31 Oct 2014 10:37:06 GMT
      Location: http://localhost:15984/cassim
      Server: CouchDB/9938fac (Erlang OTP/17)
      X-Couch-Request-ID: 8bdcc974
      X-CouchDB-Body-Time: 0
      
      {"ok":true}
      
      

      4. Try to access _users database:

      http http://localhost:15984/_users
      HTTP/1.1 400 Bad Request
      Cache-Control: must-revalidate
      Content-Length: 89
      Content-Type: text/plain; charset=utf-8
      Date: Fri, 31 Oct 2014 10:34:22 GMT
      Server: CouchDB/9938fac (Erlang OTP/17)
      X-Couch-Request-ID: e9f4a5b3
      X-CouchDB-Body-Time: 0
      
      {"error":"bad_request","reason":"Only reserved document ids may start with underscore."}
      
      

      Oh wait...? This is because cassim creates documents with database name as the prefix and for _users and _replicator it clashes with restrictions about document names.

      Attachments

        Issue Links

          Activity

            People

              kxepal Alexander Shorin
              kxepal Alexander Shorin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: