[SERVER-4938] unimplemented $bitand and $bitor operators Created: 12/Feb/12  Updated: 11/Jul/16  Resolved: 17/Feb/12

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: None
Fix Version/s: 2.1.1

Type: Bug Priority: Major - P3
Reporter: Aaron Staple Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

It seems like we can parse $bitand and $bitor operators (distinct from the $bit operator), but they are not implemented. It kind of looks like they will trigger an exception and fail the update but not report the error to the client since last error is not set:

        default:
            stringstream ss;
            ss << "Mod::apply can't handle type: " << op;
            throw UserException( 9017, ss.str() );



 Comments   
Comment by Aaron Staple [ 13/Feb/12 ]

It looks like there are some other places that we might clean up too, for example

 
    const char* Mod::modNames[] = { "$inc", "$set", "$push", "$pushAll", "$pull", "$pullAll" , "$pop", "$unset" ,
                                    "$bitand" , "$bitor" , "$bit" , "$addToSet", "$rename", "$rename"
                                  };
 

Comment by auto [ 13/Feb/12 ]

Author:

{u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

Message: use correct assert in update SERVER-4938
Branch: master
https://github.com/mongodb/mongo/commit/d8433150b2b30d49d4a32ba4e47b3ec10d60851d

Generated at Thu Feb 08 03:07:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.