TD-12696 bug fix for insert
This commit is contained in:
parent
5f56779347
commit
c426ae8383
|
@ -126,7 +126,7 @@ static FORCE_INLINE void getMemRowAppendInfo(SSchema *pSchema, uint8_t memRowTyp
|
|||
int32_t idx, int32_t *toffset) {
|
||||
int32_t schemaIdx = 0;
|
||||
if (IS_DATA_COL_ORDERED(spd)) {
|
||||
schemaIdx = spd->boundedColumns[idx];
|
||||
schemaIdx = spd->boundedColumns[idx] - 1;
|
||||
if (isDataRowT(memRowType)) {
|
||||
*toffset = (spd->cols + schemaIdx)->toffset; // the offset of firstPart
|
||||
} else {
|
||||
|
|
|
@ -425,7 +425,7 @@ static int parseOneRow(SInsertParseContext* pCxt, STableDataBlocks* pDataBlocks,
|
|||
// 1. set the parsed value from sql string
|
||||
for (int i = 0; i < spd->numOfBound; ++i) {
|
||||
NEXT_TOKEN(pCxt->pSql, sToken);
|
||||
SSchema *pSchema = &schema[spd->boundedColumns[i]];
|
||||
SSchema *pSchema = &schema[spd->boundedColumns[i] - 1];
|
||||
param.schema = pSchema;
|
||||
param.compareStat = pBuilder->compareStat;
|
||||
getMemRowAppendInfo(schema, pBuilder->memRowType, spd, i, ¶m.toffset);
|
||||
|
|
Loading…
Reference in New Issue