code optimization
This commit is contained in:
parent
f0b2063f6b
commit
e200a7af6d
|
@ -43,8 +43,6 @@ struct SSqlInfo;
|
||||||
|
|
||||||
typedef void (*__async_cb_func_t)(void *param, TAOS_RES *tres, int32_t numOfRows);
|
typedef void (*__async_cb_func_t)(void *param, TAOS_RES *tres, int32_t numOfRows);
|
||||||
|
|
||||||
#define __5221_BRANCH__
|
|
||||||
|
|
||||||
typedef struct SNewVgroupInfo {
|
typedef struct SNewVgroupInfo {
|
||||||
int32_t vgId;
|
int32_t vgId;
|
||||||
int8_t inUse;
|
int8_t inUse;
|
||||||
|
@ -519,10 +517,8 @@ int16_t getNewResColId(SSqlCmd* pCmd);
|
||||||
int32_t schemaIdxCompar(const void *lhs, const void *rhs);
|
int32_t schemaIdxCompar(const void *lhs, const void *rhs);
|
||||||
int32_t boundIdxCompar(const void *lhs, const void *rhs);
|
int32_t boundIdxCompar(const void *lhs, const void *rhs);
|
||||||
static FORCE_INLINE int32_t getExtendedRowSize(STableDataBlocks *pBlock) {
|
static FORCE_INLINE int32_t getExtendedRowSize(STableDataBlocks *pBlock) {
|
||||||
#ifdef __5221_BRANCH__
|
|
||||||
ASSERT(pBlock->rowSize == pBlock->pTableMeta->tableInfo.rowSize);
|
ASSERT(pBlock->rowSize == pBlock->pTableMeta->tableInfo.rowSize);
|
||||||
#endif
|
return pBlock->rowSize + TD_MEM_ROW_DATA_HEAD_SIZE + pBlock->boundColumnInfo.extendedVarLen;
|
||||||
return pBlock->pTableMeta->tableInfo.rowSize + TD_MEM_ROW_DATA_HEAD_SIZE + pBlock->boundColumnInfo.extendedVarLen;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static FORCE_INLINE void checkAndConvertMemRow(SMemRow row, int32_t dataLen, int32_t kvLen) {
|
static FORCE_INLINE void checkAndConvertMemRow(SMemRow row, int32_t dataLen, int32_t kvLen) {
|
||||||
|
|
|
@ -43,9 +43,7 @@ static int32_t parseBoundColumns(SInsertStatementParam *pInsertParam, SParsedDat
|
||||||
char *str, char **end);
|
char *str, char **end);
|
||||||
int initMemRowBuilder(SMemRowBuilder *pBuilder, uint32_t nRows, uint32_t nCols, uint32_t nBoundCols,
|
int initMemRowBuilder(SMemRowBuilder *pBuilder, uint32_t nRows, uint32_t nCols, uint32_t nBoundCols,
|
||||||
int32_t allNullLen) {
|
int32_t allNullLen) {
|
||||||
#ifdef __5221_BRANCH__
|
|
||||||
ASSERT(nRows >= 0 && nCols > 0 && (nBoundCols <= nCols));
|
ASSERT(nRows >= 0 && nCols > 0 && (nBoundCols <= nCols));
|
||||||
#endif
|
|
||||||
if (nRows > 0) {
|
if (nRows > 0) {
|
||||||
// already init(bind multiple rows by single column)
|
// already init(bind multiple rows by single column)
|
||||||
if (pBuilder->compareStat == ROW_COMPARE_NEED && (pBuilder->rowInfo != NULL)) {
|
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;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int tsParseTime(SStrToken *pToken, int64_t *time, char **next, char *error, int16_t timePrec) {
|
int tsParseTime(SStrToken *pToken, int64_t *time, char **next, char *error, int16_t timePrec) {
|
||||||
int32_t index = 0;
|
int32_t index = 0;
|
||||||
SStrToken sToken;
|
SStrToken sToken;
|
||||||
|
|
Loading…
Reference in New Issue