Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-13791

Cannot access collection 2001_ABC

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: JavaScript
    • Labels:
      None
    • Environment:
      Mongo.exe and importutility are being run on windows 64.
      Mongod is version 2.6.0 on linux
    • ALL
    • Hide

      Create a text file with sample json objects.
      Create a collection named 2001_ABC using the import utility:
      mongoimport.exe --host <host:port> -d <databasename> --collection 2001_ABC -file D:\Avi\1.json

      Connect to the instance with mongo.exe
      use <databasename>
      show collections

      You should see 2001_ABC in the list.

      in mongo.exe do:
      db.2001_ABC.drop
      It should be dropped, but instead you get a syntax error.

      Show
      Create a text file with sample json objects. Create a collection named 2001_ABC using the import utility: mongoimport.exe --host <host:port> -d <databasename> --collection 2001_ABC -file D:\Avi\1.json Connect to the instance with mongo.exe use <databasename> show collections You should see 2001_ABC in the list. in mongo.exe do: db.2001_ABC.drop It should be dropped, but instead you get a syntax error.

      I cant access/delete a collection through the client (mongo.exe).
      The collection was created using the import utility.
      (Probably the reason is the collection name starts with a number)

      I can see the collection when doing 'show collections'.
      When I try to drop it i get an error:
      > show collections
      2000_ABC
      2000_Capped1G
      2001_ABC
      Col_2000_1G
      system.indexes
      system.profile
      > db.2001_ABC.drop
      2014-04-30T15:16:37.261+0300 SyntaxError: Unexpected token ILLEGAL
      >

            Assignee:
            Unassigned Unassigned
            Reporter:
            levyavi Avi Levy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: