8000 Add missing CHECK_FOR_INTERRUPTS in lseg_inside_poly · home201448/postgres@871e280 · GitHub
[go: up one dir, main page]

Skip to content

Commit 871e280

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 dee1ed5 commit 871e280

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/utils/adt/geo_ops.c

Lines changed: 3 additions & 0 deletions
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

@@ -3922,6 +3923,8 @@ lseg_inside_poly(Point *a, Point *b, POLYGON *poly, int start)
39223923
{
39233924
Point *interpt;
39243925

3926+
CHECK_FOR_INTERRUPTS();
3927+
39253928
s.p[1] = poly->p[i];
39263929

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

0 commit comments

Comments
 (0)
0