mirror of https://github.com/citusdata/citus.git
Text datums can't be directly accessed via the struct equivalence trick used to access catalogs. That's because, as an optimization, they're sometimes aligned to 1 byte ("text"'s alignment), and sometimes to 4 bytes. That depends on it being a short varlena (cf. VARATT_NOT_PAD_BYTE) or not. In the case at hand here, partkey became longer than 127 characters - the boundary for short varlenas (cf. VARATT_CAN_MAKE_SHORT()). Thus it became 4 byte/int aligned. Which lead to the direct struct access accessing the wrong data. The fix is simply to never access partkey that way - to enforce that, hide partkey ehind the usual ifdef. Fixes: #674 |
||
---|---|---|
.. | ||
citus_clauses.c | ||
citus_nodefuncs.c | ||
citus_outfuncs.c | ||
citus_read.c | ||
citus_readfuncs_95.c | ||
citus_ruleutils.c | ||
connection_cache.c | ||
listutils.c | ||
metadata_cache.c | ||
multi_resowner.c | ||
resource_lock.c | ||
ruleutils_95.c | ||
shardinterval_utils.c |