Merge branch '3.0' into enh/TS-5297-3.0
This commit is contained in:
commit
ffa62193f8
|
@ -39,7 +39,6 @@ typedef void (*_ref_fn_t)(const void *pObj);
|
|||
// set the initial reference count value
|
||||
#define T_REF_INIT_VAL(x, _v) \
|
||||
do { \
|
||||
assert(_v >= 0); \
|
||||
atomic_store_32(&((x)->_ref.val), (_v)); \
|
||||
} while (0)
|
||||
|
||||
|
@ -64,8 +63,6 @@ typedef void (*_ref_fn_t)(const void *pObj);
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
#define T_REF_VAL_CHECK(x) assert((x)->_ref.val >= 0);
|
||||
|
||||
#define T_REF_VAL_GET(x) (x)->_ref.val
|
||||
|
||||
// single writer multiple reader lock
|
||||
|
|
|
@ -933,7 +933,7 @@ void taos_init_imp(void) {
|
|||
appInfo.pInstMapByClusterId =
|
||||
taosHashInit(4, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), true, HASH_ENTRY_LOCK);
|
||||
if (NULL == appInfo.pInstMap || NULL == appInfo.pInstMapByClusterId) {
|
||||
tscError("failed to allocate memory when init appInfo");
|
||||
(void)printf("failed to allocate memory when init appInfo\n");
|
||||
tscInitRes = TSDB_CODE_OUT_OF_MEMORY;
|
||||
return;
|
||||
}
|
||||
|
@ -961,7 +961,7 @@ void taos_init_imp(void) {
|
|||
|
||||
if (InitRegexCache() != 0) {
|
||||
tscInitRes = -1;
|
||||
tscError("failed to init regex cache");
|
||||
(void)printf("failed to init regex cache\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -485,27 +485,27 @@ static int32_t taosLoadCfg(SConfig *pCfg, const char **envCmd, const char *input
|
|||
}
|
||||
|
||||
if ((code = cfgLoad(pCfg, CFG_STYPE_APOLLO_URL, apolloUrl)) != 0) {
|
||||
uError("failed to load from apollo url:%s since %s", apolloUrl, tstrerror(code));
|
||||
(void)printf("failed to load from apollo url:%s since %s\n", apolloUrl, tstrerror(code));
|
||||
TAOS_RETURN(code);
|
||||
}
|
||||
|
||||
if ((code = cfgLoad(pCfg, CFG_STYPE_CFG_FILE, cfgFile)) != 0) {
|
||||
uError("failed to load from cfg file:%s since %s", cfgFile, tstrerror(code));
|
||||
(void)printf("failed to load from cfg file:%s since %s\n", cfgFile, tstrerror(code));
|
||||
TAOS_RETURN(code);
|
||||
}
|
||||
|
||||
if ((code = cfgLoad(pCfg, CFG_STYPE_ENV_FILE, envFile)) != 0) {
|
||||
uError("failed to load from env file:%s since %s", envFile, tstrerror(code));
|
||||
(void)printf("failed to load from env file:%s since %s\n", envFile, tstrerror(code));
|
||||
TAOS_RETURN(code);
|
||||
}
|
||||
|
||||
if ((code = cfgLoad(pCfg, CFG_STYPE_ENV_VAR, NULL)) != 0) {
|
||||
uError("failed to load from global env variables since %s", tstrerror(code));
|
||||
(void)printf("failed to load from global env variables since %s\n", tstrerror(code));
|
||||
TAOS_RETURN(code);
|
||||
}
|
||||
|
||||
if ((code = cfgLoad(pCfg, CFG_STYPE_ENV_CMD, envCmd)) != 0) {
|
||||
uError("failed to load from cmd env variables since %s", tstrerror(code));
|
||||
(void)printf("failed to load from cmd env variables since %s\n", tstrerror(code));
|
||||
TAOS_RETURN(code);
|
||||
}
|
||||
|
||||
|
@ -1648,12 +1648,12 @@ int32_t taosCreateLog(const char *logname, int32_t logFileNum, const char *cfgDi
|
|||
}
|
||||
|
||||
if ((code = taosLoadCfg(pCfg, envCmd, cfgDir, envFile, apolloUrl)) != TSDB_CODE_SUCCESS) {
|
||||
printf("failed to load cfg since %s\n", tstrerror(code));
|
||||
(void)printf("failed to load cfg since %s\n", tstrerror(code));
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
if ((code = cfgLoadFromArray(pCfg, pArgs)) != TSDB_CODE_SUCCESS) {
|
||||
printf("failed to load cfg from array since %s\n", tstrerror(code));
|
||||
(void)printf("failed to load cfg from array since %s\n", tstrerror(code));
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
|
@ -1669,18 +1669,18 @@ int32_t taosCreateLog(const char *logname, int32_t logFileNum, const char *cfgDi
|
|||
TAOS_CHECK_GOTO(taosSetAllDebugFlag(pCfg, pDebugItem->i32), &lino, _exit);
|
||||
|
||||
if ((code = taosMulModeMkDir(tsLogDir, 0777, true)) != TSDB_CODE_SUCCESS) {
|
||||
printf("failed to create dir:%s since %s\n", tsLogDir, tstrerror(code));
|
||||
(void)printf("failed to create dir:%s since %s\n", tsLogDir, tstrerror(code));
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
if ((code = taosInitLog(logname, logFileNum, tsc)) != 0) {
|
||||
printf("failed to init log file since %s\n", tstrerror(code));
|
||||
(void)printf("failed to init log file since %s\n", tstrerror(code));
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
_exit:
|
||||
if (TSDB_CODE_SUCCESS != code) {
|
||||
printf("failed to create log at %d since %s:", lino, tstrerror(code));
|
||||
(void)printf("failed to create log at %d since %s\n", lino, tstrerror(code));
|
||||
}
|
||||
|
||||
cfgCleanup(pCfg);
|
||||
|
@ -1700,12 +1700,12 @@ int32_t taosReadDataFolder(const char *cfgDir, const char **envCmd, const char *
|
|||
TAOS_CHECK_GOTO(cfgAddInt32(pCfg, "dDebugFlag", dDebugFlag, 0, 255, CFG_SCOPE_SERVER, CFG_DYN_SERVER) ,NULL, _exit);
|
||||
|
||||
if ((code = taosLoadCfg(pCfg, envCmd, cfgDir, envFile, apolloUrl)) != 0) {
|
||||
printf("failed to load cfg since %s\n", tstrerror(code));
|
||||
(void)printf("failed to load cfg since %s\n", tstrerror(code));
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
if ((code = cfgLoadFromArray(pCfg, pArgs)) != 0) {
|
||||
printf("failed to load cfg from array since %s\n", tstrerror(code));
|
||||
(void)printf("failed to load cfg from array since %s\n", tstrerror(code));
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
|
@ -1769,14 +1769,14 @@ int32_t taosInitCfg(const char *cfgDir, const char **envCmd, const char *envFile
|
|||
TAOS_CHECK_GOTO(taosAddSystemCfg(tsCfg), &lino, _exit);
|
||||
|
||||
if ((code = taosLoadCfg(tsCfg, envCmd, cfgDir, envFile, apolloUrl)) != 0) {
|
||||
uError("failed to load cfg since %s", tstrerror(code));
|
||||
(void)printf("failed to load cfg since %s\n", tstrerror(code));
|
||||
cfgCleanup(tsCfg);
|
||||
tsCfg = NULL;
|
||||
TAOS_RETURN(code);
|
||||
}
|
||||
|
||||
if ((code = cfgLoadFromArray(tsCfg, pArgs)) != 0) {
|
||||
uError("failed to load cfg from array since %s", tstrerror(code));
|
||||
(void)printf("failed to load cfg from array since %s\n", tstrerror(code));
|
||||
cfgCleanup(tsCfg);
|
||||
tsCfg = NULL;
|
||||
TAOS_RETURN(code);
|
||||
|
@ -1798,7 +1798,7 @@ int32_t taosInitCfg(const char *cfgDir, const char **envCmd, const char *envFile
|
|||
|
||||
SConfigItem *pItem = cfgGetItem(tsCfg, "debugFlag");
|
||||
if (NULL == pItem) {
|
||||
uError("debugFlag not found in cfg");
|
||||
(void)printf("debugFlag not found in cfg\n");
|
||||
TAOS_RETURN(TSDB_CODE_CFG_NOT_FOUND);
|
||||
}
|
||||
TAOS_CHECK_GOTO(taosSetAllDebugFlag(tsCfg, pItem->i32), &lino, _exit);
|
||||
|
@ -1811,7 +1811,7 @@ _exit:
|
|||
if (TSDB_CODE_SUCCESS != code) {
|
||||
cfgCleanup(tsCfg);
|
||||
tsCfg = NULL;
|
||||
uError("failed to init cfg at %d since %s", lino, tstrerror(code));
|
||||
(void)printf("failed to init cfg at %d since %s\n", lino, tstrerror(code));
|
||||
}
|
||||
|
||||
TAOS_RETURN(code);
|
||||
|
|
|
@ -1316,7 +1316,7 @@ static int32_t mndRetrieveArbGroups(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock
|
|||
|
||||
static void mndCancelGetNextArbGroup(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_ARBGROUP);
|
||||
}
|
||||
|
||||
int32_t mndGetArbGroupSize(SMnode *pMnode) {
|
||||
|
|
|
@ -346,7 +346,7 @@ _OVER:
|
|||
|
||||
static void mndCancelGetNextCluster(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_CLUSTER);
|
||||
}
|
||||
|
||||
static int32_t mndProcessUptimeTimer(SRpcMsg *pReq) {
|
||||
|
|
|
@ -1003,7 +1003,7 @@ END:
|
|||
|
||||
static void mndCancelGetNextConsumer(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_CONSUMER);
|
||||
}
|
||||
|
||||
const char *mndConsumerStatusName(int status) {
|
||||
|
|
|
@ -2522,5 +2522,5 @@ static int32_t mndRetrieveDbs(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBloc
|
|||
|
||||
static void mndCancelGetNextDb(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_DB);
|
||||
}
|
||||
|
|
|
@ -1814,7 +1814,7 @@ static int32_t mndRetrieveDnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
|||
|
||||
static void mndCancelGetNextDnode(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_DNODE);
|
||||
}
|
||||
|
||||
// get int32_t value from 'SMCfgDnodeReq'
|
||||
|
|
|
@ -719,5 +719,5 @@ static int32_t mndRetrieveFuncs(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl
|
|||
|
||||
static void mndCancelGetNextFunc(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_FUNC);
|
||||
}
|
||||
|
|
|
@ -935,7 +935,7 @@ _out:
|
|||
|
||||
static void mndCancelGetNextMnode(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_MNODE);
|
||||
}
|
||||
|
||||
static int32_t mndProcessAlterMnodeReq(SRpcMsg *pReq) {
|
||||
|
|
|
@ -582,5 +582,5 @@ static int32_t mndRetrieveQnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
|||
|
||||
static void mndCancelGetNextQnode(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_QNODE);
|
||||
}
|
||||
|
|
|
@ -1520,7 +1520,7 @@ static void mndCancelRetrieveIdx(SMnode *pMnode, void *pIter) {
|
|||
SSmaAndTagIter *p = pIter;
|
||||
if (p != NULL) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, p->pSmaIter);
|
||||
sdbCancelFetchByType(pSdb, p->pSmaIter, SDB_SMA);
|
||||
sdbCancelFetchByType(pSdb, p->pIdxIter, SDB_IDX);
|
||||
}
|
||||
taosMemoryFree(p);
|
||||
|
@ -2288,7 +2288,7 @@ static void mndCancelRetrieveTSMA(SMnode *pMnode, void *pIter) {
|
|||
SSmaAndTagIter *p = pIter;
|
||||
if (p != NULL) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, p->pSmaIter);
|
||||
sdbCancelFetchByType(pSdb, p->pSmaIter, SDB_SMA);
|
||||
}
|
||||
taosMemoryFree(p);
|
||||
}
|
||||
|
|
|
@ -504,5 +504,5 @@ static int32_t mndRetrieveSnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
|||
|
||||
static void mndCancelGetNextSnode(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_SNODE);
|
||||
}
|
||||
|
|
|
@ -3832,7 +3832,7 @@ static int32_t mndRetrieveStbCol(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
|||
|
||||
static void mndCancelGetNextStb(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_STB);
|
||||
}
|
||||
|
||||
const char *mndGetStbStr(const char *src) {
|
||||
|
|
|
@ -1651,7 +1651,7 @@ static int32_t mndRetrieveStream(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
|||
|
||||
static void mndCancelGetNextStream(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_STREAM);
|
||||
}
|
||||
|
||||
static int32_t mndRetrieveStreamTask(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int32_t rowsCapacity) {
|
||||
|
@ -1723,7 +1723,7 @@ static int32_t mndRetrieveStreamTask(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock
|
|||
|
||||
static void mndCancelGetNextStreamTask(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_STREAM);
|
||||
}
|
||||
|
||||
static int32_t mndProcessPauseStreamReq(SRpcMsg *pReq) {
|
||||
|
|
|
@ -1484,5 +1484,5 @@ END:
|
|||
|
||||
void mndCancelGetNextSubscribe(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_SUBSCRIBE);
|
||||
}
|
||||
|
|
|
@ -934,7 +934,7 @@ END:
|
|||
|
||||
static void mndCancelGetNextTopic(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_TOPIC);
|
||||
}
|
||||
|
||||
bool mndTopicExistsForDb(SMnode *pMnode, SDbObj *pDb) {
|
||||
|
|
|
@ -1997,5 +1997,5 @@ static int32_t mndRetrieveTrans(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl
|
|||
|
||||
static void mndCancelGetNextTrans(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_TRANS);
|
||||
}
|
||||
|
|
|
@ -2772,7 +2772,7 @@ _exit:
|
|||
|
||||
static void mndCancelGetNextUser(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_USER);
|
||||
}
|
||||
|
||||
static int32_t mndLoopHash(SHashObj *hash, char *priType, SSDataBlock *pBlock, int32_t *pNumOfRows, SSdb *pSdb,
|
||||
|
@ -3124,7 +3124,7 @@ _exit:
|
|||
|
||||
static void mndCancelGetNextPrivileges(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_USER);
|
||||
}
|
||||
|
||||
int32_t mndValidateUserAuthInfo(SMnode *pMnode, SUserAuthVersion *pUsers, int32_t numOfUses, void **ppRsp,
|
||||
|
|
|
@ -1077,7 +1077,7 @@ static int32_t mndRetrieveVgroups(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *p
|
|||
|
||||
static void mndCancelGetNextVgroup(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_VGROUP);
|
||||
}
|
||||
|
||||
static bool mndGetVnodesNumFp(SMnode *pMnode, void *pObj, void *p1, void *p2, void *p3) {
|
||||
|
@ -1212,7 +1212,7 @@ static int32_t mndRetrieveVnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
|
|||
|
||||
static void mndCancelGetNextVnode(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_VGROUP);
|
||||
}
|
||||
|
||||
static int32_t mndAddVnodeToVgroup(SMnode *pMnode, STrans *pTrans, SVgObj *pVgroup, SArray *pArray) {
|
||||
|
|
|
@ -99,5 +99,5 @@ int32_t mndRetrieveView(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBlock, int
|
|||
|
||||
void mndCancelGetNextView(SMnode *pMnode, void *pIter) {
|
||||
SSdb *pSdb = pMnode->pSdb;
|
||||
sdbCancelFetch(pSdb, pIter);
|
||||
sdbCancelFetchByType(pSdb, pIter, SDB_VIEW);
|
||||
}
|
||||
|
|
|
@ -242,7 +242,12 @@ static int32_t sdbDeleteRow(SSdb *pSdb, SHashObj *hash, SSdbRaw *pRaw, SSdbRow *
|
|||
(void)atomic_add_fetch_32(&pOldRow->refCount, 1);
|
||||
sdbPrintOper(pSdb, pOldRow, "delete");
|
||||
|
||||
TAOS_CHECK_RETURN(taosHashRemove(hash, pOldRow->pObj, keySize));
|
||||
if (taosHashRemove(hash, pOldRow->pObj, keySize) != 0) {
|
||||
sdbUnLock(pSdb, type);
|
||||
sdbFreeRow(pSdb, pRow, false);
|
||||
terrno = TSDB_CODE_SDB_OBJ_NOT_THERE;
|
||||
return terrno;
|
||||
}
|
||||
pSdb->tableVer[pOldRow->type]++;
|
||||
sdbUnLock(pSdb, type);
|
||||
|
||||
|
|
|
@ -2258,6 +2258,7 @@ static int32_t lastIterOpen(SFSLastIter *iter, STFileSet *pFileSet, STsdb *pTsdb
|
|||
int32_t code = 0;
|
||||
destroySttBlockReader(pr->pLDataIterArray, NULL);
|
||||
pr->pLDataIterArray = taosArrayInit(4, POINTER_BYTES);
|
||||
if (pr->pLDataIterArray == NULL) return terrno;
|
||||
|
||||
SMergeTreeConf conf = {
|
||||
.uid = uid,
|
||||
|
|
|
@ -723,6 +723,7 @@ static int32_t loadFileBlockBrinInfo(STsdbReader* pReader, SArray* pIndexList, S
|
|||
while (1) {
|
||||
int32_t code = getNextBrinRecord(&iter, &pRecord);
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
clearBrinBlockIter(&iter);
|
||||
return code;
|
||||
}
|
||||
|
||||
|
@ -757,12 +758,14 @@ static int32_t loadFileBlockBrinInfo(STsdbReader* pReader, SArray* pIndexList, S
|
|||
|
||||
if (!(pRecord->suid == pReader->info.suid && uid == pRecord->uid)) {
|
||||
tsdbError("tsdb failed at: %s:%d", __func__, __LINE__);
|
||||
clearBrinBlockIter(&iter);
|
||||
return TSDB_CODE_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
STableBlockScanInfo* pScanInfo = NULL;
|
||||
code = getTableBlockScanInfo(pReader->status.pTableMap, uid, &pScanInfo, pReader->idStr);
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
clearBrinBlockIter(&iter);
|
||||
return code;
|
||||
}
|
||||
|
||||
|
@ -807,6 +810,7 @@ static int32_t loadFileBlockBrinInfo(STsdbReader* pReader, SArray* pIndexList, S
|
|||
if (pScanInfo->pBlockList == NULL) {
|
||||
pScanInfo->pBlockList = taosArrayInit(4, sizeof(SFileDataBlockInfo));
|
||||
if (pScanInfo->pBlockList == NULL) {
|
||||
clearBrinBlockIter(&iter);
|
||||
return TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
|
@ -814,6 +818,7 @@ static int32_t loadFileBlockBrinInfo(STsdbReader* pReader, SArray* pIndexList, S
|
|||
if (pScanInfo->pBlockIdxList == NULL) {
|
||||
pScanInfo->pBlockIdxList = taosArrayInit(4, sizeof(STableDataBlockIdx));
|
||||
if (pScanInfo->pBlockIdxList == NULL) {
|
||||
clearBrinBlockIter(&iter);
|
||||
return TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
|
@ -822,6 +827,7 @@ static int32_t loadFileBlockBrinInfo(STsdbReader* pReader, SArray* pIndexList, S
|
|||
recordToBlockInfo(&blockInfo, pRecord);
|
||||
void* p1 = taosArrayPush(pScanInfo->pBlockList, &blockInfo);
|
||||
if (p1 == NULL) {
|
||||
clearBrinBlockIter(&iter);
|
||||
return TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
|
@ -840,6 +846,7 @@ static int32_t loadFileBlockBrinInfo(STsdbReader* pReader, SArray* pIndexList, S
|
|||
} else {
|
||||
STableBlockScanInfo** p = taosArrayGetLast(pTableScanInfoList);
|
||||
if (p == NULL) {
|
||||
clearBrinBlockIter(&iter);
|
||||
return TSDB_CODE_INVALID_PARA;
|
||||
}
|
||||
|
||||
|
@ -849,6 +856,7 @@ static int32_t loadFileBlockBrinInfo(STsdbReader* pReader, SArray* pIndexList, S
|
|||
}
|
||||
|
||||
if (p1 == NULL) {
|
||||
clearBrinBlockIter(&iter);
|
||||
return TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -254,17 +254,17 @@ static int32_t getSortedBlockData(SSortHandle* pHandle, SSDataBlock* pDataBlock,
|
|||
SSortOperatorInfo* pInfo, SSDataBlock** pResBlock) {
|
||||
QRY_OPTR_CHECK(pResBlock);
|
||||
blockDataCleanup(pDataBlock);
|
||||
int32_t lino = 0;
|
||||
int32_t code = 0;
|
||||
|
||||
SSDataBlock* p = NULL;
|
||||
int32_t code = tsortGetSortedDataBlock(pHandle, &p);
|
||||
code = tsortGetSortedDataBlock(pHandle, &p);
|
||||
if (p == NULL || (code != 0)) {
|
||||
return code;
|
||||
}
|
||||
|
||||
code = blockDataEnsureCapacity(p, capacity);
|
||||
if (code) {
|
||||
return code;
|
||||
}
|
||||
QUERY_CHECK_CODE(code, lino, _error);
|
||||
|
||||
STupleHandle* pTupleHandle;
|
||||
while (1) {
|
||||
|
@ -273,51 +273,40 @@ static int32_t getSortedBlockData(SSortHandle* pHandle, SSDataBlock* pDataBlock,
|
|||
} else {
|
||||
code = tsortNextTuple(pHandle, &pTupleHandle);
|
||||
}
|
||||
|
||||
if (pTupleHandle == NULL || code != 0) {
|
||||
lino = __LINE__;
|
||||
break;
|
||||
}
|
||||
|
||||
code = appendOneRowToDataBlock(p, pTupleHandle);
|
||||
if (code) {
|
||||
return code;
|
||||
}
|
||||
QUERY_CHECK_CODE(code, lino, _error);
|
||||
|
||||
if (p->info.rows >= capacity) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (TSDB_CODE_SUCCESS != code) {
|
||||
return code;
|
||||
}
|
||||
|
||||
QUERY_CHECK_CODE(code, lino, _error);
|
||||
|
||||
if (p->info.rows > 0) {
|
||||
code = blockDataEnsureCapacity(pDataBlock, capacity);
|
||||
if (code) {
|
||||
return code;
|
||||
}
|
||||
QUERY_CHECK_CODE(code, lino, _error);
|
||||
|
||||
// todo extract function to handle this
|
||||
int32_t numOfCols = taosArrayGetSize(pColMatchInfo);
|
||||
for (int32_t i = 0; i < numOfCols; ++i) {
|
||||
SColMatchItem* pmInfo = taosArrayGet(pColMatchInfo, i);
|
||||
if (pmInfo == NULL) {
|
||||
return terrno;
|
||||
}
|
||||
QUERY_CHECK_NULL(pmInfo, code, lino, _error, terrno);
|
||||
|
||||
SColumnInfoData* pSrc = taosArrayGet(p->pDataBlock, pmInfo->srcSlotId);
|
||||
if (pSrc == NULL) {
|
||||
return terrno;
|
||||
}
|
||||
QUERY_CHECK_NULL(pSrc, code, lino, _error, terrno);
|
||||
|
||||
SColumnInfoData* pDst = taosArrayGet(pDataBlock->pDataBlock, pmInfo->dstSlotId);
|
||||
if (pDst == NULL) {
|
||||
return terrno;
|
||||
}
|
||||
QUERY_CHECK_NULL(pDst, code, lino, _error, terrno);
|
||||
|
||||
code = colDataAssign(pDst, pSrc, p->info.rows, &pDataBlock->info);
|
||||
if (code) {
|
||||
return code;
|
||||
}
|
||||
QUERY_CHECK_CODE(code, lino, _error);
|
||||
}
|
||||
|
||||
pDataBlock->info.dataLoad = 1;
|
||||
|
@ -329,6 +318,12 @@ static int32_t getSortedBlockData(SSortHandle* pHandle, SSDataBlock* pDataBlock,
|
|||
blockDataDestroy(p);
|
||||
*pResBlock = (pDataBlock->info.rows > 0) ? pDataBlock : NULL;
|
||||
return code;
|
||||
|
||||
_error:
|
||||
qError("%s failed at line %d since %s", __func__, __LINE__, tstrerror(code));
|
||||
|
||||
blockDataDestroy(p);
|
||||
return code;
|
||||
}
|
||||
|
||||
int32_t loadNextDataBlock(void* param, SSDataBlock** ppBlock) {
|
||||
|
@ -384,13 +379,13 @@ int32_t doOpenSortOperator(SOperatorInfo* pOperator) {
|
|||
|
||||
code = tsortOpen(pInfo->pSortHandle);
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
T_LONG_JMP(pTaskInfo->env, code);
|
||||
pTaskInfo->code = code;
|
||||
} else {
|
||||
pOperator->cost.openCost = (taosGetTimestampUs() - pInfo->startTs) / 1000.0;
|
||||
pOperator->status = OP_RES_TO_RETURN;
|
||||
OPTR_SET_OPENED(pOperator);
|
||||
}
|
||||
|
||||
pOperator->cost.openCost = (taosGetTimestampUs() - pInfo->startTs) / 1000.0;
|
||||
pOperator->status = OP_RES_TO_RETURN;
|
||||
|
||||
OPTR_SET_OPENED(pOperator);
|
||||
return code;
|
||||
}
|
||||
|
||||
|
@ -735,6 +730,7 @@ int32_t doGroupSort(SOperatorInfo* pOperator, SSDataBlock** pResBlock) {
|
|||
qError("%s failed at line %d since %s", __func__, __LINE__, tstrerror(code));
|
||||
T_LONG_JMP(pOperator->pTaskInfo->env, code);
|
||||
}
|
||||
|
||||
code = getGroupSortedBlockData(pInfo->pCurrSortHandle, pInfo->binfo.pRes, pOperator->resultInfo.capacity,
|
||||
pInfo->matchInfo.pList, pInfo, &pBlock);
|
||||
if (pBlock != NULL && (code == 0)) {
|
||||
|
|
|
@ -286,23 +286,19 @@ int32_t tsortCreateSortHandle(SArray* pSortInfo, int32_t type, int32_t pageSize,
|
|||
SSDataBlock* pBlock, const char* idstr, uint64_t pqMaxRows, uint32_t pqMaxTupleLength,
|
||||
uint32_t pqSortBufSize, SSortHandle** pHandle) {
|
||||
int32_t code = 0;
|
||||
*pHandle = NULL;
|
||||
int32_t lino = 0;
|
||||
|
||||
QRY_OPTR_CHECK(pHandle);
|
||||
SSortHandle* pSortHandle = taosMemoryCalloc(1, sizeof(SSortHandle));
|
||||
if (pSortHandle == NULL) {
|
||||
return TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
QUERY_CHECK_NULL(pSortHandle, code, lino, _err, terrno);
|
||||
|
||||
pSortHandle->type = type;
|
||||
pSortHandle->pageSize = pageSize;
|
||||
pSortHandle->numOfPages = numOfPages;
|
||||
pSortHandle->pSortInfo = taosArrayDup(pSortInfo, NULL);
|
||||
if (pSortHandle->pSortInfo == NULL) {
|
||||
return terrno;
|
||||
}
|
||||
QUERY_CHECK_NULL(pSortHandle->pSortInfo, code, lino, _err, terrno);
|
||||
|
||||
pSortHandle->loops = 0;
|
||||
|
||||
pSortHandle->pqMaxTupleLength = pqMaxTupleLength;
|
||||
if (pqMaxRows != 0) {
|
||||
pSortHandle->pqSortBufSize = pqSortBufSize;
|
||||
|
@ -312,18 +308,13 @@ int32_t tsortCreateSortHandle(SArray* pSortInfo, int32_t type, int32_t pageSize,
|
|||
pSortHandle->forceUsePQSort = false;
|
||||
if (pBlock != NULL) {
|
||||
code = createOneDataBlock(pBlock, false, &pSortHandle->pDataBlock);
|
||||
if (code) {
|
||||
goto _err;
|
||||
}
|
||||
QUERY_CHECK_CODE(code, lino, _err);
|
||||
}
|
||||
|
||||
pSortHandle->mergeLimit = -1;
|
||||
|
||||
pSortHandle->pOrderedSource = taosArrayInit(4, POINTER_BYTES);
|
||||
if (pSortHandle->pOrderedSource == NULL) {
|
||||
code = terrno;
|
||||
goto _err;
|
||||
}
|
||||
QUERY_CHECK_NULL(pSortHandle->pOrderedSource, code, lino, _err, terrno);
|
||||
|
||||
pSortHandle->cmpParam.orderInfo = pSortInfo;
|
||||
pSortHandle->cmpParam.cmpGroupId = false;
|
||||
|
@ -346,17 +337,17 @@ int32_t tsortCreateSortHandle(SArray* pSortInfo, int32_t type, int32_t pageSize,
|
|||
|
||||
if (idstr != NULL) {
|
||||
pSortHandle->idStr = taosStrdup(idstr);
|
||||
if (pSortHandle->idStr == NULL) {
|
||||
code = TSDB_CODE_OUT_OF_MEMORY;
|
||||
goto _err;
|
||||
}
|
||||
QUERY_CHECK_NULL(pSortHandle->idStr, code, lino, _err, terrno);
|
||||
}
|
||||
|
||||
*pHandle = pSortHandle;
|
||||
return code;
|
||||
|
||||
_err:
|
||||
tsortDestroySortHandle(pSortHandle);
|
||||
qError("%s failed at line %d since %s", __func__, lino, tstrerror(code));
|
||||
if (pSortHandle) {
|
||||
tsortDestroySortHandle(pSortHandle);
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
||||
|
|
|
@ -2426,8 +2426,12 @@ static int32_t translateToIso8601(SFunctionNode* pFunc, char* pErrBuf, int32_t l
|
|||
|
||||
// param1
|
||||
if (numOfParams == 2) {
|
||||
SValueNode* pValue = (SValueNode*)nodesListGetNode(pFunc->pParameterList, 1);
|
||||
|
||||
SNode* pNode = (SNode*)nodesListGetNode(pFunc->pParameterList, 1);
|
||||
if (QUERY_NODE_VALUE != nodeType(pNode)) {
|
||||
return buildFuncErrMsg(pErrBuf, len, TSDB_CODE_FUNC_FUNTION_ERROR, "Not supported timzone format");
|
||||
}
|
||||
|
||||
SValueNode* pValue = (SValueNode*)pNode;
|
||||
if (!validateTimezoneFormat(pValue)) {
|
||||
return buildFuncErrMsg(pErrBuf, len, TSDB_CODE_FUNC_FUNTION_ERROR, "Invalid timzone format");
|
||||
}
|
||||
|
|
|
@ -1089,6 +1089,8 @@ void nodesDestroyNode(SNode* pNode) {
|
|||
if (pStmt->destroyParseFileCxt) {
|
||||
pStmt->destroyParseFileCxt(&pStmt->pParFileCxt);
|
||||
}
|
||||
|
||||
(void)taosCloseFile(&pStmt->fp);
|
||||
break;
|
||||
}
|
||||
case QUERY_NODE_CREATE_DATABASE_STMT:
|
||||
|
|
|
@ -2254,7 +2254,7 @@ static int32_t parseDataFromFileImpl(SInsertParseContext* pCxt, SVnodeModifyOpSt
|
|||
|
||||
static int32_t parseDataFromFile(SInsertParseContext* pCxt, SVnodeModifyOpStmt* pStmt, SToken* pFilePath,
|
||||
SRowsDataContext rowsDataCxt) {
|
||||
char filePathStr[TSDB_FILENAME_LEN] = {0};
|
||||
char filePathStr[PATH_MAX] = {0};
|
||||
if (TK_NK_STRING == pFilePath->type) {
|
||||
(void)trimString(pFilePath->z, pFilePath->n, filePathStr, sizeof(filePathStr));
|
||||
} else {
|
||||
|
|
|
@ -5113,7 +5113,7 @@ int32_t fltOptimizeNodes(SFilterInfo *pInfo, SNode **pNode, SFltTreeStat *pStat)
|
|||
FLT_ERR_JRET(fltSclCollectOperators(*pNode, sclOpList));
|
||||
SArray *colRangeList = taosArrayInit(16, sizeof(SFltSclColumnRange));
|
||||
if (NULL == colRangeList) {
|
||||
FLT_ERR_RET(terrno);
|
||||
FLT_ERR_JRET(terrno);
|
||||
}
|
||||
FLT_ERR_JRET(fltSclProcessCNF(sclOpList, colRangeList));
|
||||
pInfo->sclCtx.fltSclRange = colRangeList;
|
||||
|
|
|
@ -766,6 +766,9 @@ static int32_t tlrtrim(char *input, char *remInput, char *output, int32_t inputT
|
|||
if (remLen == 0 || remLen > orgLen) {
|
||||
(void)memcpy(varDataVal(output), orgStr, orgLen);
|
||||
varDataSetLen(output, orgLen);
|
||||
if (needFree) {
|
||||
taosMemoryFree(remStr);
|
||||
}
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -585,12 +585,18 @@ void getCheckRspStatus(STaskCheckInfo* pInfo, int64_t el, int32_t* numOfReady, i
|
|||
} else { // TASK_DOWNSTREAM_NOT_READY
|
||||
if (p->rspTs == 0) { // not response yet
|
||||
if (el >= CHECK_NOT_RSP_DURATION) { // not receive info for 10 sec.
|
||||
(void)taosArrayPush(pTimeoutList, &p->taskId);
|
||||
void* px = taosArrayPush(pTimeoutList, &p->taskId);
|
||||
if (px == NULL) {
|
||||
stError("s-task:%s failed to record time out task:0x%x", id, p->taskId);
|
||||
}
|
||||
} else { // el < CHECK_NOT_RSP_DURATION
|
||||
(*numOfNotRsp) += 1; // do nothing and continue waiting for their rsp
|
||||
}
|
||||
} else {
|
||||
(void)taosArrayPush(pNotReadyList, &p->taskId);
|
||||
void* px = taosArrayPush(pNotReadyList, &p->taskId);
|
||||
if (px == NULL) {
|
||||
stError("s-task:%s failed to record not ready task:0x%x", id, p->taskId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -973,7 +973,10 @@ void checkpointTriggerMonitorFn(void* param, void* tmrId) {
|
|||
|
||||
if (!recved) { // make sure the inputQ is opened for not recv upstream checkpoint-trigger message
|
||||
streamTaskOpenUpstreamInput(pTask, pInfo->taskId);
|
||||
(void)taosArrayPush(pNotSendList, pInfo);
|
||||
void* px = taosArrayPush(pNotSendList, pInfo);
|
||||
if (px == NULL) {
|
||||
stError("s-task:%s failed to record not send info, code: out of memory", id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -474,7 +474,10 @@ static void addDispatchEntry(SDispatchMsgInfo* pMsgInfo, int32_t nodeId, int64_t
|
|||
streamMutexLock(&pMsgInfo->lock);
|
||||
}
|
||||
|
||||
(void)taosArrayPush(pMsgInfo->pSendInfo, &entry);
|
||||
void* p = taosArrayPush(pMsgInfo->pSendInfo, &entry);
|
||||
if (p == NULL) {
|
||||
stError("failed to add dispatch info");
|
||||
}
|
||||
|
||||
if (lock) {
|
||||
streamMutexUnlock(&pMsgInfo->lock);
|
||||
|
@ -671,8 +674,8 @@ int32_t streamSearchAndAddBlock(SStreamTask* pTask, SStreamDispatchReq* pReqs, S
|
|||
memcpy(bln.parTbName, pDataBlock->info.parTbName, strlen(pDataBlock->info.parTbName));
|
||||
|
||||
// failed to put into name buffer, no need to do anything
|
||||
if (tSimpleHashGetSize(pTask->pNameMap) < MAX_BLOCK_NAME_NUM) {
|
||||
(void)tSimpleHashPut(pTask->pNameMap, &groupId, sizeof(int64_t), &bln, sizeof(SBlockName));
|
||||
if (tSimpleHashGetSize(pTask->pNameMap) < MAX_BLOCK_NAME_NUM) { // allow error, and do nothing
|
||||
int32_t code = tSimpleHashPut(pTask->pNameMap, &groupId, sizeof(int64_t), &bln, sizeof(SBlockName));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -914,9 +917,13 @@ static void checkpointReadyMsgSendMonitorFn(void* param, void* tmrId) {
|
|||
continue;
|
||||
}
|
||||
|
||||
(void)taosArrayPush(pNotRspList, &pInfo->upstreamTaskId);
|
||||
stDebug("s-task:%s vgId:%d level:%d checkpoint-ready rsp from upstream:0x%x not confirmed yet", id, vgId,
|
||||
pTask->info.taskLevel, pInfo->upstreamTaskId);
|
||||
void* p = taosArrayPush(pNotRspList, &pInfo->upstreamTaskId);
|
||||
if (p == NULL) {
|
||||
stError("s-task:%s vgId:%d failed to record not rsp task, code: out of memory", id, vgId);
|
||||
} else {
|
||||
stDebug("s-task:%s vgId:%d level:%d checkpoint-ready rsp from upstream:0x%x not confirmed yet", id, vgId,
|
||||
pTask->info.taskLevel, pInfo->upstreamTaskId);
|
||||
}
|
||||
}
|
||||
|
||||
int32_t checkpointId = pActiveInfo->activeId;
|
||||
|
@ -1100,8 +1107,17 @@ int32_t streamAddBlockIntoDispatchMsg(const SSDataBlock* pBlock, SStreamDispatch
|
|||
|
||||
payloadLen += sizeof(SRetrieveTableRsp);
|
||||
|
||||
(void)taosArrayPush(pReq->dataLen, &payloadLen);
|
||||
(void)taosArrayPush(pReq->data, &buf);
|
||||
void* px = taosArrayPush(pReq->dataLen, &payloadLen);
|
||||
if (px == NULL) {
|
||||
taosMemoryFree(buf);
|
||||
return terrno;
|
||||
}
|
||||
|
||||
px = taosArrayPush(pReq->data, &buf);
|
||||
if (px == NULL) {
|
||||
taosMemoryFree(buf);
|
||||
return terrno;
|
||||
}
|
||||
|
||||
pReq->totalLen += dataStrLen;
|
||||
return 0;
|
||||
|
@ -1221,8 +1237,12 @@ int32_t streamAddCheckpointSourceRspMsg(SStreamCheckpointSourceReq* pReq, SRpcHa
|
|||
pTask->id.idStr, pReady->checkpointId, pReady->transId, pReq->transId, pReq->checkpointId);
|
||||
}
|
||||
} else {
|
||||
(void)taosArrayPush(pActiveInfo->pReadyMsgList, &info);
|
||||
stDebug("s-task:%s add checkpoint source rsp msg, total:%d", pTask->id.idStr, size + 1);
|
||||
void* px = taosArrayPush(pActiveInfo->pReadyMsgList, &info);
|
||||
if (px != NULL) {
|
||||
stDebug("s-task:%s add checkpoint source rsp msg, total:%d", pTask->id.idStr, size + 1);
|
||||
} else {
|
||||
stError("s-task:%s failed to add readyMsg, code: out of memory", pTask->id.idStr);
|
||||
}
|
||||
}
|
||||
|
||||
streamMutexUnlock(&pActiveInfo->lock);
|
||||
|
@ -1259,7 +1279,12 @@ int32_t streamAddCheckpointReadyMsg(SStreamTask* pTask, int32_t upstreamTaskId,
|
|||
SActiveCheckpointInfo* pActiveInfo = pTask->chkInfo.pActiveInfo;
|
||||
|
||||
streamMutexLock(&pActiveInfo->lock);
|
||||
(void)taosArrayPush(pActiveInfo->pReadyMsgList, &info);
|
||||
void* px = taosArrayPush(pActiveInfo->pReadyMsgList, &info);
|
||||
if (px == NULL) {
|
||||
streamMutexUnlock(&pActiveInfo->lock);
|
||||
stError("s-task:%s failed to add readyMsg info, code: out of memory", pTask->id.idStr);
|
||||
return terrno;
|
||||
}
|
||||
|
||||
int32_t numOfRecv = taosArrayGetSize(pActiveInfo->pReadyMsgList);
|
||||
int32_t total = streamTaskGetNumOfUpstream(pTask);
|
||||
|
|
|
@ -845,7 +845,7 @@ int32_t streamMetaUnregisterTask(SStreamMeta* pMeta, int64_t streamId, int32_t t
|
|||
(void)atomic_sub_fetch_32(&pMeta->numOfStreamTasks, 1);
|
||||
}
|
||||
|
||||
(void)taosHashRemove(pMeta->pTasksMap, &id, sizeof(id));
|
||||
int32_t code = taosHashRemove(pMeta->pTasksMap, &id, sizeof(id));
|
||||
doRemoveIdFromList(pMeta->pTaskList, (int32_t)taosArrayGetSize(pMeta->pTaskList), &pTask->id);
|
||||
(void)streamMetaRemoveTask(pMeta, &id);
|
||||
|
||||
|
@ -1013,7 +1013,10 @@ void streamMetaLoadAllTasks(SStreamMeta* pMeta) {
|
|||
tFreeStreamTask(pTask);
|
||||
|
||||
STaskId id = streamTaskGetTaskId(pTask);
|
||||
(void)taosArrayPush(pRecycleList, &id);
|
||||
void* px = taosArrayPush(pRecycleList, &id);
|
||||
if (px == NULL) {
|
||||
stError("s-task:0x%x failed record the task into recycle list due to out of memory", taskId);
|
||||
}
|
||||
|
||||
int32_t total = taosArrayGetSize(pRecycleList);
|
||||
stDebug("s-task:0x%x is already dropped, add into recycle list, total:%d", taskId, total);
|
||||
|
@ -1034,7 +1037,10 @@ void streamMetaLoadAllTasks(SStreamMeta* pMeta) {
|
|||
continue;
|
||||
}
|
||||
|
||||
(void)taosArrayPush(pMeta->pTaskList, &pTask->id);
|
||||
void* px = taosArrayPush(pMeta->pTaskList, &pTask->id);
|
||||
if (px == NULL) {
|
||||
stFatal("s-task:0x%x failed to add into task list due to out of memory", pTask->id.taskId);
|
||||
}
|
||||
} else {
|
||||
// todo this should replace the existed object put by replay creating stream task msg from mnode
|
||||
stError("s-task:0x%x already added into table meta by replaying WAL, need check", pTask->id.taskId);
|
||||
|
@ -1044,7 +1050,7 @@ void streamMetaLoadAllTasks(SStreamMeta* pMeta) {
|
|||
|
||||
if (taosHashPut(pMeta->pTasksMap, &id, sizeof(id), &pTask, POINTER_BYTES) != 0) {
|
||||
stError("s-task:0x%x failed to put into hashTable, code:%s, continue", pTask->id.taskId, tstrerror(terrno));
|
||||
(void)taosArrayPop(pMeta->pTaskList);
|
||||
void* px = taosArrayPop(pMeta->pTaskList);
|
||||
tFreeStreamTask(pTask);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ static int32_t doHandleWaitingEvent(SStreamTaskSM* pSM, const char* pEventName,
|
|||
GET_EVT_NAME(pEvtInfo->event), pSM->current.name);
|
||||
|
||||
// remove it
|
||||
(void) taosArrayPop(pSM->pWaitingEventList);
|
||||
void* px = taosArrayPop(pSM->pWaitingEventList);
|
||||
|
||||
STaskStateTrans* pNextTrans = streamTaskFindTransform(pSM->current.state, pEvtInfo->event);
|
||||
ASSERT(pSM->pActiveTrans == NULL && pNextTrans != NULL);
|
||||
|
|
|
@ -507,6 +507,7 @@ static bool httpFailFastShoudIgnoreMsg(SHashObj* pTable, char* server, int16_t p
|
|||
}
|
||||
}
|
||||
static void httpFailFastMayUpdate(SHashObj* pTable, char* server, int16_t port, int8_t succ) {
|
||||
int32_t code = 0;
|
||||
char buf[256] = {0};
|
||||
sprintf(buf, "%s:%d", server, port);
|
||||
|
||||
|
@ -514,7 +515,9 @@ static void httpFailFastMayUpdate(SHashObj* pTable, char* server, int16_t port,
|
|||
(void)taosHashRemove(pTable, buf, strlen(buf));
|
||||
} else {
|
||||
int32_t st = taosGetTimestampSec();
|
||||
(void)taosHashPut(pTable, buf, strlen(buf), &st, sizeof(st));
|
||||
if ((code = taosHashPut(pTable, buf, strlen(buf), &st, sizeof(st))) != 0) {
|
||||
tError("http-report failed to update conn status, dst:%s, reason:%s", buf, tstrerror(code));
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -332,6 +332,21 @@ static void cliReleaseUnfinishedMsg(SCliConn* conn) {
|
|||
transQueueClear(&conn->cliMsgs);
|
||||
memset(&conn->ctx, 0, sizeof(conn->ctx));
|
||||
}
|
||||
void cliResetTimer(SCliThrd* pThrd, SCliConn* conn) {
|
||||
if (conn->timer) {
|
||||
if (uv_is_active((uv_handle_t*)conn->timer)) {
|
||||
tDebug("%s conn %p stop timer", CONN_GET_INST_LABEL(conn), conn);
|
||||
(void)uv_timer_stop(conn->timer);
|
||||
}
|
||||
if (taosArrayPush(pThrd->timerList, &conn->timer) == NULL) {
|
||||
tError("failed to push timer %p to list, reason:%s", conn->timer, tstrerror(TSDB_CODE_OUT_OF_MEMORY));
|
||||
conn->timer = NULL;
|
||||
return;
|
||||
}
|
||||
conn->timer->data = NULL;
|
||||
conn->timer = NULL;
|
||||
}
|
||||
}
|
||||
bool cliMaySendCachedMsg(SCliConn* conn) {
|
||||
if (!transQueueEmpty(&conn->cliMsgs)) {
|
||||
SCliMsg* pCliMsg = NULL;
|
||||
|
@ -376,15 +391,7 @@ void cliHandleResp(SCliConn* conn) {
|
|||
SCliThrd* pThrd = conn->hostThrd;
|
||||
STrans* pTransInst = pThrd->pTransInst;
|
||||
|
||||
if (conn->timer) {
|
||||
if (uv_is_active((uv_handle_t*)conn->timer)) {
|
||||
tDebug("%s conn %p stop timer", CONN_GET_INST_LABEL(conn), conn);
|
||||
(void)uv_timer_stop(conn->timer);
|
||||
}
|
||||
(void)taosArrayPush(pThrd->timerList, &conn->timer);
|
||||
conn->timer->data = NULL;
|
||||
conn->timer = NULL;
|
||||
}
|
||||
cliResetTimer(pThrd, conn);
|
||||
|
||||
STransMsgHead* pHead = NULL;
|
||||
|
||||
|
@ -593,8 +600,8 @@ void cliConnTimeout(uv_timer_t* handle) {
|
|||
|
||||
(void)uv_timer_stop(handle);
|
||||
handle->data = NULL;
|
||||
(void)taosArrayPush(pThrd->timerList, &conn->timer);
|
||||
conn->timer = NULL;
|
||||
|
||||
cliResetTimer(pThrd, conn);
|
||||
|
||||
cliMayUpdateFqdnCache(pThrd->fqdn2ipCache, conn->dstAddr);
|
||||
cliHandleFastFail(conn, UV_ECANCELED);
|
||||
|
@ -643,13 +650,16 @@ void* destroyConnPool(SCliThrd* pThrd) {
|
|||
}
|
||||
|
||||
static SCliConn* getConnFromPool(SCliThrd* pThrd, char* key, bool* exceed) {
|
||||
int32_t code = 0;
|
||||
void* pool = pThrd->pool;
|
||||
STrans* pTranInst = pThrd->pTransInst;
|
||||
size_t klen = strlen(key);
|
||||
SConnList* plist = taosHashGet((SHashObj*)pool, key, klen);
|
||||
if (plist == NULL) {
|
||||
SConnList list = {0};
|
||||
(void)taosHashPut((SHashObj*)pool, key, klen, (void*)&list, sizeof(list));
|
||||
if ((code = taosHashPut((SHashObj*)pool, key, klen, (void*)&list, sizeof(list))) != 0) {
|
||||
return NULL;
|
||||
}
|
||||
plist = taosHashGet(pool, key, klen);
|
||||
|
||||
SMsgList* nList = taosMemoryCalloc(1, sizeof(SMsgList));
|
||||
|
@ -686,13 +696,17 @@ static SCliConn* getConnFromPool(SCliThrd* pThrd, char* key, bool* exceed) {
|
|||
}
|
||||
|
||||
static SCliConn* getConnFromPool2(SCliThrd* pThrd, char* key, SCliMsg** pMsg) {
|
||||
int32_t code = 0;
|
||||
void* pool = pThrd->pool;
|
||||
STrans* pTransInst = pThrd->pTransInst;
|
||||
size_t klen = strlen(key);
|
||||
SConnList* plist = taosHashGet((SHashObj*)pool, key, klen);
|
||||
if (plist == NULL) {
|
||||
SConnList list = {0};
|
||||
(void)taosHashPut((SHashObj*)pool, key, klen, (void*)&list, sizeof(list));
|
||||
if ((code = taosHashPut((SHashObj*)pool, key, klen, (void*)&list, sizeof(list))) != 0) {
|
||||
tError("failed to put key %s to pool, reason:%s", key, tstrerror(code));
|
||||
return NULL;
|
||||
}
|
||||
plist = taosHashGet(pool, key, klen);
|
||||
|
||||
SMsgList* nList = taosMemoryCalloc(1, sizeof(SMsgList));
|
||||
|
@ -805,12 +819,8 @@ static void addConnToPool(void* pool, SCliConn* conn) {
|
|||
}
|
||||
|
||||
SCliThrd* thrd = conn->hostThrd;
|
||||
if (conn->timer != NULL) {
|
||||
(void)uv_timer_stop(conn->timer);
|
||||
(void)taosArrayPush(thrd->timerList, &conn->timer);
|
||||
conn->timer->data = NULL;
|
||||
conn->timer = NULL;
|
||||
}
|
||||
cliResetTimer(thrd, conn);
|
||||
|
||||
if (T_REF_VAL_GET(conn) > 1) {
|
||||
transUnrefCliHandle(conn);
|
||||
}
|
||||
|
@ -1053,12 +1063,7 @@ static void cliDestroyConn(SCliConn* conn, bool clear) {
|
|||
transDQCancel(pThrd->timeoutQueue, conn->task);
|
||||
conn->task = NULL;
|
||||
}
|
||||
if (conn->timer != NULL) {
|
||||
(void)uv_timer_stop(conn->timer);
|
||||
conn->timer->data = NULL;
|
||||
(void)taosArrayPush(pThrd->timerList, &conn->timer);
|
||||
conn->timer = NULL;
|
||||
}
|
||||
cliResetTimer(pThrd, conn);
|
||||
|
||||
if (clear) {
|
||||
if (!uv_is_closing((uv_handle_t*)conn->stream)) {
|
||||
|
@ -1073,12 +1078,7 @@ static void cliDestroy(uv_handle_t* handle) {
|
|||
}
|
||||
SCliConn* conn = handle->data;
|
||||
SCliThrd* pThrd = conn->hostThrd;
|
||||
if (conn->timer != NULL) {
|
||||
(void)uv_timer_stop(conn->timer);
|
||||
(void)taosArrayPush(pThrd->timerList, &conn->timer);
|
||||
conn->timer->data = NULL;
|
||||
conn->timer = NULL;
|
||||
}
|
||||
cliResetTimer(pThrd, conn);
|
||||
|
||||
(void)atomic_sub_fetch_32(&pThrd->connCount, 1);
|
||||
|
||||
|
@ -1385,10 +1385,7 @@ static void cliHandleBatchReq(SCliBatch* pBatch, SCliThrd* pThrd) {
|
|||
|
||||
uint32_t ipaddr = 0;
|
||||
if ((code = cliGetIpFromFqdnCache(pThrd->fqdn2ipCache, pList->ip, &ipaddr)) != 0) {
|
||||
(void)uv_timer_stop(conn->timer);
|
||||
conn->timer->data = NULL;
|
||||
(void)taosArrayPush(pThrd->timerList, &conn->timer);
|
||||
conn->timer = NULL;
|
||||
cliResetTimer(pThrd, conn);
|
||||
cliHandleFastFail(conn, code);
|
||||
return;
|
||||
}
|
||||
|
@ -1421,10 +1418,7 @@ static void cliHandleBatchReq(SCliBatch* pBatch, SCliThrd* pThrd) {
|
|||
|
||||
ret = uv_tcp_connect(&conn->connReq, (uv_tcp_t*)(conn->stream), (const struct sockaddr*)&addr, cliConnCb);
|
||||
if (ret != 0) {
|
||||
(void)uv_timer_stop(conn->timer);
|
||||
conn->timer->data = NULL;
|
||||
(void)taosArrayPush(pThrd->timerList, &conn->timer);
|
||||
conn->timer = NULL;
|
||||
cliResetTimer(pThrd, conn);
|
||||
|
||||
cliMayUpdateFqdnCache(pThrd->fqdn2ipCache, conn->dstAddr);
|
||||
cliHandleFastFail(conn, -1);
|
||||
|
@ -1502,7 +1496,10 @@ static void cliHandleFastFail(SCliConn* pConn, int status) {
|
|||
}
|
||||
} else {
|
||||
SFailFastItem item = {.count = 1, .timestamp = cTimestamp};
|
||||
(void)taosHashPut(pThrd->failFastCache, pConn->dstAddr, strlen(pConn->dstAddr), &item, sizeof(SFailFastItem));
|
||||
int32_t code = taosHashPut(pThrd->failFastCache, pConn->dstAddr, strlen(pConn->dstAddr), &item, sizeof(SFailFastItem));
|
||||
if (code != 0) {
|
||||
tError("failed to put fail-fast item to cache, reason:%s", tstrerror(code));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -1522,10 +1519,7 @@ void cliConnCb(uv_connect_t* req, int status) {
|
|||
if (pConn->timer == NULL) {
|
||||
timeout = true;
|
||||
} else {
|
||||
(void)uv_timer_stop(pConn->timer);
|
||||
pConn->timer->data = NULL;
|
||||
(void)taosArrayPush(pThrd->timerList, &pConn->timer);
|
||||
pConn->timer = NULL;
|
||||
cliResetTimer(pThrd, pConn);
|
||||
}
|
||||
|
||||
STUB_RAND_NETWORK_ERR(status);
|
||||
|
@ -1870,11 +1864,7 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) {
|
|||
uint32_t ipaddr;
|
||||
int32_t code = cliGetIpFromFqdnCache(pThrd->fqdn2ipCache, fqdn, &ipaddr);
|
||||
if (code != 0) {
|
||||
(void)uv_timer_stop(conn->timer);
|
||||
conn->timer->data = NULL;
|
||||
(void)taosArrayPush(pThrd->timerList, &conn->timer);
|
||||
conn->timer = NULL;
|
||||
|
||||
cliResetTimer(pThrd, conn);
|
||||
cliHandleExcept(conn, code);
|
||||
return;
|
||||
}
|
||||
|
@ -1910,10 +1900,7 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) {
|
|||
|
||||
ret = uv_tcp_connect(&conn->connReq, (uv_tcp_t*)(conn->stream), (const struct sockaddr*)&addr, cliConnCb);
|
||||
if (ret != 0) {
|
||||
(void)uv_timer_stop(conn->timer);
|
||||
conn->timer->data = NULL;
|
||||
(void)taosArrayPush(pThrd->timerList, &conn->timer);
|
||||
conn->timer = NULL;
|
||||
cliResetTimer(pThrd, conn);
|
||||
|
||||
cliMayUpdateFqdnCache(pThrd->fqdn2ipCache, conn->dstAddr);
|
||||
cliHandleFastFail(conn, ret);
|
||||
|
@ -2377,7 +2364,9 @@ static int32_t createThrdObj(void* trans, SCliThrd** ppThrd) {
|
|||
TAOS_CHECK_GOTO(TSDB_CODE_OUT_OF_MEMORY, NULL, _end);
|
||||
}
|
||||
(void)uv_timer_init(pThrd->loop, timer);
|
||||
(void)taosArrayPush(pThrd->timerList, &timer);
|
||||
if (taosArrayPush(pThrd->timerList, &timer) == NULL) {
|
||||
TAOS_CHECK_GOTO(TSDB_CODE_OUT_OF_MEMORY, NULL, _end);
|
||||
}
|
||||
}
|
||||
|
||||
pThrd->pool = createConnPool(4);
|
||||
|
|
|
@ -375,11 +375,10 @@ void transCtxMerge(STransCtx* dst, STransCtx* src) {
|
|||
STransCtxVal* sVal = (STransCtxVal*)iter;
|
||||
key = taosHashGetKey(sVal, &klen);
|
||||
|
||||
// STransCtxVal* dVal = taosHashGet(dst->args, key, klen);
|
||||
// if (dVal) {
|
||||
// dst->freeFunc(dVal->val);
|
||||
// }
|
||||
(void)taosHashPut(dst->args, key, klen, sVal, sizeof(*sVal));
|
||||
int32_t code = taosHashPut(dst->args, key, klen, sVal, sizeof(*sVal));
|
||||
if (code != 0) {
|
||||
tError("failed to put val to hash, reason:%s", tstrerror(code));
|
||||
}
|
||||
iter = taosHashIterate(src->args, iter);
|
||||
}
|
||||
taosHashCleanup(src->args);
|
||||
|
@ -453,7 +452,9 @@ bool transQueuePush(STransQueue* queue, void* arg) {
|
|||
if (queue->q == NULL) {
|
||||
return true;
|
||||
}
|
||||
(void)taosArrayPush(queue->q, &arg);
|
||||
if (taosArrayPush(queue->q, &arg) == NULL) {
|
||||
return false;
|
||||
}
|
||||
if (taosArrayGetSize(queue->q) > 1) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -787,9 +787,6 @@ void taosTrashcanEmpty(SCacheObj *pCacheObj, bool force) {
|
|||
|
||||
STrashElem *pElem = pCacheObj->pTrash;
|
||||
while (pElem) {
|
||||
T_REF_VAL_CHECK(pElem->pData);
|
||||
// A S S E R T(pElem->next != pElem && pElem->prev != pElem);
|
||||
|
||||
if (force || (T_REF_VAL_GET(pElem->pData) == 0)) {
|
||||
uDebug("cache:%s, key:%p, %p removed from trashcan. numOfElem in trashcan:%d", pCacheObj->name, pElem->pData->key,
|
||||
pElem->pData->data, pCacheObj->numOfElemsInTrash - 1);
|
||||
|
|
|
@ -385,10 +385,6 @@ int32_t cfgSetItem(SConfig *pCfg, const char *name, const char *value, ECfgSrcTy
|
|||
(void)taosThreadMutexUnlock(&pCfg->lock);
|
||||
}
|
||||
|
||||
if (code != 0){
|
||||
uError("cfg:%s, type:%s src:%s value:%s failed since %s", pItem->name, cfgDtypeStr(pItem->dtype),
|
||||
cfgStypeStr(stype), value, tstrerror(code));
|
||||
}
|
||||
TAOS_RETURN(code);
|
||||
}
|
||||
|
||||
|
@ -1000,7 +996,7 @@ int32_t cfgLoadFromEnvFile(SConfig *pConfig, const char *envFile) {
|
|||
const char *filepath = ".env";
|
||||
if (envFile != NULL && strlen(envFile) > 0) {
|
||||
if (!taosCheckExistFile(envFile)) {
|
||||
uError("failed to load env file:%s", envFile);
|
||||
(void)printf("failed to load env file:%s\n", envFile);
|
||||
TAOS_RETURN(TSDB_CODE_NOT_FOUND);
|
||||
}
|
||||
filepath = envFile;
|
||||
|
@ -1075,7 +1071,7 @@ int32_t cfgLoadFromCfgFile(SConfig *pConfig, const char *filepath) {
|
|||
uInfo("failed to load from cfg file %s since %s, use default parameters", filepath, tstrerror(code));
|
||||
TAOS_RETURN(TSDB_CODE_SUCCESS);
|
||||
} else {
|
||||
uError("failed to load from cfg file %s since %s", filepath, tstrerror(code));
|
||||
(void)printf("failed to load from cfg file %s since %s\n", filepath, tstrerror(code));
|
||||
TAOS_RETURN(code);
|
||||
}
|
||||
}
|
||||
|
@ -1117,7 +1113,10 @@ int32_t cfgLoadFromCfgFile(SConfig *pConfig, const char *filepath) {
|
|||
}
|
||||
|
||||
code = cfgSetItem(pConfig, name, newValue, CFG_STYPE_CFG_FILE, true);
|
||||
if (TSDB_CODE_SUCCESS != code && TSDB_CODE_CFG_NOT_FOUND != code) break;
|
||||
if (TSDB_CODE_SUCCESS != code && TSDB_CODE_CFG_NOT_FOUND != code) {
|
||||
(void)printf("cfg:%s, value:%s failed since %s\n", name,newValue, tstrerror(code));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
(void)paGetToken(value + vlen + 1, &value2, &vlen2);
|
||||
if (vlen2 != 0) {
|
||||
|
@ -1131,7 +1130,10 @@ int32_t cfgLoadFromCfgFile(SConfig *pConfig, const char *filepath) {
|
|||
}
|
||||
|
||||
code = cfgSetItem(pConfig, name, value, CFG_STYPE_CFG_FILE, true);
|
||||
if (TSDB_CODE_SUCCESS != code && TSDB_CODE_CFG_NOT_FOUND != code) break;
|
||||
if (TSDB_CODE_SUCCESS != code && TSDB_CODE_CFG_NOT_FOUND != code) {
|
||||
(void)printf("cfg:%s, value:%s failed since %s\n", name, value, tstrerror(code));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (strcasecmp(name, "dataDir") == 0) {
|
||||
|
@ -1154,7 +1156,7 @@ int32_t cfgLoadFromCfgFile(SConfig *pConfig, const char *filepath) {
|
|||
uInfo("load from cfg file %s success", filepath);
|
||||
TAOS_RETURN(TSDB_CODE_SUCCESS);
|
||||
} else {
|
||||
uError("failed to load from cfg file %s since %s", filepath, tstrerror(code));
|
||||
(void)printf("failed to load from cfg file %s since %s\n", filepath, tstrerror(code));
|
||||
TAOS_RETURN(code);
|
||||
}
|
||||
}
|
||||
|
@ -1236,7 +1238,7 @@ int32_t cfgLoadFromApollUrl(SConfig *pConfig, const char *url) {
|
|||
|
||||
char *p = strchr(url, ':');
|
||||
if (p == NULL) {
|
||||
uError("fail to load apoll url: %s, unknown format", url);
|
||||
(void)printf("fail to load apoll url: %s, unknown format\n", url);
|
||||
TAOS_RETURN(TSDB_CODE_INVALID_PARA);
|
||||
}
|
||||
p++;
|
||||
|
@ -1244,7 +1246,7 @@ int32_t cfgLoadFromApollUrl(SConfig *pConfig, const char *url) {
|
|||
if (strncmp(url, "jsonFile", 8) == 0) {
|
||||
char *filepath = p;
|
||||
if (!taosCheckExistFile(filepath)) {
|
||||
uError("failed to load json file:%s", filepath);
|
||||
(void)printf("failed to load json file:%s\n", filepath);
|
||||
TAOS_RETURN(TSDB_CODE_NOT_FOUND);
|
||||
}
|
||||
|
||||
|
@ -1256,7 +1258,7 @@ int32_t cfgLoadFromApollUrl(SConfig *pConfig, const char *url) {
|
|||
char *buf = taosMemoryMalloc(fileSize + 1);
|
||||
if (!buf) {
|
||||
(void)taosCloseFile(&pFile);
|
||||
uError("load json file error: %s, failed to alloc memory", filepath);
|
||||
(void)printf("load json file error: %s, failed to alloc memory\n", filepath);
|
||||
TAOS_RETURN(TSDB_CODE_OUT_OF_MEMORY);
|
||||
}
|
||||
|
||||
|
@ -1264,7 +1266,7 @@ int32_t cfgLoadFromApollUrl(SConfig *pConfig, const char *url) {
|
|||
(void)taosLSeekFile(pFile, 0, SEEK_SET);
|
||||
if (taosReadFile(pFile, buf, fileSize) <= 0) {
|
||||
(void)taosCloseFile(&pFile);
|
||||
uError("load json file error: %s", filepath);
|
||||
(void)printf("load json file error: %s\n", filepath);
|
||||
taosMemoryFreeClear(buf);
|
||||
TAOS_RETURN(TSDB_CODE_INVALID_DATA_FMT);
|
||||
}
|
||||
|
@ -1273,7 +1275,7 @@ int32_t cfgLoadFromApollUrl(SConfig *pConfig, const char *url) {
|
|||
if (NULL == pJson) {
|
||||
const char *jsonParseError = tjsonGetError();
|
||||
if (jsonParseError != NULL) {
|
||||
uError("load json file parse error: %s", jsonParseError);
|
||||
(void)printf("load json file parse error: %s\n", jsonParseError);
|
||||
}
|
||||
taosMemoryFreeClear(buf);
|
||||
TAOS_CHECK_EXIT(TSDB_CODE_INVALID_DATA_FMT);
|
||||
|
@ -1341,7 +1343,7 @@ int32_t cfgLoadFromApollUrl(SConfig *pConfig, const char *url) {
|
|||
// } else if (strncmp(url, "jsonUrl", 7) == 0) {
|
||||
// } else if (strncmp(url, "etcdUrl", 7) == 0) {
|
||||
} else {
|
||||
uError("Unsupported url: %s", url);
|
||||
(void)printf("Unsupported url: %s\n", url);
|
||||
TAOS_RETURN(TSDB_CODE_INVALID_PARA);
|
||||
}
|
||||
|
||||
|
@ -1353,7 +1355,7 @@ _exit:
|
|||
taosMemoryFree(cfgLineBuf);
|
||||
tjsonDelete(pJson);
|
||||
if (code != 0) {
|
||||
uError("failed to load from apollo url:%s at line %d since %s", url, lino, tstrerror(code));
|
||||
(void)printf("failed to load from apollo url:%s at line %d since %s\n", url, lino, tstrerror(code));
|
||||
}
|
||||
TAOS_RETURN(code);
|
||||
}
|
||||
|
|
|
@ -72,11 +72,23 @@ int32_t getThreadLocalGeosCtx(SGeosContext **ppCtx) {
|
|||
}
|
||||
|
||||
int32_t code = 0, lino = 0;
|
||||
if (atomic_val_compare_exchange_8(&tlGeosCtxKeyInited, 0, 1) == 0) {
|
||||
|
||||
int8_t old;
|
||||
int32_t nLoops = 0;
|
||||
while (1) {
|
||||
old = atomic_val_compare_exchange_8(&tlGeosCtxKeyInited, 0, 2);
|
||||
if (old != 2) break;
|
||||
if (++nLoops > 1000) {
|
||||
(void)sched_yield();
|
||||
nLoops = 0;
|
||||
}
|
||||
}
|
||||
if (old == 0) {
|
||||
if ((taosThreadKeyCreate(&tlGeosCtxKey, destroyThreadLocalGeosCtx)) != 0) {
|
||||
atomic_store_8(&tlGeosCtxKeyInited, 0);
|
||||
TAOS_CHECK_EXIT(TAOS_SYSTEM_ERROR(errno));
|
||||
}
|
||||
atomic_store_8(&tlGeosCtxKeyInited, 1);
|
||||
}
|
||||
|
||||
SGeosContext *tlGeosCtxObj = (SGeosContext *)taosMemoryCalloc(1, sizeof(SGeosContext));
|
||||
|
|
|
@ -206,7 +206,7 @@ int32_t taosInitSlowLog() {
|
|||
(void)taosUmaskFile(0);
|
||||
tsLogObj.slowHandle->pFile = taosOpenFile(name, TD_FILE_CREATE | TD_FILE_WRITE | TD_FILE_APPEND);
|
||||
if (tsLogObj.slowHandle->pFile == NULL) {
|
||||
printf("\nfailed to open slow log file:%s, reason:%s\n", name, strerror(errno));
|
||||
(void)printf("\nfailed to open slow log file:%s, reason:%s\n", name, strerror(errno));
|
||||
return TAOS_SYSTEM_ERROR(errno);
|
||||
}
|
||||
|
||||
|
@ -529,7 +529,7 @@ static int32_t taosInitNormalLog(const char *logName, int32_t maxFileNum) {
|
|||
processLogFileName(logName, maxFileNum);
|
||||
|
||||
char name[PATH_MAX + 50] = "\0";
|
||||
sprintf(name, "%s.%d", tsLogObj.logName, tsLogObj.flag);
|
||||
(void)sprintf(name, "%s.%d", tsLogObj.logName, tsLogObj.flag);
|
||||
(void)taosThreadMutexInit(&tsLogObj.logMutex, NULL);
|
||||
|
||||
(void)taosUmaskFile(0);
|
||||
|
@ -538,7 +538,7 @@ static int32_t taosInitNormalLog(const char *logName, int32_t maxFileNum) {
|
|||
|
||||
tsLogObj.logHandle->pFile = taosOpenFile(name, TD_FILE_CREATE | TD_FILE_WRITE);
|
||||
if (tsLogObj.logHandle->pFile == NULL) {
|
||||
printf("\nfailed to open log file:%s, reason:%s\n", name, strerror(errno));
|
||||
(void)printf("\nfailed to open log file:%s, reason:%s\n", name, strerror(errno));
|
||||
return TAOS_SYSTEM_ERROR(errno);
|
||||
}
|
||||
(void)taosLockLogFile(tsLogObj.logHandle->pFile);
|
||||
|
@ -546,18 +546,18 @@ static int32_t taosInitNormalLog(const char *logName, int32_t maxFileNum) {
|
|||
// only an estimate for number of lines
|
||||
int64_t filesize = 0;
|
||||
if (taosFStatFile(tsLogObj.logHandle->pFile, &filesize, NULL) < 0) {
|
||||
printf("\nfailed to fstat log file:%s, reason:%s\n", name, strerror(errno));
|
||||
(void)printf("\nfailed to fstat log file:%s, reason:%s\n", name, strerror(errno));
|
||||
return TAOS_SYSTEM_ERROR(errno);
|
||||
}
|
||||
tsLogObj.lines = (int32_t)(filesize / 60);
|
||||
|
||||
(void)taosLSeekFile(tsLogObj.logHandle->pFile, 0, SEEK_END);
|
||||
|
||||
sprintf(name, "==================================================\n");
|
||||
(void)sprintf(name, "==================================================\n");
|
||||
(void)taosWriteFile(tsLogObj.logHandle->pFile, name, (uint32_t)strlen(name));
|
||||
sprintf(name, " new log file \n");
|
||||
(void)sprintf(name, " new log file \n");
|
||||
(void)taosWriteFile(tsLogObj.logHandle->pFile, name, (uint32_t)strlen(name));
|
||||
sprintf(name, "==================================================\n");
|
||||
(void)sprintf(name, "==================================================\n");
|
||||
(void)taosWriteFile(tsLogObj.logHandle->pFile, name, (uint32_t)strlen(name));
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -455,9 +455,7 @@ static void taosLockList(int64_t *lockedBy) {
|
|||
|
||||
static void taosUnlockList(int64_t *lockedBy) {
|
||||
int64_t tid = taosGetSelfPthreadId();
|
||||
if (atomic_val_compare_exchange_64(lockedBy, tid, 0) != tid) {
|
||||
ASSERTS(false, "atomic_val_compare_exchange_64 tid failed");
|
||||
}
|
||||
(void)atomic_val_compare_exchange_64(lockedBy, tid, 0);
|
||||
}
|
||||
|
||||
static void taosInitRefModule(void) { (void)taosThreadMutexInit(&tsRefMutex, NULL); }
|
||||
|
|
|
@ -46,4 +46,67 @@
|
|||
228
|
||||
117
|
||||
112
|
||||
110
|
||||
110
|
||||
116
|
||||
116
|
||||
39
|
||||
108
|
||||
120
|
||||
108
|
||||
120
|
||||
108
|
||||
116
|
||||
104
|
||||
116
|
||||
116
|
||||
104
|
||||
108
|
||||
120
|
||||
108
|
||||
120
|
||||
108
|
||||
116
|
||||
104
|
||||
116
|
||||
116
|
||||
104
|
||||
110
|
||||
228
|
||||
117
|
||||
112
|
||||
110
|
||||
110
|
||||
97
|
||||
228
|
||||
110
|
||||
97
|
||||
110
|
||||
228
|
||||
117
|
||||
112
|
||||
110
|
||||
110
|
||||
97
|
||||
228
|
||||
110
|
||||
97
|
||||
110
|
||||
112
|
||||
110
|
||||
112
|
||||
228
|
||||
117
|
||||
112
|
||||
112
|
||||
112
|
||||
112
|
||||
110
|
||||
112
|
||||
110
|
||||
112
|
||||
228
|
||||
117
|
||||
112
|
||||
112
|
||||
112
|
||||
112
|
||||
|
|
|
|
@ -36,4 +36,8 @@ MMMMM
|
|||
NNNNN
|
||||
OOOOO
|
||||
PPPPP
|
||||
QQQQQ
|
||||
QQQQQ
|
||||
M
|
||||
MM
|
||||
{
|
||||
M{
|
||||
|
|
|
|
@ -46,4 +46,48 @@
|
|||
10
|
||||
6
|
||||
7
|
||||
5
|
||||
5
|
||||
4
|
||||
2
|
||||
6
|
||||
5
|
||||
5
|
||||
10
|
||||
6
|
||||
7
|
||||
5
|
||||
5
|
||||
5
|
||||
10
|
||||
5
|
||||
5
|
||||
5
|
||||
10
|
||||
6
|
||||
7
|
||||
5
|
||||
5
|
||||
5
|
||||
10
|
||||
5
|
||||
5
|
||||
5
|
||||
6
|
||||
5
|
||||
5
|
||||
10
|
||||
6
|
||||
7
|
||||
6
|
||||
7
|
||||
5
|
||||
5
|
||||
6
|
||||
5
|
||||
5
|
||||
10
|
||||
6
|
||||
7
|
||||
6
|
||||
7
|
||||
5
|
||||
|
|
|
|
@ -73,4 +73,27 @@
|
|||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
4
|
||||
4
|
||||
2
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
6
|
||||
|
|
|
|
@ -42,4 +42,25 @@
|
|||
57.295779513082323
|
||||
81.028468454139556
|
||||
99.239201175922574
|
||||
114.591559026164646
|
||||
114.591559026164646
|
||||
180
|
||||
610.200029957721426
|
||||
491.254034090376820
|
||||
561.212164701962479
|
||||
643.603479905018958
|
||||
613.408634263739941
|
||||
487.472513516777667
|
||||
549.810284033650078
|
||||
628.076328902558998
|
||||
643.202411196955836
|
||||
592.266466706882511
|
||||
610.200029957721426
|
||||
491.254034090376820
|
||||
561.212164701962479
|
||||
643.603479905018958
|
||||
613.408634263739941
|
||||
487.472513516777667
|
||||
549.810284033650078
|
||||
628.076328902558998
|
||||
643.202411196955836
|
||||
592.266466706882511
|
||||
|
|
|
|
@ -41,4 +41,26 @@
|
|||
4.113250378782928
|
||||
5.652233674034091
|
||||
7.389056098930650
|
||||
3814279.104760214220732
|
||||
3814279.104760214220732
|
||||
7.38905609893065
|
||||
1.6487212707001282
|
||||
42192.578453635847836
|
||||
5292.258432380726845
|
||||
17943.802618770550907
|
||||
75583.992598717435612
|
||||
44622.804904812772293
|
||||
4954.246535954979663
|
||||
14705.836248958077704
|
||||
57641.604897186582093
|
||||
75056.754435561466380
|
||||
30853.327779395312973
|
||||
42192.578453635847836
|
||||
5292.258432380726845
|
||||
17943.802618770550907
|
||||
75583.992598717435612
|
||||
44622.804904812772293
|
||||
4954.246535954979663
|
||||
14705.836248958077704
|
||||
57641.604897186582093
|
||||
75056.754435561466380
|
||||
30853.327779395312973
|
||||
|
|
|
|
@ -38,4 +38,26 @@
|
|||
1.005052538742381
|
||||
1.098612288668110
|
||||
-0.226079864157595
|
||||
2.000000000000000
|
||||
2.000000000000000
|
||||
2.302585092994046
|
||||
1.144729885849400
|
||||
2.365559856336680
|
||||
2.148734409997751
|
||||
2.281872059185575
|
||||
2.418855857000369
|
||||
2.370804362614190
|
||||
2.141006941277850
|
||||
2.261346315560232
|
||||
2.394434736880126
|
||||
2.418232501568406
|
||||
2.335729681253415
|
||||
2.365559856336680
|
||||
2.148734409997751
|
||||
2.281872059185575
|
||||
2.418855857000369
|
||||
2.370804362614190
|
||||
2.141006941277850
|
||||
2.261346315560232
|
||||
2.394434736880126
|
||||
2.418232501568406
|
||||
2.335729681253415
|
||||
|
|
|
|
@ -48,3 +48,25 @@
|
|||
3.310891102586806e+00
|
||||
3.350522322288470e+00
|
||||
3.215120509901375e+00
|
||||
1
|
||||
1
|
||||
0
|
||||
1
|
||||
2
|
||||
0
|
||||
1
|
||||
2
|
||||
0
|
||||
1
|
||||
2
|
||||
0
|
||||
0
|
||||
1
|
||||
2
|
||||
0
|
||||
1
|
||||
2
|
||||
0
|
||||
1
|
||||
2
|
||||
0
|
||||
|
|
|
|
@ -24,4 +24,5 @@
|
|||
3.141592653589793
|
||||
9.869604401089358
|
||||
1.772453850905516
|
||||
3
|
||||
3
|
||||
3.141592653589793
|
||||
|
|
|
|
@ -90,3 +90,87 @@
|
|||
1
|
||||
1
|
||||
1.000000000000000e+00
|
||||
1
|
||||
0
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
4
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
4
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
4
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
4
|
||||
0
|
||||
4
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
4
|
||||
0
|
||||
4
|
||||
0
|
||||
0
|
||||
5
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
4
|
||||
0
|
||||
0
|
||||
5
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
|
|
|
|
@ -42,4 +42,25 @@
|
|||
0.017453292519943
|
||||
0.024682682989769
|
||||
0.030229989403904
|
||||
0.034906585039887
|
||||
0.034906585039887
|
||||
3.141592653589793
|
||||
0.185877558679493
|
||||
0.149644536324422
|
||||
0.170955001564425
|
||||
0.196052831414414
|
||||
0.186854955444309
|
||||
0.148492619284422
|
||||
0.167481790094528
|
||||
0.191322990739406
|
||||
0.195930658899406
|
||||
0.180414682914441
|
||||
0.185877558679493
|
||||
0.149644536324422
|
||||
0.170955001564425
|
||||
0.196052831414414
|
||||
0.186854955444309
|
||||
0.148492619284422
|
||||
0.167481790094528
|
||||
0.191322990739406
|
||||
0.195930658899406
|
||||
0.180414682914441
|
||||
|
|
|
|
@ -56,4 +56,106 @@ var1
|
|||
var1var1
|
||||
var1var1var1
|
||||
var1var1var1var1
|
||||
var1var1var1var1var1
|
||||
var1var1var1var1var1
|
||||
taos
|
||||
taostaos
|
||||
lililililili
|
||||
xxx
|
||||
lililililili
|
||||
xxx
|
||||
lililililili
|
||||
taostaostaos
|
||||
hahahahahaha
|
||||
taostaostaos
|
||||
taostaostaos
|
||||
hahahahahaha
|
||||
lililililili
|
||||
xxx
|
||||
lililililili
|
||||
xxx
|
||||
lililililili
|
||||
taostaostaos
|
||||
hahahahahaha
|
||||
taostaostaos
|
||||
taostaostaos
|
||||
hahahahahaha
|
||||
novelnovelnovel
|
||||
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
|
||||
updateupdateupdate
|
||||
prisionprisionprision
|
||||
novelnovelnovel
|
||||
novelnovelnovel
|
||||
againagainagain
|
||||
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
|
||||
novelnovelnovel
|
||||
againagainagain
|
||||
novelnovelnovel
|
||||
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
|
||||
updateupdateupdate
|
||||
prisionprisionprision
|
||||
novelnovelnovel
|
||||
novelnovelnovel
|
||||
againagainagain
|
||||
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
|
||||
novelnovelnovel
|
||||
againagainagain
|
||||
novelnovelnovel
|
||||
personpersonperson
|
||||
novelnovelnovel
|
||||
plateplateplate
|
||||
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
|
||||
updateupdateupdate
|
||||
prisionprisionprision
|
||||
personpersonperson
|
||||
prisionprisionprision
|
||||
plateplateplate
|
||||
novelnovelnovel
|
||||
personpersonperson
|
||||
novelnovelnovel
|
||||
plateplateplate
|
||||
一二三四五六七八九十一二三四五六七八九十一二三四五六七八九十
|
||||
updateupdateupdate
|
||||
prisionprisionprision
|
||||
personpersonperson
|
||||
prisionprisionprision
|
||||
plateplateplate
|
||||
lili
|
||||
x
|
||||
lili
|
||||
x
|
||||
lili
|
||||
taos
|
||||
haha
|
||||
taos
|
||||
taos
|
||||
haha
|
||||
lili
|
||||
x
|
||||
lili
|
||||
x
|
||||
lili
|
||||
taos
|
||||
haha
|
||||
taos
|
||||
taos
|
||||
haha
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novel
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
again
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novel
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
again
|
||||
|
|
|
|
@ -368,4 +368,109 @@ e二三四五六七abcdefghijk213124123
|
|||
一二三四五六七abcdefghijk213124123
|
||||
一二三四五六七abcdefghijk213124123
|
||||
一二三四五六七abcdefghijk213124123
|
||||
一二三四五六七abcdefghijk213124123
|
||||
一二三四五六七abcdefghijk213124123
|
||||
eebbccdd
|
||||
aabbccdd
|
||||
南京
|
||||
北南
|
||||
南京taos
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novtl
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
again
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novtl
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
again
|
||||
novtl
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novel
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novtl
|
||||
again
|
||||
novtl
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novel
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novtl
|
||||
again
|
||||
novel
|
||||
person
|
||||
novel
|
||||
plate
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
person
|
||||
prision
|
||||
plate
|
||||
novel
|
||||
person
|
||||
novel
|
||||
plate
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
person
|
||||
prision
|
||||
plate
|
||||
novtl
|
||||
person
|
||||
novel
|
||||
platt
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
person
|
||||
prision
|
||||
plate
|
||||
novtl
|
||||
person
|
||||
novel
|
||||
platt
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
person
|
||||
prision
|
||||
plate
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
nov一二三四五六七八九十l
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
again
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
nov一二三四五六七八九十l
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
again
|
||||
|
|
|
|
@ -62,4 +62,33 @@
|
|||
9.6000004
|
||||
11.0000000
|
||||
11.1999998
|
||||
10.3000002
|
||||
10.3000002
|
||||
10.55
|
||||
10.55
|
||||
10.6
|
||||
11
|
||||
11
|
||||
10
|
||||
0
|
||||
-10.6
|
||||
99
|
||||
11
|
||||
9
|
||||
10
|
||||
11
|
||||
11
|
||||
9
|
||||
10
|
||||
11
|
||||
11
|
||||
10
|
||||
11
|
||||
9
|
||||
10
|
||||
11
|
||||
11
|
||||
9
|
||||
10
|
||||
11
|
||||
11
|
||||
10
|
||||
|
|
|
|
@ -43,4 +43,28 @@
|
|||
1.000000000000000
|
||||
1.000000000000000
|
||||
1.000000000000000
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
-1
|
||||
-1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
|
|
|
|
@ -30,4 +30,8 @@
|
|||
8.077747210701755
|
||||
8.077747210701755
|
||||
8.077747210701755
|
||||
8.077747210701755
|
||||
8.077747210701755
|
||||
2886.751331514371941
|
||||
2886.751331514371941
|
||||
1.154339668872967
|
||||
1.154339668872967
|
||||
|
|
|
|
@ -445,4 +445,51 @@ bc一二三abc一二三a
|
|||
rision
|
||||
rision
|
||||
bc一二三abc一二三a
|
||||
二三123321三二一
|
||||
二三123321三二一
|
||||
dengine
|
||||
e
|
||||
tde
|
||||
dengine
|
||||
e
|
||||
中国
|
||||
中国t
|
||||
novel
|
||||
perso
|
||||
novel
|
||||
plate
|
||||
一二三四五
|
||||
updat
|
||||
prisi
|
||||
perso
|
||||
prisi
|
||||
plate
|
||||
novel
|
||||
perso
|
||||
novel
|
||||
plate
|
||||
一二三四五
|
||||
updat
|
||||
prisi
|
||||
perso
|
||||
prisi
|
||||
plate
|
||||
novel
|
||||
一二三四五
|
||||
updat
|
||||
prisi
|
||||
novel
|
||||
novel
|
||||
again
|
||||
一二三四五
|
||||
novel
|
||||
again
|
||||
novel
|
||||
一二三四五
|
||||
updat
|
||||
prisi
|
||||
novel
|
||||
novel
|
||||
again
|
||||
一二三四五
|
||||
novel
|
||||
again
|
||||
|
|
|
|
@ -188,4 +188,108 @@ a一二三a一二三bbcfp
|
|||
一二三123321三二一
|
||||
一二三123321三二一
|
||||
一二三123321三二一
|
||||
一二三123321三二一
|
||||
一二三123321三二一
|
||||
www.taosdata
|
||||
taosdata.com
|
||||
中国.科学
|
||||
北京。涛思
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novel
|
||||
novel
|
||||
ag
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
ag
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novel
|
||||
novel
|
||||
ag
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
ag
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novel
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
again
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novel
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
again
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novel
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
again
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novel
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
again
|
||||
novel
|
||||
person
|
||||
novel
|
||||
plate
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
person
|
||||
prision
|
||||
plate
|
||||
novel
|
||||
person
|
||||
novel
|
||||
plate
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
person
|
||||
prision
|
||||
plate
|
||||
novel
|
||||
person
|
||||
novel
|
||||
plate
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
person
|
||||
prision
|
||||
plate
|
||||
novel
|
||||
person
|
||||
novel
|
||||
plate
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
person
|
||||
prision
|
||||
plate
|
||||
|
|
|
|
@ -295,4 +295,40 @@
|
|||
372
|
||||
372
|
||||
372
|
||||
372
|
||||
372
|
||||
-10
|
||||
31536000
|
||||
3000
|
||||
43200
|
||||
720
|
||||
30
|
||||
4
|
||||
2592000000
|
||||
2592000
|
||||
2592000
|
||||
60
|
||||
60
|
||||
79774389
|
||||
-79774389
|
||||
79774389
|
||||
-79774389
|
||||
-220769589123
|
||||
-220766589123
|
||||
-220763589123
|
||||
-220760589123
|
||||
-220757589123
|
||||
-220754589123
|
||||
-220751589123
|
||||
-220748589123
|
||||
-220745589123
|
||||
-220742589123
|
||||
-220769589123
|
||||
-220766589123
|
||||
-220763589123
|
||||
-220760589123
|
||||
-220757589123
|
||||
-220754589123
|
||||
-220751589123
|
||||
-220748589123
|
||||
-220745589123
|
||||
-220742589123
|
||||
|
|
|
|
@ -353,4 +353,101 @@ bbcfp三a
|
|||
三abbcfp三a
|
||||
三abbcfp三a
|
||||
三abbcfp三a
|
||||
三abbcfp三a
|
||||
三abbcfp三a
|
||||
A
|
||||
涛思
|
||||
b bbb
|
||||
aaa
|
||||
aaa abab aaaa
|
||||
abab aaaa
|
||||
京涛思数据科技有限公司北
|
||||
bei京涛思数据科技有限公司北
|
||||
aaa abab aaaa
|
||||
aaa abab
|
||||
aaa abab
|
||||
北京涛思数据科技有限公司
|
||||
北京涛思数据科技有限公司bei
|
||||
aaa abab aaaa
|
||||
aaa abab aaaa
|
||||
abab
|
||||
京涛思数据科技有限公司
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novel
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
again
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novel
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
again
|
||||
novel
|
||||
person
|
||||
novel
|
||||
plate
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
person
|
||||
prision
|
||||
plate
|
||||
novel
|
||||
person
|
||||
novel
|
||||
plate
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
person
|
||||
prision
|
||||
plate
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novel
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
again
|
||||
novel
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
novel
|
||||
novel
|
||||
again
|
||||
一二三四五六七八九十
|
||||
novel
|
||||
again
|
||||
novel
|
||||
person
|
||||
novel
|
||||
plat
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
person
|
||||
prision
|
||||
plate
|
||||
novel
|
||||
person
|
||||
novel
|
||||
plat
|
||||
一二三四五六七八九十
|
||||
update
|
||||
prision
|
||||
person
|
||||
prision
|
||||
plate
|
||||
|
|
|
|
@ -79,4 +79,51 @@
|
|||
9.5000000
|
||||
10.8999996
|
||||
11.1999998
|
||||
10.3000002
|
||||
10.3000002
|
||||
99.99
|
||||
99.99
|
||||
99.9
|
||||
99
|
||||
90
|
||||
0
|
||||
99
|
||||
10.6
|
||||
8.5
|
||||
9.7
|
||||
11.2
|
||||
10.7
|
||||
8.5
|
||||
9.5
|
||||
10.9
|
||||
11.2
|
||||
10.3
|
||||
10.6
|
||||
8.5
|
||||
9.7
|
||||
11.2
|
||||
10.7
|
||||
8.5
|
||||
9.5
|
||||
10.9
|
||||
11.2
|
||||
10.3
|
||||
10.6
|
||||
8.5
|
||||
9.7
|
||||
11.2
|
||||
10.7
|
||||
8.5
|
||||
9.5
|
||||
10.9
|
||||
11.2
|
||||
10.3
|
||||
10.6
|
||||
8.5
|
||||
9.7
|
||||
11.2
|
||||
10.7
|
||||
8.5
|
||||
9.5
|
||||
10.9
|
||||
11.2
|
||||
10.3
|
||||
|
|
|
|
@ -30,4 +30,8 @@
|
|||
65.250000000000000
|
||||
65.250000000000000
|
||||
65.250000000000000
|
||||
65.250000000000000
|
||||
65.250000000000000
|
||||
8333333.250000000000000
|
||||
8333333.250000000000000
|
||||
1.332500071133751
|
||||
1.332500071133751
|
||||
|
|
|
|
@ -140,4 +140,35 @@
|
|||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
0
|
||||
0
|
||||
0
|
||||
52
|
||||
52
|
||||
0
|
||||
0
|
||||
52
|
||||
52
|
||||
3
|
||||
52
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
|
|
|
|
@ -73,4 +73,28 @@
|
|||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
2
|
||||
2
|
||||
0
|
||||
2
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
|
|
|
|
@ -73,4 +73,27 @@
|
|||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
1
|
||||
4
|
||||
29
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
28
|
||||
|
|
|
|
@ -0,0 +1,5 @@
|
|||
select ascii();
|
||||
select ascii(123);
|
||||
select ascii(1);
|
||||
select ascii(2);
|
||||
select ascii(1.5);
|
|
@ -14,4 +14,13 @@ select ASCII(concat(nch1,var1)) from ts_4893.meters order by ts limit 5;
|
|||
select ASCII(cast(nch1 as varchar)) from ts_4893.meters order by ts limit 5;
|
||||
select pow(ASCII(nch1), 2) from ts_4893.meters order by ts limit 5;
|
||||
select sqrt(ASCII(nch1)) from ts_4893.meters order by ts limit 5;
|
||||
select cast(ASCII(nch1) as int) from ts_4893.meters order by ts limit 5;
|
||||
select cast(ASCII(nch1) as int) from ts_4893.meters order by ts limit 5;
|
||||
select ascii('taos');
|
||||
select ascii('t');
|
||||
select ascii('\'');
|
||||
select ascii(name) from ts_4893.d0 order by ts limit 10;
|
||||
select ascii(name) from ts_4893.meters order by ts limit 10;
|
||||
select ascii(nch1) from ts_4893.d0 order by ts limit 10;
|
||||
select ascii(nch1) from ts_4893.meters order by ts limit 10;
|
||||
select ascii(var1) from ts_4893.d0 order by ts limit 10;
|
||||
select ascii(var1) from ts_4893.meters order by ts limit 10;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
select char();
|
|
@ -9,3 +9,7 @@ select cast(CHAR(49) as int);
|
|||
select CHAR(id + 77) from ts_4893.meters order by ts limit 5;;
|
||||
select CONCAT(CHAR(id + 77),CHAR(id + 77),CHAR(id + 77)) from ts_4893.meters limit 5;
|
||||
select CHAR(id+77, id+77, id+77, id+77, id+77) from ts_4893.meters limit 5;
|
||||
select char(77);
|
||||
select char(77 * 256 + 77);
|
||||
select char('123');
|
||||
select char(77, NULL, '123');
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
select char_length();
|
||||
select char_length('tao's');
|
||||
select char_length(123.45);
|
||||
select char_length(123.45.67);
|
||||
select char_length('a', 'b');
|
|
@ -14,4 +14,12 @@ select CHAR_LENGTH(concat(nch1,var1)) from ts_4893.meters order by ts limit 5;
|
|||
select CHAR_LENGTH(cast(nch1 as varchar)) from ts_4893.meters order by ts limit 5;
|
||||
select pow(CHAR_LENGTH(nch1), 2) from ts_4893.meters order by ts limit 5;
|
||||
select sqrt(CHAR_LENGTH(nch1)) from ts_4893.meters order by ts limit 5;
|
||||
select cast(CHAR_LENGTH(nch1) as int) from ts_4893.meters order by ts limit 5;
|
||||
select cast(CHAR_LENGTH(nch1) as int) from ts_4893.meters order by ts limit 5;
|
||||
select char_length('taos');
|
||||
select char_length('涛思');
|
||||
select char_length('涛思taos');
|
||||
select char_length('tao\'s');
|
||||
select char_length(nch1) from ts_4893.d0 limit 10;
|
||||
select char_length(nch1) from ts_4893.meters limit 10;
|
||||
select char_length(var1) from ts_4893.d0 limit 10;
|
||||
select char_length(var1) from ts_4893.meters limit 10;
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
select dayofweek();
|
||||
select dayofweek('2020-01-01',1);
|
|
@ -10,4 +10,9 @@ select DAYOFWEEK('2000-01-06 00:00:00');
|
|||
select DAYOFWEEK('2000-01-06 00:00:00') from ts_4893.meters order by ts limit 10;
|
||||
select DAYOFWEEK(1725095657);
|
||||
select DAYOFWEEK(1725095657) from ts_4893.meters order by ts limit 10;
|
||||
select DAYOFWEEK(ts) from ts_4893.meters order by ts limit 10;
|
||||
select DAYOFWEEK(ts) from ts_4893.meters order by ts limit 10;
|
||||
select dayofweek('2020-01-01');
|
||||
select dayofweek(1721020666);
|
||||
select dayofweek(1721020666229);
|
||||
select dayofweek(ts) from ts_4893.d0 order by ts limit 10;
|
||||
select dayofweek(ts) from ts_4893.meters order by ts limit 10;
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
select degrees();
|
||||
select degrees('abc');
|
|
@ -26,4 +26,7 @@ select abs(DEGREES(10));
|
|||
select pow(DEGREES(10), 2);
|
||||
select sqrt(DEGREES(10));
|
||||
select cast(DEGREES(10) as int);
|
||||
select DEGREES(sqrt(id)) from ts_4893.meters order by ts limit 5;
|
||||
select DEGREES(sqrt(id)) from ts_4893.meters order by ts limit 5;
|
||||
select degrees(pi());
|
||||
select degrees(current) from ts_4893.d0 order by ts limit 10;
|
||||
select degrees(current) from ts_4893.meters order by ts limit 10;
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
select exp();
|
||||
select exp('1');
|
|
@ -25,4 +25,8 @@ select pow(EXP(10), 2);
|
|||
select sqrt(EXP(10));
|
||||
select cast(EXP(10) as int);
|
||||
select EXP(sqrt(id)) from ts_4893.meters order by ts limit 5;
|
||||
select EXP(EXP(EXP(EXP(0))));
|
||||
select EXP(EXP(EXP(EXP(0))));
|
||||
select exp(2);
|
||||
select exp(0.5);
|
||||
select exp(current) from ts_4893.d0 order by ts limit 10;
|
||||
select exp(current) from ts_4893.meters order by ts limit 10;
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
select ln();
|
||||
select ln('1');
|
|
@ -22,4 +22,8 @@ select sqrt(LN(10));
|
|||
select cast(LN(10) as int);
|
||||
select LN(sqrt(id) + 1) from ts_4893.meters order by ts limit 5;
|
||||
select LN(LN(LN(LN(10000))));
|
||||
select LN(EXP(2));
|
||||
select LN(EXP(2));
|
||||
select ln(10);
|
||||
select ln(pi());
|
||||
select ln(current) from ts_4893.d0 order by ts limit 10;
|
||||
select ln(current) from ts_4893.meters order by ts limit 10;
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
select mod();
|
||||
select mod(, 2);
|
||||
select mod(10, );
|
||||
select mod(10, 'a');
|
||||
select mod('abc', 3);
|
||||
select mod(10, 3, 1);
|
|
@ -11,4 +11,8 @@ select MOD(MOD(MOD(MOD(MOD(MOD(MOD(123456789.123456789, -1), -2), -3), -4), -5),
|
|||
select MOD(87654321.123456789, id + 1) from ts_4893.meters order by ts limit 10;
|
||||
select MOD(current, id + 1) from ts_4893.meters order by ts limit 10;
|
||||
select MOD(current, 1) from ts_4893.meters order by ts limit 10;
|
||||
select MOD(sqrt(current), abs(id + 1)) from ts_4893.meters order by ts limit 10;
|
||||
select MOD(sqrt(current), abs(id + 1)) from ts_4893.meters order by ts limit 10;
|
||||
select mod(10, -3);
|
||||
select mod(10, 3);
|
||||
select mod(id, 3) from ts_4893.d0 order by ts limit 10;
|
||||
select mod(id, 3) from ts_4893.meters order by ts limit 10;
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
select pi('111');
|
||||
select pi(123);
|
|
@ -16,4 +16,5 @@ select pi() + id from ts_4893.meters order by ts limit 5;
|
|||
select abs(pi());
|
||||
select pow(pi(), 2);
|
||||
select sqrt(pi());
|
||||
select cast(pi() as int);
|
||||
select cast(pi() as int);
|
||||
select pi();
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
select position('t' in);
|
||||
select position(in 'taos');
|
||||
select position(1 in 2213);
|
||||
select position(1 in '2213');
|
||||
select position('1' in 2213);
|
|
@ -25,4 +25,16 @@ select POSITION(var2 IN 'abcdefghijklmn') from ts_4893.meters where POSITION(var
|
|||
select POSITION(nch2 IN '一二三四五六七八九十') from ts_4893.meters where POSITION(nch2 IN '一二三四五六七八九十') != 0 order by ts limit 5;
|
||||
select POSITION(var2 IN '一二三四五六七八九十') from ts_4893.meters where POSITION(var2 IN '一二三四五六七八九十') != 0 order by ts limit 5;
|
||||
select ABS(POSITION('aaa' IN 'aaaaaaaaa'));
|
||||
select POW(POSITION('aaa' IN 'aaaaaaaaa'), 2);
|
||||
select POW(POSITION('aaa' IN 'aaaaaaaaa'), 2);
|
||||
select position('t' in 'taos');
|
||||
select position('ustc' in 'taos');
|
||||
select position('' in '');
|
||||
select position('' in 'taos');
|
||||
select position(nch2 in nch1) from ts_4893.d0 order by ts limit 10;
|
||||
select position(nch2 in nch1) from ts_4893.meters order by ts limit 10;
|
||||
select position(nch2 in var1) from ts_4893.d0 order by ts limit 10;
|
||||
select position(nch2 in var1) from ts_4893.meters order by ts limit 10;
|
||||
select position(var2 in nch1) from ts_4893.d0 order by ts limit 10;
|
||||
select position(var2 in nch1) from ts_4893.meters order by ts limit 10;
|
||||
select position(var2 in var1) from ts_4893.d0 order by ts limit 10;
|
||||
select position(var2 in var1) from ts_4893.meters order by ts limit 10;
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
select radians();
|
||||
select radians('abc');
|
|
@ -26,4 +26,7 @@ select abs(RADIANS(10));
|
|||
select pow(RADIANS(10), 2);
|
||||
select sqrt(RADIANS(10));
|
||||
select cast(RADIANS(10) as int);
|
||||
select RADIANS(sqrt(id)) from ts_4893.meters order by ts limit 5;
|
||||
select RADIANS(sqrt(id)) from ts_4893.meters order by ts limit 5;
|
||||
select radians(180);
|
||||
select radians(current) from ts_4893.d0 order by ts limit 10;
|
||||
select radians(current) from ts_4893.meters order by ts limit 10;
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
select repeat();
|
||||
select repeat('taos', );
|
||||
select repeat(, 3);
|
||||
select repeat('taos');
|
||||
select repeat(1);
|
||||
select repeat(taos, 1);
|
||||
select repeat(123, 2);
|
||||
select repeat('taos', 1.5);
|
||||
select repeat('taos', 1.4);
|
||||
select repeat('taos', 12, 3);
|
||||
select repeat(id, 3) from ts_4893.meters;
|
|
@ -16,4 +16,16 @@ select position(var1 in repeat(nch1,6)) from ts_4893.meters where nch1 = var1 or
|
|||
select repeat(nch1, id) from ts_4893.meters where id > 0 order by ts limit 5;
|
||||
select repeat(var1, id) from ts_4893.meters where id > 0 order by ts limit 5;
|
||||
select repeat('nch1', id) from ts_4893.meters where id > 0 order by ts limit 5;
|
||||
select repeat('var1', id) from ts_4893.meters where id > 0 order by ts limit 5;
|
||||
select repeat('var1', id) from ts_4893.meters where id > 0 order by ts limit 5;
|
||||
select repeat('taos', 1);
|
||||
select repeat('taos', 2);
|
||||
select repeat(name, 3) from ts_4893.d0 order by ts limit 10;
|
||||
select repeat(name, 3) from ts_4893.meters order by ts limit 10;
|
||||
select repeat(nch1, 3) from ts_4893.d0 order by ts limit 10;
|
||||
select repeat(nch1, 3) from ts_4893.meters order by ts limit 10;
|
||||
select repeat(var1, 3) from ts_4893.d0 order by ts limit 10;
|
||||
select repeat(var1, 3) from ts_4893.meters order by ts limit 10;
|
||||
select repeat(name, groupid) from ts_4893.d0 order by ts limit 10;
|
||||
select repeat(name, groupid) from ts_4893.meters order by ts limit 10;
|
||||
select repeat(nch1, groupid) from ts_4893.d0 order by ts limit 10;
|
||||
select repeat(nch1, groupid) from ts_4893.meters order by ts limit 10;
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
select replace();
|
||||
select replace('aabbccdd', , 'ee');
|
||||
select replace('aabbccdd', 'aa', );
|
||||
select replace(, 'aa', 'ee');
|
||||
select replace(123345, 1, 'ee');
|
||||
select replace('aabbccdd', 1, 'ee');
|
||||
select replace('aabbccdd', 'a', 1);
|
|
@ -80,4 +80,19 @@ select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from t
|
|||
select replace('一二三四五六七abcdefghijk213124123', var2, 'var2') from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5;
|
||||
select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters order by ts limit 5;
|
||||
select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') != 0 order by ts limit 5;
|
||||
select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5;
|
||||
select replace('一二三四五六七abcdefghijk213124123', var2, nch2) from ts_4893.meters where position(var2 IN '一二三四五六七abcdefghijk213124123') = 0 order by ts limit 5;
|
||||
select replace('aabbccdd','aa', 'ee');
|
||||
select replace('aabbccdd','AA', 'ee');
|
||||
select replace('北京','北' , '南');
|
||||
select replace('北京','京' , '南');
|
||||
select replace('北京taos','北' , '南');
|
||||
select replace(nch1, nch2, 't') from ts_4893.d0 order by ts limit 10;
|
||||
select replace(nch1, nch2, 't') from ts_4893.meters order by ts limit 10;
|
||||
select replace(nch1, var2, 't') from ts_4893.d0 order by ts limit 10;
|
||||
select replace(nch1, var2, 't') from ts_4893.meters order by ts limit 10;
|
||||
select replace(var1, nch2, 't') from ts_4893.d0 order by ts limit 10;
|
||||
select replace(var1, nch2, 't') from ts_4893.meters order by ts limit 10;
|
||||
select replace(var1, var2, 't') from ts_4893.d0 order by ts limit 10;
|
||||
select replace(var1, var2, 't') from ts_4893.meters order by ts limit 10;
|
||||
select replace(nch1, nch2, var1) from ts_4893.d0 order by ts limit 10;
|
||||
select replace(nch1, nch2, var1) from ts_4893.meters order by ts limit 10;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
select round();
|
||||
select round(10, );
|
||||
select round(, 2);
|
||||
select round('abc', 2);
|
||||
select round(123.23, 'a');
|
|
@ -17,3 +17,14 @@ select ROUND(current) from ts_4893.meters order by ts limit 20;
|
|||
select ROUND(87654321.123456789, id) from ts_4893.meters order by ts limit 10;
|
||||
select ROUND(current, id) from ts_4893.meters order by ts limit 10;
|
||||
select ROUND(current, 1) from ts_4893.meters order by ts limit 10;
|
||||
select round(10.55, 3);
|
||||
select round(10.55, 2);
|
||||
select round(10.55, 1);
|
||||
select round(10.55, 0);
|
||||
select round(10.55);
|
||||
select round(10.55, -1);
|
||||
select round(10.55, -10);
|
||||
select round(-10.55, 1);
|
||||
select round(99, 1);
|
||||
select round(current) from ts_4893.d0 order by ts limit 10;
|
||||
select round(current) from ts_4893.meters order by ts limit 10;
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
select sign();
|
||||
select sign('abc');
|
||||
select sign(10, 1);
|
|
@ -27,4 +27,10 @@ select pow(SIGN(10), 2);
|
|||
select sqrt(SIGN(10));
|
||||
select cast(SIGN(10) as int);
|
||||
select SIGN(sqrt(id)) from ts_4893.meters order by ts limit 5;
|
||||
select SIGN(SIGN(SIGN(SIGN(0))));
|
||||
select SIGN(SIGN(SIGN(SIGN(0))));
|
||||
select sign(1);
|
||||
select sign(10);
|
||||
select sign(-1);
|
||||
select sign(-10);
|
||||
select sign(current) from ts_4893.d0 order by ts limit 10;
|
||||
select sign(current) from ts_4893.meters order by ts limit 10;
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
select stddev_pop() from ts_4893.d0;
|
||||
select stddev_pop(ts) from ts_4893.d0;
|
||||
select stddev_pop(name) from ts_4893.d0;
|
||||
select stddev_pop(id, current) from ts_4893.d0;
|
||||
select stddev_pop() from ts_4893.meters;
|
||||
select stddev_pop(ts) from ts_4893.meters;
|
||||
select stddev_pop(name) from ts_4893.meters;
|
||||
select stddev_pop(id, current) from ts_4893.meters;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue