summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2015-12-14 16:44:40 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2015-12-14 16:44:40 -0300
commit871e28062cf55d2bfa967a5cec25d5e03818bd14 (patch)
treeeb8a7058194a0a508f8ed3ee1f53c7fa595ba83e
parentdee1ed54f80345250cde37632673b139742024b6 (diff)
Add missing CHECK_FOR_INTERRUPTS in lseg_inside_poly
Apparently, there are bugs in this code that cause it to loop endlessly. That bug still needs more research, but in the meantime it's clear that the loop is missing a check for interrupts so that it can be cancelled timely. Backpatch to 9.1 -- this has been missing since 49475aab8d0d.
-rw-r--r--src/backend/utils/adt/geo_ops.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c
index 3dd05962f61..fdbeaadbb55 100644
--- a/src/backend/utils/adt/geo_ops.c
+++ b/src/backend/utils/adt/geo_ops.c
@@ -20,6 +20,7 @@
#include <ctype.h>
#include "libpq/pqformat.h"
+#include "miscadmin.h"
#include "utils/builtins.h"
#include "utils/geo_decls.h"
@@ -3922,6 +3923,8 @@ lseg_inside_poly(Point *a, Point *b, POLYGON *poly, int start)
{
Point *interpt;
+ CHECK_FOR_INTERRUPTS();
+
s.p[1] = poly->p[i];
if (on_ps_internal(t.p, &s))