diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-07-28 17:22:03 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-07-28 17:22:03 +0000 |
| commit | e4d495a20b0aa1b9f88df07e6011003a2c2ad700 (patch) | |
| tree | 1c040b3a1b066e81d31d51bbd22e004baba69c89 /src/backend/executor | |
| parent | a2164c285bde3bd31d9faff6ae993aac3a8085b8 (diff) | |
Fix oversight in new EvalPlanQual logic: the second loop over the ExecRowMark
list in ExecLockRows() forgot to allow for the possibility that some of the
rowmarks are for child tables that aren't relevant to the current row.
Per report from Kenichiro Tanaka.
Diffstat (limited to 'src/backend/executor')
| -rw-r--r-- | src/backend/executor/nodeLockRows.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/backend/executor/nodeLockRows.c b/src/backend/executor/nodeLockRows.c index 0eafa0afa2c..1f203b4fe6b 100644 --- a/src/backend/executor/nodeLockRows.c +++ b/src/backend/executor/nodeLockRows.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/nodeLockRows.c,v 1.4 2010/02/26 02:00:42 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/executor/nodeLockRows.c,v 1.4.4.1 2010/07/28 17:22:03 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -195,6 +195,13 @@ lnext: HeapTupleData tuple; Buffer buffer; + /* ignore non-active child tables */ + if (!ItemPointerIsValid(&(erm->curCtid))) + { + Assert(erm->rti != erm->prti); /* check it's child table */ + continue; + } + if (EvalPlanQualGetTuple(&node->lr_epqstate, erm->rti) != NULL) continue; /* it was updated and fetched above */ |
