1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

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.
This commit is contained in:
Tom Lane
2010-07-28 17:22:03 +00:00
parent a2164c285b
commit e4d495a20b

View File

@ -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 */