Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0d8f3d5

Browse files
committed
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 49475aa.
1 parent e2f1765 commit 0d8f3d5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/utils/adt/geo_ops.c

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <ctype.h>
2121

2222
#include "libpq/pqformat.h"
23+
#include "miscadmin.h"
2324
#include "utils/builtins.h"
2425
#include "utils/geo_decls.h"
2526

@@ -3931,6 +3932,8 @@ lseg_inside_poly(Point *a, Point *b, POLYGON *poly, int start)
39313932
{
39323933
Point *interpt;
39333934

3935+
CHECK_FOR_INTERRUPTS();
3936+
39343937
s.p[1] = poly->p[i];
39353938

39363939
if (on_ps_internal(t.p, &s))

0 commit comments

Comments
 (0)