code optimization

This commit is contained in:
Cary Xu 2021-08-03 17:52:39 +08:00
parent f0b2063f6b
commit e200a7af6d
2 changed files with 1 additions and 8 deletions

View File

@ -43,8 +43,6 @@ struct SSqlInfo;
typedef void (*__async_cb_func_t)(void *param, TAOS_RES *tres, int32_t numOfRows);
#define __5221_BRANCH__
typedef struct SNewVgroupInfo {
int32_t vgId;
int8_t inUse;
@ -519,10 +517,8 @@ int16_t getNewResColId(SSqlCmd* pCmd);
int32_t schemaIdxCompar(const void *lhs, const void *rhs);
int32_t boundIdxCompar(const void *lhs, const void *rhs);
static FORCE_INLINE int32_t getExtendedRowSize(STableDataBlocks *pBlock) {
#ifdef __5221_BRANCH__
ASSERT(pBlock->rowSize == pBlock->pTableMeta->tableInfo.rowSize);
#endif
return pBlock->pTableMeta->tableInfo.rowSize + TD_MEM_ROW_DATA_HEAD_SIZE + pBlock->boundColumnInfo.extendedVarLen;
return pBlock->rowSize + TD_MEM_ROW_DATA_HEAD_SIZE + pBlock->boundColumnInfo.extendedVarLen;
}
static FORCE_INLINE void checkAndConvertMemRow(SMemRow row, int32_t dataLen, int32_t kvLen) {

View File

@ -43,9 +43,7 @@ static int32_t parseBoundColumns(SInsertStatementParam *pInsertParam, SParsedDat
char *str, char **end);
int initMemRowBuilder(SMemRowBuilder *pBuilder, uint32_t nRows, uint32_t nCols, uint32_t nBoundCols,
int32_t allNullLen) {
#ifdef __5221_BRANCH__
ASSERT(nRows >= 0 && nCols > 0 && (nBoundCols <= nCols));
#endif
if (nRows > 0) {
// already init(bind multiple rows by single column)
if (pBuilder->compareStat == ROW_COMPARE_NEED && (pBuilder->rowInfo != NULL)) {
@ -96,7 +94,6 @@ int initMemRowBuilder(SMemRowBuilder *pBuilder, uint32_t nRows, uint3
return TSDB_CODE_SUCCESS;
}
int tsParseTime(SStrToken *pToken, int64_t *time, char **next, char *error, int16_t timePrec) {
int32_t index = 0;
SStrToken sToken;