-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
v3.4, v3.2, v3.0
In exploring how deprecated BSON types are handled by drivers, I discovered that mongoexport stopped handling the 'symbol' type in 3.0. It now throws an exception if "symbol" is encountered.
In the example below, I have a collection with a single document, with key "foo" and value being the symbol type with content "hello".
$ ~/mongodb/3.2.4/bin/mongodump --port 50672 -d test -c bson -o - | hexdump 2016-03-15T15:18:45.535-0400 writing test.bson to stdout 2016-03-15T15:18:45.536-0400 dumped 1 document 0000000 25 00 00 00 07 5f 69 64 00 56 e8 5c bf ea 79 f2 0000010 9e 1f 73 74 e1 0e 66 6f 6f 00 06 00 00 00 68 65 0000020 6c 6c 6f 00 00 0000025 $ ~/mongodb/2.4.14/bin/mongoexport --port 50672 -d test -c bson connected to: 127.0.0.1:50672 { "_id" : { "$oid" : "56e85cbfea79f29e1f7374e1" }, "foo" : "hello" } exported 1 records $ ~/mongodb/2.6.11/bin/mongoexport --port 50672 -d test -c bson connected to: 127.0.0.1:50672 { "_id" : { "$oid" : "56e85cbfea79f29e1f7374e1" }, "foo" : "hello" } exported 1 records $ ~/mongodb/3.0.10/bin/mongoexport --port 50672 -d test -c bson 2016-03-15T15:19:19.852-0400 connected to: localhost:50672 2016-03-15T15:19:19.852-0400 Failed: conversion of BSON type 'bson.Symbol' not supported hello $ ~/mongodb/3.2.4/bin/mongodump --port 50672 -d test -c bson -o bsondump.bson 2016-03-15T15:19:28.315-0400 writing test.bson to 2016-03-15T15:19:28.315-0400 done dumping test.bson (1 document)
N.B. The server I tested against was 2.4.14, but I also saw it with server 3.2.4.
- duplicates
-
TOOLS-1610 implement the extended json spec in import/export
- Closed