Revert "fix ExecEvalFieldStore incorrectly using astore methods to deform ustore tuples."
This reverts commit 3846f82a786cb7e9882b2fc625e11730d44403ba.
This commit is contained in:
@ -5446,24 +5446,9 @@ static Datum ExecEvalFieldStore(FieldStoreState* fstate, ExprContext* econtext,
|
|||||||
* heap_deform_tuple needs a HeapTuple not a bare HeapTupleHeader. We
|
* heap_deform_tuple needs a HeapTuple not a bare HeapTupleHeader. We
|
||||||
* set all the fields in the struct just in case.
|
* set all the fields in the struct just in case.
|
||||||
*/
|
*/
|
||||||
if (GetTableAmType(tupDesc->td_tam_ops) == TAM_USTORE) {
|
|
||||||
UHeapDiskTuple tuphdr;
|
|
||||||
UHeapTupleData tmptup;
|
|
||||||
/* UHeapDiskTuple and HeapTupleHeader have the same layout */
|
|
||||||
tuphdr = (UHeapDiskTuple) DatumGetHeapTupleHeader(tupDatum);
|
|
||||||
tmptup.disk_tuple_size = HeapTupleHeaderGetDatumLength(tuphdr);
|
|
||||||
ItemPointerSetInvalid(&(tmptup.ctid));
|
|
||||||
tmptup.table_oid = InvalidOid;
|
|
||||||
tmptup.t_bucketId = InvalidBktId;
|
|
||||||
#ifdef PGXC
|
|
||||||
tmptup.xc_node_id = 0;
|
|
||||||
#endif
|
|
||||||
HeapTupleSetZeroBase(&tmptup);
|
|
||||||
tmptup.disk_tuple = tuphdr;
|
|
||||||
tableam_tops_deform_tuple(&tmptup, tupDesc, values, isnull);
|
|
||||||
} else {
|
|
||||||
HeapTupleHeader tuphdr;
|
HeapTupleHeader tuphdr;
|
||||||
HeapTupleData tmptup;
|
HeapTupleData tmptup;
|
||||||
|
|
||||||
tuphdr = DatumGetHeapTupleHeader(tupDatum);
|
tuphdr = DatumGetHeapTupleHeader(tupDatum);
|
||||||
tmptup.t_len = HeapTupleHeaderGetDatumLength(tuphdr);
|
tmptup.t_len = HeapTupleHeaderGetDatumLength(tuphdr);
|
||||||
ItemPointerSetInvalid(&(tmptup.t_self));
|
ItemPointerSetInvalid(&(tmptup.t_self));
|
||||||
@ -5474,8 +5459,8 @@ static Datum ExecEvalFieldStore(FieldStoreState* fstate, ExprContext* econtext,
|
|||||||
#endif
|
#endif
|
||||||
HeapTupleSetZeroBase(&tmptup);
|
HeapTupleSetZeroBase(&tmptup);
|
||||||
tmptup.t_data = tuphdr;
|
tmptup.t_data = tuphdr;
|
||||||
|
|
||||||
tableam_tops_deform_tuple(&tmptup, tupDesc, values, isnull);
|
tableam_tops_deform_tuple(&tmptup, tupDesc, values, isnull);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
/* Convert null input tuple into an all-nulls row */
|
/* Convert null input tuple into an all-nulls row */
|
||||||
rc = memset_s(isnull, tupDesc->natts * sizeof(bool), true, tupDesc->natts * sizeof(bool));
|
rc = memset_s(isnull, tupDesc->natts * sizeof(bool), true, tupDesc->natts * sizeof(bool));
|
||||||
|
Reference in New Issue
Block a user