summaryrefslogtreecommitdiff
path: root/src/mongo/db/geo/geoquery.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/geo/geoquery.cpp')
-rw-r--r--src/mongo/db/geo/geoquery.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/geo/geoquery.cpp b/src/mongo/db/geo/geoquery.cpp
index 024129cd01e..cc1c0b45309 100644
--- a/src/mongo/db/geo/geoquery.cpp
+++ b/src/mongo/db/geo/geoquery.cpp
@@ -68,6 +68,13 @@ namespace mongo {
}
}
+ // The user-provided point can be flat. We need to make sure that it's in bounds.
+ if (isNearSphere) {
+ uassert(17444,
+ "Legacy point is out of bounds for spherical query",
+ centroid.flatUpgradedToSphere || (SPHERE == centroid.crs));
+ }
+
return hasGeometry;
}