This commit is contained in:
hzcheng 2020-04-26 17:32:32 +08:00
parent 5b3bd9ddc1
commit 7fafd24ef6
1 changed files with 2 additions and 1 deletions

View File

@ -50,7 +50,8 @@ int tdSchemaAddCol(STSchema *pSchema, int8_t type, int16_t colId, int32_t bytes)
if (pSchema->numOfCols == 0) {
colSetOffset(pCol, 0);
} else {
colSetOffset(pCol, pSchema->columns[pSchema->numOfCols - 1].offset + TYPE_BYTES[type]);
STColumn *pTCol = pSchema->columns + pSchema->numOfCols - 1;
colSetOffset(pCol, pTCol->offset + TYPE_BYTES[pTCol->type]);
}
switch (type) {
case TSDB_DATA_TYPE_BINARY: