[SERVER-50445] Return the value as double when NumberLong subtraction overflows in ExpressionSubtract Created: 21/Aug/20 Updated: 29/Oct/23 Resolved: 03/Nov/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0, 4.0.22, 3.6.22, 4.4.3, 4.2.12 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Arun Banala | Assignee: | Arun Banala |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | qexec-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v4.4, v4.2, v4.0, v3.6
|
||||||||||||||||||||
| Sprint: | Query 2020-10-05, Query 2020-10-19, Query 2020-11-02, Query 2020-11-16 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 14 | ||||||||||||||||||||
| Description |
|
The ExpressionSubtract does subtract operation on two long long data type. This can cause an overflow with large numbers. The right way to do this is to use the DoubleDoubleSummation helper that we use while adding number in ExpressionSum. |
| Comments |
| Comment by Githook User [ 20/Nov/20 ] |
|
Author: {'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com', 'username': 'banarun'}Message: (cherry picked from commit 3518bd82e49b6941ee7a2f3a868df40114b0d8fc) |
| Comment by Githook User [ 20/Nov/20 ] |
|
Author: {'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com', 'username': 'banarun'}Message: (cherry picked from commit 3518bd82e49b6941ee7a2f3a868df40114b0d8fc) |
| Comment by Githook User [ 20/Nov/20 ] |
|
Author: {'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com', 'username': 'banarun'}Message: (cherry picked from commit 3518bd82e49b6941ee7a2f3a868df40114b0d8fc) |
| Comment by Githook User [ 20/Nov/20 ] |
|
Author: {'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com', 'username': 'banarun'}Message: |
| Comment by Githook User [ 19/Nov/20 ] |
|
Author: {'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com', 'username': 'banarun'}Message: (cherry picked from commit 3518bd82e49b6941ee7a2f3a868df40114b0d8fc) |
| Comment by Githook User [ 03/Nov/20 ] |
|
Author: {'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com', 'username': 'banarun'}Message: |