diff --git a/include/common/tmsg.h b/include/common/tmsg.h index d447f11523..bdb6181884 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -208,11 +208,11 @@ typedef struct { typedef struct SSubmitBlk { int64_t uid; // table unique id int64_t suid; // stable id - int32_t padding; // TODO just for padding here int32_t sversion; // data schema version int32_t dataLen; // data part length, not including the SSubmitBlk head int32_t schemaLen; // schema length, if length is 0, no schema exists int16_t numOfRows; // total number of rows in current submit block + int16_t padding; // TODO just for padding here char data[]; } SSubmitBlk; diff --git a/include/util/tdef.h b/include/util/tdef.h index 655deb4625..6c5208ec00 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -209,7 +209,7 @@ typedef enum ELogicConditionType { #define TSDB_FUNC_TYPE_AGGREGATE 2 #define TSDB_FUNC_MAX_RETRIEVE 1024 -#define TSDB_INDEX_NAME_LEN 33 // 32 + 1 '\0' +#define TSDB_INDEX_NAME_LEN 65 // 64 + 1 '\0' #define TSDB_TYPE_STR_MAX_LEN 32 #define TSDB_TABLE_FNAME_LEN (TSDB_DB_FNAME_LEN + TSDB_TABLE_NAME_LEN + TSDB_NAME_DELIMITER_LEN) #define TSDB_TOPIC_FNAME_LEN TSDB_TABLE_FNAME_LEN diff --git a/source/libs/parser/src/parInsert.c b/source/libs/parser/src/parInsert.c index 398e5abaa6..ed67de17e0 100644 --- a/source/libs/parser/src/parInsert.c +++ b/source/libs/parser/src/parInsert.c @@ -640,7 +640,7 @@ static int32_t parseBoundColumns(SInsertParseContext* pCxt, SParsedDataColInfo* pColList->numOfBound = 0; pColList->boundNullLen = 0; memset(pColList->boundColumns, 0, sizeof(col_id_t) * nCols); - for (int32_t i = 0; i < nCols; ++i) { + for (col_id_t i = 0; i < nCols; ++i) { pColList->cols[i].valStat = VAL_STAT_NONE; } @@ -691,19 +691,19 @@ static int32_t parseBoundColumns(SInsertParseContext* pCxt, SParsedDataColInfo* return TSDB_CODE_TSC_OUT_OF_MEMORY; } SBoundIdxInfo* pColIdx = pColList->colIdxInfo; - for (int16_t i = 0; i < pColList->numOfBound; ++i) { + for (col_id_t i = 0; i < pColList->numOfBound; ++i) { pColIdx[i].schemaColIdx = pColList->boundColumns[i]; pColIdx[i].boundIdx = i; } qsort(pColIdx, pColList->numOfBound, sizeof(SBoundIdxInfo), schemaIdxCompar); - for (int16_t i = 0; i < pColList->numOfBound; ++i) { + for (col_id_t i = 0; i < pColList->numOfBound; ++i) { pColIdx[i].finalIdx = i; } qsort(pColIdx, pColList->numOfBound, sizeof(SBoundIdxInfo), boundIdxCompar); } memset(&pColList->boundColumns[pColList->numOfBound], 0, - sizeof(int16_t) * (pColList->numOfCols - pColList->numOfBound)); + sizeof(col_id_t) * (pColList->numOfCols - pColList->numOfBound)); return TSDB_CODE_SUCCESS; }