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

Commit 1d41e88

Browse files
committed
Trying to fix bad merging...
1 parent e3a1ab7 commit 1d41e88

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

src/backend/executor/execMain.c

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
*
2828
* IDENTIFICATION
29-
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.66 1999/01/29 09:22:57 vadim Exp $
29+
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.67 1999/01/29 10:15:09 vadim Exp $
3030
*
3131
*-------------------------------------------------------------------------
3232
*/
@@ -65,7 +65,7 @@ static TupleDesc InitPlan(CmdType operation, Query *parseTree,
6565
static void EndPlan(Plan *plan, EState *estate);
6666
static TupleTableSlot *ExecutePlan(EState *estate, Plan *plan,
6767
CmdType operation, int numberTuples, ScanDirection direction,
68-
void (*printfunc) ());
68+
DestReceiver *destfunc);
6969
static void ExecRetrieve(TupleTableSlot *slot,
7070
DestReceiver *destfunc,
7171
EState *estate);
@@ -756,7 +756,7 @@ ExecutePlan(EState *estate,
756756
CmdType operation,
757757
int numberTuples,
758758
ScanDirection direction,
759-
void (*printfunc) ())
759+
DestReceiver *destfunc)
760760
{
761761
JunkFilter *junkfilter;
762762

@@ -941,7 +941,7 @@ lmark:;
941941
{
942942
case CMD_SELECT:
943943
ExecRetrieve(slot, /* slot containing tuple */
944-
printfunc, /* print function */
944+
destfunc, /* print function */
945945
estate); /* */
946946
result = slot;
947947
break;
@@ -997,7 +997,7 @@ lmark:;
997997
*/
998998
static void
999999
ExecRetrieve(TupleTableSlot *slot,
1000-
void (*printfunc) (),
1000+
DestReceiver *destfunc,
10011001
EState *estate)
10021002
{
10031003
HeapTuple tuple;
@@ -1139,8 +1139,7 @@ ExecDelete(TupleTableSlot *slot,
11391139
{
11401140
RelationInfo *resultRelationInfo;
11411141
Relation resultRelationDesc;
1142-
ItemPointerData ctid,
1143-
oldtid;
1142+
ItemPointerData ctid;
11441143
int result;
11451144

11461145
/******************
@@ -1180,12 +1179,11 @@ ldelete:;
11801179
elog(ERROR, "Can't serialize access due to concurrent update");
11811180
else if (!(ItemPointerEquals(tupleid, &ctid)))
11821181
{
1183-
TupleTableSlot *slot = EvalPlanQual(estate,
1182+
TupleTableSlot *epqslot = EvalPlanQual(estate,
11841183
resultRelationInfo->ri_RangeTableIndex, &ctid);
11851184

1186-
if (!TupIsNull(slot))
1185+
if (!TupIsNull(epqslot))
11871186
{
1188-
tupleid = &oldtid;
11891187
*tupleid = ctid;
11901188
goto ldelete;
11911189
}
@@ -1238,8 +1236,7 @@ ExecReplace(TupleTableSlot *slot,
12381236
HeapTuple tuple;
12391237
RelationInfo *resultRelationInfo;
12401238
Relation resultRelationDesc;
1241-
ItemPointerData ctid,
1242-
oldtid;
1239+
ItemPointerData ctid;
12431240
int result;
12441241
int numIndices;
12451242

@@ -1321,13 +1318,14 @@ lreplace:;
13211318
elog(ERROR, "Can't serialize access due to concurrent update");
13221319
else if (!(ItemPointerEquals(tupleid, &ctid)))
13231320
{
1324-
TupleTableSlot *slot = EvalPlanQual(estate,
1321+
TupleTableSlot *epqslot = EvalPlanQual(estate,
13251322
resultRelationInfo->ri_RangeTableIndex, &ctid);
13261323

1327-
if (!TupIsNull(slot))
1324+
if (!TupIsNull(epqslot))
13281325
{
1329-
tupleid = &oldtid;
13301326
*tupleid = ctid;
1327+
tuple = ExecRemoveJunk(estate->es_junkFilter, epqslot);
1328+
slot = ExecStoreTuple(tuple, slot, InvalidBuffer, true);
13311329
goto lreplace;
13321330
}
13331331
}

0 commit comments

Comments
 (0)