Merge branch '3.0' of https://github.com/taosdata/TDengine into fix/TD-30837
This commit is contained in:
commit
f79dcffc8c
|
@ -10,7 +10,7 @@ TDengine 客户端驱动提供了应用编程所需要的全部 API,并且在
|
|||
|
||||
| 参数名称 | 参数含义 |
|
||||
|:-----------:|:----------------------------------------------------------:|
|
||||
|firstEp | taos 启动时,主动连接的集群中首个 dnode 的 endpoint,缺省值:${hostname}:6030,若无法获取 ${hostname},则赋值为 localhost |
|
||||
|firstEp | taos 启动时,主动连接的集群中首个 dnode 的 endpoint,缺省值:hostname:6030,若无法获取该服务器的 hostname,则赋值为 localhost |
|
||||
|secondEp | 启动时,如果 firstEp 连接不上,尝试连接集群中第二个 dnode 的 endpoint,没有缺省值 |
|
||||
|numOfRpcSessions | 一个客户端能创建的最大连接数,取值范围:10-50000000(单位为毫秒);缺省值:500000 |
|
||||
|telemetryReporting | 是否上传 telemetry,0: 不上传,1: 上传;缺省值:1 |
|
||||
|
|
|
@ -76,7 +76,7 @@ window_clause: {
|
|||
FILL 语句指定某一窗口区间数据缺失的情况下的填充模式。填充模式包括以下几种:
|
||||
|
||||
1. 不进行填充:NONE(默认填充模式)。
|
||||
2. VALUE 填充:固定值填充,此时需要指定填充的数值。例如:FILL(VALUE, 1.23)。这里需要注意,最终填充的值受由相应列的类型决定,如 FILL(VALUE, 1.23),相应列为 INT 类型,则填充值为 1, 若查询列表中有多列需要FILL, 则需要给每一个FILL列指定VALUE, 如`SELECT _wstart, min(c1), max(c1) FROM ... FILL(VALUE, 0, 0)`, 注意, SELECT表达式中只有包含普通列时才需要指定FILL VALUE, 如`_wstart`, `_wstart+1a`, `now`, `1+1` 以及使用partition by时的partition key(如tbname)都不需要指定VALUE, 如`timediff(last(ts), _wstart)`则需要指定VALUE。
|
||||
2. VALUE 填充:固定值填充,此时需要指定填充的数值。例如:FILL(VALUE, 1.23)。这里需要注意,最终填充的值受由相应列的类型决定,如 FILL(VALUE, 1.23),相应列为 INT 类型,则填充值为 1, 若查询列表中有多列需要 FILL, 则需要给每一个 FILL 列指定 VALUE, 如 `SELECT _wstart, min(c1), max(c1) FROM ... FILL(VALUE, 0, 0)`, 注意, SELECT 表达式中只有包含普通列时才需要指定 FILL VALUE, 如 `_wstart`, `_wstart+1a`, `now`, `1+1` 以及使用 partition by 时的 partition key (如 tbname)都不需要指定 VALUE, 如 `timediff(last(ts), _wstart)` 则需要指定VALUE。
|
||||
3. PREV 填充:使用前一个非 NULL 值填充数据。例如:FILL(PREV)。
|
||||
4. NULL 填充:使用 NULL 填充数据。例如:FILL(NULL)。
|
||||
5. LINEAR 填充:根据前后距离最近的非 NULL 值做线性插值填充。例如:FILL(LINEAR)。
|
||||
|
|
|
@ -33,7 +33,7 @@ description: 对 JSON 类型如何使用的详细说明
|
|||
|
||||
## 支持的操作
|
||||
|
||||
1. 在 where 条件中时,支持函数 match/nmatch/between and/like/and/or/is null/is no null,不支持 in
|
||||
1. 在 where 条件中时,支持函数 match/nmatch/between and/like/and/or/is null/is not null,不支持 in
|
||||
|
||||
```
|
||||
select * from s1 where info->'k1' match 'v*';
|
||||
|
|
|
@ -917,6 +917,11 @@ int32_t taosGetErrSize();
|
|||
#define TSDB_CODE_FUNC_INVALID_RES_LENGTH TAOS_DEF_ERROR_CODE(0, 0x280E)
|
||||
#define TSDB_CODE_FUNC_HISTOGRAM_ERROR TAOS_DEF_ERROR_CODE(0, 0x280F)
|
||||
#define TSDB_CODE_FUNC_PERCENTILE_ERROR TAOS_DEF_ERROR_CODE(0, 0x2810)
|
||||
#define TSDB_CODE_FUNC_FUNTION_PARA_RANGE TAOS_DEF_ERROR_CODE(0, 0x2811)
|
||||
#define TSDB_CODE_FUNC_FUNTION_PARA_PRIMTS TAOS_DEF_ERROR_CODE(0, 0x2812)
|
||||
#define TSDB_CODE_FUNC_FUNTION_PARA_PK TAOS_DEF_ERROR_CODE(0, 0x2813)
|
||||
#define TSDB_CODE_FUNC_FUNTION_PARA_HAS_COL TAOS_DEF_ERROR_CODE(0, 0x2814)
|
||||
#define TSDB_CODE_FUNC_FUNCTION_HISTO_TYPE TAOS_DEF_ERROR_CODE(0, 0x2815)
|
||||
|
||||
|
||||
//udf
|
||||
|
|
|
@ -453,10 +453,10 @@ typedef enum ELogicConditionType {
|
|||
#define TSDB_DEFAULT_S3_CHUNK_SIZE (256 * 1024)
|
||||
#define TSDB_MIN_S3_KEEP_LOCAL (1 * 1440) // unit minute
|
||||
#define TSDB_MAX_S3_KEEP_LOCAL (365000 * 1440)
|
||||
#define TSDB_DEFAULT_S3_KEEP_LOCAL (3650 * 1440)
|
||||
#define TSDB_DEFAULT_S3_KEEP_LOCAL (365 * 1440)
|
||||
#define TSDB_MIN_S3_COMPACT 0
|
||||
#define TSDB_MAX_S3_COMPACT 1
|
||||
#define TSDB_DEFAULT_S3_COMPACT 0
|
||||
#define TSDB_DEFAULT_S3_COMPACT 1
|
||||
|
||||
#define TSDB_DB_MIN_WAL_RETENTION_PERIOD -1
|
||||
#define TSDB_REP_DEF_DB_WAL_RET_PERIOD 3600
|
||||
|
|
|
@ -287,7 +287,7 @@ int32_t tsTtlUnit = 86400;
|
|||
int32_t tsTtlPushIntervalSec = 10;
|
||||
int32_t tsTrimVDbIntervalSec = 60 * 60; // interval of trimming db in all vgroups
|
||||
int32_t tsS3MigrateIntervalSec = 60 * 60; // interval of s3migrate db in all vgroups
|
||||
bool tsS3MigrateEnabled = 1;
|
||||
bool tsS3MigrateEnabled = 0;
|
||||
int32_t tsGrantHBInterval = 60;
|
||||
int32_t tsUptimeInterval = 300; // seconds
|
||||
char tsUdfdResFuncs[512] = ""; // udfd resident funcs that teardown when udfd exits
|
||||
|
|
|
@ -583,7 +583,7 @@ static void mndSetDefaultDbCfg(SDbCfg *pCfg) {
|
|||
if (pCfg->tsdbPageSize <= 0) pCfg->tsdbPageSize = TSDB_DEFAULT_TSDB_PAGESIZE;
|
||||
if (pCfg->s3ChunkSize <= 0) pCfg->s3ChunkSize = TSDB_DEFAULT_S3_CHUNK_SIZE;
|
||||
if (pCfg->s3KeepLocal <= 0) pCfg->s3KeepLocal = TSDB_DEFAULT_S3_KEEP_LOCAL;
|
||||
if (pCfg->s3Compact <= 0) pCfg->s3Compact = TSDB_DEFAULT_S3_COMPACT;
|
||||
if (pCfg->s3Compact < 0) pCfg->s3Compact = TSDB_DEFAULT_S3_COMPACT;
|
||||
if (pCfg->withArbitrator < 0) pCfg->withArbitrator = TSDB_DEFAULT_DB_WITH_ARBITRATOR;
|
||||
if (pCfg->encryptAlgorithm < 0) pCfg->encryptAlgorithm = TSDB_DEFAULT_ENCRYPT_ALGO;
|
||||
}
|
||||
|
|
|
@ -4076,7 +4076,7 @@ typedef struct SMDropTbDbInfo {
|
|||
|
||||
typedef struct SMDropTbTsmaInfo {
|
||||
char tsmaResTbDbFName[TSDB_DB_FNAME_LEN];
|
||||
char tsmaResTbNamePrefix[TSDB_TABLE_NAME_LEN];
|
||||
char tsmaResTbNamePrefix[TSDB_TABLE_FNAME_LEN];
|
||||
int32_t suid;
|
||||
SMDropTbDbInfo dbInfo; // reference to DbInfo in pDbMap
|
||||
} SMDropTbTsmaInfo;
|
||||
|
@ -4207,6 +4207,7 @@ static int32_t mndCreateDropTbsTxnPrepare(SRpcMsg *pRsp, SMndDropTbsWithTsmaCtx
|
|||
SMnode *pMnode = pRsp->info.node;
|
||||
STrans *pTrans = mndTransCreate(pMnode, TRN_POLICY_RETRY, TRN_CONFLICT_GLOBAL, pRsp, "drop-tbs");
|
||||
mndTransSetChangeless(pTrans);
|
||||
mndTransSetSerial(pTrans);
|
||||
if (pTrans == NULL) {
|
||||
code = TSDB_CODE_MND_RETURN_VALUE_NULL;
|
||||
if (terrno != 0) code = terrno;
|
||||
|
@ -4294,6 +4295,18 @@ static int32_t mndDropTbAdd(SMnode *pMnode, SHashObj *pVgHashMap, const SVgroupI
|
|||
return 0;
|
||||
}
|
||||
|
||||
int vgInfoCmp(const void* lp, const void* rp) {
|
||||
SVgroupInfo* pLeft = (SVgroupInfo*)lp;
|
||||
SVgroupInfo* pRight = (SVgroupInfo*)rp;
|
||||
if (pLeft->hashBegin < pRight->hashBegin) {
|
||||
return -1;
|
||||
} else if (pLeft->hashBegin > pRight->hashBegin) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int32_t mndGetDbVgInfoForTsma(SMnode *pMnode, const char *dbname, SMDropTbTsmaInfo *pInfo) {
|
||||
int32_t code = 0;
|
||||
SDbObj *pDb = mndAcquireDb(pMnode, dbname);
|
||||
|
@ -4308,6 +4321,7 @@ static int32_t mndGetDbVgInfoForTsma(SMnode *pMnode, const char *dbname, SMDropT
|
|||
goto _end;
|
||||
}
|
||||
mndBuildDBVgroupInfo(pDb, pMnode, pInfo->dbInfo.dbVgInfos);
|
||||
taosArraySort(pInfo->dbInfo.dbVgInfos, vgInfoCmp);
|
||||
|
||||
pInfo->dbInfo.hashPrefix = pDb->cfg.hashPrefix;
|
||||
pInfo->dbInfo.hashSuffix = pDb->cfg.hashSuffix;
|
||||
|
@ -4380,9 +4394,8 @@ static int32_t mndDropTbAddTsmaResTbsForSingleVg(SMnode *pMnode, SMndDropTbsWith
|
|||
if (pInfos) {
|
||||
SMDropTbTsmaInfo info = {0};
|
||||
int32_t len = sprintf(buf, "%s", pSma->name);
|
||||
len = taosCreateMD5Hash(buf, len);
|
||||
sprintf(info.tsmaResTbDbFName, "%s", pSma->db);
|
||||
snprintf(info.tsmaResTbNamePrefix, TSDB_TABLE_NAME_LEN, "%s", buf);
|
||||
snprintf(info.tsmaResTbNamePrefix, TSDB_TABLE_FNAME_LEN, "%s", buf);
|
||||
SMDropTbDbInfo *pDbInfo = taosHashGet(pCtx->pDbMap, pSma->db, TSDB_DB_FNAME_LEN);
|
||||
info.suid = pSma->dstTbUid;
|
||||
if (!pDbInfo) {
|
||||
|
@ -4417,14 +4430,17 @@ static int32_t mndDropTbAddTsmaResTbsForSingleVg(SMnode *pMnode, SMndDropTbsWith
|
|||
|
||||
SMDropTbTsmaInfos *pInfos = taosHashGet(pCtx->pTsmaMap, &pTb->suid, sizeof(pTb->suid));
|
||||
SArray *pVgInfos = NULL;
|
||||
char buf[TSDB_TABLE_FNAME_LEN];
|
||||
char buf[TSDB_TABLE_FNAME_LEN + TSDB_TABLE_NAME_LEN + 1];
|
||||
char resTbFullName[TSDB_TABLE_FNAME_LEN + 1] = {0};
|
||||
for (int32_t j = 0; j < pInfos->pTsmaInfos->size; ++j) {
|
||||
SMDropTbTsmaInfo *pInfo = taosArrayGet(pInfos->pTsmaInfos, j);
|
||||
int32_t len = sprintf(buf, "%s.%s_%s", pInfo->tsmaResTbDbFName, pInfo->tsmaResTbNamePrefix, pTb->name);
|
||||
uint32_t hashVal =
|
||||
taosGetTbHashVal(buf, len, pInfo->dbInfo.hashMethod, pInfo->dbInfo.hashPrefix, pInfo->dbInfo.hashSuffix);
|
||||
int32_t len = sprintf(buf, "%s_%s", pInfo->tsmaResTbNamePrefix, pTb->name);
|
||||
len = taosCreateMD5Hash(buf, len);
|
||||
len = snprintf(resTbFullName, TSDB_TABLE_FNAME_LEN + 1, "%s.%s", pInfo->tsmaResTbDbFName, buf);
|
||||
uint32_t hashVal = taosGetTbHashVal(resTbFullName, len, pInfo->dbInfo.hashMethod, pInfo->dbInfo.hashPrefix,
|
||||
pInfo->dbInfo.hashSuffix);
|
||||
const SVgroupInfo *pVgInfo = taosArraySearch(pInfo->dbInfo.dbVgInfos, &hashVal, vgHashValCmp, TD_EQ);
|
||||
void *p = taosStrdup(buf + strlen(pInfo->tsmaResTbDbFName) + TSDB_NAME_DELIMITER_LEN);
|
||||
void *p = taosStrdup(resTbFullName + strlen(pInfo->tsmaResTbDbFName) + TSDB_NAME_DELIMITER_LEN);
|
||||
if (taosArrayPush(pCtx->pResTbNames, &p) == NULL) {
|
||||
code = terrno;
|
||||
goto _end;
|
||||
|
|
|
@ -409,7 +409,12 @@ int32_t vnodeSyncCommit(SVnode *pVnode) {
|
|||
vnodeAWait(&pVnode->commitTask);
|
||||
|
||||
_exit:
|
||||
vError("vgId:%d, %s failed at line %d since %s", TD_VID(pVnode), __func__, lino, tstrerror(code));
|
||||
if (code) {
|
||||
vError("vgId:%d, %s failed at line %d since %s", TD_VID(pVnode), __func__, lino, tstrerror(code));
|
||||
} else {
|
||||
vInfo("vgId:%d, sync commit end", TD_VID(pVnode));
|
||||
}
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
|
|
|
@ -416,7 +416,7 @@ _exit:
|
|||
return 0;
|
||||
}
|
||||
|
||||
int32_t azGetObjectToFile(const char *object_name, const char *fileName) {
|
||||
static int32_t azGetObjectToFileImpl(const char *object_name, const char *fileName) {
|
||||
int32_t code = TSDB_CODE_SUCCESS;
|
||||
std::string accountName = tsS3AccessKeyId[0];
|
||||
std::string accountKey = tsS3AccessKeySecret[0];
|
||||
|
@ -450,6 +450,23 @@ int32_t azGetObjectToFile(const char *object_name, const char *fileName) {
|
|||
TAOS_RETURN(code);
|
||||
}
|
||||
|
||||
int32_t azGetObjectToFile(const char *object_name, const char *fileName) {
|
||||
int32_t code = 0;
|
||||
|
||||
try {
|
||||
code = azGetObjectToFileImpl(object_name, fileName);
|
||||
} catch (const std::exception &e) {
|
||||
azError("%s: Reason Phrase: %s", __func__, e.what());
|
||||
|
||||
code = TAOS_SYSTEM_ERROR(EIO);
|
||||
azError("%s failed at line %d since %s", __func__, __LINE__, tstrerror(code));
|
||||
|
||||
TAOS_RETURN(code);
|
||||
}
|
||||
|
||||
TAOS_RETURN(code);
|
||||
}
|
||||
|
||||
int32_t azGetObjectsByPrefix(const char *prefix, const char *path) {
|
||||
const std::string delimiter = "/";
|
||||
std::string accountName = tsS3AccessKeyId[0];
|
||||
|
|
|
@ -499,6 +499,7 @@ void destroyStreamFinalIntervalOperatorInfo(void* param) {
|
|||
blockDataDestroy(pInfo->pMidRetriveRes);
|
||||
blockDataDestroy(pInfo->pMidPulloverRes);
|
||||
if (pInfo->pUpdatedMap != NULL) {
|
||||
// free flushed pos
|
||||
tSimpleHashSetFreeFp(pInfo->pUpdatedMap, destroyFlusedppPos);
|
||||
tSimpleHashCleanup(pInfo->pUpdatedMap);
|
||||
pInfo->pUpdatedMap = NULL;
|
||||
|
@ -1977,7 +1978,6 @@ int32_t createStreamFinalIntervalOperatorInfo(SOperatorInfo* downstream, SPhysiN
|
|||
code = initAggSup(&pOperator->exprSupp, &pInfo->aggSup, pExprInfo, numOfCols, keyBufSize, pTaskInfo->id.str,
|
||||
pInfo->pState, &pTaskInfo->storageAPI.functionStore);
|
||||
QUERY_CHECK_CODE(code, lino, _error);
|
||||
tSimpleHashSetFreeFp(pInfo->aggSup.pResultRowHashTable, destroyFlusedppPos);
|
||||
|
||||
code = initExecTimeWindowInfo(&pInfo->twAggSup.timeWindowData, &pTaskInfo->window);
|
||||
QUERY_CHECK_CODE(code, lino, _error);
|
||||
|
@ -5378,7 +5378,6 @@ static int32_t createStreamSingleIntervalOperatorInfo(SOperatorInfo* downstream,
|
|||
code = initAggSup(pSup, &pInfo->aggSup, pExprInfo, numOfCols, keyBufSize, pTaskInfo->id.str, pInfo->pState,
|
||||
&pTaskInfo->storageAPI.functionStore);
|
||||
QUERY_CHECK_CODE(code, lino, _error);
|
||||
tSimpleHashSetFreeFp(pInfo->aggSup.pResultRowHashTable, destroyFlusedppPos);
|
||||
|
||||
if (pIntervalPhyNode->window.pExprs != NULL) {
|
||||
int32_t numOfScalar = 0;
|
||||
|
|
|
@ -22,16 +22,48 @@ extern "C" {
|
|||
|
||||
#include "functionMgtInt.h"
|
||||
|
||||
struct SFunctionParaInfo;
|
||||
|
||||
typedef int32_t (*FTranslateFunc)(SFunctionNode* pFunc, char* pErrBuf, int32_t len);
|
||||
typedef EFuncDataRequired (*FFuncDataRequired)(SFunctionNode* pFunc, STimeWindow* pTimeWindow);
|
||||
typedef int32_t (*FCreateMergeFuncParameters)(SNodeList* pRawParameters, SNode* pPartialRes, SNodeList** pParameters);
|
||||
typedef EFuncDataRequired (*FFuncDynDataRequired)(void* pRes, SDataBlockInfo* pBlocInfo);
|
||||
typedef EFuncReturnRows (*FEstimateReturnRows)(SFunctionNode* pFunc);
|
||||
|
||||
#define MAX_FUNC_PARA_NUM 16
|
||||
#define MAX_FUNC_PARA_FIXED_VALUE_NUM 16
|
||||
typedef struct SParamRange {
|
||||
int64_t iMinVal;
|
||||
int64_t iMaxVal;
|
||||
} SParamRange;
|
||||
|
||||
typedef struct SParamInfo {
|
||||
bool isLastParam;
|
||||
int8_t startParam;
|
||||
int8_t endParam;
|
||||
uint64_t validDataType;
|
||||
uint64_t validNodeType;
|
||||
uint64_t paramAttribute;
|
||||
uint8_t valueRangeFlag; // 0 for no range and no fixed value, 1 for value has range, 2 for fixed value
|
||||
uint8_t fixedValueSize;
|
||||
char* fixedStrValue[MAX_FUNC_PARA_FIXED_VALUE_NUM]; // used for input parameter
|
||||
int64_t fixedNumValue[MAX_FUNC_PARA_FIXED_VALUE_NUM]; // used for input parameter
|
||||
SParamRange range;
|
||||
} SParamInfo;
|
||||
|
||||
typedef struct SFunctionParaInfo {
|
||||
int8_t minParamNum;
|
||||
int8_t maxParamNum;
|
||||
uint8_t paramInfoPattern;
|
||||
SParamInfo inputParaInfo[MAX_FUNC_PARA_NUM][MAX_FUNC_PARA_NUM];
|
||||
SParamInfo outputParaInfo;
|
||||
} SFunctionParaInfo;
|
||||
|
||||
typedef struct SBuiltinFuncDefinition {
|
||||
const char* name;
|
||||
EFunctionType type;
|
||||
uint64_t classification;
|
||||
SFunctionParaInfo parameters;
|
||||
FTranslateFunc translateFunc;
|
||||
FFuncDataRequired dataRequiredFunc;
|
||||
FFuncDynDataRequired dynDataRequiredFunc;
|
||||
|
|
|
@ -64,6 +64,80 @@ extern "C" {
|
|||
|
||||
#define FUNC_UDF_ID_START 5000
|
||||
|
||||
#define FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(n) ((uint64_t)1 << n)
|
||||
#define FUNC_PARAM_SUPPORT_ALL_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(0)
|
||||
#define FUNC_PARAM_SUPPORT_NUMERIC_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(1)
|
||||
#define FUNC_PARAM_SUPPORT_VAR_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(2)
|
||||
#define FUNC_PARAM_SUPPORT_STRING_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(3)
|
||||
#define FUNC_PARAM_SUPPORT_BOOL_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(4)
|
||||
#define FUNC_PARAM_SUPPORT_TINYINT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(5)
|
||||
#define FUNC_PARAM_SUPPORT_SMALLINT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(6)
|
||||
#define FUNC_PARAM_SUPPORT_INT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(7)
|
||||
#define FUNC_PARAM_SUPPORT_BIGINT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(8)
|
||||
#define FUNC_PARAM_SUPPORT_FLOAT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(9)
|
||||
#define FUNC_PARAM_SUPPORT_DOUBLE_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(10)
|
||||
#define FUNC_PARAM_SUPPORT_VARCHAR_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(11)
|
||||
#define FUNC_PARAM_SUPPORT_TIMESTAMP_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(12)
|
||||
#define FUNC_PARAM_SUPPORT_NCHAR_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(13)
|
||||
#define FUNC_PARAM_SUPPORT_UTINYINT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(14)
|
||||
#define FUNC_PARAM_SUPPORT_USMALLINT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(15)
|
||||
#define FUNC_PARAM_SUPPORT_UINT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(16)
|
||||
#define FUNC_PARAM_SUPPORT_UBIGINT_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(17)
|
||||
#define FUNC_PARAM_SUPPORT_JSON_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(18)
|
||||
#define FUNC_PARAM_SUPPORT_VARB_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(19)
|
||||
#define FUNC_PARAM_SUPPORT_GEOMETRY_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(20)
|
||||
#define FUNC_PARAM_SUPPORT_INTEGER_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(21)
|
||||
#define FUNC_PARAM_SUPPORT_NULL_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(22)
|
||||
#define FUNC_PARAM_SUPPORT_UNIX_TS_TYPE FUNC_MGT_FUNC_PARAM_SUPPORT_TYPE(23)
|
||||
|
||||
|
||||
|
||||
#define FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(n) ((uint64_t)1 << n)
|
||||
#define FUNC_PARAM_SUPPORT_EXPR_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(0)
|
||||
#define FUNC_PARAM_SUPPORT_VALUE_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(1)
|
||||
#define FUNC_PARAM_SUPPORT_OPERATOR_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(2)
|
||||
#define FUNC_PARAM_SUPPORT_FUNCTION_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(3)
|
||||
#define FUNC_PARAM_SUPPORT_LOGIC_CONDITION_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(4)
|
||||
#define FUNC_PARAM_SUPPORT_CASE_WHEN_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(5)
|
||||
#define FUNC_PARAM_SUPPORT_COLUMN_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(6)
|
||||
#define FUNC_PARAM_SUPPORT_NOT_VALUE_NODE FUNC_MGT_FUNC_PARAM_SUPPORT_NODE(7)
|
||||
|
||||
#define FUNC_PARAM_NO_SPECIFIC_ATTRIBUTE 0
|
||||
#define FUNC_PARAM_MUST_BE_PRIMTS 1
|
||||
#define FUNC_PARAM_MUST_BE_PK 2
|
||||
#define FUNC_PARAM_MUST_HAVE_COLUMN 3
|
||||
#define FUNC_PARAM_MUST_BE_TIME_UNIT 4
|
||||
#define FUNC_PARAM_VALUE_NODE_NOT_NULL 5
|
||||
|
||||
#define FUNC_PARAM_NO_SPECIFIC_VALUE 0
|
||||
#define FUNC_PARAM_HAS_RANGE 1
|
||||
#define FUNC_PARAM_HAS_FIXED_VALUE 2
|
||||
|
||||
#define FUNC_ERR_RET(c) \
|
||||
do { \
|
||||
int32_t _code = c; \
|
||||
if (_code != TSDB_CODE_SUCCESS) { \
|
||||
terrno = _code; \
|
||||
return _code; \
|
||||
} \
|
||||
} while (0)
|
||||
#define FUNC_RET(c) \
|
||||
do { \
|
||||
int32_t _code = c; \
|
||||
if (_code != TSDB_CODE_SUCCESS) { \
|
||||
terrno = _code; \
|
||||
} \
|
||||
return _code; \
|
||||
} while (0)
|
||||
#define FUNC_ERR_JRET(c) \
|
||||
do { \
|
||||
code = c; \
|
||||
if (code != TSDB_CODE_SUCCESS) { \
|
||||
terrno = code; \
|
||||
goto _return; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -761,6 +761,11 @@ TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_SETUP_ERROR, "Function set up fail
|
|||
TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_INVALID_RES_LENGTH, "Function result exceed max length")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_HISTOGRAM_ERROR, "Function failed to calculate histogram")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_PERCENTILE_ERROR, "Function failed to calculate percentile")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_FUNTION_PARA_RANGE, "Invalid function para range")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_FUNTION_PARA_PRIMTS, "Function parameter should be primary timestamp")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_FUNTION_PARA_PK, "Function parameter should be primary key")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_FUNC_FUNTION_PARA_HAS_COL, "Function parameter should have column")
|
||||
|
||||
|
||||
//udf
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_UDF_STOPPING, "udf is stopping")
|
||||
|
|
|
@ -73,7 +73,7 @@ class TDSql:
|
|||
for k, v in kwargs.items():
|
||||
s += f" {k} {v}"
|
||||
if "duration" not in kwargs:
|
||||
s += " duration 300"
|
||||
s += " duration 100"
|
||||
self.cursor.execute(s)
|
||||
s = f'use {dbname}'
|
||||
self.cursor.execute(s)
|
||||
|
|
|
@ -296,7 +296,7 @@ class TDTestCase(TBase):
|
|||
|
||||
def test_error(self):
|
||||
tdSql.error("select * from (select to_iso8601(ts, timezone()), timezone() from ts_4893.meters \
|
||||
order by ts desc) limit 1000;", expectErrInfo="Not supported timzone format") # TS-5340
|
||||
order by ts desc) limit 1000;", expectErrInfo="Invalid parameter data type : to_iso8601") # TS-5340
|
||||
|
||||
def run(self):
|
||||
tdLog.debug(f"start to excute {__file__}")
|
||||
|
|
|
@ -42,17 +42,17 @@ class TDTestCase:
|
|||
tdSql.query('show create database scd;')
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'scd')
|
||||
tdSql.checkData(0, 1, "CREATE DATABASE `scd` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 2 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 5256000m S3_COMPACT 0")
|
||||
tdSql.checkData(0, 1, "CREATE DATABASE `scd` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 2 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 525600m S3_COMPACT 1")
|
||||
|
||||
tdSql.query('show create database scd2;')
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'scd2')
|
||||
tdSql.checkData(0, 1, "CREATE DATABASE `scd2` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 3 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 5256000m S3_COMPACT 0")
|
||||
tdSql.checkData(0, 1, "CREATE DATABASE `scd2` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 3 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 525600m S3_COMPACT 1")
|
||||
|
||||
tdSql.query('show create database scd4')
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'scd4')
|
||||
tdSql.checkData(0, 1, "CREATE DATABASE `scd4` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 13 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 5256000m S3_COMPACT 0")
|
||||
tdSql.checkData(0, 1, "CREATE DATABASE `scd4` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 13 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 525600m S3_COMPACT 1")
|
||||
|
||||
|
||||
self.restartTaosd(1, dbname='scd')
|
||||
|
@ -60,16 +60,16 @@ class TDTestCase:
|
|||
tdSql.query('show create database scd;')
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'scd')
|
||||
tdSql.checkData(0, 1, "CREATE DATABASE `scd` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 2 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 5256000m S3_COMPACT 0")
|
||||
tdSql.checkData(0, 1, "CREATE DATABASE `scd` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 2 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 525600m S3_COMPACT 1")
|
||||
|
||||
tdSql.query('show create database scd2;')
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'scd2')
|
||||
tdSql.checkData(0, 1, "CREATE DATABASE `scd2` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 3 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 5256000m S3_COMPACT 0")
|
||||
tdSql.checkData(0, 1, "CREATE DATABASE `scd2` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 3 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 525600m S3_COMPACT 1")
|
||||
tdSql.query('show create database scd4')
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 'scd4')
|
||||
tdSql.checkData(0, 1, "CREATE DATABASE `scd4` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 13 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 5256000m S3_COMPACT 0")
|
||||
tdSql.checkData(0, 1, "CREATE DATABASE `scd4` BUFFER 256 CACHESIZE 1 CACHEMODEL 'none' COMP 2 DURATION 10d WAL_FSYNC_PERIOD 3000 MAXROWS 4096 MINROWS 100 STT_TRIGGER 13 KEEP 3650d,3650d,3650d PAGES 256 PAGESIZE 4 PRECISION 'ms' REPLICA 1 WAL_LEVEL 1 VGROUPS 2 SINGLE_STABLE 0 TABLE_PREFIX 0 TABLE_SUFFIX 0 TSDB_PAGESIZE 4 WAL_RETENTION_PERIOD 3600 WAL_RETENTION_SIZE 0 KEEP_TIME_OFFSET 0 ENCRYPT_ALGORITHM 'none' S3_CHUNKSIZE 262144 S3_KEEPLOCAL 525600m S3_COMPACT 1")
|
||||
|
||||
|
||||
tdSql.execute('drop database scd')
|
||||
|
|
|
@ -104,7 +104,7 @@ class TDSql:
|
|||
for k, v in kwargs.items():
|
||||
s += f" {k} {v}"
|
||||
if "duration" not in kwargs:
|
||||
s += " duration 300"
|
||||
s += " duration 100"
|
||||
self.cursor.execute(s)
|
||||
s = f'use {dbname}'
|
||||
self.cursor.execute(s)
|
||||
|
|
|
@ -128,6 +128,12 @@ endi
|
|||
if $data21_db != 3000 then # wal_fsync_period
|
||||
return -1
|
||||
endi
|
||||
if $data30_db != 525600m then # s3_keeplocal
|
||||
return -1
|
||||
endi
|
||||
if $data31_db != 1 then # s3_compact
|
||||
return -1
|
||||
endi
|
||||
|
||||
sql drop database db
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ system sh/exec.sh -n dnode1 -s start
|
|||
sql connect
|
||||
|
||||
print =============== create database
|
||||
sql create database db duration 300 keep 365000d,365000d,365000d
|
||||
sql create database db duration 120 keep 365000d,365000d,365000d
|
||||
sql select * from information_schema.ins_databases
|
||||
if $rows != 3 then
|
||||
return -1
|
||||
|
|
|
@ -4,7 +4,7 @@ system sh/exec.sh -n dnode1 -s start
|
|||
sql connect
|
||||
|
||||
print =============== create database
|
||||
sql create database d0 duration 300
|
||||
sql create database d0 duration 120
|
||||
sql use d0
|
||||
|
||||
print =============== create super table and child table
|
||||
|
|
|
@ -126,21 +126,21 @@ sql drop table stb;
|
|||
|
||||
print ========== step5
|
||||
sql drop database if exists db;
|
||||
sql create database db duration 300;
|
||||
sql create database db duration 120;
|
||||
sql use db;
|
||||
sql create table stb1(ts timestamp, c_int int, c_bint bigint, c_sint smallint, c_tint tinyint, c_float float, c_double double, c_bool bool, c_binary binary(16), c_nchar nchar(32), c_ts timestamp, c_tint_un tinyint unsigned, c_sint_un smallint unsigned, c_int_un int unsigned, c_bint_un bigint unsigned) tags (t_int int);
|
||||
sql CREATE SMA INDEX sma_index_1 ON stb1 function(min(c_int), max(c_int)) interval(6m, 10s) sliding(6m) watermark 5s;
|
||||
|
||||
print ========== step6 repeat
|
||||
sql drop database if exists db;
|
||||
sql create database db duration 300;
|
||||
sql create database db duration 120;
|
||||
sql use db;
|
||||
sql create table stb1(ts timestamp, c_int int, c_bint bigint ) tags (t_int int);
|
||||
sql CREATE SMA INDEX sma_index_1 ON stb1 function(min(c_int), max(c_int)) interval(6m, 10s) sliding(6m) watermark 5s;
|
||||
|
||||
print ========== step7
|
||||
sql drop database if exists db;
|
||||
sql create database db duration 300;
|
||||
sql create database db duration 120;
|
||||
sql use db;
|
||||
sql create table stb1(ts timestamp, c_int int, c_bint bigint, c_sint smallint, c_tint tinyint,c_float float, c_double double, c_bool bool,c_binary binary(16), c_nchar nchar(32), c_ts timestamp,c_tint_un tinyint unsigned, c_sint_un smallint unsigned,c_int_un int unsigned, c_bint_un bigint unsigned) tags (t_int int);
|
||||
|
||||
|
@ -160,7 +160,7 @@ sql DROP INDEX sma_index_3 ;
|
|||
print ========== step8
|
||||
sql drop database if exists db;
|
||||
sleep 2000
|
||||
sql create database db duration 300;
|
||||
sql create database db duration 120;
|
||||
sql use db;
|
||||
sql create table stb1(ts timestamp, c_int int, c_bint bigint, c_sint smallint, c_tint tinyint,c_float float, c_double double, c_bool bool,c_binary binary(16), c_nchar nchar(32), c_ts timestamp,c_tint_un tinyint unsigned, c_sint_un smallint unsigned,c_int_un int unsigned, c_bint_un bigint unsigned) tags (t_int int);
|
||||
|
||||
|
|
|
@ -98,21 +98,21 @@ sql drop table stb;
|
|||
|
||||
print ========== step5
|
||||
sql drop database if exists db;
|
||||
sql create database db duration 300;
|
||||
sql create database db duration 120;
|
||||
sql use db;
|
||||
sql create table stb1(ts timestamp, c_int int, c_bint bigint, c_sint smallint, c_tint tinyint, c_float float, c_double double, c_bool bool, c_binary binary(16), c_nchar nchar(32), c_ts timestamp, c_tint_un tinyint unsigned, c_sint_un smallint unsigned, c_int_un int unsigned, c_bint_un bigint unsigned) tags (t_int int);
|
||||
sql CREATE SMA INDEX sma_index_1 ON stb1 function(min(c_int), max(c_int)) interval(6m, 10s) sliding(6m) watermark 5s;
|
||||
|
||||
print ========== step6 repeat
|
||||
sql drop database if exists db;
|
||||
sql create database db duration 300;
|
||||
sql create database db duration 120;
|
||||
sql use db;
|
||||
sql create table stb1(ts timestamp, c_int int, c_bint bigint ) tags (t_int int);
|
||||
sql CREATE SMA INDEX sma_index_1 ON stb1 function(min(c_int), max(c_int)) interval(6m, 10s) sliding(6m) watermark 5s;
|
||||
|
||||
print ========== step7
|
||||
sql drop database if exists db;
|
||||
sql create database db duration 300;
|
||||
sql create database db duration 120;
|
||||
sql use db;
|
||||
sql create table stb1(ts timestamp, c_int int, c_bint bigint, c_sint smallint, c_tint tinyint,c_float float, c_double double, c_bool bool,c_binary binary(16), c_nchar nchar(32), c_ts timestamp,c_tint_un tinyint unsigned, c_sint_un smallint unsigned,c_int_un int unsigned, c_bint_un bigint unsigned) tags (t_int int);
|
||||
|
||||
|
@ -131,7 +131,7 @@ sql DROP INDEX sma_index_3 ;
|
|||
|
||||
print ========== step8
|
||||
sql drop database if exists db;
|
||||
sql create database db duration 300;
|
||||
sql create database db duration 120;
|
||||
sql use db;
|
||||
sql create table stb1(ts timestamp, c_int int, c_bint bigint, c_sint smallint, c_tint tinyint,c_float float, c_double double, c_bool bool,c_binary binary(16), c_nchar nchar(32), c_ts timestamp,c_tint_un tinyint unsigned, c_sint_un smallint unsigned,c_int_un int unsigned, c_bint_un bigint unsigned) tags (t_int int);
|
||||
|
||||
|
|
|
@ -189,10 +189,10 @@ $loop_count = 0
|
|||
|
||||
loop4:
|
||||
|
||||
sleep 200
|
||||
sleep 500
|
||||
|
||||
$loop_count = $loop_count + 1
|
||||
if $loop_count == 10 then
|
||||
if $loop_count == 20 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
|
@ -324,5 +324,197 @@ if $data[29][1] != 2 then
|
|||
goto loop7
|
||||
endi
|
||||
|
||||
print step4====
|
||||
|
||||
sql create database test4 vgroups 1;
|
||||
sql use test4;
|
||||
|
||||
sql create stable st(ts timestamp,a int,b int,c int, d double) tags(ta int,tb int,tc int);
|
||||
sql create table t1 using st tags(1,1,1);
|
||||
sql create table t2 using st tags(2,2,2);
|
||||
sql create table t3 using st tags(2,2,2);
|
||||
sql create table t4 using st tags(2,2,2);
|
||||
sql create table t5 using st tags(2,2,2);
|
||||
sql create table t6 using st tags(2,2,2);
|
||||
|
||||
sql create stream streams4 trigger window_close IGNORE EXPIRED 0 into streamt as select _wstart, count(*), now from st partition by tbname interval(1s);
|
||||
sql create stream streams5 trigger window_close IGNORE EXPIRED 0 into streamt1 as select _wstart, count(*), now from st partition by b interval(1s);
|
||||
|
||||
run tsim/stream/checkTaskStatus.sim
|
||||
|
||||
sql insert into t1 values(1648791211000,1,1,1,1.1) t2 values (1648791211000,2,2,2,2.1) t3 values(1648791211000,3,3,3,3.1) t4 values(1648791211000,4,4,4,4.1) t5 values (1648791211000,5,5,5,5.1) t6 values(1648791211000,6,6,6,6.1);
|
||||
|
||||
sql insert into t1 values(now,1,1,1,1.1) t2 values (now,2,2,2,2.1) t3 values(now,3,3,3,3.1) t4 values(now,4,4,4,4.1) t5 values (now,5,5,5,5.1) t6 values(now,6,6,6,6.1);
|
||||
|
||||
|
||||
$loop_count = 0
|
||||
|
||||
loop8:
|
||||
|
||||
sleep 200
|
||||
|
||||
$loop_count = $loop_count + 1
|
||||
if $loop_count == 20 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print sql select * from streamt;
|
||||
sql select * from streamt;
|
||||
|
||||
if $rows != 6 then
|
||||
print ======rows=$rows
|
||||
goto loop8
|
||||
endi
|
||||
|
||||
if $data01 != 1 then
|
||||
print ======data01=$data01
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data11 != 1 then
|
||||
print ======data11=$data11
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data21 != 1 then
|
||||
print ======data21=$data21
|
||||
return -1
|
||||
endi
|
||||
|
||||
$loop_count = 0
|
||||
|
||||
loop8_1:
|
||||
|
||||
sleep 200
|
||||
|
||||
$loop_count = $loop_count + 1
|
||||
if $loop_count == 20 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print sql select * from streamt1;
|
||||
sql select * from streamt1;
|
||||
|
||||
if $rows != 6 then
|
||||
print ======rows=$rows
|
||||
goto loop8_1
|
||||
endi
|
||||
|
||||
if $data01 != 1 then
|
||||
print ======data01=$data01
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data11 != 1 then
|
||||
print ======data11=$data11
|
||||
return -1
|
||||
endi
|
||||
|
||||
if $data21 != 1 then
|
||||
print ======data21=$data21
|
||||
return -1
|
||||
endi
|
||||
|
||||
sleep 2000
|
||||
|
||||
sql insert into t1 values(now,1,1,1,1.1) t2 values (now,2,2,2,2.1) t3 values(now,3,3,3,3.1) t4 values(now,4,4,4,4.1) t5 values (now,5,5,5,5.1) t6 values(now,6,6,6,6.1);
|
||||
|
||||
sleep 2000
|
||||
|
||||
sql insert into t1 values(now,1,1,1,1.1) t2 values (now,2,2,2,2.1) t3 values(now,3,3,3,3.1) t4 values(now,4,4,4,4.1) t5 values (now,5,5,5,5.1) t6 values(now,6,6,6,6.1);
|
||||
|
||||
$loop_count = 0
|
||||
|
||||
loop8_1:
|
||||
|
||||
sleep 200
|
||||
|
||||
$loop_count = $loop_count + 1
|
||||
if $loop_count == 20 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print sql select * from streamt order by 1 desc;
|
||||
sql select * from streamt order by 1 desc;
|
||||
|
||||
if $data01 != 1 then
|
||||
print ======data01=$data01
|
||||
goto loop8_1
|
||||
endi
|
||||
|
||||
print sql select * from streamt1 order by 1 desc;
|
||||
sql select * from streamt1 order by 1 desc;
|
||||
|
||||
if $data01 != 1 then
|
||||
print ======data01=$data01
|
||||
goto loop8_1
|
||||
endi
|
||||
|
||||
sleep 2000
|
||||
|
||||
sql insert into t1 values(now,1,1,1,1.1)
|
||||
sql insert into t2 values(now,2,2,2,2.1);
|
||||
sql insert into t3 values(now,3,3,3,3.1);
|
||||
sql insert into t4 values(now,4,4,4,4.1);
|
||||
sql insert into t5 values(now,5,5,5,5.1);
|
||||
sql insert into t6 values(now,6,6,6,6.1);
|
||||
|
||||
$loop_count = 0
|
||||
|
||||
loop9:
|
||||
|
||||
sleep 200
|
||||
|
||||
$loop_count = $loop_count + 1
|
||||
if $loop_count == 10 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print sql select * from streamt order by 1 desc;
|
||||
sql select * from streamt order by 1 desc;
|
||||
|
||||
if $data01 != 1 then
|
||||
print ======data01=$data01
|
||||
goto loop9
|
||||
endi
|
||||
|
||||
if $data11 != 1 then
|
||||
print ======data11=$data11
|
||||
goto loop9
|
||||
endi
|
||||
|
||||
if $data21 != 1 then
|
||||
print ======data21=$data21
|
||||
goto loop9
|
||||
endi
|
||||
|
||||
$loop_count = 0
|
||||
|
||||
loop10:
|
||||
|
||||
sleep 200
|
||||
|
||||
$loop_count = $loop_count + 1
|
||||
if $loop_count == 10 then
|
||||
return -1
|
||||
endi
|
||||
|
||||
print sql select * from streamt1 order by 1 desc;
|
||||
sql select * from streamt1 order by 1 desc;
|
||||
|
||||
if $data01 != 1 then
|
||||
print ======data01=$data01
|
||||
goto loop10
|
||||
endi
|
||||
|
||||
if $data11 != 1 then
|
||||
print ======data11=$data11
|
||||
goto loop10
|
||||
endi
|
||||
|
||||
if $data21 != 1 then
|
||||
print ======data21=$data21
|
||||
goto loop10
|
||||
endi
|
||||
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
|
@ -32,7 +32,7 @@ class TDTestCase:
|
|||
self.replicaVar = int(replicaVar)
|
||||
tdLog.debug(f"start to excute {__file__}")
|
||||
tdSql.init(conn.cursor())
|
||||
self.deletedDataSql= '''drop database if exists deldata;create database deldata duration 300 stt_trigger 1; ;use deldata;
|
||||
self.deletedDataSql= '''drop database if exists deldata;create database deldata duration 100 stt_trigger 1; ;use deldata;
|
||||
create table deldata.stb1 (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) tags (t1 int);
|
||||
create table deldata.ct1 using deldata.stb1 tags ( 1 );
|
||||
insert into deldata.ct1 values ( now()-0s, 0, 0, 0, 0, 0.0, 0.0, 0, 'binary0', 'nchar0', now()+0a ) ( now()-10s, 1, 11111, 111, 11, 1.11, 11.11, 1, 'binary1', 'nchar1', now()+1a ) ( now()-20s, 2, 22222, 222, 22, 2.22, 22.22, 0, 'binary2', 'nchar2', now()+2a ) ( now()-30s, 3, 33333, 333, 33, 3.33, 33.33, 1, 'binary3', 'nchar3', now()+3a );
|
||||
|
|
|
@ -30,7 +30,7 @@ class TDTestCase:
|
|||
self.replicaVar = int(replicaVar)
|
||||
tdLog.debug(f"start to excute {__file__}")
|
||||
tdSql.init(conn.cursor())
|
||||
self.deletedDataSql= '''drop database if exists deldata;create database deldata duration 300 stt_trigger 1; ;use deldata;
|
||||
self.deletedDataSql= '''drop database if exists deldata;create database deldata duration 100 stt_trigger 1; ;use deldata;
|
||||
create table deldata.stb1 (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) tags (t1 int);
|
||||
create table deldata.ct1 using deldata.stb1 tags ( 1 );
|
||||
insert into deldata.ct1 values ( now()-0s, 0, 0, 0, 0, 0.0, 0.0, 0, 'binary0', 'nchar0', now()+0a ) ( now()-10s, 1, 11111, 111, 11, 1.11, 11.11, 1, 'binary1', 'nchar1', now()+1a ) ( now()-20s, 2, 22222, 222, 22, 2.22, 22.22, 0, 'binary2', 'nchar2', now()+2a ) ( now()-30s, 3, 33333, 333, 33, 3.33, 33.33, 1, 'binary3', 'nchar3', now()+3a );
|
||||
|
|
|
@ -61,7 +61,7 @@ class TDTestCase:
|
|||
def prepare_data(self):
|
||||
|
||||
tdSql.execute("drop database if exists db ")
|
||||
tdSql.execute("create database if not exists db duration 300")
|
||||
tdSql.execute("create database if not exists db duration 100")
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -63,7 +63,7 @@ class TDTestCase:
|
|||
def prepare_data(self):
|
||||
|
||||
tdSql.execute("drop database if exists db ")
|
||||
tdSql.execute("create database if not exists db duration 300")
|
||||
tdSql.execute("create database if not exists db duration 100")
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -63,7 +63,7 @@ class TDTestCase:
|
|||
def prepare_data(self):
|
||||
|
||||
tdSql.execute("drop database if exists db ")
|
||||
tdSql.execute("create database if not exists db duration 300")
|
||||
tdSql.execute("create database if not exists db duration 100")
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -64,7 +64,7 @@ class TDTestCase:
|
|||
def prepare_data(self):
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database if not exists db replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists db replica 1 duration 100")
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -73,7 +73,7 @@ class TDTestCase:
|
|||
def prepare_data(self):
|
||||
|
||||
tdSql.execute("drop database if exists db ")
|
||||
tdSql.execute("create database if not exists db duration 300")
|
||||
tdSql.execute("create database if not exists db duration 100")
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -60,7 +60,7 @@ class TDTestCase:
|
|||
def prepare_data(self):
|
||||
|
||||
tdSql.execute("drop database if exists db ")
|
||||
tdSql.execute("create database if not exists db duration 300")
|
||||
tdSql.execute("create database if not exists db duration 100")
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -127,7 +127,7 @@ class TDTestCase:
|
|||
def prepare_tag_datas(self, dbname="testdb"):
|
||||
# prepare datas
|
||||
tdSql.execute(
|
||||
f"create database if not exists {dbname} keep 3650 duration 1000 replica {self.replicaVar} ")
|
||||
f"create database if not exists {dbname} keep 3650 duration 100 replica {self.replicaVar} ")
|
||||
tdSql.execute(" use testdb ")
|
||||
tdSql.execute(
|
||||
f'''create table {dbname}.stb1
|
||||
|
|
|
@ -128,7 +128,7 @@ class TDTestCase:
|
|||
def prepare_tag_datas(self, dbname="testdb"):
|
||||
# prepare datas
|
||||
tdSql.execute(
|
||||
f"create database if not exists {dbname} keep 3650 duration 1000")
|
||||
f"create database if not exists {dbname} keep 3650 duration 100")
|
||||
tdSql.execute(f" use {dbname} ")
|
||||
tdSql.execute(
|
||||
f'''create table {dbname}.stb1
|
||||
|
|
|
@ -18,7 +18,7 @@ class TDTestCase:
|
|||
|
||||
def prepare_data(self, dbname="db"):
|
||||
tdSql.execute(
|
||||
f"create database if not exists {dbname} keep 3650 duration 1000")
|
||||
f"create database if not exists {dbname} keep 3650 duration 100")
|
||||
tdSql.execute(f"use {dbname} ")
|
||||
tdSql.execute(
|
||||
f"create table {dbname}.tb (ts timestamp, c0 int)"
|
||||
|
|
|
@ -62,6 +62,12 @@ class TDTestCase:
|
|||
tdSql.query("show dnode 1 variables like '____debugFlag'")
|
||||
tdSql.checkRows(2)
|
||||
|
||||
tdSql.query("show dnode 1 variables like 's3MigrateEna%'")
|
||||
tdSql.checkRows(1)
|
||||
tdSql.checkData(0, 0, 1)
|
||||
tdSql.checkData(0, 1, 's3MigrateEnabled')
|
||||
tdSql.checkData(0, 2, 0)
|
||||
|
||||
def threadTest(self, threadID):
|
||||
print(f"Thread {threadID} starting...")
|
||||
tdsqln = tdCom.newTdSql()
|
||||
|
|
|
@ -18,7 +18,7 @@ class TDTestCase:
|
|||
def prepare_datas_of_distribute(self, dbname="testdb"):
|
||||
|
||||
# prepate datas for 20 tables distributed at different vgroups
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 1000 s3_keeplocal 3000 vgroups 5")
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 100 s3_keeplocal 3000 vgroups 5")
|
||||
tdSql.execute(f" use {dbname} ")
|
||||
tdSql.execute(
|
||||
f'''create table {dbname}.stb1
|
||||
|
|
|
@ -35,7 +35,7 @@ class TDTestCase:
|
|||
def prepare_datas_of_distribute(self, dbname="testdb"):
|
||||
|
||||
# prepate datas for 20 tables distributed at different vgroups
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 1000 vgroups 5")
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 100 vgroups 5")
|
||||
tdSql.execute(f" use {dbname} ")
|
||||
tdSql.execute(
|
||||
f'''create table {dbname}.stb1
|
||||
|
|
|
@ -36,7 +36,7 @@ class TDTestCase:
|
|||
def prepare_datas_of_distribute(self, dbname="testdb"):
|
||||
|
||||
# prepate datas for 20 tables distributed at different vgroups
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 1000 vgroups 5")
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 100 vgroups 5")
|
||||
tdSql.execute(f" use {dbname} ")
|
||||
tdSql.execute(
|
||||
f'''create table {dbname}.stb1
|
||||
|
|
|
@ -38,7 +38,7 @@ class TDTestCase:
|
|||
def prepare_datas_of_distribute(self, dbname="testdb"):
|
||||
|
||||
# prepate datas for 20 tables distributed at different vgroups
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 1000 vgroups 5")
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 100 vgroups 5")
|
||||
tdSql.execute(f" use {dbname} ")
|
||||
tdSql.execute(
|
||||
f'''create table {dbname}.stb1
|
||||
|
|
|
@ -37,7 +37,7 @@ class TDTestCase:
|
|||
def prepare_datas_of_distribute(self, dbname="testdb"):
|
||||
|
||||
# prepate datas for 20 tables distributed at different vgroups
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 1000 vgroups 5")
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 100 vgroups 5")
|
||||
tdSql.execute(f" use {dbname} ")
|
||||
tdSql.execute(
|
||||
f'''create table {dbname}.stb1
|
||||
|
|
|
@ -37,7 +37,7 @@ class TDTestCase:
|
|||
def prepare_datas_of_distribute(self, dbname="testdb"):
|
||||
|
||||
# prepate datas for 20 tables distributed at different vgroups
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 1000 vgroups 5")
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 100 vgroups 5")
|
||||
tdSql.execute(f" use {dbname}")
|
||||
tdSql.execute(
|
||||
f'''create table {dbname}.stb1
|
||||
|
|
|
@ -46,7 +46,7 @@ class TDTestCase:
|
|||
def prepare_datas_of_distribute(self, dbname="testdb"):
|
||||
|
||||
# prepate datas for 20 tables distributed at different vgroups
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 1000 vgroups 5")
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 100 vgroups 5")
|
||||
tdSql.execute(f" use {dbname}")
|
||||
tdSql.execute(
|
||||
f'''create table {dbname}.stb1
|
||||
|
|
|
@ -35,7 +35,7 @@ class TDTestCase:
|
|||
def prepare_datas_of_distribute(self, dbname="testdb"):
|
||||
|
||||
# prepate datas for 20 tables distributed at different vgroups
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 1000 vgroups 5")
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 100 vgroups 5")
|
||||
tdSql.execute(f" use {dbname}")
|
||||
tdSql.execute(
|
||||
f'''create table {dbname}.stb1
|
||||
|
|
|
@ -23,7 +23,7 @@ class TDTestCase:
|
|||
def prepare_tag_datas(self, dbname="testdb"):
|
||||
# prepare datas
|
||||
tdSql.execute(
|
||||
f"create database if not exists {dbname} keep 3650 duration 1000")
|
||||
f"create database if not exists {dbname} keep 3650 duration 100")
|
||||
tdSql.execute(f"use {dbname} ")
|
||||
tdSql.execute(
|
||||
f'''create table {dbname}.stb1
|
||||
|
@ -249,4 +249,4 @@ class TDTestCase:
|
|||
|
||||
|
||||
tdCases.addLinux(__file__, TDTestCase())
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
|
|
|
@ -78,7 +78,7 @@ class TDTestCase:
|
|||
def prepare_tag_datas(self, dbname="testdb"):
|
||||
# prepare datas
|
||||
tdSql.execute(
|
||||
f"create database if not exists {dbname} keep 3650 duration 1000")
|
||||
f"create database if not exists {dbname} keep 3650 duration 100")
|
||||
tdSql.execute(f"use {dbname} ")
|
||||
tdSql.execute(
|
||||
f'''create table {dbname}.stb1
|
||||
|
|
|
@ -370,7 +370,7 @@ class TDTestCase:
|
|||
|
||||
tdLog.printNoPrefix("==========step4:cross db check")
|
||||
dbname1 = "db1"
|
||||
tdSql.execute(f"create database {dbname1} duration 432000m")
|
||||
tdSql.execute(f"create database {dbname1} duration 172800m")
|
||||
tdSql.execute(f"use {dbname1}")
|
||||
self.__create_tb(dbname=dbname1)
|
||||
self.__insert_data(dbname=dbname1)
|
||||
|
|
|
@ -61,7 +61,7 @@ class TDTestCase:
|
|||
|
||||
def prepare_datas(self ,cache_value, dbname="db"):
|
||||
tdSql.execute(f"drop database if exists {dbname} ")
|
||||
create_db_sql = f"create database if not exists {dbname} keep 3650 duration 1000 cachemodel {cache_value}"
|
||||
create_db_sql = f"create database if not exists {dbname} keep 3650 duration 100 cachemodel {cache_value}"
|
||||
tdSql.execute(create_db_sql)
|
||||
|
||||
tdSql.execute(f"use {dbname}")
|
||||
|
@ -129,7 +129,7 @@ class TDTestCase:
|
|||
|
||||
tdSql.execute(f"drop database if exists {dbname} ")
|
||||
# prepare datas
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 1000 cachemodel {cache_value}")
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 100 cachemodel {cache_value}")
|
||||
|
||||
tdSql.execute(f"use {dbname} ")
|
||||
|
||||
|
@ -871,7 +871,7 @@ class TDTestCase:
|
|||
|
||||
def initLastRowDelayTest(self, dbname="db"):
|
||||
tdSql.execute(f"drop database if exists {dbname} ")
|
||||
create_db_sql = f"create database if not exists {dbname} keep 3650 duration 1000 cachemodel 'NONE' REPLICA 1"
|
||||
create_db_sql = f"create database if not exists {dbname} keep 3650 duration 100 cachemodel 'NONE' REPLICA 1"
|
||||
tdSql.execute(create_db_sql)
|
||||
|
||||
time.sleep(3)
|
||||
|
|
|
@ -117,7 +117,7 @@ class TDTestCase:
|
|||
def support_distributed_aggregate(self, dbname="testdb"):
|
||||
|
||||
# prepate datas for 20 tables distributed at different vgroups
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 1000 vgroups 5")
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 100 vgroups 5")
|
||||
tdSql.execute(f"use {dbname} ")
|
||||
tdSql.execute(
|
||||
f'''create table {dbname}.stb1
|
||||
|
|
|
@ -611,7 +611,7 @@ class TDTestCase:
|
|||
|
||||
def basic_sample_query(self, dbname="db"):
|
||||
tdSql.execute(f" drop database if exists {dbname} ")
|
||||
tdSql.execute(f" create database if not exists {dbname} duration 300d ")
|
||||
tdSql.execute(f" create database if not exists {dbname} duration 120d ")
|
||||
tdSql.execute(
|
||||
f'''create table {dbname}.stb1
|
||||
(ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp)
|
||||
|
|
|
@ -693,7 +693,7 @@ class TDTestCase:
|
|||
"======== prepare test env include database, stable, ctables, and insert data: ")
|
||||
paraDict = {'dbName': db,
|
||||
'dropFlag': 1,
|
||||
'vgroups': 2,
|
||||
'vgroups': 4,
|
||||
'stbName': 'meters',
|
||||
'colPrefix': 'c',
|
||||
'tagPrefix': 't',
|
||||
|
@ -1273,6 +1273,21 @@ class TDTestCase:
|
|||
else:
|
||||
tdLog.debug(f'wait query succeed: {sql} to return {expected_row_num}, got: {tdSql.getRows()}')
|
||||
|
||||
def wait_query_err(self, sql: str, timeout_in_seconds: float, err):
|
||||
timeout = timeout_in_seconds
|
||||
while timeout > 0:
|
||||
try:
|
||||
tdSql.query(sql, queryTimes=1)
|
||||
time.sleep(1)
|
||||
timeout = timeout - 1
|
||||
except:
|
||||
tdSql.error(sql, err);
|
||||
break
|
||||
if timeout <= 0:
|
||||
tdLog.exit(f'failed to wait query: {sql} to return error timeout: {timeout_in_seconds}s')
|
||||
else:
|
||||
tdLog.debug(f'wait query error succeed: {sql}')
|
||||
|
||||
def test_drop_tsma(self):
|
||||
function_name = sys._getframe().f_code.co_name
|
||||
tdLog.debug(f'-----{function_name}------')
|
||||
|
@ -1338,15 +1353,15 @@ class TDTestCase:
|
|||
self.create_tsma('tsma1', 'test', 'meters', ['avg(c1)', 'avg(c2)'], '5m')
|
||||
tdSql.execute('alter table test.t0 ttl 2', queryTimes=1)
|
||||
tdSql.execute('flush database test')
|
||||
self.wait_query('show test.tables like "%t0"', 0, wait_query_seconds)
|
||||
res_tb = TSMAQCBuilder().md5('1.test.tsma1_t0')
|
||||
self.wait_query_err(f'desc test.`{res_tb}`', wait_query_seconds, -2147473917)
|
||||
|
||||
# test drop multi tables
|
||||
tdSql.execute('drop table test.t3, test.t4')
|
||||
self.wait_query('show test.tables like "%t3"', 0, wait_query_seconds)
|
||||
self.wait_query('show test.tables like "%t4"', 0, wait_query_seconds)
|
||||
|
||||
tdSql.query('show test.tables like "%tsma%"')
|
||||
tdSql.checkRows(0)
|
||||
res_tb = TSMAQCBuilder().md5('1.test.tsma1_t3')
|
||||
self.wait_query_err(f'desc test.`{res_tb}`', wait_query_seconds, -2147473917)
|
||||
res_tb = TSMAQCBuilder().md5('1.test.tsma1_t4')
|
||||
self.wait_query_err(f'desc test.`{res_tb}`', wait_query_seconds, -2147473917)
|
||||
|
||||
# test drop stream
|
||||
tdSql.error('drop stream tsma1', -2147471088) ## TSMA must be dropped first
|
||||
|
|
|
@ -22,7 +22,7 @@ class TDTestCase:
|
|||
def prepare_datas_of_distribute(self, dbname="testdb"):
|
||||
|
||||
# prepate datas for 20 tables distributed at different vgroups
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 1000 vgroups 5")
|
||||
tdSql.execute(f"create database if not exists {dbname} keep 3650 duration 100 vgroups 5")
|
||||
tdSql.execute(
|
||||
f'''create table {dbname}.stb1
|
||||
(ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp,c11 int UNSIGNED, c12 bigint UNSIGNED, c13 smallint UNSIGNED, c14 tinyint UNSIGNED)
|
||||
|
|
|
@ -110,7 +110,7 @@ class TDTestCase:
|
|||
tdSql.error("drop mnode on dnode 1;")
|
||||
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database if not exists db replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists db replica 1 duration 100")
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -84,7 +84,7 @@ class TDTestCase:
|
|||
# fisrt add data : db\stable\childtable\general table
|
||||
|
||||
tdSql.execute("drop database if exists db2")
|
||||
tdSql.execute("create database if not exists db2 replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists db2 replica 1 duration 100")
|
||||
tdSql.execute("use db2")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -73,8 +73,8 @@ class TDTestCase:
|
|||
for couti in range(countstart,countstop):
|
||||
tdLog.debug("drop database if exists db%d" %couti)
|
||||
tdSql.execute("drop database if exists db%d" %couti, 20)
|
||||
print("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("use db%d" %couti)
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -58,7 +58,7 @@ class TDTestCase:
|
|||
# fisrt add data : db\stable\childtable\general table
|
||||
for couti in count:
|
||||
tdSql.execute("drop database if exists db%d" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("use db%d" %couti)
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -78,8 +78,8 @@ class TDTestCase:
|
|||
for couti in range(dbcountStart,dbcountStop):
|
||||
tdLog.debug("drop database if exists db%d" %couti)
|
||||
tdSql.execute("drop database if exists db%d" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("use db%d" %couti)
|
||||
tdSql.execute(
|
||||
'''create table %s
|
||||
|
|
|
@ -72,8 +72,8 @@ class TDTestCase:
|
|||
for couti in range(countstart,countstop):
|
||||
tdLog.debug("drop database if exists db%d" %couti)
|
||||
tdSql.execute("drop database if exists db%d" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("use db%d" %couti)
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -73,8 +73,8 @@ class TDTestCase:
|
|||
for couti in range(countstart,countstop):
|
||||
tdLog.debug("drop database if exists db%d" %couti)
|
||||
tdSql.execute("drop database if exists db%d" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("use db%d" %couti)
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -37,7 +37,7 @@ class TDTestCase:
|
|||
tdSql.init(conn.cursor())
|
||||
self.host = socket.gethostname()
|
||||
self.replicaVar = int(replicaVar)
|
||||
self.deletedDataSql= '''drop database if exists deldata;create database deldata duration 300;use deldata;
|
||||
self.deletedDataSql= '''drop database if exists deldata;create database deldata duration 100;use deldata;
|
||||
create table deldata.stb1 (ts timestamp, c1 int, c2 bigint, c3 smallint, c4 tinyint, c5 float, c6 double, c7 bool, c8 binary(16),c9 nchar(32), c10 timestamp) tags (t1 int);
|
||||
create table deldata.ct1 using deldata.stb1 tags ( 1 );
|
||||
insert into deldata.ct1 values ( now()-0s, 0, 0, 0, 0, 0.0, 0.0, 0, 'binary0', 'nchar0', now()+0a ) ( now()-10s, 1, 11111, 111, 11, 1.11, 11.11, 1, 'binary1', 'nchar1', now()+1a ) ( now()-20s, 2, 22222, 222, 22, 2.22, 22.22, 0, 'binary2', 'nchar2', now()+2a ) ( now()-30s, 3, 33333, 333, 33, 3.33, 33.33, 1, 'binary3', 'nchar3', now()+3a );
|
||||
|
@ -140,8 +140,8 @@ class TDTestCase:
|
|||
for couti in range(countstart,countstop):
|
||||
tdLog.debug("drop database if exists db%d" %couti)
|
||||
tdSql.execute("drop database if exists db%d" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("use db%d" %couti)
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -71,8 +71,8 @@ class TDTestCase:
|
|||
for couti in range(countstart,countstop):
|
||||
tdLog.debug("drop database if exists db%d" %couti)
|
||||
tdSql.execute("drop database if exists db%d" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("use db%d" %couti)
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -72,8 +72,8 @@ class TDTestCase:
|
|||
for couti in range(countstart,countstop):
|
||||
tdLog.debug("drop database if exists db%d" %couti)
|
||||
tdSql.execute("drop database if exists db%d" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("use db%d" %couti)
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -71,8 +71,8 @@ class TDTestCase:
|
|||
for couti in range(countstart,countstop):
|
||||
tdLog.debug("drop database if exists db%d" %couti)
|
||||
tdSql.execute("drop database if exists db%d" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("use db%d" %couti)
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -71,8 +71,8 @@ class TDTestCase:
|
|||
for couti in range(countstart,countstop):
|
||||
tdLog.debug("drop database if exists db%d" %couti)
|
||||
tdSql.execute("drop database if exists db%d" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("use db%d" %couti)
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -71,8 +71,8 @@ class TDTestCase:
|
|||
for couti in range(countstart,countstop):
|
||||
tdLog.debug("drop database if exists db%d" %couti)
|
||||
tdSql.execute("drop database if exists db%d" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("use db%d" %couti)
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -73,8 +73,8 @@ class TDTestCase:
|
|||
for couti in range(countstart,countstop):
|
||||
tdLog.debug("drop database if exists db%d" %couti)
|
||||
tdSql.execute("drop database if exists db%d" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("use db%d" %couti)
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -77,8 +77,8 @@ class TDTestCase:
|
|||
for couti in range(countstart,countstop):
|
||||
tdLog.debug("drop database if exists db%d" %couti)
|
||||
tdSql.execute("drop database if exists db%d" %couti)
|
||||
tdLog.debug("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdLog.debug("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("use db%d" %couti)
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -70,8 +70,8 @@ class TDTestCase:
|
|||
for couti in range(countstart,countstop):
|
||||
tdLog.debug("drop database if exists db%d" %couti)
|
||||
tdSql.execute("drop database if exists db%d" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("use db%d" %couti)
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -70,8 +70,8 @@ class TDTestCase:
|
|||
for couti in range(countstart,countstop):
|
||||
tdLog.debug("drop database if exists db%d" %couti)
|
||||
tdSql.execute("drop database if exists db%d" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("use db%d" %couti)
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -70,8 +70,8 @@ class TDTestCase:
|
|||
for couti in range(countstart,countstop):
|
||||
tdLog.debug("drop database if exists db%d" %couti)
|
||||
tdSql.execute("drop database if exists db%d" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 300" %couti)
|
||||
print("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("create database if not exists db%d replica 1 duration 100" %couti)
|
||||
tdSql.execute("use db%d" %couti)
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -83,7 +83,7 @@ class TDTestCase:
|
|||
def create_db_check_vgroups(self):
|
||||
|
||||
tdSql.execute("drop database if exists test")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 100")
|
||||
tdSql.execute("use test")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -88,7 +88,7 @@ class TDTestCase:
|
|||
def create_db_check_vgroups(self):
|
||||
|
||||
tdSql.execute("drop database if exists test")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 100")
|
||||
tdSql.execute("use test")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -89,7 +89,7 @@ class TDTestCase:
|
|||
def create_db_check_vgroups(self):
|
||||
|
||||
tdSql.execute("drop database if exists test")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 100")
|
||||
tdSql.execute("use test")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -88,7 +88,7 @@ class TDTestCase:
|
|||
def create_db_check_vgroups(self):
|
||||
|
||||
tdSql.execute("drop database if exists test")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 100")
|
||||
tdSql.execute("use test")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -89,7 +89,7 @@ class TDTestCase:
|
|||
def create_db_check_vgroups(self):
|
||||
|
||||
tdSql.execute("drop database if exists test")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 100")
|
||||
tdSql.execute("use test")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -91,7 +91,7 @@ class TDTestCase:
|
|||
def create_db_check_vgroups(self):
|
||||
|
||||
tdSql.execute("drop database if exists test")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 100")
|
||||
tdSql.execute("use test")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -91,7 +91,7 @@ class TDTestCase:
|
|||
def create_db_check_vgroups(self):
|
||||
|
||||
tdSql.execute("drop database if exists test")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 100")
|
||||
time.sleep(3)
|
||||
tdSql.execute("use test")
|
||||
tdSql.execute(
|
||||
|
|
|
@ -91,7 +91,7 @@ class TDTestCase:
|
|||
def create_db_check_vgroups(self):
|
||||
|
||||
tdSql.execute("drop database if exists test")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 100")
|
||||
tdSql.execute("use test")
|
||||
time.sleep(3)
|
||||
tdSql.execute(
|
||||
|
|
|
@ -97,7 +97,7 @@ class TDTestCase:
|
|||
def create_db_check_vgroups(self):
|
||||
|
||||
tdSql.execute("drop database if exists test")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 100")
|
||||
tdSql.execute("use test")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -97,7 +97,7 @@ class TDTestCase:
|
|||
def create_db_check_vgroups(self):
|
||||
|
||||
tdSql.execute("drop database if exists test")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 100")
|
||||
tdSql.execute("use test")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -97,7 +97,7 @@ class TDTestCase:
|
|||
def create_db_check_vgroups(self):
|
||||
|
||||
tdSql.execute("drop database if exists test")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 100")
|
||||
tdSql.execute("use test")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -180,7 +180,7 @@ class TDTestCase:
|
|||
def create_db_check_vgroups(self):
|
||||
|
||||
tdSql.execute("drop database if exists test")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 100")
|
||||
tdSql.execute("use test")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -89,7 +89,7 @@ class TDTestCase:
|
|||
def create_db_check_vgroups(self):
|
||||
|
||||
tdSql.execute("drop database if exists test")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 100")
|
||||
tdSql.execute("use test")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -88,7 +88,7 @@ class TDTestCase:
|
|||
def create_db_check_vgroups(self):
|
||||
|
||||
tdSql.execute("drop database if exists test")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 100")
|
||||
tdSql.execute("use test")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -91,7 +91,7 @@ class TDTestCase:
|
|||
def create_db_check_vgroups(self):
|
||||
|
||||
tdSql.execute("drop database if exists test")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 300")
|
||||
tdSql.execute("create database if not exists test replica 1 duration 100")
|
||||
tdSql.execute("use test")
|
||||
tdSql.execute(
|
||||
'''create table stb1
|
||||
|
|
|
@ -24,6 +24,8 @@ import platform
|
|||
import socket
|
||||
import threading
|
||||
import importlib
|
||||
print(f"Python version: {sys.version}")
|
||||
print(f"Version info: {sys.version_info}")
|
||||
|
||||
import toml
|
||||
sys.path.append("../pytest")
|
||||
|
@ -687,6 +689,6 @@ if __name__ == "__main__":
|
|||
if conn is not None:
|
||||
conn.close()
|
||||
if asan:
|
||||
# tdDnodes.StopAllSigint()
|
||||
#tdDnodes.StopAllSigint()
|
||||
tdLog.info("Address sanitizer mode finished")
|
||||
sys.exit(0)
|
||||
|
|
Loading…
Reference in New Issue