aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeHashjoin.c
diff options
context:
space:
mode:
authorVadim B. Mikheev <vadim4o@yahoo.com>1998-11-27 19:52:36 +0000
committerVadim B. Mikheev <vadim4o@yahoo.com>1998-11-27 19:52:36 +0000
commit6beba218d7f6f764e946751df6dc0d0180da05fa (patch)
tree2801029d61d798d6150bb43a24561a4615aedb8b /src/backend/executor/nodeHashjoin.c
parent2435c7d501b0a3129f6fc597a9c85863541cd596 (diff)
downloadpostgresql-6beba218d7f6f764e946751df6dc0d0180da05fa.tar.gz
postgresql-6beba218d7f6f764e946751df6dc0d0180da05fa.zip
New HeapTuple structure/interface.
Diffstat (limited to 'src/backend/executor/nodeHashjoin.c')
-rw-r--r--src/backend/executor/nodeHashjoin.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c
index deef8895224..4673d92ce31 100644
--- a/src/backend/executor/nodeHashjoin.c
+++ b/src/backend/executor/nodeHashjoin.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.13 1998/09/01 04:28:31 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.14 1998/11/27 19:52:02 vadim Exp $
*
*-------------------------------------------------------------------------
*/
@@ -646,7 +646,10 @@ ExecHashJoinGetSavedTuple(HashJoinState *hjstate,
(*position) = bufstart;
}
heapTuple = (HeapTuple) (*position);
- (*position) = (char *) LONGALIGN(*position + heapTuple->t_len);
+ heapTuple->t_data = (HeapTupleHeader)
+ ((char *) heapTuple + HEAPTUPLESIZE);
+ (*position) = (char *) LONGALIGN(*position +
+ heapTuple->t_len + HEAPTUPLESIZE);
return ExecStoreTuple(heapTuple, tupleSlot, InvalidBuffer, false);
}
@@ -824,7 +827,7 @@ ExecHashJoinSaveTuple(HeapTuple heapTuple,
if (position == NULL)
position = pagestart;
- if (position + heapTuple->t_len >= pagebound)
+ if (position + heapTuple->t_len + HEAPTUPLESIZE >= pagebound)
{
cc = FileSeek(file, 0L, SEEK_END);
if (cc < 0)
@@ -836,8 +839,9 @@ ExecHashJoinSaveTuple(HeapTuple heapTuple,
position = pagestart;
*pageend = 0;
}
- memmove(position, heapTuple, heapTuple->t_len);
- position = (char *) LONGALIGN(position + heapTuple->t_len);
+ memmove(position, heapTuple, HEAPTUPLESIZE);
+ memmove(position + HEAPTUPLESIZE, heapTuple->t_data, heapTuple->t_len);
+ position = (char *) LONGALIGN(position + heapTuple->t_len + HEAPTUPLESIZE);
*pageend = position - buffer;
return position;