-
Type: Bug
-
Resolution: Done
-
Priority: Blocker - P1
-
Affects Version/s: 1.1.2
-
Component/s: None
-
None
-
Environment:Windows 7, 64-bit
Apache 2.4.18, 64-bit TS
PHP 7.0.2, 64-bit TS
Mongo 3.2.0
MongoDB driver 1.1.1 and 1.1.2
I can't speak for other platforms, but with my current setup trying to do [$set => ["TestInt" => 4294967295]] will save an Int32 in the database with value -1 (so it wraps around instead of truncating).
$inc suffers from the same problem as $set. That is, if I try to [$inc => ["TestInt" => 4294967295]] I will actually subtract 1 from TestInt. Further testing has revealed that queries suffer from the same problem: If I were to make a query with a filter like "TestInt" => ['$lt' => 4294967295], I'll actually be looking for documents where TestInt is less than -1.
Truncation of 64-bit integers when converting BSON to PHP values may also result in property name corruption (see PHPC-592).
- is depended on by
-
PHPC-593 Throw exception if Binary subtype is out of range
- Closed
-
PHPC-594 Throw exception if Timestamp arguments are out of range
- Closed
-
PHPC-595 Throw exception if WriteConcern wtimeout is out of range
- Closed
- is related to
-
PHPC-313 BSON should throw when encountering 64-bit integer on 32-bit platform
- Closed
- related to
-
PHPC-592 Property name corrupted when unserializing 64-bit integer on 32-bit platform
- Closed
- links to