Merge branch '3.0' into feature/TD-13041
This commit is contained in:
commit
bb6ecd6913
|
@ -79,10 +79,16 @@ ENDIF ()
|
||||||
|
|
||||||
option(
|
option(
|
||||||
BUILD_SANITIZER
|
BUILD_SANITIZER
|
||||||
"If build addr2line"
|
"If build sanitizer"
|
||||||
OFF
|
OFF
|
||||||
)
|
)
|
||||||
|
|
||||||
|
option(
|
||||||
|
TDENGINE_3
|
||||||
|
"TDengine 3.x"
|
||||||
|
ON
|
||||||
|
)
|
||||||
|
|
||||||
option(
|
option(
|
||||||
BUILD_ADDR2LINE
|
BUILD_ADDR2LINE
|
||||||
"If build addr2line"
|
"If build addr2line"
|
||||||
|
|
|
@ -161,7 +161,6 @@ typedef struct SQueryTableDataCond {
|
||||||
int64_t endVersion;
|
int64_t endVersion;
|
||||||
} SQueryTableDataCond;
|
} SQueryTableDataCond;
|
||||||
|
|
||||||
void* blockDataDestroy(SSDataBlock* pBlock);
|
|
||||||
int32_t tEncodeDataBlock(void** buf, const SSDataBlock* pBlock);
|
int32_t tEncodeDataBlock(void** buf, const SSDataBlock* pBlock);
|
||||||
void* tDecodeDataBlock(const void* buf, SSDataBlock* pBlock);
|
void* tDecodeDataBlock(const void* buf, SSDataBlock* pBlock);
|
||||||
|
|
||||||
|
@ -169,19 +168,6 @@ int32_t tEncodeDataBlocks(void** buf, const SArray* blocks);
|
||||||
void* tDecodeDataBlocks(const void* buf, SArray** blocks);
|
void* tDecodeDataBlocks(const void* buf, SArray** blocks);
|
||||||
void colDataDestroy(SColumnInfoData* pColData);
|
void colDataDestroy(SColumnInfoData* pColData);
|
||||||
|
|
||||||
static FORCE_INLINE void blockDestroyInner(SSDataBlock* pBlock) {
|
|
||||||
int32_t numOfOutput = taosArrayGetSize(pBlock->pDataBlock);
|
|
||||||
for (int32_t i = 0; i < numOfOutput; ++i) {
|
|
||||||
SColumnInfoData* pColInfoData = (SColumnInfoData*)taosArrayGet(pBlock->pDataBlock, i);
|
|
||||||
colDataDestroy(pColInfoData);
|
|
||||||
}
|
|
||||||
|
|
||||||
taosArrayDestroy(pBlock->pDataBlock);
|
|
||||||
taosMemoryFreeClear(pBlock->pBlockAgg);
|
|
||||||
}
|
|
||||||
|
|
||||||
static FORCE_INLINE void tDeleteSSDataBlock(SSDataBlock* pBlock) { blockDestroyInner(pBlock); }
|
|
||||||
|
|
||||||
//======================================================================================================================
|
//======================================================================================================================
|
||||||
// the following structure shared by parser and executor
|
// the following structure shared by parser and executor
|
||||||
typedef struct SColumn {
|
typedef struct SColumn {
|
||||||
|
|
|
@ -226,8 +226,12 @@ int32_t blockDataKeepFirstNRows(SSDataBlock* pBlock, size_t n);
|
||||||
|
|
||||||
int32_t assignOneDataBlock(SSDataBlock* dst, const SSDataBlock* src);
|
int32_t assignOneDataBlock(SSDataBlock* dst, const SSDataBlock* src);
|
||||||
int32_t copyDataBlock(SSDataBlock* dst, const SSDataBlock* src);
|
int32_t copyDataBlock(SSDataBlock* dst, const SSDataBlock* src);
|
||||||
SSDataBlock* createOneDataBlock(const SSDataBlock* pDataBlock, bool copyData);
|
|
||||||
SSDataBlock* createDataBlock();
|
SSDataBlock* createDataBlock();
|
||||||
|
void* blockDataDestroy(SSDataBlock* pBlock);
|
||||||
|
void blockDataFreeRes(SSDataBlock* pBlock);
|
||||||
|
SSDataBlock* createOneDataBlock(const SSDataBlock* pDataBlock, bool copyData);
|
||||||
|
|
||||||
int32_t blockDataAppendColInfo(SSDataBlock* pBlock, SColumnInfoData* pColInfoData);
|
int32_t blockDataAppendColInfo(SSDataBlock* pBlock, SColumnInfoData* pColInfoData);
|
||||||
|
|
||||||
SColumnInfoData createColumnInfoData(int16_t type, int32_t bytes, int16_t colId);
|
SColumnInfoData createColumnInfoData(int16_t type, int32_t bytes, int16_t colId);
|
||||||
|
|
|
@ -340,12 +340,12 @@ static FORCE_INLINE int32_t streamTaskOutput(SStreamTask* pTask, SStreamDataBloc
|
||||||
if (pTask->sinkType == TASK_SINK__TABLE) {
|
if (pTask->sinkType == TASK_SINK__TABLE) {
|
||||||
ASSERT(pTask->dispatchType == TASK_DISPATCH__NONE);
|
ASSERT(pTask->dispatchType == TASK_DISPATCH__NONE);
|
||||||
pTask->tbSink.tbSinkFunc(pTask, pTask->tbSink.vnode, 0, pBlock->blocks);
|
pTask->tbSink.tbSinkFunc(pTask, pTask->tbSink.vnode, 0, pBlock->blocks);
|
||||||
taosArrayDestroyEx(pBlock->blocks, (FDelete)tDeleteSSDataBlock);
|
taosArrayDestroyEx(pBlock->blocks, (FDelete)blockDataFreeRes);
|
||||||
taosFreeQitem(pBlock);
|
taosFreeQitem(pBlock);
|
||||||
} else if (pTask->sinkType == TASK_SINK__SMA) {
|
} else if (pTask->sinkType == TASK_SINK__SMA) {
|
||||||
ASSERT(pTask->dispatchType == TASK_DISPATCH__NONE);
|
ASSERT(pTask->dispatchType == TASK_DISPATCH__NONE);
|
||||||
pTask->smaSink.smaSink(pTask->smaSink.vnode, pTask->smaSink.smaId, pBlock->blocks);
|
pTask->smaSink.smaSink(pTask->smaSink.vnode, pTask->smaSink.smaId, pBlock->blocks);
|
||||||
taosArrayDestroyEx(pBlock->blocks, (FDelete)tDeleteSSDataBlock);
|
taosArrayDestroyEx(pBlock->blocks, (FDelete)blockDataFreeRes);
|
||||||
taosFreeQitem(pBlock);
|
taosFreeQitem(pBlock);
|
||||||
} else {
|
} else {
|
||||||
ASSERT(pTask->dispatchType != TASK_DISPATCH__NONE);
|
ASSERT(pTask->dispatchType != TASK_DISPATCH__NONE);
|
||||||
|
|
|
@ -22,7 +22,10 @@ extern "C" {
|
||||||
|
|
||||||
#if defined(_TD_DARWIN_64)
|
#if defined(_TD_DARWIN_64)
|
||||||
// specific
|
// specific
|
||||||
|
#ifndef __COMPAR_FN_T
|
||||||
|
#define __COMPAR_FN_T
|
||||||
typedef int(*__compar_fn_t)(const void *, const void *);
|
typedef int(*__compar_fn_t)(const void *, const void *);
|
||||||
|
#endif
|
||||||
|
|
||||||
// for send function in tsocket.c
|
// for send function in tsocket.c
|
||||||
#if defined(MSG_NOSIGNAL)
|
#if defined(MSG_NOSIGNAL)
|
||||||
|
@ -41,7 +44,10 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_ALPINE)
|
#if defined(_ALPINE)
|
||||||
|
#ifndef __COMPAR_FN_T
|
||||||
|
#define __COMPAR_FN_T
|
||||||
typedef int(*__compar_fn_t)(const void *, const void *);
|
typedef int(*__compar_fn_t)(const void *, const void *);
|
||||||
|
#endif
|
||||||
void error (int, int, const char *);
|
void error (int, int, const char *);
|
||||||
#ifndef PTHREAD_MUTEX_RECURSIVE_NP
|
#ifndef PTHREAD_MUTEX_RECURSIVE_NP
|
||||||
#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
|
#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
|
||||||
|
@ -54,7 +60,10 @@ extern "C" {
|
||||||
char *stpncpy (char *dest, const char *src, size_t n);
|
char *stpncpy (char *dest, const char *src, size_t n);
|
||||||
|
|
||||||
// specific
|
// specific
|
||||||
|
#ifndef __COMPAR_FN_T
|
||||||
|
#define __COMPAR_FN_T
|
||||||
typedef int (*__compar_fn_t)(const void *, const void *);
|
typedef int (*__compar_fn_t)(const void *, const void *);
|
||||||
|
#endif
|
||||||
#define ssize_t int
|
#define ssize_t int
|
||||||
#define _SSIZE_T_
|
#define _SSIZE_T_
|
||||||
#define bzero(ptr, size) memset((ptr), 0, (size))
|
#define bzero(ptr, size) memset((ptr), 0, (size))
|
||||||
|
@ -69,7 +78,6 @@ extern "C" {
|
||||||
char * strsep(char **stringp, const char *delim);
|
char * strsep(char **stringp, const char *delim);
|
||||||
char * getpass(const char *prefix);
|
char * getpass(const char *prefix);
|
||||||
char * strndup(const char *s, size_t n);
|
char * strndup(const char *s, size_t n);
|
||||||
int gettimeofday(struct timeval *ptv, void *pTimeZone);
|
|
||||||
|
|
||||||
// for send function in tsocket.c
|
// for send function in tsocket.c
|
||||||
#define MSG_NOSIGNAL 0
|
#define MSG_NOSIGNAL 0
|
||||||
|
|
|
@ -542,8 +542,10 @@ int32_t blockDataToBuf(char* buf, const SSDataBlock* pBlock) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t blockDataFromBuf(SSDataBlock* pBlock, const char* buf) {
|
int32_t blockDataFromBuf(SSDataBlock* pBlock, const char* buf) {
|
||||||
pBlock->info.rows = *(int32_t*)buf;
|
int32_t numOfRows = *(int32_t*) buf;
|
||||||
|
blockDataEnsureCapacity(pBlock, numOfRows);
|
||||||
|
|
||||||
|
pBlock->info.rows = numOfRows;
|
||||||
size_t numOfCols = taosArrayGetSize(pBlock->pDataBlock);
|
size_t numOfCols = taosArrayGetSize(pBlock->pDataBlock);
|
||||||
const char* pStart = buf + sizeof(uint32_t);
|
const char* pStart = buf + sizeof(uint32_t);
|
||||||
|
|
||||||
|
@ -589,6 +591,7 @@ int32_t blockDataFromBuf(SSDataBlock* pBlock, const char* buf) {
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// todo remove this
|
||||||
int32_t blockDataFromBuf1(SSDataBlock* pBlock, const char* buf, size_t capacity) {
|
int32_t blockDataFromBuf1(SSDataBlock* pBlock, const char* buf, size_t capacity) {
|
||||||
pBlock->info.rows = *(int32_t*)buf;
|
pBlock->info.rows = *(int32_t*)buf;
|
||||||
pBlock->info.groupId = *(uint64_t*)(buf + sizeof(int32_t));
|
pBlock->info.groupId = *(uint64_t*)(buf + sizeof(int32_t));
|
||||||
|
@ -1194,15 +1197,28 @@ int32_t blockDataEnsureCapacity(SSDataBlock* pDataBlock, uint32_t numOfRows) {
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void blockDataFreeRes(SSDataBlock* pBlock) {
|
||||||
|
int32_t numOfOutput = taosArrayGetSize(pBlock->pDataBlock);
|
||||||
|
for (int32_t i = 0; i < numOfOutput; ++i) {
|
||||||
|
SColumnInfoData* pColInfoData = (SColumnInfoData*)taosArrayGet(pBlock->pDataBlock, i);
|
||||||
|
colDataDestroy(pColInfoData);
|
||||||
|
}
|
||||||
|
|
||||||
|
taosArrayDestroy(pBlock->pDataBlock);
|
||||||
|
taosMemoryFreeClear(pBlock->pBlockAgg);
|
||||||
|
memset(&pBlock->info, 0, sizeof(SDataBlockInfo));
|
||||||
|
}
|
||||||
|
|
||||||
void* blockDataDestroy(SSDataBlock* pBlock) {
|
void* blockDataDestroy(SSDataBlock* pBlock) {
|
||||||
if (pBlock == NULL) {
|
if (pBlock == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
blockDestroyInner(pBlock);
|
blockDataFreeRes(pBlock);
|
||||||
taosMemoryFreeClear(pBlock);
|
taosMemoryFreeClear(pBlock);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t assignOneDataBlock(SSDataBlock* dst, const SSDataBlock* src) {
|
int32_t assignOneDataBlock(SSDataBlock* dst, const SSDataBlock* src) {
|
||||||
ASSERT(src != NULL);
|
ASSERT(src != NULL);
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,12 @@ int32_t mmPutMsgToQueue(SMnodeMgmt *pMgmt, EQueueType qtype, SRpcMsg *pRpc) {
|
||||||
memcpy(pMsg, pRpc, sizeof(SRpcMsg));
|
memcpy(pMsg, pRpc, sizeof(SRpcMsg));
|
||||||
|
|
||||||
dTrace("msg:%p, is created and will put into %s queue, type:%s", pMsg, pWorker->name, TMSG_INFO(pRpc->msgType));
|
dTrace("msg:%p, is created and will put into %s queue, type:%s", pMsg, pWorker->name, TMSG_INFO(pRpc->msgType));
|
||||||
return mmPutMsgToWorker(pMgmt, pWorker, pMsg);
|
int32_t code = mmPutMsgToWorker(pMgmt, pWorker, pMsg);
|
||||||
|
if (code != 0) {
|
||||||
|
dTrace("msg:%p, is freed", pMsg);
|
||||||
|
taosFreeQitem(pMsg);
|
||||||
|
}
|
||||||
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t mmStartWorker(SMnodeMgmt *pMgmt) {
|
int32_t mmStartWorker(SMnodeMgmt *pMgmt) {
|
||||||
|
|
|
@ -319,7 +319,7 @@ int32_t tqRetrieveDataBlock(SSDataBlock* pBlock, STqReader* pReader) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
FAIL:
|
FAIL:
|
||||||
tDeleteSSDataBlock(pBlock);
|
blockDataFreeRes(pBlock);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -209,10 +209,10 @@ static void resetDataBlockScanInfo(SHashObj* pTableMap) {
|
||||||
p->iterInit = false;
|
p->iterInit = false;
|
||||||
p->iiter.hasVal = false;
|
p->iiter.hasVal = false;
|
||||||
if (p->iter.iter != NULL) {
|
if (p->iter.iter != NULL) {
|
||||||
tsdbTbDataIterDestroy(p->iter.iter);
|
p->iter.iter = tsdbTbDataIterDestroy(p->iter.iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
taosArrayDestroy(p->delSkyline);
|
p->delSkyline = taosArrayDestroy(p->delSkyline);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,18 +224,15 @@ static void destroyBlockScanInfo(SHashObj* pTableMap) {
|
||||||
p->iiter.hasVal = false;
|
p->iiter.hasVal = false;
|
||||||
|
|
||||||
if (p->iter.iter != NULL) {
|
if (p->iter.iter != NULL) {
|
||||||
tsdbTbDataIterDestroy(p->iter.iter);
|
p->iter.iter = tsdbTbDataIterDestroy(p->iter.iter);
|
||||||
p->iter.iter = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->iiter.iter != NULL) {
|
if (p->iiter.iter != NULL) {
|
||||||
tsdbTbDataIterDestroy(p->iiter.iter);
|
p->iiter.iter = tsdbTbDataIterDestroy(p->iiter.iter);
|
||||||
p->iiter.iter = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
taosArrayDestroy(p->delSkyline);
|
p->delSkyline = taosArrayDestroy(p->delSkyline);
|
||||||
taosArrayDestroy(p->pBlockList);
|
p->pBlockList = taosArrayDestroy(p->pBlockList);
|
||||||
p->delSkyline = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
taosHashCleanup(pTableMap);
|
taosHashCleanup(pTableMap);
|
||||||
|
|
|
@ -307,7 +307,6 @@ int32_t getTableList(void* metaHandle, void* pVnode, SScanPhysiNode* pScanNode,
|
||||||
SNode* pTagIndexCond = (SNode*)pListInfo->pTagIndexCond;
|
SNode* pTagIndexCond = (SNode*)pListInfo->pTagIndexCond;
|
||||||
if (pScanNode->tableType == TSDB_SUPER_TABLE) {
|
if (pScanNode->tableType == TSDB_SUPER_TABLE) {
|
||||||
if (pTagIndexCond) {
|
if (pTagIndexCond) {
|
||||||
///<<<<<<< HEAD
|
|
||||||
SIndexMetaArg metaArg = {
|
SIndexMetaArg metaArg = {
|
||||||
.metaEx = metaHandle, .idx = tsdbGetIdx(metaHandle), .ivtIdx = tsdbGetIvtIdx(metaHandle), .suid = tableUid};
|
.metaEx = metaHandle, .idx = tsdbGetIdx(metaHandle), .ivtIdx = tsdbGetIvtIdx(metaHandle), .suid = tableUid};
|
||||||
|
|
||||||
|
@ -315,20 +314,9 @@ int32_t getTableList(void* metaHandle, void* pVnode, SScanPhysiNode* pScanNode,
|
||||||
SIdxFltStatus status = SFLT_NOT_INDEX;
|
SIdxFltStatus status = SFLT_NOT_INDEX;
|
||||||
code = doFilterTag(pTagIndexCond, &metaArg, res, &status);
|
code = doFilterTag(pTagIndexCond, &metaArg, res, &status);
|
||||||
if (code != 0 || status == SFLT_NOT_INDEX) {
|
if (code != 0 || status == SFLT_NOT_INDEX) {
|
||||||
code = TSDB_CODE_INDEX_REBUILDING;
|
qError("failed to get tableIds from index, reason:%s, suid:%" PRIu64, tstrerror(code), tableUid);
|
||||||
}
|
// code = TSDB_CODE_INDEX_REBUILDING;
|
||||||
//=======
|
|
||||||
// SArray* res = taosArrayInit(8, sizeof(uint64_t));
|
|
||||||
// // code = doFilterTag(pTagIndexCond, &metaArg, res);
|
|
||||||
// code = TSDB_CODE_INDEX_REBUILDING;
|
|
||||||
//>>>>>>> dvv
|
|
||||||
if (code == TSDB_CODE_INDEX_REBUILDING) {
|
|
||||||
code = vnodeGetAllTableList(pVnode, tableUid, pListInfo->pTableList);
|
code = vnodeGetAllTableList(pVnode, tableUid, pListInfo->pTableList);
|
||||||
} else if (code != TSDB_CODE_SUCCESS) {
|
|
||||||
qError("failed to get tableIds, reason:%s, suid:%" PRIu64, tstrerror(code), tableUid);
|
|
||||||
taosArrayDestroy(res);
|
|
||||||
terrno = code;
|
|
||||||
return code;
|
|
||||||
} else {
|
} else {
|
||||||
qDebug("success to get tableIds, size:%d, suid:%" PRIu64, (int)taosArrayGetSize(res), tableUid);
|
qDebug("success to get tableIds, size:%d, suid:%" PRIu64, (int)taosArrayGetSize(res), tableUid);
|
||||||
}
|
}
|
||||||
|
@ -347,25 +335,25 @@ int32_t getTableList(void* metaHandle, void* pVnode, SScanPhysiNode* pScanNode,
|
||||||
terrno = code;
|
terrno = code;
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pTagCond) {
|
|
||||||
int32_t i = 0;
|
|
||||||
while (i < taosArrayGetSize(pListInfo->pTableList)) {
|
|
||||||
STableKeyInfo* info = taosArrayGet(pListInfo->pTableList, i);
|
|
||||||
bool isOk = isTableOk(info, pTagCond, metaHandle);
|
|
||||||
if (terrno) return terrno;
|
|
||||||
if (!isOk) {
|
|
||||||
taosArrayRemove(pListInfo->pTableList, i);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else { // Create one table group.
|
} else { // Create one table group.
|
||||||
STableKeyInfo info = {.lastKey = 0, .uid = tableUid, .groupId = 0};
|
STableKeyInfo info = {.lastKey = 0, .uid = tableUid, .groupId = 0};
|
||||||
taosArrayPush(pListInfo->pTableList, &info);
|
taosArrayPush(pListInfo->pTableList, &info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pTagCond) {
|
||||||
|
int32_t i = 0;
|
||||||
|
while (i < taosArrayGetSize(pListInfo->pTableList)) {
|
||||||
|
STableKeyInfo* info = taosArrayGet(pListInfo->pTableList, i);
|
||||||
|
bool isOk = isTableOk(info, pTagCond, metaHandle);
|
||||||
|
if (terrno) return terrno;
|
||||||
|
if (!isOk) {
|
||||||
|
taosArrayRemove(pListInfo->pTableList, i);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pListInfo->pGroupList = taosArrayInit(4, POINTER_BYTES);
|
pListInfo->pGroupList = taosArrayInit(4, POINTER_BYTES);
|
||||||
if (pListInfo->pGroupList == NULL) {
|
if (pListInfo->pGroupList == NULL) {
|
||||||
return TSDB_CODE_OUT_OF_MEMORY;
|
return TSDB_CODE_OUT_OF_MEMORY;
|
||||||
|
@ -853,6 +841,9 @@ static STimeWindow doCalculateTimeWindow(int64_t ts, SInterval* pInterval) {
|
||||||
w.ekey = taosTimeAdd(w.skey, pInterval->interval, pInterval->intervalUnit, pInterval->precision) - 1;
|
w.ekey = taosTimeAdd(w.skey, pInterval->interval, pInterval->intervalUnit, pInterval->precision) - 1;
|
||||||
} else {
|
} else {
|
||||||
int64_t st = w.skey;
|
int64_t st = w.skey;
|
||||||
|
if (pInterval->offset > 0) {
|
||||||
|
st = taosTimeAdd(st, pInterval->offset, pInterval->offsetUnit, pInterval->precision);
|
||||||
|
}
|
||||||
|
|
||||||
if (st > ts) {
|
if (st > ts) {
|
||||||
st -= ((st - ts + pInterval->sliding - 1) / pInterval->sliding) * pInterval->sliding;
|
st -= ((st - ts + pInterval->sliding - 1) / pInterval->sliding) * pInterval->sliding;
|
||||||
|
|
|
@ -1193,8 +1193,6 @@ static int32_t setBlockIntoRes(SStreamScanInfo* pInfo, const SSDataBlock* pBlock
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
taosArrayDestroy(pBlock->pDataBlock);
|
|
||||||
|
|
||||||
ASSERT(pInfo->pRes->pDataBlock != NULL);
|
ASSERT(pInfo->pRes->pDataBlock != NULL);
|
||||||
|
|
||||||
// currently only the tbname pseudo column
|
// currently only the tbname pseudo column
|
||||||
|
@ -1202,12 +1200,14 @@ static int32_t setBlockIntoRes(SStreamScanInfo* pInfo, const SSDataBlock* pBlock
|
||||||
int32_t code = addTagPseudoColumnData(&pInfo->readHandle, pInfo->pPseudoExpr, pInfo->numOfPseudoExpr, pInfo->pRes,
|
int32_t code = addTagPseudoColumnData(&pInfo->readHandle, pInfo->pPseudoExpr, pInfo->numOfPseudoExpr, pInfo->pRes,
|
||||||
GET_TASKID(pTaskInfo));
|
GET_TASKID(pTaskInfo));
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
|
blockDataFreeRes((SSDataBlock*) pBlock);
|
||||||
longjmp(pTaskInfo->env, code);
|
longjmp(pTaskInfo->env, code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
doFilter(pInfo->pCondition, pInfo->pRes);
|
doFilter(pInfo->pCondition, pInfo->pRes);
|
||||||
blockDataUpdateTsWindow(pInfo->pRes, pInfo->primaryTsIndex);
|
blockDataUpdateTsWindow(pInfo->pRes, pInfo->primaryTsIndex);
|
||||||
|
blockDataFreeRes((SSDataBlock*) pBlock);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,8 +53,8 @@ static void setNullRow(SSDataBlock* pBlock, int64_t ts, int32_t rowIndex) {
|
||||||
// the first are always the timestamp column, so start from the second column.
|
// the first are always the timestamp column, so start from the second column.
|
||||||
for (int32_t i = 0; i < taosArrayGetSize(pBlock->pDataBlock); ++i) {
|
for (int32_t i = 0; i < taosArrayGetSize(pBlock->pDataBlock); ++i) {
|
||||||
SColumnInfoData* p = taosArrayGet(pBlock->pDataBlock, i);
|
SColumnInfoData* p = taosArrayGet(pBlock->pDataBlock, i);
|
||||||
if (p->info.type == TSDB_DATA_TYPE_TIMESTAMP) {
|
if (p->info.type == TSDB_DATA_TYPE_TIMESTAMP) { // handle timestamp
|
||||||
colDataAppend(p, rowIndex, (const char*)&ts, false);
|
colDataAppend(p, rowIndex, (const char*)&ts, false);
|
||||||
} else {
|
} else {
|
||||||
colDataAppendNULL(p, rowIndex);
|
colDataAppendNULL(p, rowIndex);
|
||||||
}
|
}
|
||||||
|
@ -71,66 +71,76 @@ static void doFillOneRow(SFillInfo* pFillInfo, SSDataBlock* pBlock, SSDataBlock*
|
||||||
SPoint point1, point2, point;
|
SPoint point1, point2, point;
|
||||||
int32_t step = GET_FORWARD_DIRECTION_FACTOR(pFillInfo->order);
|
int32_t step = GET_FORWARD_DIRECTION_FACTOR(pFillInfo->order);
|
||||||
|
|
||||||
// set the primary timestamp column value
|
// set the primary timestamp column value
|
||||||
int32_t index = pFillInfo->numOfCurrent;
|
int32_t index = pFillInfo->numOfCurrent;
|
||||||
SColumnInfoData* pCol0 = taosArrayGet(pBlock->pDataBlock, pFillInfo->tsSlotId);
|
|
||||||
char* val = colDataGetData(pCol0, index);
|
|
||||||
|
|
||||||
// set the primary timestamp value
|
|
||||||
*(TSKEY*)val = pFillInfo->currentKey;
|
|
||||||
|
|
||||||
// set the other values
|
// set the other values
|
||||||
if (pFillInfo->type == TSDB_FILL_PREV) {
|
if (pFillInfo->type == TSDB_FILL_PREV) {
|
||||||
SArray* p = FILL_IS_ASC_FILL(pFillInfo) ? pFillInfo->prev : pFillInfo->next;
|
SArray* p = FILL_IS_ASC_FILL(pFillInfo) ? pFillInfo->prev : pFillInfo->next;
|
||||||
|
|
||||||
for (int32_t i = 1; i < pFillInfo->numOfCols; ++i) {
|
for (int32_t i = 0; i < pFillInfo->numOfCols; ++i) {
|
||||||
SFillColInfo* pCol = &pFillInfo->pFillCol[i];
|
SFillColInfo* pCol = &pFillInfo->pFillCol[i];
|
||||||
if (TSDB_COL_IS_TAG(pCol->flag)) {
|
if (TSDB_COL_IS_TAG(pCol->flag)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
SGroupKeys* pKey = taosArrayGet(p, i);
|
|
||||||
SColumnInfoData* pDstColInfoData = taosArrayGet(pBlock->pDataBlock, GET_DEST_SLOT_ID(pCol));
|
SColumnInfoData* pDstColInfoData = taosArrayGet(pBlock->pDataBlock, GET_DEST_SLOT_ID(pCol));
|
||||||
doSetVal(pDstColInfoData, index, pKey);
|
|
||||||
|
if (pDstColInfoData->info.type == TSDB_DATA_TYPE_TIMESTAMP) {
|
||||||
|
colDataAppend(pDstColInfoData, index, (const char*)&pFillInfo->currentKey, false);
|
||||||
|
} else {
|
||||||
|
SGroupKeys* pKey = taosArrayGet(p, i);
|
||||||
|
doSetVal(pDstColInfoData, index, pKey);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (pFillInfo->type == TSDB_FILL_NEXT) {
|
} else if (pFillInfo->type == TSDB_FILL_NEXT) {
|
||||||
SArray* p = FILL_IS_ASC_FILL(pFillInfo) ? pFillInfo->next : pFillInfo->prev;
|
SArray* p = FILL_IS_ASC_FILL(pFillInfo) ? pFillInfo->next : pFillInfo->prev;
|
||||||
// todo refactor: start from 0 not 1
|
// todo refactor: start from 0 not 1
|
||||||
for (int32_t i = 1; i < pFillInfo->numOfCols; ++i) {
|
for (int32_t i = 0; i < pFillInfo->numOfCols; ++i) {
|
||||||
SFillColInfo* pCol = &pFillInfo->pFillCol[i];
|
SFillColInfo* pCol = &pFillInfo->pFillCol[i];
|
||||||
if (TSDB_COL_IS_TAG(pCol->flag)) {
|
if (TSDB_COL_IS_TAG(pCol->flag)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
SGroupKeys* pKey = taosArrayGet(p, i);
|
|
||||||
SColumnInfoData* pDstColInfoData = taosArrayGet(pBlock->pDataBlock, GET_DEST_SLOT_ID(pCol));
|
SColumnInfoData* pDstColInfoData = taosArrayGet(pBlock->pDataBlock, GET_DEST_SLOT_ID(pCol));
|
||||||
doSetVal(pDstColInfoData, index, pKey);
|
|
||||||
|
if (pDstColInfoData->info.type == TSDB_DATA_TYPE_TIMESTAMP) {
|
||||||
|
colDataAppend(pDstColInfoData, index, (const char*)&pFillInfo->currentKey, false);
|
||||||
|
} else {
|
||||||
|
SGroupKeys* pKey = taosArrayGet(p, i);
|
||||||
|
doSetVal(pDstColInfoData, index, pKey);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (pFillInfo->type == TSDB_FILL_LINEAR) {
|
} else if (pFillInfo->type == TSDB_FILL_LINEAR) {
|
||||||
// TODO : linear interpolation supports NULL value
|
// TODO : linear interpolation supports NULL value
|
||||||
if (outOfBound) {
|
if (outOfBound) {
|
||||||
setNullRow(pBlock, pFillInfo->currentKey, index);
|
setNullRow(pBlock, pFillInfo->currentKey, index);
|
||||||
} else {
|
} else {
|
||||||
for (int32_t i = 1; i < pFillInfo->numOfCols; ++i) {
|
for (int32_t i = 0; i < pFillInfo->numOfCols; ++i) {
|
||||||
SFillColInfo* pCol = &pFillInfo->pFillCol[i];
|
SFillColInfo* pCol = &pFillInfo->pFillCol[i];
|
||||||
if (TSDB_COL_IS_TAG(pCol->flag)) {
|
if (TSDB_COL_IS_TAG(pCol->flag)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t srcSlotId = GET_SRC_SLOT_ID(pCol);
|
|
||||||
|
|
||||||
int32_t dstSlotId = GET_DEST_SLOT_ID(pCol);
|
int32_t dstSlotId = GET_DEST_SLOT_ID(pCol);
|
||||||
SColumnInfoData* pDstCol = taosArrayGet(pBlock->pDataBlock, dstSlotId);
|
SColumnInfoData* pDstCol = taosArrayGet(pBlock->pDataBlock, dstSlotId);
|
||||||
|
|
||||||
int16_t type = pCol->pExpr->base.resSchema.type;
|
int16_t type = pDstCol->info.type;
|
||||||
|
if (type == TSDB_DATA_TYPE_TIMESTAMP) {
|
||||||
|
colDataAppend(pDstCol, index, (const char*)&pFillInfo->currentKey, false);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
SGroupKeys* pKey = taosArrayGet(pFillInfo->prev, i);
|
SGroupKeys* pKey = taosArrayGet(pFillInfo->prev, i);
|
||||||
if (IS_VAR_DATA_TYPE(type) || type == TSDB_DATA_TYPE_BOOL || pKey->isNull) {
|
if (IS_VAR_DATA_TYPE(type) || type == TSDB_DATA_TYPE_BOOL || pKey->isNull) {
|
||||||
colDataAppendNULL(pDstCol, index);
|
colDataAppendNULL(pDstCol, index);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
SGroupKeys* pKey1 = taosArrayGet(pFillInfo->prev, 0);
|
SGroupKeys* pKey1 = taosArrayGet(pFillInfo->prev, pFillInfo->tsSlotId);
|
||||||
int64_t prevTs = *(int64_t*)pKey1->pData;
|
|
||||||
|
int64_t prevTs = *(int64_t*)pKey1->pData;
|
||||||
|
int32_t srcSlotId = GET_SRC_SLOT_ID(pCol);
|
||||||
|
|
||||||
SColumnInfoData* pSrcCol = taosArrayGet(pSrcBlock->pDataBlock, srcSlotId);
|
SColumnInfoData* pSrcCol = taosArrayGet(pSrcBlock->pDataBlock, srcSlotId);
|
||||||
char* data = colDataGetData(pSrcCol, pFillInfo->index);
|
char* data = colDataGetData(pSrcCol, pFillInfo->index);
|
||||||
|
@ -148,7 +158,7 @@ static void doFillOneRow(SFillInfo* pFillInfo, SSDataBlock* pBlock, SSDataBlock*
|
||||||
} else if (pFillInfo->type == TSDB_FILL_NULL) { // fill with NULL
|
} else if (pFillInfo->type == TSDB_FILL_NULL) { // fill with NULL
|
||||||
setNullRow(pBlock, pFillInfo->currentKey, index);
|
setNullRow(pBlock, pFillInfo->currentKey, index);
|
||||||
} else { // fill with user specified value for each column
|
} else { // fill with user specified value for each column
|
||||||
for (int32_t i = 1; i < pFillInfo->numOfCols; ++i) {
|
for (int32_t i = 0; i < pFillInfo->numOfCols; ++i) {
|
||||||
SFillColInfo* pCol = &pFillInfo->pFillCol[i];
|
SFillColInfo* pCol = &pFillInfo->pFillCol[i];
|
||||||
if (TSDB_COL_IS_TAG(pCol->flag) /* || IS_VAR_DATA_TYPE(pCol->schema.type)*/) {
|
if (TSDB_COL_IS_TAG(pCol->flag) /* || IS_VAR_DATA_TYPE(pCol->schema.type)*/) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -171,6 +181,8 @@ static void doFillOneRow(SFillInfo* pFillInfo, SSDataBlock* pBlock, SSDataBlock*
|
||||||
colDataAppend(pDst, index, (char*)&v, false);
|
colDataAppend(pDst, index, (char*)&v, false);
|
||||||
} else if (pDst->info.type == TSDB_DATA_TYPE_TIMESTAMP) {
|
} else if (pDst->info.type == TSDB_DATA_TYPE_TIMESTAMP) {
|
||||||
colDataAppend(pDst, index, (const char*)&pFillInfo->currentKey, false);
|
colDataAppend(pDst, index, (const char*)&pFillInfo->currentKey, false);
|
||||||
|
} else { // varchar/nchar data
|
||||||
|
colDataAppendNULL(pDst, index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -229,8 +241,7 @@ static void copyCurrentRowIntoBuf(SFillInfo* pFillInfo, int32_t rowIndex, SArray
|
||||||
static int32_t fillResultImpl(SFillInfo* pFillInfo, SSDataBlock* pBlock, int32_t outputRows) {
|
static int32_t fillResultImpl(SFillInfo* pFillInfo, SSDataBlock* pBlock, int32_t outputRows) {
|
||||||
pFillInfo->numOfCurrent = 0;
|
pFillInfo->numOfCurrent = 0;
|
||||||
|
|
||||||
// todo make sure the first column is always the primary timestamp column?
|
SColumnInfoData* pTsCol = taosArrayGet(pFillInfo->pSrcBlock->pDataBlock, pFillInfo->tsSlotId);
|
||||||
SColumnInfoData* pTsCol = taosArrayGet(pFillInfo->pSrcBlock->pDataBlock, 0);
|
|
||||||
|
|
||||||
int32_t step = GET_FORWARD_DIRECTION_FACTOR(pFillInfo->order);
|
int32_t step = GET_FORWARD_DIRECTION_FACTOR(pFillInfo->order);
|
||||||
bool ascFill = FILL_IS_ASC_FILL(pFillInfo);
|
bool ascFill = FILL_IS_ASC_FILL(pFillInfo);
|
||||||
|
@ -264,9 +275,8 @@ static int32_t fillResultImpl(SFillInfo* pFillInfo, SSDataBlock* pBlock, int32_t
|
||||||
assert(pFillInfo->currentKey == ts);
|
assert(pFillInfo->currentKey == ts);
|
||||||
|
|
||||||
if (pFillInfo->type == TSDB_FILL_NEXT && (pFillInfo->index + 1) < pFillInfo->numOfRows) {
|
if (pFillInfo->type == TSDB_FILL_NEXT && (pFillInfo->index + 1) < pFillInfo->numOfRows) {
|
||||||
++pFillInfo->index;
|
int32_t nextRowIndex = pFillInfo->index + 1;
|
||||||
copyCurrentRowIntoBuf(pFillInfo, pFillInfo->index, pFillInfo->next);
|
copyCurrentRowIntoBuf(pFillInfo, nextRowIndex, pFillInfo->next);
|
||||||
--pFillInfo->index;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// assign rows to dst buffer
|
// assign rows to dst buffer
|
||||||
|
|
|
@ -3461,9 +3461,16 @@ void doAddIntoResult(SqlFunctionCtx* pCtx, void* pData, int32_t rowIndex, SSData
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* +------------------------------------+--------------+--------------+
|
||||||
|
* | null bitmap | | |
|
||||||
|
* |(n columns, one bit for each column)| src column #1| src column #2|
|
||||||
|
* +------------------------------------+--------------+--------------+
|
||||||
|
*/
|
||||||
void saveTupleData(SqlFunctionCtx* pCtx, int32_t rowIndex, const SSDataBlock* pSrcBlock, STuplePos* pPos) {
|
void saveTupleData(SqlFunctionCtx* pCtx, int32_t rowIndex, const SSDataBlock* pSrcBlock, STuplePos* pPos) {
|
||||||
SFilePage* pPage = NULL;
|
SFilePage* pPage = NULL;
|
||||||
|
|
||||||
|
// todo refactor: move away
|
||||||
int32_t completeRowSize = pCtx->subsidiaries.num * sizeof(bool);
|
int32_t completeRowSize = pCtx->subsidiaries.num * sizeof(bool);
|
||||||
for (int32_t j = 0; j < pCtx->subsidiaries.num; ++j) {
|
for (int32_t j = 0; j < pCtx->subsidiaries.num; ++j) {
|
||||||
SqlFunctionCtx* pc = pCtx->subsidiaries.pCtx[j];
|
SqlFunctionCtx* pc = pCtx->subsidiaries.pCtx[j];
|
||||||
|
@ -3476,12 +3483,15 @@ void saveTupleData(SqlFunctionCtx* pCtx, int32_t rowIndex, const SSDataBlock* pS
|
||||||
} else {
|
} else {
|
||||||
pPage = getBufPage(pCtx->pBuf, pCtx->curBufPage);
|
pPage = getBufPage(pCtx->pBuf, pCtx->curBufPage);
|
||||||
if (pPage->num + completeRowSize > getBufPageSize(pCtx->pBuf)) {
|
if (pPage->num + completeRowSize > getBufPageSize(pCtx->pBuf)) {
|
||||||
|
// current page is all used, let's prepare a new buffer page
|
||||||
|
releaseBufPage(pCtx->pBuf, pPage);
|
||||||
pPage = getNewBufPage(pCtx->pBuf, 0, &pCtx->curBufPage);
|
pPage = getNewBufPage(pCtx->pBuf, 0, &pCtx->curBufPage);
|
||||||
pPage->num = sizeof(SFilePage);
|
pPage->num = sizeof(SFilePage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pPos->pageId = pCtx->curBufPage;
|
pPos->pageId = pCtx->curBufPage;
|
||||||
|
pPos->offset = pPage->num;
|
||||||
|
|
||||||
// keep the current row data, extract method
|
// keep the current row data, extract method
|
||||||
int32_t offset = 0;
|
int32_t offset = 0;
|
||||||
|
@ -3509,7 +3519,6 @@ void saveTupleData(SqlFunctionCtx* pCtx, int32_t rowIndex, const SSDataBlock* pS
|
||||||
offset += pCol->info.bytes;
|
offset += pCol->info.bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
pPos->offset = pPage->num;
|
|
||||||
pPage->num += completeRowSize;
|
pPage->num += completeRowSize;
|
||||||
|
|
||||||
setBufPageDirty(pPage, true);
|
setBufPageDirty(pPage, true);
|
||||||
|
@ -4839,7 +4848,7 @@ static void doReservoirSample(SqlFunctionCtx* pCtx, SSampleInfo* pInfo, char* da
|
||||||
if (pInfo->numSampled < pInfo->samples) {
|
if (pInfo->numSampled < pInfo->samples) {
|
||||||
sampleAssignResult(pInfo, data, pInfo->numSampled);
|
sampleAssignResult(pInfo, data, pInfo->numSampled);
|
||||||
if (pCtx->subsidiaries.num > 0) {
|
if (pCtx->subsidiaries.num > 0) {
|
||||||
saveTupleData(pCtx, index, pCtx->pSrcBlock, pInfo->tuplePos + pInfo->numSampled * sizeof(STuplePos));
|
saveTupleData(pCtx, index, pCtx->pSrcBlock, &pInfo->tuplePos[pInfo->numSampled]);
|
||||||
}
|
}
|
||||||
pInfo->numSampled++;
|
pInfo->numSampled++;
|
||||||
} else {
|
} else {
|
||||||
|
@ -4847,7 +4856,7 @@ static void doReservoirSample(SqlFunctionCtx* pCtx, SSampleInfo* pInfo, char* da
|
||||||
if (j < pInfo->samples) {
|
if (j < pInfo->samples) {
|
||||||
sampleAssignResult(pInfo, data, j);
|
sampleAssignResult(pInfo, data, j);
|
||||||
if (pCtx->subsidiaries.num > 0) {
|
if (pCtx->subsidiaries.num > 0) {
|
||||||
copyTupleData(pCtx, index, pCtx->pSrcBlock, pInfo->tuplePos + j * sizeof(STuplePos));
|
copyTupleData(pCtx, index, pCtx->pSrcBlock, &pInfo->tuplePos[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4885,7 +4894,7 @@ int32_t sampleFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) {
|
||||||
int32_t currentRow = pBlock->info.rows;
|
int32_t currentRow = pBlock->info.rows;
|
||||||
for (int32_t i = 0; i < pInfo->numSampled; ++i) {
|
for (int32_t i = 0; i < pInfo->numSampled; ++i) {
|
||||||
colDataAppend(pCol, currentRow + i, pInfo->data + i * pInfo->colBytes, false);
|
colDataAppend(pCol, currentRow + i, pInfo->data + i * pInfo->colBytes, false);
|
||||||
setSelectivityValue(pCtx, pBlock, pInfo->tuplePos + i * sizeof(STuplePos), currentRow + i);
|
setSelectivityValue(pCtx, pBlock, &pInfo->tuplePos[i], currentRow + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pInfo->numSampled;
|
return pInfo->numSampled;
|
||||||
|
|
|
@ -296,8 +296,8 @@ void udfdProcessCallRequest(SUvUdfWork *uvUdf, SUdfRequest *request) {
|
||||||
|
|
||||||
switch (call->callType) {
|
switch (call->callType) {
|
||||||
case TSDB_UDF_CALL_SCALA_PROC: {
|
case TSDB_UDF_CALL_SCALA_PROC: {
|
||||||
tDeleteSSDataBlock(&call->block);
|
blockDataFreeRes(&call->block);
|
||||||
tDeleteSSDataBlock(&subRsp->resultData);
|
blockDataFreeRes(&subRsp->resultData);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TSDB_UDF_CALL_AGG_INIT: {
|
case TSDB_UDF_CALL_AGG_INIT: {
|
||||||
|
@ -305,7 +305,7 @@ void udfdProcessCallRequest(SUvUdfWork *uvUdf, SUdfRequest *request) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TSDB_UDF_CALL_AGG_PROC: {
|
case TSDB_UDF_CALL_AGG_PROC: {
|
||||||
tDeleteSSDataBlock(&call->block);
|
blockDataFreeRes(&call->block);
|
||||||
freeUdfInterBuf(&subRsp->resultBuf);
|
freeUdfInterBuf(&subRsp->resultBuf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5954,7 +5954,8 @@ static int32_t buildAddColReq(STranslateContext* pCxt, SAlterTableStmt* pStmt, S
|
||||||
|
|
||||||
pReq->type = pStmt->dataType.type;
|
pReq->type = pStmt->dataType.type;
|
||||||
pReq->flags = COL_SMA_ON;
|
pReq->flags = COL_SMA_ON;
|
||||||
pReq->bytes = pStmt->dataType.bytes;
|
// pReq->bytes = pStmt->dataType.bytes;
|
||||||
|
pReq->bytes = calcTypeBytes(pStmt->dataType);
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ void streamFreeQitem(SStreamQueueItem* data) {
|
||||||
blockDataDestroy(((SStreamTrigger*)data)->pBlock);
|
blockDataDestroy(((SStreamTrigger*)data)->pBlock);
|
||||||
taosFreeQitem(data);
|
taosFreeQitem(data);
|
||||||
} else if (type == STREAM_INPUT__DATA_BLOCK || type == STREAM_INPUT__DATA_RETRIEVE) {
|
} else if (type == STREAM_INPUT__DATA_BLOCK || type == STREAM_INPUT__DATA_RETRIEVE) {
|
||||||
taosArrayDestroyEx(((SStreamDataBlock*)data)->blocks, (FDelete)tDeleteSSDataBlock);
|
taosArrayDestroyEx(((SStreamDataBlock*)data)->blocks, (FDelete)blockDataFreeRes);
|
||||||
taosFreeQitem(data);
|
taosFreeQitem(data);
|
||||||
} else if (type == STREAM_INPUT__DATA_SUBMIT) {
|
} else if (type == STREAM_INPUT__DATA_SUBMIT) {
|
||||||
streamDataSubmitRefDec((SStreamDataSubmit*)data);
|
streamDataSubmitRefDec((SStreamDataSubmit*)data);
|
||||||
|
|
|
@ -313,7 +313,7 @@ int32_t streamDispatch(SStreamTask* pTask, SMsgCb* pMsgCb) {
|
||||||
atomic_store_8(&pTask->outputStatus, TASK_OUTPUT_STATUS__NORMAL);
|
atomic_store_8(&pTask->outputStatus, TASK_OUTPUT_STATUS__NORMAL);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
taosArrayDestroyEx(pBlock->blocks, (FDelete)tDeleteSSDataBlock);
|
taosArrayDestroyEx(pBlock->blocks, (FDelete)blockDataFreeRes);
|
||||||
taosFreeQitem(pBlock);
|
taosFreeQitem(pBlock);
|
||||||
|
|
||||||
tmsgSendReq(pEpSet, &dispatchMsg);
|
tmsgSendReq(pEpSet, &dispatchMsg);
|
||||||
|
|
|
@ -106,7 +106,7 @@ static SArray* streamExecForQall(SStreamTask* pTask, SArray* pRes) {
|
||||||
qDebug("stream task %d exec end", pTask->taskId);
|
qDebug("stream task %d exec end", pTask->taskId);
|
||||||
|
|
||||||
if (pTask->taskStatus == TASK_STATUS__DROPPING) {
|
if (pTask->taskStatus == TASK_STATUS__DROPPING) {
|
||||||
taosArrayDestroyEx(pRes, (FDelete)tDeleteSSDataBlock);
|
taosArrayDestroyEx(pRes, (FDelete)blockDataFreeRes);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ static SArray* streamExecForQall(SStreamTask* pTask, SArray* pRes) {
|
||||||
qRes->blocks = pRes;
|
qRes->blocks = pRes;
|
||||||
if (streamTaskOutput(pTask, qRes) < 0) {
|
if (streamTaskOutput(pTask, qRes) < 0) {
|
||||||
/*streamQueueProcessFail(pTask->inputQueue);*/
|
/*streamQueueProcessFail(pTask->inputQueue);*/
|
||||||
taosArrayDestroyEx(pRes, (FDelete)tDeleteSSDataBlock);
|
taosArrayDestroyEx(pRes, (FDelete)blockDataFreeRes);
|
||||||
taosFreeQitem(qRes);
|
taosFreeQitem(qRes);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ int32_t streamExec(SStreamTask* pTask, SMsgCb* pMsgCb) {
|
||||||
pRes = streamExecForQall(pTask, pRes);
|
pRes = streamExecForQall(pTask, pRes);
|
||||||
if (pRes == NULL) goto FAIL;
|
if (pRes == NULL) goto FAIL;
|
||||||
|
|
||||||
taosArrayDestroyEx(pRes, (FDelete)tDeleteSSDataBlock);
|
taosArrayDestroyEx(pRes, (FDelete)blockDataFreeRes);
|
||||||
atomic_store_8(&pTask->execStatus, TASK_EXEC_STATUS__IDLE);
|
atomic_store_8(&pTask->execStatus, TASK_EXEC_STATUS__IDLE);
|
||||||
qDebug("stream exec, return result");
|
qDebug("stream exec, return result");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -163,7 +163,7 @@ int32_t streamExec(SStreamTask* pTask, SMsgCb* pMsgCb) {
|
||||||
continue;
|
continue;
|
||||||
} else if (execStatus == TASK_EXEC_STATUS__EXECUTING) {
|
} else if (execStatus == TASK_EXEC_STATUS__EXECUTING) {
|
||||||
ASSERT(taosArrayGetSize(pRes) == 0);
|
ASSERT(taosArrayGetSize(pRes) == 0);
|
||||||
taosArrayDestroyEx(pRes, (FDelete)tDeleteSSDataBlock);
|
taosArrayDestroyEx(pRes, (FDelete)blockDataFreeRes);
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include "ttime.h"
|
#include "ttime.h"
|
||||||
|
|
||||||
#define DEFAULT_FALSE_POSITIVE 0.01
|
#define DEFAULT_FALSE_POSITIVE 0.01
|
||||||
#define DEFAULT_BUCKET_SIZE 1024
|
#define DEFAULT_BUCKET_SIZE 131072
|
||||||
#define ROWS_PER_MILLISECOND 1
|
#define ROWS_PER_MILLISECOND 1
|
||||||
#define MAX_NUM_SCALABLE_BF 100000
|
#define MAX_NUM_SCALABLE_BF 100000
|
||||||
#define MIN_NUM_SCALABLE_BF 10
|
#define MIN_NUM_SCALABLE_BF 10
|
||||||
|
|
|
@ -382,7 +382,7 @@ class TDDnode:
|
||||||
|
|
||||||
if self.valgrind == 0:
|
if self.valgrind == 0:
|
||||||
if platform.system().lower() == 'windows':
|
if platform.system().lower() == 'windows':
|
||||||
cmd = "mintty -h never -w hide %s -c %s" % (
|
cmd = "mintty -h never %s -c %s" % (
|
||||||
binPath, self.cfgDir)
|
binPath, self.cfgDir)
|
||||||
else:
|
else:
|
||||||
cmd = "nohup %s -c %s > /dev/null 2>&1 & " % (
|
cmd = "nohup %s -c %s > /dev/null 2>&1 & " % (
|
||||||
|
@ -391,7 +391,7 @@ class TDDnode:
|
||||||
valgrindCmdline = "valgrind --log-file=\"%s/../log/valgrind.log\" --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes"%self.cfgDir
|
valgrindCmdline = "valgrind --log-file=\"%s/../log/valgrind.log\" --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes"%self.cfgDir
|
||||||
|
|
||||||
if platform.system().lower() == 'windows':
|
if platform.system().lower() == 'windows':
|
||||||
cmd = "mintty -h never -w hide %s %s -c %s" % (
|
cmd = "mintty -h never %s %s -c %s" % (
|
||||||
valgrindCmdline, binPath, self.cfgDir)
|
valgrindCmdline, binPath, self.cfgDir)
|
||||||
else:
|
else:
|
||||||
cmd = "nohup %s %s -c %s 2>&1 & " % (
|
cmd = "nohup %s %s -c %s 2>&1 & " % (
|
||||||
|
@ -518,20 +518,20 @@ class TDDnode:
|
||||||
|
|
||||||
if self.running != 0:
|
if self.running != 0:
|
||||||
if platform.system().lower() == 'windows':
|
if platform.system().lower() == 'windows':
|
||||||
os.system("wmic process where \"name='taosd.exe' and CommandLine like '%%dnode%d%%'\" get processId | xargs echo | awk '{print $2}' | xargs taskkill -f -pid"%self.index)
|
psCmd = "for /f %a in ('wmic process where \"name='taosd.exe' and CommandLine like '%%dnode%d%%'\" get processId ^| xargs echo ^| awk ^'{print $2}^'') do @(ps | grep %a | awk '{print $1}' | xargs kill -INT )" % (self.index)
|
||||||
else:
|
else:
|
||||||
psCmd = "ps -ef|grep -w %s| grep dnode%d|grep -v grep | awk '{print $2}'" % (toBeKilled,self.index)
|
psCmd = "ps -ef|grep -w %s| grep dnode%d|grep -v grep | awk '{print $2}'" % (toBeKilled,self.index)
|
||||||
|
processID = subprocess.check_output(
|
||||||
|
psCmd, shell=True).decode("utf-8")
|
||||||
|
|
||||||
|
while(processID):
|
||||||
|
killCmd = "kill -INT %s > /dev/null 2>&1" % processID
|
||||||
|
os.system(killCmd)
|
||||||
|
time.sleep(1)
|
||||||
processID = subprocess.check_output(
|
processID = subprocess.check_output(
|
||||||
psCmd, shell=True).decode("utf-8")
|
psCmd, shell=True).decode("utf-8")
|
||||||
|
if self.valgrind:
|
||||||
while(processID):
|
time.sleep(2)
|
||||||
killCmd = "kill -INT %s > /dev/null 2>&1" % processID
|
|
||||||
os.system(killCmd)
|
|
||||||
time.sleep(1)
|
|
||||||
processID = subprocess.check_output(
|
|
||||||
psCmd, shell=True).decode("utf-8")
|
|
||||||
if self.valgrind:
|
|
||||||
time.sleep(2)
|
|
||||||
|
|
||||||
self.running = 0
|
self.running = 0
|
||||||
tdLog.debug("dnode:%d is stopped by kill -INT" % (self.index))
|
tdLog.debug("dnode:%d is stopped by kill -INT" % (self.index))
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
system sh/stop_dnodes.sh
|
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
|
||||||
system sh/cfg.sh -n dnode1 -c wallevel -v 0
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
|
||||||
|
|
||||||
print ============= step1
|
|
||||||
sql close
|
|
||||||
print close1
|
|
||||||
sql connect
|
|
||||||
|
|
||||||
print ============= step2
|
|
||||||
sql close
|
|
||||||
sql connect
|
|
||||||
|
|
||||||
print ============= step3
|
|
||||||
sql close
|
|
||||||
sql connect
|
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
|
|
@ -1,19 +0,0 @@
|
||||||
system sh/stop_dnodes.sh
|
|
||||||
|
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 2
|
|
||||||
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 1
|
|
||||||
system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 4
|
|
||||||
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 100000
|
|
||||||
system sh/cfg.sh -n dnode1 -c http -v 1
|
|
||||||
system sh/cfg.sh -n dnode1 -c mqtt -v 1
|
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
|
||||||
sql create database mqttdb;
|
|
||||||
sql create table mqttdb.devices(ts timestamp, value double) tags(name binary(32), model binary(32), serial binary(16), param binary(16), unit binary(16));
|
|
||||||
|
|
||||||
sleep 1000
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
|
Binary file not shown.
|
@ -1,32 +0,0 @@
|
||||||
system sh/stop_dnodes.sh
|
|
||||||
system sh/mv_old_data.sh
|
|
||||||
|
|
||||||
print ============== deploy
|
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
|
||||||
system sh/exec.sh -n dnode2 -s start
|
|
||||||
system sh/exec.sh -n dnode3 -s start
|
|
||||||
|
|
||||||
print =============== step1
|
|
||||||
|
|
||||||
sql use test
|
|
||||||
sql select * from m1
|
|
||||||
|
|
||||||
print $rows points data are retrieved
|
|
||||||
if $rows != 7 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
|
|
||||||
print =============== step 2
|
|
||||||
|
|
||||||
sql select * from t1
|
|
||||||
|
|
||||||
print $rows points data are retrieved
|
|
||||||
if $rows != 7 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
|
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
|
||||||
system sh/exec.sh -n dnode2 -s stop -x SIGINT
|
|
||||||
system sh/exec.sh -n dnode3 -s stop -x SIGINT
|
|
|
@ -1,9 +0,0 @@
|
||||||
run general/insert/basic.sim
|
|
||||||
run general/insert/insert_drop.sim
|
|
||||||
run general/insert/query_block1_memory.sim
|
|
||||||
run general/insert/query_block2_memory.sim
|
|
||||||
run general/insert/query_block1_file.sim
|
|
||||||
run general/insert/query_block2_file.sim
|
|
||||||
run general/insert/query_file_memory.sim
|
|
||||||
run general/insert/query_multi_file.sim
|
|
||||||
run general/insert/tcp.sim
|
|
|
@ -1,25 +0,0 @@
|
||||||
run general/tag/3.sim
|
|
||||||
run general/tag/4.sim
|
|
||||||
run general/tag/5.sim
|
|
||||||
run general/tag/6.sim
|
|
||||||
run general/tag/add.sim
|
|
||||||
run general/tag/bigint.sim
|
|
||||||
run general/tag/binary_binary.sim
|
|
||||||
run general/tag/binary.sim
|
|
||||||
run general/tag/bool_binary.sim
|
|
||||||
run general/tag/bool_int.sim
|
|
||||||
run general/tag/bool.sim
|
|
||||||
run general/tag/change.sim
|
|
||||||
run general/tag/column.sim
|
|
||||||
run general/tag/commit.sim
|
|
||||||
run general/tag/create.sim
|
|
||||||
run general/tag/delete.sim
|
|
||||||
run general/tag/double.sim
|
|
||||||
run general/tag/filter.sim
|
|
||||||
run general/tag/float.sim
|
|
||||||
run general/tag/int_binary.sim
|
|
||||||
run general/tag/int_float.sim
|
|
||||||
run general/tag/int.sim
|
|
||||||
run general/tag/set.sim
|
|
||||||
run general/tag/smallint.sim
|
|
||||||
run general/tag/tinyint.sim
|
|
|
@ -1,27 +0,0 @@
|
||||||
run general/table/autocreate.sim
|
|
||||||
run general/table/basic1.sim
|
|
||||||
run general/table/basic2.sim
|
|
||||||
run general/table/basic3.sim
|
|
||||||
run general/table/bigint.sim
|
|
||||||
run general/table/binary.sim
|
|
||||||
run general/table/bool.sim
|
|
||||||
run general/table/column_name.sim
|
|
||||||
run general/table/column_num.sim
|
|
||||||
run general/table/column_value.sim
|
|
||||||
run general/table/column2.sim
|
|
||||||
run general/table/date.sim
|
|
||||||
run general/table/db.table.sim
|
|
||||||
run general/table/delete_reuse1.sim
|
|
||||||
run general/table/delete_reuse2.sim
|
|
||||||
run general/table/delete_writing.sim
|
|
||||||
run general/table/describe.sim
|
|
||||||
run general/table/double.sim
|
|
||||||
run general/table/fill.sim
|
|
||||||
run general/table/float.sim
|
|
||||||
run general/table/int.sim
|
|
||||||
run general/table/limit.sim
|
|
||||||
run general/table/smallint.sim
|
|
||||||
run general/table/table_len.sim
|
|
||||||
run general/table/table.sim
|
|
||||||
run general/table/tinyint.sim
|
|
||||||
run general/table/vgroup.sim
|
|
|
@ -52,13 +52,22 @@
|
||||||
./test.sh -f tsim/import/replica1.sim
|
./test.sh -f tsim/import/replica1.sim
|
||||||
|
|
||||||
# ---- insert
|
# ---- insert
|
||||||
|
./test.sh -f tsim/insert/backquote.sim
|
||||||
|
./test.sh -f tsim/insert/basic.sim
|
||||||
./test.sh -f tsim/insert/basic0.sim
|
./test.sh -f tsim/insert/basic0.sim
|
||||||
./test.sh -f tsim/insert/basic1.sim
|
./test.sh -f tsim/insert/basic1.sim
|
||||||
./test.sh -f tsim/insert/backquote.sim
|
|
||||||
./test.sh -f tsim/insert/null.sim
|
|
||||||
./test.sh -f tsim/insert/update0.sim
|
|
||||||
./test.sh -f tsim/insert/commit-merge0.sim
|
./test.sh -f tsim/insert/commit-merge0.sim
|
||||||
|
./test.sh -f tsim/insert/insert_drop.sim
|
||||||
./test.sh -f tsim/insert/insert_select.sim
|
./test.sh -f tsim/insert/insert_select.sim
|
||||||
|
./test.sh -f tsim/insert/null.sim
|
||||||
|
./test.sh -f tsim/insert/query_block1_file.sim
|
||||||
|
./test.sh -f tsim/insert/query_block1_memory.sim
|
||||||
|
./test.sh -f tsim/insert/query_block2_file.sim
|
||||||
|
./test.sh -f tsim/insert/query_block2_memory.sim
|
||||||
|
./test.sh -f tsim/insert/query_file_memory.sim
|
||||||
|
./test.sh -f tsim/insert/query_multi_file.sim
|
||||||
|
#./test.sh -f tsim/insert/tcp.sim
|
||||||
|
./test.sh -f tsim/insert/update0.sim
|
||||||
|
|
||||||
# ---- parser
|
# ---- parser
|
||||||
./test.sh -f tsim/parser/groupby-basic.sim
|
./test.sh -f tsim/parser/groupby-basic.sim
|
||||||
|
@ -94,7 +103,33 @@
|
||||||
./test.sh -f tsim/show/basic.sim
|
./test.sh -f tsim/show/basic.sim
|
||||||
|
|
||||||
# ---- table
|
# ---- table
|
||||||
|
./test.sh -f tsim/table/autocreate.sim
|
||||||
./test.sh -f tsim/table/basic1.sim
|
./test.sh -f tsim/table/basic1.sim
|
||||||
|
./test.sh -f tsim/table/basic2.sim
|
||||||
|
./test.sh -f tsim/table/basic3.sim
|
||||||
|
./test.sh -f tsim/table/bigint.sim
|
||||||
|
./test.sh -f tsim/table/binary.sim
|
||||||
|
./test.sh -f tsim/table/bool.sim
|
||||||
|
./test.sh -f tsim/table/column_name.sim
|
||||||
|
./test.sh -f tsim/table/column_num.sim
|
||||||
|
./test.sh -f tsim/table/column_value.sim
|
||||||
|
./test.sh -f tsim/table/column2.sim
|
||||||
|
./test.sh -f tsim/table/createmulti.sim
|
||||||
|
./test.sh -f tsim/table/date.sim
|
||||||
|
./test.sh -f tsim/table/db.table.sim
|
||||||
|
# ./test.sh -f tsim/table/delete_reuse1.sim
|
||||||
|
# ./test.sh -f tsim/table/delete_reuse2.sim
|
||||||
|
# ./test.sh -f tsim/table/delete_writing.sim
|
||||||
|
./test.sh -f tsim/table/describe.sim
|
||||||
|
./test.sh -f tsim/table/double.sim
|
||||||
|
./test.sh -f tsim/table/float.sim
|
||||||
|
./test.sh -f tsim/table/int.sim
|
||||||
|
./test.sh -f tsim/table/limit.sim
|
||||||
|
./test.sh -f tsim/table/smallint.sim
|
||||||
|
./test.sh -f tsim/table/table_len.sim
|
||||||
|
./test.sh -f tsim/table/table.sim
|
||||||
|
./test.sh -f tsim/table/tinyint.sim
|
||||||
|
./test.sh -f tsim/table/vgroup.sim
|
||||||
|
|
||||||
# ---- stream
|
# ---- stream
|
||||||
./test.sh -f tsim/stream/basic0.sim
|
./test.sh -f tsim/stream/basic0.sim
|
||||||
|
@ -114,6 +149,7 @@
|
||||||
# ./test.sh -f tsim/stream/schedSnode.sim
|
# ./test.sh -f tsim/stream/schedSnode.sim
|
||||||
./test.sh -f tsim/stream/windowClose.sim
|
./test.sh -f tsim/stream/windowClose.sim
|
||||||
./test.sh -f tsim/stream/ignoreExpiredData.sim
|
./test.sh -f tsim/stream/ignoreExpiredData.sim
|
||||||
|
./test.sh -f tsim/stream/sliding.sim
|
||||||
|
|
||||||
# ---- transaction
|
# ---- transaction
|
||||||
./test.sh -f tsim/trans/lossdata1.sim
|
./test.sh -f tsim/trans/lossdata1.sim
|
||||||
|
@ -227,23 +263,23 @@
|
||||||
./test.sh -f tsim/compress/uncompress.sim
|
./test.sh -f tsim/compress/uncompress.sim
|
||||||
|
|
||||||
# ---- compute
|
# ---- compute
|
||||||
#./test.sh -f tsim/compute/avg.sim
|
./test.sh -f tsim/compute/avg.sim
|
||||||
#./test.sh -f tsim/compute/block_dist.sim
|
#./test.sh -f tsim/compute/block_dist.sim
|
||||||
#./test.sh -f tsim/compute/bottom.sim
|
./test.sh -f tsim/compute/bottom.sim
|
||||||
#./test.sh -f tsim/compute/count.sim
|
./test.sh -f tsim/compute/count.sim
|
||||||
#./test.sh -f tsim/compute/diff.sim
|
./test.sh -f tsim/compute/diff.sim
|
||||||
#./test.sh -f tsim/compute/diff2.sim
|
./test.sh -f tsim/compute/diff2.sim
|
||||||
#./test.sh -f tsim/compute/first.sim
|
./test.sh -f tsim/compute/first.sim
|
||||||
#./test.sh -f tsim/compute/interval.sim
|
./test.sh -f tsim/compute/interval.sim
|
||||||
#./test.sh -f tsim/compute/last_row.sim
|
#./test.sh -f tsim/compute/last_row.sim
|
||||||
#./test.sh -f tsim/compute/last.sim
|
./test.sh -f tsim/compute/last.sim
|
||||||
#./test.sh -f tsim/compute/leastsquare.sim
|
./test.sh -f tsim/compute/leastsquare.sim
|
||||||
#./test.sh -f tsim/compute/max.sim
|
./test.sh -f tsim/compute/max.sim
|
||||||
#./test.sh -f tsim/compute/min.sim
|
./test.sh -f tsim/compute/min.sim
|
||||||
#./test.sh -f tsim/compute/null.sim
|
#./test.sh -f tsim/compute/null.sim
|
||||||
./test.sh -f tsim/compute/percentile.sim
|
./test.sh -f tsim/compute/percentile.sim
|
||||||
./test.sh -f tsim/compute/stddev.sim
|
./test.sh -f tsim/compute/stddev.sim
|
||||||
#./test.sh -f tsim/compute/sum.sim
|
./test.sh -f tsim/compute/sum.sim
|
||||||
./test.sh -f tsim/compute/top.sim
|
./test.sh -f tsim/compute/top.sim
|
||||||
|
|
||||||
# ---- field
|
# ---- field
|
||||||
|
@ -279,4 +315,32 @@
|
||||||
# ---- wal
|
# ---- wal
|
||||||
./test.sh -f tsim/wal/kill.sim
|
./test.sh -f tsim/wal/kill.sim
|
||||||
|
|
||||||
|
# ---- tag
|
||||||
|
./test.sh -f tsim/tag/3.sim
|
||||||
|
./test.sh -f tsim/tag/4.sim
|
||||||
|
./test.sh -f tsim/tag/5.sim
|
||||||
|
#./test.sh -f tsim/tag/6.sim
|
||||||
|
#./test.sh -f tsim/tag/add.sim
|
||||||
|
./test.sh -f tsim/tag/bigint.sim
|
||||||
|
./test.sh -f tsim/tag/binary_binary.sim
|
||||||
|
./test.sh -f tsim/tag/binary.sim
|
||||||
|
./test.sh -f tsim/tag/bool_binary.sim
|
||||||
|
./test.sh -f tsim/tag/bool_int.sim
|
||||||
|
./test.sh -f tsim/tag/bool.sim
|
||||||
|
#./test.sh -f tsim/tag/change.sim
|
||||||
|
#./test.sh -f tsim/tag/column.sim
|
||||||
|
#./test.sh -f tsim/tag/commit.sim
|
||||||
|
#./test.sh -f tsim/tag/create.sim
|
||||||
|
#./test.sh -f tsim/tag/delete.sim
|
||||||
|
#./test.sh -f tsim/tag/double.sim
|
||||||
|
#./test.sh -f tsim/tag/filter.sim
|
||||||
|
#./test.sh -f tsim/tag/float.sim
|
||||||
|
./test.sh -f tsim/tag/int_binary.sim
|
||||||
|
./test.sh -f tsim/tag/int_float.sim
|
||||||
|
./test.sh -f tsim/tag/int.sim
|
||||||
|
#./test.sh -f tsim/tag/set.sim
|
||||||
|
./test.sh -f tsim/tag/smallint.sim
|
||||||
|
./test.sh -f tsim/tag/tinyint.sim
|
||||||
|
|
||||||
|
|
||||||
#======================b1-end===============
|
#======================b1-end===============
|
||||||
|
|
|
@ -127,8 +127,8 @@ echo "dataDir $DATA_DIR" >> $TAOS_CFG
|
||||||
echo "logDir $LOG_DIR" >> $TAOS_CFG
|
echo "logDir $LOG_DIR" >> $TAOS_CFG
|
||||||
echo "debugFlag 0" >> $TAOS_CFG
|
echo "debugFlag 0" >> $TAOS_CFG
|
||||||
echo "tmrDebugFlag 131" >> $TAOS_CFG
|
echo "tmrDebugFlag 131" >> $TAOS_CFG
|
||||||
echo "uDebugFlag 131" >> $TAOS_CFG
|
echo "uDebugFlag 143" >> $TAOS_CFG
|
||||||
echo "rpcDebugFlag 131" >> $TAOS_CFG
|
echo "rpcDebugFlag 143" >> $TAOS_CFG
|
||||||
echo "jniDebugFlag 143" >> $TAOS_CFG
|
echo "jniDebugFlag 143" >> $TAOS_CFG
|
||||||
echo "qDebugFlag 143" >> $TAOS_CFG
|
echo "qDebugFlag 143" >> $TAOS_CFG
|
||||||
echo "cDebugFlag 143" >> $TAOS_CFG
|
echo "cDebugFlag 143" >> $TAOS_CFG
|
||||||
|
|
|
@ -77,7 +77,10 @@ goto :eof
|
||||||
:check_offline
|
:check_offline
|
||||||
sleep 1
|
sleep 1
|
||||||
for /f "tokens=2" %%C in ('wmic process where "name='taosd.exe' and CommandLine like '%%%NODE_NAME%%%'" get processId ^| xargs echo') do (
|
for /f "tokens=2" %%C in ('wmic process where "name='taosd.exe' and CommandLine like '%%%NODE_NAME%%%'" get processId ^| xargs echo') do (
|
||||||
echo check taosd offline
|
for /f "tokens=1" %%D in ('ps ^| grep %%C') do (
|
||||||
goto :check_offline
|
echo kill -INT %%D
|
||||||
|
echo check taosd offline %NODE_NAME% %%C %%D
|
||||||
|
goto :check_offline
|
||||||
|
)
|
||||||
)
|
)
|
||||||
goto :eof
|
goto :eof
|
|
@ -24,7 +24,7 @@ for /F "usebackq tokens=*" %%i in (!caseFile!) do (
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
exit !exitNum!
|
exit /b !exitNum!
|
||||||
|
|
||||||
:colorEcho
|
:colorEcho
|
||||||
set timeNow=%time%
|
set timeNow=%time%
|
||||||
|
|
|
@ -660,8 +660,8 @@ endi
|
||||||
print ======= over
|
print ======= over
|
||||||
sql drop database d1
|
sql drop database d1
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -83,10 +83,6 @@ while $i < 10
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
print ==> sleep 1 seconds to renew cache
|
|
||||||
sql reset query cache
|
|
||||||
sleep 1000
|
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
print ===>rows $rows, data $data01
|
print ===>rows $rows, data $data01
|
||||||
|
|
|
@ -48,9 +48,7 @@ system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
print =============== step3
|
print =============== step3
|
||||||
print ==> sleep 1 seconds to renew cache
|
|
||||||
sql reset query cache
|
sql reset query cache
|
||||||
sleep 1000
|
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql create database $db
|
sql create database $db
|
||||||
|
|
|
@ -32,9 +32,7 @@ system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
print =============== step3
|
print =============== step3
|
||||||
print ==> sleep 1 seconds to renew cache
|
|
||||||
sql reset query cache
|
sql reset query cache
|
||||||
sleep 1000
|
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql create database $db
|
sql create database $db
|
||||||
|
|
|
@ -57,15 +57,7 @@ $tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql create database $db
|
sql create database $db
|
||||||
sql use $db
|
sql use $db
|
||||||
|
sql create table $tb (ts timestamp, b bool, t tinyint, s smallint, i int, big bigint, f float, d double, str binary(256))
|
||||||
$x = 0
|
|
||||||
step3:
|
|
||||||
$x = $x + 1
|
|
||||||
sleep 1000
|
|
||||||
if $x == 20 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
sql create table $tb (ts timestamp, b bool, t tinyint, s smallint, i int, big bigint, f float, d double, str binary(256)) -x step3
|
|
||||||
|
|
||||||
$count = 0
|
$count = 0
|
||||||
while $count < $N
|
while $count < $N
|
||||||
|
|
|
@ -38,8 +38,6 @@ while $i < $tbNum
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sleep 100
|
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
@ -69,13 +67,13 @@ endi
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select avg(tbcol) as b from $tb interval(1m)
|
sql select avg(tbcol) as b from $tb interval(1m)
|
||||||
print ===> $data01
|
print ===> $data01
|
||||||
if $data11 != 1.000000000 then
|
if $data10 != 1.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select avg(tbcol) as b from $tb interval(1d)
|
sql select avg(tbcol) as b from $tb interval(1d)
|
||||||
print ===> $data01
|
print ===> $data01
|
||||||
if $data01 != 9.500000000 then
|
if $data00 != 9.500000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -84,7 +82,7 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select avg(tbcol) as b from $tb where ts <= $ms interval(1m)
|
sql select avg(tbcol) as b from $tb where ts <= $ms interval(1m)
|
||||||
print ===> $data01
|
print ===> $data01
|
||||||
if $data41 != 4.000000000 then
|
if $data40 != 4.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 5 then
|
if $rows != 5 then
|
||||||
|
@ -123,14 +121,14 @@ endi
|
||||||
|
|
||||||
print =============== step9
|
print =============== step9
|
||||||
sql select avg(tbcol) as b from $mt interval(1m)
|
sql select avg(tbcol) as b from $mt interval(1m)
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1.000000000 then
|
if $data10 != 1.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select avg(tbcol) as b from $mt interval(1d)
|
sql select avg(tbcol) as b from $mt interval(1d)
|
||||||
print ===> $data01
|
print ===> $data01
|
||||||
if $data01 != 9.500000000 then
|
if $data00 != 9.500000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -148,9 +146,9 @@ endi
|
||||||
print =============== step11
|
print =============== step11
|
||||||
$cc = 4 * 60000
|
$cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select avg(tbcol) as b from $mt where ts <= $ms interval(1m) group by tgcol
|
sql select avg(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1.000000000 then
|
if $data10 != 1.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 50 then
|
if $rows != 50 then
|
||||||
|
|
|
@ -47,8 +47,6 @@ while $x < $rowNum
|
||||||
$x = $x + 1
|
$x = $x + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sleep 100
|
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 0
|
$i = 0
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
|
|
@ -38,15 +38,13 @@ while $i < $tbNum
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sleep 100
|
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select bottom(tbcol, 1) from $tb
|
sql select bottom(tbcol, 1) from $tb
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -54,25 +52,25 @@ print =============== step3
|
||||||
$cc = 4 * 60000
|
$cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select bottom(tbcol, 1) from $tb where ts > $ms
|
sql select bottom(tbcol, 1) from $tb where ts > $ms
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != 5 then
|
if $data00 != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select bottom(tbcol, 1) as b from $tb
|
sql select bottom(tbcol, 1) as b from $tb
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select bottom(tbcol, 2) as b from $tb
|
sql select bottom(tbcol, 2) as b from $tb
|
||||||
print ===> $data01 $data11
|
print ===> $data00 $data10
|
||||||
if $data01 != 0 then
|
if $data00 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data11 != 1 then
|
if $data10 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -80,11 +78,11 @@ print =============== step6
|
||||||
$cc = 4 * 60000
|
$cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select bottom(tbcol, 2) as b from $tb where ts > $ms
|
sql select bottom(tbcol, 2) as b from $tb where ts > $ms
|
||||||
print ===> $data01 $data11
|
print ===> $data00 $data10
|
||||||
if $data01 != 5 then
|
if $data00 != 6 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data11 != 6 then
|
if $data10 != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
|
|
@ -38,13 +38,10 @@ while $i < $tbNum
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sleep 100
|
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
|
||||||
|
|
||||||
sql select count(*) from $tb
|
sql select count(*) from $tb
|
||||||
print ===> select count(*) from $tb => $data00
|
print ===> select count(*) from $tb => $data00
|
||||||
if $data00 != $rowNum then
|
if $data00 != $rowNum then
|
||||||
|
@ -81,14 +78,14 @@ endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select count(tbcol) as b from $tb interval(1m)
|
sql select count(tbcol) as b from $tb interval(1m)
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != 1 then
|
if $data00 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(tbcol) as b from $tb interval(1d)
|
sql select count(tbcol) as b from $tb interval(1d)
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != $rowNum then
|
if $data00 != $rowNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -96,8 +93,8 @@ print =============== step6
|
||||||
$cc = 4 * 60000
|
$cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select count(tbcol) as b from $tb where ts <= $ms interval(1m)
|
sql select count(tbcol) as b from $tb where ts <= $ms interval(1m)
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != 1 then
|
if $data00 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 5 then
|
if $rows != 5 then
|
||||||
|
@ -149,17 +146,17 @@ endi
|
||||||
|
|
||||||
print =============== step9
|
print =============== step9
|
||||||
sql select count(tbcol) as b from $mt interval(1m)
|
sql select count(tbcol) as b from $mt interval(1m)
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != 10 then
|
if $data00 != 10 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data11 != 10 then
|
if $data10 != 10 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(tbcol) as b from $mt interval(1d)
|
sql select count(tbcol) as b from $mt interval(1d)
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != 200 then
|
if $data00 != 200 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -177,9 +174,9 @@ endi
|
||||||
print =============== step11
|
print =============== step11
|
||||||
$cc = 4 * 60000
|
$cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select count(tbcol) as b from $mt where ts <= $ms interval(1m) group by tgcol
|
sql select count(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
||||||
print ===> $data01
|
print ===> $data01
|
||||||
if $data01 != 1 then
|
if $data00 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 50 then
|
if $rows != 50 then
|
||||||
|
|
|
@ -37,15 +37,13 @@ while $i < $tbNum
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sleep 100
|
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select diff(tbcol) from $tb
|
sql select diff(tbcol) from $tb
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -53,23 +51,23 @@ print =============== step3
|
||||||
$cc = 4 * 60000
|
$cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select diff(tbcol) from $tb where ts > $ms
|
sql select diff(tbcol) from $tb where ts > $ms
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
$cc = 4 * 60000
|
$cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select diff(tbcol) from $tb where ts <= $ms
|
sql select diff(tbcol) from $tb where ts <= $ms
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select diff(tbcol) as b from $tb
|
sql select diff(tbcol) as b from $tb
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
|
system sh/cfg.sh -n dnode1 -c debugflag -v 131
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
|
@ -39,91 +40,90 @@ while $i < $tbNum
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sleep 100
|
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
|
||||||
sql select diff(c1) from $tb
|
sql select diff(c1) from $tb
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c2) from $tb
|
sql select diff(c2) from $tb
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1.00000 then
|
if $data10 != 1.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c3) from $tb
|
sql select diff(c3) from $tb
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c4) from $tb
|
sql select diff(c4) from $tb
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c5) from $tb
|
sql select diff(c5) from $tb
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 0 then
|
if $data10 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c6) from $tb
|
sql select diff(c6) from $tb
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1.000000000 then
|
if $data10 != 1.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql_error select diff(c7) from $tb
|
|
||||||
|
sql select diff(c7) from $tb
|
||||||
sql_error select diff(c8) from $tb
|
sql_error select diff(c8) from $tb
|
||||||
sql_error select diff(c9) from $tb
|
sql_error select diff(c9) from $tb
|
||||||
sql_error select diff(ts) from $tb
|
sql_error select diff(ts) from $tb
|
||||||
sql_error select diff(c1), diff(c2) from $tb
|
sql_error select diff(c1), diff(c2) from $tb
|
||||||
#sql_error select 2+diff(c1) from $tb
|
|
||||||
sql_error select diff(c1+2) from $tb
|
sql select 2+diff(c1) from $tb
|
||||||
|
sql select diff(c1+2) from $tb
|
||||||
sql_error select diff(c1) from $tb where ts > 0 and ts < now + 100m interval(10m)
|
sql_error select diff(c1) from $tb where ts > 0 and ts < now + 100m interval(10m)
|
||||||
sql_error select diff(c1) from $mt
|
sql select diff(c1) from $mt
|
||||||
sql_error select diff(diff(c1)) from $tb
|
sql_error select diff(diff(c1)) from $tb
|
||||||
sql_error select diff(c1) from m_di_tb1 where c2 like '2%'
|
sql_error select diff(c1) from m_di_tb1 where c2 like '2%'
|
||||||
|
|
||||||
|
|
||||||
print =============== step3
|
print =============== step3
|
||||||
sql select diff(c1) from $tb where c1 > 5
|
sql select diff(c1) from $tb where c1 > 5
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c2) from $tb where c2 > 5
|
sql select diff(c2) from $tb where c2 > 5
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1.00000 then
|
if $data10 != 1.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c3) from $tb where c3 > 5
|
sql select diff(c3) from $tb where c3 > 5
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c4) from $tb where c4 > 5
|
sql select diff(c4) from $tb where c4 > 5
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c5) from $tb where c5 > 5
|
sql select diff(c5) from $tb where c5 > 5
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 0 then
|
if $data10 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
sql select diff(c6) from $tb where c6 > 5
|
sql select diff(c6) from $tb where c6 > 5
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1.000000000 then
|
if $data10 != 1.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql select diff(c1) from $tb where c1 > 5 and c2 < $rowNum
|
sql select diff(c1) from $tb where c1 > 5 and c2 < $rowNum
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -131,8 +131,8 @@ sql select diff(c1) from $tb where c9 like '%9' and c1 <= 20
|
||||||
if $rows != 1 then
|
if $rows != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data01 != 10 then
|
if $data00 != 10 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,6 @@ while $i < $tbNum
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sleep 100
|
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
@ -68,14 +66,14 @@ endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select first(tbcol) as b from $tb interval(1m)
|
sql select first(tbcol) as b from $tb interval(1m)
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select first(tbcol) as b from $tb interval(1d)
|
sql select first(tbcol) as b from $tb interval(1d)
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -83,8 +81,8 @@ print =============== step6
|
||||||
$cc = 4 * 60000
|
$cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select first(tbcol) as b from $tb where ts <= $ms interval(1m)
|
sql select first(tbcol) as b from $tb where ts <= $ms interval(1m)
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data41 != 4 then
|
if $data40 != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 5 then
|
if $rows != 5 then
|
||||||
|
@ -124,14 +122,14 @@ endi
|
||||||
print =============== step9
|
print =============== step9
|
||||||
sql select first(tbcol) as b from $mt interval(1m)
|
sql select first(tbcol) as b from $mt interval(1m)
|
||||||
print select first(tbcol) as b from $mt interval(1m)
|
print select first(tbcol) as b from $mt interval(1m)
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select first(tbcol) as b from $mt interval(1d)
|
sql select first(tbcol) as b from $mt interval(1d)
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != 0 then
|
if $data00 != 0 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -149,9 +147,9 @@ endi
|
||||||
print =============== step11
|
print =============== step11
|
||||||
$cc = 4 * 60000
|
$cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
sql select first(tbcol) as b from $mt where ts <= $ms interval(1m) group by tgcol
|
sql select first(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
print ===> $rows
|
print ===> $rows
|
||||||
|
|
|
@ -47,10 +47,10 @@ print ===> $rows
|
||||||
if $rows < $rowNum then
|
if $rows < $rowNum then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != 1 then
|
if $data00 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data05 != 1 then
|
if $data04 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -65,10 +65,10 @@ endi
|
||||||
if $rows < 3 then
|
if $rows < 3 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != 1 then
|
if $data00 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data05 != 1 then
|
if $data04 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -87,10 +87,10 @@ endi
|
||||||
if $rows > 22 then
|
if $rows > 22 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != 1 then
|
if $data00 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data05 != 1 then
|
if $data04 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -109,10 +109,10 @@ endi
|
||||||
if $rows > 50 then
|
if $rows > 50 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data21 != 1 then
|
if $data20 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data25 != 1 then
|
if $data24 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -125,10 +125,10 @@ endi
|
||||||
if $rows > 22 then
|
if $rows > 22 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data11 > 15 then
|
if $data10 > 15 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data11 < 5 then
|
if $data10 < 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -143,10 +143,10 @@ endi
|
||||||
if $rows > 7 then
|
if $rows > 7 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data11 > 15 then
|
if $data10 > 15 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data11 < 5 then
|
if $data10 < 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -165,10 +165,10 @@ endi
|
||||||
if $rows > 22 then
|
if $rows > 22 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data11 > 15 then
|
if $data10 > 15 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data11 < 5 then
|
if $data10 < 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -186,10 +186,10 @@ endi
|
||||||
if $rows > 50 then
|
if $rows > 50 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data11 > 15 then
|
if $data10 > 15 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data11 < 5 then
|
if $data10 < 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,6 @@ while $i < $tbNum
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sleep 100
|
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
@ -69,14 +67,14 @@ endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select last(tbcol) as b from $tb interval(1m)
|
sql select last(tbcol) as b from $tb interval(1m)
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select last(tbcol) as b from $tb interval(1d)
|
sql select last(tbcol) as b from $tb interval(1d)
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -85,8 +83,8 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select last(tbcol) as b from $tb where ts <= $ms interval(1m)
|
sql select last(tbcol) as b from $tb where ts <= $ms interval(1m)
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 5 then
|
if $rows != 5 then
|
||||||
|
@ -127,14 +125,14 @@ endi
|
||||||
|
|
||||||
print =============== step9
|
print =============== step9
|
||||||
sql select last(tbcol) as b from $mt interval(1m)
|
sql select last(tbcol) as b from $mt interval(1m)
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select last(tbcol) as b from $mt interval(1d)
|
sql select last(tbcol) as b from $mt interval(1d)
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -153,9 +151,9 @@ print =============== step11
|
||||||
$cc = 4 * 60000
|
$cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select last(tbcol) as b from $mt where ts <= $ms interval(1m) group by tgcol
|
sql select last(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
print ===> $rows
|
print ===> $rows
|
||||||
|
|
|
@ -38,8 +38,6 @@ while $i < $tbNum
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sleep 100
|
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
@ -53,6 +51,7 @@ endi
|
||||||
print =============== step3
|
print =============== step3
|
||||||
$cc = 4 * 60000
|
$cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
print select last_row(tbcol) from $tb where ts <= $ms
|
||||||
sql select last_row(tbcol) from $tb where ts <= $ms
|
sql select last_row(tbcol) from $tb where ts <= $ms
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
if $data00 != 4 then
|
if $data00 != 4 then
|
||||||
|
@ -98,8 +97,6 @@ if $data00 != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print =============== step10
|
print =============== step10
|
||||||
sql select last_row(tbcol) as b from $mt group by tgcol
|
sql select last_row(tbcol) as b from $mt group by tgcol
|
||||||
print ===> $data00
|
print ===> $data00
|
||||||
|
|
|
@ -37,8 +37,6 @@ while $i < $tbNum
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sleep 100
|
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
@ -65,21 +63,21 @@ endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select leastsquares(tbcol, 1, 1) as b from $tb interval(1m)
|
sql select leastsquares(tbcol, 1, 1) as b from $tb interval(1m)
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != @{slop:1.000000, intercept:1.000000}@ then
|
if $data00 != @{slop:1.000000, intercept:1.000000}@ then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select leastsquares(tbcol, 1, 1) as b from $tb interval(1d)
|
sql select leastsquares(tbcol, 1, 1) as b from $tb interval(1d)
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != @{slop:1.000000, intercept:1.000000}@ then
|
if $data00 != @{slop:1.000000, intercept:1.000000}@ then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step6
|
print =============== step6
|
||||||
sql select leastsquares(tbcol, 1, 1) as b from $tb where ts < now + 4m interval(1m)
|
sql select leastsquares(tbcol, 1, 1) as b from $tb where ts < now + 4m interval(1m)
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != @{slop:1.000000, intercept:1.000000}@ then
|
if $data00 != @{slop:1.000000, intercept:1.000000}@ then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
print ===> $rows
|
print ===> $rows
|
||||||
|
|
|
@ -38,8 +38,6 @@ while $i < $tbNum
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sleep 100
|
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
@ -69,14 +67,14 @@ endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql select max(tbcol) as b from $tb interval(1m)
|
sql select max(tbcol) as b from $tb interval(1m)
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select max(tbcol) as b from $tb interval(1d)
|
sql select max(tbcol) as b from $tb interval(1d)
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -85,8 +83,8 @@ $cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select max(tbcol) as b from $tb where ts <= $ms interval(1m)
|
sql select max(tbcol) as b from $tb where ts <= $ms interval(1m)
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $rows != 5 then
|
if $rows != 5 then
|
||||||
|
@ -127,14 +125,14 @@ endi
|
||||||
|
|
||||||
print =============== step9
|
print =============== step9
|
||||||
sql select max(tbcol) as b from $mt interval(1m)
|
sql select max(tbcol) as b from $mt interval(1m)
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select max(tbcol) as b from $mt interval(1d)
|
sql select max(tbcol) as b from $mt interval(1d)
|
||||||
print ===> $data01
|
print ===> $data00
|
||||||
if $data01 != 19 then
|
if $data00 != 19 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -153,9 +151,9 @@ print =============== step11
|
||||||
$cc = 4 * 60000
|
$cc = 4 * 60000
|
||||||
$ms = 1601481600000 + $cc
|
$ms = 1601481600000 + $cc
|
||||||
|
|
||||||
sql select max(tbcol) as b from $mt where ts <= $ms interval(1m) group by tgcol
|
sql select max(tbcol) as b from $mt where ts <= $ms partition by tgcol interval(1m)
|
||||||
print ===> $data11
|
print ===> $data10
|
||||||
if $data11 != 1 then
|
if $data10 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
print ===> $rows
|
print ===> $rows
|
||||||
|
|
|
@ -38,8 +38,6 @@ while $i < $tbNum
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sleep 100
|
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
|
|
@ -100,9 +100,10 @@ if $rows != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql_error select * from $tb where tbcol = NULL
|
sql select * from $tb where tbcol = NULL
|
||||||
|
if $rows != 0 then
|
||||||
return
|
return -1
|
||||||
|
endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql create table tt using $mt tags( NULL )
|
sql create table tt using $mt tags( NULL )
|
||||||
|
|
|
@ -38,8 +38,6 @@ while $i < $tbNum
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sleep 100
|
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
|
|
@ -38,8 +38,6 @@ while $i < $tbNum
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sleep 100
|
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
|
|
@ -38,8 +38,6 @@ while $i < $tbNum
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sleep 100
|
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
|
|
@ -38,8 +38,6 @@ while $i < $tbNum
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
|
|
||||||
sleep 100
|
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
$i = 1
|
$i = 1
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
sleep 50
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
|
|
||||||
print =============== create database
|
print =============== create database
|
||||||
sql create database `database`
|
sql create database `database`
|
||||||
sql create database `DataBase`
|
sql create database `DataBase`
|
||||||
|
@ -184,23 +184,6 @@ print =============== stop and restart taosd
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
$loop_cnt = 0
|
|
||||||
check_dnode_ready:
|
|
||||||
$loop_cnt = $loop_cnt + 1
|
|
||||||
sleep 200
|
|
||||||
if $loop_cnt == 10 then
|
|
||||||
print ====> dnode not ready!
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
sql show dnodes
|
|
||||||
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
|
|
||||||
if $data00 != 1 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data04 != ready then
|
|
||||||
goto check_dnode_ready
|
|
||||||
endi
|
|
||||||
|
|
||||||
sql show databases
|
sql show databases
|
||||||
print rows: $rows
|
print rows: $rows
|
||||||
print $data00 $data01
|
print $data00 $data01
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
|
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
|
@ -32,7 +32,6 @@ if $rows != 3 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
|
||||||
print =============== insert data, mode1: one row one table in sql
|
print =============== insert data, mode1: one row one table in sql
|
||||||
print =============== insert data, mode1: mulit rows one table in sql
|
print =============== insert data, mode1: mulit rows one table in sql
|
||||||
#print =============== insert data, mode1: one rows mulit table in sql
|
#print =============== insert data, mode1: one rows mulit table in sql
|
||||||
|
@ -41,9 +40,6 @@ sql insert into ct1 values(now+0s, 10, 2.0, 3.0)
|
||||||
sql insert into ct1 values(now+1s, 11, 2.1, 3.1)(now+2s, -12, -2.2, -3.2)(now+3s, -13, -2.3, -3.3)
|
sql insert into ct1 values(now+1s, 11, 2.1, 3.1)(now+2s, -12, -2.2, -3.2)(now+3s, -13, -2.3, -3.3)
|
||||||
sql insert into ct2 values(now+0s, 10, 2.0, 3.0)
|
sql insert into ct2 values(now+0s, 10, 2.0, 3.0)
|
||||||
sql insert into ct2 values(now+1s, 11, 2.1, 3.1)(now+2s, -12, -2.2, -3.2)(now+3s, -13, -2.3, -3.3)
|
sql insert into ct2 values(now+1s, 11, 2.1, 3.1)(now+2s, -12, -2.2, -3.2)(now+3s, -13, -2.3, -3.3)
|
||||||
#sql insert into ct1 values(now+4s, -14, -2.4, -3.4) ct2 values(now+4s, -14, -2.4, -3.4)
|
|
||||||
#sql insert into ct1 values(now+5s, -15, -2.5, -3.5)(now+6s, -16, -2.6, -3.6) ct2 values(now+5s, -15, -2.5, -3.5)(now+6s, -16, -2.6, -3.6)
|
|
||||||
|
|
||||||
sql insert into ct3 values('2021-01-01 00:00:00.000', 10, 2.0, 3.0)
|
sql insert into ct3 values('2021-01-01 00:00:00.000', 10, 2.0, 3.0)
|
||||||
|
|
||||||
#===================================================================
|
#===================================================================
|
||||||
|
@ -67,16 +63,6 @@ endi
|
||||||
if $data03 != 3.000000000 then
|
if $data03 != 3.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
#if $data41 != -14 then
|
|
||||||
# return -1
|
|
||||||
#endi
|
|
||||||
#if $data42 != -2.40000 then
|
|
||||||
# return -1
|
|
||||||
#endi
|
|
||||||
#if $data43 != -3.400000000 then
|
|
||||||
# return -1
|
|
||||||
#endi
|
|
||||||
|
|
||||||
|
|
||||||
print =============== select count(*) from child table
|
print =============== select count(*) from child table
|
||||||
sql select count(*) from ct1
|
sql select count(*) from ct1
|
||||||
|
@ -107,10 +93,10 @@ if $data03 != 4 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
#print =============== select first(*)/first(column) from child table
|
#print =============== select first(*)/first(column) from child table
|
||||||
#sql select first(*) from ct1
|
sql select first(*) from ct1
|
||||||
#print ====> select first(*) from ct1
|
print ====> select first(*) from ct1
|
||||||
#print rows: $rows
|
print rows: $rows
|
||||||
#print $data00 $data01 $data02 $data03
|
print $data00 $data01 $data02 $data03
|
||||||
|
|
||||||
sql select first(ts), first(c1), first(c2), first(c3) from ct1
|
sql select first(ts), first(c1), first(c2), first(c3) from ct1
|
||||||
print ====> select first(ts), first(c1), first(c2), first(c3) from ct1
|
print ====> select first(ts), first(c1), first(c2), first(c3) from ct1
|
||||||
|
@ -217,23 +203,23 @@ if $data32 != -3.300000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
#===================================================================
|
#===================================================================
|
||||||
#===================================================================
|
|
||||||
|
|
||||||
#print =============== query data from stb
|
#print =============== query data from stb
|
||||||
#sql select * from stb
|
sql select * from stb
|
||||||
#if $rows != 4 then
|
print $rows
|
||||||
# return -1
|
if $rows != 9 then
|
||||||
#endi
|
return -1
|
||||||
|
endi
|
||||||
|
|
||||||
#print =============== select count(*) from supter table
|
#print =============== select count(*) from supter table
|
||||||
#sql select count(*) from stb
|
sql select count(*) from stb
|
||||||
#print $data00 $data01 $data02
|
print $data00 $data01 $data02
|
||||||
#if $rows != 1 then
|
if $rows != 1 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data00 != 9 then
|
if $data00 != 9 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
|
|
||||||
print =============== select count(column) from supter table
|
print =============== select count(column) from supter table
|
||||||
sql select ts, c1, c2, c3 from stb
|
sql select ts, c1, c2, c3 from stb
|
||||||
|
@ -264,49 +250,27 @@ if $data03 != 3.000000000 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
#print =============== select count(column) from supter table
|
#print =============== select count(column) from supter table
|
||||||
#sql select count(ts), count(c1), count(c2), count(c3) from stb
|
sql select count(ts), count(c1), count(c2), count(c3) from stb
|
||||||
#print rows: $rows
|
print rows: $rows
|
||||||
#print $data00 $data01 $data02 $data03
|
print $data00 $data01 $data02 $data03
|
||||||
#print $data10 $data11 $data12 $data13
|
if $data00 != 9 then
|
||||||
#print $data20 $data21 $data22 $data23
|
return -1
|
||||||
#print $data30 $data31 $data32 $data33
|
endi
|
||||||
#if $data00 != 9 then
|
if $data01 != 9 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data01 != 8 then
|
if $data02 != 9 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data02 != 8 then
|
if $data03 != 9 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data03 != 8 then
|
|
||||||
# return -1
|
|
||||||
#endi
|
|
||||||
|
|
||||||
#===================================================================
|
#===================================================================
|
||||||
#===================================================================
|
|
||||||
|
|
||||||
print =============== stop and restart taosd, then again do query above
|
print =============== stop and restart taosd, then again do query above
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
$loop_cnt = 0
|
|
||||||
check_dnode_ready:
|
|
||||||
$loop_cnt = $loop_cnt + 1
|
|
||||||
sleep 200
|
|
||||||
if $loop_cnt == 10 then
|
|
||||||
print ====> dnode not ready!
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
sql show dnodes
|
|
||||||
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
|
|
||||||
if $data00 != 1 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data04 != ready then
|
|
||||||
goto check_dnode_ready
|
|
||||||
endi
|
|
||||||
|
|
||||||
print =============== query data from child table
|
print =============== query data from child table
|
||||||
sql select * from ct1
|
sql select * from ct1
|
||||||
print rows: $rows
|
print rows: $rows
|
||||||
|
@ -326,16 +290,6 @@ endi
|
||||||
if $data03 != 3.000000000 then
|
if $data03 != 3.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
#if $data41 != -14 then
|
|
||||||
# return -1
|
|
||||||
#endi
|
|
||||||
#if $data42 != -2.40000 then
|
|
||||||
# return -1
|
|
||||||
#endi
|
|
||||||
#if $data43 != -3.400000000 then
|
|
||||||
# return -1
|
|
||||||
#endi
|
|
||||||
|
|
||||||
|
|
||||||
print =============== select count(*) from child table
|
print =============== select count(*) from child table
|
||||||
sql select count(*) from ct1
|
sql select count(*) from ct1
|
||||||
|
@ -366,10 +320,10 @@ if $data03 != 4 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
#print =============== select first(*)/first(column) from child table
|
#print =============== select first(*)/first(column) from child table
|
||||||
#sql select first(*) from ct1
|
sql select first(*) from ct1
|
||||||
#print ====> select first(*) from ct1
|
print ====> select first(*) from ct1
|
||||||
#print rows: $rows
|
print rows: $rows
|
||||||
#print $data00 $data01 $data02 $data03
|
print $data00 $data01 $data02 $data03
|
||||||
|
|
||||||
sql select first(ts), first(c1), first(c2), first(c3) from ct1
|
sql select first(ts), first(c1), first(c2), first(c3) from ct1
|
||||||
print ====> select first(ts), first(c1), first(c2), first(c3) from ct1
|
print ====> select first(ts), first(c1), first(c2), first(c3) from ct1
|
||||||
|
@ -474,24 +428,23 @@ endi
|
||||||
if $data32 != -3.300000000 then
|
if $data32 != -3.300000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
#===================================================================
|
|
||||||
#===================================================================
|
|
||||||
|
|
||||||
#print =============== query data from stb
|
#===================================================================
|
||||||
#sql select * from stb
|
print =============== query data from stb
|
||||||
#if $rows != 4 then
|
sql select * from stb
|
||||||
# return -1
|
if $rows != 9 then
|
||||||
#endi
|
return -1
|
||||||
|
endi
|
||||||
|
|
||||||
#print =============== select count(*) from supter table
|
print =============== select count(*) from supter table
|
||||||
#sql select count(*) from stb
|
sql select count(*) from stb
|
||||||
#print $data00 $data01 $data02
|
print $data00 $data01 $data02
|
||||||
#if $rows != 1 then
|
if $rows != 1 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data00 != 9 then
|
if $data00 != 9 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
|
|
||||||
print =============== select count(column) from supter table
|
print =============== select count(column) from supter table
|
||||||
sql select ts, c1, c2, c3 from stb
|
sql select ts, c1, c2, c3 from stb
|
||||||
|
@ -521,20 +474,19 @@ if $data03 != 3.000000000 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
#print =============== select count(column) from supter table
|
#print =============== select count(column) from supter table
|
||||||
#sql select count(ts), count(c1), count(c2), count(c3) from stb
|
sql select count(ts), count(c1), count(c2), count(c3) from stb
|
||||||
#print $data00 $data01 $data02 $data03
|
print $data00 $data01 $data02 $data03
|
||||||
#if $data00 != 8 then
|
if $data00 != 9 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data01 != 8 then
|
if $data01 != 9 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data02 != 8 then
|
if $data02 != 9 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data03 != 8 then
|
if $data03 != 9 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
|
|
||||||
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
|
|
@ -1,7 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
sleep 50
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
print =============== create database
|
print =============== create database
|
||||||
|
@ -17,7 +16,6 @@ sql use d1
|
||||||
|
|
||||||
print =============== create super table, include all type
|
print =============== create super table, include all type
|
||||||
sql create table if not exists stb (ts timestamp, c1 bool, c2 tinyint, c3 smallint, c4 int, c5 bigint, c6 float, c7 double, c8 binary(16), c9 nchar(16), c10 timestamp, c11 tinyint unsigned, c12 smallint unsigned, c13 int unsigned, c14 bigint unsigned) tags (t1 bool, t2 tinyint, t3 smallint, t4 int, t5 bigint, t6 float, t7 double, t8 binary(16), t9 nchar(16), t10 timestamp, t11 tinyint unsigned, t12 smallint unsigned, t13 int unsigned, t14 bigint unsigned)
|
sql create table if not exists stb (ts timestamp, c1 bool, c2 tinyint, c3 smallint, c4 int, c5 bigint, c6 float, c7 double, c8 binary(16), c9 nchar(16), c10 timestamp, c11 tinyint unsigned, c12 smallint unsigned, c13 int unsigned, c14 bigint unsigned) tags (t1 bool, t2 tinyint, t3 smallint, t4 int, t5 bigint, t6 float, t7 double, t8 binary(16), t9 nchar(16), t10 timestamp, t11 tinyint unsigned, t12 smallint unsigned, t13 int unsigned, t14 bigint unsigned)
|
||||||
|
|
||||||
sql create stable if not exists stb_1 (ts timestamp, i int) tags (j int)
|
sql create stable if not exists stb_1 (ts timestamp, i int) tags (j int)
|
||||||
sql create table stb_2 (ts timestamp, i int) tags (j int)
|
sql create table stb_2 (ts timestamp, i int) tags (j int)
|
||||||
sql create stable stb_3 (ts timestamp, i int) tags (j int)
|
sql create stable stb_3 (ts timestamp, i int) tags (j int)
|
||||||
|
@ -36,11 +34,6 @@ if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
|
||||||
print =============== insert data, mode1: one row one table in sql
|
|
||||||
print =============== insert data, mode1: mulit rows one table in sql
|
|
||||||
print =============== insert data, mode1: one rows mulit table in sql
|
|
||||||
print =============== insert data, mode1: mulit rows mulit table in sql
|
|
||||||
sql insert into c1 values(now-1s, true, -1, -2, -3, -4, -6.0, -7.0, 'child tbl 1', 'child tbl 1', '2022-02-25 18:00:00.000', 10, 20, 30, 40)
|
sql insert into c1 values(now-1s, true, -1, -2, -3, -4, -6.0, -7.0, 'child tbl 1', 'child tbl 1', '2022-02-25 18:00:00.000', 10, 20, 30, 40)
|
||||||
sql insert into c1 values(now+0s, true, -1, -2, -3, -4, -6.0, -7.0, 'child tbl 1', 'child tbl 1', '2022-02-25 18:00:00.000', 10, 20, 30, 40) (now+1s, true, -1, -2, -3, -4, -6.0, -7.0, 'child tbl 1', 'child tbl 1', '2022-02-25 18:00:00.000', 10, 20, 30, 40) (now+2s, true, -1, -2, -3, -4, -6.0, -7.0, 'child tbl 1', 'child tbl 1', '2022-02-25 18:00:00.000', 10, 20, 30, 40)
|
sql insert into c1 values(now+0s, true, -1, -2, -3, -4, -6.0, -7.0, 'child tbl 1', 'child tbl 1', '2022-02-25 18:00:00.000', 10, 20, 30, 40) (now+1s, true, -1, -2, -3, -4, -6.0, -7.0, 'child tbl 1', 'child tbl 1', '2022-02-25 18:00:00.000', 10, 20, 30, 40) (now+2s, true, -1, -2, -3, -4, -6.0, -7.0, 'child tbl 1', 'child tbl 1', '2022-02-25 18:00:00.000', 10, 20, 30, 40)
|
||||||
|
|
||||||
|
@ -69,32 +62,15 @@ if $data03 != -2 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== query data from st, but not support select * from super table, waiting fix
|
print =============== query data from st, but not support select * from super table, waiting fix
|
||||||
#sql select * from st
|
sql select * from stb
|
||||||
#if $rows != 4 then
|
if $rows != 4 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
|
|
||||||
print =============== stop and restart taosd
|
print =============== stop and restart taosd
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
$loop_cnt = 0
|
|
||||||
check_dnode_ready:
|
|
||||||
$loop_cnt = $loop_cnt + 1
|
|
||||||
sleep 200
|
|
||||||
if $loop_cnt == 10 then
|
|
||||||
print ====> dnode not ready!
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
sql show dnodes
|
|
||||||
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
|
|
||||||
if $data00 != 1 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data04 != ready then
|
|
||||||
goto check_dnode_ready
|
|
||||||
endi
|
|
||||||
|
|
||||||
print =============== query data
|
print =============== query data
|
||||||
sql select * from c1
|
sql select * from c1
|
||||||
print rows: $rows
|
print rows: $rows
|
||||||
|
@ -119,9 +95,9 @@ if $data03 != -2 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== query data from st, but not support select * from super table, waiting fix
|
print =============== query data from st, but not support select * from super table, waiting fix
|
||||||
#sql select * from st
|
sql select * from stb
|
||||||
#if $rows != 4 then
|
if $rows != 4 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
sleep 50
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
print =============== create database
|
print =============== create database
|
||||||
|
@ -64,23 +63,6 @@ reboot_and_check:
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
$loop_cnt = 0
|
|
||||||
check_dnode_ready:
|
|
||||||
$loop_cnt = $loop_cnt + 1
|
|
||||||
sleep 200
|
|
||||||
if $loop_cnt == 10 then
|
|
||||||
print ====> dnode not ready!
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
sql show dnodes
|
|
||||||
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
|
|
||||||
if $data00 != 1 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data04 != ready then
|
|
||||||
goto check_dnode_ready
|
|
||||||
endi
|
|
||||||
|
|
||||||
print =============== insert duplicated records to memory - loop $reboot_max - $reboot_cnt
|
print =============== insert duplicated records to memory - loop $reboot_max - $reboot_cnt
|
||||||
sql use db
|
sql use db
|
||||||
sql insert into ct1 values ('2022-05-01 18:30:27.001', 0.0);
|
sql insert into ct1 values ('2022-05-01 18:30:27.001', 0.0);
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
|
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$tbNum = 10
|
$tbNum = 10
|
||||||
|
@ -19,7 +15,7 @@ $stb = stb
|
||||||
|
|
||||||
sql drop database $db -x step1
|
sql drop database $db -x step1
|
||||||
step1:
|
step1:
|
||||||
sql create database $db ctime 30
|
sql create database $db
|
||||||
print ====== create tables
|
print ====== create tables
|
||||||
sql use $db
|
sql use $db
|
||||||
sql create table $stb (ts timestamp, c1 int) tags(t1 int)
|
sql create table $stb (ts timestamp, c1 int) tags(t1 int)
|
||||||
|
@ -43,13 +39,9 @@ print ====== tables created
|
||||||
|
|
||||||
print ================== restart server to commit data into disk
|
print ================== restart server to commit data into disk
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
sleep 3000
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
print ================== server restart completed
|
print ================== server restart completed
|
||||||
|
|
||||||
sql reset query cache
|
|
||||||
sleep 1000
|
|
||||||
|
|
||||||
sql use $db
|
sql use $db
|
||||||
sql drop table tb5
|
sql drop table tb5
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -69,13 +61,9 @@ endw
|
||||||
|
|
||||||
print ================== restart server to commit data into disk
|
print ================== restart server to commit data into disk
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
sleep 3000
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
print ================== server restart completed
|
print ================== server restart completed
|
||||||
|
|
||||||
sql reset query cache
|
|
||||||
sleep 1000
|
|
||||||
|
|
||||||
sql use $db
|
sql use $db
|
||||||
|
|
||||||
sql create table tb5 using $stb tags(5)
|
sql create table tb5 using $stb tags(5)
|
|
@ -1,7 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
sleep 50
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
print =============== create database
|
print =============== create database
|
||||||
|
@ -211,66 +210,48 @@ endi
|
||||||
#===================================================================
|
#===================================================================
|
||||||
|
|
||||||
#print =============== query data from stb
|
#print =============== query data from stb
|
||||||
#sql select * from stb
|
sql select * from stb
|
||||||
#print ===>
|
print ===>
|
||||||
#print ===> rows: $rows
|
print ===> rows: $rows
|
||||||
#print ===> rows0: $data00 $data01 $data02 $data03 $data04
|
print ===> rows0: $data00 $data01 $data02 $data03 $data04
|
||||||
#if $rows != 4 then
|
if $rows != 12 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
|
|
||||||
#print =============== select count(*) from supter table
|
#print =============== select count(*) from supter table
|
||||||
#sql select count(*) from stb
|
sql select count(*) from stb
|
||||||
#print $data00 $data01 $data02
|
print $data00 $data01 $data02
|
||||||
#if $rows != 1 then
|
if $rows != 1 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data00 != 12 then
|
if $data00 != 12 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
|
|
||||||
#print =============== select count(column) from supter table
|
#print =============== select count(column) from supter table
|
||||||
#sql select count(ts), count(c1), count(c2), count(c3) from stb
|
sql select count(ts), count(c1), count(c2), count(c3) from stb
|
||||||
#print $data00 $data01 $data02 $data03
|
print $data00 $data01 $data02 $data03
|
||||||
#if $data00 != 12 then
|
if $data00 != 12 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data01 != 8 then
|
if $data01 != 8 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data02 != 8 then
|
if $data02 != 8 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data03 != 8 then
|
if $data03 != 8 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
|
|
||||||
#===================================================================
|
|
||||||
#===================================================================
|
#===================================================================
|
||||||
|
|
||||||
print =============== stop and restart taosd, then again do query above
|
print =============== stop and restart taosd, then again do query above
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
print ===> waiting dnode ready
|
#===================================================================
|
||||||
$loop_cnt = 0
|
|
||||||
check_dnode_ready:
|
|
||||||
$loop_cnt = $loop_cnt + 1
|
|
||||||
sleep 200
|
|
||||||
if $loop_cnt == 10 then
|
|
||||||
print ====> dnode not ready!
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
sql show dnodes
|
|
||||||
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
|
|
||||||
if $data00 != 1 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data04 != ready then
|
|
||||||
goto check_dnode_ready
|
|
||||||
endi
|
|
||||||
|
|
||||||
#===================================================================
|
|
||||||
#===================================================================
|
|
||||||
print =============== query data from child table
|
print =============== query data from child table
|
||||||
sql select * from ct1
|
sql select * from ct1
|
||||||
print ===> select * from ct1
|
print ===> select * from ct1
|
||||||
|
@ -292,15 +273,15 @@ endi
|
||||||
if $data03 != 3.000000000 then
|
if $data03 != 3.000000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
#if $data41 != -14 then
|
if $data41 != 12 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data42 != -2.40000 then
|
if $data42 != 2.20000 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data43 != -3.400000000 then
|
if $data43 != NULL then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
|
|
||||||
print =============== select count(*) from child table
|
print =============== select count(*) from child table
|
||||||
sql select count(*) from ct1
|
sql select count(*) from ct1
|
||||||
|
@ -435,40 +416,39 @@ if $data92 != 3.600000000 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
#===================================================================
|
#===================================================================
|
||||||
#===================================================================
|
|
||||||
|
|
||||||
#print =============== query data from stb
|
print =============== query data from stb
|
||||||
#sql select * from stb
|
sql select * from stb
|
||||||
#print ===>
|
print ===>
|
||||||
#print ===> rows: $rows
|
print ===> rows: $rows
|
||||||
#print ===> rows0: $data00 $data01 $data02 $data03 $data04
|
print ===> rows0: $data00 $data01 $data02 $data03 $data04
|
||||||
#if $rows != 4 then
|
if $rows != 12 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#print =============== select count(*) from supter table
|
print =============== select count(*) from supter table
|
||||||
#sql select count(*) from stb
|
sql select count(*) from stb
|
||||||
#print $data00 $data01 $data02
|
print $data00 $data01 $data02
|
||||||
#if $rows != 1 then
|
if $rows != 1 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data00 != 12 then
|
if $data00 != 12 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
|
|
||||||
#print =============== select count(column) from supter table
|
print =============== select count(column) from supter table
|
||||||
#sql select count(ts), count(c1), count(c2), count(c3) from stb
|
sql select count(ts), count(c1), count(c2), count(c3) from stb
|
||||||
#print $data00 $data01 $data02 $data03
|
print $data00 $data01 $data02 $data03
|
||||||
#if $data00 != 12 then
|
if $data00 != 12 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data01 != 8 then
|
if $data01 != 8 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data02 != 8 then
|
if $data02 != 8 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
#if $data03 != 8 then
|
if $data03 != 8 then
|
||||||
# return -1
|
return -1
|
||||||
#endi
|
endi
|
||||||
|
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
|
|
||||||
|
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -190,7 +185,7 @@ clear:
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
|
|
||||||
|
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -175,7 +170,7 @@ clear:
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
|
|
||||||
|
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -19,15 +14,7 @@ sql drop database -x step1
|
||||||
step1:
|
step1:
|
||||||
sql create database $db
|
sql create database $db
|
||||||
sql use $db
|
sql use $db
|
||||||
|
sql create table $tb (ts timestamp, speed int)
|
||||||
$x = 0
|
|
||||||
create1:
|
|
||||||
$x = $x + 1
|
|
||||||
sleep 1000
|
|
||||||
if $x == 20 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
sql create table $tb (ts timestamp, speed int) -x create1
|
|
||||||
|
|
||||||
#commit to file will trigger if insert 82 rows
|
#commit to file will trigger if insert 82 rows
|
||||||
$N = 82
|
$N = 82
|
||||||
|
@ -204,7 +191,7 @@ clear:
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
|
|
||||||
|
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -167,7 +162,7 @@ endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
|
|
||||||
|
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -20,14 +15,7 @@ step1:
|
||||||
sql create database $db
|
sql create database $db
|
||||||
sql use $db
|
sql use $db
|
||||||
|
|
||||||
$x = 0
|
sql create table $tb (ts timestamp, speed int)
|
||||||
create1:
|
|
||||||
$x = $x + 1
|
|
||||||
sleep 1000
|
|
||||||
if $x == 20 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
sql create table $tb (ts timestamp, speed int) -x create1
|
|
||||||
|
|
||||||
#commit to file will trigger if insert 82 rows
|
#commit to file will trigger if insert 82 rows
|
||||||
|
|
||||||
|
@ -202,7 +190,7 @@ clear:
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
|
|
||||||
|
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -20,14 +15,7 @@ step1:
|
||||||
sql create database $db
|
sql create database $db
|
||||||
sql use $db
|
sql use $db
|
||||||
|
|
||||||
$x = 0
|
sql create table $tb (ts timestamp, speed int)
|
||||||
create1:
|
|
||||||
$x = $x + 1
|
|
||||||
sleep 1000
|
|
||||||
if $x == 20 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
sql create table $tb (ts timestamp, speed int) -x create1
|
|
||||||
|
|
||||||
$N = 20000
|
$N = 20000
|
||||||
|
|
||||||
|
@ -49,7 +37,7 @@ endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
|
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
system sh/cfg.sh -n dnode1 -c debugflag -v 131
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
sql create database d1;
|
sql create database d1;
|
|
@ -17,10 +17,10 @@ sql use test
|
||||||
sql create stable st(ts timestamp, a int, b int, c int, d double) tags(ta int,tb int,tc int);
|
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 t1 using st tags(1,1,1);
|
||||||
sql create table t2 using st tags(2,2,2);
|
sql create table t2 using st tags(2,2,2);
|
||||||
sql create stream streams1 trigger at_once into streamt as select _wstartts, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from t1 interval(10s) sliding (5s);
|
sql create stream streams1 trigger at_once into streamt as select _wstart, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from t1 interval(10s) sliding (5s);
|
||||||
sql create stream streams2 trigger at_once watermark 1d into streamt2 as select _wstartts, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from t1 interval(10s) sliding (5s);
|
sql create stream streams2 trigger at_once watermark 1d into streamt2 as select _wstart, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from t1 interval(10s) sliding (5s);
|
||||||
sql create stream stream_t1 trigger at_once into streamtST as select _wstartts, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from st interval(10s) sliding (5s);
|
sql create stream stream_t1 trigger at_once into streamtST as select _wstart, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from st interval(10s) sliding (5s);
|
||||||
sql create stream stream_t2 trigger at_once watermark 1d into streamtST2 as select _wstartts, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from st interval(10s) sliding (5s);
|
sql create stream stream_t2 trigger at_once watermark 1d into streamtST2 as select _wstart, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from st interval(10s) sliding (5s);
|
||||||
|
|
||||||
sql insert into t1 values(1648791210000,1,2,3,1.0);
|
sql insert into t1 values(1648791210000,1,2,3,1.0);
|
||||||
sql insert into t1 values(1648791216000,2,2,3,1.1);
|
sql insert into t1 values(1648791216000,2,2,3,1.1);
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
print =============== create database
|
print =============== create database
|
||||||
sql create database db
|
sql create database db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 1 then
|
if $rows != 3 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -213,23 +213,6 @@ endi
|
||||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
$loop_cnt = 0
|
|
||||||
check_dnode_ready:
|
|
||||||
$loop_cnt = $loop_cnt + 1
|
|
||||||
sleep 200
|
|
||||||
if $loop_cnt == 10 then
|
|
||||||
print ====> dnode not ready!
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
sql show dnodes
|
|
||||||
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
|
|
||||||
if $data00 != 1 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data04 != ready then
|
|
||||||
goto check_dnode_ready
|
|
||||||
endi
|
|
||||||
|
|
||||||
print =============== query data
|
print =============== query data
|
||||||
sql select * from c1
|
sql select * from c1
|
||||||
print rows: $rows
|
print rows: $rows
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
print =============== one table
|
print =============== one table
|
||||||
|
@ -21,11 +20,11 @@ endi
|
||||||
|
|
||||||
print =============== show
|
print =============== show
|
||||||
sql show databases
|
sql show databases
|
||||||
if $data02 != 2 then
|
if $data22 != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
if $data03 != 1 then
|
if $data24 != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -34,7 +33,7 @@ if $data00 != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
if $data01 != 2 then
|
if $data01 != d1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
print =============== create database
|
print =============== create database
|
||||||
sql create database db
|
sql create database db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 1 then
|
if $rows != 3 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -66,7 +63,7 @@ endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -56,7 +53,7 @@ endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -85,7 +82,7 @@ endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
print =============== step1
|
print =============== step1
|
||||||
|
@ -19,7 +16,7 @@ endi
|
||||||
|
|
||||||
sql drop database db
|
sql drop database db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -79,7 +76,7 @@ endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -78,7 +75,7 @@ endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -68,7 +65,7 @@ endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
sleep 3000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
print =============== create database
|
print =============== create database
|
||||||
sql create database db
|
sql create database db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 1 then
|
if $rows != 3 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -27,18 +24,18 @@ if $data00 != @17-01-01 08:00:00.001@ then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
sql insert into $tb values ('2017-08-28 00:23:46.429+ 1a', 2)
|
sql_error insert into $tb values ('2017-08-28 00:23:46.429+ 1a', 2)
|
||||||
#sql insert into $tb values ('2017-08-28 00:23:46cd .429', 2)
|
sql_error insert into $tb values ('2017-08-28 00:23:46cd .429', 2)
|
||||||
sql select ts from $tb
|
sql select ts from $tb
|
||||||
if $rows != 2 then
|
if $rows != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step3
|
print =============== step3
|
||||||
#sql insert into $tb values ('1970-01-01 08:00:00.000', 3)
|
sql_error insert into $tb values ('1970-01-01 08:00:00.000', 3)
|
||||||
#sql insert into $tb values ('1970-01-01 08:00:00.000', 3)
|
sql_error insert into $tb values ('1970-01-01 08:00:00.000', 3)
|
||||||
sql select ts from $tb
|
sql select ts from $tb
|
||||||
if $rows != 2 then
|
if $rows != 1 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -57,7 +54,7 @@ print =============== step5
|
||||||
sql_error insert into $tb values ('9999-12-31 213:59:59.999', 13)
|
sql_error insert into $tb values ('9999-12-31 213:59:59.999', 13)
|
||||||
sql select ts from $tb
|
sql select ts from $tb
|
||||||
print $rows
|
print $rows
|
||||||
if $rows != 8 then
|
if $rows != 7 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -65,7 +62,7 @@ print =============== step6
|
||||||
sql_error insert into $tb values ('9999-12-99 23:59:59.999', 13)
|
sql_error insert into $tb values ('9999-12-99 23:59:59.999', 13)
|
||||||
|
|
||||||
sql select ts from $tb
|
sql select ts from $tb
|
||||||
if $rows != 8 then
|
if $rows != 7 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -83,7 +80,7 @@ endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -40,7 +37,7 @@ sql drop table $table
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -42,7 +39,7 @@ endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -91,7 +88,7 @@ endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -91,7 +88,7 @@ endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -27,12 +24,10 @@ if $data01 != NULL then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
sql insert into $tb values (now+1m, -2147483648) -x step2
|
sql insert into $tb values (now+1m, -2147483648)
|
||||||
return -1
|
sql insert into $tb values (now+2m, NULL)
|
||||||
step2:
|
|
||||||
sql insert into $tb values (now+1m, NULL)
|
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 2 then
|
if $rows != 3 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
|
@ -40,9 +35,9 @@ if $data01 != NULL then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step3
|
print =============== step3
|
||||||
sql insert into $tb values (now+2m, 2147483647)
|
sql insert into $tb values (now+3m, 2147483647)
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 3 then
|
if $rows != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != 2147483647 then
|
if $data01 != 2147483647 then
|
||||||
|
@ -50,12 +45,10 @@ if $data01 != 2147483647 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql insert into $tb values (now+3m, 2147483648) -x step4
|
sql_error insert into $tb values (now+4m, 2147483648)
|
||||||
return -1
|
sql insert into $tb values (now+5m, NULL)
|
||||||
step4:
|
|
||||||
sql insert into $tb values (now+3m, NULL)
|
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 4 then
|
if $rows != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
|
@ -63,10 +56,10 @@ if $data01 != NULL then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql_error insert into $tb values (now+4m, a2)
|
sql_error insert into $tb values (now+6m, a2)
|
||||||
sql insert into $tb values (now+4m, 0)
|
sql insert into $tb values (now+7m, 0)
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 5 then
|
if $rows != 6 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != 0 then
|
if $data01 != 0 then
|
||||||
|
@ -74,19 +67,8 @@ if $data01 != 0 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step6
|
print =============== step6
|
||||||
sql_error insert into $tb values (now+5m, 2a)
|
sql_error insert into $tb values (now+8m, 2a)
|
||||||
sql insert into $tb values (now+5m, 2)
|
sql insert into $tb values (now+9m, 2)
|
||||||
sql select * from $tb order by ts desc
|
|
||||||
if $rows != 6 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data01 != 2 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
|
|
||||||
print =============== step7
|
|
||||||
sql_error insert into $tb values (now+6m, 2a'1)
|
|
||||||
sql insert into $tb values (now+6m, 2)
|
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 7 then
|
if $rows != 7 then
|
||||||
return -1
|
return -1
|
||||||
|
@ -95,18 +77,19 @@ if $data01 != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step8
|
print =============== step7
|
||||||
sql insert into $tb values (now+8m, "NULL")
|
sql_error insert into $tb values (now+10m, 2a'1)
|
||||||
|
sql insert into $tb values (now+11m, 2)
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 8 then
|
if $rows != 8 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != NULL then
|
if $data01 != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step9
|
print =============== step8
|
||||||
sql insert into $tb values (now+9m, 'NULL')
|
sql insert into $tb values (now+12m, "NULL")
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 9 then
|
if $rows != 9 then
|
||||||
return -1
|
return -1
|
||||||
|
@ -115,19 +98,29 @@ if $data01 != NULL then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step10
|
print =============== step9
|
||||||
sql insert into $tb values (now+10m, -123)
|
sql insert into $tb values (now+13m, 'NULL')
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 10 then
|
if $rows != 10 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
if $data01 != NULL then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
|
||||||
|
print =============== step10
|
||||||
|
sql insert into $tb values (now+14m, -123)
|
||||||
|
sql select * from $tb order by ts desc
|
||||||
|
if $rows != 11 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
if $data01 != -123 then
|
if $data01 != -123 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 129
|
|
||||||
system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb -v 8
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
print ============================ dnode1 start
|
print ============================ dnode1 start
|
||||||
|
@ -17,10 +12,10 @@ $db = $dbPrefix . $i
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
|
||||||
print =================== step 0
|
print =================== step 0
|
||||||
sql create database $db
|
sql create database $db vgroups 8
|
||||||
sql use $db
|
sql use $db
|
||||||
sql show vgroups
|
sql show vgroups
|
||||||
if $rows != 0 then
|
if $rows != 8 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -87,7 +82,7 @@ endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -28,12 +25,10 @@ if $data01 != NULL then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
sql insert into $tb values (now+1m, -32768) -x step2
|
sql insert into $tb values (now+1m, -32768)
|
||||||
return -1
|
sql insert into $tb values (now+2m, NULL)
|
||||||
step2:
|
|
||||||
sql insert into $tb values (now+1m, NULL)
|
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 2 then
|
if $rows != 3 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
|
@ -41,9 +36,9 @@ if $data01 != NULL then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step3
|
print =============== step3
|
||||||
sql insert into $tb values (now+2m, 32767)
|
sql insert into $tb values (now+3m, 32767)
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 3 then
|
if $rows != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != 32767 then
|
if $data01 != 32767 then
|
||||||
|
@ -51,12 +46,12 @@ if $data01 != 32767 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql insert into $tb values (now+3m, 32768) -x step4
|
sql insert into $tb values (now+4m, 32768) -x step4
|
||||||
return -1
|
return -1
|
||||||
step4:
|
step4:
|
||||||
sql insert into $tb values (now+3m, NULL)
|
sql insert into $tb values (now+5m, NULL)
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 4 then
|
if $rows != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
|
@ -64,10 +59,10 @@ if $data01 != NULL then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql_error insert into $tb values (now+4m, a2)
|
sql_error insert into $tb values (now+6m, a2)
|
||||||
sql insert into $tb values (now+4m, 0)
|
sql insert into $tb values (now+7m, 0)
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 5 then
|
if $rows != 6 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != 0 then
|
if $data01 != 0 then
|
||||||
|
@ -75,19 +70,8 @@ if $data01 != 0 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step6
|
print =============== step6
|
||||||
sql_error insert into $tb values (now+5m, 2a)
|
sql_error insert into $tb values (now+8m, 2a)
|
||||||
sql insert into $tb values (now+5m, 2)
|
sql insert into $tb values (now+9m, 2)
|
||||||
sql select * from $tb order by ts desc
|
|
||||||
if $rows != 6 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data01 != 2 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
|
|
||||||
print =============== step7
|
|
||||||
sql_error insert into $tb values (now+6m, 2a'1)
|
|
||||||
sql insert into $tb values (now+6m, 2)
|
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 7 then
|
if $rows != 7 then
|
||||||
return -1
|
return -1
|
||||||
|
@ -96,9 +80,20 @@ if $data01 != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
print =============== step7
|
||||||
|
sql_error insert into $tb values (now+10m, 2a'1)
|
||||||
|
sql insert into $tb values (now+11m, 2)
|
||||||
|
sql select * from $tb order by ts desc
|
||||||
|
if $rows != 8 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
if $data01 != 2 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
return
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
print ============================ dnode1 start
|
print ============================ dnode1 start
|
||||||
|
@ -200,16 +197,15 @@ if $data01 != 7 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step10
|
print =============== step10
|
||||||
$i = 1
|
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
sql create table $tb (ts timestamp, val tinyint, val2 tinyint)
|
sql_error create table $tb (ts timestamp, val tinyint, val2 tinyint)
|
||||||
sql show tables
|
sql show tables
|
||||||
if $rows != 7 then
|
if $rows != 7 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step11
|
print =============== step11
|
||||||
sql create table $tb (ts timestamp, val float, val2 double)
|
sql_error create table $tb (ts timestamp, val float, val2 double)
|
||||||
sql show tables
|
sql show tables
|
||||||
if $rows != 7 then
|
if $rows != 7 then
|
||||||
return -1
|
return -1
|
||||||
|
@ -217,7 +213,7 @@ endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -98,7 +95,7 @@ step8:
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -27,12 +24,10 @@ if $data01 != NULL then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step2
|
print =============== step2
|
||||||
sql insert into $tb values (now+1m, -128) -x step2
|
sql insert into $tb values (now+1m, -128)
|
||||||
return -1
|
sql insert into $tb values (now+2m, NULL)
|
||||||
step2:
|
|
||||||
sql insert into $tb values (now+1m, NULL)
|
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 2 then
|
if $rows != 3 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
|
@ -40,9 +35,9 @@ if $data01 != NULL then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step3
|
print =============== step3
|
||||||
sql insert into $tb values (now+2m, 127)
|
sql insert into $tb values (now+3m, 127)
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 3 then
|
if $rows != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != 127 then
|
if $data01 != 127 then
|
||||||
|
@ -50,12 +45,12 @@ if $data01 != 127 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step4
|
print =============== step4
|
||||||
sql insert into $tb values (now+3m, 128) -x step4
|
sql insert into $tb values (now+4m, 128) -x step4
|
||||||
return -1
|
return -1
|
||||||
step4:
|
step4:
|
||||||
sql insert into $tb values (now+3m, NULL)
|
sql insert into $tb values (now+5m, NULL)
|
||||||
sql select * from $tb
|
sql select * from $tb
|
||||||
if $rows != 4 then
|
if $rows != 5 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != NULL then
|
if $data01 != NULL then
|
||||||
|
@ -63,10 +58,10 @@ if $data01 != NULL then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step5
|
print =============== step5
|
||||||
sql_error insert into $tb values (now+4m, a2)
|
sql_error insert into $tb values (now+6m, a2)
|
||||||
sql insert into $tb values (now+4m, 0)
|
sql insert into $tb values (now+7m, 0)
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 5 then
|
if $rows != 6 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
if $data01 != 0 then
|
if $data01 != 0 then
|
||||||
|
@ -74,19 +69,8 @@ if $data01 != 0 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step6
|
print =============== step6
|
||||||
sql_error insert into $tb values (now+5m, 2a)
|
sql_error insert into $tb values (now+8m, 2a)
|
||||||
sql insert into $tb values (now+5m, 2)
|
sql insert into $tb values (now+9m, 2)
|
||||||
sql select * from $tb order by ts desc
|
|
||||||
if $rows != 6 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data01 != 2 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
|
|
||||||
print =============== step7
|
|
||||||
sql_error insert into $tb values (now+6m, 2a'1)
|
|
||||||
sql insert into $tb values (now+6m, 2)
|
|
||||||
sql select * from $tb order by ts desc
|
sql select * from $tb order by ts desc
|
||||||
if $rows != 7 then
|
if $rows != 7 then
|
||||||
return -1
|
return -1
|
||||||
|
@ -95,9 +79,20 @@ if $data01 != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
print =============== step7
|
||||||
|
sql_error insert into $tb values (now+10m, 2a'1)
|
||||||
|
sql insert into $tb values (now+11m, 2)
|
||||||
|
sql select * from $tb order by ts desc
|
||||||
|
if $rows != 8 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
if $data01 != 2 then
|
||||||
|
return -1
|
||||||
|
endi
|
||||||
|
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb -v 4
|
|
||||||
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 4
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
print ============================ dnode1 start
|
print ============================ dnode1 start
|
||||||
|
|
||||||
$i = 0
|
$i = 0
|
||||||
|
@ -16,10 +12,10 @@ $db = $dbPrefix . $i
|
||||||
$tb = $tbPrefix . $i
|
$tb = $tbPrefix . $i
|
||||||
|
|
||||||
print =================== step 1
|
print =================== step 1
|
||||||
sql create database $db
|
sql create database $db vgroups 4
|
||||||
sql use $db
|
sql use $db
|
||||||
sql show vgroups
|
sql show vgroups
|
||||||
if $rows != 0 then
|
if $rows != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -28,7 +24,7 @@ sql create table table2 (ts timestamp, speed int)
|
||||||
sql create table table3 (ts timestamp, speed int)
|
sql create table table3 (ts timestamp, speed int)
|
||||||
sql create table table4 (ts timestamp, speed int)
|
sql create table table4 (ts timestamp, speed int)
|
||||||
sql show vgroups
|
sql show vgroups
|
||||||
if $rows != 1 then
|
if $rows != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -37,7 +33,7 @@ sql create table table6 (ts timestamp, speed int)
|
||||||
sql create table table7 (ts timestamp, speed int)
|
sql create table table7 (ts timestamp, speed int)
|
||||||
sql create table table8 (ts timestamp, speed int)
|
sql create table table8 (ts timestamp, speed int)
|
||||||
sql show vgroups
|
sql show vgroups
|
||||||
if $rows != 2 then
|
if $rows != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -46,7 +42,7 @@ sql create table table10 (ts timestamp, speed int)
|
||||||
sql create table table11 (ts timestamp, speed int)
|
sql create table table11 (ts timestamp, speed int)
|
||||||
sql create table table12 (ts timestamp, speed int)
|
sql create table table12 (ts timestamp, speed int)
|
||||||
sql show vgroups
|
sql show vgroups
|
||||||
if $rows != 3 then
|
if $rows != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -58,7 +54,7 @@ endi
|
||||||
|
|
||||||
sql drop table table13
|
sql drop table table13
|
||||||
sql show vgroups
|
sql show vgroups
|
||||||
if $rows != 3 then
|
if $rows != 4 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -72,10 +68,10 @@ print =================== step 2
|
||||||
$i = 1
|
$i = 1
|
||||||
$db = $dbPrefix . $i
|
$db = $dbPrefix . $i
|
||||||
|
|
||||||
sql create database $db
|
sql create database $db vgroups 2
|
||||||
sql use $db
|
sql use $db
|
||||||
sql show vgroups
|
sql show vgroups
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -88,13 +84,13 @@ $db = $dbPrefix . $i
|
||||||
sql use $db
|
sql use $db
|
||||||
sql create table table2 (ts timestamp, speed int)
|
sql create table table2 (ts timestamp, speed int)
|
||||||
sql show vgroups
|
sql show vgroups
|
||||||
if $rows != 1 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql drop table table2
|
sql drop table table2
|
||||||
sql show vgroups
|
sql show vgroups
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -104,7 +100,7 @@ sql create table table3 (ts timestamp, speed int)
|
||||||
sql create table table4 (ts timestamp, speed int)
|
sql create table table4 (ts timestamp, speed int)
|
||||||
sql drop table table1
|
sql drop table table1
|
||||||
sql show vgroups
|
sql show vgroups
|
||||||
if $rows != 1 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -133,7 +129,7 @@ sql create database $db
|
||||||
sql use $db
|
sql use $db
|
||||||
|
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 5 then
|
if $rows != 7 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
|
@ -144,7 +140,7 @@ while $i < 5
|
||||||
$i = $i + 1
|
$i = $i + 1
|
||||||
endw
|
endw
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
print ======================== dnode1 start
|
print ======================== dnode1 start
|
||||||
|
@ -494,28 +491,28 @@ if $data00 != 25 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step19
|
print =============== step19
|
||||||
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = true and tgcol2 = 1 and tgcol3 = 1 interval(1d) group by tgcol1
|
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = true and tgcol2 = 1 and tgcol3 = 1 partition by tgcol1 interval(1d)
|
||||||
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
||||||
if $data01 != 100 then
|
if $data00 != 100 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = true and tgcol2 = 1 and tgcol3 = 1 interval(1d) group by tgcol2
|
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = true and tgcol2 = 1 and tgcol3 = 1 partition by tgcol2 interval(1d)
|
||||||
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
||||||
if $data01 != 100 then
|
if $data00 != 100 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = true and tgcol2 = 1 and tgcol3 = 1 interval(1d) group by tgcol3
|
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = true and tgcol2 = 1 and tgcol3 = 1 partition by tgcol3 interval(1d)
|
||||||
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
||||||
if $data01 != 100 then
|
if $data00 != 100 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
|
|
||||||
|
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
sql reset query cache
|
|
||||||
|
|
||||||
print ======================== dnode1 start
|
print ======================== dnode1 start
|
||||||
|
|
||||||
|
@ -681,34 +675,34 @@ if $data00 != 25 then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== step24
|
print =============== step24
|
||||||
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 interval(1d) group by tgcol1
|
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 partition by tgcol1 interval(1d)
|
||||||
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
||||||
if $data01 != 100 then
|
if $data00 != 100 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 interval(1d) group by tgcol2
|
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 partition by tgcol2 interval(1d)
|
||||||
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
||||||
if $data01 != 100 then
|
if $data00 != 100 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 interval(1d) group by tgcol3
|
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 partition by tgcol3 interval(1d)
|
||||||
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
||||||
if $data01 != 100 then
|
if $data00 != 100 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 interval(1d) group by tgcol4
|
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 partition by tgcol4 interval(1d)
|
||||||
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
||||||
if $data01 != 100 then
|
if $data00 != 100 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
system sh/stop_dnodes.sh
|
system sh/stop_dnodes.sh
|
||||||
|
|
||||||
|
|
||||||
system sh/deploy.sh -n dnode1 -i 1
|
system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/cfg.sh -n dnode1 -c walLevel -v 1
|
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
|
||||||
sleep 2000
|
|
||||||
sql connect
|
sql connect
|
||||||
sql reset query cache
|
|
||||||
|
|
||||||
print ======================== dnode1 start
|
print ======================== dnode1 start
|
||||||
|
|
||||||
|
@ -798,40 +792,40 @@ endi
|
||||||
|
|
||||||
|
|
||||||
print =============== step27
|
print =============== step27
|
||||||
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 interval(1d) group by tgcol1
|
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 partition by tgcol1 interval(1d)
|
||||||
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
||||||
if $data01 != 100 then
|
if $data00 != 100 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 interval(1d) group by tgcol2
|
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 partition by tgcol2 interval(1d)
|
||||||
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
||||||
if $data01 != 100 then
|
if $data00 != 100 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 interval(1d) group by tgcol3
|
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 partition by tgcol3 interval(1d)
|
||||||
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
||||||
if $data01 != 100 then
|
if $data00 != 100 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 interval(1d) group by tgcol4
|
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 partition by tgcol4 interval(1d)
|
||||||
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
||||||
if $data01 != 100 then
|
if $data00 != 100 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 interval(1d) group by tgcol5
|
sql select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), first(tbcol), last(tbcol) from $mt where tgcol1 = 1 and tgcol2 = 1 and tgcol3 = 1 and tgcol4 = 1 and tgcol5 = 1 partition by tgcol5 interval(1d)
|
||||||
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
print $data00 $data01 $data02 $data03 $data04 $data05 $data06
|
||||||
if $data01 != 100 then
|
if $data00 != 100 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print =============== clear
|
print =============== clear
|
||||||
sql drop database $db
|
sql drop database $db
|
||||||
sql show databases
|
sql show databases
|
||||||
if $rows != 0 then
|
if $rows != 2 then
|
||||||
return -1
|
return -1
|
||||||
endi
|
endi
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue