Show
On version 4.4 (1786a10c7278a9242566ec5647687fa95bf68f12)
// Insert a document.
> db.fuzzer.insert({ "_id" : 17720, "str" : "", " num " : null , " date " : ISODate(" 2019-08-16T12:27:05.102Z "), " array " : [ null ], " obj " : { " obj " : { " obj " : { " obj " : { " num " : 9.094947017729282e-13 } } } }, " lon_e " : { " lon_a " : { " int_d " : NumberLong(0) } }, " int_b " : { " 10 " : { " lon_e " : NumberLong(0) } }, " date_d " : { " dec_a " : [ { " dec_f.dec_c.1 " : NumberDecimal(" -0E-6176 ") }, { " dec_d " : NumberDecimal(" -9.999999999999999999999999999999999E+6144 ") }, { " dec_b.1.dec_e " : NumberDecimal(" -Infinity ") } ] }, " date_f " : { " 10 " : ISODate(" 2013-09-29T10:40:00Z ") }, " dec_e " : { " dec_c " : { " lon_d " : [ NumberDecimal(" NaN "), NumberDecimal(" 0 "), NumberDecimal(" NaN ") ] } }, " str_e " : [ ], " ts_b " : { " 10" : [ Timestamp(2147483648, 2147483648) ] } })
WriteResult({ "nInserted" : 1 })
// Perform an update.
> db.runCommand(... { "update" : "fuzzer" , "updates" : [ { "q" : { }, "u" : { "$min" : {... "lon_b.str_b" : "",... " str_e.10 " : [ { " 0.str_a " : " thing " }, { " str_c.str_e.str_f " : " $str " }, { " str_f.0.str_d " : " Nakfa multi-tasking " } ],... " str_e.2 " : [ { " $toString " : { " $eq " : [ { " $toBool " : { " $exp " : 9 } }, { " $strLenBytes " : { " $toLower " : " ?f " } } ] } }, " Intuitive " ],... " date_c " : [ ISODate(" 2008-02-29T00:00:00Z "), ISODate(" 9999-12-31T00:00:00Z ") ],... " date_b.date_a.2 " : ISODate(" 2013-09-29T10:40:00Z ")... } }, " upsert " : false , " multi " : false } ], " ordered" : true })
{ "n" : 1, "nModified" : 1, "ok" : 1 }
// Fetch the resulting document.
> db.fuzzer.find({})
{ "_id" : 17720, "str" : "", " num " : null , " date " : ISODate(" 2019-08-16T12:27:05.102Z "), " array " : [ null ], " obj " : { " obj " : { " obj " : { " obj " : { " num " : 9.094947017729282e-13 } } } }, " lon_e " : { " lon_a " : { " int_d " : NumberLong(0) } }, " int_b " : { " 10 " : { " lon_e " : NumberLong(0) } }, " date_d " : { " dec_a " : [ { " dec_f.dec_c.1 " : NumberDecimal(" -0E-6176 ") }, { " dec_d " : NumberDecimal(" -9.999999999999999999999999999999999E+6144 ") }, { " dec_b.1.dec_e " : NumberDecimal(" -Infinity ") } ] }, " date_f " : { " 10 " : ISODate(" 2013-09-29T10:40:00Z ") }, " dec_e " : { " dec_c " : { " lon_d " : [ NumberDecimal(" NaN "), NumberDecimal(" 0 "), NumberDecimal(" NaN ") ] } }, " str_e " : [ null , null , null , null , null , null , null , null , null , null , [ { " 0.str_a " : " thing " }, { " str_c.str_e.str_f " : " $str " }, { " str_f.0.str_d " : " Nakfa multi-tasking " } ] ], " ts_b " : { " 10 " : [ Timestamp(2147483648, 2147483648) ] }, " date_b " : { " date_a " : { " 2 " : ISODate(" 2013-09-29T10:40:00Z ") } }, " date_c " : [ ISODate(" 2008-02-29T00:00:00Z "), ISODate(" 9999-12-31T00:00:00Z ") ], " lon_b " : { " str_b " : " " } }
On 5.0 (a291fb648570312ff3974fc4a92ae5b3e3da3e23) featureFlagDotsAndDollars=false
// Insert a document.
MongoDB Enterprise > db.fuzzer.insert({ "_id" : 17720, "str" : "", " num " : null , " date " : ISODate(" 2019-08-16T12:27:05.102Z "), " array " : [ null ], " obj " : { " obj " : { " obj " : { " obj " : { " num " : 9.094947017729282e-13 } } } }, " lon_e " : { " lon_a " : { " int_d " : NumberLong(0) } }, " int_b " : { " 10 " : { " lon_e " : NumberLong(0) } }, " date_d " : { " dec_a " : [ { " dec_f.dec_c.1 " : NumberDecimal(" -0E-6176 ") }, { " dec_d " : NumberDecimal(" -9.999999999999999999999999999999999E+6144 ") }, { " dec_b.1.dec_e " : NumberDecimal(" -Infinity ") } ] }, " date_f " : { " 10 " : ISODate(" 2013-09-29T10:40:00Z ") }, " dec_e " : { " dec_c " : { " lon_d " : [ NumberDecimal(" NaN "), NumberDecimal(" 0 "), NumberDecimal(" NaN ") ] } }, " str_e " : [ ], " ts_b " : { " 10" : [ Timestamp(2147483648, 2147483648) ] } })
WriteResult({ "nInserted" : 1 })
// Perform an update.
MongoDB Enterprise > db.runCommand(
... ... { "update" : "fuzzer" , "updates" : [ { "q" : { }, "u" : { "$min" : {
... ... "lon_b.str_b" : "",
... ... "str_e.10" : [ { "0.str_a" : "thing" }, { "str_c.str_e.str_f" : "$str" }, { "str_f.0.str_d" : "Nakfa multi-tasking" } ],
... ... "str_e.2" : [ { "$toString" : { "$eq" : [ { "$toBool" : { "$exp" : 9 } }, { "$strLenBytes" : { "$toLower" : "?f" } } ] } }, "Intuitive" ],
... ... "date_c" : [ ISODate( "2008-02-29T00:00:00Z" ), ISODate( "9999-12-31T00:00:00Z" ) ],
... ... "date_b.date_a.2" : ISODate( "2013-09-29T10:40:00Z" )
... ... } }, "upsert" : false , "multi" : false } ], "ordered" : true })
{
"n" : 0,
"writeErrors" : [
{
"index" : 0,
"code" : 52,
"errmsg" : "The dollar ($) prefixed field '$toString' in 'str_e.2.0.$toString' is not valid for storage."
}
],
"nModified" : 0,
"ok" : 1
}
On 5.0 (a291fb648570312ff3974fc4a92ae5b3e3da3e23) featureFlagDotsAndDollars=true
// Insert a document.
MongoDB Enterprise > db.fuzzer.insert({ "_id" : 17720, "str" : "", " num " : null , " date " : ISODate(" 2019-08-16T12:27:05.102Z "), " array " : [ null ], " obj " : { " obj " : { " obj " : { " obj " : { " num " : 9.094947017729282e-13 } } } }, " lon_e " : { " lon_a " : { " int_d " : NumberLong(0) } }, " int_b " : { " 10 " : { " lon_e " : NumberLong(0) } }, " date_d " : { " dec_a " : [ { " dec_f.dec_c.1 " : NumberDecimal(" -0E-6176 ") }, { " dec_d " : NumberDecimal(" -9.999999999999999999999999999999999E+6144 ") }, { " dec_b.1.dec_e " : NumberDecimal(" -Infinity ") } ] }, " date_f " : { " 10 " : ISODate(" 2013-09-29T10:40:00Z ") }, " dec_e " : { " dec_c " : { " lon_d " : [ NumberDecimal(" NaN "), NumberDecimal(" 0 "), NumberDecimal(" NaN ") ] } }, " str_e " : [ ], " ts_b " : { " 10" : [ Timestamp(2147483648, 2147483648) ] } })
WriteResult({ "nInserted" : 1 })
// Perform an update.
MongoDB Enterprise > db.runCommand( { "update" : "fuzzer" , "updates" : [ { "q" : { }, "u" : { "$min" : { "lon_b.str_b" : "", " str_e.10 " : [ { " 0.str_a " : " thing " }, { " str_c.str_e.str_f " : " $str " }, { " str_f.0.str_d " : " Nakfa multi-tasking " } ], " str_e.2 " : [ { " $toString " : { " $eq " : [ { " $toBool " : { " $exp " : 9 } }, { " $strLenBytes " : { " $toLower " : " ?f " } } ] } }, " Intuitive " ], " date_c " : [ ISODate(" 2008-02-29T00:00:00Z "), ISODate(" 9999-12-31T00:00:00Z ") ], " date_b.date_a.2 " : ISODate(" 2013-09-29T10:40:00Z ") } }, " upsert " : false , " multi " : false } ], " ordered" : true })
{ "n" : 1, "nModified" : 1, "ok" : 1 }
// Fetch the resulting document.
MongoDB Enterprise > db.fuzzer.find({})
{ "_id" : 17720, "str" : "", " num " : null , " date " : ISODate(" 2019-08-16T12:27:05.102Z "), " array " : [ null ], " obj " : { " obj " : { " obj " : { " obj " : { " num " : 9.094947017729282e-13 } } } }, " lon_e " : { " lon_a " : { " int_d " : NumberLong(0) } }, " int_b " : { " 10 " : { " lon_e " : NumberLong(0) } }, " date_d " : { " dec_a " : [ { " dec_f.dec_c.1 " : NumberDecimal(" -0E-6176 ") }, { " dec_d " : NumberDecimal(" -9.999999999999999999999999999999999E+6144 ") }, { " dec_b.1.dec_e " : NumberDecimal(" -Infinity ") } ] }, " date_f " : { " 10 " : ISODate(" 2013-09-29T10:40:00Z ") }, " dec_e " : { " dec_c " : { " lon_d " : [ NumberDecimal(" NaN "), NumberDecimal(" 0 "), NumberDecimal(" NaN ") ] } }, " str_e " : [ null , null , [ { " $toString " : { " $eq " : [ { " $toBool " : { " $exp " : 9 } }, { " $strLenBytes " : { " $toLower " : " ?f " } } ] } }, " Intuitive " ], null , null , null , null , null , null , null , [ { " 0.str_a " : " thing " }, { " str_c.str_e.str_f " : " $str " }, { " str_f.0.str_d " : " Nakfa multi-tasking " } ] ], " ts_b " : { " 10 " : [ Timestamp(2147483648, 2147483648) ] }, " date_b " : { " date_a " : { " 2 " : ISODate(" 2013-09-29T10:40:00Z ") } }, " date_c " : [ ISODate(" 2008-02-29T00:00:00Z "), ISODate(" 9999-12-31T00:00:00Z ") ], " lon_b " : { " str_b " : " " } }