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

Cannot access collection 2001_ABC

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Works as Designed
    • Affects Version/s: None
    • Fix 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
    • Operating System:
      ALL
    • Steps To Reproduce:
      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.

      Description

      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
      >

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: