SERVER-132638ClosedFixed

count with limit 0 fails on a view but works on a collection

For the {{count}} command {{limit: 0}} means no limit, and on a collection it returns the full count. The same command against a view returns error 15958, "the limit must be positive". Negative limits are not affected. {{limit: -1}} on a view returns 1, which matches the collection, so zero is the only value that differs. Every way of writing zero gives the error, so it does not depend on the numeric type. {{{}0{}}}, {{{}0.0{}}}, {{{}-0.0{}}}, {{NumberDecimal("0")}} and {{NumberDecimal("-0

Affected Versions
Versions known to exhibit this issue
8.2.47.0.318.2.68.2.12
Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc10229.0.48.3.168.0.377.0.49
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
bkpca-candidatenewengqi-view