From 15544a220759fa8f8f9709d3f4b8617878abb5da Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Thu, 11 Aug 2022 11:14:31 +0800 Subject: [PATCH 01/52] enh: rsma fetch --- include/common/tdatablock.h | 3 +- source/common/src/tdatablock.c | 16 +-- source/dnode/mgmt/mgmt_vnode/src/vmHandle.c | 2 +- source/dnode/mgmt/mgmt_vnode/src/vmWorker.c | 14 +-- source/dnode/vnode/src/sma/smaRollup.c | 108 ++++++++++---------- source/dnode/vnode/src/vnd/vnodeSvr.c | 4 +- source/libs/executor/src/executor.c | 3 +- source/util/src/terror.c | 4 +- 8 files changed, 75 insertions(+), 79 deletions(-) diff --git a/include/common/tdatablock.h b/include/common/tdatablock.h index 5b39bc854e..c77cb16e86 100644 --- a/include/common/tdatablock.h +++ b/include/common/tdatablock.h @@ -246,9 +246,10 @@ void blockDebugShowDataBlocks(const SArray* dataBlocks, const char* flag); // for debug char* dumpBlockData(SSDataBlock* pDataBlock, const char* flag, char** dumpBuf); -int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SSDataBlock* pDataBlocks, STSchema* pTSchema, int32_t vgId, +int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SArray* pDataBlocks, STSchema* pTSchema, int32_t vgId, tb_uid_t suid); + char* buildCtbNameByGroupId(const char* stbName, uint64_t groupId); static FORCE_INLINE int32_t blockGetEncodeSize(const SSDataBlock* pBlock) { diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c index dba30bb876..bc05f7a1c3 100644 --- a/source/common/src/tdatablock.c +++ b/source/common/src/tdatablock.c @@ -1870,20 +1870,20 @@ char* dumpBlockData(SSDataBlock* pDataBlock, const char* flag, char** pDataBuf) * @brief TODO: Assume that the final generated result it less than 3M * * @param pReq - * @param pDataBlock + * @param pDataBlocks * @param vgId * @param suid - * + * */ -int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SSDataBlock* pDataBlock, STSchema* pTSchema, int32_t vgId, +int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SArray* pDataBlocks, STSchema* pTSchema, int32_t vgId, tb_uid_t suid) { + int32_t sz = taosArrayGetSize(pDataBlocks); int32_t bufSize = sizeof(SSubmitReq); - int32_t sz = 1; for (int32_t i = 0; i < sz; ++i) { - const SDataBlockInfo* pBlkInfo = &pDataBlock->info; + SDataBlockInfo* pBlkInfo = &((SSDataBlock*)taosArrayGet(pDataBlocks, i))->info; - int32_t colNum = taosArrayGetSize(pDataBlock->pDataBlock); - bufSize += pBlkInfo->rows * (TD_ROW_HEAD_LEN + pBlkInfo->rowSize + BitmapLen(colNum)); + int32_t numOfCols = taosArrayGetSize(pDataBlocks); + bufSize += pBlkInfo->rows * (TD_ROW_HEAD_LEN + pBlkInfo->rowSize + BitmapLen(numOfCols)); bufSize += sizeof(SSubmitBlk); } @@ -1900,6 +1900,7 @@ int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SSDataBlock* pDataB tdSRowInit(&rb, pTSchema->version); for (int32_t i = 0; i < sz; ++i) { + SSDataBlock* pDataBlock = taosArrayGet(pDataBlocks, i); int32_t colNum = taosArrayGetSize(pDataBlock->pDataBlock); int32_t rows = pDataBlock->info.rows; // int32_t rowSize = pDataBlock->info.rowSize; @@ -1997,7 +1998,6 @@ int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SSDataBlock* pDataB } offset += TYPE_BYTES[pCol->type]; // sum/avg would convert to int64_t/uint64_t/double during aggregation } - tdSRowEnd(&rb); dataLen += TD_ROW_LEN(rb.pBuf); #ifdef TD_DEBUG_PRINT_ROW tdSRowPrint(rb.pBuf, pTSchema, __func__); diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c b/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c index d13daffa08..7c6807ab87 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmHandle.c @@ -337,6 +337,7 @@ SArray *vmGetMsgHandles() { if (dmSetMgmtHandle(pArray, TDMT_SCH_QUERY, vmPutMsgToQueryQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_SCH_MERGE_QUERY, vmPutMsgToQueryQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_SCH_QUERY_CONTINUE, vmPutMsgToQueryQueue, 0) == NULL) goto _OVER; + if (dmSetMgmtHandle(pArray, TDMT_VND_FETCH_RSMA, vmPutMsgToQueryQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_SCH_FETCH, vmPutMsgToFetchQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_SCH_MERGE_FETCH, vmPutMsgToFetchQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_VND_ALTER_TABLE, vmPutMsgToWriteQueue, 0) == NULL) goto _OVER; @@ -347,7 +348,6 @@ SArray *vmGetMsgHandles() { if (dmSetMgmtHandle(pArray, TDMT_VND_TABLES_META, vmPutMsgToFetchQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_SCH_CANCEL_TASK, vmPutMsgToFetchQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_SCH_DROP_TASK, vmPutMsgToFetchQueue, 0) == NULL) goto _OVER; - if (dmSetMgmtHandle(pArray, TDMT_VND_FETCH_RSMA, vmPutMsgToFetchQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_VND_CREATE_STB, vmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_VND_DROP_TTL_TABLE, vmPutMsgToWriteQueue, 0) == NULL) goto _OVER; if (dmSetMgmtHandle(pArray, TDMT_VND_ALTER_STB, vmPutMsgToWriteQueue, 0) == NULL) goto _OVER; diff --git a/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c b/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c index 1a226abe5c..0a42f06081 100644 --- a/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c +++ b/source/dnode/mgmt/mgmt_vnode/src/vmWorker.c @@ -54,7 +54,7 @@ static void vmProcessMgmtQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) { if (IsReq(pMsg)) { if (code != 0) { if (terrno != 0) code = terrno; - dGError("msg:%p, failed to process since %s", pMsg, terrstr()); + dGError("msg:%p, failed to process since %s", pMsg, terrstr(code)); } vmSendRsp(pMsg, code); } @@ -72,7 +72,7 @@ static void vmProcessQueryQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) { int32_t code = vnodeProcessQueryMsg(pVnode->pImpl, pMsg); if (code != 0) { if (terrno != 0) code = terrno; - dGError("vgId:%d, msg:%p failed to query since %s", pVnode->vgId, pMsg, terrstr()); + dGError("vgId:%d, msg:%p failed to query since %s", pVnode->vgId, pMsg, terrstr(code)); vmSendRsp(pMsg, code); } @@ -89,7 +89,7 @@ static void vmProcessStreamQueue(SQueueInfo *pInfo, SRpcMsg *pMsg) { int32_t code = vnodeProcessFetchMsg(pVnode->pImpl, pMsg, pInfo); if (code != 0) { if (terrno != 0) code = terrno; - dGError("vgId:%d, msg:%p failed to process stream since %s", pVnode->vgId, pMsg, terrstr()); + dGError("vgId:%d, msg:%p failed to process stream since %s", pVnode->vgId, pMsg, terrstr(code)); vmSendRsp(pMsg, code); } @@ -110,7 +110,7 @@ static void vmProcessFetchQueue(SQueueInfo *pInfo, STaosQall *qall, int32_t numO int32_t code = vnodeProcessFetchMsg(pVnode->pImpl, pMsg, pInfo); if (code != 0) { if (terrno != 0) code = terrno; - dGError("vgId:%d, msg:%p failed to fetch since %s", pVnode->vgId, pMsg, terrstr()); + dGError("vgId:%d, msg:%p failed to fetch since %s", pVnode->vgId, pMsg, terrstr(code)); vmSendRsp(pMsg, code); } @@ -156,7 +156,7 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp if ((pMsg->msgType == TDMT_SCH_QUERY) && (grantCheck(TSDB_GRANT_TIME) != TSDB_CODE_SUCCESS)) { terrno = TSDB_CODE_GRANT_EXPIRED; code = terrno; - dDebug("vgId:%d, msg:%p put into vnode-query queue failed since %s", pVnode->vgId, pMsg, terrstr()); + dDebug("vgId:%d, msg:%p put into vnode-query queue failed since %s", pVnode->vgId, pMsg, terrstr(code)); } else { vnodePreprocessQueryMsg(pVnode->pImpl, pMsg); dGTrace("vgId:%d, msg:%p put into vnode-query queue", pVnode->vgId, pMsg); @@ -179,11 +179,11 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp if (!osDataSpaceAvailable()) { terrno = TSDB_CODE_VND_NO_DISKSPACE; code = terrno; - dError("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, terrstr()); + dError("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, terrstr(code)); } else if ((pMsg->msgType == TDMT_VND_SUBMIT) && (grantCheck(TSDB_GRANT_STORAGE) != TSDB_CODE_SUCCESS)) { terrno = TSDB_CODE_VND_NO_WRITE_AUTH; code = terrno; - dDebug("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, terrstr()); + dDebug("vgId:%d, msg:%p put into vnode-write queue failed since %s", pVnode->vgId, pMsg, terrstr(code)); } else { dGTrace("vgId:%d, msg:%p put into vnode-write queue", pVnode->vgId, pMsg); taosWriteQitem(pVnode->pWriteQ, pMsg); diff --git a/source/dnode/vnode/src/sma/smaRollup.c b/source/dnode/vnode/src/sma/smaRollup.c index 6b513f0242..801bc9c2e4 100644 --- a/source/dnode/vnode/src/sma/smaRollup.c +++ b/source/dnode/vnode/src/sma/smaRollup.c @@ -293,7 +293,9 @@ static int32_t tdSetRSmaInfoItemParams(SSma *pSma, SRSmaParam *param, SRSmaStat if (pItem->maxDelay > TSDB_MAX_ROLLUP_MAX_DELAY) { pItem->maxDelay = TSDB_MAX_ROLLUP_MAX_DELAY; } + pItem->level = idx == 0 ? TSDB_RETENTION_L1 : TSDB_RETENTION_L2; + taosTmrReset(tdRSmaFetchTrigger, pItem->maxDelay, pItem, smaMgmt.tmrHandle, &pItem->tmrId); smaInfo("vgId:%d, table:%" PRIi64 " level:%" PRIi8 " maxdelay:%" PRIi64 " watermark:%" PRIi64 ", finally maxdelay:%" PRIi32, TD_VID(pVnode), pRSmaInfo->suid, idx + 1, param->maxdelay[idx], param->watermark[idx], pItem->maxDelay); @@ -614,9 +616,13 @@ static int32_t tdRSmaFetchAndSubmitResult(SSma *pSma, qTaskInfo_t taskInfo, SRSm uint64_t ts; int32_t code = qExecTaskOpt(taskInfo, pResList, &ts); if (code < 0) { - smaError("vgId:%d, qExecTask for rsma table %" PRIi64 " level %" PRIi8 " failed since %s", SMA_VID(pSma), suid, - pItem->level, terrstr(code)); - goto _err; + if (code == TSDB_CODE_QRY_IN_EXEC) { + break; + } else { + smaError("vgId:%d, qExecTask for rsma table %" PRIi64 " level %" PRIi8 " failed since %s", SMA_VID(pSma), suid, + pItem->level, terrstr(code)); + goto _err; + } } if (taosArrayGetSize(pResList) == 0) { @@ -630,37 +636,34 @@ static int32_t tdRSmaFetchAndSubmitResult(SSma *pSma, qTaskInfo_t taskInfo, SRSm break; } - for (int32_t i = 0; i < taosArrayGetSize(pResList); ++i) { - SSDataBlock *output = taosArrayGetP(pResList, i); - #if 1 - char flag[10] = {0}; - snprintf(flag, 10, "level %" PRIi8, pItem->level); -// blockDebugShowDataBlocks(output, flag); -// taosArrayDestroy(pResult); + char flag[10] = {0}; + snprintf(flag, 10, "level %" PRIi8, pItem->level); + blockDebugShowDataBlocks(pResList, flag); #endif - STsdb * sinkTsdb = (pItem->level == TSDB_RETENTION_L1 ? pSma->pRSmaTsdb[0] : pSma->pRSmaTsdb[1]); - SSubmitReq *pReq = NULL; + STsdb *sinkTsdb = (pItem->level == TSDB_RETENTION_L1 ? pSma->pRSmaTsdb[0] : pSma->pRSmaTsdb[1]); + SSubmitReq *pReq = NULL; - // TODO: the schema update should be handled later(TD-17965) - if (buildSubmitReqFromDataBlock(&pReq, output, pTSchema, SMA_VID(pSma), suid) < 0) { - smaError("vgId:%d, build submit req for rsma stable %" PRIi64 " level %" PRIi8 " failed since %s", - SMA_VID(pSma), suid, pItem->level, terrstr()); - goto _err; - } - - if (pReq && tdProcessSubmitReq(sinkTsdb, output->info.version, pReq) < 0) { - taosMemoryFreeClear(pReq); - smaError("vgId:%d, process submit req for rsma stable %" PRIi64 " level %" PRIi8 " failed since %s", - SMA_VID(pSma), suid, pItem->level, terrstr()); - goto _err; - } - - smaDebug("vgId:%d, process submit req for rsma table %" PRIi64 " level %" PRIi8 " version:%" PRIi64, - SMA_VID(pSma), suid, pItem->level, output->info.version); - - taosMemoryFreeClear(pReq); + // TODO: the schema update should be handled later(TD-17965) + if (buildSubmitReqFromDataBlock(&pReq, pResList, pTSchema, SMA_VID(pSma), suid) < 0) { + smaError("vgId:%d, build submit req for rsma stable %" PRIi64 " level %" PRIi8 " failed since %s", SMA_VID(pSma), + suid, pItem->level, terrstr()); + goto _err; } + + SSDataBlock *pBlk = (SSDataBlock *)taosArrayGet(pResList, 0); + if (pReq && tdProcessSubmitReq(sinkTsdb, pBlk->info.version, pReq) < 0) { + taosMemoryFreeClear(pReq); + smaError("vgId:%d, process submit req for rsma stable %" PRIi64 " level %" PRIi8 " version %" PRIi64 + " failed since %s", + SMA_VID(pSma), suid, pItem->level, terrstr()); + goto _err; + } + + smaDebug("vgId:%d, process submit req for rsma table %" PRIi64 " level %" PRIi8 " version %" PRIi64, SMA_VID(pSma), + suid, pItem->level); + + taosMemoryFreeClear(pReq); } taosArrayDestroy(pResList); @@ -692,15 +695,12 @@ static int32_t tdExecuteRSmaImpl(SSma *pSma, const void *pMsg, int32_t inputType } SRSmaInfoItem *pItem = RSMA_INFO_ITEM(pInfo, idx); - tdRSmaFetchAndSubmitResult(pSma, RSMA_INFO_QTASK(pInfo, idx), pItem, pInfo->pTSchema, suid, STREAM_INPUT__DATA_SUBMIT); atomic_store_8(&pItem->triggerStat, TASK_TRIGGER_STAT_ACTIVE); if (smaMgmt.tmrHandle) { taosTmrReset(tdRSmaFetchTrigger, pItem->maxDelay, pItem, smaMgmt.tmrHandle, &pItem->tmrId); - } else { - ASSERT(0); } return TSDB_CODE_SUCCESS; @@ -746,7 +746,6 @@ static SRSmaInfo *tdAcquireRSmaInfoBySuid(SSma *pSma, int64_t suid) { return NULL; } - // clone the SRSmaInfo from iRsmaInfoHash to rsmaInfoHash if in committing stat SRSmaInfo *pCowRSmaInfo = NULL; // lock @@ -793,13 +792,7 @@ static FORCE_INLINE void tdReleaseRSmaInfo(SSma *pSma, SRSmaInfo *pInfo) { static int32_t tdExecuteRSma(SSma *pSma, const void *pMsg, int32_t inputType, tb_uid_t suid) { SRSmaInfo *pRSmaInfo = tdAcquireRSmaInfoBySuid(pSma, suid); if (!pRSmaInfo) { - smaDebug("vgId:%d, execute rsma, no rsma info for suid:%" PRIu64, SMA_VID(pSma), suid); - return TSDB_CODE_SUCCESS; - } - - if (!RSMA_INFO_QTASK(pRSmaInfo, 0)) { - tdReleaseRSmaInfo(pSma, pRSmaInfo); - smaDebug("vgId:%d, execute rsma, no rsma qTaskInfo for suid:%" PRIu64, SMA_VID(pSma), suid); + smaError("vgId:%d, execute rsma, no rsma info for suid:%" PRIu64, SMA_VID(pSma), suid); return TSDB_CODE_SUCCESS; } @@ -1331,14 +1324,16 @@ static void tdRSmaFetchTrigger(void *param, void *tmrId) { SRSmaInfo *pRSmaInfo = tdGetRSmaInfoByItem(pItem); if (RSMA_INFO_IS_DEL(pRSmaInfo)) { + smaDebug("rsma fetch task not start since rsma info already deleted, rsetId:%" PRIi64 " refId:%d)", smaMgmt.rsetId, + pRSmaInfo->refId); return; } SRSmaStat *pStat = (SRSmaStat *)tdAcquireSmaRef(smaMgmt.rsetId, pRSmaInfo->refId); if (!pStat) { - smaDebug("rsma fetch task not start since already destroyed, rsetId rsetId:%" PRIi64 " refId:%d)", smaMgmt.rsetId, - pRSmaInfo->refId); + smaDebug("rsma fetch task not start since rsma stat already destroyed, rsetId:%" PRIi64 " refId:%d)", + smaMgmt.rsetId, pRSmaInfo->refId); return; } @@ -1350,8 +1345,8 @@ static void tdRSmaFetchTrigger(void *param, void *tmrId) { case TASK_TRIGGER_STAT_PAUSED: case TASK_TRIGGER_STAT_CANCELLED: { tdReleaseSmaRef(smaMgmt.rsetId, pRSmaInfo->refId); - smaDebug("vgId:%d, not fetch rsma level %" PRIi8 " data since stat is %" PRIi8 ", rsetId rsetId:%" PRIi64 - " refId:%d", + smaDebug("vgId:%d, rsma fetch task not start for level %" PRIi8 " since stat is %" PRIi8 + ", rsetId rsetId:%" PRIi64 " refId:%d", SMA_VID(pSma), pItem->level, rsmaTriggerStat, smaMgmt.rsetId, pRSmaInfo->refId); if (rsmaTriggerStat == TASK_TRIGGER_STAT_PAUSED) { taosTmrReset(tdRSmaFetchTrigger, 5000, pItem, smaMgmt.tmrHandle, &pItem->tmrId); @@ -1366,30 +1361,31 @@ static void tdRSmaFetchTrigger(void *param, void *tmrId) { atomic_val_compare_exchange_8(&pItem->triggerStat, TASK_TRIGGER_STAT_ACTIVE, TASK_TRIGGER_STAT_INACTIVE); switch (fetchTriggerStat) { case TASK_TRIGGER_STAT_ACTIVE: { - smaDebug("vgId:%d, fetch rsma level %" PRIi8 " data for table:%" PRIi64 " since stat is active", SMA_VID(pSma), - pItem->level, pRSmaInfo->suid); + smaDebug("vgId:%d, rsma fetch task started for level:%" PRIi8 " suid:%" PRIi64 " since stat is active", + SMA_VID(pSma), pItem->level, pRSmaInfo->suid); // async process tdRSmaFetchSend(pSma, pRSmaInfo, pItem->level); } break; case TASK_TRIGGER_STAT_PAUSED: { - smaDebug("vgId:%d, not fetch rsma level %" PRIi8 " data for table:%" PRIi64 " since stat is paused", + smaDebug("vgId:%d, rsma fetch task not start for level:%" PRIi8 " suid:%" PRIi64 " since stat is paused", SMA_VID(pSma), pItem->level, pRSmaInfo->suid); } break; case TASK_TRIGGER_STAT_INACTIVE: { - smaDebug("vgId:%d, not fetch rsma level %" PRIi8 " data for table:%" PRIi64 " since stat is inactive", + smaDebug("vgId:%d, rsma fetch task not start for level:%" PRIi8 " suid:%" PRIi64 " since stat is inactive", SMA_VID(pSma), pItem->level, pRSmaInfo->suid); } break; case TASK_TRIGGER_STAT_INIT: { - smaDebug("vgId:%d, not fetch rsma level %" PRIi8 " data for table:%" PRIi64 " since stat is init", SMA_VID(pSma), - pItem->level, pRSmaInfo->suid); + smaDebug("vgId:%d, rsma fetch task not start for level:%" PRIi8 " suid::%" PRIi64 " since stat is init", + SMA_VID(pSma), pItem->level, pRSmaInfo->suid); } break; default: { - smaWarn("vgId:%d, not fetch rsma level %" PRIi8 " data for table:%" PRIi64 " since stat is unknown", + smaWarn("vgId:%d, rsma fetch task not start for level:%" PRIi8 " suid:%" PRIi64 " since stat is unknown", SMA_VID(pSma), pItem->level, pRSmaInfo->suid); } break; } _end: + taosTmrReset(tdRSmaFetchTrigger, pItem->maxDelay, pItem, smaMgmt.tmrHandle, &pItem->tmrId); tdReleaseSmaRef(smaMgmt.rsetId, pRSmaInfo->refId); } @@ -1402,7 +1398,7 @@ _end: * @return int32_t */ int32_t tdRSmaFetchSend(SSma *pSma, SRSmaInfo *pInfo, int8_t level) { - SRSmaFetchMsg fetchMsg = { .suid = pInfo->suid, .level = level}; + SRSmaFetchMsg fetchMsg = {.suid = pInfo->suid, .level = level}; int32_t ret = 0; int32_t contLen = 0; SEncoder encoder = {0}; @@ -1431,7 +1427,7 @@ int32_t tdRSmaFetchSend(SSma *pSma, SRSmaInfo *pInfo, int8_t level) { .contLen = contLen, }; - if ((terrno = tmsgPutToQueue(&pSma->pVnode->msgCb, FETCH_QUEUE, &rpcMsg)) != 0) { + if ((terrno = tmsgPutToQueue(&pSma->pVnode->msgCb, QUERY_QUEUE, &rpcMsg)) != 0) { smaError("vgId:%d, failed to put rsma fetch msg into fetch-queue for suid:%" PRIi64 " level:%" PRIi8 " since %s", SMA_VID(pSma), pInfo->suid, level, terrstr()); goto _err; @@ -1462,7 +1458,7 @@ int32_t smaProcessFetch(SSma *pSma, void *pMsg) { if (!pRpcMsg || pRpcMsg->contLen < sizeof(SMsgHead)) { terrno = TSDB_CODE_RSMA_FETCH_MSG_MSSED_UP; - return -1; + goto _err; } pBuf = POINTER_SHIFT(pRpcMsg->pCont, sizeof(SMsgHead)); @@ -1479,7 +1475,7 @@ int32_t smaProcessFetch(SSma *pSma, void *pMsg) { terrno = TSDB_CODE_RSMA_EMPTY_INFO; } smaWarn("vgId:%d, failed to process rsma fetch msg for suid:%" PRIi64 " level:%" PRIi8 " since %s", SMA_VID(pSma), - req.suid, req.level, terrstr()); + req.suid, req.level, terrstr()); goto _err; } diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index 1f13bde0c1..2c0c7f7c88 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -293,6 +293,8 @@ int32_t vnodeProcessQueryMsg(SVnode *pVnode, SRpcMsg *pMsg) { return qWorkerProcessQueryMsg(&handle, pVnode->pQuery, pMsg, 0); case TDMT_SCH_QUERY_CONTINUE: return qWorkerProcessCQueryMsg(&handle, pVnode->pQuery, pMsg, 0); + case TDMT_VND_FETCH_RSMA: + return smaProcessFetch(pVnode->pSma, pMsg); default: vError("unknown msg type:%d in query queue", pMsg->msgType); return TSDB_CODE_VND_APP_ERROR; @@ -329,8 +331,6 @@ int32_t vnodeProcessFetchMsg(SVnode *pVnode, SRpcMsg *pMsg, SQueueInfo *pInfo) { return vnodeGetTableCfg(pVnode, pMsg, true); case TDMT_VND_BATCH_META: return vnodeGetBatchMeta(pVnode, pMsg); - case TDMT_VND_FETCH_RSMA: - return smaProcessFetch(pVnode->pSma, pMsg); case TDMT_VND_CONSUME: return tqProcessPollReq(pVnode->pTq, pMsg); case TDMT_STREAM_TASK_RUN: diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c index 1fc0f5ff51..fe278881be 100644 --- a/source/libs/executor/src/executor.c +++ b/source/libs/executor/src/executor.c @@ -507,7 +507,7 @@ int32_t qExecTask(qTaskInfo_t tinfo, SSDataBlock** pRes, uint64_t* useconds) { *pRes = NULL; int64_t curOwner = 0; if ((curOwner = atomic_val_compare_exchange_64(&pTaskInfo->owner, 0, threadId)) != 0) { - qError("%s-%p execTask is now executed by thread:%p", GET_TASKID(pTaskInfo), pTaskInfo, (void*)curOwner); + qDebug("%s-%p execTask is now executed by thread:%p", GET_TASKID(pTaskInfo), pTaskInfo, (void*)curOwner); pTaskInfo->code = TSDB_CODE_QRY_IN_EXEC; return pTaskInfo->code; } @@ -529,7 +529,6 @@ int32_t qExecTask(qTaskInfo_t tinfo, SSDataBlock** pRes, uint64_t* useconds) { cleanUpUdfs(); qDebug("%s task abort due to error/cancel occurs, code:%s", GET_TASKID(pTaskInfo), tstrerror(pTaskInfo->code)); atomic_store_64(&pTaskInfo->owner, 0); - return pTaskInfo->code; } diff --git a/source/util/src/terror.c b/source/util/src/terror.c index 8a3d0620ed..c2a467a2cb 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -119,7 +119,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_TSC_DISCONNECTED, "Disconnected from ser TAOS_DEFINE_ERROR(TSDB_CODE_TSC_NO_WRITE_AUTH, "No write permission") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_CONN_KILLED, "Connection killed") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_SQL_SYNTAX_ERROR, "Syntax error in SQL") -TAOS_DEFINE_ERROR(TSDB_CODE_TSC_DB_NOT_SELECTED, "Database not specified or available") +TAOS_DEFINE_ERROR(TSDB_CODE_TSC_DB_NOT_SELECTED, "TSC:Database not specified or available") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_INVALID_TABLE_NAME, "Table does not exist") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_EXCEED_SQL_LIMIT, "SQL statement too long, check maxSQLLength config") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_FILE_EMPTY, "File is empty") @@ -220,7 +220,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_FUNC_COMMENT, "Invalid func comment" TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_FUNC_RETRIEVE, "Invalid func retrieve msg") // mnode-db -TAOS_DEFINE_ERROR(TSDB_CODE_MND_DB_NOT_SELECTED, "Database not specified or available") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_DB_NOT_SELECTED, "MND:Database not specified or available") TAOS_DEFINE_ERROR(TSDB_CODE_MND_DB_ALREADY_EXIST, "Database already exists") TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_DB_OPTION, "Invalid database options") TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_DB, "Invalid database name") From 6cd2e52d1a5acf1f731dfd4a00b3a05c65fd9275 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Thu, 11 Aug 2022 14:43:17 +0800 Subject: [PATCH 02/52] enh: code optimization --- source/common/src/tdatablock.c | 3 ++- source/dnode/vnode/src/sma/smaRollup.c | 2 +- source/libs/executor/src/executor.c | 2 +- source/util/src/terror.c | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c index bc05f7a1c3..58ea3eaf4e 100644 --- a/source/common/src/tdatablock.c +++ b/source/common/src/tdatablock.c @@ -1713,7 +1713,7 @@ void blockDebugShowDataBlocks(const SArray* dataBlocks, const char* flag) { char pBuf[128] = {0}; int32_t sz = taosArrayGetSize(dataBlocks); for (int32_t i = 0; i < sz; i++) { - SSDataBlock* pDataBlock = taosArrayGet(dataBlocks, i); + SSDataBlock* pDataBlock = taosArrayGetP(dataBlocks, i); size_t numOfCols = taosArrayGetSize(pDataBlock->pDataBlock); int32_t rows = pDataBlock->info.rows; @@ -1890,6 +1890,7 @@ int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SArray* pDataBlocks *pReq = taosMemoryCalloc(1, bufSize); if (!(*pReq)) { terrno = TSDB_CODE_OUT_OF_MEMORY; + uError("buildSubmitReqFromDataBlock for table:%" PRIi64 " bufSize:%d failed since %s", suid, bufSize, terrstr()); return TSDB_CODE_FAILED; } void* pDataBuf = *pReq; diff --git a/source/dnode/vnode/src/sma/smaRollup.c b/source/dnode/vnode/src/sma/smaRollup.c index 801bc9c2e4..bc71851160 100644 --- a/source/dnode/vnode/src/sma/smaRollup.c +++ b/source/dnode/vnode/src/sma/smaRollup.c @@ -636,7 +636,7 @@ static int32_t tdRSmaFetchAndSubmitResult(SSma *pSma, qTaskInfo_t taskInfo, SRSm break; } -#if 1 +#if 0 char flag[10] = {0}; snprintf(flag, 10, "level %" PRIi8, pItem->level); blockDebugShowDataBlocks(pResList, flag); diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c index fe278881be..7115ad85a5 100644 --- a/source/libs/executor/src/executor.c +++ b/source/libs/executor/src/executor.c @@ -507,7 +507,7 @@ int32_t qExecTask(qTaskInfo_t tinfo, SSDataBlock** pRes, uint64_t* useconds) { *pRes = NULL; int64_t curOwner = 0; if ((curOwner = atomic_val_compare_exchange_64(&pTaskInfo->owner, 0, threadId)) != 0) { - qDebug("%s-%p execTask is now executed by thread:%p", GET_TASKID(pTaskInfo), pTaskInfo, (void*)curOwner); + qError("%s-%p execTask is now executed by thread:%p", GET_TASKID(pTaskInfo), pTaskInfo, (void*)curOwner); pTaskInfo->code = TSDB_CODE_QRY_IN_EXEC; return pTaskInfo->code; } diff --git a/source/util/src/terror.c b/source/util/src/terror.c index c2a467a2cb..8a3d0620ed 100644 --- a/source/util/src/terror.c +++ b/source/util/src/terror.c @@ -119,7 +119,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_TSC_DISCONNECTED, "Disconnected from ser TAOS_DEFINE_ERROR(TSDB_CODE_TSC_NO_WRITE_AUTH, "No write permission") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_CONN_KILLED, "Connection killed") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_SQL_SYNTAX_ERROR, "Syntax error in SQL") -TAOS_DEFINE_ERROR(TSDB_CODE_TSC_DB_NOT_SELECTED, "TSC:Database not specified or available") +TAOS_DEFINE_ERROR(TSDB_CODE_TSC_DB_NOT_SELECTED, "Database not specified or available") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_INVALID_TABLE_NAME, "Table does not exist") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_EXCEED_SQL_LIMIT, "SQL statement too long, check maxSQLLength config") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_FILE_EMPTY, "File is empty") @@ -220,7 +220,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_FUNC_COMMENT, "Invalid func comment" TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_FUNC_RETRIEVE, "Invalid func retrieve msg") // mnode-db -TAOS_DEFINE_ERROR(TSDB_CODE_MND_DB_NOT_SELECTED, "MND:Database not specified or available") +TAOS_DEFINE_ERROR(TSDB_CODE_MND_DB_NOT_SELECTED, "Database not specified or available") TAOS_DEFINE_ERROR(TSDB_CODE_MND_DB_ALREADY_EXIST, "Database already exists") TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_DB_OPTION, "Invalid database options") TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_DB, "Invalid database name") From 113b29ed12e8b90ff8286d90ccef4eb1222636e9 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Thu, 11 Aug 2022 15:03:10 +0800 Subject: [PATCH 03/52] fix: taos array get pointer --- source/common/src/tdatablock.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c index 58ea3eaf4e..26598ba279 100644 --- a/source/common/src/tdatablock.c +++ b/source/common/src/tdatablock.c @@ -1880,7 +1880,7 @@ int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SArray* pDataBlocks int32_t sz = taosArrayGetSize(pDataBlocks); int32_t bufSize = sizeof(SSubmitReq); for (int32_t i = 0; i < sz; ++i) { - SDataBlockInfo* pBlkInfo = &((SSDataBlock*)taosArrayGet(pDataBlocks, i))->info; + SDataBlockInfo* pBlkInfo = &((SSDataBlock*)taosArrayGetP(pDataBlocks, i))->info; int32_t numOfCols = taosArrayGetSize(pDataBlocks); bufSize += pBlkInfo->rows * (TD_ROW_HEAD_LEN + pBlkInfo->rowSize + BitmapLen(numOfCols)); @@ -1890,7 +1890,6 @@ int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SArray* pDataBlocks *pReq = taosMemoryCalloc(1, bufSize); if (!(*pReq)) { terrno = TSDB_CODE_OUT_OF_MEMORY; - uError("buildSubmitReqFromDataBlock for table:%" PRIi64 " bufSize:%d failed since %s", suid, bufSize, terrstr()); return TSDB_CODE_FAILED; } void* pDataBuf = *pReq; @@ -1901,7 +1900,7 @@ int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SArray* pDataBlocks tdSRowInit(&rb, pTSchema->version); for (int32_t i = 0; i < sz; ++i) { - SSDataBlock* pDataBlock = taosArrayGet(pDataBlocks, i); + SSDataBlock* pDataBlock = taosArrayGetP(pDataBlocks, i); int32_t colNum = taosArrayGetSize(pDataBlock->pDataBlock); int32_t rows = pDataBlock->info.rows; // int32_t rowSize = pDataBlock->info.rowSize; From d71e238d48810ae7017a9fed2ca723b22d1ac74c Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Thu, 11 Aug 2022 15:25:31 +0800 Subject: [PATCH 04/52] fix: code optimization --- source/common/src/tdatablock.c | 1 + source/libs/executor/src/tsimplehash.c | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c index 26598ba279..c5bcab4e76 100644 --- a/source/common/src/tdatablock.c +++ b/source/common/src/tdatablock.c @@ -1998,6 +1998,7 @@ int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SArray* pDataBlocks } offset += TYPE_BYTES[pCol->type]; // sum/avg would convert to int64_t/uint64_t/double during aggregation } + tdSRowEnd(&rb); dataLen += TD_ROW_LEN(rb.pBuf); #ifdef TD_DEBUG_PRINT_ROW tdSRowPrint(rb.pBuf, pTSchema, __func__); diff --git a/source/libs/executor/src/tsimplehash.c b/source/libs/executor/src/tsimplehash.c index e709643af9..5ba2be1f21 100644 --- a/source/libs/executor/src/tsimplehash.c +++ b/source/libs/executor/src/tsimplehash.c @@ -137,13 +137,13 @@ static void taosHashTableResize(SSHashObj *pHashObj) { continue; } - SHNode *pNext; + SHNode *pNext = NULL; SHNode *pPrev = NULL; while (pNode != NULL) { void *key = GET_SHASH_NODE_KEY(pNode, pHashObj->dataLen); - uint32_t hashVal = (*pHashObj->hashFp)(key, (uint32_t)pHashObj->dataLen); + uint32_t hashVal = (*pHashObj->hashFp)(key, (uint32_t)pHashObj->keyLen); int32_t newIdx = HASH_INDEX(hashVal, pHashObj->capacity); pNext = pNode->next; @@ -187,12 +187,13 @@ int32_t tSimpleHashPut(SSHashObj *pHashObj, const void *key, const void *data) { SHNode *pNode = pHashObj->hashList[slot]; if (pNode == NULL) { - SHNode *pNewNode = doCreateHashNode(key, pHashObj->keyLen, data, pHashObj->size, hashVal); + SHNode *pNewNode = doCreateHashNode(key, pHashObj->keyLen, data, pHashObj->dataLen, hashVal); if (pNewNode == NULL) { return -1; } pHashObj->hashList[slot] = pNewNode; + atomic_add_fetch_64(&pHashObj->size, 1); return 0; } @@ -204,7 +205,7 @@ int32_t tSimpleHashPut(SSHashObj *pHashObj, const void *key, const void *data) { } if (pNode == NULL) { - SHNode *pNewNode = doCreateHashNode(key, pHashObj->keyLen, data, pHashObj->size, hashVal); + SHNode *pNewNode = doCreateHashNode(key, pHashObj->keyLen, data, pHashObj->dataLen, hashVal); if (pNewNode == NULL) { return -1; } From 4f0c6d3aa4a8ffabd0af582adf7982b008cd97be Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 11 Aug 2022 15:37:26 +0800 Subject: [PATCH 05/52] enh: show command optimize --- include/common/ttokendef.h | 2 +- include/libs/nodes/nodes.h | 15 +- source/libs/function/inc/builtins.h | 2 +- source/libs/nodes/src/nodesCodeFuncs.c | 6 +- source/libs/nodes/src/nodesUtilFuncs.c | 8 +- source/libs/parser/inc/sql.y | 4 +- source/libs/parser/src/parAstParser.c | 2 +- source/libs/parser/src/parTokenizer.c | 2 +- source/libs/parser/src/parTranslater.c | 331 ++++++++++++++++-------- source/libs/parser/src/sql.c | 12 +- source/libs/planner/src/planOptimizer.c | 3 + 11 files changed, 254 insertions(+), 133 deletions(-) diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index 401cb3214b..ca9adf2940 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -154,7 +154,7 @@ #define TK_ACCOUNTS 136 #define TK_APPS 137 #define TK_CONNECTIONS 138 -#define TK_LICENCE 139 +#define TK_LICENCES 139 #define TK_GRANTS 140 #define TK_QUERIES 141 #define TK_SCORES 142 diff --git a/include/libs/nodes/nodes.h b/include/libs/nodes/nodes.h index 1a1ae00ad1..bb75efa00a 100644 --- a/include/libs/nodes/nodes.h +++ b/include/libs/nodes/nodes.h @@ -172,27 +172,24 @@ typedef enum ENodeType { QUERY_NODE_SHOW_TABLES_STMT, QUERY_NODE_SHOW_TAGS_STMT, QUERY_NODE_SHOW_USERS_STMT, - QUERY_NODE_SHOW_LICENCE_STMT, + QUERY_NODE_SHOW_LICENCES_STMT, QUERY_NODE_SHOW_VGROUPS_STMT, QUERY_NODE_SHOW_TOPICS_STMT, QUERY_NODE_SHOW_CONSUMERS_STMT, - QUERY_NODE_SHOW_SUBSCRIBES_STMT, - QUERY_NODE_SHOW_SMAS_STMT, - QUERY_NODE_SHOW_CONFIGS_STMT, QUERY_NODE_SHOW_CONNECTIONS_STMT, QUERY_NODE_SHOW_QUERIES_STMT, - QUERY_NODE_SHOW_VNODES_STMT, QUERY_NODE_SHOW_APPS_STMT, - QUERY_NODE_SHOW_SCORES_STMT, QUERY_NODE_SHOW_VARIABLES_STMT, - QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT, QUERY_NODE_SHOW_DNODE_VARIABLES_STMT, + QUERY_NODE_SHOW_TRANSACTIONS_STMT, + QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT, QUERY_NODE_SHOW_CREATE_DATABASE_STMT, QUERY_NODE_SHOW_CREATE_TABLE_STMT, QUERY_NODE_SHOW_CREATE_STABLE_STMT, - QUERY_NODE_SHOW_TRANSACTIONS_STMT, QUERY_NODE_SHOW_TABLE_DISTRIBUTED_STMT, - QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT, + QUERY_NODE_SHOW_LOCAL_VARIABLES_STMT, + QUERY_NODE_SHOW_VNODES_STMT, + QUERY_NODE_SHOW_SCORES_STMT, QUERY_NODE_KILL_CONNECTION_STMT, QUERY_NODE_KILL_QUERY_STMT, QUERY_NODE_KILL_TRANSACTION_STMT, diff --git a/source/libs/function/inc/builtins.h b/source/libs/function/inc/builtins.h index 467fb11ae0..e7fcc38818 100644 --- a/source/libs/function/inc/builtins.h +++ b/source/libs/function/inc/builtins.h @@ -49,7 +49,7 @@ typedef struct SBuiltinFuncDefinition { } SBuiltinFuncDefinition; extern const SBuiltinFuncDefinition funcMgtBuiltins[]; -extern const int funcMgtBuiltinsNum; +extern const int32_t funcMgtBuiltinsNum; #ifdef __cplusplus } diff --git a/source/libs/nodes/src/nodesCodeFuncs.c b/source/libs/nodes/src/nodesCodeFuncs.c index d9994af4cb..ab76eb21b8 100644 --- a/source/libs/nodes/src/nodesCodeFuncs.c +++ b/source/libs/nodes/src/nodesCodeFuncs.c @@ -163,7 +163,7 @@ const char* nodesNodeName(ENodeType type) { return "ShowTagsStmt"; case QUERY_NODE_SHOW_USERS_STMT: return "ShowUsersStmt"; - case QUERY_NODE_SHOW_LICENCE_STMT: + case QUERY_NODE_SHOW_LICENCES_STMT: return "ShowGrantsStmt"; case QUERY_NODE_SHOW_VGROUPS_STMT: return "ShowVgroupsStmt"; @@ -171,10 +171,6 @@ const char* nodesNodeName(ENodeType type) { return "ShowTopicsStmt"; case QUERY_NODE_SHOW_CONSUMERS_STMT: return "ShowConsumersStmt"; - case QUERY_NODE_SHOW_SUBSCRIBES_STMT: - return "ShowSubscribesStmt"; - case QUERY_NODE_SHOW_SMAS_STMT: - return "ShowSmasStmt"; case QUERY_NODE_SHOW_QUERIES_STMT: return "ShowQueriesStmt"; case QUERY_NODE_SHOW_VNODES_STMT: diff --git a/source/libs/nodes/src/nodesUtilFuncs.c b/source/libs/nodes/src/nodesUtilFuncs.c index cbb0e8e59b..d48fd2c4c0 100644 --- a/source/libs/nodes/src/nodesUtilFuncs.c +++ b/source/libs/nodes/src/nodesUtilFuncs.c @@ -201,12 +201,10 @@ SNode* nodesMakeNode(ENodeType type) { case QUERY_NODE_SHOW_STREAMS_STMT: case QUERY_NODE_SHOW_TABLES_STMT: case QUERY_NODE_SHOW_USERS_STMT: - case QUERY_NODE_SHOW_LICENCE_STMT: + case QUERY_NODE_SHOW_LICENCES_STMT: case QUERY_NODE_SHOW_VGROUPS_STMT: case QUERY_NODE_SHOW_TOPICS_STMT: case QUERY_NODE_SHOW_CONSUMERS_STMT: - case QUERY_NODE_SHOW_SUBSCRIBES_STMT: - case QUERY_NODE_SHOW_SMAS_STMT: case QUERY_NODE_SHOW_CONNECTIONS_STMT: case QUERY_NODE_SHOW_QUERIES_STMT: case QUERY_NODE_SHOW_VNODES_STMT: @@ -687,12 +685,10 @@ void nodesDestroyNode(SNode* pNode) { case QUERY_NODE_SHOW_STREAMS_STMT: case QUERY_NODE_SHOW_TABLES_STMT: case QUERY_NODE_SHOW_USERS_STMT: - case QUERY_NODE_SHOW_LICENCE_STMT: + case QUERY_NODE_SHOW_LICENCES_STMT: case QUERY_NODE_SHOW_VGROUPS_STMT: case QUERY_NODE_SHOW_TOPICS_STMT: case QUERY_NODE_SHOW_CONSUMERS_STMT: - case QUERY_NODE_SHOW_SUBSCRIBES_STMT: - case QUERY_NODE_SHOW_SMAS_STMT: case QUERY_NODE_SHOW_CONNECTIONS_STMT: case QUERY_NODE_SHOW_QUERIES_STMT: case QUERY_NODE_SHOW_VNODES_STMT: diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index 45bbea1707..ef3c8355f0 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -391,8 +391,8 @@ cmd ::= SHOW STREAMS. cmd ::= SHOW ACCOUNTS. { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } cmd ::= SHOW APPS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_APPS_STMT); } cmd ::= SHOW CONNECTIONS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } -cmd ::= SHOW LICENCE. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT); } -cmd ::= SHOW GRANTS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT); } +cmd ::= SHOW LICENCES. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } +cmd ::= SHOW GRANTS. { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } cmd ::= SHOW CREATE DATABASE db_name(A). { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &A); } cmd ::= SHOW CREATE TABLE full_table_name(A). { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, A); } cmd ::= SHOW CREATE STABLE full_table_name(A). { pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, A); } diff --git a/source/libs/parser/src/parAstParser.c b/source/libs/parser/src/parAstParser.c index 08fcdcb0cb..ffa7729745 100644 --- a/source/libs/parser/src/parAstParser.c +++ b/source/libs/parser/src/parAstParser.c @@ -570,7 +570,7 @@ static int32_t collectMetaKeyFromQuery(SCollectMetaKeyCxt* pCxt, SNode* pStmt) { return collectMetaKeyFromShowTags(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_USERS_STMT: return collectMetaKeyFromShowUsers(pCxt, (SShowStmt*)pStmt); - case QUERY_NODE_SHOW_LICENCE_STMT: + case QUERY_NODE_SHOW_LICENCES_STMT: return collectMetaKeyFromShowLicence(pCxt, (SShowStmt*)pStmt); case QUERY_NODE_SHOW_VGROUPS_STMT: return collectMetaKeyFromShowVgroups(pCxt, (SShowStmt*)pStmt); diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index db907b1f68..a2bd8989c5 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -118,7 +118,7 @@ static SKeyword keywordTable[] = { {"KILL", TK_KILL}, {"LAST", TK_LAST}, {"LAST_ROW", TK_LAST_ROW}, - {"LICENCE", TK_LICENCE}, + {"LICENCES", TK_LICENCES}, {"LIKE", TK_LIKE}, {"LIMIT", TK_LIMIT}, {"LINEAR", TK_LINEAR}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 5c49a6e0ab..8ad08e70ac 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -28,6 +28,8 @@ #define generateDealNodeErrMsg(pCxt, code, ...) \ (pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, code, ##__VA_ARGS__), DEAL_RES_ERROR) +#define SYSTABLE_SHOW_TYPE_OFFSET QUERY_NODE_SHOW_DNODES_STMT + typedef struct STranslateContext { SParseContext* pParseCxt; int32_t errCode; @@ -51,6 +53,201 @@ typedef struct SFullDatabaseName { char fullDbName[TSDB_DB_FNAME_LEN]; } SFullDatabaseName; +typedef struct SSysTableShowAdapter { + ENodeType showType; + const char* pDbName; + const char* pTableName; + int32_t numOfShowCols; + const char* pShowCols[2]; +} SSysTableShowAdapter; + +// clang-format off +static const SSysTableShowAdapter sysTableShowAdapter[] = { + { + .showType = QUERY_NODE_SHOW_DNODES_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_DNODES, + .numOfShowCols = 1, + .pShowCols = {"endpoint"} + }, + { + .showType = QUERY_NODE_SHOW_MNODES_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_MNODES, + .numOfShowCols = 1, + .pShowCols = {"endpoint"} + }, + { + .showType = QUERY_NODE_SHOW_MODULES_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_MODULES, + .numOfShowCols = 1, + .pShowCols = {"module"} + }, + { + .showType = QUERY_NODE_SHOW_QNODES_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_QNODES, + .numOfShowCols = 1, + .pShowCols = {"endpoint"} + }, + { + .showType = QUERY_NODE_SHOW_SNODES_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_SNODES, + .numOfShowCols = 1, + .pShowCols = {"endpoint"} + }, + { + .showType = QUERY_NODE_SHOW_BNODES_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_BNODES, + .numOfShowCols = 1, + .pShowCols = {"endpoint"} + }, + { + .showType = QUERY_NODE_SHOW_CLUSTER_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_CLUSTER, + .numOfShowCols = 1, + .pShowCols = {"name"} + }, + { + .showType = QUERY_NODE_SHOW_DATABASES_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_DATABASES, + .numOfShowCols = 1, + .pShowCols = {"name"} + }, + { + .showType = QUERY_NODE_SHOW_FUNCTIONS_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_FUNCTIONS, + .numOfShowCols = 1, + .pShowCols = {"name"} + }, + { + .showType = QUERY_NODE_SHOW_INDEXES_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_INDEXES, + .numOfShowCols = 1, + .pShowCols = {"index_name"} + }, + { + .showType = QUERY_NODE_SHOW_STABLES_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_STABLES, + .numOfShowCols = 1, + .pShowCols = {"stable_name"} + }, + { + .showType = QUERY_NODE_SHOW_STREAMS_STMT, + .pDbName = TSDB_PERFORMANCE_SCHEMA_DB, + .pTableName = TSDB_PERFS_TABLE_STREAMS, + .numOfShowCols = 1, + .pShowCols = {"stream_name"} + }, + { + .showType = QUERY_NODE_SHOW_TABLES_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_TABLES, + .numOfShowCols = 1, + .pShowCols = {"table_name"} + }, + { + .showType = QUERY_NODE_SHOW_TAGS_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_TAGS, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, + { + .showType = QUERY_NODE_SHOW_USERS_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_USERS, + .numOfShowCols = 1, + .pShowCols = {"name"} + }, + { + .showType = QUERY_NODE_SHOW_LICENCES_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_LICENCES, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, + { + .showType = QUERY_NODE_SHOW_VGROUPS_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_VGROUPS, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, + { + .showType = QUERY_NODE_SHOW_TOPICS_STMT, + .pDbName = TSDB_PERFORMANCE_SCHEMA_DB, + .pTableName = TSDB_PERFS_TABLE_TOPICS, + .numOfShowCols = 1, + .pShowCols = {"topic_name"} + }, + { + .showType = QUERY_NODE_SHOW_CONSUMERS_STMT, + .pDbName = TSDB_PERFORMANCE_SCHEMA_DB, + .pTableName = TSDB_PERFS_TABLE_CONSUMERS, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, + { + .showType = QUERY_NODE_SHOW_CONNECTIONS_STMT, + .pDbName = TSDB_PERFORMANCE_SCHEMA_DB, + .pTableName = TSDB_PERFS_TABLE_CONNECTIONS, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, + { + .showType = QUERY_NODE_SHOW_QUERIES_STMT, + .pDbName = TSDB_PERFORMANCE_SCHEMA_DB, + .pTableName = TSDB_PERFS_TABLE_QUERIES, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, + { + .showType = QUERY_NODE_SHOW_APPS_STMT, + .pDbName = TSDB_PERFORMANCE_SCHEMA_DB, + .pTableName = TSDB_PERFS_TABLE_APPS, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, + { + .showType = QUERY_NODE_SHOW_VARIABLES_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_CONFIGS, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, + { + .showType = QUERY_NODE_SHOW_DNODE_VARIABLES_STMT, + .pDbName = TSDB_INFORMATION_SCHEMA_DB, + .pTableName = TSDB_INS_TABLE_DNODE_VARIABLES, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, + { + .showType = QUERY_NODE_SHOW_TRANSACTIONS_STMT, + .pDbName = TSDB_PERFORMANCE_SCHEMA_DB, + .pTableName = TSDB_PERFS_TABLE_TRANS, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, + { + .showType = QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT, + .pDbName = TSDB_PERFORMANCE_SCHEMA_DB, + .pTableName = TSDB_PERFS_TABLE_SUBSCRIPTIONS, + .numOfShowCols = 1, + .pShowCols = {"*"} + }, +}; +// clang-format on + static int32_t translateSubquery(STranslateContext* pCxt, SNode* pNode); static int32_t translateQuery(STranslateContext* pCxt, SNode* pNode); static EDealRes translateValue(STranslateContext* pCxt, SValueNode* pVal); @@ -5328,102 +5525,6 @@ int32_t extractResultSchema(const SNode* pRoot, int32_t* numOfCols, SSchema** pS return TSDB_CODE_FAILED; } -static const char* getSysDbName(ENodeType type) { - switch (type) { - case QUERY_NODE_SHOW_DATABASES_STMT: - case QUERY_NODE_SHOW_TABLES_STMT: - case QUERY_NODE_SHOW_STABLES_STMT: - case QUERY_NODE_SHOW_USERS_STMT: - case QUERY_NODE_SHOW_DNODES_STMT: - case QUERY_NODE_SHOW_VGROUPS_STMT: - case QUERY_NODE_SHOW_MNODES_STMT: - case QUERY_NODE_SHOW_MODULES_STMT: - case QUERY_NODE_SHOW_QNODES_STMT: - case QUERY_NODE_SHOW_FUNCTIONS_STMT: - case QUERY_NODE_SHOW_INDEXES_STMT: - case QUERY_NODE_SHOW_BNODES_STMT: - case QUERY_NODE_SHOW_SNODES_STMT: - case QUERY_NODE_SHOW_LICENCE_STMT: - case QUERY_NODE_SHOW_CLUSTER_STMT: - case QUERY_NODE_SHOW_VARIABLES_STMT: - case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: - case QUERY_NODE_SHOW_TAGS_STMT: - return TSDB_INFORMATION_SCHEMA_DB; - case QUERY_NODE_SHOW_CONNECTIONS_STMT: - case QUERY_NODE_SHOW_QUERIES_STMT: - case QUERY_NODE_SHOW_TOPICS_STMT: - case QUERY_NODE_SHOW_STREAMS_STMT: - case QUERY_NODE_SHOW_TRANSACTIONS_STMT: - case QUERY_NODE_SHOW_APPS_STMT: - case QUERY_NODE_SHOW_CONSUMERS_STMT: - case QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT: - return TSDB_PERFORMANCE_SCHEMA_DB; - default: - break; - } - return NULL; -} - -static const char* getSysTableName(ENodeType type) { - switch (type) { - case QUERY_NODE_SHOW_DATABASES_STMT: - return TSDB_INS_TABLE_DATABASES; - case QUERY_NODE_SHOW_TABLES_STMT: - return TSDB_INS_TABLE_TABLES; - case QUERY_NODE_SHOW_TAGS_STMT: - return TSDB_INS_TABLE_TAGS; - case QUERY_NODE_SHOW_STABLES_STMT: - return TSDB_INS_TABLE_STABLES; - case QUERY_NODE_SHOW_USERS_STMT: - return TSDB_INS_TABLE_USERS; - case QUERY_NODE_SHOW_DNODES_STMT: - return TSDB_INS_TABLE_DNODES; - case QUERY_NODE_SHOW_VGROUPS_STMT: - return TSDB_INS_TABLE_VGROUPS; - case QUERY_NODE_SHOW_MNODES_STMT: - return TSDB_INS_TABLE_MNODES; - case QUERY_NODE_SHOW_MODULES_STMT: - return TSDB_INS_TABLE_MODULES; - case QUERY_NODE_SHOW_QNODES_STMT: - return TSDB_INS_TABLE_QNODES; - case QUERY_NODE_SHOW_FUNCTIONS_STMT: - return TSDB_INS_TABLE_FUNCTIONS; - case QUERY_NODE_SHOW_INDEXES_STMT: - return TSDB_INS_TABLE_INDEXES; - case QUERY_NODE_SHOW_STREAMS_STMT: - return TSDB_PERFS_TABLE_STREAMS; - case QUERY_NODE_SHOW_BNODES_STMT: - return TSDB_INS_TABLE_BNODES; - case QUERY_NODE_SHOW_SNODES_STMT: - return TSDB_INS_TABLE_SNODES; - case QUERY_NODE_SHOW_LICENCE_STMT: - return TSDB_INS_TABLE_LICENCES; - case QUERY_NODE_SHOW_CLUSTER_STMT: - return TSDB_INS_TABLE_CLUSTER; - case QUERY_NODE_SHOW_CONNECTIONS_STMT: - return TSDB_PERFS_TABLE_CONNECTIONS; - case QUERY_NODE_SHOW_QUERIES_STMT: - return TSDB_PERFS_TABLE_QUERIES; - case QUERY_NODE_SHOW_TOPICS_STMT: - return TSDB_PERFS_TABLE_TOPICS; - case QUERY_NODE_SHOW_TRANSACTIONS_STMT: - return TSDB_PERFS_TABLE_TRANS; - case QUERY_NODE_SHOW_VARIABLES_STMT: - return TSDB_INS_TABLE_CONFIGS; - case QUERY_NODE_SHOW_APPS_STMT: - return TSDB_PERFS_TABLE_APPS; - case QUERY_NODE_SHOW_DNODE_VARIABLES_STMT: - return TSDB_INS_TABLE_DNODE_VARIABLES; - case QUERY_NODE_SHOW_CONSUMERS_STMT: - return TSDB_PERFS_TABLE_CONSUMERS; - case QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT: - return TSDB_PERFS_TABLE_SUBSCRIPTIONS; - default: - break; - } - return NULL; -} - static SNode* createStarCol() { SColumnNode* pCol = (SColumnNode*)nodesMakeNode(QUERY_NODE_COLUMN); if (NULL == pCol) { @@ -5433,7 +5534,33 @@ static SNode* createStarCol() { return (SNode*)pCol; } -static int32_t createSimpleSelectStmt(const char* pDb, const char* pTable, SSelectStmt** pStmt) { +static SNode* createProjectCol(const char* pProjCol) { + SColumnNode* pCol = (SColumnNode*)nodesMakeNode(QUERY_NODE_COLUMN); + if (NULL == pCol) { + return NULL; + } + strcpy(pCol->colName, pProjCol); + return (SNode*)pCol; +} + +static SNodeList* createProjectCols(int32_t ncols, const char* const pCols[]) { + SNodeList* pProjections = NULL; + if (ncols <= 0) { + nodesListMakeStrictAppend(&pProjections, createStarCol()); + return pProjections; + } + for (int32_t i = 0; i < ncols; ++i) { + int32_t code = nodesListMakeStrictAppend(&pProjections, createProjectCol(pCols[i])); + if (TSDB_CODE_SUCCESS != code) { + nodesDestroyList(pProjections); + return NULL; + } + } + return pProjections; +} + +static int32_t createSimpleSelectStmt(const char* pDb, const char* pTable, int32_t numOfProjs, + const char* const pProjCol[], SSelectStmt** pStmt) { SSelectStmt* pSelect = (SSelectStmt*)nodesMakeNode(QUERY_NODE_SELECT_STMT); if (NULL == pSelect) { return TSDB_CODE_OUT_OF_MEMORY; @@ -5450,7 +5577,8 @@ static int32_t createSimpleSelectStmt(const char* pDb, const char* pTable, SSele strcpy(pRealTable->table.tableAlias, pTable); pSelect->pFromTable = (SNode*)pRealTable; - if (TSDB_CODE_SUCCESS != nodesListMakeStrictAppend(&pSelect->pProjectionList, createStarCol())) { + pSelect->pProjectionList = createProjectCols(numOfProjs, pProjCol); + if (NULL == pSelect->pProjectionList) { nodesDestroyNode((SNode*)pSelect); return TSDB_CODE_OUT_OF_MEMORY; } @@ -5461,11 +5589,12 @@ static int32_t createSimpleSelectStmt(const char* pDb, const char* pTable, SSele } static int32_t createSelectStmtForShow(ENodeType showType, SSelectStmt** pStmt) { - return createSimpleSelectStmt(getSysDbName(showType), getSysTableName(showType), pStmt); + const SSysTableShowAdapter* pShow = &sysTableShowAdapter[showType - SYSTABLE_SHOW_TYPE_OFFSET]; + return createSimpleSelectStmt(pShow->pDbName, pShow->pTableName, pShow->numOfShowCols, pShow->pShowCols, pStmt); } static int32_t createSelectStmtForShowTableDist(SShowTableDistributedStmt* pStmt, SSelectStmt** pOutput) { - return createSimpleSelectStmt(pStmt->dbName, pStmt->tableName, pOutput); + return createSimpleSelectStmt(pStmt->dbName, pStmt->tableName, 0, NULL, pOutput); } static int32_t createOperatorNode(EOperatorType opType, const char* pColName, SNode* pRight, SNode** pOp) { @@ -6653,7 +6782,7 @@ static int32_t rewriteFlushDatabase(STranslateContext* pCxt, SQuery* pQuery) { static int32_t rewriteQuery(STranslateContext* pCxt, SQuery* pQuery) { int32_t code = TSDB_CODE_SUCCESS; switch (nodeType(pQuery->pRoot)) { - case QUERY_NODE_SHOW_LICENCE_STMT: + case QUERY_NODE_SHOW_LICENCES_STMT: case QUERY_NODE_SHOW_DATABASES_STMT: case QUERY_NODE_SHOW_TABLES_STMT: case QUERY_NODE_SHOW_STABLES_STMT: diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index e3ebb85f68..5eb744a7db 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -1044,7 +1044,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* ACCOUNTS => nothing */ 0, /* APPS => nothing */ 0, /* CONNECTIONS => nothing */ - 0, /* LICENCE => nothing */ + 0, /* LICENCES => nothing */ 0, /* GRANTS => nothing */ 0, /* QUERIES => nothing */ 0, /* SCORES => nothing */ @@ -1388,7 +1388,7 @@ static const char *const yyTokenName[] = { /* 136 */ "ACCOUNTS", /* 137 */ "APPS", /* 138 */ "CONNECTIONS", - /* 139 */ "LICENCE", + /* 139 */ "LICENCES", /* 140 */ "GRANTS", /* 141 */ "QUERIES", /* 142 */ "SCORES", @@ -1843,7 +1843,7 @@ static const char *const yyRuleName[] = { /* 205 */ "cmd ::= SHOW ACCOUNTS", /* 206 */ "cmd ::= SHOW APPS", /* 207 */ "cmd ::= SHOW CONNECTIONS", - /* 208 */ "cmd ::= SHOW LICENCE", + /* 208 */ "cmd ::= SHOW LICENCES", /* 209 */ "cmd ::= SHOW GRANTS", /* 210 */ "cmd ::= SHOW CREATE DATABASE db_name", /* 211 */ "cmd ::= SHOW CREATE TABLE full_table_name", @@ -2932,7 +2932,7 @@ static const struct { { 257, -2 }, /* (205) cmd ::= SHOW ACCOUNTS */ { 257, -2 }, /* (206) cmd ::= SHOW APPS */ { 257, -2 }, /* (207) cmd ::= SHOW CONNECTIONS */ - { 257, -2 }, /* (208) cmd ::= SHOW LICENCE */ + { 257, -2 }, /* (208) cmd ::= SHOW LICENCES */ { 257, -2 }, /* (209) cmd ::= SHOW GRANTS */ { 257, -4 }, /* (210) cmd ::= SHOW CREATE DATABASE db_name */ { 257, -4 }, /* (211) cmd ::= SHOW CREATE TABLE full_table_name */ @@ -3984,9 +3984,9 @@ static YYACTIONTYPE yy_reduce( case 207: /* cmd ::= SHOW CONNECTIONS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONNECTIONS_STMT); } break; - case 208: /* cmd ::= SHOW LICENCE */ + case 208: /* cmd ::= SHOW LICENCES */ case 209: /* cmd ::= SHOW GRANTS */ yytestcase(yyruleno==209); -{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCE_STMT); } +{ pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; case 210: /* cmd ::= SHOW CREATE DATABASE db_name */ { pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy361); } diff --git a/source/libs/planner/src/planOptimizer.c b/source/libs/planner/src/planOptimizer.c index f4f7c9aefd..45ab3903a9 100644 --- a/source/libs/planner/src/planOptimizer.c +++ b/source/libs/planner/src/planOptimizer.c @@ -1615,6 +1615,9 @@ static int32_t partTagsOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogicSub if (QUERY_NODE_LOGIC_PLAN_PARTITION == nodeType(pNode)) { TSWAP(((SPartitionLogicNode*)pNode)->pPartitionKeys, pScan->pGroupTags); int32_t code = replaceLogicNode(pLogicSubplan, pNode, (SLogicNode*)pScan); + if (TSDB_CODE_SUCCESS == code) { + code = adjustLogicNodeDataRequirement((SLogicNode*)pScan, pNode->resultDataOrder); + } if (TSDB_CODE_SUCCESS == code) { NODES_CLEAR_LIST(pNode->pChildren); nodesDestroyNode((SNode*)pNode); From 2e9068806e48d4b7a5b429841071951cdf31e41a Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Thu, 11 Aug 2022 16:31:26 +0800 Subject: [PATCH 06/52] doc: change readme doc --- README-CN.md | 43 ++++--------------------------------------- README.md | 38 -------------------------------------- 2 files changed, 4 insertions(+), 77 deletions(-) diff --git a/README-CN.md b/README-CN.md index d3f9b47a0f..6df6685d03 100644 --- a/README-CN.md +++ b/README-CN.md @@ -56,20 +56,6 @@ TDengine 目前 2.0 版服务器仅能在 Linux 系统上安装和运行,后 sudo apt-get install -y gcc cmake build-essential git libssl-dev ``` -编译或打包 JDBC 驱动源码,需安装 Java JDK 8 或以上版本和 Apache Maven 2.7 或以上版本。 - -安装 OpenJDK 8: - -```bash -sudo apt-get install -y openjdk-8-jdk -``` - -安装 Apache Maven: - -```bash -sudo apt-get install -y maven -``` - #### 为 taos-tools 安装编译需要的软件 taosTools 是用于 TDengine 的辅助工具软件集合。目前它包含 taosBenchmark(曾命名为 taosdemo)和 taosdump 两个软件。 @@ -85,19 +71,10 @@ sudo apt install build-essential libjansson-dev libsnappy-dev liblzma-dev libz-d ### CentOS 7.9: ```bash -sudo yum install -y gcc gcc-c++ make cmake git openssl-devel -``` - -安装 OpenJDK 8: - -```bash -sudo yum install -y java-1.8.0-openjdk -``` - -安装 Apache Maven: - -```bash -sudo yum install -y maven +sudo yum install epel-release +sudo yum update +sudo yum install -y gcc gcc-c++ make cmake3 git openssl-devel +sudo ln -sf /usr/bin/cmake3 /usr/bin/cmake ``` ### CentOS 8 & Fedora @@ -106,18 +83,6 @@ sudo yum install -y maven sudo dnf install -y gcc gcc-c++ make cmake epel-release git openssl-devel ``` -安装 OpenJDK 8: - -```bash -sudo dnf install -y java-1.8.0-openjdk -``` - -安装 Apache Maven: - -```bash -sudo dnf install -y maven -``` - #### 在 CentOS 上构建 taosTools 安装依赖软件 为了在 CentOS 上构建 [taosTools](https://github.com/taosdata/taos-tools) 需要安装如下依赖软件 diff --git a/README.md b/README.md index 3ea8a571ef..bba0984912 100644 --- a/README.md +++ b/README.md @@ -59,20 +59,6 @@ To build TDengine, use [CMake](https://cmake.org/) 3.0.2 or higher versions in t sudo apt-get install -y gcc cmake build-essential git libssl-dev ``` -To compile and package the JDBC driver source code, you should have a Java jdk-8 or higher and Apache Maven 2.7 or higher installed. - -To install openjdk-8: - -```bash -sudo apt-get install -y openjdk-8-jdk -``` - -To install Apache Maven: - -```bash -sudo apt-get install -y maven -``` - #### Install build dependencies for taosTools We provide a few useful tools such as taosBenchmark (was named taosdemo) and taosdump. They were part of TDengine. From TDengine 2.4.0.0, taosBenchmark and taosdump were not released together with TDengine. @@ -93,36 +79,12 @@ sudo yum install -y gcc gcc-c++ make cmake3 git openssl-devel sudo ln -sf /usr/bin/cmake3 /usr/bin/cmake ``` -To install openjdk-8: - -```bash -sudo yum install -y java-1.8.0-openjdk -``` - -To install Apache Maven: - -```bash -sudo yum install -y maven -``` - ### CentOS 8 & Fedora ```bash sudo dnf install -y gcc gcc-c++ make cmake epel-release git openssl-devel ``` -To install openjdk-8: - -```bash -sudo dnf install -y java-1.8.0-openjdk -``` - -To install Apache Maven: - -```bash -sudo dnf install -y maven -``` - #### Install build dependencies for taosTools on CentOS To build the [taosTools](https://github.com/taosdata/taos-tools) on CentOS, the following packages need to be installed. From 0e56dc9a7b20de828cabeea45124815c142503b3 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Thu, 11 Aug 2022 17:23:08 +0800 Subject: [PATCH 07/52] fix: fix exchange operator memory leak --- source/libs/executor/src/executorimpl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index 9e485e7684..be129cb6b4 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -3612,11 +3612,16 @@ void destroyExchangeOperatorInfo(void* param, int32_t numOfOutput) { taosRemoveRef(exchangeObjRefPool, pExInfo->self); } +void freeSourceDataInfo(void *p) { + SSourceDataInfo* pInfo = (SSourceDataInfo*)p; + taosMemoryFreeClear(pInfo->pRsp); +} + void doDestroyExchangeOperatorInfo(void* param) { SExchangeInfo* pExInfo = (SExchangeInfo*)param; taosArrayDestroy(pExInfo->pSources); - taosArrayDestroy(pExInfo->pSourceDataInfo); + taosArrayDestroyEx(pExInfo->pSourceDataInfo, freeSourceDataInfo); if (pExInfo->pResultBlockList != NULL) { taosArrayDestroyEx(pExInfo->pResultBlockList, freeBlock); From 465dd745d71225cc0acbf2f408043d80cd97cd3a Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 11 Aug 2022 18:18:45 +0800 Subject: [PATCH 08/52] fix(query): fix invalid read in doTimeslice operator --- source/libs/executor/src/timewindowoperator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c index 2b67f2bf01..96dd08174d 100644 --- a/source/libs/executor/src/timewindowoperator.c +++ b/source/libs/executor/src/timewindowoperator.c @@ -2434,10 +2434,10 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) { // if its the last point in data block, no need to fill, but reserve this point as the start value and do // the interpolation when processing next data block. if (pSliceInfo->fillType == TSDB_FILL_LINEAR) { - doKeepLinearInfo(pSliceInfo, pBlock, i, false); pSliceInfo->current = taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, pInterval->precision); if (i < pBlock->info.rows - 1) { + doKeepLinearInfo(pSliceInfo, pBlock, i, false); int64_t nextTs = *(int64_t*)colDataGetData(pTsCol, i + 1); if (nextTs > pSliceInfo->current) { while (pSliceInfo->current < nextTs && pSliceInfo->current <= pSliceInfo->win.ekey) { @@ -2475,11 +2475,11 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) { doKeepPrevRows(pSliceInfo, pBlock, i); if (pSliceInfo->fillType == TSDB_FILL_LINEAR) { - doKeepLinearInfo(pSliceInfo, pBlock, i, false); // no need to increate pSliceInfo->current here //pSliceInfo->current = // taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, pInterval->precision); if (i < pBlock->info.rows - 1) { + doKeepLinearInfo(pSliceInfo, pBlock, i, false); int64_t nextTs = *(int64_t*)colDataGetData(pTsCol, i + 1); if (nextTs > pSliceInfo->current) { while (pSliceInfo->current < nextTs && pSliceInfo->current <= pSliceInfo->win.ekey) { @@ -2555,10 +2555,10 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) { if (pSliceInfo->fillType == TSDB_FILL_LINEAR) { - doKeepLinearInfo(pSliceInfo, pBlock, i, false); pSliceInfo->current = taosTimeAdd(pSliceInfo->current, pInterval->interval, pInterval->intervalUnit, pInterval->precision); if (i < pBlock->info.rows - 1) { + doKeepLinearInfo(pSliceInfo, pBlock, i, false); int64_t nextTs = *(int64_t*)colDataGetData(pTsCol, i + 1); if (nextTs > pSliceInfo->current) { while (pSliceInfo->current < nextTs && pSliceInfo->current <= pSliceInfo->win.ekey) { From e890bcc6f4a82250fb7db88e53099dce69421809 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Thu, 11 Aug 2022 19:12:24 +0800 Subject: [PATCH 09/52] enh: tsimplehash remove/iter/ut --- source/libs/executor/inc/tsimplehash.h | 11 ++ source/libs/executor/src/tsimplehash.c | 116 ++++++++++++++---- source/libs/executor/test/CMakeLists.txt | 17 ++- .../libs/executor/test/tSimpleHashTests.cpp | 73 +++++++++++ 4 files changed, 193 insertions(+), 24 deletions(-) create mode 100644 source/libs/executor/test/tSimpleHashTests.cpp diff --git a/source/libs/executor/inc/tsimplehash.h b/source/libs/executor/inc/tsimplehash.h index a1ba70c702..a56f8e8c04 100644 --- a/source/libs/executor/inc/tsimplehash.h +++ b/source/libs/executor/inc/tsimplehash.h @@ -45,6 +45,8 @@ SSHashObj *tSimpleHashInit(size_t capacity, _hash_fn_t fn, size_t keyLen, size_t */ int32_t tSimpleHashGetSize(const SSHashObj *pHashObj); +int32_t tSimpleHashPrint(const SSHashObj *pHashObj); + /** * put element into hash table, if the element with the same key exists, update it * @param pHashObj @@ -98,6 +100,15 @@ size_t tSimpleHashGetMemSize(const SSHashObj *pHashObj); */ void *tSimpleHashGetKey(const SSHashObj* pHashObj, void *data, size_t* keyLen); +/** + * Create the hash table iterator + * @param pHashObj + * @param data + * @param iter + * @return void* + */ +void *tSimpleHashIterate(const SSHashObj *pHashObj, void *data, int32_t *iter); + #ifdef __cplusplus } #endif diff --git a/source/libs/executor/src/tsimplehash.c b/source/libs/executor/src/tsimplehash.c index 5ba2be1f21..7989ad2b5a 100644 --- a/source/libs/executor/src/tsimplehash.c +++ b/source/libs/executor/src/tsimplehash.c @@ -62,7 +62,7 @@ SSHashObj *tSimpleHashInit(size_t capacity, _hash_fn_t fn, size_t keyLen, size_t } SSHashObj *pHashObj = (SSHashObj *)taosMemoryCalloc(1, sizeof(SSHashObj)); - if (pHashObj == NULL) { + if (!pHashObj) { terrno = TSDB_CODE_OUT_OF_MEMORY; return NULL; } @@ -78,7 +78,7 @@ SSHashObj *tSimpleHashInit(size_t capacity, _hash_fn_t fn, size_t keyLen, size_t pHashObj->dataLen = dataLen; pHashObj->hashList = (SHNode **)taosMemoryCalloc(pHashObj->capacity, sizeof(void *)); - if (pHashObj->hashList == NULL) { + if (!pHashObj->hashList) { taosMemoryFree(pHashObj); terrno = TSDB_CODE_OUT_OF_MEMORY; return NULL; @@ -87,7 +87,7 @@ SSHashObj *tSimpleHashInit(size_t capacity, _hash_fn_t fn, size_t keyLen, size_t } int32_t tSimpleHashGetSize(const SSHashObj *pHashObj) { - if (pHashObj == NULL) { + if (!pHashObj) { return 0; } return (int32_t)atomic_load_64((int64_t *)&pHashObj->size); @@ -95,7 +95,7 @@ int32_t tSimpleHashGetSize(const SSHashObj *pHashObj) { static SHNode *doCreateHashNode(const void *key, size_t keyLen, const void *pData, size_t dsize, uint32_t hashVal) { SHNode *pNewNode = taosMemoryMalloc(sizeof(SHNode) + keyLen + dsize); - if (pNewNode == NULL) { + if (!pNewNode) { terrno = TSDB_CODE_OUT_OF_MEMORY; return NULL; } @@ -120,7 +120,7 @@ static void taosHashTableResize(SSHashObj *pHashObj) { int64_t st = taosGetTimestampUs(); void *pNewEntryList = taosMemoryRealloc(pHashObj->hashList, sizeof(void *) * newCapacity); - if (pNewEntryList == NULL) { + if (!pNewEntryList) { // qWarn("hash resize failed due to out of memory, capacity remain:%zu", pHashObj->capacity); return; } @@ -133,14 +133,13 @@ static void taosHashTableResize(SSHashObj *pHashObj) { for (int32_t idx = 0; idx < pHashObj->capacity; ++idx) { SHNode *pNode = pHashObj->hashList[idx]; - if (pNode == NULL) { + if (!pNode) { continue; } SHNode *pNext = NULL; SHNode *pPrev = NULL; - while (pNode != NULL) { void *key = GET_SHASH_NODE_KEY(pNode, pHashObj->dataLen); uint32_t hashVal = (*pHashObj->hashFp)(key, (uint32_t)pHashObj->keyLen); @@ -148,7 +147,7 @@ static void taosHashTableResize(SSHashObj *pHashObj) { int32_t newIdx = HASH_INDEX(hashVal, pHashObj->capacity); pNext = pNode->next; if (newIdx != idx) { - if (pPrev == NULL) { + if (!pPrev) { pHashObj->hashList[idx] = pNext; } else { pPrev->next = pNext; @@ -172,7 +171,7 @@ static void taosHashTableResize(SSHashObj *pHashObj) { } int32_t tSimpleHashPut(SSHashObj *pHashObj, const void *key, const void *data) { - if (pHashObj == NULL || key == NULL) { + if (!pHashObj || !key) { return -1; } @@ -186,9 +185,9 @@ int32_t tSimpleHashPut(SSHashObj *pHashObj, const void *key, const void *data) { int32_t slot = HASH_INDEX(hashVal, pHashObj->capacity); SHNode *pNode = pHashObj->hashList[slot]; - if (pNode == NULL) { + if (!pNode) { SHNode *pNewNode = doCreateHashNode(key, pHashObj->keyLen, data, pHashObj->dataLen, hashVal); - if (pNewNode == NULL) { + if (!pNewNode) { return -1; } @@ -204,9 +203,9 @@ int32_t tSimpleHashPut(SSHashObj *pHashObj, const void *key, const void *data) { pNode = pNode->next; } - if (pNode == NULL) { + if (!pNode) { SHNode *pNewNode = doCreateHashNode(key, pHashObj->keyLen, data, pHashObj->dataLen, hashVal); - if (pNewNode == NULL) { + if (!pNewNode) { return -1; } pNewNode->next = pHashObj->hashList[slot]; @@ -235,7 +234,7 @@ static FORCE_INLINE SHNode *doSearchInEntryList(SSHashObj *pHashObj, const void static FORCE_INLINE bool taosHashTableEmpty(const SSHashObj *pHashObj) { return tSimpleHashGetSize(pHashObj) == 0; } void *tSimpleHashGet(SSHashObj *pHashObj, const void *key) { - if (pHashObj == NULL || taosHashTableEmpty(pHashObj) || key == NULL) { + if (!pHashObj || taosHashTableEmpty(pHashObj) || !key) { return NULL; } @@ -243,7 +242,7 @@ void *tSimpleHashGet(SSHashObj *pHashObj, const void *key) { int32_t slot = HASH_INDEX(hashVal, pHashObj->capacity); SHNode *pNode = pHashObj->hashList[slot]; - if (pNode == NULL) { + if (!pNode) { return NULL; } @@ -257,19 +256,43 @@ void *tSimpleHashGet(SSHashObj *pHashObj, const void *key) { } int32_t tSimpleHashRemove(SSHashObj *pHashObj, const void *key) { - // todo + if (!pHashObj || !key) { + return TSDB_CODE_FAILED; + } + + uint32_t hashVal = (*pHashObj->hashFp)(key, (uint32_t)pHashObj->keyLen); + + int32_t slot = HASH_INDEX(hashVal, pHashObj->capacity); + + SHNode *pNode = pHashObj->hashList[slot]; + SHNode *pPrev = NULL; + while (pNode) { + if ((*(pHashObj->equalFp))(GET_SHASH_NODE_KEY(pNode, pHashObj->dataLen), key, pHashObj->keyLen) == 0) { + if (!pPrev) { + pHashObj->hashList[slot] = pNode->next; + } else { + pPrev->next = pNode->next; + } + FREE_HASH_NODE(pNode); + atomic_sub_fetch_64(&pHashObj->size, 1); + break; + } + pPrev = pNode; + pNode = pNode->next; + } + return TSDB_CODE_SUCCESS; } void tSimpleHashClear(SSHashObj *pHashObj) { - if (pHashObj == NULL) { + if (!pHashObj || taosHashTableEmpty(pHashObj)) { return; } - SHNode *pNode, *pNext; + SHNode *pNode = NULL, *pNext = NULL; for (int32_t i = 0; i < pHashObj->capacity; ++i) { pNode = pHashObj->hashList[i]; - if (pNode == NULL) { + if (!pNode) { continue; } @@ -279,11 +302,11 @@ void tSimpleHashClear(SSHashObj *pHashObj) { pNode = pNext; } } - pHashObj->size = 0; + atomic_store_64(&pHashObj->size, 0); } void tSimpleHashCleanup(SSHashObj *pHashObj) { - if (pHashObj == NULL) { + if (!pHashObj) { return; } @@ -292,7 +315,7 @@ void tSimpleHashCleanup(SSHashObj *pHashObj) { } size_t tSimpleHashGetMemSize(const SSHashObj *pHashObj) { - if (pHashObj == NULL) { + if (!pHashObj) { return 0; } @@ -300,11 +323,58 @@ size_t tSimpleHashGetMemSize(const SSHashObj *pHashObj) { } void *tSimpleHashGetKey(const SSHashObj *pHashObj, void *data, size_t *keyLen) { +#if 0 int32_t offset = offsetof(SHNode, data); SHNode *node = ((SHNode *)(char *)data - offset); - if (keyLen != NULL) { + if (keyLen) { *keyLen = pHashObj->keyLen; } + return POINTER_SHIFT(data, pHashObj->dataLen); + return GET_SHASH_NODE_KEY(node, pHashObj->dataLen); +#endif + if (keyLen) { + *keyLen = pHashObj->keyLen; + } + + return POINTER_SHIFT(data, pHashObj->dataLen); +} + +void *tSimpleHashIterate(const SSHashObj *pHashObj, void *data, int32_t *iter) { + if (!pHashObj) { + return NULL; + } + + SHNode *pNode = NULL; + + if (!data) { + for (int32_t i = 0; i < pHashObj->capacity; ++i) { + pNode = pHashObj->hashList[i]; + if (!pNode) { + continue; + } + *iter = i; + return GET_SHASH_NODE_DATA(pNode); + } + return NULL; + } + + pNode = (SHNode *)((char *)data - offsetof(SHNode, data)); + + if (pNode->next) { + return GET_SHASH_NODE_DATA(pNode->next); + } + + ++(*iter); + for (int32_t i = *iter; i < pHashObj->capacity; ++i) { + pNode = pHashObj->hashList[i]; + if (!pNode) { + continue; + } + *iter = i; + return GET_SHASH_NODE_DATA(pNode); + } + + return NULL; } \ No newline at end of file diff --git a/source/libs/executor/test/CMakeLists.txt b/source/libs/executor/test/CMakeLists.txt index acab27ec08..18ca954813 100644 --- a/source/libs/executor/test/CMakeLists.txt +++ b/source/libs/executor/test/CMakeLists.txt @@ -17,4 +17,19 @@ IF(NOT TD_DARWIN) PUBLIC "${TD_SOURCE_DIR}/include/libs/executor/" PRIVATE "${TD_SOURCE_DIR}/source/libs/executor/inc" ) -ENDIF () \ No newline at end of file +ENDIF () + +# SET(CMAKE_CXX_STANDARD 11) +# AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} SOURCE_LIST) + +# ADD_EXECUTABLE(tSimpleHashTest tSimpleHashTests.cpp) +# TARGET_LINK_LIBRARIES( +# tSimpleHashTest +# PRIVATE os util common executor gtest_main +# ) + +# TARGET_INCLUDE_DIRECTORIES( +# tSimpleHashTest +# PUBLIC "${TD_SOURCE_DIR}/include/common" +# PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../inc" +# ) \ No newline at end of file diff --git a/source/libs/executor/test/tSimpleHashTests.cpp b/source/libs/executor/test/tSimpleHashTests.cpp new file mode 100644 index 0000000000..e9284d2477 --- /dev/null +++ b/source/libs/executor/test/tSimpleHashTests.cpp @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#include +#include +#include "taos.h" +#include "thash.h" +#include "tsimplehash.h" + +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wwrite-strings" +#pragma GCC diagnostic ignored "-Wunused-function" +#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma GCC diagnostic ignored "-Wsign-compare" + +int main(int argc, char **argv) { + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} + +TEST(testCase, tSimpleHashTest) { + SSHashObj *pHashObj = + tSimpleHashInit(8, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), sizeof(int64_t), sizeof(int64_t)); + + assert(pHashObj != nullptr); + + ASSERT_EQ(0, tSimpleHashGetSize(pHashObj)); + + int64_t originKeySum = 0; + for (int64_t i = 1; i <= 100; ++i) { + originKeySum += i; + tSimpleHashPut(pHashObj, (const void *)&i, (const void *)&i); + ASSERT_EQ(i, tSimpleHashGetSize(pHashObj)); + } + + for (int64_t i = 1; i <= 100; ++i) { + void *data = tSimpleHashGet(pHashObj, (const void *)&i); + ASSERT_EQ(i, *(int64_t *)data); + } + + + void *data = NULL; + int32_t iter = 0; + int64_t keySum = 0; + int64_t dataSum = 0; + while ((data = tSimpleHashIterate(pHashObj, data, &iter))) { + void *key = tSimpleHashGetKey(pHashObj, data, NULL); + keySum += *(int64_t *)key; + dataSum += *(int64_t *)data; + } + + ASSERT_EQ(keySum, dataSum); + ASSERT_EQ(keySum, originKeySum); + + for (int64_t i = 1; i <= 100; ++i) { + tSimpleHashRemove(pHashObj, (const void *)&i); + ASSERT_EQ(100 - i, tSimpleHashGetSize(pHashObj)); + } +} + +#pragma GCC diagnostic pop \ No newline at end of file From 133beb4d491e94039020cee8e80074476f91df77 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Thu, 11 Aug 2022 19:18:55 +0800 Subject: [PATCH 10/52] other: make test case pass --- source/libs/executor/test/tSimpleHashTests.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/libs/executor/test/tSimpleHashTests.cpp b/source/libs/executor/test/tSimpleHashTests.cpp index e9284d2477..a17a7146ea 100644 --- a/source/libs/executor/test/tSimpleHashTests.cpp +++ b/source/libs/executor/test/tSimpleHashTests.cpp @@ -25,10 +25,10 @@ #pragma GCC diagnostic ignored "-Wunused-variable" #pragma GCC diagnostic ignored "-Wsign-compare" -int main(int argc, char **argv) { - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} +// int main(int argc, char **argv) { +// testing::InitGoogleTest(&argc, argv); +// return RUN_ALL_TESTS(); +// } TEST(testCase, tSimpleHashTest) { SSHashObj *pHashObj = @@ -68,6 +68,8 @@ TEST(testCase, tSimpleHashTest) { tSimpleHashRemove(pHashObj, (const void *)&i); ASSERT_EQ(100 - i, tSimpleHashGetSize(pHashObj)); } + + tSimpleHashCleanup(pHashObj); } #pragma GCC diagnostic pop \ No newline at end of file From e128350ab43c1af434750c41e6d016ea61990a52 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 11 Aug 2022 19:43:57 +0800 Subject: [PATCH 11/52] fix(query): fix memory leak in doTimeslice operator --- source/libs/executor/src/timewindowoperator.c | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c index 96dd08174d..8ca7635025 100644 --- a/source/libs/executor/src/timewindowoperator.c +++ b/source/libs/executor/src/timewindowoperator.c @@ -2615,6 +2615,29 @@ static SSDataBlock* doTimeslice(SOperatorInfo* pOperator) { return pResBlock->info.rows == 0 ? NULL : pResBlock; } +void destroyTimeSliceOperatorInfo(void* param, int32_t numOfOutput) { + STimeSliceOperatorInfo* pInfo = (STimeSliceOperatorInfo*)param; + + pInfo->pRes = blockDataDestroy(pInfo->pRes); + + for (int32_t i = 0; i < taosArrayGetSize(pInfo->pPrevRow); ++i) { + SGroupKeys* pKey = taosArrayGet(pInfo->pPrevRow, i); + taosMemoryFree(pKey->pData); + } + + for (int32_t i = 0; i < taosArrayGetSize(pInfo->pNextRow); ++i) { + SGroupKeys* pKey = taosArrayGet(pInfo->pNextRow, i); + taosMemoryFree(pKey->pData); + } + + taosArrayDestroy(pInfo->pPrevRow); + taosArrayDestroy(pInfo->pNextRow); + taosArrayDestroy(pInfo->pLinearInfo); + + taosMemoryFreeClear(param); +} + + SOperatorInfo* createTimeSliceOperatorInfo(SOperatorInfo* downstream, SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo) { STimeSliceOperatorInfo* pInfo = taosMemoryCalloc(1, sizeof(STimeSliceOperatorInfo)); SOperatorInfo* pOperator = taosMemoryCalloc(1, sizeof(SOperatorInfo)); @@ -2662,7 +2685,7 @@ SOperatorInfo* createTimeSliceOperatorInfo(SOperatorInfo* downstream, SPhysiNode pOperator->pTaskInfo = pTaskInfo; pOperator->fpSet = - createOperatorFpSet(operatorDummyOpenFn, doTimeslice, NULL, NULL, destroyBasicOperatorInfo, NULL, NULL, NULL); + createOperatorFpSet(operatorDummyOpenFn, doTimeslice, NULL, NULL, destroyTimeSliceOperatorInfo, NULL, NULL, NULL); blockDataEnsureCapacity(pInfo->pRes, pOperator->resultInfo.capacity); From 7409cc9513ca42d40db5d44ea2af1fb54fe98b5c Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 11 Aug 2022 19:43:57 +0800 Subject: [PATCH 12/52] fix(query): fix memory leak in doTimeslice operator --- source/libs/executor/src/timewindowoperator.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/libs/executor/src/timewindowoperator.c b/source/libs/executor/src/timewindowoperator.c index 8ca7635025..3c3bad4804 100644 --- a/source/libs/executor/src/timewindowoperator.c +++ b/source/libs/executor/src/timewindowoperator.c @@ -2212,6 +2212,7 @@ static void genInterpolationResult(STimeSliceOperatorInfo* pSliceInfo, SExprSupp colDataAppend(pDst, rows, (char *)current.val, false); } + taosMemoryFree(current.val); pResBlock->info.rows += 1; break; } @@ -2624,16 +2625,22 @@ void destroyTimeSliceOperatorInfo(void* param, int32_t numOfOutput) { SGroupKeys* pKey = taosArrayGet(pInfo->pPrevRow, i); taosMemoryFree(pKey->pData); } + taosArrayDestroy(pInfo->pPrevRow); for (int32_t i = 0; i < taosArrayGetSize(pInfo->pNextRow); ++i) { SGroupKeys* pKey = taosArrayGet(pInfo->pNextRow, i); taosMemoryFree(pKey->pData); } - - taosArrayDestroy(pInfo->pPrevRow); taosArrayDestroy(pInfo->pNextRow); + + for (int32_t i = 0; i < taosArrayGetSize(pInfo->pLinearInfo); ++i) { + SFillLinearInfo* pKey = taosArrayGet(pInfo->pLinearInfo, i); + taosMemoryFree(pKey->start.val); + taosMemoryFree(pKey->end.val); + } taosArrayDestroy(pInfo->pLinearInfo); + taosMemoryFree(pInfo->pFillColInfo); taosMemoryFreeClear(param); } From d9c10a2f0fa7e080ca3eb986da3f51077bc623d7 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Thu, 11 Aug 2022 19:59:47 +0800 Subject: [PATCH 13/52] other: rsma submit --- include/common/tdatablock.h | 2 +- source/common/src/tdatablock.c | 11 +++--- source/dnode/vnode/src/sma/smaRollup.c | 49 ++++++++++++++------------ 3 files changed, 32 insertions(+), 30 deletions(-) diff --git a/include/common/tdatablock.h b/include/common/tdatablock.h index c77cb16e86..410fa02ded 100644 --- a/include/common/tdatablock.h +++ b/include/common/tdatablock.h @@ -246,7 +246,7 @@ void blockDebugShowDataBlocks(const SArray* dataBlocks, const char* flag); // for debug char* dumpBlockData(SSDataBlock* pDataBlock, const char* flag, char** dumpBuf); -int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SArray* pDataBlocks, STSchema* pTSchema, int32_t vgId, +int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SSDataBlock* pDataBlocks, STSchema* pTSchema, int32_t vgId, tb_uid_t suid); diff --git a/source/common/src/tdatablock.c b/source/common/src/tdatablock.c index c5bcab4e76..8489627721 100644 --- a/source/common/src/tdatablock.c +++ b/source/common/src/tdatablock.c @@ -1875,15 +1875,15 @@ char* dumpBlockData(SSDataBlock* pDataBlock, const char* flag, char** pDataBuf) * @param suid * */ -int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SArray* pDataBlocks, STSchema* pTSchema, int32_t vgId, +int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SSDataBlock* pDataBlock, STSchema* pTSchema, int32_t vgId, tb_uid_t suid) { - int32_t sz = taosArrayGetSize(pDataBlocks); int32_t bufSize = sizeof(SSubmitReq); + int32_t sz = 1; for (int32_t i = 0; i < sz; ++i) { - SDataBlockInfo* pBlkInfo = &((SSDataBlock*)taosArrayGetP(pDataBlocks, i))->info; + const SDataBlockInfo* pBlkInfo = &pDataBlock->info; - int32_t numOfCols = taosArrayGetSize(pDataBlocks); - bufSize += pBlkInfo->rows * (TD_ROW_HEAD_LEN + pBlkInfo->rowSize + BitmapLen(numOfCols)); + int32_t colNum = taosArrayGetSize(pDataBlock->pDataBlock); + bufSize += pBlkInfo->rows * (TD_ROW_HEAD_LEN + pBlkInfo->rowSize + BitmapLen(colNum)); bufSize += sizeof(SSubmitBlk); } @@ -1900,7 +1900,6 @@ int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SArray* pDataBlocks tdSRowInit(&rb, pTSchema->version); for (int32_t i = 0; i < sz; ++i) { - SSDataBlock* pDataBlock = taosArrayGetP(pDataBlocks, i); int32_t colNum = taosArrayGetSize(pDataBlock->pDataBlock); int32_t rows = pDataBlock->info.rows; // int32_t rowSize = pDataBlock->info.rowSize; diff --git a/source/dnode/vnode/src/sma/smaRollup.c b/source/dnode/vnode/src/sma/smaRollup.c index bc71851160..b7a2efd489 100644 --- a/source/dnode/vnode/src/sma/smaRollup.c +++ b/source/dnode/vnode/src/sma/smaRollup.c @@ -615,7 +615,7 @@ static int32_t tdRSmaFetchAndSubmitResult(SSma *pSma, qTaskInfo_t taskInfo, SRSm while (1) { uint64_t ts; int32_t code = qExecTaskOpt(taskInfo, pResList, &ts); - if (code < 0) { + if (code < 0) { if (code == TSDB_CODE_QRY_IN_EXEC) { break; } else { @@ -627,43 +627,46 @@ static int32_t tdRSmaFetchAndSubmitResult(SSma *pSma, qTaskInfo_t taskInfo, SRSm if (taosArrayGetSize(pResList) == 0) { if (terrno == 0) { - smaDebug("vgId:%d, no rsma %" PRIi8 " data fetched yet", SMA_VID(pSma), pItem->level); + // smaDebug("vgId:%d, no rsma %" PRIi8 " data fetched yet", SMA_VID(pSma), pItem->level); } else { smaDebug("vgId:%d, no rsma %" PRIi8 " data fetched since %s", SMA_VID(pSma), pItem->level, terrstr()); goto _err; } break; + } else { + smaDebug("vgId:%d, rsma %" PRIi8 " data fetched", SMA_VID(pSma), pItem->level); } -#if 0 +#if 1 char flag[10] = {0}; snprintf(flag, 10, "level %" PRIi8, pItem->level); blockDebugShowDataBlocks(pResList, flag); #endif - STsdb *sinkTsdb = (pItem->level == TSDB_RETENTION_L1 ? pSma->pRSmaTsdb[0] : pSma->pRSmaTsdb[1]); - SSubmitReq *pReq = NULL; + for (int32_t i = 0; i < taosArrayGetSize(pResList); ++i) { + SSDataBlock *output = taosArrayGetP(pResList, i); + STsdb *sinkTsdb = (pItem->level == TSDB_RETENTION_L1 ? pSma->pRSmaTsdb[0] : pSma->pRSmaTsdb[1]); + SSubmitReq *pReq = NULL; - // TODO: the schema update should be handled later(TD-17965) - if (buildSubmitReqFromDataBlock(&pReq, pResList, pTSchema, SMA_VID(pSma), suid) < 0) { - smaError("vgId:%d, build submit req for rsma stable %" PRIi64 " level %" PRIi8 " failed since %s", SMA_VID(pSma), - suid, pItem->level, terrstr()); - goto _err; - } + // TODO: the schema update should be handled later(TD-17965) + if (buildSubmitReqFromDataBlock(&pReq, output, pTSchema, SMA_VID(pSma), suid) < 0) { + smaError("vgId:%d, build submit req for rsma stable %" PRIi64 " level %" PRIi8 " failed since %s", + SMA_VID(pSma), suid, pItem->level, terrstr()); + goto _err; + } - SSDataBlock *pBlk = (SSDataBlock *)taosArrayGet(pResList, 0); - if (pReq && tdProcessSubmitReq(sinkTsdb, pBlk->info.version, pReq) < 0) { + if (pReq && tdProcessSubmitReq(sinkTsdb, output->info.version, pReq) < 0) { + taosMemoryFreeClear(pReq); + smaError("vgId:%d, process submit req for rsma stable %" PRIi64 " level %" PRIi8 " failed since %s", + SMA_VID(pSma), suid, pItem->level, terrstr()); + goto _err; + } taosMemoryFreeClear(pReq); - smaError("vgId:%d, process submit req for rsma stable %" PRIi64 " level %" PRIi8 " version %" PRIi64 - " failed since %s", - SMA_VID(pSma), suid, pItem->level, terrstr()); - goto _err; + + smaDebug("vgId:%d, process submit req for rsma table %" PRIi64 " level %" PRIi8 " version:%" PRIi64, + SMA_VID(pSma), suid, pItem->level, output->info.version); + } - - smaDebug("vgId:%d, process submit req for rsma table %" PRIi64 " level %" PRIi8 " version %" PRIi64, SMA_VID(pSma), - suid, pItem->level); - - taosMemoryFreeClear(pReq); } taosArrayDestroy(pResList); @@ -1385,7 +1388,7 @@ static void tdRSmaFetchTrigger(void *param, void *tmrId) { } _end: - taosTmrReset(tdRSmaFetchTrigger, pItem->maxDelay, pItem, smaMgmt.tmrHandle, &pItem->tmrId); + // taosTmrReset(tdRSmaFetchTrigger, pItem->maxDelay, pItem, smaMgmt.tmrHandle, &pItem->tmrId); tdReleaseSmaRef(smaMgmt.rsetId, pRSmaInfo->refId); } From e8d63b170c574f7c6ead366cf214215e6b09f283 Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Thu, 11 Aug 2022 20:03:46 +0800 Subject: [PATCH 14/52] doc: change readme doc --- README-CN.md | 18 ------------------ README.md | 18 ------------------ 2 files changed, 36 deletions(-) diff --git a/README-CN.md b/README-CN.md index 6df6685d03..95387433da 100644 --- a/README-CN.md +++ b/README-CN.md @@ -246,24 +246,6 @@ nmake install sudo make install ``` -安装成功后,如果想以服务形式启动,先配置 `.plist` 文件,在终端中执行: - -```bash -sudo cp ../packaging/macOS/com.taosdata.tdengine.plist /Library/LaunchDaemons -``` - -在终端中启动 TDengine 服务: - -```bash -sudo launchctl load /Library/LaunchDaemons/com.taosdata.tdengine.plist -``` - -在终端中停止 TDengine 服务: - -```bash -sudo launchctl unload /Library/LaunchDaemons/com.taosdata.tdengine.plist -``` - ## 快速运行 如果不希望以服务方式运行 TDengine,也可以在终端中直接运行它。也即在生成完成后,执行以下命令(在 Windows 下,生成的可执行文件会带有 .exe 后缀,例如会名为 taosd.exe ): diff --git a/README.md b/README.md index bba0984912..72e441f92a 100644 --- a/README.md +++ b/README.md @@ -273,24 +273,6 @@ After building successfully, TDengine can be installed by: sudo make install ``` -To start the service after installation, config `.plist` file first, in a terminal, use: - -```bash -sudo cp ../packaging/macOS/com.taosdata.tdengine.plist /Library/LaunchDaemons -``` - -To start the service, in a terminal, use: - -```bash -sudo launchctl load /Library/LaunchDaemons/com.taosdata.tdengine.plist -``` - -To stop the service, in a terminal, use: - -```bash -sudo launchctl unload /Library/LaunchDaemons/com.taosdata.tdengine.plist -``` - ## Quick Run If you don't want to run TDengine as a service, you can run it in current shell. For example, to quickly start a TDengine server after building, run the command below in terminal: (We take Linux as an example, command on Windows will be `taosd.exe`) From 9a9aef985ebcc92a6bdb057bffe56eead43f8785 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 11 Aug 2022 20:26:40 +0800 Subject: [PATCH 15/52] enh: show command optimize --- include/common/ttokendef.h | 60 +- include/libs/nodes/querynodes.h | 1 + source/common/src/systable.c | 2 +- source/libs/parser/inc/sql.y | 4 +- source/libs/parser/src/parTokenizer.c | 10 +- source/libs/parser/src/parTranslater.c | 16 +- source/libs/parser/src/sql.c | 3732 +++++++++-------- source/libs/parser/test/mockCatalog.cpp | 15 +- source/libs/parser/test/parSelectTest.cpp | 10 - source/libs/planner/test/planBasicTest.cpp | 2 - tests/script/tmp/data.sim | 2 +- tests/script/tmp/r1.sim | 2 +- tests/script/tsim/alter/table.sim | 2 +- .../offline_replica2_dropDb_online.sim | 2 +- .../offline_replica3_dropDb_online.sim | 2 +- .../arbitrator/sync_replica2_dropDb.sim | 2 +- .../arbitrator/sync_replica3_dropDb.sim | 2 +- .../tsim/backup/cluster/cluster_main.sim | 8 +- .../tsim/backup/cluster/cluster_main0.sim | 8 +- .../tsim/backup/cluster/cluster_main1.sim | 8 +- .../tsim/backup/cluster/cluster_main2.sim | 8 +- tests/script/tsim/compute/avg.sim | 2 +- tests/script/tsim/compute/block_dist.sim | 2 +- tests/script/tsim/compute/bottom.sim | 2 +- tests/script/tsim/compute/count.sim | 2 +- tests/script/tsim/compute/diff.sim | 2 +- tests/script/tsim/compute/diff2.sim | 2 +- tests/script/tsim/compute/first.sim | 2 +- tests/script/tsim/compute/interval.sim | 2 +- tests/script/tsim/compute/last.sim | 2 +- tests/script/tsim/compute/last_row.sim | 2 +- tests/script/tsim/compute/leastsquare.sim | 2 +- tests/script/tsim/compute/max.sim | 2 +- tests/script/tsim/compute/min.sim | 2 +- tests/script/tsim/compute/null.sim | 2 +- tests/script/tsim/compute/percentile.sim | 2 +- tests/script/tsim/compute/stddev.sim | 2 +- tests/script/tsim/compute/sum.sim | 2 +- tests/script/tsim/compute/top.sim | 2 +- tests/script/tsim/db/alter_option.sim | 38 +- tests/script/tsim/db/alter_replica_13.sim | 2 +- tests/script/tsim/db/alter_replica_31.sim | 2 +- tests/script/tsim/db/basic1.sim | 12 +- tests/script/tsim/db/basic2.sim | 4 +- tests/script/tsim/db/basic3.sim | 4 +- tests/script/tsim/db/basic4.sim | 6 +- tests/script/tsim/db/basic6.sim | 10 +- tests/script/tsim/db/create_all_options.sim | 66 +- tests/script/tsim/db/delete_reusevnode.sim | 4 +- tests/script/tsim/db/delete_reusevnode2.sim | 2 +- tests/script/tsim/db/error1.sim | 4 +- tests/script/tsim/db/keep.sim | 4 +- tests/script/tsim/db/len.sim | 20 +- tests/script/tsim/db/tables.sim | 4 +- tests/script/tsim/db/taosdlog.sim | 6 +- tests/script/tsim/dnode/create_dnode.sim | 2 +- tests/script/tsim/field/2.sim | 2 +- tests/script/tsim/field/3.sim | 2 +- tests/script/tsim/field/4.sim | 2 +- tests/script/tsim/field/5.sim | 2 +- tests/script/tsim/field/6.sim | 2 +- tests/script/tsim/field/bigint.sim | 2 +- tests/script/tsim/field/binary.sim | 2 +- tests/script/tsim/field/bool.sim | 2 +- tests/script/tsim/field/double.sim | 2 +- tests/script/tsim/field/float.sim | 2 +- tests/script/tsim/field/int.sim | 2 +- tests/script/tsim/field/single.sim | 2 +- tests/script/tsim/field/smallint.sim | 2 +- tests/script/tsim/field/tinyint.sim | 2 +- tests/script/tsim/field/unsigined_bigint.sim | 2 +- tests/script/tsim/insert/backquote.sim | 4 +- tests/script/tsim/insert/basic0.sim | 2 +- tests/script/tsim/insert/basic1.sim | 2 +- tests/script/tsim/insert/commit-merge0.sim | 2 +- tests/script/tsim/insert/null.sim | 2 +- .../script/tsim/insert/query_block1_file.sim | 2 +- .../tsim/insert/query_block1_memory.sim | 2 +- .../script/tsim/insert/query_block2_file.sim | 2 +- .../tsim/insert/query_block2_memory.sim | 2 +- .../script/tsim/insert/query_file_memory.sim | 2 +- tests/script/tsim/insert/query_multi_file.sim | 2 +- tests/script/tsim/mnode/basic2.sim | 4 +- tests/script/tsim/parser/alter.sim | 16 +- tests/script/tsim/parser/alter1.sim | 2 +- .../parser/alter__for_community_version.sim | 14 +- tests/script/tsim/parser/auto_create_tb.sim | 2 +- tests/script/tsim/parser/create_db.sim | 32 +- tests/script/tsim/parser/create_mt.sim | 2 +- tests/script/tsim/parser/create_tb.sim | 2 +- tests/script/tsim/parser/distinct.sim | 2 +- tests/script/tsim/parser/fill.sim | 2 +- tests/script/tsim/parser/fill_stb.sim | 2 +- tests/script/tsim/parser/fill_us.sim | 2 +- .../tsim/parser/fourArithmetic-basic.sim | 2 +- tests/script/tsim/parser/import_commit3.sim | 2 +- tests/script/tsim/parser/insert_tb.sim | 2 +- tests/script/tsim/parser/mixed_blocks.sim | 2 +- tests/script/tsim/parser/nchar.sim | 2 +- tests/script/tsim/parser/precision_ns.sim | 2 +- .../tsim/parser/select_across_vnodes.sim | 2 +- .../tsim/parser/select_distinct_tag.sim | 2 +- tests/script/tsim/parser/slimit_query.sim | 2 +- tests/script/tsim/parser/stableOp.sim | 2 +- tests/script/tsim/parser/tags_filter.sim | 2 +- tests/script/tsim/parser/union.sim | 2 +- .../script/tsim/query/charScalarFunction.sim | 2 +- tests/script/tsim/query/complex_group.sim | 2 +- tests/script/tsim/query/complex_having.sim | 2 +- tests/script/tsim/query/complex_where.sim | 2 +- tests/script/tsim/query/crash_sql.sim | 2 +- tests/script/tsim/query/diff.sim | 2 +- tests/script/tsim/query/explain.sim | 2 +- tests/script/tsim/query/interval.sim | 2 +- tests/script/tsim/query/scalarFunction.sim | 2 +- tests/script/tsim/query/scalarNull.sim | 2 +- tests/script/tsim/query/session.sim | 2 +- tests/script/tsim/query/stddev.sim | 4 +- tests/script/tsim/query/time_process.sim | 4 +- tests/script/tsim/query/udf.sim | 2 +- tests/script/tsim/show/basic.sim | 4 +- tests/script/tsim/stable/alter_metrics.sim | 2 +- tests/script/tsim/stable/disk.sim | 2 +- tests/script/tsim/stable/dnode3.sim | 2 +- tests/script/tsim/stable/metrics.sim | 2 +- tests/script/tsim/stable/refcount.sim | 10 +- tests/script/tsim/stable/vnode3.sim | 2 +- tests/script/tsim/stream/basic0.sim | 2 +- tests/script/tsim/stream/basic1.sim | 4 +- tests/script/tsim/stream/basic2.sim | 2 +- .../script/tsim/stream/ignoreExpiredData.sim | 4 +- tests/script/tsim/stream/session0.sim | 2 +- tests/script/tsim/stream/session1.sim | 2 +- tests/script/tsim/stream/sliding.sim | 2 +- tests/script/tsim/stream/state0.sim | 4 +- tests/script/tsim/stream/triggerInterval0.sim | 2 +- tests/script/tsim/stream/triggerSession0.sim | 2 +- tests/script/tsim/stream/windowClose.sim | 2 +- tests/script/tsim/sync/3Replica1VgElect.sim | 4 +- tests/script/tsim/sync/3Replica5VgElect.sim | 4 +- .../tsim/sync/3Replica5VgElect3mnode.sim | 4 +- .../tsim/sync/3Replica5VgElect3mnodedrop.sim | 2 +- tests/script/tsim/sync/electTest.sim | 2 +- tests/script/tsim/sync/oneReplica1VgElect.sim | 2 +- .../sync/oneReplica1VgElectWithInsert.sim | 2 +- tests/script/tsim/sync/oneReplica5VgElect.sim | 2 +- .../script/tsim/sync/threeReplica1VgElect.sim | 2 +- .../sync/threeReplica1VgElectWihtInsert.sim | 2 +- tests/script/tsim/sync/vnode-insert.sim | 2 +- .../script/tsim/sync/vnodeLeaderTransfer.sim | 2 +- .../script/tsim/sync/vnodeLogAnalyzeTest.sim | 2 +- .../tsim/sync/vnodesnapshot-rsma-test.sim | 2 +- tests/script/tsim/sync/vnodesnapshot-test.sim | 2 +- tests/script/tsim/sync/vnodesnapshot.sim | 2 +- tests/script/tsim/table/autocreate.sim | 2 +- tests/script/tsim/table/basic1.sim | 2 +- tests/script/tsim/table/basic2.sim | 2 +- tests/script/tsim/table/basic3.sim | 2 +- tests/script/tsim/table/bigint.sim | 2 +- tests/script/tsim/table/binary.sim | 2 +- tests/script/tsim/table/bool.sim | 2 +- tests/script/tsim/table/column2.sim | 2 +- tests/script/tsim/table/column_name.sim | 2 +- tests/script/tsim/table/column_num.sim | 2 +- tests/script/tsim/table/column_value.sim | 2 +- tests/script/tsim/table/createmulti.sim | 2 +- tests/script/tsim/table/date.sim | 2 +- tests/script/tsim/table/db.table.sim | 2 +- tests/script/tsim/table/describe.sim | 2 +- tests/script/tsim/table/double.sim | 2 +- tests/script/tsim/table/float.sim | 2 +- tests/script/tsim/table/int.sim | 2 +- tests/script/tsim/table/limit.sim | 2 +- tests/script/tsim/table/smallint.sim | 2 +- tests/script/tsim/table/table.sim | 2 +- tests/script/tsim/table/table_len.sim | 2 +- tests/script/tsim/table/tinyint.sim | 2 +- tests/script/tsim/table/vgroup.sim | 4 +- tests/script/tsim/tag/3.sim | 2 +- tests/script/tsim/tag/4.sim | 2 +- tests/script/tsim/tag/5.sim | 2 +- tests/script/tsim/tag/6.sim | 2 +- tests/script/tsim/tag/add.sim | 2 +- tests/script/tsim/tag/bigint.sim | 2 +- tests/script/tsim/tag/binary.sim | 2 +- tests/script/tsim/tag/binary_binary.sim | 2 +- tests/script/tsim/tag/bool.sim | 2 +- tests/script/tsim/tag/bool_binary.sim | 2 +- tests/script/tsim/tag/bool_int.sim | 2 +- tests/script/tsim/tag/change.sim | 2 +- tests/script/tsim/tag/column.sim | 2 +- tests/script/tsim/tag/commit.sim | 2 +- tests/script/tsim/tag/delete.sim | 2 +- tests/script/tsim/tag/double.sim | 2 +- tests/script/tsim/tag/filter.sim | 2 +- tests/script/tsim/tag/float.sim | 2 +- tests/script/tsim/tag/int.sim | 2 +- tests/script/tsim/tag/int_binary.sim | 2 +- tests/script/tsim/tag/int_float.sim | 2 +- tests/script/tsim/tag/set.sim | 2 +- tests/script/tsim/tag/smallint.sim | 2 +- tests/script/tsim/tag/tinyint.sim | 2 +- .../script/tsim/tmq/prepareBasicEnv-1vgrp.sim | 2 +- .../script/tsim/tmq/prepareBasicEnv-4vgrp.sim | 2 +- tests/script/tsim/tmq/topic.sim | 2 +- tests/script/tsim/trans/create_db.sim | 2 +- tests/script/tsim/user/privilege_db.sim | 2 +- tests/script/tsim/valgrind/checkError1.sim | 2 +- tests/script/tsim/valgrind/checkError2.sim | 2 +- tests/script/tsim/valgrind/checkError3.sim | 2 +- tests/script/tsim/valgrind/checkError4.sim | 2 +- tests/script/tsim/valgrind/checkUdf.sim | 2 +- tests/script/tsim/vector/metrics_field.sim | 2 +- tests/script/tsim/vector/metrics_mix.sim | 2 +- tests/script/tsim/vector/metrics_query.sim | 2 +- tests/script/tsim/vector/metrics_tag.sim | 2 +- tests/script/tsim/vector/metrics_time.sim | 2 +- tests/script/tsim/vector/multi.sim | 2 +- tests/script/tsim/vector/single.sim | 2 +- tests/script/tsim/vector/table_field.sim | 2 +- tests/script/tsim/vector/table_mix.sim | 2 +- tests/script/tsim/vector/table_query.sim | 2 +- tests/script/tsim/vector/table_time.sim | 2 +- tests/script/tsim/vnode/stable_dnode2.sim | 2 +- .../script/tsim/vnode/stable_dnode2_stop.sim | 2 +- tests/script/tsim/vnode/stable_dnode3.sim | 2 +- 226 files changed, 2359 insertions(+), 2193 deletions(-) diff --git a/include/common/ttokendef.h b/include/common/ttokendef.h index ca9adf2940..b38ec66435 100644 --- a/include/common/ttokendef.h +++ b/include/common/ttokendef.h @@ -266,12 +266,60 @@ #define TK_OFFSET 248 #define TK_ASC 249 #define TK_NULLS 250 -#define TK_ID 251 -#define TK_NK_BITNOT 252 -#define TK_VALUES 253 -#define TK_IMPORT 254 -#define TK_NK_SEMI 255 -#define TK_FILE 256 +#define TK_ABORT 251 +#define TK_AFTER 252 +#define TK_ATTACH 253 +#define TK_BEFORE 254 +#define TK_BEGIN 255 +#define TK_BITAND 256 +#define TK_BITNOT 257 +#define TK_BITOR 258 +#define TK_BLOCKS 259 +#define TK_CHANGE 260 +#define TK_COMMA 261 +#define TK_COMPACT 262 +#define TK_CONCAT 263 +#define TK_CONFLICT 264 +#define TK_COPY 265 +#define TK_DEFERRED 266 +#define TK_DELIMITERS 267 +#define TK_DETACH 268 +#define TK_DIVIDE 269 +#define TK_DOT 270 +#define TK_EACH 271 +#define TK_END 272 +#define TK_FAIL 273 +#define TK_FILE 274 +#define TK_FOR 275 +#define TK_GLOB 276 +#define TK_ID 277 +#define TK_IMMEDIATE 278 +#define TK_IMPORT 279 +#define TK_INITIALLY 280 +#define TK_INSTEAD 281 +#define TK_ISNULL 282 +#define TK_KEY 283 +#define TK_NK_BITNOT 284 +#define TK_NK_SEMI 285 +#define TK_NOTNULL 286 +#define TK_OF 287 +#define TK_PLUS 288 +#define TK_PRIVILEGE 289 +#define TK_RAISE 290 +#define TK_REPLACE 291 +#define TK_RESTRICT 292 +#define TK_ROW 293 +#define TK_SEMI 294 +#define TK_STAR 295 +#define TK_STATEMENT 296 +#define TK_STRING 297 +#define TK_TIMES 298 +#define TK_UPDATE 299 +#define TK_VALUES 300 +#define TK_VARIABLE 301 +#define TK_VIEW 302 +#define TK_VNODES 303 +#define TK_WAL 304 #define TK_NK_SPACE 300 #define TK_NK_COMMENT 301 diff --git a/include/libs/nodes/querynodes.h b/include/libs/nodes/querynodes.h index db87bde521..38c5055059 100644 --- a/include/libs/nodes/querynodes.h +++ b/include/libs/nodes/querynodes.h @@ -269,6 +269,7 @@ typedef struct SSelectStmt { bool hasInterpFunc; bool hasLastRowFunc; bool hasTimeLineFunc; + bool hasUdaf; bool onlyHasKeepOrderFunc; bool groupSort; } SSelectStmt; diff --git a/source/common/src/systable.c b/source/common/src/systable.c index be76a1b453..fde5765530 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -346,7 +346,7 @@ static const SSysTableMeta perfsMeta[] = { {TSDB_PERFS_TABLE_TOPICS, topicSchema, tListLen(topicSchema)}, {TSDB_PERFS_TABLE_CONSUMERS, consumerSchema, tListLen(consumerSchema)}, {TSDB_PERFS_TABLE_SUBSCRIPTIONS, subscriptionSchema, tListLen(subscriptionSchema)}, - {TSDB_PERFS_TABLE_OFFSETS, offsetSchema, tListLen(offsetSchema)}, + // {TSDB_PERFS_TABLE_OFFSETS, offsetSchema, tListLen(offsetSchema)}, {TSDB_PERFS_TABLE_TRANS, transSchema, tListLen(transSchema)}, {TSDB_PERFS_TABLE_SMAS, smaSchema, tListLen(smaSchema)}, {TSDB_PERFS_TABLE_STREAMS, streamSchema, tListLen(streamSchema)}, diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index ef3c8355f0..7afafd34b6 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -998,4 +998,6 @@ null_ordering_opt(A) ::= . null_ordering_opt(A) ::= NULLS FIRST. { A = NULL_ORDER_FIRST; } null_ordering_opt(A) ::= NULLS LAST. { A = NULL_ORDER_LAST; } -%fallback ID NK_BITNOT VALUES IMPORT NK_SEMI FILE. +%fallback ABORT AFTER ATTACH BEFORE BEGIN BITAND BITNOT BITOR BLOCKS CHANGE COMMA COMPACT CONCAT CONFLICT COPY DEFERRED DELIMITERS DETACH DIVIDE DOT EACH END FAIL + FILE FOR GLOB ID IMMEDIATE IMPORT INITIALLY INSTEAD ISNULL KEY NK_BITNOT NK_SEMI NOTNULL OF PLUS PRIVILEGE RAISE REPLACE RESTRICT ROW SEMI STAR STATEMENT STRING + TIMES UPDATE VALUES VARIABLE VIEW VNODES WAL. diff --git a/source/libs/parser/src/parTokenizer.c b/source/libs/parser/src/parTokenizer.c index a2bd8989c5..80ec447f66 100644 --- a/source/libs/parser/src/parTokenizer.c +++ b/source/libs/parser/src/parTokenizer.c @@ -43,8 +43,8 @@ static SKeyword keywordTable[] = { {"AT_ONCE", TK_AT_ONCE}, {"BALANCE", TK_BALANCE}, {"BETWEEN", TK_BETWEEN}, - {"BINARY", TK_BINARY}, {"BIGINT", TK_BIGINT}, + {"BINARY", TK_BINARY}, {"BNODE", TK_BNODE}, {"BNODES", TK_BNODES}, {"BOOL", TK_BOOL}, @@ -60,9 +60,9 @@ static SKeyword keywordTable[] = { {"COLUMN", TK_COLUMN}, {"COMMENT", TK_COMMENT}, {"COMP", TK_COMP}, - {"CONNS", TK_CONNS}, {"CONNECTION", TK_CONNECTION}, {"CONNECTIONS", TK_CONNECTIONS}, + {"CONNS", TK_CONNS}, {"CONSUMER", TK_CONSUMER}, {"CONSUMERS", TK_CONSUMERS}, {"CONTAINS", TK_CONTAINS}, @@ -106,8 +106,8 @@ static SKeyword keywordTable[] = { {"INDEX", TK_INDEX}, {"INDEXES", TK_INDEXES}, {"INNER", TK_INNER}, - {"INT", TK_INT}, {"INSERT", TK_INSERT}, + {"INT", TK_INT}, {"INTEGER", TK_INTEGER}, {"INTERVAL", TK_INTERVAL}, {"INTO", TK_INTO}, @@ -147,10 +147,10 @@ static SKeyword keywordTable[] = { {"OR", TK_OR}, {"ORDER", TK_ORDER}, {"OUTPUTTYPE", TK_OUTPUTTYPE}, - {"PARTITION", TK_PARTITION}, - {"PASS", TK_PASS}, {"PAGES", TK_PAGES}, {"PAGESIZE", TK_PAGESIZE}, + {"PARTITION", TK_PARTITION}, + {"PASS", TK_PASS}, {"PORT", TK_PORT}, {"PPS", TK_PPS}, {"PRECISION", TK_PRECISION}, diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 8ad08e70ac..71d42256ef 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -82,7 +82,7 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = { .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_MODULES, .numOfShowCols = 1, - .pShowCols = {"module"} + .pShowCols = {"endpoint"} }, { .showType = QUERY_NODE_SHOW_QNODES_STMT, @@ -1528,6 +1528,7 @@ static void setFuncClassification(SNode* pCurrStmt, SFunctionNode* pFunc) { pSelect->hasInterpFunc = pSelect->hasInterpFunc ? true : (FUNCTION_TYPE_INTERP == pFunc->funcType); pSelect->hasLastRowFunc = pSelect->hasLastRowFunc ? true : (FUNCTION_TYPE_LAST_ROW == pFunc->funcType); pSelect->hasTimeLineFunc = pSelect->hasTimeLineFunc ? true : fmIsTimelineFunc(pFunc->funcId); + pSelect->hasUdaf = pSelect->hasUdaf ? true : fmIsUserDefinedFunc(pFunc->funcId) && fmIsAggFunc(pFunc->funcId); pSelect->onlyHasKeepOrderFunc = pSelect->onlyHasKeepOrderFunc ? fmIsKeepOrderFunc(pFunc->funcId) : false; } } @@ -2819,6 +2820,11 @@ static int32_t translateInterp(STranslateContext* pCxt, SSelectStmt* pSelect) { return TSDB_CODE_SUCCESS; } + if (NULL == pSelect->pRange || NULL == pSelect->pEvery || NULL == pSelect->pFill) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_INTERP_CLAUSE, + "Missing RANGE clause, EVERY clause or FILL clause"); + } + int32_t code = translateExpr(pCxt, &pSelect->pRange); if (TSDB_CODE_SUCCESS == code) { code = translateExpr(pCxt, &pSelect->pEvery); @@ -4909,6 +4915,11 @@ static bool crossTableWithoutAggOper(SSelectStmt* pSelect) { !isPartitionByTbname(pSelect->pPartitionByList); } +static bool crossTableWithUdaf(SSelectStmt* pSelect) { + return pSelect->hasUdaf && TSDB_SUPER_TABLE == ((SRealTableNode*)pSelect->pFromTable)->pMeta->tableType && + !isPartitionByTbname(pSelect->pPartitionByList); +} + static int32_t checkCreateStream(STranslateContext* pCxt, SCreateStreamStmt* pStmt) { if (NULL != pStmt->pOptions->pWatermark && (DEAL_RES_ERROR == translateValue(pCxt, (SValueNode*)pStmt->pOptions->pWatermark))) { @@ -4960,7 +4971,8 @@ static int32_t addWstartTsToCreateStreamQuery(SNode* pStmt) { static int32_t checkStreamQuery(STranslateContext* pCxt, SSelectStmt* pSelect) { if (TSDB_DATA_TYPE_TIMESTAMP != ((SExprNode*)nodesListGetNode(pSelect->pProjectionList, 0))->resType.type || - !pSelect->isTimeLineResult || crossTableWithoutAggOper(pSelect)) { + !pSelect->isTimeLineResult || crossTableWithoutAggOper(pSelect) || NULL != pSelect->pOrderByList || + crossTableWithUdaf(pSelect)) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query"); } return TSDB_CODE_SUCCESS; diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 5eb744a7db..4756a78be6 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -104,26 +104,26 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 379 +#define YYNOCODE 427 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SToken typedef union { int yyinit; ParseTOKENTYPE yy0; - EOrder yy58; - bool yy151; - int8_t yy285; - SNodeList* yy356; - SToken yy361; - SAlterOption yy409; - int64_t yy457; - EFillMode yy494; - EJoinType yy504; - EOperatorType yy526; - SDataType yy600; - ENullOrder yy613; - SNode* yy616; - int32_t yy734; + SAlterOption yy95; + EOperatorType yy198; + EOrder yy204; + int8_t yy215; + ENullOrder yy277; + bool yy313; + int64_t yy473; + SNodeList* yy544; + SToken yy617; + EJoinType yy708; + SDataType yy784; + EFillMode yy816; + SNode* yy840; + int32_t yy844; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -141,7 +141,7 @@ typedef union { #define YYFALLBACK 1 #define YYNSTATE 666 #define YYNRULE 491 -#define YYNTOKEN 257 +#define YYNTOKEN 305 #define YY_MAX_SHIFT 665 #define YY_MIN_SHIFTREDUCE 972 #define YY_MAX_SHIFTREDUCE 1462 @@ -216,607 +216,625 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (2458) +#define YY_ACTTAB_COUNT (2548) static const YYACTIONTYPE yy_action[] = { /* 0 */ 525, 30, 261, 525, 548, 433, 525, 434, 1501, 11, /* 10 */ 10, 117, 39, 37, 55, 1652, 1653, 117, 471, 378, - /* 20 */ 339, 1467, 1263, 1005, 476, 1022, 551, 1021, 1606, 1790, - /* 30 */ 1597, 1606, 127, 1339, 1606, 1261, 441, 74, 434, 1501, + /* 20 */ 339, 1467, 1263, 1005, 476, 1022, 1289, 1021, 1606, 1790, + /* 30 */ 1597, 1606, 127, 1339, 1606, 1261, 441, 551, 434, 1501, /* 40 */ 469, 1774, 107, 1778, 1289, 106, 105, 104, 103, 102, - /* 50 */ 101, 100, 99, 98, 1774, 1023, 1334, 1808, 150, 1602, + /* 50 */ 101, 100, 99, 98, 1774, 1023, 1334, 1808, 150, 64, /* 60 */ 1934, 14, 1566, 1009, 1010, 552, 1770, 1776, 1269, 450, /* 70 */ 1760, 125, 576, 165, 39, 37, 1402, 1931, 570, 1770, /* 80 */ 1776, 328, 339, 1528, 1263, 550, 161, 1876, 1877, 1, - /* 90 */ 1881, 570, 1658, 63, 1288, 1339, 1822, 1261, 1375, 327, + /* 90 */ 1881, 570, 1658, 479, 478, 1339, 1822, 1261, 1375, 327, /* 100 */ 95, 1791, 579, 1793, 1794, 575, 496, 570, 1656, 344, /* 110 */ 1868, 662, 1651, 1653, 330, 1864, 160, 513, 1334, 494, - /* 120 */ 146, 492, 551, 14, 325, 1341, 1342, 1704, 164, 1609, - /* 130 */ 1269, 40, 38, 36, 35, 34, 1894, 33, 32, 479, - /* 140 */ 478, 40, 38, 36, 35, 34, 639, 638, 637, 636, + /* 120 */ 1934, 492, 1288, 14, 325, 1341, 1342, 1704, 164, 542, + /* 130 */ 1269, 1160, 1161, 1933, 33, 32, 1894, 1931, 40, 38, + /* 140 */ 36, 35, 34, 148, 63, 1478, 639, 638, 637, 636, /* 150 */ 349, 2, 635, 634, 128, 629, 628, 627, 626, 625, /* 160 */ 624, 623, 139, 619, 618, 617, 348, 347, 614, 613, /* 170 */ 1264, 107, 1262, 662, 106, 105, 104, 103, 102, 101, - /* 180 */ 100, 99, 98, 174, 1808, 49, 1080, 1341, 1342, 224, - /* 190 */ 225, 42, 541, 1267, 1268, 218, 1316, 1317, 1319, 1320, + /* 180 */ 100, 99, 98, 1808, 36, 35, 34, 1341, 1342, 224, + /* 190 */ 225, 541, 384, 1267, 1268, 612, 1316, 1317, 1319, 1320, /* 200 */ 1321, 1322, 1323, 1324, 572, 568, 1332, 1333, 1335, 1336, - /* 210 */ 1337, 1338, 1340, 1343, 1466, 71, 33, 32, 70, 1082, - /* 220 */ 40, 38, 36, 35, 34, 1289, 525, 168, 63, 540, - /* 230 */ 78, 168, 1264, 373, 1262, 1263, 84, 170, 116, 115, - /* 240 */ 114, 113, 112, 111, 110, 109, 108, 305, 1261, 1583, - /* 250 */ 515, 548, 375, 371, 1606, 1267, 1268, 1599, 1316, 1317, + /* 210 */ 1337, 1338, 1340, 1343, 1466, 1287, 1433, 33, 32, 482, + /* 220 */ 481, 40, 38, 36, 35, 34, 123, 168, 540, 303, + /* 230 */ 1464, 223, 1264, 84, 1262, 1263, 477, 480, 116, 115, + /* 240 */ 114, 113, 112, 111, 110, 109, 108, 305, 1261, 1022, + /* 250 */ 515, 1021, 22, 174, 1599, 1267, 1268, 1489, 1316, 1317, /* 260 */ 1319, 1320, 1321, 1322, 1323, 1324, 572, 568, 1332, 1333, - /* 270 */ 1335, 1336, 1337, 1338, 1340, 1343, 39, 37, 542, 127, - /* 280 */ 64, 1269, 551, 1290, 339, 1363, 1263, 1288, 33, 32, - /* 290 */ 384, 1459, 40, 38, 36, 35, 34, 1339, 1433, 1261, + /* 270 */ 1335, 1336, 1337, 1338, 1340, 1343, 39, 37, 1488, 1023, + /* 280 */ 537, 1269, 168, 525, 339, 71, 1263, 1487, 70, 354, + /* 290 */ 1243, 1244, 1707, 1790, 170, 211, 512, 1339, 1760, 1261, /* 300 */ 1118, 601, 600, 599, 1122, 598, 1124, 1125, 597, 1127, - /* 310 */ 594, 487, 1133, 591, 1135, 1136, 588, 585, 125, 1022, - /* 320 */ 1334, 1021, 610, 168, 662, 14, 497, 303, 1287, 168, - /* 330 */ 1160, 1161, 1269, 162, 1876, 1877, 211, 1881, 39, 37, - /* 340 */ 210, 137, 136, 607, 606, 605, 339, 27, 1263, 1023, - /* 350 */ 610, 43, 432, 2, 490, 436, 63, 1368, 484, 1339, - /* 360 */ 1658, 1261, 1707, 209, 1934, 63, 168, 312, 1531, 137, - /* 370 */ 136, 607, 606, 605, 612, 662, 1656, 1933, 1458, 61, - /* 380 */ 1778, 1931, 1334, 1264, 148, 1262, 1478, 74, 159, 1341, - /* 390 */ 1342, 1774, 76, 305, 1269, 58, 515, 1934, 57, 1269, - /* 400 */ 122, 1645, 1489, 39, 37, 1344, 1267, 1268, 1934, 1601, - /* 410 */ 166, 339, 1790, 1263, 1931, 8, 1770, 1776, 334, 604, - /* 420 */ 253, 1932, 223, 537, 1339, 1931, 1261, 326, 570, 1934, - /* 430 */ 633, 631, 482, 481, 1264, 146, 1262, 662, 440, 123, - /* 440 */ 1808, 436, 166, 1760, 1608, 1291, 1931, 1334, 574, 477, - /* 450 */ 480, 1341, 1342, 1760, 1488, 576, 1487, 1267, 1268, 1269, + /* 310 */ 594, 1606, 1133, 591, 1135, 1136, 588, 585, 1934, 1760, + /* 320 */ 1334, 1808, 1583, 1269, 662, 14, 1658, 1934, 1760, 552, + /* 330 */ 1934, 166, 1269, 343, 1760, 1931, 576, 1934, 39, 37, + /* 340 */ 1932, 487, 1656, 165, 1931, 551, 339, 1931, 1263, 548, + /* 350 */ 165, 76, 305, 2, 1931, 515, 497, 543, 538, 1339, + /* 360 */ 1822, 1261, 1697, 159, 95, 1791, 579, 1793, 1794, 575, + /* 370 */ 210, 570, 63, 173, 1868, 662, 1645, 127, 330, 1864, + /* 380 */ 160, 551, 1334, 1264, 490, 1262, 419, 604, 484, 1341, + /* 390 */ 1342, 33, 32, 209, 1269, 40, 38, 36, 35, 34, + /* 400 */ 1895, 633, 631, 39, 37, 1344, 1267, 1268, 1486, 91, + /* 410 */ 621, 339, 1790, 1263, 42, 8, 125, 40, 38, 36, + /* 420 */ 35, 34, 124, 610, 1339, 58, 1261, 1595, 57, 49, + /* 430 */ 1598, 162, 1876, 1877, 1264, 1881, 1262, 662, 178, 177, + /* 440 */ 1808, 352, 137, 136, 607, 606, 605, 1334, 574, 1760, + /* 450 */ 43, 1341, 1342, 1760, 316, 576, 1485, 1267, 1268, 1269, /* 460 */ 1316, 1317, 1319, 1320, 1321, 1322, 1323, 1324, 572, 568, - /* 470 */ 1332, 1333, 1335, 1336, 1337, 1338, 1340, 1343, 621, 1822, - /* 480 */ 9, 1243, 1244, 294, 1791, 579, 1793, 1794, 575, 573, - /* 490 */ 570, 567, 1840, 548, 168, 1760, 1264, 1760, 1262, 1658, - /* 500 */ 543, 538, 662, 168, 1584, 33, 32, 1582, 438, 40, - /* 510 */ 38, 36, 35, 34, 1286, 1657, 1341, 1342, 1595, 1267, - /* 520 */ 1268, 127, 1316, 1317, 1319, 1320, 1321, 1322, 1323, 1324, + /* 470 */ 1332, 1333, 1335, 1336, 1337, 1338, 1340, 1343, 63, 1822, + /* 480 */ 9, 74, 1934, 294, 1791, 579, 1793, 1794, 575, 573, + /* 490 */ 570, 567, 1840, 1288, 122, 165, 1264, 1760, 1262, 1931, + /* 500 */ 33, 32, 662, 1601, 40, 38, 36, 35, 34, 317, + /* 510 */ 168, 315, 314, 1484, 473, 351, 1341, 1342, 475, 1267, + /* 520 */ 1268, 1290, 1316, 1317, 1319, 1320, 1321, 1322, 1323, 1324, /* 530 */ 572, 568, 1332, 1333, 1335, 1336, 1337, 1338, 1340, 1343, - /* 540 */ 22, 33, 32, 1591, 26, 40, 38, 36, 35, 34, - /* 550 */ 33, 32, 475, 168, 40, 38, 36, 35, 34, 28, - /* 560 */ 125, 1264, 1406, 1262, 450, 33, 32, 612, 1288, 40, - /* 570 */ 38, 36, 35, 34, 474, 163, 1876, 1877, 1703, 1881, - /* 580 */ 300, 1790, 233, 1593, 1267, 1268, 316, 1316, 1317, 1319, + /* 540 */ 474, 1009, 1010, 33, 32, 1459, 1363, 40, 38, 36, + /* 550 */ 35, 34, 168, 168, 1760, 525, 1934, 1591, 377, 146, + /* 560 */ 376, 1264, 63, 1262, 26, 1531, 382, 168, 1609, 165, + /* 570 */ 33, 32, 217, 1931, 40, 38, 36, 35, 34, 218, + /* 580 */ 1483, 1790, 1413, 1606, 1267, 1268, 1593, 1316, 1317, 1319, /* 590 */ 1320, 1321, 1322, 1323, 1324, 572, 568, 1332, 1333, 1335, - /* 600 */ 1336, 1337, 1338, 1340, 1343, 39, 37, 1581, 505, 1808, - /* 610 */ 342, 419, 1507, 339, 525, 1263, 1589, 552, 146, 525, - /* 620 */ 555, 1464, 1760, 1413, 576, 382, 1339, 1608, 1261, 63, - /* 630 */ 383, 33, 32, 214, 1883, 40, 38, 36, 35, 34, - /* 640 */ 1423, 317, 1606, 315, 314, 1349, 473, 1606, 1822, 1334, - /* 650 */ 475, 1288, 95, 1791, 579, 1793, 1794, 575, 1880, 570, - /* 660 */ 657, 1269, 1868, 178, 177, 1486, 330, 1864, 160, 571, - /* 670 */ 33, 32, 474, 345, 40, 38, 36, 35, 34, 665, - /* 680 */ 354, 146, 9, 534, 1421, 1422, 1424, 1425, 1895, 603, - /* 690 */ 1608, 33, 32, 268, 525, 40, 38, 36, 35, 34, - /* 700 */ 36, 35, 34, 1479, 662, 389, 1760, 157, 610, 377, - /* 710 */ 1658, 376, 655, 651, 647, 643, 266, 343, 1341, 1342, - /* 720 */ 256, 1934, 1606, 307, 535, 1779, 1656, 137, 136, 607, - /* 730 */ 606, 605, 39, 37, 165, 1883, 1774, 302, 1931, 1286, - /* 740 */ 339, 1485, 1263, 525, 307, 1318, 412, 608, 92, 424, - /* 750 */ 1649, 231, 1301, 1339, 404, 1261, 7, 482, 481, 1879, - /* 760 */ 1361, 1770, 1776, 1264, 123, 1262, 397, 168, 425, 512, - /* 770 */ 399, 1606, 352, 570, 477, 480, 1334, 1484, 1399, 351, - /* 780 */ 145, 1361, 1760, 1483, 522, 1288, 1267, 1268, 1269, 1316, + /* 600 */ 1336, 1337, 1338, 1340, 1343, 39, 37, 77, 27, 1808, + /* 610 */ 498, 1883, 63, 339, 78, 1263, 168, 577, 1368, 1482, + /* 620 */ 505, 1760, 1760, 373, 576, 1301, 1339, 28, 1261, 482, + /* 630 */ 481, 1481, 1458, 33, 32, 1880, 123, 40, 38, 36, + /* 640 */ 35, 34, 375, 371, 438, 1589, 477, 480, 1822, 1334, + /* 650 */ 1286, 1934, 96, 1791, 579, 1793, 1794, 575, 253, 570, + /* 660 */ 1760, 1269, 1868, 513, 165, 1480, 1867, 1864, 1931, 1080, + /* 670 */ 33, 32, 1760, 1705, 40, 38, 36, 35, 34, 665, + /* 680 */ 33, 32, 9, 525, 40, 38, 36, 35, 34, 1477, + /* 690 */ 1476, 33, 32, 268, 383, 40, 38, 36, 35, 34, + /* 700 */ 168, 1703, 1082, 300, 662, 432, 1760, 157, 436, 1697, + /* 710 */ 214, 1606, 655, 651, 647, 643, 266, 1581, 1341, 1342, + /* 720 */ 176, 33, 32, 307, 571, 40, 38, 36, 35, 34, + /* 730 */ 1760, 1760, 39, 37, 525, 603, 525, 302, 1475, 1286, + /* 740 */ 339, 548, 1263, 525, 307, 389, 412, 404, 92, 424, + /* 750 */ 168, 231, 1301, 1339, 405, 1261, 440, 1584, 74, 436, + /* 760 */ 1361, 1406, 1606, 1264, 1606, 1262, 397, 1288, 425, 127, + /* 770 */ 399, 1606, 1474, 1702, 1778, 300, 1334, 1888, 1395, 1760, + /* 780 */ 1602, 1361, 44, 4, 522, 1774, 1267, 1268, 1269, 1316, /* 790 */ 1317, 1319, 1320, 1321, 1322, 1323, 1324, 572, 568, 1332, - /* 800 */ 1333, 1335, 1336, 1337, 1338, 1340, 1343, 390, 91, 2, - /* 810 */ 1934, 525, 1567, 1934, 1362, 513, 220, 1883, 1760, 386, - /* 820 */ 1934, 124, 405, 165, 1760, 1705, 165, 1931, 1318, 1598, - /* 830 */ 1931, 662, 1482, 165, 1235, 1362, 213, 1931, 1702, 1606, - /* 840 */ 300, 1878, 622, 499, 1578, 1341, 1342, 423, 1481, 468, + /* 800 */ 1333, 1335, 1336, 1337, 1338, 1340, 1343, 390, 125, 2, + /* 810 */ 1770, 1776, 334, 1760, 1362, 7, 220, 450, 610, 386, + /* 820 */ 90, 525, 570, 163, 1876, 1877, 1658, 1881, 1423, 145, + /* 830 */ 87, 662, 448, 312, 1235, 1362, 213, 137, 136, 607, + /* 840 */ 606, 605, 1656, 1479, 1883, 1341, 1342, 423, 1473, 1606, /* 850 */ 418, 417, 416, 415, 414, 411, 410, 409, 408, 407, - /* 860 */ 403, 402, 401, 400, 394, 393, 392, 391, 1480, 388, - /* 870 */ 387, 1477, 609, 1760, 1476, 1649, 29, 337, 1356, 1357, - /* 880 */ 1358, 1359, 1360, 1364, 1365, 1366, 1367, 1009, 1010, 1760, - /* 890 */ 1264, 273, 1262, 1475, 1636, 44, 4, 29, 337, 1356, - /* 900 */ 1357, 1358, 1359, 1360, 1364, 1365, 1366, 1367, 1474, 1760, - /* 910 */ 1790, 1473, 1760, 1267, 1268, 1760, 1316, 1317, 1319, 1320, + /* 860 */ 403, 402, 401, 400, 394, 393, 392, 391, 1879, 388, + /* 870 */ 387, 534, 1421, 1422, 1424, 1425, 29, 337, 1356, 1357, + /* 880 */ 1358, 1359, 1360, 1364, 1365, 1366, 1367, 1349, 61, 1760, + /* 890 */ 1264, 608, 1262, 1288, 1649, 1934, 1399, 29, 337, 1356, + /* 900 */ 1357, 1358, 1359, 1360, 1364, 1365, 1366, 1367, 166, 1582, + /* 910 */ 1790, 1472, 1931, 1267, 1268, 1471, 1316, 1317, 1319, 1320, /* 920 */ 1321, 1322, 1323, 1324, 572, 568, 1332, 1333, 1335, 1336, - /* 930 */ 1337, 1338, 1340, 1343, 1760, 147, 1697, 1790, 1808, 1697, - /* 940 */ 279, 1888, 1395, 1395, 217, 135, 577, 173, 1472, 1760, - /* 950 */ 176, 1760, 1760, 576, 277, 60, 1471, 1470, 59, 1469, - /* 960 */ 53, 509, 1318, 33, 32, 1808, 553, 40, 38, 36, - /* 970 */ 35, 34, 1747, 577, 181, 429, 427, 1822, 1760, 77, - /* 980 */ 576, 94, 1791, 579, 1793, 1794, 575, 202, 570, 1760, - /* 990 */ 200, 1868, 54, 553, 245, 306, 1864, 1760, 1760, 1518, - /* 1000 */ 1760, 498, 1398, 557, 1822, 525, 63, 1934, 94, 1791, - /* 1010 */ 579, 1793, 1794, 575, 204, 570, 448, 203, 1868, 361, - /* 1020 */ 167, 483, 306, 1864, 1931, 206, 1272, 208, 205, 525, - /* 1030 */ 207, 336, 335, 1606, 1934, 525, 1513, 525, 525, 1271, - /* 1040 */ 449, 1277, 1934, 560, 93, 1301, 1603, 165, 1735, 506, - /* 1050 */ 1790, 1931, 1339, 350, 1270, 165, 1809, 1606, 485, 1931, - /* 1060 */ 525, 525, 525, 1606, 566, 1606, 1606, 41, 1049, 222, - /* 1070 */ 1898, 510, 228, 521, 525, 1334, 1511, 1502, 1808, 68, - /* 1080 */ 67, 381, 131, 525, 172, 523, 577, 1269, 1606, 1606, - /* 1090 */ 1606, 1760, 134, 576, 524, 135, 51, 1646, 488, 525, - /* 1100 */ 301, 1050, 1606, 369, 525, 367, 363, 359, 356, 353, - /* 1110 */ 262, 1606, 1790, 237, 1212, 346, 226, 1822, 11, 10, - /* 1120 */ 51, 95, 1791, 579, 1793, 1794, 575, 1606, 570, 518, - /* 1130 */ 565, 1868, 1606, 1461, 1462, 330, 1864, 1947, 1781, 230, - /* 1140 */ 1808, 549, 1111, 1420, 168, 5, 1902, 41, 577, 90, - /* 1150 */ 615, 616, 250, 1760, 41, 576, 583, 134, 255, 87, - /* 1160 */ 240, 313, 135, 1275, 1790, 3, 258, 1369, 119, 260, - /* 1170 */ 134, 355, 1068, 1066, 1228, 360, 1274, 269, 175, 1822, - /* 1180 */ 385, 1783, 1286, 95, 1791, 579, 1793, 1794, 575, 1278, - /* 1190 */ 570, 1273, 1808, 1868, 1325, 406, 1353, 330, 1864, 1947, - /* 1200 */ 577, 272, 421, 1139, 1143, 1760, 558, 576, 1925, 1150, - /* 1210 */ 1699, 413, 1281, 1283, 420, 1148, 1790, 138, 422, 426, - /* 1220 */ 428, 430, 1292, 431, 568, 1332, 1333, 1335, 1336, 1337, - /* 1230 */ 1338, 1822, 439, 1294, 184, 95, 1791, 579, 1793, 1794, - /* 1240 */ 575, 442, 570, 1790, 1808, 1868, 443, 186, 561, 330, - /* 1250 */ 1864, 1947, 577, 1293, 444, 1295, 189, 1760, 445, 576, - /* 1260 */ 1887, 447, 191, 451, 72, 73, 195, 470, 472, 1596, - /* 1270 */ 199, 1808, 553, 1592, 201, 140, 141, 1594, 304, 577, - /* 1280 */ 118, 270, 500, 1822, 1760, 1590, 576, 286, 1791, 579, - /* 1290 */ 1793, 1794, 575, 212, 570, 1790, 507, 142, 143, 553, - /* 1300 */ 501, 504, 1740, 533, 215, 511, 519, 132, 219, 271, - /* 1310 */ 1822, 1790, 514, 1934, 286, 1791, 579, 1793, 1794, 575, - /* 1320 */ 536, 570, 322, 1808, 133, 81, 167, 520, 1739, 83, - /* 1330 */ 1931, 577, 1709, 516, 1291, 6, 1760, 1607, 576, 1808, - /* 1340 */ 1934, 324, 1890, 529, 1899, 545, 531, 577, 532, 530, - /* 1350 */ 528, 527, 1760, 165, 576, 235, 1395, 1931, 329, 239, - /* 1360 */ 126, 1290, 1822, 539, 48, 1909, 96, 1791, 579, 1793, - /* 1370 */ 1794, 575, 331, 570, 559, 85, 1868, 246, 1822, 562, - /* 1380 */ 1867, 1864, 96, 1791, 579, 1793, 1794, 575, 249, 570, - /* 1390 */ 1884, 1790, 1868, 1908, 244, 1930, 564, 1864, 1950, 1650, - /* 1400 */ 658, 1790, 581, 274, 1579, 659, 154, 247, 661, 1849, - /* 1410 */ 265, 153, 52, 278, 248, 287, 297, 1754, 276, 1808, - /* 1420 */ 1753, 296, 65, 1752, 1751, 66, 1748, 577, 254, 1808, - /* 1430 */ 357, 556, 1760, 358, 576, 1255, 1256, 577, 257, 171, - /* 1440 */ 563, 362, 1760, 259, 576, 1746, 364, 365, 366, 1745, - /* 1450 */ 1790, 368, 1744, 370, 1743, 372, 1742, 374, 1822, 1231, - /* 1460 */ 1230, 1720, 149, 1791, 579, 1793, 1794, 575, 1822, 570, - /* 1470 */ 1719, 379, 96, 1791, 579, 1793, 1794, 575, 1808, 570, - /* 1480 */ 380, 1718, 1868, 323, 1717, 1200, 577, 1865, 1692, 129, - /* 1490 */ 1691, 1760, 1690, 576, 1689, 69, 1688, 1687, 1686, 1790, - /* 1500 */ 395, 396, 1683, 398, 1682, 1681, 554, 1948, 1685, 1684, - /* 1510 */ 1680, 1790, 1679, 1678, 1677, 1676, 1675, 1822, 1674, 1673, - /* 1520 */ 1672, 295, 1791, 579, 1793, 1794, 575, 1808, 570, 1671, - /* 1530 */ 1670, 1669, 526, 130, 1668, 577, 1667, 1666, 1665, 1808, - /* 1540 */ 1760, 1664, 576, 1663, 1202, 1662, 1661, 577, 1660, 1659, - /* 1550 */ 1533, 179, 1760, 1532, 576, 180, 1530, 1498, 1012, 182, - /* 1560 */ 1790, 1011, 120, 1497, 158, 183, 1822, 121, 1733, 1727, - /* 1570 */ 295, 1791, 579, 1793, 1794, 575, 1790, 570, 1822, 435, - /* 1580 */ 1716, 437, 290, 1791, 579, 1793, 1794, 575, 1808, 570, - /* 1590 */ 188, 1715, 190, 1701, 1585, 1529, 577, 1527, 454, 452, - /* 1600 */ 1525, 1760, 1042, 576, 1808, 453, 456, 457, 1523, 458, - /* 1610 */ 460, 462, 574, 461, 1521, 466, 464, 1760, 1510, 576, - /* 1620 */ 544, 465, 1509, 1494, 1587, 50, 1153, 1822, 198, 1790, - /* 1630 */ 630, 149, 1791, 579, 1793, 1794, 575, 1154, 570, 1586, - /* 1640 */ 1079, 1790, 632, 1822, 1076, 1075, 1519, 294, 1791, 579, - /* 1650 */ 1793, 1794, 575, 1074, 570, 1514, 1841, 1808, 318, 319, - /* 1660 */ 486, 1512, 338, 320, 489, 577, 197, 1493, 1492, 1808, - /* 1670 */ 1760, 1491, 576, 491, 340, 493, 1949, 577, 495, 97, - /* 1680 */ 152, 1732, 1760, 56, 576, 467, 463, 459, 455, 196, - /* 1690 */ 1790, 502, 1237, 1726, 1714, 1712, 1822, 144, 508, 503, - /* 1700 */ 295, 1791, 579, 1793, 1794, 575, 216, 570, 1822, 1713, - /* 1710 */ 1711, 321, 295, 1791, 579, 1793, 1794, 575, 1808, 570, - /* 1720 */ 1710, 75, 1708, 15, 194, 221, 577, 1700, 517, 80, - /* 1730 */ 232, 1760, 227, 576, 79, 229, 82, 1247, 16, 1790, - /* 1740 */ 41, 23, 234, 87, 1435, 47, 242, 243, 236, 1447, - /* 1750 */ 1417, 238, 1781, 1419, 151, 241, 25, 1822, 252, 24, - /* 1760 */ 1790, 280, 1791, 579, 1793, 1794, 575, 1808, 570, 1412, - /* 1770 */ 1392, 86, 46, 1391, 1780, 577, 155, 1452, 18, 1441, - /* 1780 */ 1760, 1446, 576, 332, 1451, 1450, 193, 187, 1808, 192, - /* 1790 */ 45, 333, 10, 446, 1279, 19, 577, 1825, 17, 1354, - /* 1800 */ 569, 1760, 1309, 576, 156, 1329, 1822, 1327, 31, 185, - /* 1810 */ 281, 1791, 579, 1793, 1794, 575, 1326, 570, 580, 13, - /* 1820 */ 12, 1790, 20, 169, 1140, 21, 582, 1822, 341, 1137, - /* 1830 */ 584, 282, 1791, 579, 1793, 1794, 575, 1790, 570, 586, - /* 1840 */ 587, 589, 590, 578, 1134, 1128, 592, 1126, 593, 1808, - /* 1850 */ 595, 596, 1117, 548, 88, 1132, 1131, 577, 1130, 89, - /* 1860 */ 1129, 602, 1760, 1149, 576, 1808, 263, 62, 1145, 1040, - /* 1870 */ 611, 1071, 1070, 577, 1069, 1067, 1065, 1064, 1760, 1063, - /* 1880 */ 576, 127, 1086, 620, 1061, 1060, 264, 1059, 1822, 1058, - /* 1890 */ 1790, 1057, 289, 1791, 579, 1793, 1794, 575, 1056, 570, - /* 1900 */ 548, 553, 1790, 1055, 1822, 1081, 1083, 1052, 291, 1791, - /* 1910 */ 579, 1793, 1794, 575, 1051, 570, 1048, 1047, 1808, 1046, - /* 1920 */ 125, 1045, 1526, 640, 641, 1524, 577, 644, 127, 642, - /* 1930 */ 1808, 1760, 645, 576, 646, 251, 1876, 547, 577, 546, - /* 1940 */ 1522, 648, 1934, 1760, 650, 576, 649, 1520, 553, 652, - /* 1950 */ 653, 1790, 654, 1508, 656, 167, 1002, 1822, 1490, 1931, - /* 1960 */ 267, 283, 1791, 579, 1793, 1794, 575, 125, 570, 1822, - /* 1970 */ 660, 664, 1265, 292, 1791, 579, 1793, 1794, 575, 1808, - /* 1980 */ 570, 275, 251, 1876, 547, 663, 546, 577, 1465, 1934, - /* 1990 */ 1465, 1465, 1760, 1465, 576, 1465, 1465, 1465, 1465, 1465, - /* 2000 */ 1790, 1465, 165, 1465, 1465, 1465, 1931, 1465, 1465, 1465, - /* 2010 */ 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1822, 1465, - /* 2020 */ 1465, 1790, 284, 1791, 579, 1793, 1794, 575, 1808, 570, - /* 2030 */ 1465, 1465, 1465, 1465, 1465, 1465, 577, 1465, 1465, 1465, - /* 2040 */ 1465, 1760, 1465, 576, 1465, 1465, 1465, 1465, 1465, 1808, - /* 2050 */ 1465, 1465, 1465, 1465, 1465, 1465, 1465, 577, 1465, 1465, - /* 2060 */ 1465, 1465, 1760, 1465, 576, 1465, 1465, 1822, 1465, 1465, - /* 2070 */ 1790, 293, 1791, 579, 1793, 1794, 575, 1465, 570, 1465, - /* 2080 */ 1465, 1465, 1790, 1465, 1465, 1465, 1465, 1465, 1822, 1465, - /* 2090 */ 1465, 1465, 285, 1791, 579, 1793, 1794, 575, 1808, 570, - /* 2100 */ 1465, 1465, 1465, 1465, 1465, 1465, 577, 1465, 1465, 1465, - /* 2110 */ 1808, 1760, 1465, 576, 1465, 1465, 1465, 1465, 577, 1465, - /* 2120 */ 1465, 1465, 1465, 1760, 1465, 576, 1465, 1465, 1465, 1465, - /* 2130 */ 1465, 1465, 1465, 1465, 1790, 1465, 1465, 1822, 1465, 1465, - /* 2140 */ 1465, 298, 1791, 579, 1793, 1794, 575, 1465, 570, 1822, - /* 2150 */ 1465, 1790, 1465, 299, 1791, 579, 1793, 1794, 575, 1465, - /* 2160 */ 570, 1465, 1808, 1465, 1465, 1465, 1465, 1465, 1465, 1465, - /* 2170 */ 577, 1465, 1465, 1465, 1465, 1760, 1465, 576, 1465, 1808, - /* 2180 */ 1465, 1465, 1465, 1465, 1465, 1465, 1465, 577, 1465, 1465, - /* 2190 */ 1465, 1465, 1760, 1465, 576, 1465, 1465, 1465, 1465, 1465, - /* 2200 */ 1465, 1822, 1465, 1465, 1790, 1802, 1791, 579, 1793, 1794, - /* 2210 */ 575, 1465, 570, 1465, 1465, 1465, 1465, 1465, 1822, 1465, - /* 2220 */ 1465, 1465, 1801, 1791, 579, 1793, 1794, 575, 1465, 570, - /* 2230 */ 1465, 1465, 1808, 1465, 1465, 1465, 1465, 1465, 1465, 1465, - /* 2240 */ 577, 1465, 1465, 1465, 1465, 1760, 1465, 576, 1465, 1465, - /* 2250 */ 1465, 1465, 1465, 1790, 1465, 1465, 1465, 1465, 1465, 1465, - /* 2260 */ 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1465, - /* 2270 */ 1465, 1822, 1465, 1465, 1465, 1800, 1791, 579, 1793, 1794, - /* 2280 */ 575, 1808, 570, 1465, 1465, 1465, 1465, 1465, 1465, 577, - /* 2290 */ 1465, 1465, 1465, 1465, 1760, 1465, 576, 1465, 1465, 1465, - /* 2300 */ 1465, 1465, 1790, 1465, 1465, 1465, 1465, 1465, 1465, 1465, - /* 2310 */ 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1790, 1465, - /* 2320 */ 1822, 1465, 1465, 1465, 310, 1791, 579, 1793, 1794, 575, - /* 2330 */ 1808, 570, 1465, 1465, 1465, 1465, 1465, 1465, 577, 1465, - /* 2340 */ 1465, 1465, 1465, 1760, 1465, 576, 1808, 1465, 1465, 1465, - /* 2350 */ 1465, 1465, 1465, 1465, 577, 1465, 1465, 1465, 1465, 1760, - /* 2360 */ 1465, 576, 1465, 1465, 1465, 1465, 1465, 1790, 1465, 1822, - /* 2370 */ 1465, 1465, 1465, 309, 1791, 579, 1793, 1794, 575, 1790, - /* 2380 */ 570, 1465, 1465, 1465, 1465, 1822, 1465, 1465, 1465, 311, - /* 2390 */ 1791, 579, 1793, 1794, 575, 1808, 570, 1465, 1465, 1465, - /* 2400 */ 1465, 1465, 1465, 577, 1465, 1465, 1465, 1808, 1760, 1465, - /* 2410 */ 576, 1465, 1465, 1465, 1465, 577, 1465, 1465, 1465, 1465, - /* 2420 */ 1760, 1465, 576, 1465, 1465, 1465, 1465, 1465, 1465, 1465, - /* 2430 */ 1465, 1465, 1465, 1465, 1822, 1465, 1465, 1465, 308, 1791, - /* 2440 */ 579, 1793, 1794, 575, 1465, 570, 1822, 1465, 1465, 1465, - /* 2450 */ 288, 1791, 579, 1793, 1794, 575, 1465, 570, + /* 930 */ 1337, 1338, 1340, 1343, 622, 147, 1578, 1790, 1808, 525, + /* 940 */ 279, 610, 609, 256, 1318, 1649, 577, 1883, 1470, 1469, + /* 950 */ 449, 1760, 1760, 576, 277, 60, 1760, 475, 59, 1291, + /* 960 */ 137, 136, 607, 606, 605, 1808, 553, 1606, 1288, 612, + /* 970 */ 1567, 1878, 135, 577, 181, 429, 427, 1822, 1760, 474, + /* 980 */ 576, 94, 1791, 579, 1793, 1794, 575, 535, 570, 1760, + /* 990 */ 1760, 1868, 1779, 553, 468, 306, 1864, 273, 53, 509, + /* 1000 */ 1636, 1658, 1395, 1774, 1822, 525, 63, 1934, 94, 1791, + /* 1010 */ 579, 1793, 1794, 575, 525, 570, 1603, 1657, 1868, 54, + /* 1020 */ 167, 1747, 306, 1864, 1931, 1735, 1518, 202, 1770, 1776, + /* 1030 */ 200, 336, 335, 1606, 1934, 1461, 1462, 557, 525, 525, + /* 1040 */ 570, 1277, 1606, 1272, 93, 525, 525, 165, 483, 506, + /* 1050 */ 510, 1931, 1339, 560, 1270, 326, 228, 521, 525, 204, + /* 1060 */ 525, 1790, 203, 146, 499, 525, 1606, 1606, 361, 523, + /* 1070 */ 1318, 524, 1608, 1606, 1606, 1334, 262, 41, 222, 68, + /* 1080 */ 67, 381, 342, 525, 172, 1271, 1606, 1269, 1606, 1808, + /* 1090 */ 146, 131, 245, 1606, 346, 206, 233, 577, 205, 1608, + /* 1100 */ 301, 566, 1760, 369, 576, 367, 363, 359, 356, 353, + /* 1110 */ 345, 1606, 1781, 208, 134, 135, 207, 1809, 146, 1513, + /* 1120 */ 1398, 1511, 51, 1790, 1212, 226, 237, 1608, 1822, 555, + /* 1130 */ 565, 51, 95, 1791, 579, 1793, 1794, 575, 518, 570, + /* 1140 */ 41, 485, 1868, 488, 168, 1318, 330, 1864, 1947, 11, + /* 1150 */ 10, 1808, 615, 41, 616, 1783, 350, 1902, 583, 577, + /* 1160 */ 134, 230, 1111, 1502, 1760, 1646, 576, 135, 119, 1420, + /* 1170 */ 134, 1898, 549, 240, 1068, 1790, 1066, 255, 1369, 250, + /* 1180 */ 1275, 258, 260, 3, 5, 355, 313, 1325, 1049, 1278, + /* 1190 */ 1822, 1273, 360, 1228, 95, 1791, 579, 1793, 1794, 575, + /* 1200 */ 272, 570, 269, 1808, 1868, 1139, 1507, 1143, 330, 1864, + /* 1210 */ 1947, 577, 1281, 1283, 1150, 1148, 1760, 138, 576, 1925, + /* 1220 */ 175, 1050, 1274, 1286, 568, 1332, 1333, 1335, 1336, 1337, + /* 1230 */ 1338, 1790, 385, 1353, 406, 1699, 413, 421, 420, 1292, + /* 1240 */ 558, 1790, 1822, 422, 426, 431, 95, 1791, 579, 1793, + /* 1250 */ 1794, 575, 428, 570, 657, 439, 1868, 430, 561, 1808, + /* 1260 */ 330, 1864, 1947, 1294, 442, 443, 184, 577, 1293, 1808, + /* 1270 */ 186, 1887, 1760, 1295, 576, 444, 445, 577, 189, 447, + /* 1280 */ 191, 72, 1760, 73, 576, 451, 470, 553, 195, 472, + /* 1290 */ 1790, 304, 1596, 199, 118, 1592, 1740, 553, 1822, 501, + /* 1300 */ 201, 140, 286, 1791, 579, 1793, 1794, 575, 1822, 570, + /* 1310 */ 141, 1594, 286, 1791, 579, 1793, 1794, 575, 1808, 570, + /* 1320 */ 1590, 142, 143, 212, 270, 500, 577, 215, 1934, 507, + /* 1330 */ 504, 1760, 511, 576, 322, 219, 533, 514, 1934, 132, + /* 1340 */ 1739, 167, 1709, 519, 516, 1931, 133, 324, 81, 520, + /* 1350 */ 1790, 165, 1291, 529, 271, 1931, 83, 1822, 1607, 235, + /* 1360 */ 1790, 96, 1791, 579, 1793, 1794, 575, 1899, 570, 536, + /* 1370 */ 239, 1868, 531, 1909, 6, 564, 1864, 532, 1808, 545, + /* 1380 */ 329, 1908, 539, 530, 528, 244, 577, 1890, 1808, 527, + /* 1390 */ 1395, 1760, 1290, 576, 154, 126, 577, 249, 562, 559, + /* 1400 */ 246, 1760, 48, 576, 1884, 247, 331, 248, 85, 1790, + /* 1410 */ 581, 1650, 1579, 265, 274, 658, 659, 1822, 1930, 661, + /* 1420 */ 52, 149, 1791, 579, 1793, 1794, 575, 1822, 570, 1950, + /* 1430 */ 153, 96, 1791, 579, 1793, 1794, 575, 1808, 570, 556, + /* 1440 */ 1754, 1868, 323, 287, 297, 577, 1865, 1849, 296, 254, + /* 1450 */ 1760, 276, 576, 563, 1753, 278, 257, 259, 65, 1752, + /* 1460 */ 1790, 1751, 66, 1748, 357, 554, 1948, 358, 1255, 1256, + /* 1470 */ 171, 362, 1746, 364, 365, 366, 1822, 1745, 1744, 368, + /* 1480 */ 295, 1791, 579, 1793, 1794, 575, 370, 570, 1808, 1743, + /* 1490 */ 372, 1742, 374, 526, 1231, 1230, 577, 1720, 1719, 379, + /* 1500 */ 380, 1760, 1200, 576, 1718, 1717, 1692, 129, 1691, 1690, + /* 1510 */ 1689, 69, 1790, 1688, 1687, 1686, 1685, 1684, 395, 396, + /* 1520 */ 1683, 398, 1790, 130, 1668, 1667, 1666, 1822, 1682, 1681, + /* 1530 */ 1680, 295, 1791, 579, 1793, 1794, 575, 1679, 570, 1790, + /* 1540 */ 1808, 1678, 1677, 1676, 1675, 1674, 1673, 1672, 577, 1671, + /* 1550 */ 1808, 1670, 1669, 1760, 1665, 576, 1664, 1663, 577, 1662, + /* 1560 */ 1202, 1661, 1660, 1760, 1659, 576, 1533, 1808, 179, 1532, + /* 1570 */ 1530, 1498, 120, 182, 180, 574, 1497, 158, 435, 1822, + /* 1580 */ 1760, 1012, 576, 290, 1791, 579, 1793, 1794, 575, 1822, + /* 1590 */ 570, 190, 1011, 149, 1791, 579, 1793, 1794, 575, 1790, + /* 1600 */ 570, 437, 1733, 183, 121, 1727, 1822, 1716, 1715, 1701, + /* 1610 */ 294, 1791, 579, 1793, 1794, 575, 1790, 570, 188, 1841, + /* 1620 */ 1585, 544, 1042, 1529, 1527, 452, 454, 1808, 1525, 453, + /* 1630 */ 456, 457, 338, 458, 1523, 577, 460, 462, 1949, 461, + /* 1640 */ 1760, 1521, 576, 465, 1808, 464, 1510, 1509, 1494, 340, + /* 1650 */ 466, 1587, 577, 1154, 1153, 1586, 50, 1760, 630, 576, + /* 1660 */ 1079, 1076, 632, 1519, 198, 1075, 1822, 1074, 1514, 1512, + /* 1670 */ 295, 1791, 579, 1793, 1794, 575, 318, 570, 319, 320, + /* 1680 */ 486, 1493, 1492, 1822, 1790, 489, 197, 295, 1791, 579, + /* 1690 */ 1793, 1794, 575, 491, 570, 1491, 493, 495, 97, 1732, + /* 1700 */ 152, 1237, 1790, 1726, 216, 467, 463, 459, 455, 196, + /* 1710 */ 56, 502, 1808, 144, 1714, 1712, 1713, 1711, 1710, 221, + /* 1720 */ 577, 1247, 15, 1708, 227, 1760, 79, 576, 1700, 503, + /* 1730 */ 1808, 321, 508, 80, 232, 517, 229, 87, 577, 41, + /* 1740 */ 47, 75, 16, 1760, 194, 576, 243, 242, 82, 25, + /* 1750 */ 17, 1822, 1435, 23, 234, 280, 1791, 579, 1793, 1794, + /* 1760 */ 575, 1790, 570, 236, 1417, 238, 1781, 1419, 151, 1822, + /* 1770 */ 1412, 252, 241, 281, 1791, 579, 1793, 1794, 575, 24, + /* 1780 */ 570, 86, 46, 1392, 1780, 18, 155, 1447, 1391, 1808, + /* 1790 */ 1446, 1452, 1441, 332, 1451, 1450, 333, 577, 10, 1279, + /* 1800 */ 45, 1825, 1760, 1329, 576, 1354, 193, 187, 13, 192, + /* 1810 */ 1790, 19, 1327, 446, 1326, 156, 569, 169, 31, 12, + /* 1820 */ 20, 1309, 578, 21, 582, 1140, 341, 1137, 1822, 185, + /* 1830 */ 586, 1790, 282, 1791, 579, 1793, 1794, 575, 1808, 570, + /* 1840 */ 584, 580, 587, 589, 1134, 590, 577, 1128, 592, 595, + /* 1850 */ 1117, 1760, 593, 576, 1126, 596, 1132, 1131, 1130, 1808, + /* 1860 */ 1129, 88, 89, 602, 263, 1149, 1145, 577, 62, 1040, + /* 1870 */ 611, 1071, 1760, 1070, 576, 1069, 1067, 1822, 1065, 1086, + /* 1880 */ 1064, 289, 1791, 579, 1793, 1794, 575, 1063, 570, 1790, + /* 1890 */ 620, 264, 1061, 1060, 1059, 1058, 1057, 1056, 1822, 1790, + /* 1900 */ 1055, 1083, 291, 1791, 579, 1793, 1794, 575, 1081, 570, + /* 1910 */ 1052, 1051, 1048, 1047, 1046, 1045, 1526, 1808, 640, 1524, + /* 1920 */ 642, 644, 1522, 646, 648, 577, 641, 1808, 1520, 645, + /* 1930 */ 1760, 652, 576, 650, 649, 577, 654, 1508, 653, 656, + /* 1940 */ 1760, 1002, 576, 1490, 664, 267, 660, 1465, 1265, 275, + /* 1950 */ 663, 1790, 1465, 1465, 1465, 1465, 1822, 1465, 1465, 1465, + /* 1960 */ 283, 1791, 579, 1793, 1794, 575, 1822, 570, 1790, 1465, + /* 1970 */ 292, 1791, 579, 1793, 1794, 575, 1465, 570, 1465, 1808, + /* 1980 */ 1465, 1465, 1465, 1465, 1465, 1465, 1465, 577, 1465, 1465, + /* 1990 */ 1465, 1465, 1760, 1465, 576, 1465, 1808, 1465, 1465, 1465, + /* 2000 */ 1465, 1465, 1465, 1465, 577, 1465, 1465, 1465, 1465, 1760, + /* 2010 */ 1465, 576, 1465, 1465, 1465, 1465, 1465, 1790, 1822, 1465, + /* 2020 */ 1465, 1465, 284, 1791, 579, 1793, 1794, 575, 1465, 570, + /* 2030 */ 1465, 1465, 1465, 1465, 1790, 1822, 1465, 1465, 1465, 293, + /* 2040 */ 1791, 579, 1793, 1794, 575, 1808, 570, 1465, 1465, 1465, + /* 2050 */ 1465, 1465, 1465, 577, 1465, 1465, 1465, 1465, 1760, 1465, + /* 2060 */ 576, 1465, 1808, 1465, 1465, 1465, 1465, 1465, 1465, 1465, + /* 2070 */ 577, 1465, 1465, 1465, 1465, 1760, 1465, 576, 1465, 1465, + /* 2080 */ 1465, 1465, 1465, 1790, 1822, 1465, 1465, 1465, 285, 1791, + /* 2090 */ 579, 1793, 1794, 575, 1465, 570, 1465, 1465, 1465, 1465, + /* 2100 */ 1465, 1822, 1465, 1465, 1465, 298, 1791, 579, 1793, 1794, + /* 2110 */ 575, 1808, 570, 1465, 1465, 1465, 1465, 1465, 1465, 577, + /* 2120 */ 1465, 1465, 1465, 1465, 1760, 1465, 576, 1465, 1465, 1465, + /* 2130 */ 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1790, 1465, 1465, + /* 2140 */ 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1790, 1465, 1465, + /* 2150 */ 1822, 1465, 1465, 1465, 299, 1791, 579, 1793, 1794, 575, + /* 2160 */ 1465, 570, 1465, 1465, 1465, 1808, 1465, 1465, 1465, 1465, + /* 2170 */ 1465, 1465, 1465, 577, 1465, 1808, 1465, 1465, 1760, 1465, + /* 2180 */ 576, 1465, 1465, 577, 1465, 1465, 1465, 1465, 1760, 1465, + /* 2190 */ 576, 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1790, 1465, + /* 2200 */ 1465, 1465, 1465, 1465, 1822, 1465, 1465, 1465, 1802, 1791, + /* 2210 */ 579, 1793, 1794, 575, 1822, 570, 1790, 1465, 1801, 1791, + /* 2220 */ 579, 1793, 1794, 575, 1465, 570, 1808, 1465, 1465, 1465, + /* 2230 */ 1465, 1465, 1465, 1465, 577, 1465, 1465, 1465, 1465, 1760, + /* 2240 */ 1465, 576, 1465, 1465, 1808, 1465, 1465, 1465, 1465, 1465, + /* 2250 */ 1465, 1465, 577, 1465, 1465, 1465, 1465, 1760, 1465, 576, + /* 2260 */ 1465, 1465, 1465, 1465, 1465, 1822, 1465, 1465, 1465, 1800, + /* 2270 */ 1791, 579, 1793, 1794, 575, 1790, 570, 1465, 1465, 1465, + /* 2280 */ 1465, 1465, 1465, 1822, 1465, 1465, 1465, 310, 1791, 579, + /* 2290 */ 1793, 1794, 575, 1465, 570, 1465, 1790, 1465, 1465, 1465, + /* 2300 */ 1465, 1465, 1465, 1808, 1465, 1465, 1465, 1465, 1465, 1465, + /* 2310 */ 1465, 577, 1465, 1465, 1465, 1465, 1760, 1465, 576, 1465, + /* 2320 */ 1465, 1465, 1465, 1465, 1808, 1465, 1465, 1465, 1465, 1465, + /* 2330 */ 1465, 1465, 577, 1465, 1465, 1465, 1465, 1760, 1465, 576, + /* 2340 */ 1465, 1465, 1822, 1465, 1465, 1465, 309, 1791, 579, 1793, + /* 2350 */ 1794, 575, 1790, 570, 1465, 1465, 1465, 1465, 1465, 1465, + /* 2360 */ 1465, 1465, 1790, 1822, 1465, 1465, 1465, 311, 1791, 579, + /* 2370 */ 1793, 1794, 575, 1465, 570, 1465, 1465, 1465, 1465, 1465, + /* 2380 */ 1808, 1465, 1465, 1465, 1465, 1465, 1465, 1465, 577, 1465, + /* 2390 */ 1808, 1465, 1465, 1760, 548, 576, 1465, 1465, 577, 1465, + /* 2400 */ 1465, 1465, 1465, 1760, 1465, 576, 1465, 1465, 1465, 1465, + /* 2410 */ 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1822, + /* 2420 */ 1465, 1465, 127, 308, 1791, 579, 1793, 1794, 575, 1822, + /* 2430 */ 570, 1465, 1465, 288, 1791, 579, 1793, 1794, 575, 1465, + /* 2440 */ 570, 548, 553, 1465, 1465, 1465, 1465, 1465, 1465, 1465, + /* 2450 */ 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1465, + /* 2460 */ 1465, 125, 1465, 1465, 1465, 1465, 1465, 1465, 1465, 127, + /* 2470 */ 1465, 1465, 1465, 1465, 1465, 1465, 251, 1876, 547, 1465, + /* 2480 */ 546, 1465, 1465, 1934, 1465, 1465, 1465, 1465, 1465, 553, + /* 2490 */ 1465, 1465, 1465, 1465, 1465, 1465, 167, 1465, 1465, 1465, + /* 2500 */ 1931, 1465, 1465, 1465, 1465, 1465, 1465, 1465, 125, 1465, + /* 2510 */ 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1465, + /* 2520 */ 1465, 1465, 1465, 251, 1876, 547, 1465, 546, 1465, 1465, + /* 2530 */ 1934, 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1465, 1465, + /* 2540 */ 1465, 1465, 1465, 165, 1465, 1465, 1465, 1931, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 268, 342, 343, 268, 268, 264, 268, 266, 267, 1, - /* 10 */ 2, 279, 12, 13, 279, 302, 303, 279, 286, 316, - /* 20 */ 20, 0, 22, 4, 286, 20, 20, 22, 296, 260, - /* 30 */ 290, 296, 296, 33, 296, 35, 264, 272, 266, 267, - /* 40 */ 35, 301, 21, 290, 20, 24, 25, 26, 27, 28, - /* 50 */ 29, 30, 31, 32, 301, 50, 56, 288, 273, 294, - /* 60 */ 357, 61, 277, 44, 45, 296, 326, 327, 68, 60, - /* 70 */ 301, 335, 303, 370, 12, 13, 14, 374, 338, 326, - /* 80 */ 327, 328, 20, 0, 22, 349, 350, 351, 352, 89, - /* 90 */ 354, 338, 288, 89, 20, 33, 327, 35, 90, 295, - /* 100 */ 331, 332, 333, 334, 335, 336, 21, 338, 304, 299, - /* 110 */ 341, 111, 302, 303, 345, 346, 347, 303, 56, 34, - /* 120 */ 288, 36, 20, 61, 310, 125, 126, 313, 359, 297, - /* 130 */ 68, 12, 13, 14, 15, 16, 367, 8, 9, 274, - /* 140 */ 275, 12, 13, 14, 15, 16, 63, 64, 65, 66, + /* 0 */ 316, 390, 391, 316, 316, 312, 316, 314, 315, 1, + /* 10 */ 2, 327, 12, 13, 327, 350, 351, 327, 334, 364, + /* 20 */ 20, 0, 22, 4, 334, 20, 20, 22, 344, 308, + /* 30 */ 338, 344, 344, 33, 344, 35, 312, 20, 314, 315, + /* 40 */ 35, 349, 21, 338, 20, 24, 25, 26, 27, 28, + /* 50 */ 29, 30, 31, 32, 349, 50, 56, 336, 321, 4, + /* 60 */ 405, 61, 325, 44, 45, 344, 374, 375, 68, 60, + /* 70 */ 349, 383, 351, 418, 12, 13, 14, 422, 386, 374, + /* 80 */ 375, 376, 20, 0, 22, 397, 398, 399, 400, 89, + /* 90 */ 402, 386, 336, 322, 323, 33, 375, 35, 90, 343, + /* 100 */ 379, 380, 381, 382, 383, 384, 21, 386, 352, 347, + /* 110 */ 389, 111, 350, 351, 393, 394, 395, 351, 56, 34, + /* 120 */ 405, 36, 20, 61, 358, 125, 126, 361, 407, 20, + /* 130 */ 68, 125, 126, 418, 8, 9, 415, 422, 12, 13, + /* 140 */ 14, 15, 16, 307, 89, 309, 63, 64, 65, 66, /* 150 */ 67, 89, 69, 70, 71, 72, 73, 74, 75, 76, /* 160 */ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, /* 170 */ 170, 21, 172, 111, 24, 25, 26, 27, 28, 29, - /* 180 */ 30, 31, 32, 56, 288, 89, 35, 125, 126, 120, - /* 190 */ 121, 89, 296, 193, 194, 56, 196, 197, 198, 199, + /* 180 */ 30, 31, 32, 336, 14, 15, 16, 125, 126, 120, + /* 190 */ 121, 344, 316, 193, 194, 60, 196, 197, 198, 199, /* 200 */ 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, - /* 210 */ 210, 211, 212, 213, 0, 88, 8, 9, 91, 68, - /* 220 */ 12, 13, 14, 15, 16, 20, 268, 227, 89, 333, - /* 230 */ 91, 227, 170, 165, 172, 22, 270, 279, 24, 25, - /* 240 */ 26, 27, 28, 29, 30, 31, 32, 178, 35, 0, - /* 250 */ 181, 268, 184, 185, 296, 193, 194, 291, 196, 197, + /* 210 */ 210, 211, 212, 213, 0, 20, 90, 8, 9, 64, + /* 220 */ 65, 12, 13, 14, 15, 16, 71, 227, 381, 353, + /* 230 */ 305, 120, 170, 318, 172, 22, 81, 82, 24, 25, + /* 240 */ 26, 27, 28, 29, 30, 31, 32, 178, 35, 20, + /* 250 */ 181, 22, 43, 56, 339, 193, 194, 308, 196, 197, /* 260 */ 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - /* 270 */ 208, 209, 210, 211, 212, 213, 12, 13, 20, 296, - /* 280 */ 4, 68, 20, 20, 20, 152, 22, 20, 8, 9, - /* 290 */ 268, 162, 12, 13, 14, 15, 16, 33, 90, 35, + /* 270 */ 208, 209, 210, 211, 212, 213, 12, 13, 308, 50, + /* 280 */ 155, 68, 227, 316, 20, 88, 22, 308, 91, 364, + /* 290 */ 179, 180, 0, 308, 327, 121, 364, 33, 349, 35, /* 300 */ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - /* 310 */ 112, 4, 114, 115, 116, 117, 118, 119, 335, 20, - /* 320 */ 56, 22, 101, 227, 111, 61, 19, 305, 20, 227, - /* 330 */ 125, 126, 68, 350, 351, 352, 121, 354, 12, 13, - /* 340 */ 33, 120, 121, 122, 123, 124, 20, 214, 22, 50, - /* 350 */ 101, 89, 265, 89, 47, 268, 89, 224, 51, 33, - /* 360 */ 288, 35, 0, 56, 357, 89, 227, 295, 0, 120, - /* 370 */ 121, 122, 123, 124, 60, 111, 304, 370, 249, 3, - /* 380 */ 290, 374, 56, 170, 259, 172, 261, 272, 287, 125, - /* 390 */ 126, 301, 177, 178, 68, 88, 181, 357, 91, 68, - /* 400 */ 285, 300, 260, 12, 13, 14, 193, 194, 357, 294, - /* 410 */ 370, 20, 260, 22, 374, 89, 326, 327, 328, 100, - /* 420 */ 157, 370, 120, 155, 33, 374, 35, 280, 338, 357, - /* 430 */ 274, 275, 64, 65, 170, 288, 172, 111, 265, 71, - /* 440 */ 288, 268, 370, 301, 297, 20, 374, 56, 296, 81, - /* 450 */ 82, 125, 126, 301, 260, 303, 260, 193, 194, 68, + /* 310 */ 112, 344, 114, 115, 116, 117, 118, 119, 405, 349, + /* 320 */ 56, 336, 0, 68, 111, 61, 336, 405, 349, 344, + /* 330 */ 405, 418, 68, 343, 349, 422, 351, 405, 12, 13, + /* 340 */ 418, 4, 352, 418, 422, 20, 20, 422, 22, 316, + /* 350 */ 418, 177, 178, 89, 422, 181, 19, 232, 233, 33, + /* 360 */ 375, 35, 344, 335, 379, 380, 381, 382, 383, 384, + /* 370 */ 33, 386, 89, 355, 389, 111, 348, 344, 393, 394, + /* 380 */ 395, 20, 56, 170, 47, 172, 77, 100, 51, 125, + /* 390 */ 126, 8, 9, 56, 68, 12, 13, 14, 15, 16, + /* 400 */ 415, 322, 323, 12, 13, 14, 193, 194, 308, 318, + /* 410 */ 68, 20, 308, 22, 89, 89, 383, 12, 13, 14, + /* 420 */ 15, 16, 331, 101, 33, 88, 35, 337, 91, 89, + /* 430 */ 339, 398, 399, 400, 170, 402, 172, 111, 129, 130, + /* 440 */ 336, 364, 120, 121, 122, 123, 124, 56, 344, 349, + /* 450 */ 89, 125, 126, 349, 37, 351, 308, 193, 194, 68, /* 460 */ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, - /* 470 */ 206, 207, 208, 209, 210, 211, 212, 213, 68, 327, - /* 480 */ 89, 179, 180, 331, 332, 333, 334, 335, 336, 337, - /* 490 */ 338, 339, 340, 268, 227, 301, 170, 301, 172, 288, - /* 500 */ 232, 233, 111, 227, 0, 8, 9, 0, 14, 12, - /* 510 */ 13, 14, 15, 16, 20, 304, 125, 126, 289, 193, - /* 520 */ 194, 296, 196, 197, 198, 199, 200, 201, 202, 203, + /* 470 */ 206, 207, 208, 209, 210, 211, 212, 213, 89, 375, + /* 480 */ 89, 320, 405, 379, 380, 381, 382, 383, 384, 385, + /* 490 */ 386, 387, 388, 20, 333, 418, 170, 349, 172, 422, + /* 500 */ 8, 9, 111, 342, 12, 13, 14, 15, 16, 92, + /* 510 */ 227, 94, 95, 308, 97, 364, 125, 126, 101, 193, + /* 520 */ 194, 20, 196, 197, 198, 199, 200, 201, 202, 203, /* 530 */ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - /* 540 */ 43, 8, 9, 289, 2, 12, 13, 14, 15, 16, - /* 550 */ 8, 9, 101, 227, 12, 13, 14, 15, 16, 2, - /* 560 */ 335, 170, 14, 172, 60, 8, 9, 60, 20, 12, - /* 570 */ 13, 14, 15, 16, 123, 350, 351, 352, 312, 354, - /* 580 */ 314, 260, 157, 289, 193, 194, 37, 196, 197, 198, + /* 540 */ 123, 44, 45, 8, 9, 162, 152, 12, 13, 14, + /* 550 */ 15, 16, 227, 227, 349, 316, 405, 337, 169, 336, + /* 560 */ 171, 170, 89, 172, 2, 0, 327, 227, 345, 418, + /* 570 */ 8, 9, 56, 422, 12, 13, 14, 15, 16, 56, + /* 580 */ 308, 308, 90, 344, 193, 194, 337, 196, 197, 198, /* 590 */ 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - /* 600 */ 209, 210, 211, 212, 213, 12, 13, 0, 320, 288, - /* 610 */ 280, 77, 0, 20, 268, 22, 289, 296, 288, 268, - /* 620 */ 244, 257, 301, 90, 303, 279, 33, 297, 35, 89, - /* 630 */ 279, 8, 9, 289, 329, 12, 13, 14, 15, 16, - /* 640 */ 193, 92, 296, 94, 95, 14, 97, 296, 327, 56, - /* 650 */ 101, 20, 331, 332, 333, 334, 335, 336, 353, 338, - /* 660 */ 48, 68, 341, 129, 130, 260, 345, 346, 347, 289, - /* 670 */ 8, 9, 123, 280, 12, 13, 14, 15, 16, 19, - /* 680 */ 316, 288, 89, 236, 237, 238, 239, 240, 367, 289, - /* 690 */ 297, 8, 9, 33, 268, 12, 13, 14, 15, 16, - /* 700 */ 14, 15, 16, 261, 111, 279, 301, 47, 101, 169, - /* 710 */ 288, 171, 52, 53, 54, 55, 56, 295, 125, 126, - /* 720 */ 377, 357, 296, 61, 368, 290, 304, 120, 121, 122, - /* 730 */ 123, 124, 12, 13, 370, 329, 301, 18, 374, 20, - /* 740 */ 20, 260, 22, 268, 61, 197, 27, 298, 88, 30, - /* 750 */ 301, 91, 90, 33, 279, 35, 39, 64, 65, 353, - /* 760 */ 98, 326, 327, 170, 71, 172, 47, 227, 49, 316, - /* 770 */ 51, 296, 316, 338, 81, 82, 56, 260, 4, 316, - /* 780 */ 157, 98, 301, 260, 124, 20, 193, 194, 68, 196, + /* 600 */ 209, 210, 211, 212, 213, 12, 13, 91, 214, 336, + /* 610 */ 364, 377, 89, 20, 91, 22, 227, 344, 224, 308, + /* 620 */ 368, 349, 349, 165, 351, 90, 33, 2, 35, 64, + /* 630 */ 65, 308, 249, 8, 9, 401, 71, 12, 13, 14, + /* 640 */ 15, 16, 184, 185, 14, 337, 81, 82, 375, 56, + /* 650 */ 20, 405, 379, 380, 381, 382, 383, 384, 157, 386, + /* 660 */ 349, 68, 389, 351, 418, 308, 393, 394, 422, 35, + /* 670 */ 8, 9, 349, 361, 12, 13, 14, 15, 16, 19, + /* 680 */ 8, 9, 89, 316, 12, 13, 14, 15, 16, 308, + /* 690 */ 308, 8, 9, 33, 327, 12, 13, 14, 15, 16, + /* 700 */ 227, 360, 68, 362, 111, 313, 349, 47, 316, 344, + /* 710 */ 337, 344, 52, 53, 54, 55, 56, 0, 125, 126, + /* 720 */ 355, 8, 9, 61, 337, 12, 13, 14, 15, 16, + /* 730 */ 349, 349, 12, 13, 316, 337, 316, 18, 308, 20, + /* 740 */ 20, 316, 22, 316, 61, 327, 27, 327, 88, 30, + /* 750 */ 227, 91, 90, 33, 327, 35, 313, 0, 320, 316, + /* 760 */ 98, 14, 344, 170, 344, 172, 47, 20, 49, 344, + /* 770 */ 51, 344, 308, 360, 338, 362, 56, 225, 226, 349, + /* 780 */ 342, 98, 42, 43, 124, 349, 193, 194, 68, 196, /* 790 */ 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, - /* 800 */ 207, 208, 209, 210, 211, 212, 213, 88, 270, 89, - /* 810 */ 357, 268, 277, 357, 152, 303, 156, 329, 301, 100, - /* 820 */ 357, 283, 279, 370, 301, 313, 370, 374, 197, 291, - /* 830 */ 374, 111, 260, 370, 174, 152, 176, 374, 312, 296, - /* 840 */ 314, 353, 276, 323, 278, 125, 126, 128, 260, 269, + /* 800 */ 207, 208, 209, 210, 211, 212, 213, 88, 383, 89, + /* 810 */ 374, 375, 376, 349, 152, 39, 156, 60, 101, 100, + /* 820 */ 89, 316, 386, 398, 399, 400, 336, 402, 193, 157, + /* 830 */ 99, 111, 327, 343, 174, 152, 176, 120, 121, 122, + /* 840 */ 123, 124, 352, 309, 377, 125, 126, 128, 308, 344, /* 850 */ 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - /* 860 */ 141, 142, 143, 144, 145, 146, 147, 148, 260, 150, - /* 870 */ 151, 260, 298, 301, 260, 301, 214, 215, 216, 217, - /* 880 */ 218, 219, 220, 221, 222, 223, 224, 44, 45, 301, - /* 890 */ 170, 281, 172, 260, 284, 42, 43, 214, 215, 216, - /* 900 */ 217, 218, 219, 220, 221, 222, 223, 224, 260, 301, - /* 910 */ 260, 260, 301, 193, 194, 301, 196, 197, 198, 199, + /* 860 */ 141, 142, 143, 144, 145, 146, 147, 148, 401, 150, + /* 870 */ 151, 236, 237, 238, 239, 240, 214, 215, 216, 217, + /* 880 */ 218, 219, 220, 221, 222, 223, 224, 14, 3, 349, + /* 890 */ 170, 346, 172, 20, 349, 405, 4, 214, 215, 216, + /* 900 */ 217, 218, 219, 220, 221, 222, 223, 224, 418, 0, + /* 910 */ 308, 308, 422, 193, 194, 308, 196, 197, 198, 199, /* 920 */ 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, - /* 930 */ 210, 211, 212, 213, 301, 18, 296, 260, 288, 296, - /* 940 */ 23, 225, 226, 226, 56, 43, 296, 307, 260, 301, - /* 950 */ 307, 301, 301, 303, 37, 38, 260, 260, 41, 260, - /* 960 */ 157, 158, 197, 8, 9, 288, 316, 12, 13, 14, - /* 970 */ 15, 16, 0, 296, 57, 58, 59, 327, 301, 91, - /* 980 */ 303, 331, 332, 333, 334, 335, 336, 93, 338, 301, - /* 990 */ 96, 341, 90, 316, 364, 345, 346, 301, 301, 0, - /* 1000 */ 301, 316, 228, 43, 327, 268, 89, 357, 331, 332, - /* 1010 */ 333, 334, 335, 336, 93, 338, 279, 96, 341, 47, - /* 1020 */ 370, 22, 345, 346, 374, 93, 35, 93, 96, 268, - /* 1030 */ 96, 12, 13, 296, 357, 268, 0, 268, 268, 35, - /* 1040 */ 279, 22, 357, 43, 127, 90, 279, 370, 279, 279, - /* 1050 */ 260, 374, 33, 269, 35, 370, 288, 296, 22, 374, - /* 1060 */ 268, 268, 268, 296, 61, 296, 296, 43, 35, 43, - /* 1070 */ 330, 279, 279, 279, 268, 56, 0, 267, 288, 162, - /* 1080 */ 163, 164, 43, 268, 167, 279, 296, 68, 296, 296, - /* 1090 */ 296, 301, 43, 303, 279, 43, 43, 300, 22, 268, - /* 1100 */ 183, 68, 296, 186, 268, 188, 189, 190, 191, 192, - /* 1110 */ 279, 296, 260, 43, 90, 279, 90, 327, 1, 2, - /* 1120 */ 43, 331, 332, 333, 334, 335, 336, 296, 338, 90, - /* 1130 */ 111, 341, 296, 125, 126, 345, 346, 347, 46, 90, - /* 1140 */ 288, 355, 90, 90, 227, 229, 356, 43, 296, 89, - /* 1150 */ 13, 13, 348, 301, 43, 303, 43, 43, 371, 99, - /* 1160 */ 90, 324, 43, 172, 260, 358, 371, 90, 43, 371, - /* 1170 */ 43, 325, 35, 35, 168, 47, 172, 318, 42, 327, - /* 1180 */ 308, 89, 20, 331, 332, 333, 334, 335, 336, 170, - /* 1190 */ 338, 172, 288, 341, 90, 268, 193, 345, 346, 347, - /* 1200 */ 296, 90, 152, 90, 90, 301, 246, 303, 356, 90, - /* 1210 */ 268, 308, 193, 194, 306, 90, 260, 90, 306, 268, - /* 1220 */ 268, 268, 20, 262, 205, 206, 207, 208, 209, 210, - /* 1230 */ 211, 327, 262, 20, 272, 331, 332, 333, 334, 335, - /* 1240 */ 336, 322, 338, 260, 288, 341, 303, 272, 248, 345, - /* 1250 */ 346, 347, 296, 20, 315, 20, 272, 301, 317, 303, - /* 1260 */ 356, 315, 272, 268, 272, 272, 272, 262, 288, 288, - /* 1270 */ 288, 288, 316, 288, 288, 288, 288, 288, 262, 296, - /* 1280 */ 268, 322, 175, 327, 301, 288, 303, 331, 332, 333, - /* 1290 */ 334, 335, 336, 270, 338, 260, 268, 288, 288, 316, - /* 1300 */ 321, 303, 301, 234, 270, 268, 154, 311, 270, 284, - /* 1310 */ 327, 260, 301, 357, 331, 332, 333, 334, 335, 336, - /* 1320 */ 235, 338, 315, 288, 311, 270, 370, 309, 301, 270, - /* 1330 */ 374, 296, 301, 301, 20, 241, 301, 296, 303, 288, - /* 1340 */ 357, 301, 366, 301, 330, 161, 301, 296, 301, 243, - /* 1350 */ 242, 230, 301, 370, 303, 311, 226, 374, 301, 311, - /* 1360 */ 296, 20, 327, 301, 89, 363, 331, 332, 333, 334, - /* 1370 */ 335, 336, 250, 338, 245, 89, 341, 362, 327, 247, - /* 1380 */ 345, 346, 331, 332, 333, 334, 335, 336, 325, 338, - /* 1390 */ 329, 260, 341, 363, 365, 373, 345, 346, 378, 301, - /* 1400 */ 36, 260, 292, 268, 278, 263, 363, 361, 262, 344, - /* 1410 */ 270, 314, 319, 258, 360, 282, 282, 0, 271, 288, - /* 1420 */ 0, 282, 177, 0, 0, 42, 0, 296, 372, 288, - /* 1430 */ 35, 373, 301, 187, 303, 35, 35, 296, 372, 35, - /* 1440 */ 373, 187, 301, 372, 303, 0, 35, 35, 187, 0, - /* 1450 */ 260, 187, 0, 35, 0, 22, 0, 35, 327, 172, - /* 1460 */ 170, 0, 331, 332, 333, 334, 335, 336, 327, 338, - /* 1470 */ 0, 166, 331, 332, 333, 334, 335, 336, 288, 338, - /* 1480 */ 165, 0, 341, 293, 0, 46, 296, 346, 0, 42, - /* 1490 */ 0, 301, 0, 303, 0, 149, 0, 0, 0, 260, - /* 1500 */ 144, 35, 0, 144, 0, 0, 375, 376, 0, 0, - /* 1510 */ 0, 260, 0, 0, 0, 0, 0, 327, 0, 0, - /* 1520 */ 0, 331, 332, 333, 334, 335, 336, 288, 338, 0, - /* 1530 */ 0, 0, 293, 42, 0, 296, 0, 0, 0, 288, - /* 1540 */ 301, 0, 303, 0, 22, 0, 0, 296, 0, 0, - /* 1550 */ 0, 56, 301, 0, 303, 56, 0, 0, 14, 42, - /* 1560 */ 260, 14, 39, 0, 43, 40, 327, 39, 0, 0, - /* 1570 */ 331, 332, 333, 334, 335, 336, 260, 338, 327, 46, - /* 1580 */ 0, 46, 331, 332, 333, 334, 335, 336, 288, 338, - /* 1590 */ 39, 0, 161, 0, 0, 0, 296, 0, 39, 35, - /* 1600 */ 0, 301, 62, 303, 288, 47, 35, 47, 0, 39, - /* 1610 */ 35, 39, 296, 47, 0, 39, 35, 301, 0, 303, - /* 1620 */ 369, 47, 0, 0, 0, 98, 22, 327, 96, 260, - /* 1630 */ 43, 331, 332, 333, 334, 335, 336, 35, 338, 0, - /* 1640 */ 35, 260, 43, 327, 35, 35, 0, 331, 332, 333, - /* 1650 */ 334, 335, 336, 22, 338, 0, 340, 288, 22, 22, - /* 1660 */ 49, 0, 293, 22, 35, 296, 33, 0, 0, 288, - /* 1670 */ 301, 0, 303, 35, 293, 35, 376, 296, 22, 20, - /* 1680 */ 47, 0, 301, 157, 303, 52, 53, 54, 55, 56, - /* 1690 */ 260, 22, 35, 0, 0, 0, 327, 173, 159, 157, - /* 1700 */ 331, 332, 333, 334, 335, 336, 154, 338, 327, 0, - /* 1710 */ 0, 157, 331, 332, 333, 334, 335, 336, 288, 338, - /* 1720 */ 0, 88, 0, 89, 91, 90, 296, 0, 155, 39, - /* 1730 */ 46, 301, 89, 303, 89, 153, 89, 182, 231, 260, - /* 1740 */ 43, 89, 89, 99, 90, 43, 43, 46, 90, 35, - /* 1750 */ 90, 89, 46, 90, 89, 89, 43, 327, 46, 89, - /* 1760 */ 260, 331, 332, 333, 334, 335, 336, 288, 338, 90, - /* 1770 */ 90, 89, 43, 90, 46, 296, 46, 90, 43, 90, - /* 1780 */ 301, 35, 303, 35, 35, 35, 153, 154, 288, 156, - /* 1790 */ 225, 35, 2, 160, 22, 43, 296, 89, 231, 193, - /* 1800 */ 89, 301, 22, 303, 46, 90, 327, 90, 89, 176, - /* 1810 */ 331, 332, 333, 334, 335, 336, 90, 338, 100, 231, - /* 1820 */ 89, 260, 89, 46, 90, 89, 35, 327, 35, 90, - /* 1830 */ 89, 331, 332, 333, 334, 335, 336, 260, 338, 35, - /* 1840 */ 89, 35, 89, 195, 90, 90, 35, 90, 89, 288, - /* 1850 */ 35, 89, 22, 268, 89, 113, 113, 296, 113, 89, - /* 1860 */ 113, 101, 301, 35, 303, 288, 43, 89, 22, 62, - /* 1870 */ 61, 35, 35, 296, 35, 35, 35, 35, 301, 35, - /* 1880 */ 303, 296, 68, 87, 35, 35, 43, 22, 327, 35, - /* 1890 */ 260, 22, 331, 332, 333, 334, 335, 336, 35, 338, - /* 1900 */ 268, 316, 260, 35, 327, 35, 68, 35, 331, 332, - /* 1910 */ 333, 334, 335, 336, 35, 338, 35, 35, 288, 22, - /* 1920 */ 335, 35, 0, 35, 47, 0, 296, 35, 296, 39, - /* 1930 */ 288, 301, 47, 303, 39, 350, 351, 352, 296, 354, - /* 1940 */ 0, 35, 357, 301, 39, 303, 47, 0, 316, 35, - /* 1950 */ 47, 260, 39, 0, 35, 370, 35, 327, 0, 374, - /* 1960 */ 22, 331, 332, 333, 334, 335, 336, 335, 338, 327, - /* 1970 */ 21, 20, 22, 331, 332, 333, 334, 335, 336, 288, - /* 1980 */ 338, 22, 350, 351, 352, 21, 354, 296, 379, 357, - /* 1990 */ 379, 379, 301, 379, 303, 379, 379, 379, 379, 379, - /* 2000 */ 260, 379, 370, 379, 379, 379, 374, 379, 379, 379, - /* 2010 */ 379, 379, 379, 379, 379, 379, 379, 379, 327, 379, - /* 2020 */ 379, 260, 331, 332, 333, 334, 335, 336, 288, 338, - /* 2030 */ 379, 379, 379, 379, 379, 379, 296, 379, 379, 379, - /* 2040 */ 379, 301, 379, 303, 379, 379, 379, 379, 379, 288, - /* 2050 */ 379, 379, 379, 379, 379, 379, 379, 296, 379, 379, - /* 2060 */ 379, 379, 301, 379, 303, 379, 379, 327, 379, 379, - /* 2070 */ 260, 331, 332, 333, 334, 335, 336, 379, 338, 379, - /* 2080 */ 379, 379, 260, 379, 379, 379, 379, 379, 327, 379, - /* 2090 */ 379, 379, 331, 332, 333, 334, 335, 336, 288, 338, - /* 2100 */ 379, 379, 379, 379, 379, 379, 296, 379, 379, 379, - /* 2110 */ 288, 301, 379, 303, 379, 379, 379, 379, 296, 379, - /* 2120 */ 379, 379, 379, 301, 379, 303, 379, 379, 379, 379, - /* 2130 */ 379, 379, 379, 379, 260, 379, 379, 327, 379, 379, - /* 2140 */ 379, 331, 332, 333, 334, 335, 336, 379, 338, 327, - /* 2150 */ 379, 260, 379, 331, 332, 333, 334, 335, 336, 379, - /* 2160 */ 338, 379, 288, 379, 379, 379, 379, 379, 379, 379, - /* 2170 */ 296, 379, 379, 379, 379, 301, 379, 303, 379, 288, - /* 2180 */ 379, 379, 379, 379, 379, 379, 379, 296, 379, 379, - /* 2190 */ 379, 379, 301, 379, 303, 379, 379, 379, 379, 379, - /* 2200 */ 379, 327, 379, 379, 260, 331, 332, 333, 334, 335, - /* 2210 */ 336, 379, 338, 379, 379, 379, 379, 379, 327, 379, - /* 2220 */ 379, 379, 331, 332, 333, 334, 335, 336, 379, 338, - /* 2230 */ 379, 379, 288, 379, 379, 379, 379, 379, 379, 379, - /* 2240 */ 296, 379, 379, 379, 379, 301, 379, 303, 379, 379, - /* 2250 */ 379, 379, 379, 260, 379, 379, 379, 379, 379, 379, - /* 2260 */ 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, - /* 2270 */ 379, 327, 379, 379, 379, 331, 332, 333, 334, 335, - /* 2280 */ 336, 288, 338, 379, 379, 379, 379, 379, 379, 296, - /* 2290 */ 379, 379, 379, 379, 301, 379, 303, 379, 379, 379, - /* 2300 */ 379, 379, 260, 379, 379, 379, 379, 379, 379, 379, - /* 2310 */ 379, 379, 379, 379, 379, 379, 379, 379, 260, 379, - /* 2320 */ 327, 379, 379, 379, 331, 332, 333, 334, 335, 336, - /* 2330 */ 288, 338, 379, 379, 379, 379, 379, 379, 296, 379, - /* 2340 */ 379, 379, 379, 301, 379, 303, 288, 379, 379, 379, - /* 2350 */ 379, 379, 379, 379, 296, 379, 379, 379, 379, 301, - /* 2360 */ 379, 303, 379, 379, 379, 379, 379, 260, 379, 327, - /* 2370 */ 379, 379, 379, 331, 332, 333, 334, 335, 336, 260, - /* 2380 */ 338, 379, 379, 379, 379, 327, 379, 379, 379, 331, - /* 2390 */ 332, 333, 334, 335, 336, 288, 338, 379, 379, 379, - /* 2400 */ 379, 379, 379, 296, 379, 379, 379, 288, 301, 379, - /* 2410 */ 303, 379, 379, 379, 379, 296, 379, 379, 379, 379, - /* 2420 */ 301, 379, 303, 379, 379, 379, 379, 379, 379, 379, - /* 2430 */ 379, 379, 379, 379, 327, 379, 379, 379, 331, 332, - /* 2440 */ 333, 334, 335, 336, 379, 338, 327, 379, 379, 379, - /* 2450 */ 331, 332, 333, 334, 335, 336, 379, 338, + /* 930 */ 210, 211, 212, 213, 324, 18, 326, 308, 336, 316, + /* 940 */ 23, 101, 346, 425, 197, 349, 344, 377, 308, 308, + /* 950 */ 327, 349, 349, 351, 37, 38, 349, 101, 41, 20, + /* 960 */ 120, 121, 122, 123, 124, 336, 364, 344, 20, 60, + /* 970 */ 325, 401, 43, 344, 57, 58, 59, 375, 349, 123, + /* 980 */ 351, 379, 380, 381, 382, 383, 384, 416, 386, 349, + /* 990 */ 349, 389, 338, 364, 317, 393, 394, 329, 157, 158, + /* 1000 */ 332, 336, 226, 349, 375, 316, 89, 405, 379, 380, + /* 1010 */ 381, 382, 383, 384, 316, 386, 327, 352, 389, 90, + /* 1020 */ 418, 0, 393, 394, 422, 327, 0, 93, 374, 375, + /* 1030 */ 96, 12, 13, 344, 405, 125, 126, 43, 316, 316, + /* 1040 */ 386, 22, 344, 35, 127, 316, 316, 418, 22, 327, + /* 1050 */ 327, 422, 33, 43, 35, 328, 327, 327, 316, 93, + /* 1060 */ 316, 308, 96, 336, 371, 316, 344, 344, 47, 327, + /* 1070 */ 197, 327, 345, 344, 344, 56, 327, 43, 43, 162, + /* 1080 */ 163, 164, 328, 316, 167, 35, 344, 68, 344, 336, + /* 1090 */ 336, 43, 412, 344, 327, 93, 157, 344, 96, 345, + /* 1100 */ 183, 61, 349, 186, 351, 188, 189, 190, 191, 192, + /* 1110 */ 328, 344, 46, 93, 43, 43, 96, 336, 336, 0, + /* 1120 */ 228, 0, 43, 308, 90, 90, 43, 345, 375, 244, + /* 1130 */ 111, 43, 379, 380, 381, 382, 383, 384, 90, 386, + /* 1140 */ 43, 22, 389, 22, 227, 197, 393, 394, 395, 1, + /* 1150 */ 2, 336, 13, 43, 13, 89, 317, 404, 43, 344, + /* 1160 */ 43, 90, 90, 315, 349, 348, 351, 43, 43, 90, + /* 1170 */ 43, 378, 403, 90, 35, 308, 35, 419, 90, 396, + /* 1180 */ 172, 419, 419, 406, 229, 373, 372, 90, 35, 170, + /* 1190 */ 375, 172, 47, 168, 379, 380, 381, 382, 383, 384, + /* 1200 */ 90, 386, 366, 336, 389, 90, 0, 90, 393, 394, + /* 1210 */ 395, 344, 193, 194, 90, 90, 349, 90, 351, 404, + /* 1220 */ 42, 68, 172, 20, 205, 206, 207, 208, 209, 210, + /* 1230 */ 211, 308, 356, 193, 316, 316, 356, 152, 354, 20, + /* 1240 */ 246, 308, 375, 354, 316, 310, 379, 380, 381, 382, + /* 1250 */ 383, 384, 316, 386, 48, 310, 389, 316, 248, 336, + /* 1260 */ 393, 394, 395, 20, 370, 351, 320, 344, 20, 336, + /* 1270 */ 320, 404, 349, 20, 351, 363, 365, 344, 320, 363, + /* 1280 */ 320, 320, 349, 320, 351, 316, 310, 364, 320, 336, + /* 1290 */ 308, 310, 336, 336, 316, 336, 349, 364, 375, 369, + /* 1300 */ 336, 336, 379, 380, 381, 382, 383, 384, 375, 386, + /* 1310 */ 336, 336, 379, 380, 381, 382, 383, 384, 336, 386, + /* 1320 */ 336, 336, 336, 318, 370, 175, 344, 318, 405, 316, + /* 1330 */ 351, 349, 316, 351, 363, 318, 234, 349, 405, 359, + /* 1340 */ 349, 418, 349, 154, 349, 422, 359, 349, 318, 357, + /* 1350 */ 308, 418, 20, 349, 332, 422, 318, 375, 344, 359, + /* 1360 */ 308, 379, 380, 381, 382, 383, 384, 378, 386, 235, + /* 1370 */ 359, 389, 349, 411, 241, 393, 394, 349, 336, 161, + /* 1380 */ 349, 411, 349, 243, 242, 413, 344, 414, 336, 230, + /* 1390 */ 226, 349, 20, 351, 411, 344, 344, 373, 247, 245, + /* 1400 */ 410, 349, 89, 351, 377, 409, 250, 408, 89, 308, + /* 1410 */ 340, 349, 326, 318, 316, 36, 311, 375, 421, 310, + /* 1420 */ 367, 379, 380, 381, 382, 383, 384, 375, 386, 426, + /* 1430 */ 362, 379, 380, 381, 382, 383, 384, 336, 386, 421, + /* 1440 */ 0, 389, 341, 330, 330, 344, 394, 392, 330, 420, + /* 1450 */ 349, 319, 351, 421, 0, 306, 420, 420, 177, 0, + /* 1460 */ 308, 0, 42, 0, 35, 423, 424, 187, 35, 35, + /* 1470 */ 35, 187, 0, 35, 35, 187, 375, 0, 0, 187, + /* 1480 */ 379, 380, 381, 382, 383, 384, 35, 386, 336, 0, + /* 1490 */ 22, 0, 35, 341, 172, 170, 344, 0, 0, 166, + /* 1500 */ 165, 349, 46, 351, 0, 0, 0, 42, 0, 0, + /* 1510 */ 0, 149, 308, 0, 0, 0, 0, 0, 144, 35, + /* 1520 */ 0, 144, 308, 42, 0, 0, 0, 375, 0, 0, + /* 1530 */ 0, 379, 380, 381, 382, 383, 384, 0, 386, 308, + /* 1540 */ 336, 0, 0, 0, 0, 0, 0, 0, 344, 0, + /* 1550 */ 336, 0, 0, 349, 0, 351, 0, 0, 344, 0, + /* 1560 */ 22, 0, 0, 349, 0, 351, 0, 336, 56, 0, + /* 1570 */ 0, 0, 39, 42, 56, 344, 0, 43, 46, 375, + /* 1580 */ 349, 14, 351, 379, 380, 381, 382, 383, 384, 375, + /* 1590 */ 386, 161, 14, 379, 380, 381, 382, 383, 384, 308, + /* 1600 */ 386, 46, 0, 40, 39, 0, 375, 0, 0, 0, + /* 1610 */ 379, 380, 381, 382, 383, 384, 308, 386, 39, 388, + /* 1620 */ 0, 417, 62, 0, 0, 35, 39, 336, 0, 47, + /* 1630 */ 35, 47, 341, 39, 0, 344, 35, 39, 424, 47, + /* 1640 */ 349, 0, 351, 47, 336, 35, 0, 0, 0, 341, + /* 1650 */ 39, 0, 344, 35, 22, 0, 98, 349, 43, 351, + /* 1660 */ 35, 35, 43, 0, 96, 35, 375, 22, 0, 0, + /* 1670 */ 379, 380, 381, 382, 383, 384, 22, 386, 22, 22, + /* 1680 */ 49, 0, 0, 375, 308, 35, 33, 379, 380, 381, + /* 1690 */ 382, 383, 384, 35, 386, 0, 35, 22, 20, 0, + /* 1700 */ 47, 35, 308, 0, 154, 52, 53, 54, 55, 56, + /* 1710 */ 157, 22, 336, 173, 0, 0, 0, 0, 0, 90, + /* 1720 */ 344, 182, 89, 0, 89, 349, 89, 351, 0, 157, + /* 1730 */ 336, 157, 159, 39, 46, 155, 153, 99, 344, 43, + /* 1740 */ 43, 88, 231, 349, 91, 351, 46, 43, 89, 43, + /* 1750 */ 231, 375, 90, 89, 89, 379, 380, 381, 382, 383, + /* 1760 */ 384, 308, 386, 90, 90, 89, 46, 90, 89, 375, + /* 1770 */ 90, 46, 89, 379, 380, 381, 382, 383, 384, 89, + /* 1780 */ 386, 89, 43, 90, 46, 43, 46, 35, 90, 336, + /* 1790 */ 35, 90, 90, 35, 35, 35, 35, 344, 2, 22, + /* 1800 */ 225, 89, 349, 90, 351, 193, 153, 154, 231, 156, + /* 1810 */ 308, 43, 90, 160, 90, 46, 89, 46, 89, 89, + /* 1820 */ 89, 22, 195, 89, 35, 90, 35, 90, 375, 176, + /* 1830 */ 35, 308, 379, 380, 381, 382, 383, 384, 336, 386, + /* 1840 */ 89, 100, 89, 35, 90, 89, 344, 90, 35, 35, + /* 1850 */ 22, 349, 89, 351, 90, 89, 113, 113, 113, 336, + /* 1860 */ 113, 89, 89, 101, 43, 35, 22, 344, 89, 62, + /* 1870 */ 61, 35, 349, 35, 351, 35, 35, 375, 35, 68, + /* 1880 */ 35, 379, 380, 381, 382, 383, 384, 35, 386, 308, + /* 1890 */ 87, 43, 35, 35, 22, 35, 22, 35, 375, 308, + /* 1900 */ 35, 68, 379, 380, 381, 382, 383, 384, 35, 386, + /* 1910 */ 35, 35, 35, 35, 22, 35, 0, 336, 35, 0, + /* 1920 */ 39, 35, 0, 39, 35, 344, 47, 336, 0, 47, + /* 1930 */ 349, 35, 351, 39, 47, 344, 39, 0, 47, 35, + /* 1940 */ 349, 35, 351, 0, 20, 22, 21, 427, 22, 22, + /* 1950 */ 21, 308, 427, 427, 427, 427, 375, 427, 427, 427, + /* 1960 */ 379, 380, 381, 382, 383, 384, 375, 386, 308, 427, + /* 1970 */ 379, 380, 381, 382, 383, 384, 427, 386, 427, 336, + /* 1980 */ 427, 427, 427, 427, 427, 427, 427, 344, 427, 427, + /* 1990 */ 427, 427, 349, 427, 351, 427, 336, 427, 427, 427, + /* 2000 */ 427, 427, 427, 427, 344, 427, 427, 427, 427, 349, + /* 2010 */ 427, 351, 427, 427, 427, 427, 427, 308, 375, 427, + /* 2020 */ 427, 427, 379, 380, 381, 382, 383, 384, 427, 386, + /* 2030 */ 427, 427, 427, 427, 308, 375, 427, 427, 427, 379, + /* 2040 */ 380, 381, 382, 383, 384, 336, 386, 427, 427, 427, + /* 2050 */ 427, 427, 427, 344, 427, 427, 427, 427, 349, 427, + /* 2060 */ 351, 427, 336, 427, 427, 427, 427, 427, 427, 427, + /* 2070 */ 344, 427, 427, 427, 427, 349, 427, 351, 427, 427, + /* 2080 */ 427, 427, 427, 308, 375, 427, 427, 427, 379, 380, + /* 2090 */ 381, 382, 383, 384, 427, 386, 427, 427, 427, 427, + /* 2100 */ 427, 375, 427, 427, 427, 379, 380, 381, 382, 383, + /* 2110 */ 384, 336, 386, 427, 427, 427, 427, 427, 427, 344, + /* 2120 */ 427, 427, 427, 427, 349, 427, 351, 427, 427, 427, + /* 2130 */ 427, 427, 427, 427, 427, 427, 427, 308, 427, 427, + /* 2140 */ 427, 427, 427, 427, 427, 427, 427, 308, 427, 427, + /* 2150 */ 375, 427, 427, 427, 379, 380, 381, 382, 383, 384, + /* 2160 */ 427, 386, 427, 427, 427, 336, 427, 427, 427, 427, + /* 2170 */ 427, 427, 427, 344, 427, 336, 427, 427, 349, 427, + /* 2180 */ 351, 427, 427, 344, 427, 427, 427, 427, 349, 427, + /* 2190 */ 351, 427, 427, 427, 427, 427, 427, 427, 308, 427, + /* 2200 */ 427, 427, 427, 427, 375, 427, 427, 427, 379, 380, + /* 2210 */ 381, 382, 383, 384, 375, 386, 308, 427, 379, 380, + /* 2220 */ 381, 382, 383, 384, 427, 386, 336, 427, 427, 427, + /* 2230 */ 427, 427, 427, 427, 344, 427, 427, 427, 427, 349, + /* 2240 */ 427, 351, 427, 427, 336, 427, 427, 427, 427, 427, + /* 2250 */ 427, 427, 344, 427, 427, 427, 427, 349, 427, 351, + /* 2260 */ 427, 427, 427, 427, 427, 375, 427, 427, 427, 379, + /* 2270 */ 380, 381, 382, 383, 384, 308, 386, 427, 427, 427, + /* 2280 */ 427, 427, 427, 375, 427, 427, 427, 379, 380, 381, + /* 2290 */ 382, 383, 384, 427, 386, 427, 308, 427, 427, 427, + /* 2300 */ 427, 427, 427, 336, 427, 427, 427, 427, 427, 427, + /* 2310 */ 427, 344, 427, 427, 427, 427, 349, 427, 351, 427, + /* 2320 */ 427, 427, 427, 427, 336, 427, 427, 427, 427, 427, + /* 2330 */ 427, 427, 344, 427, 427, 427, 427, 349, 427, 351, + /* 2340 */ 427, 427, 375, 427, 427, 427, 379, 380, 381, 382, + /* 2350 */ 383, 384, 308, 386, 427, 427, 427, 427, 427, 427, + /* 2360 */ 427, 427, 308, 375, 427, 427, 427, 379, 380, 381, + /* 2370 */ 382, 383, 384, 427, 386, 427, 427, 427, 427, 427, + /* 2380 */ 336, 427, 427, 427, 427, 427, 427, 427, 344, 427, + /* 2390 */ 336, 427, 427, 349, 316, 351, 427, 427, 344, 427, + /* 2400 */ 427, 427, 427, 349, 427, 351, 427, 427, 427, 427, + /* 2410 */ 427, 427, 427, 427, 427, 427, 427, 427, 427, 375, + /* 2420 */ 427, 427, 344, 379, 380, 381, 382, 383, 384, 375, + /* 2430 */ 386, 427, 427, 379, 380, 381, 382, 383, 384, 427, + /* 2440 */ 386, 316, 364, 427, 427, 427, 427, 427, 427, 427, + /* 2450 */ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, + /* 2460 */ 427, 383, 427, 427, 427, 427, 427, 427, 427, 344, + /* 2470 */ 427, 427, 427, 427, 427, 427, 398, 399, 400, 427, + /* 2480 */ 402, 427, 427, 405, 427, 427, 427, 427, 427, 364, + /* 2490 */ 427, 427, 427, 427, 427, 427, 418, 427, 427, 427, + /* 2500 */ 422, 427, 427, 427, 427, 427, 427, 427, 383, 427, + /* 2510 */ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, + /* 2520 */ 427, 427, 427, 398, 399, 400, 427, 402, 427, 427, + /* 2530 */ 405, 427, 427, 427, 427, 427, 427, 427, 427, 427, + /* 2540 */ 427, 427, 427, 418, 427, 427, 427, 422, }; #define YY_SHIFT_COUNT (665) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (1964) +#define YY_SHIFT_MAX (1943) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 917, 0, 0, 62, 62, 264, 264, 264, 326, 326, /* 10 */ 264, 264, 391, 593, 720, 593, 593, 593, 593, 593, /* 20 */ 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, /* 30 */ 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, - /* 40 */ 593, 593, 102, 102, 262, 262, 262, 1019, 1019, 267, - /* 50 */ 1019, 1019, 540, 139, 4, 96, 4, 6, 6, 19, - /* 60 */ 19, 276, 205, 4, 4, 6, 6, 6, 6, 6, - /* 70 */ 6, 6, 6, 6, 6, 9, 6, 6, 6, 24, - /* 80 */ 6, 6, 74, 6, 6, 74, 258, 6, 74, 74, - /* 90 */ 74, 6, 314, 719, 662, 683, 683, 150, 213, 213, + /* 40 */ 593, 593, 325, 325, 361, 361, 361, 1019, 1019, 473, + /* 50 */ 1019, 1019, 389, 523, 283, 340, 283, 17, 17, 19, + /* 60 */ 19, 55, 6, 283, 283, 17, 17, 17, 17, 17, + /* 70 */ 17, 17, 17, 17, 17, 9, 17, 17, 17, 24, + /* 80 */ 17, 17, 102, 17, 17, 102, 109, 17, 102, 102, + /* 90 */ 102, 17, 135, 719, 662, 683, 683, 150, 213, 213, /* 100 */ 213, 213, 213, 213, 213, 213, 213, 213, 213, 213, - /* 110 */ 213, 213, 213, 213, 213, 213, 213, 549, 693, 205, - /* 120 */ 494, 494, 504, 151, 507, 263, 263, 263, 151, 308, - /* 130 */ 308, 24, 362, 362, 74, 74, 331, 331, 319, 410, - /* 140 */ 198, 198, 198, 198, 198, 198, 198, 660, 21, 129, - /* 150 */ 368, 447, 5, 215, 268, 548, 631, 299, 843, 451, - /* 160 */ 425, 716, 717, 716, 853, 376, 376, 376, 774, 765, - /* 170 */ 916, 1128, 1006, 1136, 1162, 1162, 1136, 1050, 1050, 1162, - /* 180 */ 1162, 1162, 1202, 1202, 1213, 9, 24, 9, 1233, 1235, - /* 190 */ 9, 1233, 9, 9, 9, 1162, 9, 1202, 74, 74, - /* 200 */ 74, 74, 74, 74, 74, 74, 74, 74, 74, 1162, - /* 210 */ 1202, 331, 1213, 314, 1107, 24, 314, 1162, 1162, 1233, - /* 220 */ 314, 1069, 331, 331, 331, 331, 1069, 331, 1152, 314, - /* 230 */ 319, 314, 308, 1314, 331, 1085, 1069, 331, 331, 1085, - /* 240 */ 1069, 331, 331, 74, 1094, 1184, 1085, 1106, 1108, 1121, - /* 250 */ 916, 1130, 308, 1341, 1132, 1129, 1122, 1132, 1129, 1132, - /* 260 */ 1129, 1275, 1286, 331, 410, 1162, 314, 1364, 1202, 2458, - /* 270 */ 2458, 2458, 2458, 2458, 2458, 2458, 83, 1633, 214, 307, - /* 280 */ 208, 497, 533, 542, 557, 623, 955, 249, 280, 280, - /* 290 */ 280, 280, 280, 280, 280, 280, 607, 221, 119, 119, - /* 300 */ 69, 68, 127, 534, 85, 302, 8, 133, 686, 686, - /* 310 */ 686, 686, 902, 972, 894, 921, 932, 934, 999, 1036, - /* 320 */ 1076, 888, 803, 1024, 1026, 1039, 1049, 1052, 1053, 1070, - /* 330 */ 1117, 1008, 960, 1000, 1077, 991, 1004, 1003, 1104, 1092, - /* 340 */ 1111, 1113, 1114, 1119, 1125, 1127, 1060, 1137, 1138, 1033, - /* 350 */ 612, 1417, 1420, 1245, 1423, 1424, 1383, 1426, 1395, 1246, - /* 360 */ 1400, 1401, 1404, 1254, 1445, 1411, 1412, 1261, 1449, 1264, - /* 370 */ 1452, 1418, 1454, 1433, 1456, 1422, 1287, 1290, 1461, 1470, - /* 380 */ 1305, 1315, 1481, 1484, 1439, 1488, 1447, 1490, 1492, 1494, - /* 390 */ 1346, 1496, 1497, 1498, 1508, 1509, 1356, 1466, 1502, 1359, - /* 400 */ 1504, 1505, 1510, 1512, 1513, 1514, 1515, 1516, 1518, 1519, - /* 410 */ 1520, 1529, 1530, 1531, 1491, 1534, 1536, 1537, 1538, 1541, - /* 420 */ 1543, 1522, 1545, 1546, 1548, 1549, 1550, 1495, 1553, 1499, - /* 430 */ 1556, 1557, 1517, 1523, 1521, 1544, 1533, 1547, 1535, 1563, - /* 440 */ 1525, 1528, 1568, 1569, 1580, 1551, 1431, 1591, 1593, 1594, - /* 450 */ 1540, 1595, 1597, 1564, 1558, 1559, 1600, 1571, 1560, 1570, - /* 460 */ 1608, 1575, 1566, 1572, 1614, 1581, 1574, 1576, 1618, 1622, - /* 470 */ 1623, 1624, 1527, 1532, 1602, 1604, 1639, 1605, 1587, 1599, - /* 480 */ 1609, 1610, 1631, 1646, 1636, 1655, 1637, 1611, 1661, 1641, - /* 490 */ 1629, 1667, 1638, 1668, 1640, 1671, 1656, 1659, 1681, 1526, - /* 500 */ 1657, 1693, 1524, 1669, 1542, 1552, 1694, 1695, 1554, 1539, - /* 510 */ 1709, 1710, 1720, 1634, 1635, 1555, 1722, 1643, 1573, 1645, - /* 520 */ 1727, 1690, 1582, 1647, 1644, 1684, 1697, 1507, 1652, 1654, - /* 530 */ 1653, 1658, 1660, 1662, 1702, 1663, 1665, 1666, 1670, 1679, - /* 540 */ 1703, 1701, 1706, 1682, 1713, 1567, 1680, 1683, 1712, 1565, - /* 550 */ 1729, 1728, 1730, 1687, 1735, 1588, 1689, 1714, 1746, 1748, - /* 560 */ 1749, 1750, 1756, 1689, 1790, 1772, 1606, 1752, 1708, 1715, - /* 570 */ 1711, 1717, 1719, 1726, 1758, 1731, 1733, 1777, 1780, 1648, - /* 580 */ 1736, 1718, 1734, 1791, 1793, 1741, 1739, 1804, 1751, 1754, - /* 590 */ 1806, 1753, 1755, 1811, 1759, 1757, 1815, 1762, 1742, 1743, - /* 600 */ 1745, 1747, 1830, 1760, 1765, 1770, 1828, 1778, 1823, 1823, - /* 610 */ 1846, 1807, 1809, 1836, 1837, 1839, 1840, 1841, 1842, 1844, - /* 620 */ 1814, 1796, 1843, 1849, 1850, 1865, 1854, 1869, 1863, 1868, - /* 630 */ 1838, 1587, 1870, 1599, 1872, 1879, 1881, 1882, 1897, 1886, - /* 640 */ 1922, 1888, 1877, 1890, 1925, 1892, 1885, 1895, 1940, 1906, - /* 650 */ 1899, 1905, 1947, 1914, 1903, 1913, 1953, 1919, 1921, 1958, - /* 660 */ 1938, 1949, 1950, 1959, 1964, 1951, + /* 110 */ 213, 213, 213, 213, 213, 213, 213, 417, 155, 6, + /* 120 */ 630, 630, 757, 634, 909, 501, 501, 501, 634, 195, + /* 130 */ 195, 24, 292, 292, 102, 102, 255, 255, 287, 342, + /* 140 */ 198, 198, 198, 198, 198, 198, 198, 660, 21, 383, + /* 150 */ 565, 635, 5, 174, 125, 747, 873, 229, 497, 856, + /* 160 */ 939, 552, 776, 552, 740, 885, 885, 885, 892, 948, + /* 170 */ 955, 1145, 1025, 1178, 1203, 1203, 1178, 1085, 1085, 1203, + /* 180 */ 1203, 1203, 1219, 1219, 1243, 9, 24, 9, 1248, 1253, + /* 190 */ 9, 1248, 9, 9, 9, 1203, 9, 1219, 102, 102, + /* 200 */ 102, 102, 102, 102, 102, 102, 102, 102, 102, 1203, + /* 210 */ 1219, 255, 1243, 135, 1150, 24, 135, 1203, 1203, 1248, + /* 220 */ 135, 1102, 255, 255, 255, 255, 1102, 255, 1189, 135, + /* 230 */ 287, 135, 195, 1332, 255, 1134, 1102, 255, 255, 1134, + /* 240 */ 1102, 255, 255, 102, 1133, 1218, 1134, 1140, 1142, 1159, + /* 250 */ 955, 1164, 195, 1372, 1151, 1154, 1156, 1151, 1154, 1151, + /* 260 */ 1154, 1313, 1319, 255, 342, 1203, 135, 1379, 1219, 2548, + /* 270 */ 2548, 2548, 2548, 2548, 2548, 2548, 83, 1653, 214, 337, + /* 280 */ 126, 209, 492, 562, 625, 672, 535, 322, 713, 713, + /* 290 */ 713, 713, 713, 713, 713, 713, 717, 840, 405, 405, + /* 300 */ 69, 458, 197, 309, 85, 111, 8, 394, 170, 170, + /* 310 */ 170, 170, 929, 1021, 934, 966, 1002, 1020, 1026, 1119, + /* 320 */ 1121, 516, 841, 1034, 1035, 1048, 1071, 1072, 1079, 1083, + /* 330 */ 1148, 910, 994, 1010, 1088, 1008, 1050, 1040, 1097, 1066, + /* 340 */ 1110, 1115, 1117, 1124, 1125, 1127, 731, 1139, 1141, 1153, + /* 350 */ 1206, 1440, 1454, 1281, 1459, 1461, 1420, 1463, 1429, 1280, + /* 360 */ 1433, 1434, 1435, 1284, 1472, 1438, 1439, 1288, 1477, 1292, + /* 370 */ 1478, 1451, 1489, 1468, 1491, 1457, 1322, 1325, 1497, 1498, + /* 380 */ 1333, 1335, 1504, 1505, 1456, 1506, 1465, 1508, 1509, 1510, + /* 390 */ 1362, 1513, 1514, 1515, 1516, 1517, 1374, 1484, 1520, 1377, + /* 400 */ 1528, 1529, 1530, 1537, 1541, 1542, 1543, 1544, 1545, 1546, + /* 410 */ 1547, 1549, 1551, 1552, 1481, 1524, 1525, 1526, 1554, 1556, + /* 420 */ 1557, 1538, 1559, 1561, 1562, 1564, 1566, 1512, 1569, 1518, + /* 430 */ 1570, 1571, 1531, 1533, 1534, 1567, 1532, 1578, 1555, 1576, + /* 440 */ 1563, 1565, 1602, 1605, 1607, 1579, 1430, 1608, 1609, 1620, + /* 450 */ 1560, 1623, 1624, 1590, 1582, 1587, 1628, 1595, 1584, 1594, + /* 460 */ 1634, 1601, 1592, 1598, 1641, 1610, 1596, 1611, 1646, 1647, + /* 470 */ 1648, 1651, 1558, 1568, 1618, 1632, 1655, 1625, 1615, 1619, + /* 480 */ 1626, 1630, 1645, 1663, 1654, 1668, 1656, 1631, 1669, 1657, + /* 490 */ 1650, 1681, 1658, 1682, 1661, 1695, 1675, 1678, 1699, 1553, + /* 500 */ 1666, 1703, 1540, 1689, 1572, 1550, 1714, 1715, 1574, 1573, + /* 510 */ 1716, 1717, 1718, 1633, 1629, 1539, 1723, 1635, 1580, 1637, + /* 520 */ 1728, 1694, 1583, 1659, 1638, 1688, 1696, 1511, 1664, 1662, + /* 530 */ 1665, 1673, 1674, 1676, 1697, 1677, 1679, 1683, 1690, 1680, + /* 540 */ 1704, 1700, 1720, 1692, 1706, 1519, 1693, 1698, 1725, 1575, + /* 550 */ 1739, 1738, 1740, 1701, 1742, 1577, 1702, 1752, 1755, 1758, + /* 560 */ 1759, 1760, 1761, 1702, 1796, 1777, 1612, 1768, 1712, 1713, + /* 570 */ 1727, 1722, 1729, 1724, 1769, 1730, 1731, 1771, 1799, 1627, + /* 580 */ 1734, 1741, 1735, 1789, 1791, 1751, 1737, 1795, 1753, 1754, + /* 590 */ 1808, 1756, 1757, 1813, 1763, 1764, 1814, 1766, 1743, 1744, + /* 600 */ 1745, 1747, 1828, 1762, 1772, 1773, 1830, 1779, 1821, 1821, + /* 610 */ 1844, 1807, 1809, 1836, 1838, 1840, 1841, 1843, 1845, 1852, + /* 620 */ 1811, 1803, 1848, 1857, 1858, 1872, 1860, 1874, 1862, 1865, + /* 630 */ 1833, 1615, 1873, 1619, 1875, 1876, 1877, 1878, 1892, 1880, + /* 640 */ 1916, 1883, 1879, 1881, 1919, 1886, 1882, 1884, 1922, 1889, + /* 650 */ 1887, 1894, 1928, 1896, 1891, 1897, 1937, 1904, 1906, 1943, + /* 660 */ 1923, 1925, 1926, 1927, 1929, 1924, }; #define YY_REDUCE_COUNT (275) -#define YY_REDUCE_MIN (-341) -#define YY_REDUCE_MAX (2119) +#define YY_REDUCE_MIN (-389) +#define YY_REDUCE_MAX (2125) static const short yy_reduce_ofst[] = { - /* 0 */ 364, 650, 677, -231, 321, 790, 852, 904, 956, 983, - /* 10 */ 1035, 1051, 152, 1131, 1141, 1190, 1239, 1251, 1300, 1316, - /* 20 */ 1369, 1381, 1430, 1479, 1500, 1561, 1577, 1630, 1642, 1691, - /* 30 */ 1740, 1761, 1810, 1822, 1874, 1891, 1944, 1993, 2042, 2058, - /* 40 */ 2107, 2119, 1585, 1632, -264, -17, 225, -247, 90, 72, - /* 50 */ -260, 435, -297, 453, 456, 463, 685, -268, -262, -259, - /* 60 */ -228, 7, -190, 40, 51, -265, -42, 346, 351, 426, - /* 70 */ 475, 543, 737, 761, 767, 115, 769, 770, 792, -186, - /* 80 */ 793, 794, 147, 806, 815, -196, -104, 831, 330, 422, - /* 90 */ 393, 836, 538, 22, -341, -341, -341, 125, 142, 194, - /* 100 */ 196, 405, 481, 517, 523, 572, 588, 608, 611, 614, - /* 110 */ 633, 648, 651, 688, 696, 697, 699, 101, -215, -287, - /* 120 */ 87, 173, -235, -135, -34, 305, 406, 488, 156, 640, - /* 130 */ 643, 512, 266, 526, -168, 211, 449, 574, 610, 566, - /* 140 */ 229, 254, 294, 327, 344, 380, 400, 288, 442, 343, - /* 150 */ 535, 356, 580, 520, 630, 768, 768, 784, 810, 797, - /* 160 */ 740, 786, 786, 786, 804, 787, 795, 798, 807, 768, - /* 170 */ 846, 837, 859, 872, 927, 942, 903, 908, 912, 951, - /* 180 */ 952, 953, 961, 970, 919, 962, 943, 975, 939, 941, - /* 190 */ 984, 946, 990, 992, 993, 995, 994, 1005, 980, 981, - /* 200 */ 982, 985, 986, 987, 988, 989, 997, 1009, 1010, 1012, - /* 210 */ 1016, 1001, 959, 1023, 979, 998, 1034, 1028, 1037, 1007, - /* 220 */ 1038, 996, 1011, 1027, 1031, 1032, 1013, 1040, 1018, 1055, - /* 230 */ 1025, 1059, 1041, 1014, 1042, 1002, 1044, 1045, 1047, 1030, - /* 240 */ 1048, 1057, 1062, 768, 976, 1029, 1043, 1015, 1046, 1054, - /* 250 */ 1063, 786, 1064, 1061, 1022, 1056, 1020, 1058, 1066, 1067, - /* 260 */ 1071, 1065, 1110, 1098, 1126, 1135, 1140, 1142, 1146, 1093, - /* 270 */ 1097, 1133, 1134, 1139, 1147, 1155, + /* 0 */ -75, 602, 629, -279, -15, 753, 815, 867, 923, 933, + /* 10 */ 273, 982, 104, 1042, 1052, 1101, 1152, 1204, 1214, 1231, + /* 20 */ 1291, 1308, 1376, 1394, 1453, 1502, 1523, 1581, 1591, 1643, + /* 30 */ 1660, 1709, 1726, 1775, 1829, 1839, 1890, 1908, 1967, 1988, + /* 40 */ 2044, 2054, 2078, 2125, -312, 33, 425, -295, 436, 490, + /* 50 */ -308, 654, -345, -68, 77, 151, 246, -316, -310, -307, + /* 60 */ -276, -285, -238, -87, -78, -313, -33, 239, 367, 418, + /* 70 */ 420, 427, 505, 623, 689, 161, 698, 722, 723, -234, + /* 80 */ 729, 730, 727, 742, 744, -244, -153, 749, 754, -10, + /* 90 */ 782, 767, 91, -124, -389, -389, -389, -164, -51, -30, + /* 100 */ -21, 100, 148, 205, 272, 311, 323, 357, 381, 382, + /* 110 */ 430, 464, 540, 603, 607, 640, 641, 28, -263, -335, + /* 120 */ 392, 443, 438, -229, -85, 234, 467, 570, 79, 18, + /* 130 */ 365, 312, 341, 413, 223, 665, 545, 596, 668, 610, + /* 140 */ 90, 220, 249, 308, 373, 387, 398, 252, 534, 518, + /* 150 */ 645, 571, 677, 693, 680, 781, 781, 839, 848, 817, + /* 160 */ 793, 769, 769, 769, 783, 758, 762, 763, 777, 781, + /* 170 */ 812, 814, 836, 876, 918, 919, 880, 884, 889, 928, + /* 180 */ 936, 941, 935, 945, 894, 946, 914, 950, 912, 911, + /* 190 */ 958, 916, 960, 961, 963, 969, 968, 976, 953, 956, + /* 200 */ 957, 959, 964, 965, 974, 975, 984, 985, 986, 978, + /* 210 */ 981, 947, 954, 1005, 930, 979, 1009, 1013, 1016, 971, + /* 220 */ 1017, 980, 988, 991, 993, 995, 987, 998, 992, 1030, + /* 230 */ 1022, 1038, 1014, 989, 1004, 962, 1000, 1023, 1028, 970, + /* 240 */ 1011, 1031, 1033, 781, 973, 972, 983, 990, 996, 999, + /* 250 */ 1024, 769, 1051, 1027, 997, 1029, 1003, 1018, 1036, 1032, + /* 260 */ 1037, 1055, 1070, 1062, 1086, 1098, 1095, 1105, 1109, 1053, + /* 270 */ 1068, 1113, 1114, 1118, 1132, 1149, }; static const YYACTIONTYPE yy_default[] = { /* 0 */ 1463, 1463, 1463, 1463, 1463, 1463, 1463, 1463, 1463, 1463, @@ -1156,12 +1174,60 @@ static const YYCODETYPE yyFallback[] = { 0, /* OFFSET => nothing */ 0, /* ASC => nothing */ 0, /* NULLS => nothing */ - 0, /* ID => nothing */ - 251, /* NK_BITNOT => ID */ - 251, /* VALUES => ID */ - 251, /* IMPORT => ID */ - 251, /* NK_SEMI => ID */ - 251, /* FILE => ID */ + 0, /* ABORT => nothing */ + 251, /* AFTER => ABORT */ + 251, /* ATTACH => ABORT */ + 251, /* BEFORE => ABORT */ + 251, /* BEGIN => ABORT */ + 251, /* BITAND => ABORT */ + 251, /* BITNOT => ABORT */ + 251, /* BITOR => ABORT */ + 251, /* BLOCKS => ABORT */ + 251, /* CHANGE => ABORT */ + 251, /* COMMA => ABORT */ + 251, /* COMPACT => ABORT */ + 251, /* CONCAT => ABORT */ + 251, /* CONFLICT => ABORT */ + 251, /* COPY => ABORT */ + 251, /* DEFERRED => ABORT */ + 251, /* DELIMITERS => ABORT */ + 251, /* DETACH => ABORT */ + 251, /* DIVIDE => ABORT */ + 251, /* DOT => ABORT */ + 251, /* EACH => ABORT */ + 251, /* END => ABORT */ + 251, /* FAIL => ABORT */ + 251, /* FILE => ABORT */ + 251, /* FOR => ABORT */ + 251, /* GLOB => ABORT */ + 251, /* ID => ABORT */ + 251, /* IMMEDIATE => ABORT */ + 251, /* IMPORT => ABORT */ + 251, /* INITIALLY => ABORT */ + 251, /* INSTEAD => ABORT */ + 251, /* ISNULL => ABORT */ + 251, /* KEY => ABORT */ + 251, /* NK_BITNOT => ABORT */ + 251, /* NK_SEMI => ABORT */ + 251, /* NOTNULL => ABORT */ + 251, /* OF => ABORT */ + 251, /* PLUS => ABORT */ + 251, /* PRIVILEGE => ABORT */ + 251, /* RAISE => ABORT */ + 251, /* REPLACE => ABORT */ + 251, /* RESTRICT => ABORT */ + 251, /* ROW => ABORT */ + 251, /* SEMI => ABORT */ + 251, /* STAR => ABORT */ + 251, /* STATEMENT => ABORT */ + 251, /* STRING => ABORT */ + 251, /* TIMES => ABORT */ + 251, /* UPDATE => ABORT */ + 251, /* VALUES => ABORT */ + 251, /* VARIABLE => ABORT */ + 251, /* VIEW => ABORT */ + 251, /* VNODES => ABORT */ + 251, /* WAL => ABORT */ }; #endif /* YYFALLBACK */ @@ -1500,134 +1566,182 @@ static const char *const yyTokenName[] = { /* 248 */ "OFFSET", /* 249 */ "ASC", /* 250 */ "NULLS", - /* 251 */ "ID", - /* 252 */ "NK_BITNOT", - /* 253 */ "VALUES", - /* 254 */ "IMPORT", - /* 255 */ "NK_SEMI", - /* 256 */ "FILE", - /* 257 */ "cmd", - /* 258 */ "account_options", - /* 259 */ "alter_account_options", - /* 260 */ "literal", - /* 261 */ "alter_account_option", - /* 262 */ "user_name", - /* 263 */ "sysinfo_opt", - /* 264 */ "privileges", - /* 265 */ "priv_level", - /* 266 */ "priv_type_list", - /* 267 */ "priv_type", - /* 268 */ "db_name", - /* 269 */ "dnode_endpoint", - /* 270 */ "not_exists_opt", - /* 271 */ "db_options", - /* 272 */ "exists_opt", - /* 273 */ "alter_db_options", - /* 274 */ "integer_list", - /* 275 */ "variable_list", - /* 276 */ "retention_list", - /* 277 */ "alter_db_option", - /* 278 */ "retention", - /* 279 */ "full_table_name", - /* 280 */ "column_def_list", - /* 281 */ "tags_def_opt", - /* 282 */ "table_options", - /* 283 */ "multi_create_clause", - /* 284 */ "tags_def", - /* 285 */ "multi_drop_clause", - /* 286 */ "alter_table_clause", - /* 287 */ "alter_table_options", - /* 288 */ "column_name", - /* 289 */ "type_name", - /* 290 */ "signed_literal", - /* 291 */ "create_subtable_clause", - /* 292 */ "specific_cols_opt", - /* 293 */ "expression_list", - /* 294 */ "drop_table_clause", - /* 295 */ "col_name_list", - /* 296 */ "table_name", - /* 297 */ "column_def", - /* 298 */ "duration_list", - /* 299 */ "rollup_func_list", - /* 300 */ "alter_table_option", - /* 301 */ "duration_literal", - /* 302 */ "rollup_func_name", - /* 303 */ "function_name", - /* 304 */ "col_name", - /* 305 */ "db_name_cond_opt", - /* 306 */ "like_pattern_opt", - /* 307 */ "table_name_cond", - /* 308 */ "from_db_opt", - /* 309 */ "index_options", - /* 310 */ "func_list", - /* 311 */ "sliding_opt", - /* 312 */ "sma_stream_opt", - /* 313 */ "func", - /* 314 */ "stream_options", - /* 315 */ "topic_name", - /* 316 */ "query_expression", - /* 317 */ "cgroup_name", - /* 318 */ "analyze_opt", - /* 319 */ "explain_options", - /* 320 */ "agg_func_opt", - /* 321 */ "bufsize_opt", - /* 322 */ "stream_name", - /* 323 */ "into_opt", - /* 324 */ "dnode_list", - /* 325 */ "where_clause_opt", - /* 326 */ "signed", - /* 327 */ "literal_func", - /* 328 */ "literal_list", - /* 329 */ "table_alias", - /* 330 */ "column_alias", - /* 331 */ "expression", - /* 332 */ "pseudo_column", - /* 333 */ "column_reference", - /* 334 */ "function_expression", - /* 335 */ "subquery", - /* 336 */ "star_func", - /* 337 */ "star_func_para_list", - /* 338 */ "noarg_func", - /* 339 */ "other_para_list", - /* 340 */ "star_func_para", - /* 341 */ "predicate", - /* 342 */ "compare_op", - /* 343 */ "in_op", - /* 344 */ "in_predicate_value", - /* 345 */ "boolean_value_expression", - /* 346 */ "boolean_primary", - /* 347 */ "common_expression", - /* 348 */ "from_clause_opt", - /* 349 */ "table_reference_list", - /* 350 */ "table_reference", - /* 351 */ "table_primary", - /* 352 */ "joined_table", - /* 353 */ "alias_opt", - /* 354 */ "parenthesized_joined_table", - /* 355 */ "join_type", - /* 356 */ "search_condition", - /* 357 */ "query_specification", - /* 358 */ "set_quantifier_opt", - /* 359 */ "select_list", - /* 360 */ "partition_by_clause_opt", - /* 361 */ "range_opt", - /* 362 */ "every_opt", - /* 363 */ "fill_opt", - /* 364 */ "twindow_clause_opt", - /* 365 */ "group_by_clause_opt", - /* 366 */ "having_clause_opt", - /* 367 */ "select_item", - /* 368 */ "fill_mode", - /* 369 */ "group_by_list", - /* 370 */ "query_expression_body", - /* 371 */ "order_by_clause_opt", - /* 372 */ "slimit_clause_opt", - /* 373 */ "limit_clause_opt", - /* 374 */ "query_primary", - /* 375 */ "sort_specification_list", - /* 376 */ "sort_specification", - /* 377 */ "ordering_specification_opt", - /* 378 */ "null_ordering_opt", + /* 251 */ "ABORT", + /* 252 */ "AFTER", + /* 253 */ "ATTACH", + /* 254 */ "BEFORE", + /* 255 */ "BEGIN", + /* 256 */ "BITAND", + /* 257 */ "BITNOT", + /* 258 */ "BITOR", + /* 259 */ "BLOCKS", + /* 260 */ "CHANGE", + /* 261 */ "COMMA", + /* 262 */ "COMPACT", + /* 263 */ "CONCAT", + /* 264 */ "CONFLICT", + /* 265 */ "COPY", + /* 266 */ "DEFERRED", + /* 267 */ "DELIMITERS", + /* 268 */ "DETACH", + /* 269 */ "DIVIDE", + /* 270 */ "DOT", + /* 271 */ "EACH", + /* 272 */ "END", + /* 273 */ "FAIL", + /* 274 */ "FILE", + /* 275 */ "FOR", + /* 276 */ "GLOB", + /* 277 */ "ID", + /* 278 */ "IMMEDIATE", + /* 279 */ "IMPORT", + /* 280 */ "INITIALLY", + /* 281 */ "INSTEAD", + /* 282 */ "ISNULL", + /* 283 */ "KEY", + /* 284 */ "NK_BITNOT", + /* 285 */ "NK_SEMI", + /* 286 */ "NOTNULL", + /* 287 */ "OF", + /* 288 */ "PLUS", + /* 289 */ "PRIVILEGE", + /* 290 */ "RAISE", + /* 291 */ "REPLACE", + /* 292 */ "RESTRICT", + /* 293 */ "ROW", + /* 294 */ "SEMI", + /* 295 */ "STAR", + /* 296 */ "STATEMENT", + /* 297 */ "STRING", + /* 298 */ "TIMES", + /* 299 */ "UPDATE", + /* 300 */ "VALUES", + /* 301 */ "VARIABLE", + /* 302 */ "VIEW", + /* 303 */ "VNODES", + /* 304 */ "WAL", + /* 305 */ "cmd", + /* 306 */ "account_options", + /* 307 */ "alter_account_options", + /* 308 */ "literal", + /* 309 */ "alter_account_option", + /* 310 */ "user_name", + /* 311 */ "sysinfo_opt", + /* 312 */ "privileges", + /* 313 */ "priv_level", + /* 314 */ "priv_type_list", + /* 315 */ "priv_type", + /* 316 */ "db_name", + /* 317 */ "dnode_endpoint", + /* 318 */ "not_exists_opt", + /* 319 */ "db_options", + /* 320 */ "exists_opt", + /* 321 */ "alter_db_options", + /* 322 */ "integer_list", + /* 323 */ "variable_list", + /* 324 */ "retention_list", + /* 325 */ "alter_db_option", + /* 326 */ "retention", + /* 327 */ "full_table_name", + /* 328 */ "column_def_list", + /* 329 */ "tags_def_opt", + /* 330 */ "table_options", + /* 331 */ "multi_create_clause", + /* 332 */ "tags_def", + /* 333 */ "multi_drop_clause", + /* 334 */ "alter_table_clause", + /* 335 */ "alter_table_options", + /* 336 */ "column_name", + /* 337 */ "type_name", + /* 338 */ "signed_literal", + /* 339 */ "create_subtable_clause", + /* 340 */ "specific_cols_opt", + /* 341 */ "expression_list", + /* 342 */ "drop_table_clause", + /* 343 */ "col_name_list", + /* 344 */ "table_name", + /* 345 */ "column_def", + /* 346 */ "duration_list", + /* 347 */ "rollup_func_list", + /* 348 */ "alter_table_option", + /* 349 */ "duration_literal", + /* 350 */ "rollup_func_name", + /* 351 */ "function_name", + /* 352 */ "col_name", + /* 353 */ "db_name_cond_opt", + /* 354 */ "like_pattern_opt", + /* 355 */ "table_name_cond", + /* 356 */ "from_db_opt", + /* 357 */ "index_options", + /* 358 */ "func_list", + /* 359 */ "sliding_opt", + /* 360 */ "sma_stream_opt", + /* 361 */ "func", + /* 362 */ "stream_options", + /* 363 */ "topic_name", + /* 364 */ "query_expression", + /* 365 */ "cgroup_name", + /* 366 */ "analyze_opt", + /* 367 */ "explain_options", + /* 368 */ "agg_func_opt", + /* 369 */ "bufsize_opt", + /* 370 */ "stream_name", + /* 371 */ "into_opt", + /* 372 */ "dnode_list", + /* 373 */ "where_clause_opt", + /* 374 */ "signed", + /* 375 */ "literal_func", + /* 376 */ "literal_list", + /* 377 */ "table_alias", + /* 378 */ "column_alias", + /* 379 */ "expression", + /* 380 */ "pseudo_column", + /* 381 */ "column_reference", + /* 382 */ "function_expression", + /* 383 */ "subquery", + /* 384 */ "star_func", + /* 385 */ "star_func_para_list", + /* 386 */ "noarg_func", + /* 387 */ "other_para_list", + /* 388 */ "star_func_para", + /* 389 */ "predicate", + /* 390 */ "compare_op", + /* 391 */ "in_op", + /* 392 */ "in_predicate_value", + /* 393 */ "boolean_value_expression", + /* 394 */ "boolean_primary", + /* 395 */ "common_expression", + /* 396 */ "from_clause_opt", + /* 397 */ "table_reference_list", + /* 398 */ "table_reference", + /* 399 */ "table_primary", + /* 400 */ "joined_table", + /* 401 */ "alias_opt", + /* 402 */ "parenthesized_joined_table", + /* 403 */ "join_type", + /* 404 */ "search_condition", + /* 405 */ "query_specification", + /* 406 */ "set_quantifier_opt", + /* 407 */ "select_list", + /* 408 */ "partition_by_clause_opt", + /* 409 */ "range_opt", + /* 410 */ "every_opt", + /* 411 */ "fill_opt", + /* 412 */ "twindow_clause_opt", + /* 413 */ "group_by_clause_opt", + /* 414 */ "having_clause_opt", + /* 415 */ "select_item", + /* 416 */ "fill_mode", + /* 417 */ "group_by_list", + /* 418 */ "query_expression_body", + /* 419 */ "order_by_clause_opt", + /* 420 */ "slimit_clause_opt", + /* 421 */ "limit_clause_opt", + /* 422 */ "query_primary", + /* 423 */ "sort_specification_list", + /* 424 */ "sort_specification", + /* 425 */ "ordering_specification_opt", + /* 426 */ "null_ordering_opt", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -2252,180 +2366,180 @@ static void yy_destructor( */ /********* Begin destructor definitions ***************************************/ /* Default NON-TERMINAL Destructor */ - case 257: /* cmd */ - case 260: /* literal */ - case 271: /* db_options */ - case 273: /* alter_db_options */ - case 278: /* retention */ - case 279: /* full_table_name */ - case 282: /* table_options */ - case 286: /* alter_table_clause */ - case 287: /* alter_table_options */ - case 290: /* signed_literal */ - case 291: /* create_subtable_clause */ - case 294: /* drop_table_clause */ - case 297: /* column_def */ - case 301: /* duration_literal */ - case 302: /* rollup_func_name */ - case 304: /* col_name */ - case 305: /* db_name_cond_opt */ - case 306: /* like_pattern_opt */ - case 307: /* table_name_cond */ - case 308: /* from_db_opt */ - case 309: /* index_options */ - case 311: /* sliding_opt */ - case 312: /* sma_stream_opt */ - case 313: /* func */ - case 314: /* stream_options */ - case 316: /* query_expression */ - case 319: /* explain_options */ - case 323: /* into_opt */ - case 325: /* where_clause_opt */ - case 326: /* signed */ - case 327: /* literal_func */ - case 331: /* expression */ - case 332: /* pseudo_column */ - case 333: /* column_reference */ - case 334: /* function_expression */ - case 335: /* subquery */ - case 340: /* star_func_para */ - case 341: /* predicate */ - case 344: /* in_predicate_value */ - case 345: /* boolean_value_expression */ - case 346: /* boolean_primary */ - case 347: /* common_expression */ - case 348: /* from_clause_opt */ - case 349: /* table_reference_list */ - case 350: /* table_reference */ - case 351: /* table_primary */ - case 352: /* joined_table */ - case 354: /* parenthesized_joined_table */ - case 356: /* search_condition */ - case 357: /* query_specification */ - case 361: /* range_opt */ - case 362: /* every_opt */ - case 363: /* fill_opt */ - case 364: /* twindow_clause_opt */ - case 366: /* having_clause_opt */ - case 367: /* select_item */ - case 370: /* query_expression_body */ - case 372: /* slimit_clause_opt */ - case 373: /* limit_clause_opt */ - case 374: /* query_primary */ - case 376: /* sort_specification */ + case 305: /* cmd */ + case 308: /* literal */ + case 319: /* db_options */ + case 321: /* alter_db_options */ + case 326: /* retention */ + case 327: /* full_table_name */ + case 330: /* table_options */ + case 334: /* alter_table_clause */ + case 335: /* alter_table_options */ + case 338: /* signed_literal */ + case 339: /* create_subtable_clause */ + case 342: /* drop_table_clause */ + case 345: /* column_def */ + case 349: /* duration_literal */ + case 350: /* rollup_func_name */ + case 352: /* col_name */ + case 353: /* db_name_cond_opt */ + case 354: /* like_pattern_opt */ + case 355: /* table_name_cond */ + case 356: /* from_db_opt */ + case 357: /* index_options */ + case 359: /* sliding_opt */ + case 360: /* sma_stream_opt */ + case 361: /* func */ + case 362: /* stream_options */ + case 364: /* query_expression */ + case 367: /* explain_options */ + case 371: /* into_opt */ + case 373: /* where_clause_opt */ + case 374: /* signed */ + case 375: /* literal_func */ + case 379: /* expression */ + case 380: /* pseudo_column */ + case 381: /* column_reference */ + case 382: /* function_expression */ + case 383: /* subquery */ + case 388: /* star_func_para */ + case 389: /* predicate */ + case 392: /* in_predicate_value */ + case 393: /* boolean_value_expression */ + case 394: /* boolean_primary */ + case 395: /* common_expression */ + case 396: /* from_clause_opt */ + case 397: /* table_reference_list */ + case 398: /* table_reference */ + case 399: /* table_primary */ + case 400: /* joined_table */ + case 402: /* parenthesized_joined_table */ + case 404: /* search_condition */ + case 405: /* query_specification */ + case 409: /* range_opt */ + case 410: /* every_opt */ + case 411: /* fill_opt */ + case 412: /* twindow_clause_opt */ + case 414: /* having_clause_opt */ + case 415: /* select_item */ + case 418: /* query_expression_body */ + case 420: /* slimit_clause_opt */ + case 421: /* limit_clause_opt */ + case 422: /* query_primary */ + case 424: /* sort_specification */ { - nodesDestroyNode((yypminor->yy616)); + nodesDestroyNode((yypminor->yy840)); } break; - case 258: /* account_options */ - case 259: /* alter_account_options */ - case 261: /* alter_account_option */ - case 321: /* bufsize_opt */ + case 306: /* account_options */ + case 307: /* alter_account_options */ + case 309: /* alter_account_option */ + case 369: /* bufsize_opt */ { } break; - case 262: /* user_name */ - case 265: /* priv_level */ - case 268: /* db_name */ - case 269: /* dnode_endpoint */ - case 288: /* column_name */ - case 296: /* table_name */ - case 303: /* function_name */ - case 315: /* topic_name */ - case 317: /* cgroup_name */ - case 322: /* stream_name */ - case 329: /* table_alias */ - case 330: /* column_alias */ - case 336: /* star_func */ - case 338: /* noarg_func */ - case 353: /* alias_opt */ + case 310: /* user_name */ + case 313: /* priv_level */ + case 316: /* db_name */ + case 317: /* dnode_endpoint */ + case 336: /* column_name */ + case 344: /* table_name */ + case 351: /* function_name */ + case 363: /* topic_name */ + case 365: /* cgroup_name */ + case 370: /* stream_name */ + case 377: /* table_alias */ + case 378: /* column_alias */ + case 384: /* star_func */ + case 386: /* noarg_func */ + case 401: /* alias_opt */ { } break; - case 263: /* sysinfo_opt */ + case 311: /* sysinfo_opt */ { } break; - case 264: /* privileges */ - case 266: /* priv_type_list */ - case 267: /* priv_type */ + case 312: /* privileges */ + case 314: /* priv_type_list */ + case 315: /* priv_type */ { } break; - case 270: /* not_exists_opt */ - case 272: /* exists_opt */ - case 318: /* analyze_opt */ - case 320: /* agg_func_opt */ - case 358: /* set_quantifier_opt */ + case 318: /* not_exists_opt */ + case 320: /* exists_opt */ + case 366: /* analyze_opt */ + case 368: /* agg_func_opt */ + case 406: /* set_quantifier_opt */ { } break; - case 274: /* integer_list */ - case 275: /* variable_list */ - case 276: /* retention_list */ - case 280: /* column_def_list */ - case 281: /* tags_def_opt */ - case 283: /* multi_create_clause */ - case 284: /* tags_def */ - case 285: /* multi_drop_clause */ - case 292: /* specific_cols_opt */ - case 293: /* expression_list */ - case 295: /* col_name_list */ - case 298: /* duration_list */ - case 299: /* rollup_func_list */ - case 310: /* func_list */ - case 324: /* dnode_list */ - case 328: /* literal_list */ - case 337: /* star_func_para_list */ - case 339: /* other_para_list */ - case 359: /* select_list */ - case 360: /* partition_by_clause_opt */ - case 365: /* group_by_clause_opt */ - case 369: /* group_by_list */ - case 371: /* order_by_clause_opt */ - case 375: /* sort_specification_list */ + case 322: /* integer_list */ + case 323: /* variable_list */ + case 324: /* retention_list */ + case 328: /* column_def_list */ + case 329: /* tags_def_opt */ + case 331: /* multi_create_clause */ + case 332: /* tags_def */ + case 333: /* multi_drop_clause */ + case 340: /* specific_cols_opt */ + case 341: /* expression_list */ + case 343: /* col_name_list */ + case 346: /* duration_list */ + case 347: /* rollup_func_list */ + case 358: /* func_list */ + case 372: /* dnode_list */ + case 376: /* literal_list */ + case 385: /* star_func_para_list */ + case 387: /* other_para_list */ + case 407: /* select_list */ + case 408: /* partition_by_clause_opt */ + case 413: /* group_by_clause_opt */ + case 417: /* group_by_list */ + case 419: /* order_by_clause_opt */ + case 423: /* sort_specification_list */ { - nodesDestroyList((yypminor->yy356)); + nodesDestroyList((yypminor->yy544)); } break; - case 277: /* alter_db_option */ - case 300: /* alter_table_option */ + case 325: /* alter_db_option */ + case 348: /* alter_table_option */ { } break; - case 289: /* type_name */ + case 337: /* type_name */ { } break; - case 342: /* compare_op */ - case 343: /* in_op */ + case 390: /* compare_op */ + case 391: /* in_op */ { } break; - case 355: /* join_type */ + case 403: /* join_type */ { } break; - case 368: /* fill_mode */ + case 416: /* fill_mode */ { } break; - case 377: /* ordering_specification_opt */ + case 425: /* ordering_specification_opt */ { } break; - case 378: /* null_ordering_opt */ + case 426: /* null_ordering_opt */ { } @@ -2724,497 +2838,497 @@ static const struct { YYCODETYPE lhs; /* Symbol on the left-hand side of the rule */ signed char nrhs; /* Negative of the number of RHS symbols in the rule */ } yyRuleInfo[] = { - { 257, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ - { 257, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ - { 258, 0 }, /* (2) account_options ::= */ - { 258, -3 }, /* (3) account_options ::= account_options PPS literal */ - { 258, -3 }, /* (4) account_options ::= account_options TSERIES literal */ - { 258, -3 }, /* (5) account_options ::= account_options STORAGE literal */ - { 258, -3 }, /* (6) account_options ::= account_options STREAMS literal */ - { 258, -3 }, /* (7) account_options ::= account_options QTIME literal */ - { 258, -3 }, /* (8) account_options ::= account_options DBS literal */ - { 258, -3 }, /* (9) account_options ::= account_options USERS literal */ - { 258, -3 }, /* (10) account_options ::= account_options CONNS literal */ - { 258, -3 }, /* (11) account_options ::= account_options STATE literal */ - { 259, -1 }, /* (12) alter_account_options ::= alter_account_option */ - { 259, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ - { 261, -2 }, /* (14) alter_account_option ::= PASS literal */ - { 261, -2 }, /* (15) alter_account_option ::= PPS literal */ - { 261, -2 }, /* (16) alter_account_option ::= TSERIES literal */ - { 261, -2 }, /* (17) alter_account_option ::= STORAGE literal */ - { 261, -2 }, /* (18) alter_account_option ::= STREAMS literal */ - { 261, -2 }, /* (19) alter_account_option ::= QTIME literal */ - { 261, -2 }, /* (20) alter_account_option ::= DBS literal */ - { 261, -2 }, /* (21) alter_account_option ::= USERS literal */ - { 261, -2 }, /* (22) alter_account_option ::= CONNS literal */ - { 261, -2 }, /* (23) alter_account_option ::= STATE literal */ - { 257, -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ - { 257, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ - { 257, -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ - { 257, -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ - { 257, -3 }, /* (28) cmd ::= DROP USER user_name */ - { 263, 0 }, /* (29) sysinfo_opt ::= */ - { 263, -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */ - { 257, -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */ - { 257, -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */ - { 264, -1 }, /* (33) privileges ::= ALL */ - { 264, -1 }, /* (34) privileges ::= priv_type_list */ - { 266, -1 }, /* (35) priv_type_list ::= priv_type */ - { 266, -3 }, /* (36) priv_type_list ::= priv_type_list NK_COMMA priv_type */ - { 267, -1 }, /* (37) priv_type ::= READ */ - { 267, -1 }, /* (38) priv_type ::= WRITE */ - { 265, -3 }, /* (39) priv_level ::= NK_STAR NK_DOT NK_STAR */ - { 265, -3 }, /* (40) priv_level ::= db_name NK_DOT NK_STAR */ - { 257, -3 }, /* (41) cmd ::= CREATE DNODE dnode_endpoint */ - { 257, -5 }, /* (42) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ - { 257, -3 }, /* (43) cmd ::= DROP DNODE NK_INTEGER */ - { 257, -3 }, /* (44) cmd ::= DROP DNODE dnode_endpoint */ - { 257, -4 }, /* (45) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ - { 257, -5 }, /* (46) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ - { 257, -4 }, /* (47) cmd ::= ALTER ALL DNODES NK_STRING */ - { 257, -5 }, /* (48) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ - { 269, -1 }, /* (49) dnode_endpoint ::= NK_STRING */ - { 269, -1 }, /* (50) dnode_endpoint ::= NK_ID */ - { 269, -1 }, /* (51) dnode_endpoint ::= NK_IPTOKEN */ - { 257, -3 }, /* (52) cmd ::= ALTER LOCAL NK_STRING */ - { 257, -4 }, /* (53) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ - { 257, -5 }, /* (54) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ - { 257, -5 }, /* (55) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ - { 257, -5 }, /* (56) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ - { 257, -5 }, /* (57) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ - { 257, -5 }, /* (58) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ - { 257, -5 }, /* (59) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ - { 257, -5 }, /* (60) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ - { 257, -5 }, /* (61) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ - { 257, -5 }, /* (62) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ - { 257, -4 }, /* (63) cmd ::= DROP DATABASE exists_opt db_name */ - { 257, -2 }, /* (64) cmd ::= USE db_name */ - { 257, -4 }, /* (65) cmd ::= ALTER DATABASE db_name alter_db_options */ - { 257, -3 }, /* (66) cmd ::= FLUSH DATABASE db_name */ - { 257, -3 }, /* (67) cmd ::= TRIM DATABASE db_name */ - { 270, -3 }, /* (68) not_exists_opt ::= IF NOT EXISTS */ - { 270, 0 }, /* (69) not_exists_opt ::= */ - { 272, -2 }, /* (70) exists_opt ::= IF EXISTS */ - { 272, 0 }, /* (71) exists_opt ::= */ - { 271, 0 }, /* (72) db_options ::= */ - { 271, -3 }, /* (73) db_options ::= db_options BUFFER NK_INTEGER */ - { 271, -3 }, /* (74) db_options ::= db_options CACHEMODEL NK_STRING */ - { 271, -3 }, /* (75) db_options ::= db_options CACHESIZE NK_INTEGER */ - { 271, -3 }, /* (76) db_options ::= db_options COMP NK_INTEGER */ - { 271, -3 }, /* (77) db_options ::= db_options DURATION NK_INTEGER */ - { 271, -3 }, /* (78) db_options ::= db_options DURATION NK_VARIABLE */ - { 271, -3 }, /* (79) db_options ::= db_options MAXROWS NK_INTEGER */ - { 271, -3 }, /* (80) db_options ::= db_options MINROWS NK_INTEGER */ - { 271, -3 }, /* (81) db_options ::= db_options KEEP integer_list */ - { 271, -3 }, /* (82) db_options ::= db_options KEEP variable_list */ - { 271, -3 }, /* (83) db_options ::= db_options PAGES NK_INTEGER */ - { 271, -3 }, /* (84) db_options ::= db_options PAGESIZE NK_INTEGER */ - { 271, -3 }, /* (85) db_options ::= db_options PRECISION NK_STRING */ - { 271, -3 }, /* (86) db_options ::= db_options REPLICA NK_INTEGER */ - { 271, -3 }, /* (87) db_options ::= db_options STRICT NK_STRING */ - { 271, -3 }, /* (88) db_options ::= db_options VGROUPS NK_INTEGER */ - { 271, -3 }, /* (89) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ - { 271, -3 }, /* (90) db_options ::= db_options RETENTIONS retention_list */ - { 271, -3 }, /* (91) db_options ::= db_options SCHEMALESS NK_INTEGER */ - { 271, -3 }, /* (92) db_options ::= db_options WAL_LEVEL NK_INTEGER */ - { 271, -3 }, /* (93) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ - { 271, -3 }, /* (94) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ - { 271, -4 }, /* (95) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ - { 271, -3 }, /* (96) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ - { 271, -4 }, /* (97) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ - { 271, -3 }, /* (98) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ - { 271, -3 }, /* (99) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ - { 273, -1 }, /* (100) alter_db_options ::= alter_db_option */ - { 273, -2 }, /* (101) alter_db_options ::= alter_db_options alter_db_option */ - { 277, -2 }, /* (102) alter_db_option ::= CACHEMODEL NK_STRING */ - { 277, -2 }, /* (103) alter_db_option ::= CACHESIZE NK_INTEGER */ - { 277, -2 }, /* (104) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ - { 277, -2 }, /* (105) alter_db_option ::= KEEP integer_list */ - { 277, -2 }, /* (106) alter_db_option ::= KEEP variable_list */ - { 277, -2 }, /* (107) alter_db_option ::= WAL_LEVEL NK_INTEGER */ - { 274, -1 }, /* (108) integer_list ::= NK_INTEGER */ - { 274, -3 }, /* (109) integer_list ::= integer_list NK_COMMA NK_INTEGER */ - { 275, -1 }, /* (110) variable_list ::= NK_VARIABLE */ - { 275, -3 }, /* (111) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ - { 276, -1 }, /* (112) retention_list ::= retention */ - { 276, -3 }, /* (113) retention_list ::= retention_list NK_COMMA retention */ - { 278, -3 }, /* (114) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ - { 257, -9 }, /* (115) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ - { 257, -3 }, /* (116) cmd ::= CREATE TABLE multi_create_clause */ - { 257, -9 }, /* (117) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ - { 257, -3 }, /* (118) cmd ::= DROP TABLE multi_drop_clause */ - { 257, -4 }, /* (119) cmd ::= DROP STABLE exists_opt full_table_name */ - { 257, -3 }, /* (120) cmd ::= ALTER TABLE alter_table_clause */ - { 257, -3 }, /* (121) cmd ::= ALTER STABLE alter_table_clause */ - { 286, -2 }, /* (122) alter_table_clause ::= full_table_name alter_table_options */ - { 286, -5 }, /* (123) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ - { 286, -4 }, /* (124) alter_table_clause ::= full_table_name DROP COLUMN column_name */ - { 286, -5 }, /* (125) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ - { 286, -5 }, /* (126) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ - { 286, -5 }, /* (127) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ - { 286, -4 }, /* (128) alter_table_clause ::= full_table_name DROP TAG column_name */ - { 286, -5 }, /* (129) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ - { 286, -5 }, /* (130) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ - { 286, -6 }, /* (131) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ - { 283, -1 }, /* (132) multi_create_clause ::= create_subtable_clause */ - { 283, -2 }, /* (133) multi_create_clause ::= multi_create_clause create_subtable_clause */ - { 291, -10 }, /* (134) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ - { 285, -1 }, /* (135) multi_drop_clause ::= drop_table_clause */ - { 285, -2 }, /* (136) multi_drop_clause ::= multi_drop_clause drop_table_clause */ - { 294, -2 }, /* (137) drop_table_clause ::= exists_opt full_table_name */ - { 292, 0 }, /* (138) specific_cols_opt ::= */ - { 292, -3 }, /* (139) specific_cols_opt ::= NK_LP col_name_list NK_RP */ - { 279, -1 }, /* (140) full_table_name ::= table_name */ - { 279, -3 }, /* (141) full_table_name ::= db_name NK_DOT table_name */ - { 280, -1 }, /* (142) column_def_list ::= column_def */ - { 280, -3 }, /* (143) column_def_list ::= column_def_list NK_COMMA column_def */ - { 297, -2 }, /* (144) column_def ::= column_name type_name */ - { 297, -4 }, /* (145) column_def ::= column_name type_name COMMENT NK_STRING */ - { 289, -1 }, /* (146) type_name ::= BOOL */ - { 289, -1 }, /* (147) type_name ::= TINYINT */ - { 289, -1 }, /* (148) type_name ::= SMALLINT */ - { 289, -1 }, /* (149) type_name ::= INT */ - { 289, -1 }, /* (150) type_name ::= INTEGER */ - { 289, -1 }, /* (151) type_name ::= BIGINT */ - { 289, -1 }, /* (152) type_name ::= FLOAT */ - { 289, -1 }, /* (153) type_name ::= DOUBLE */ - { 289, -4 }, /* (154) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ - { 289, -1 }, /* (155) type_name ::= TIMESTAMP */ - { 289, -4 }, /* (156) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ - { 289, -2 }, /* (157) type_name ::= TINYINT UNSIGNED */ - { 289, -2 }, /* (158) type_name ::= SMALLINT UNSIGNED */ - { 289, -2 }, /* (159) type_name ::= INT UNSIGNED */ - { 289, -2 }, /* (160) type_name ::= BIGINT UNSIGNED */ - { 289, -1 }, /* (161) type_name ::= JSON */ - { 289, -4 }, /* (162) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ - { 289, -1 }, /* (163) type_name ::= MEDIUMBLOB */ - { 289, -1 }, /* (164) type_name ::= BLOB */ - { 289, -4 }, /* (165) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ - { 289, -1 }, /* (166) type_name ::= DECIMAL */ - { 289, -4 }, /* (167) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ - { 289, -6 }, /* (168) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ - { 281, 0 }, /* (169) tags_def_opt ::= */ - { 281, -1 }, /* (170) tags_def_opt ::= tags_def */ - { 284, -4 }, /* (171) tags_def ::= TAGS NK_LP column_def_list NK_RP */ - { 282, 0 }, /* (172) table_options ::= */ - { 282, -3 }, /* (173) table_options ::= table_options COMMENT NK_STRING */ - { 282, -3 }, /* (174) table_options ::= table_options MAX_DELAY duration_list */ - { 282, -3 }, /* (175) table_options ::= table_options WATERMARK duration_list */ - { 282, -5 }, /* (176) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ - { 282, -3 }, /* (177) table_options ::= table_options TTL NK_INTEGER */ - { 282, -5 }, /* (178) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ - { 287, -1 }, /* (179) alter_table_options ::= alter_table_option */ - { 287, -2 }, /* (180) alter_table_options ::= alter_table_options alter_table_option */ - { 300, -2 }, /* (181) alter_table_option ::= COMMENT NK_STRING */ - { 300, -2 }, /* (182) alter_table_option ::= TTL NK_INTEGER */ - { 298, -1 }, /* (183) duration_list ::= duration_literal */ - { 298, -3 }, /* (184) duration_list ::= duration_list NK_COMMA duration_literal */ - { 299, -1 }, /* (185) rollup_func_list ::= rollup_func_name */ - { 299, -3 }, /* (186) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ - { 302, -1 }, /* (187) rollup_func_name ::= function_name */ - { 302, -1 }, /* (188) rollup_func_name ::= FIRST */ - { 302, -1 }, /* (189) rollup_func_name ::= LAST */ - { 295, -1 }, /* (190) col_name_list ::= col_name */ - { 295, -3 }, /* (191) col_name_list ::= col_name_list NK_COMMA col_name */ - { 304, -1 }, /* (192) col_name ::= column_name */ - { 257, -2 }, /* (193) cmd ::= SHOW DNODES */ - { 257, -2 }, /* (194) cmd ::= SHOW USERS */ - { 257, -2 }, /* (195) cmd ::= SHOW DATABASES */ - { 257, -4 }, /* (196) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ - { 257, -4 }, /* (197) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ - { 257, -3 }, /* (198) cmd ::= SHOW db_name_cond_opt VGROUPS */ - { 257, -2 }, /* (199) cmd ::= SHOW MNODES */ - { 257, -2 }, /* (200) cmd ::= SHOW MODULES */ - { 257, -2 }, /* (201) cmd ::= SHOW QNODES */ - { 257, -2 }, /* (202) cmd ::= SHOW FUNCTIONS */ - { 257, -5 }, /* (203) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ - { 257, -2 }, /* (204) cmd ::= SHOW STREAMS */ - { 257, -2 }, /* (205) cmd ::= SHOW ACCOUNTS */ - { 257, -2 }, /* (206) cmd ::= SHOW APPS */ - { 257, -2 }, /* (207) cmd ::= SHOW CONNECTIONS */ - { 257, -2 }, /* (208) cmd ::= SHOW LICENCES */ - { 257, -2 }, /* (209) cmd ::= SHOW GRANTS */ - { 257, -4 }, /* (210) cmd ::= SHOW CREATE DATABASE db_name */ - { 257, -4 }, /* (211) cmd ::= SHOW CREATE TABLE full_table_name */ - { 257, -4 }, /* (212) cmd ::= SHOW CREATE STABLE full_table_name */ - { 257, -2 }, /* (213) cmd ::= SHOW QUERIES */ - { 257, -2 }, /* (214) cmd ::= SHOW SCORES */ - { 257, -2 }, /* (215) cmd ::= SHOW TOPICS */ - { 257, -2 }, /* (216) cmd ::= SHOW VARIABLES */ - { 257, -3 }, /* (217) cmd ::= SHOW LOCAL VARIABLES */ - { 257, -4 }, /* (218) cmd ::= SHOW DNODE NK_INTEGER VARIABLES */ - { 257, -2 }, /* (219) cmd ::= SHOW BNODES */ - { 257, -2 }, /* (220) cmd ::= SHOW SNODES */ - { 257, -2 }, /* (221) cmd ::= SHOW CLUSTER */ - { 257, -2 }, /* (222) cmd ::= SHOW TRANSACTIONS */ - { 257, -4 }, /* (223) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ - { 257, -2 }, /* (224) cmd ::= SHOW CONSUMERS */ - { 257, -2 }, /* (225) cmd ::= SHOW SUBSCRIPTIONS */ - { 257, -5 }, /* (226) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ - { 305, 0 }, /* (227) db_name_cond_opt ::= */ - { 305, -2 }, /* (228) db_name_cond_opt ::= db_name NK_DOT */ - { 306, 0 }, /* (229) like_pattern_opt ::= */ - { 306, -2 }, /* (230) like_pattern_opt ::= LIKE NK_STRING */ - { 307, -1 }, /* (231) table_name_cond ::= table_name */ - { 308, 0 }, /* (232) from_db_opt ::= */ - { 308, -2 }, /* (233) from_db_opt ::= FROM db_name */ - { 257, -8 }, /* (234) cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ - { 257, -4 }, /* (235) cmd ::= DROP INDEX exists_opt full_table_name */ - { 309, -10 }, /* (236) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ - { 309, -12 }, /* (237) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ - { 310, -1 }, /* (238) func_list ::= func */ - { 310, -3 }, /* (239) func_list ::= func_list NK_COMMA func */ - { 313, -4 }, /* (240) func ::= function_name NK_LP expression_list NK_RP */ - { 312, 0 }, /* (241) sma_stream_opt ::= */ - { 312, -3 }, /* (242) sma_stream_opt ::= stream_options WATERMARK duration_literal */ - { 312, -3 }, /* (243) sma_stream_opt ::= stream_options MAX_DELAY duration_literal */ - { 257, -6 }, /* (244) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ - { 257, -7 }, /* (245) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ - { 257, -9 }, /* (246) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ - { 257, -7 }, /* (247) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ - { 257, -9 }, /* (248) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ - { 257, -4 }, /* (249) cmd ::= DROP TOPIC exists_opt topic_name */ - { 257, -7 }, /* (250) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ - { 257, -2 }, /* (251) cmd ::= DESC full_table_name */ - { 257, -2 }, /* (252) cmd ::= DESCRIBE full_table_name */ - { 257, -3 }, /* (253) cmd ::= RESET QUERY CACHE */ - { 257, -4 }, /* (254) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ - { 318, 0 }, /* (255) analyze_opt ::= */ - { 318, -1 }, /* (256) analyze_opt ::= ANALYZE */ - { 319, 0 }, /* (257) explain_options ::= */ - { 319, -3 }, /* (258) explain_options ::= explain_options VERBOSE NK_BOOL */ - { 319, -3 }, /* (259) explain_options ::= explain_options RATIO NK_FLOAT */ - { 257, -10 }, /* (260) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ - { 257, -4 }, /* (261) cmd ::= DROP FUNCTION exists_opt function_name */ - { 320, 0 }, /* (262) agg_func_opt ::= */ - { 320, -1 }, /* (263) agg_func_opt ::= AGGREGATE */ - { 321, 0 }, /* (264) bufsize_opt ::= */ - { 321, -2 }, /* (265) bufsize_opt ::= BUFSIZE NK_INTEGER */ - { 257, -8 }, /* (266) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ - { 257, -4 }, /* (267) cmd ::= DROP STREAM exists_opt stream_name */ - { 323, 0 }, /* (268) into_opt ::= */ - { 323, -2 }, /* (269) into_opt ::= INTO full_table_name */ - { 314, 0 }, /* (270) stream_options ::= */ - { 314, -3 }, /* (271) stream_options ::= stream_options TRIGGER AT_ONCE */ - { 314, -3 }, /* (272) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ - { 314, -4 }, /* (273) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ - { 314, -3 }, /* (274) stream_options ::= stream_options WATERMARK duration_literal */ - { 314, -3 }, /* (275) stream_options ::= stream_options IGNORE EXPIRED */ - { 257, -3 }, /* (276) cmd ::= KILL CONNECTION NK_INTEGER */ - { 257, -3 }, /* (277) cmd ::= KILL QUERY NK_STRING */ - { 257, -3 }, /* (278) cmd ::= KILL TRANSACTION NK_INTEGER */ - { 257, -2 }, /* (279) cmd ::= BALANCE VGROUP */ - { 257, -4 }, /* (280) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ - { 257, -4 }, /* (281) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ - { 257, -3 }, /* (282) cmd ::= SPLIT VGROUP NK_INTEGER */ - { 324, -2 }, /* (283) dnode_list ::= DNODE NK_INTEGER */ - { 324, -3 }, /* (284) dnode_list ::= dnode_list DNODE NK_INTEGER */ - { 257, -4 }, /* (285) cmd ::= DELETE FROM full_table_name where_clause_opt */ - { 257, -1 }, /* (286) cmd ::= query_expression */ - { 257, -7 }, /* (287) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_expression */ - { 257, -4 }, /* (288) cmd ::= INSERT INTO full_table_name query_expression */ - { 260, -1 }, /* (289) literal ::= NK_INTEGER */ - { 260, -1 }, /* (290) literal ::= NK_FLOAT */ - { 260, -1 }, /* (291) literal ::= NK_STRING */ - { 260, -1 }, /* (292) literal ::= NK_BOOL */ - { 260, -2 }, /* (293) literal ::= TIMESTAMP NK_STRING */ - { 260, -1 }, /* (294) literal ::= duration_literal */ - { 260, -1 }, /* (295) literal ::= NULL */ - { 260, -1 }, /* (296) literal ::= NK_QUESTION */ - { 301, -1 }, /* (297) duration_literal ::= NK_VARIABLE */ - { 326, -1 }, /* (298) signed ::= NK_INTEGER */ - { 326, -2 }, /* (299) signed ::= NK_PLUS NK_INTEGER */ - { 326, -2 }, /* (300) signed ::= NK_MINUS NK_INTEGER */ - { 326, -1 }, /* (301) signed ::= NK_FLOAT */ - { 326, -2 }, /* (302) signed ::= NK_PLUS NK_FLOAT */ - { 326, -2 }, /* (303) signed ::= NK_MINUS NK_FLOAT */ - { 290, -1 }, /* (304) signed_literal ::= signed */ - { 290, -1 }, /* (305) signed_literal ::= NK_STRING */ - { 290, -1 }, /* (306) signed_literal ::= NK_BOOL */ - { 290, -2 }, /* (307) signed_literal ::= TIMESTAMP NK_STRING */ - { 290, -1 }, /* (308) signed_literal ::= duration_literal */ - { 290, -1 }, /* (309) signed_literal ::= NULL */ - { 290, -1 }, /* (310) signed_literal ::= literal_func */ - { 290, -1 }, /* (311) signed_literal ::= NK_QUESTION */ - { 328, -1 }, /* (312) literal_list ::= signed_literal */ - { 328, -3 }, /* (313) literal_list ::= literal_list NK_COMMA signed_literal */ - { 268, -1 }, /* (314) db_name ::= NK_ID */ - { 296, -1 }, /* (315) table_name ::= NK_ID */ - { 288, -1 }, /* (316) column_name ::= NK_ID */ - { 303, -1 }, /* (317) function_name ::= NK_ID */ - { 329, -1 }, /* (318) table_alias ::= NK_ID */ - { 330, -1 }, /* (319) column_alias ::= NK_ID */ - { 262, -1 }, /* (320) user_name ::= NK_ID */ - { 315, -1 }, /* (321) topic_name ::= NK_ID */ - { 322, -1 }, /* (322) stream_name ::= NK_ID */ - { 317, -1 }, /* (323) cgroup_name ::= NK_ID */ - { 331, -1 }, /* (324) expression ::= literal */ - { 331, -1 }, /* (325) expression ::= pseudo_column */ - { 331, -1 }, /* (326) expression ::= column_reference */ - { 331, -1 }, /* (327) expression ::= function_expression */ - { 331, -1 }, /* (328) expression ::= subquery */ - { 331, -3 }, /* (329) expression ::= NK_LP expression NK_RP */ - { 331, -2 }, /* (330) expression ::= NK_PLUS expression */ - { 331, -2 }, /* (331) expression ::= NK_MINUS expression */ - { 331, -3 }, /* (332) expression ::= expression NK_PLUS expression */ - { 331, -3 }, /* (333) expression ::= expression NK_MINUS expression */ - { 331, -3 }, /* (334) expression ::= expression NK_STAR expression */ - { 331, -3 }, /* (335) expression ::= expression NK_SLASH expression */ - { 331, -3 }, /* (336) expression ::= expression NK_REM expression */ - { 331, -3 }, /* (337) expression ::= column_reference NK_ARROW NK_STRING */ - { 331, -3 }, /* (338) expression ::= expression NK_BITAND expression */ - { 331, -3 }, /* (339) expression ::= expression NK_BITOR expression */ - { 293, -1 }, /* (340) expression_list ::= expression */ - { 293, -3 }, /* (341) expression_list ::= expression_list NK_COMMA expression */ - { 333, -1 }, /* (342) column_reference ::= column_name */ - { 333, -3 }, /* (343) column_reference ::= table_name NK_DOT column_name */ - { 332, -1 }, /* (344) pseudo_column ::= ROWTS */ - { 332, -1 }, /* (345) pseudo_column ::= TBNAME */ - { 332, -3 }, /* (346) pseudo_column ::= table_name NK_DOT TBNAME */ - { 332, -1 }, /* (347) pseudo_column ::= QSTART */ - { 332, -1 }, /* (348) pseudo_column ::= QEND */ - { 332, -1 }, /* (349) pseudo_column ::= QDURATION */ - { 332, -1 }, /* (350) pseudo_column ::= WSTART */ - { 332, -1 }, /* (351) pseudo_column ::= WEND */ - { 332, -1 }, /* (352) pseudo_column ::= WDURATION */ - { 334, -4 }, /* (353) function_expression ::= function_name NK_LP expression_list NK_RP */ - { 334, -4 }, /* (354) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ - { 334, -6 }, /* (355) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ - { 334, -1 }, /* (356) function_expression ::= literal_func */ - { 327, -3 }, /* (357) literal_func ::= noarg_func NK_LP NK_RP */ - { 327, -1 }, /* (358) literal_func ::= NOW */ - { 338, -1 }, /* (359) noarg_func ::= NOW */ - { 338, -1 }, /* (360) noarg_func ::= TODAY */ - { 338, -1 }, /* (361) noarg_func ::= TIMEZONE */ - { 338, -1 }, /* (362) noarg_func ::= DATABASE */ - { 338, -1 }, /* (363) noarg_func ::= CLIENT_VERSION */ - { 338, -1 }, /* (364) noarg_func ::= SERVER_VERSION */ - { 338, -1 }, /* (365) noarg_func ::= SERVER_STATUS */ - { 338, -1 }, /* (366) noarg_func ::= CURRENT_USER */ - { 338, -1 }, /* (367) noarg_func ::= USER */ - { 336, -1 }, /* (368) star_func ::= COUNT */ - { 336, -1 }, /* (369) star_func ::= FIRST */ - { 336, -1 }, /* (370) star_func ::= LAST */ - { 336, -1 }, /* (371) star_func ::= LAST_ROW */ - { 337, -1 }, /* (372) star_func_para_list ::= NK_STAR */ - { 337, -1 }, /* (373) star_func_para_list ::= other_para_list */ - { 339, -1 }, /* (374) other_para_list ::= star_func_para */ - { 339, -3 }, /* (375) other_para_list ::= other_para_list NK_COMMA star_func_para */ - { 340, -1 }, /* (376) star_func_para ::= expression */ - { 340, -3 }, /* (377) star_func_para ::= table_name NK_DOT NK_STAR */ - { 341, -3 }, /* (378) predicate ::= expression compare_op expression */ - { 341, -5 }, /* (379) predicate ::= expression BETWEEN expression AND expression */ - { 341, -6 }, /* (380) predicate ::= expression NOT BETWEEN expression AND expression */ - { 341, -3 }, /* (381) predicate ::= expression IS NULL */ - { 341, -4 }, /* (382) predicate ::= expression IS NOT NULL */ - { 341, -3 }, /* (383) predicate ::= expression in_op in_predicate_value */ - { 342, -1 }, /* (384) compare_op ::= NK_LT */ - { 342, -1 }, /* (385) compare_op ::= NK_GT */ - { 342, -1 }, /* (386) compare_op ::= NK_LE */ - { 342, -1 }, /* (387) compare_op ::= NK_GE */ - { 342, -1 }, /* (388) compare_op ::= NK_NE */ - { 342, -1 }, /* (389) compare_op ::= NK_EQ */ - { 342, -1 }, /* (390) compare_op ::= LIKE */ - { 342, -2 }, /* (391) compare_op ::= NOT LIKE */ - { 342, -1 }, /* (392) compare_op ::= MATCH */ - { 342, -1 }, /* (393) compare_op ::= NMATCH */ - { 342, -1 }, /* (394) compare_op ::= CONTAINS */ - { 343, -1 }, /* (395) in_op ::= IN */ - { 343, -2 }, /* (396) in_op ::= NOT IN */ - { 344, -3 }, /* (397) in_predicate_value ::= NK_LP literal_list NK_RP */ - { 345, -1 }, /* (398) boolean_value_expression ::= boolean_primary */ - { 345, -2 }, /* (399) boolean_value_expression ::= NOT boolean_primary */ - { 345, -3 }, /* (400) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ - { 345, -3 }, /* (401) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ - { 346, -1 }, /* (402) boolean_primary ::= predicate */ - { 346, -3 }, /* (403) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ - { 347, -1 }, /* (404) common_expression ::= expression */ - { 347, -1 }, /* (405) common_expression ::= boolean_value_expression */ - { 348, 0 }, /* (406) from_clause_opt ::= */ - { 348, -2 }, /* (407) from_clause_opt ::= FROM table_reference_list */ - { 349, -1 }, /* (408) table_reference_list ::= table_reference */ - { 349, -3 }, /* (409) table_reference_list ::= table_reference_list NK_COMMA table_reference */ - { 350, -1 }, /* (410) table_reference ::= table_primary */ - { 350, -1 }, /* (411) table_reference ::= joined_table */ - { 351, -2 }, /* (412) table_primary ::= table_name alias_opt */ - { 351, -4 }, /* (413) table_primary ::= db_name NK_DOT table_name alias_opt */ - { 351, -2 }, /* (414) table_primary ::= subquery alias_opt */ - { 351, -1 }, /* (415) table_primary ::= parenthesized_joined_table */ - { 353, 0 }, /* (416) alias_opt ::= */ - { 353, -1 }, /* (417) alias_opt ::= table_alias */ - { 353, -2 }, /* (418) alias_opt ::= AS table_alias */ - { 354, -3 }, /* (419) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ - { 354, -3 }, /* (420) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ - { 352, -6 }, /* (421) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ - { 355, 0 }, /* (422) join_type ::= */ - { 355, -1 }, /* (423) join_type ::= INNER */ - { 357, -12 }, /* (424) query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ - { 358, 0 }, /* (425) set_quantifier_opt ::= */ - { 358, -1 }, /* (426) set_quantifier_opt ::= DISTINCT */ - { 358, -1 }, /* (427) set_quantifier_opt ::= ALL */ - { 359, -1 }, /* (428) select_list ::= select_item */ - { 359, -3 }, /* (429) select_list ::= select_list NK_COMMA select_item */ - { 367, -1 }, /* (430) select_item ::= NK_STAR */ - { 367, -1 }, /* (431) select_item ::= common_expression */ - { 367, -2 }, /* (432) select_item ::= common_expression column_alias */ - { 367, -3 }, /* (433) select_item ::= common_expression AS column_alias */ - { 367, -3 }, /* (434) select_item ::= table_name NK_DOT NK_STAR */ - { 325, 0 }, /* (435) where_clause_opt ::= */ - { 325, -2 }, /* (436) where_clause_opt ::= WHERE search_condition */ - { 360, 0 }, /* (437) partition_by_clause_opt ::= */ - { 360, -3 }, /* (438) partition_by_clause_opt ::= PARTITION BY expression_list */ - { 364, 0 }, /* (439) twindow_clause_opt ::= */ - { 364, -6 }, /* (440) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ - { 364, -4 }, /* (441) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ - { 364, -6 }, /* (442) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ - { 364, -8 }, /* (443) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ - { 311, 0 }, /* (444) sliding_opt ::= */ - { 311, -4 }, /* (445) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ - { 363, 0 }, /* (446) fill_opt ::= */ - { 363, -4 }, /* (447) fill_opt ::= FILL NK_LP fill_mode NK_RP */ - { 363, -6 }, /* (448) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ - { 368, -1 }, /* (449) fill_mode ::= NONE */ - { 368, -1 }, /* (450) fill_mode ::= PREV */ - { 368, -1 }, /* (451) fill_mode ::= NULL */ - { 368, -1 }, /* (452) fill_mode ::= LINEAR */ - { 368, -1 }, /* (453) fill_mode ::= NEXT */ - { 365, 0 }, /* (454) group_by_clause_opt ::= */ - { 365, -3 }, /* (455) group_by_clause_opt ::= GROUP BY group_by_list */ - { 369, -1 }, /* (456) group_by_list ::= expression */ - { 369, -3 }, /* (457) group_by_list ::= group_by_list NK_COMMA expression */ - { 366, 0 }, /* (458) having_clause_opt ::= */ - { 366, -2 }, /* (459) having_clause_opt ::= HAVING search_condition */ - { 361, 0 }, /* (460) range_opt ::= */ - { 361, -6 }, /* (461) range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP */ - { 362, 0 }, /* (462) every_opt ::= */ - { 362, -4 }, /* (463) every_opt ::= EVERY NK_LP duration_literal NK_RP */ - { 316, -4 }, /* (464) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ - { 370, -1 }, /* (465) query_expression_body ::= query_primary */ - { 370, -4 }, /* (466) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ - { 370, -3 }, /* (467) query_expression_body ::= query_expression_body UNION query_expression_body */ - { 374, -1 }, /* (468) query_primary ::= query_specification */ - { 374, -6 }, /* (469) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ - { 371, 0 }, /* (470) order_by_clause_opt ::= */ - { 371, -3 }, /* (471) order_by_clause_opt ::= ORDER BY sort_specification_list */ - { 372, 0 }, /* (472) slimit_clause_opt ::= */ - { 372, -2 }, /* (473) slimit_clause_opt ::= SLIMIT NK_INTEGER */ - { 372, -4 }, /* (474) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ - { 372, -4 }, /* (475) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 373, 0 }, /* (476) limit_clause_opt ::= */ - { 373, -2 }, /* (477) limit_clause_opt ::= LIMIT NK_INTEGER */ - { 373, -4 }, /* (478) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ - { 373, -4 }, /* (479) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ - { 335, -3 }, /* (480) subquery ::= NK_LP query_expression NK_RP */ - { 356, -1 }, /* (481) search_condition ::= common_expression */ - { 375, -1 }, /* (482) sort_specification_list ::= sort_specification */ - { 375, -3 }, /* (483) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ - { 376, -3 }, /* (484) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ - { 377, 0 }, /* (485) ordering_specification_opt ::= */ - { 377, -1 }, /* (486) ordering_specification_opt ::= ASC */ - { 377, -1 }, /* (487) ordering_specification_opt ::= DESC */ - { 378, 0 }, /* (488) null_ordering_opt ::= */ - { 378, -2 }, /* (489) null_ordering_opt ::= NULLS FIRST */ - { 378, -2 }, /* (490) null_ordering_opt ::= NULLS LAST */ + { 305, -6 }, /* (0) cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ + { 305, -4 }, /* (1) cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ + { 306, 0 }, /* (2) account_options ::= */ + { 306, -3 }, /* (3) account_options ::= account_options PPS literal */ + { 306, -3 }, /* (4) account_options ::= account_options TSERIES literal */ + { 306, -3 }, /* (5) account_options ::= account_options STORAGE literal */ + { 306, -3 }, /* (6) account_options ::= account_options STREAMS literal */ + { 306, -3 }, /* (7) account_options ::= account_options QTIME literal */ + { 306, -3 }, /* (8) account_options ::= account_options DBS literal */ + { 306, -3 }, /* (9) account_options ::= account_options USERS literal */ + { 306, -3 }, /* (10) account_options ::= account_options CONNS literal */ + { 306, -3 }, /* (11) account_options ::= account_options STATE literal */ + { 307, -1 }, /* (12) alter_account_options ::= alter_account_option */ + { 307, -2 }, /* (13) alter_account_options ::= alter_account_options alter_account_option */ + { 309, -2 }, /* (14) alter_account_option ::= PASS literal */ + { 309, -2 }, /* (15) alter_account_option ::= PPS literal */ + { 309, -2 }, /* (16) alter_account_option ::= TSERIES literal */ + { 309, -2 }, /* (17) alter_account_option ::= STORAGE literal */ + { 309, -2 }, /* (18) alter_account_option ::= STREAMS literal */ + { 309, -2 }, /* (19) alter_account_option ::= QTIME literal */ + { 309, -2 }, /* (20) alter_account_option ::= DBS literal */ + { 309, -2 }, /* (21) alter_account_option ::= USERS literal */ + { 309, -2 }, /* (22) alter_account_option ::= CONNS literal */ + { 309, -2 }, /* (23) alter_account_option ::= STATE literal */ + { 305, -6 }, /* (24) cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ + { 305, -5 }, /* (25) cmd ::= ALTER USER user_name PASS NK_STRING */ + { 305, -5 }, /* (26) cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ + { 305, -5 }, /* (27) cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ + { 305, -3 }, /* (28) cmd ::= DROP USER user_name */ + { 311, 0 }, /* (29) sysinfo_opt ::= */ + { 311, -2 }, /* (30) sysinfo_opt ::= SYSINFO NK_INTEGER */ + { 305, -6 }, /* (31) cmd ::= GRANT privileges ON priv_level TO user_name */ + { 305, -6 }, /* (32) cmd ::= REVOKE privileges ON priv_level FROM user_name */ + { 312, -1 }, /* (33) privileges ::= ALL */ + { 312, -1 }, /* (34) privileges ::= priv_type_list */ + { 314, -1 }, /* (35) priv_type_list ::= priv_type */ + { 314, -3 }, /* (36) priv_type_list ::= priv_type_list NK_COMMA priv_type */ + { 315, -1 }, /* (37) priv_type ::= READ */ + { 315, -1 }, /* (38) priv_type ::= WRITE */ + { 313, -3 }, /* (39) priv_level ::= NK_STAR NK_DOT NK_STAR */ + { 313, -3 }, /* (40) priv_level ::= db_name NK_DOT NK_STAR */ + { 305, -3 }, /* (41) cmd ::= CREATE DNODE dnode_endpoint */ + { 305, -5 }, /* (42) cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ + { 305, -3 }, /* (43) cmd ::= DROP DNODE NK_INTEGER */ + { 305, -3 }, /* (44) cmd ::= DROP DNODE dnode_endpoint */ + { 305, -4 }, /* (45) cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ + { 305, -5 }, /* (46) cmd ::= ALTER DNODE NK_INTEGER NK_STRING NK_STRING */ + { 305, -4 }, /* (47) cmd ::= ALTER ALL DNODES NK_STRING */ + { 305, -5 }, /* (48) cmd ::= ALTER ALL DNODES NK_STRING NK_STRING */ + { 317, -1 }, /* (49) dnode_endpoint ::= NK_STRING */ + { 317, -1 }, /* (50) dnode_endpoint ::= NK_ID */ + { 317, -1 }, /* (51) dnode_endpoint ::= NK_IPTOKEN */ + { 305, -3 }, /* (52) cmd ::= ALTER LOCAL NK_STRING */ + { 305, -4 }, /* (53) cmd ::= ALTER LOCAL NK_STRING NK_STRING */ + { 305, -5 }, /* (54) cmd ::= CREATE QNODE ON DNODE NK_INTEGER */ + { 305, -5 }, /* (55) cmd ::= DROP QNODE ON DNODE NK_INTEGER */ + { 305, -5 }, /* (56) cmd ::= CREATE BNODE ON DNODE NK_INTEGER */ + { 305, -5 }, /* (57) cmd ::= DROP BNODE ON DNODE NK_INTEGER */ + { 305, -5 }, /* (58) cmd ::= CREATE SNODE ON DNODE NK_INTEGER */ + { 305, -5 }, /* (59) cmd ::= DROP SNODE ON DNODE NK_INTEGER */ + { 305, -5 }, /* (60) cmd ::= CREATE MNODE ON DNODE NK_INTEGER */ + { 305, -5 }, /* (61) cmd ::= DROP MNODE ON DNODE NK_INTEGER */ + { 305, -5 }, /* (62) cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ + { 305, -4 }, /* (63) cmd ::= DROP DATABASE exists_opt db_name */ + { 305, -2 }, /* (64) cmd ::= USE db_name */ + { 305, -4 }, /* (65) cmd ::= ALTER DATABASE db_name alter_db_options */ + { 305, -3 }, /* (66) cmd ::= FLUSH DATABASE db_name */ + { 305, -3 }, /* (67) cmd ::= TRIM DATABASE db_name */ + { 318, -3 }, /* (68) not_exists_opt ::= IF NOT EXISTS */ + { 318, 0 }, /* (69) not_exists_opt ::= */ + { 320, -2 }, /* (70) exists_opt ::= IF EXISTS */ + { 320, 0 }, /* (71) exists_opt ::= */ + { 319, 0 }, /* (72) db_options ::= */ + { 319, -3 }, /* (73) db_options ::= db_options BUFFER NK_INTEGER */ + { 319, -3 }, /* (74) db_options ::= db_options CACHEMODEL NK_STRING */ + { 319, -3 }, /* (75) db_options ::= db_options CACHESIZE NK_INTEGER */ + { 319, -3 }, /* (76) db_options ::= db_options COMP NK_INTEGER */ + { 319, -3 }, /* (77) db_options ::= db_options DURATION NK_INTEGER */ + { 319, -3 }, /* (78) db_options ::= db_options DURATION NK_VARIABLE */ + { 319, -3 }, /* (79) db_options ::= db_options MAXROWS NK_INTEGER */ + { 319, -3 }, /* (80) db_options ::= db_options MINROWS NK_INTEGER */ + { 319, -3 }, /* (81) db_options ::= db_options KEEP integer_list */ + { 319, -3 }, /* (82) db_options ::= db_options KEEP variable_list */ + { 319, -3 }, /* (83) db_options ::= db_options PAGES NK_INTEGER */ + { 319, -3 }, /* (84) db_options ::= db_options PAGESIZE NK_INTEGER */ + { 319, -3 }, /* (85) db_options ::= db_options PRECISION NK_STRING */ + { 319, -3 }, /* (86) db_options ::= db_options REPLICA NK_INTEGER */ + { 319, -3 }, /* (87) db_options ::= db_options STRICT NK_STRING */ + { 319, -3 }, /* (88) db_options ::= db_options VGROUPS NK_INTEGER */ + { 319, -3 }, /* (89) db_options ::= db_options SINGLE_STABLE NK_INTEGER */ + { 319, -3 }, /* (90) db_options ::= db_options RETENTIONS retention_list */ + { 319, -3 }, /* (91) db_options ::= db_options SCHEMALESS NK_INTEGER */ + { 319, -3 }, /* (92) db_options ::= db_options WAL_LEVEL NK_INTEGER */ + { 319, -3 }, /* (93) db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ + { 319, -3 }, /* (94) db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ + { 319, -4 }, /* (95) db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ + { 319, -3 }, /* (96) db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ + { 319, -4 }, /* (97) db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ + { 319, -3 }, /* (98) db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ + { 319, -3 }, /* (99) db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ + { 321, -1 }, /* (100) alter_db_options ::= alter_db_option */ + { 321, -2 }, /* (101) alter_db_options ::= alter_db_options alter_db_option */ + { 325, -2 }, /* (102) alter_db_option ::= CACHEMODEL NK_STRING */ + { 325, -2 }, /* (103) alter_db_option ::= CACHESIZE NK_INTEGER */ + { 325, -2 }, /* (104) alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ + { 325, -2 }, /* (105) alter_db_option ::= KEEP integer_list */ + { 325, -2 }, /* (106) alter_db_option ::= KEEP variable_list */ + { 325, -2 }, /* (107) alter_db_option ::= WAL_LEVEL NK_INTEGER */ + { 322, -1 }, /* (108) integer_list ::= NK_INTEGER */ + { 322, -3 }, /* (109) integer_list ::= integer_list NK_COMMA NK_INTEGER */ + { 323, -1 }, /* (110) variable_list ::= NK_VARIABLE */ + { 323, -3 }, /* (111) variable_list ::= variable_list NK_COMMA NK_VARIABLE */ + { 324, -1 }, /* (112) retention_list ::= retention */ + { 324, -3 }, /* (113) retention_list ::= retention_list NK_COMMA retention */ + { 326, -3 }, /* (114) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ + { 305, -9 }, /* (115) cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ + { 305, -3 }, /* (116) cmd ::= CREATE TABLE multi_create_clause */ + { 305, -9 }, /* (117) cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ + { 305, -3 }, /* (118) cmd ::= DROP TABLE multi_drop_clause */ + { 305, -4 }, /* (119) cmd ::= DROP STABLE exists_opt full_table_name */ + { 305, -3 }, /* (120) cmd ::= ALTER TABLE alter_table_clause */ + { 305, -3 }, /* (121) cmd ::= ALTER STABLE alter_table_clause */ + { 334, -2 }, /* (122) alter_table_clause ::= full_table_name alter_table_options */ + { 334, -5 }, /* (123) alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ + { 334, -4 }, /* (124) alter_table_clause ::= full_table_name DROP COLUMN column_name */ + { 334, -5 }, /* (125) alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ + { 334, -5 }, /* (126) alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ + { 334, -5 }, /* (127) alter_table_clause ::= full_table_name ADD TAG column_name type_name */ + { 334, -4 }, /* (128) alter_table_clause ::= full_table_name DROP TAG column_name */ + { 334, -5 }, /* (129) alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ + { 334, -5 }, /* (130) alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ + { 334, -6 }, /* (131) alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ + { 331, -1 }, /* (132) multi_create_clause ::= create_subtable_clause */ + { 331, -2 }, /* (133) multi_create_clause ::= multi_create_clause create_subtable_clause */ + { 339, -10 }, /* (134) create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ + { 333, -1 }, /* (135) multi_drop_clause ::= drop_table_clause */ + { 333, -2 }, /* (136) multi_drop_clause ::= multi_drop_clause drop_table_clause */ + { 342, -2 }, /* (137) drop_table_clause ::= exists_opt full_table_name */ + { 340, 0 }, /* (138) specific_cols_opt ::= */ + { 340, -3 }, /* (139) specific_cols_opt ::= NK_LP col_name_list NK_RP */ + { 327, -1 }, /* (140) full_table_name ::= table_name */ + { 327, -3 }, /* (141) full_table_name ::= db_name NK_DOT table_name */ + { 328, -1 }, /* (142) column_def_list ::= column_def */ + { 328, -3 }, /* (143) column_def_list ::= column_def_list NK_COMMA column_def */ + { 345, -2 }, /* (144) column_def ::= column_name type_name */ + { 345, -4 }, /* (145) column_def ::= column_name type_name COMMENT NK_STRING */ + { 337, -1 }, /* (146) type_name ::= BOOL */ + { 337, -1 }, /* (147) type_name ::= TINYINT */ + { 337, -1 }, /* (148) type_name ::= SMALLINT */ + { 337, -1 }, /* (149) type_name ::= INT */ + { 337, -1 }, /* (150) type_name ::= INTEGER */ + { 337, -1 }, /* (151) type_name ::= BIGINT */ + { 337, -1 }, /* (152) type_name ::= FLOAT */ + { 337, -1 }, /* (153) type_name ::= DOUBLE */ + { 337, -4 }, /* (154) type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ + { 337, -1 }, /* (155) type_name ::= TIMESTAMP */ + { 337, -4 }, /* (156) type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ + { 337, -2 }, /* (157) type_name ::= TINYINT UNSIGNED */ + { 337, -2 }, /* (158) type_name ::= SMALLINT UNSIGNED */ + { 337, -2 }, /* (159) type_name ::= INT UNSIGNED */ + { 337, -2 }, /* (160) type_name ::= BIGINT UNSIGNED */ + { 337, -1 }, /* (161) type_name ::= JSON */ + { 337, -4 }, /* (162) type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ + { 337, -1 }, /* (163) type_name ::= MEDIUMBLOB */ + { 337, -1 }, /* (164) type_name ::= BLOB */ + { 337, -4 }, /* (165) type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ + { 337, -1 }, /* (166) type_name ::= DECIMAL */ + { 337, -4 }, /* (167) type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ + { 337, -6 }, /* (168) type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ + { 329, 0 }, /* (169) tags_def_opt ::= */ + { 329, -1 }, /* (170) tags_def_opt ::= tags_def */ + { 332, -4 }, /* (171) tags_def ::= TAGS NK_LP column_def_list NK_RP */ + { 330, 0 }, /* (172) table_options ::= */ + { 330, -3 }, /* (173) table_options ::= table_options COMMENT NK_STRING */ + { 330, -3 }, /* (174) table_options ::= table_options MAX_DELAY duration_list */ + { 330, -3 }, /* (175) table_options ::= table_options WATERMARK duration_list */ + { 330, -5 }, /* (176) table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ + { 330, -3 }, /* (177) table_options ::= table_options TTL NK_INTEGER */ + { 330, -5 }, /* (178) table_options ::= table_options SMA NK_LP col_name_list NK_RP */ + { 335, -1 }, /* (179) alter_table_options ::= alter_table_option */ + { 335, -2 }, /* (180) alter_table_options ::= alter_table_options alter_table_option */ + { 348, -2 }, /* (181) alter_table_option ::= COMMENT NK_STRING */ + { 348, -2 }, /* (182) alter_table_option ::= TTL NK_INTEGER */ + { 346, -1 }, /* (183) duration_list ::= duration_literal */ + { 346, -3 }, /* (184) duration_list ::= duration_list NK_COMMA duration_literal */ + { 347, -1 }, /* (185) rollup_func_list ::= rollup_func_name */ + { 347, -3 }, /* (186) rollup_func_list ::= rollup_func_list NK_COMMA rollup_func_name */ + { 350, -1 }, /* (187) rollup_func_name ::= function_name */ + { 350, -1 }, /* (188) rollup_func_name ::= FIRST */ + { 350, -1 }, /* (189) rollup_func_name ::= LAST */ + { 343, -1 }, /* (190) col_name_list ::= col_name */ + { 343, -3 }, /* (191) col_name_list ::= col_name_list NK_COMMA col_name */ + { 352, -1 }, /* (192) col_name ::= column_name */ + { 305, -2 }, /* (193) cmd ::= SHOW DNODES */ + { 305, -2 }, /* (194) cmd ::= SHOW USERS */ + { 305, -2 }, /* (195) cmd ::= SHOW DATABASES */ + { 305, -4 }, /* (196) cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ + { 305, -4 }, /* (197) cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ + { 305, -3 }, /* (198) cmd ::= SHOW db_name_cond_opt VGROUPS */ + { 305, -2 }, /* (199) cmd ::= SHOW MNODES */ + { 305, -2 }, /* (200) cmd ::= SHOW MODULES */ + { 305, -2 }, /* (201) cmd ::= SHOW QNODES */ + { 305, -2 }, /* (202) cmd ::= SHOW FUNCTIONS */ + { 305, -5 }, /* (203) cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ + { 305, -2 }, /* (204) cmd ::= SHOW STREAMS */ + { 305, -2 }, /* (205) cmd ::= SHOW ACCOUNTS */ + { 305, -2 }, /* (206) cmd ::= SHOW APPS */ + { 305, -2 }, /* (207) cmd ::= SHOW CONNECTIONS */ + { 305, -2 }, /* (208) cmd ::= SHOW LICENCES */ + { 305, -2 }, /* (209) cmd ::= SHOW GRANTS */ + { 305, -4 }, /* (210) cmd ::= SHOW CREATE DATABASE db_name */ + { 305, -4 }, /* (211) cmd ::= SHOW CREATE TABLE full_table_name */ + { 305, -4 }, /* (212) cmd ::= SHOW CREATE STABLE full_table_name */ + { 305, -2 }, /* (213) cmd ::= SHOW QUERIES */ + { 305, -2 }, /* (214) cmd ::= SHOW SCORES */ + { 305, -2 }, /* (215) cmd ::= SHOW TOPICS */ + { 305, -2 }, /* (216) cmd ::= SHOW VARIABLES */ + { 305, -3 }, /* (217) cmd ::= SHOW LOCAL VARIABLES */ + { 305, -4 }, /* (218) cmd ::= SHOW DNODE NK_INTEGER VARIABLES */ + { 305, -2 }, /* (219) cmd ::= SHOW BNODES */ + { 305, -2 }, /* (220) cmd ::= SHOW SNODES */ + { 305, -2 }, /* (221) cmd ::= SHOW CLUSTER */ + { 305, -2 }, /* (222) cmd ::= SHOW TRANSACTIONS */ + { 305, -4 }, /* (223) cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ + { 305, -2 }, /* (224) cmd ::= SHOW CONSUMERS */ + { 305, -2 }, /* (225) cmd ::= SHOW SUBSCRIPTIONS */ + { 305, -5 }, /* (226) cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ + { 353, 0 }, /* (227) db_name_cond_opt ::= */ + { 353, -2 }, /* (228) db_name_cond_opt ::= db_name NK_DOT */ + { 354, 0 }, /* (229) like_pattern_opt ::= */ + { 354, -2 }, /* (230) like_pattern_opt ::= LIKE NK_STRING */ + { 355, -1 }, /* (231) table_name_cond ::= table_name */ + { 356, 0 }, /* (232) from_db_opt ::= */ + { 356, -2 }, /* (233) from_db_opt ::= FROM db_name */ + { 305, -8 }, /* (234) cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ + { 305, -4 }, /* (235) cmd ::= DROP INDEX exists_opt full_table_name */ + { 357, -10 }, /* (236) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ + { 357, -12 }, /* (237) index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ + { 358, -1 }, /* (238) func_list ::= func */ + { 358, -3 }, /* (239) func_list ::= func_list NK_COMMA func */ + { 361, -4 }, /* (240) func ::= function_name NK_LP expression_list NK_RP */ + { 360, 0 }, /* (241) sma_stream_opt ::= */ + { 360, -3 }, /* (242) sma_stream_opt ::= stream_options WATERMARK duration_literal */ + { 360, -3 }, /* (243) sma_stream_opt ::= stream_options MAX_DELAY duration_literal */ + { 305, -6 }, /* (244) cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ + { 305, -7 }, /* (245) cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ + { 305, -9 }, /* (246) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ + { 305, -7 }, /* (247) cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ + { 305, -9 }, /* (248) cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ + { 305, -4 }, /* (249) cmd ::= DROP TOPIC exists_opt topic_name */ + { 305, -7 }, /* (250) cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ + { 305, -2 }, /* (251) cmd ::= DESC full_table_name */ + { 305, -2 }, /* (252) cmd ::= DESCRIBE full_table_name */ + { 305, -3 }, /* (253) cmd ::= RESET QUERY CACHE */ + { 305, -4 }, /* (254) cmd ::= EXPLAIN analyze_opt explain_options query_expression */ + { 366, 0 }, /* (255) analyze_opt ::= */ + { 366, -1 }, /* (256) analyze_opt ::= ANALYZE */ + { 367, 0 }, /* (257) explain_options ::= */ + { 367, -3 }, /* (258) explain_options ::= explain_options VERBOSE NK_BOOL */ + { 367, -3 }, /* (259) explain_options ::= explain_options RATIO NK_FLOAT */ + { 305, -10 }, /* (260) cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ + { 305, -4 }, /* (261) cmd ::= DROP FUNCTION exists_opt function_name */ + { 368, 0 }, /* (262) agg_func_opt ::= */ + { 368, -1 }, /* (263) agg_func_opt ::= AGGREGATE */ + { 369, 0 }, /* (264) bufsize_opt ::= */ + { 369, -2 }, /* (265) bufsize_opt ::= BUFSIZE NK_INTEGER */ + { 305, -8 }, /* (266) cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ + { 305, -4 }, /* (267) cmd ::= DROP STREAM exists_opt stream_name */ + { 371, 0 }, /* (268) into_opt ::= */ + { 371, -2 }, /* (269) into_opt ::= INTO full_table_name */ + { 362, 0 }, /* (270) stream_options ::= */ + { 362, -3 }, /* (271) stream_options ::= stream_options TRIGGER AT_ONCE */ + { 362, -3 }, /* (272) stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ + { 362, -4 }, /* (273) stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ + { 362, -3 }, /* (274) stream_options ::= stream_options WATERMARK duration_literal */ + { 362, -3 }, /* (275) stream_options ::= stream_options IGNORE EXPIRED */ + { 305, -3 }, /* (276) cmd ::= KILL CONNECTION NK_INTEGER */ + { 305, -3 }, /* (277) cmd ::= KILL QUERY NK_STRING */ + { 305, -3 }, /* (278) cmd ::= KILL TRANSACTION NK_INTEGER */ + { 305, -2 }, /* (279) cmd ::= BALANCE VGROUP */ + { 305, -4 }, /* (280) cmd ::= MERGE VGROUP NK_INTEGER NK_INTEGER */ + { 305, -4 }, /* (281) cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ + { 305, -3 }, /* (282) cmd ::= SPLIT VGROUP NK_INTEGER */ + { 372, -2 }, /* (283) dnode_list ::= DNODE NK_INTEGER */ + { 372, -3 }, /* (284) dnode_list ::= dnode_list DNODE NK_INTEGER */ + { 305, -4 }, /* (285) cmd ::= DELETE FROM full_table_name where_clause_opt */ + { 305, -1 }, /* (286) cmd ::= query_expression */ + { 305, -7 }, /* (287) cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_expression */ + { 305, -4 }, /* (288) cmd ::= INSERT INTO full_table_name query_expression */ + { 308, -1 }, /* (289) literal ::= NK_INTEGER */ + { 308, -1 }, /* (290) literal ::= NK_FLOAT */ + { 308, -1 }, /* (291) literal ::= NK_STRING */ + { 308, -1 }, /* (292) literal ::= NK_BOOL */ + { 308, -2 }, /* (293) literal ::= TIMESTAMP NK_STRING */ + { 308, -1 }, /* (294) literal ::= duration_literal */ + { 308, -1 }, /* (295) literal ::= NULL */ + { 308, -1 }, /* (296) literal ::= NK_QUESTION */ + { 349, -1 }, /* (297) duration_literal ::= NK_VARIABLE */ + { 374, -1 }, /* (298) signed ::= NK_INTEGER */ + { 374, -2 }, /* (299) signed ::= NK_PLUS NK_INTEGER */ + { 374, -2 }, /* (300) signed ::= NK_MINUS NK_INTEGER */ + { 374, -1 }, /* (301) signed ::= NK_FLOAT */ + { 374, -2 }, /* (302) signed ::= NK_PLUS NK_FLOAT */ + { 374, -2 }, /* (303) signed ::= NK_MINUS NK_FLOAT */ + { 338, -1 }, /* (304) signed_literal ::= signed */ + { 338, -1 }, /* (305) signed_literal ::= NK_STRING */ + { 338, -1 }, /* (306) signed_literal ::= NK_BOOL */ + { 338, -2 }, /* (307) signed_literal ::= TIMESTAMP NK_STRING */ + { 338, -1 }, /* (308) signed_literal ::= duration_literal */ + { 338, -1 }, /* (309) signed_literal ::= NULL */ + { 338, -1 }, /* (310) signed_literal ::= literal_func */ + { 338, -1 }, /* (311) signed_literal ::= NK_QUESTION */ + { 376, -1 }, /* (312) literal_list ::= signed_literal */ + { 376, -3 }, /* (313) literal_list ::= literal_list NK_COMMA signed_literal */ + { 316, -1 }, /* (314) db_name ::= NK_ID */ + { 344, -1 }, /* (315) table_name ::= NK_ID */ + { 336, -1 }, /* (316) column_name ::= NK_ID */ + { 351, -1 }, /* (317) function_name ::= NK_ID */ + { 377, -1 }, /* (318) table_alias ::= NK_ID */ + { 378, -1 }, /* (319) column_alias ::= NK_ID */ + { 310, -1 }, /* (320) user_name ::= NK_ID */ + { 363, -1 }, /* (321) topic_name ::= NK_ID */ + { 370, -1 }, /* (322) stream_name ::= NK_ID */ + { 365, -1 }, /* (323) cgroup_name ::= NK_ID */ + { 379, -1 }, /* (324) expression ::= literal */ + { 379, -1 }, /* (325) expression ::= pseudo_column */ + { 379, -1 }, /* (326) expression ::= column_reference */ + { 379, -1 }, /* (327) expression ::= function_expression */ + { 379, -1 }, /* (328) expression ::= subquery */ + { 379, -3 }, /* (329) expression ::= NK_LP expression NK_RP */ + { 379, -2 }, /* (330) expression ::= NK_PLUS expression */ + { 379, -2 }, /* (331) expression ::= NK_MINUS expression */ + { 379, -3 }, /* (332) expression ::= expression NK_PLUS expression */ + { 379, -3 }, /* (333) expression ::= expression NK_MINUS expression */ + { 379, -3 }, /* (334) expression ::= expression NK_STAR expression */ + { 379, -3 }, /* (335) expression ::= expression NK_SLASH expression */ + { 379, -3 }, /* (336) expression ::= expression NK_REM expression */ + { 379, -3 }, /* (337) expression ::= column_reference NK_ARROW NK_STRING */ + { 379, -3 }, /* (338) expression ::= expression NK_BITAND expression */ + { 379, -3 }, /* (339) expression ::= expression NK_BITOR expression */ + { 341, -1 }, /* (340) expression_list ::= expression */ + { 341, -3 }, /* (341) expression_list ::= expression_list NK_COMMA expression */ + { 381, -1 }, /* (342) column_reference ::= column_name */ + { 381, -3 }, /* (343) column_reference ::= table_name NK_DOT column_name */ + { 380, -1 }, /* (344) pseudo_column ::= ROWTS */ + { 380, -1 }, /* (345) pseudo_column ::= TBNAME */ + { 380, -3 }, /* (346) pseudo_column ::= table_name NK_DOT TBNAME */ + { 380, -1 }, /* (347) pseudo_column ::= QSTART */ + { 380, -1 }, /* (348) pseudo_column ::= QEND */ + { 380, -1 }, /* (349) pseudo_column ::= QDURATION */ + { 380, -1 }, /* (350) pseudo_column ::= WSTART */ + { 380, -1 }, /* (351) pseudo_column ::= WEND */ + { 380, -1 }, /* (352) pseudo_column ::= WDURATION */ + { 382, -4 }, /* (353) function_expression ::= function_name NK_LP expression_list NK_RP */ + { 382, -4 }, /* (354) function_expression ::= star_func NK_LP star_func_para_list NK_RP */ + { 382, -6 }, /* (355) function_expression ::= CAST NK_LP expression AS type_name NK_RP */ + { 382, -1 }, /* (356) function_expression ::= literal_func */ + { 375, -3 }, /* (357) literal_func ::= noarg_func NK_LP NK_RP */ + { 375, -1 }, /* (358) literal_func ::= NOW */ + { 386, -1 }, /* (359) noarg_func ::= NOW */ + { 386, -1 }, /* (360) noarg_func ::= TODAY */ + { 386, -1 }, /* (361) noarg_func ::= TIMEZONE */ + { 386, -1 }, /* (362) noarg_func ::= DATABASE */ + { 386, -1 }, /* (363) noarg_func ::= CLIENT_VERSION */ + { 386, -1 }, /* (364) noarg_func ::= SERVER_VERSION */ + { 386, -1 }, /* (365) noarg_func ::= SERVER_STATUS */ + { 386, -1 }, /* (366) noarg_func ::= CURRENT_USER */ + { 386, -1 }, /* (367) noarg_func ::= USER */ + { 384, -1 }, /* (368) star_func ::= COUNT */ + { 384, -1 }, /* (369) star_func ::= FIRST */ + { 384, -1 }, /* (370) star_func ::= LAST */ + { 384, -1 }, /* (371) star_func ::= LAST_ROW */ + { 385, -1 }, /* (372) star_func_para_list ::= NK_STAR */ + { 385, -1 }, /* (373) star_func_para_list ::= other_para_list */ + { 387, -1 }, /* (374) other_para_list ::= star_func_para */ + { 387, -3 }, /* (375) other_para_list ::= other_para_list NK_COMMA star_func_para */ + { 388, -1 }, /* (376) star_func_para ::= expression */ + { 388, -3 }, /* (377) star_func_para ::= table_name NK_DOT NK_STAR */ + { 389, -3 }, /* (378) predicate ::= expression compare_op expression */ + { 389, -5 }, /* (379) predicate ::= expression BETWEEN expression AND expression */ + { 389, -6 }, /* (380) predicate ::= expression NOT BETWEEN expression AND expression */ + { 389, -3 }, /* (381) predicate ::= expression IS NULL */ + { 389, -4 }, /* (382) predicate ::= expression IS NOT NULL */ + { 389, -3 }, /* (383) predicate ::= expression in_op in_predicate_value */ + { 390, -1 }, /* (384) compare_op ::= NK_LT */ + { 390, -1 }, /* (385) compare_op ::= NK_GT */ + { 390, -1 }, /* (386) compare_op ::= NK_LE */ + { 390, -1 }, /* (387) compare_op ::= NK_GE */ + { 390, -1 }, /* (388) compare_op ::= NK_NE */ + { 390, -1 }, /* (389) compare_op ::= NK_EQ */ + { 390, -1 }, /* (390) compare_op ::= LIKE */ + { 390, -2 }, /* (391) compare_op ::= NOT LIKE */ + { 390, -1 }, /* (392) compare_op ::= MATCH */ + { 390, -1 }, /* (393) compare_op ::= NMATCH */ + { 390, -1 }, /* (394) compare_op ::= CONTAINS */ + { 391, -1 }, /* (395) in_op ::= IN */ + { 391, -2 }, /* (396) in_op ::= NOT IN */ + { 392, -3 }, /* (397) in_predicate_value ::= NK_LP literal_list NK_RP */ + { 393, -1 }, /* (398) boolean_value_expression ::= boolean_primary */ + { 393, -2 }, /* (399) boolean_value_expression ::= NOT boolean_primary */ + { 393, -3 }, /* (400) boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ + { 393, -3 }, /* (401) boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ + { 394, -1 }, /* (402) boolean_primary ::= predicate */ + { 394, -3 }, /* (403) boolean_primary ::= NK_LP boolean_value_expression NK_RP */ + { 395, -1 }, /* (404) common_expression ::= expression */ + { 395, -1 }, /* (405) common_expression ::= boolean_value_expression */ + { 396, 0 }, /* (406) from_clause_opt ::= */ + { 396, -2 }, /* (407) from_clause_opt ::= FROM table_reference_list */ + { 397, -1 }, /* (408) table_reference_list ::= table_reference */ + { 397, -3 }, /* (409) table_reference_list ::= table_reference_list NK_COMMA table_reference */ + { 398, -1 }, /* (410) table_reference ::= table_primary */ + { 398, -1 }, /* (411) table_reference ::= joined_table */ + { 399, -2 }, /* (412) table_primary ::= table_name alias_opt */ + { 399, -4 }, /* (413) table_primary ::= db_name NK_DOT table_name alias_opt */ + { 399, -2 }, /* (414) table_primary ::= subquery alias_opt */ + { 399, -1 }, /* (415) table_primary ::= parenthesized_joined_table */ + { 401, 0 }, /* (416) alias_opt ::= */ + { 401, -1 }, /* (417) alias_opt ::= table_alias */ + { 401, -2 }, /* (418) alias_opt ::= AS table_alias */ + { 402, -3 }, /* (419) parenthesized_joined_table ::= NK_LP joined_table NK_RP */ + { 402, -3 }, /* (420) parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ + { 400, -6 }, /* (421) joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ + { 403, 0 }, /* (422) join_type ::= */ + { 403, -1 }, /* (423) join_type ::= INNER */ + { 405, -12 }, /* (424) query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ + { 406, 0 }, /* (425) set_quantifier_opt ::= */ + { 406, -1 }, /* (426) set_quantifier_opt ::= DISTINCT */ + { 406, -1 }, /* (427) set_quantifier_opt ::= ALL */ + { 407, -1 }, /* (428) select_list ::= select_item */ + { 407, -3 }, /* (429) select_list ::= select_list NK_COMMA select_item */ + { 415, -1 }, /* (430) select_item ::= NK_STAR */ + { 415, -1 }, /* (431) select_item ::= common_expression */ + { 415, -2 }, /* (432) select_item ::= common_expression column_alias */ + { 415, -3 }, /* (433) select_item ::= common_expression AS column_alias */ + { 415, -3 }, /* (434) select_item ::= table_name NK_DOT NK_STAR */ + { 373, 0 }, /* (435) where_clause_opt ::= */ + { 373, -2 }, /* (436) where_clause_opt ::= WHERE search_condition */ + { 408, 0 }, /* (437) partition_by_clause_opt ::= */ + { 408, -3 }, /* (438) partition_by_clause_opt ::= PARTITION BY expression_list */ + { 412, 0 }, /* (439) twindow_clause_opt ::= */ + { 412, -6 }, /* (440) twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ + { 412, -4 }, /* (441) twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ + { 412, -6 }, /* (442) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ + { 412, -8 }, /* (443) twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ + { 359, 0 }, /* (444) sliding_opt ::= */ + { 359, -4 }, /* (445) sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ + { 411, 0 }, /* (446) fill_opt ::= */ + { 411, -4 }, /* (447) fill_opt ::= FILL NK_LP fill_mode NK_RP */ + { 411, -6 }, /* (448) fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ + { 416, -1 }, /* (449) fill_mode ::= NONE */ + { 416, -1 }, /* (450) fill_mode ::= PREV */ + { 416, -1 }, /* (451) fill_mode ::= NULL */ + { 416, -1 }, /* (452) fill_mode ::= LINEAR */ + { 416, -1 }, /* (453) fill_mode ::= NEXT */ + { 413, 0 }, /* (454) group_by_clause_opt ::= */ + { 413, -3 }, /* (455) group_by_clause_opt ::= GROUP BY group_by_list */ + { 417, -1 }, /* (456) group_by_list ::= expression */ + { 417, -3 }, /* (457) group_by_list ::= group_by_list NK_COMMA expression */ + { 414, 0 }, /* (458) having_clause_opt ::= */ + { 414, -2 }, /* (459) having_clause_opt ::= HAVING search_condition */ + { 409, 0 }, /* (460) range_opt ::= */ + { 409, -6 }, /* (461) range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP */ + { 410, 0 }, /* (462) every_opt ::= */ + { 410, -4 }, /* (463) every_opt ::= EVERY NK_LP duration_literal NK_RP */ + { 364, -4 }, /* (464) query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ + { 418, -1 }, /* (465) query_expression_body ::= query_primary */ + { 418, -4 }, /* (466) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ + { 418, -3 }, /* (467) query_expression_body ::= query_expression_body UNION query_expression_body */ + { 422, -1 }, /* (468) query_primary ::= query_specification */ + { 422, -6 }, /* (469) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ + { 419, 0 }, /* (470) order_by_clause_opt ::= */ + { 419, -3 }, /* (471) order_by_clause_opt ::= ORDER BY sort_specification_list */ + { 420, 0 }, /* (472) slimit_clause_opt ::= */ + { 420, -2 }, /* (473) slimit_clause_opt ::= SLIMIT NK_INTEGER */ + { 420, -4 }, /* (474) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ + { 420, -4 }, /* (475) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 421, 0 }, /* (476) limit_clause_opt ::= */ + { 421, -2 }, /* (477) limit_clause_opt ::= LIMIT NK_INTEGER */ + { 421, -4 }, /* (478) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ + { 421, -4 }, /* (479) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ + { 383, -3 }, /* (480) subquery ::= NK_LP query_expression NK_RP */ + { 404, -1 }, /* (481) search_condition ::= common_expression */ + { 423, -1 }, /* (482) sort_specification_list ::= sort_specification */ + { 423, -3 }, /* (483) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ + { 424, -3 }, /* (484) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ + { 425, 0 }, /* (485) ordering_specification_opt ::= */ + { 425, -1 }, /* (486) ordering_specification_opt ::= ASC */ + { 425, -1 }, /* (487) ordering_specification_opt ::= DESC */ + { 426, 0 }, /* (488) null_ordering_opt ::= */ + { 426, -2 }, /* (489) null_ordering_opt ::= NULLS FIRST */ + { 426, -2 }, /* (490) null_ordering_opt ::= NULLS LAST */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3303,11 +3417,11 @@ static YYACTIONTYPE yy_reduce( YYMINORTYPE yylhsminor; case 0: /* cmd ::= CREATE ACCOUNT NK_ID PASS NK_STRING account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,258,&yymsp[0].minor); + yy_destructor(yypParser,306,&yymsp[0].minor); break; case 1: /* cmd ::= ALTER ACCOUNT NK_ID alter_account_options */ { pCxt->errCode = generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_EXPRIE_STATEMENT); } - yy_destructor(yypParser,259,&yymsp[0].minor); + yy_destructor(yypParser,307,&yymsp[0].minor); break; case 2: /* account_options ::= */ { } @@ -3321,20 +3435,20 @@ static YYACTIONTYPE yy_reduce( case 9: /* account_options ::= account_options USERS literal */ yytestcase(yyruleno==9); case 10: /* account_options ::= account_options CONNS literal */ yytestcase(yyruleno==10); case 11: /* account_options ::= account_options STATE literal */ yytestcase(yyruleno==11); -{ yy_destructor(yypParser,258,&yymsp[-2].minor); +{ yy_destructor(yypParser,306,&yymsp[-2].minor); { } - yy_destructor(yypParser,260,&yymsp[0].minor); + yy_destructor(yypParser,308,&yymsp[0].minor); } break; case 12: /* alter_account_options ::= alter_account_option */ -{ yy_destructor(yypParser,261,&yymsp[0].minor); +{ yy_destructor(yypParser,309,&yymsp[0].minor); { } } break; case 13: /* alter_account_options ::= alter_account_options alter_account_option */ -{ yy_destructor(yypParser,259,&yymsp[-1].minor); +{ yy_destructor(yypParser,307,&yymsp[-1].minor); { } - yy_destructor(yypParser,261,&yymsp[0].minor); + yy_destructor(yypParser,309,&yymsp[0].minor); } break; case 14: /* alter_account_option ::= PASS literal */ @@ -3348,72 +3462,72 @@ static YYACTIONTYPE yy_reduce( case 22: /* alter_account_option ::= CONNS literal */ yytestcase(yyruleno==22); case 23: /* alter_account_option ::= STATE literal */ yytestcase(yyruleno==23); { } - yy_destructor(yypParser,260,&yymsp[0].minor); + yy_destructor(yypParser,308,&yymsp[0].minor); break; case 24: /* cmd ::= CREATE USER user_name PASS NK_STRING sysinfo_opt */ -{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy361, &yymsp[-1].minor.yy0, yymsp[0].minor.yy285); } +{ pCxt->pRootNode = createCreateUserStmt(pCxt, &yymsp[-3].minor.yy617, &yymsp[-1].minor.yy0, yymsp[0].minor.yy215); } break; case 25: /* cmd ::= ALTER USER user_name PASS NK_STRING */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy361, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy617, TSDB_ALTER_USER_PASSWD, &yymsp[0].minor.yy0); } break; case 26: /* cmd ::= ALTER USER user_name ENABLE NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy361, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy617, TSDB_ALTER_USER_ENABLE, &yymsp[0].minor.yy0); } break; case 27: /* cmd ::= ALTER USER user_name SYSINFO NK_INTEGER */ -{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy361, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createAlterUserStmt(pCxt, &yymsp[-2].minor.yy617, TSDB_ALTER_USER_SYSINFO, &yymsp[0].minor.yy0); } break; case 28: /* cmd ::= DROP USER user_name */ -{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy361); } +{ pCxt->pRootNode = createDropUserStmt(pCxt, &yymsp[0].minor.yy617); } break; case 29: /* sysinfo_opt ::= */ -{ yymsp[1].minor.yy285 = 1; } +{ yymsp[1].minor.yy215 = 1; } break; case 30: /* sysinfo_opt ::= SYSINFO NK_INTEGER */ -{ yymsp[-1].minor.yy285 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy215 = taosStr2Int8(yymsp[0].minor.yy0.z, NULL, 10); } break; case 31: /* cmd ::= GRANT privileges ON priv_level TO user_name */ -{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy457, &yymsp[-2].minor.yy361, &yymsp[0].minor.yy361); } +{ pCxt->pRootNode = createGrantStmt(pCxt, yymsp[-4].minor.yy473, &yymsp[-2].minor.yy617, &yymsp[0].minor.yy617); } break; case 32: /* cmd ::= REVOKE privileges ON priv_level FROM user_name */ -{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy457, &yymsp[-2].minor.yy361, &yymsp[0].minor.yy361); } +{ pCxt->pRootNode = createRevokeStmt(pCxt, yymsp[-4].minor.yy473, &yymsp[-2].minor.yy617, &yymsp[0].minor.yy617); } break; case 33: /* privileges ::= ALL */ -{ yymsp[0].minor.yy457 = PRIVILEGE_TYPE_ALL; } +{ yymsp[0].minor.yy473 = PRIVILEGE_TYPE_ALL; } break; case 34: /* privileges ::= priv_type_list */ case 35: /* priv_type_list ::= priv_type */ yytestcase(yyruleno==35); -{ yylhsminor.yy457 = yymsp[0].minor.yy457; } - yymsp[0].minor.yy457 = yylhsminor.yy457; +{ yylhsminor.yy473 = yymsp[0].minor.yy473; } + yymsp[0].minor.yy473 = yylhsminor.yy473; break; case 36: /* priv_type_list ::= priv_type_list NK_COMMA priv_type */ -{ yylhsminor.yy457 = yymsp[-2].minor.yy457 | yymsp[0].minor.yy457; } - yymsp[-2].minor.yy457 = yylhsminor.yy457; +{ yylhsminor.yy473 = yymsp[-2].minor.yy473 | yymsp[0].minor.yy473; } + yymsp[-2].minor.yy473 = yylhsminor.yy473; break; case 37: /* priv_type ::= READ */ -{ yymsp[0].minor.yy457 = PRIVILEGE_TYPE_READ; } +{ yymsp[0].minor.yy473 = PRIVILEGE_TYPE_READ; } break; case 38: /* priv_type ::= WRITE */ -{ yymsp[0].minor.yy457 = PRIVILEGE_TYPE_WRITE; } +{ yymsp[0].minor.yy473 = PRIVILEGE_TYPE_WRITE; } break; case 39: /* priv_level ::= NK_STAR NK_DOT NK_STAR */ -{ yylhsminor.yy361 = yymsp[-2].minor.yy0; } - yymsp[-2].minor.yy361 = yylhsminor.yy361; +{ yylhsminor.yy617 = yymsp[-2].minor.yy0; } + yymsp[-2].minor.yy617 = yylhsminor.yy617; break; case 40: /* priv_level ::= db_name NK_DOT NK_STAR */ -{ yylhsminor.yy361 = yymsp[-2].minor.yy361; } - yymsp[-2].minor.yy361 = yylhsminor.yy361; +{ yylhsminor.yy617 = yymsp[-2].minor.yy617; } + yymsp[-2].minor.yy617 = yylhsminor.yy617; break; case 41: /* cmd ::= CREATE DNODE dnode_endpoint */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy361, NULL); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[0].minor.yy617, NULL); } break; case 42: /* cmd ::= CREATE DNODE dnode_endpoint PORT NK_INTEGER */ -{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy361, &yymsp[0].minor.yy0); } +{ pCxt->pRootNode = createCreateDnodeStmt(pCxt, &yymsp[-2].minor.yy617, &yymsp[0].minor.yy0); } break; case 43: /* cmd ::= DROP DNODE NK_INTEGER */ { pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy0); } break; case 44: /* cmd ::= DROP DNODE dnode_endpoint */ -{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy361); } +{ pCxt->pRootNode = createDropDnodeStmt(pCxt, &yymsp[0].minor.yy617); } break; case 45: /* cmd ::= ALTER DNODE NK_INTEGER NK_STRING */ { pCxt->pRootNode = createAlterDnodeStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, NULL); } @@ -3453,8 +3567,8 @@ static YYACTIONTYPE yy_reduce( case 369: /* star_func ::= FIRST */ yytestcase(yyruleno==369); case 370: /* star_func ::= LAST */ yytestcase(yyruleno==370); case 371: /* star_func ::= LAST_ROW */ yytestcase(yyruleno==371); -{ yylhsminor.yy361 = yymsp[0].minor.yy0; } - yymsp[0].minor.yy361 = yylhsminor.yy361; +{ yylhsminor.yy617 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy617 = yylhsminor.yy617; break; case 52: /* cmd ::= ALTER LOCAL NK_STRING */ { pCxt->pRootNode = createAlterLocalStmt(pCxt, &yymsp[0].minor.yy0, NULL); } @@ -3487,189 +3601,189 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createDropComponentNodeStmt(pCxt, QUERY_NODE_DROP_MNODE_STMT, &yymsp[0].minor.yy0); } break; case 62: /* cmd ::= CREATE DATABASE not_exists_opt db_name db_options */ -{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy151, &yymsp[-1].minor.yy361, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createCreateDatabaseStmt(pCxt, yymsp[-2].minor.yy313, &yymsp[-1].minor.yy617, yymsp[0].minor.yy840); } break; case 63: /* cmd ::= DROP DATABASE exists_opt db_name */ -{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy151, &yymsp[0].minor.yy361); } +{ pCxt->pRootNode = createDropDatabaseStmt(pCxt, yymsp[-1].minor.yy313, &yymsp[0].minor.yy617); } break; case 64: /* cmd ::= USE db_name */ -{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy361); } +{ pCxt->pRootNode = createUseDatabaseStmt(pCxt, &yymsp[0].minor.yy617); } break; case 65: /* cmd ::= ALTER DATABASE db_name alter_db_options */ -{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy361, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createAlterDatabaseStmt(pCxt, &yymsp[-1].minor.yy617, yymsp[0].minor.yy840); } break; case 66: /* cmd ::= FLUSH DATABASE db_name */ -{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy361); } +{ pCxt->pRootNode = createFlushDatabaseStmt(pCxt, &yymsp[0].minor.yy617); } break; case 67: /* cmd ::= TRIM DATABASE db_name */ -{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[0].minor.yy361); } +{ pCxt->pRootNode = createTrimDatabaseStmt(pCxt, &yymsp[0].minor.yy617); } break; case 68: /* not_exists_opt ::= IF NOT EXISTS */ -{ yymsp[-2].minor.yy151 = true; } +{ yymsp[-2].minor.yy313 = true; } break; case 69: /* not_exists_opt ::= */ case 71: /* exists_opt ::= */ yytestcase(yyruleno==71); case 255: /* analyze_opt ::= */ yytestcase(yyruleno==255); case 262: /* agg_func_opt ::= */ yytestcase(yyruleno==262); case 425: /* set_quantifier_opt ::= */ yytestcase(yyruleno==425); -{ yymsp[1].minor.yy151 = false; } +{ yymsp[1].minor.yy313 = false; } break; case 70: /* exists_opt ::= IF EXISTS */ -{ yymsp[-1].minor.yy151 = true; } +{ yymsp[-1].minor.yy313 = true; } break; case 72: /* db_options ::= */ -{ yymsp[1].minor.yy616 = createDefaultDatabaseOptions(pCxt); } +{ yymsp[1].minor.yy840 = createDefaultDatabaseOptions(pCxt); } break; case 73: /* db_options ::= db_options BUFFER NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_BUFFER, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 74: /* db_options ::= db_options CACHEMODEL NK_STRING */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_CACHEMODEL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 75: /* db_options ::= db_options CACHESIZE NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_CACHESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 76: /* db_options ::= db_options COMP NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_COMP, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_COMP, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 77: /* db_options ::= db_options DURATION NK_INTEGER */ case 78: /* db_options ::= db_options DURATION NK_VARIABLE */ yytestcase(yyruleno==78); -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_DAYS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 79: /* db_options ::= db_options MAXROWS NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_MAXROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 80: /* db_options ::= db_options MINROWS NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_MINROWS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 81: /* db_options ::= db_options KEEP integer_list */ case 82: /* db_options ::= db_options KEEP variable_list */ yytestcase(yyruleno==82); -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_KEEP, yymsp[0].minor.yy356); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_KEEP, yymsp[0].minor.yy544); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 83: /* db_options ::= db_options PAGES NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_PAGES, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 84: /* db_options ::= db_options PAGESIZE NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_PAGESIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 85: /* db_options ::= db_options PRECISION NK_STRING */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_PRECISION, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 86: /* db_options ::= db_options REPLICA NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_REPLICA, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 87: /* db_options ::= db_options STRICT NK_STRING */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_STRICT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 88: /* db_options ::= db_options VGROUPS NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_VGROUPS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 89: /* db_options ::= db_options SINGLE_STABLE NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_SINGLE_STABLE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 90: /* db_options ::= db_options RETENTIONS retention_list */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_RETENTIONS, yymsp[0].minor.yy356); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_RETENTIONS, yymsp[0].minor.yy544); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 91: /* db_options ::= db_options SCHEMALESS NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_SCHEMALESS, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 92: /* db_options ::= db_options WAL_LEVEL NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_WAL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_WAL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 93: /* db_options ::= db_options WAL_FSYNC_PERIOD NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_FSYNC, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 94: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_WAL_RETENTION_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 95: /* db_options ::= db_options WAL_RETENTION_PERIOD NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-3].minor.yy616, DB_OPTION_WAL_RETENTION_PERIOD, &t); + yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-3].minor.yy840, DB_OPTION_WAL_RETENTION_PERIOD, &t); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; + yymsp[-3].minor.yy840 = yylhsminor.yy840; break; case 96: /* db_options ::= db_options WAL_RETENTION_SIZE NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_WAL_RETENTION_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 97: /* db_options ::= db_options WAL_RETENTION_SIZE NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-3].minor.yy616, DB_OPTION_WAL_RETENTION_SIZE, &t); + yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-3].minor.yy840, DB_OPTION_WAL_RETENTION_SIZE, &t); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; + yymsp[-3].minor.yy840 = yylhsminor.yy840; break; case 98: /* db_options ::= db_options WAL_ROLL_PERIOD NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_WAL_ROLL_PERIOD, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 99: /* db_options ::= db_options WAL_SEGMENT_SIZE NK_INTEGER */ -{ yylhsminor.yy616 = setDatabaseOption(pCxt, yymsp[-2].minor.yy616, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setDatabaseOption(pCxt, yymsp[-2].minor.yy840, DB_OPTION_WAL_SEGMENT_SIZE, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 100: /* alter_db_options ::= alter_db_option */ -{ yylhsminor.yy616 = createAlterDatabaseOptions(pCxt); yylhsminor.yy616 = setAlterDatabaseOption(pCxt, yylhsminor.yy616, &yymsp[0].minor.yy409); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createAlterDatabaseOptions(pCxt); yylhsminor.yy840 = setAlterDatabaseOption(pCxt, yylhsminor.yy840, &yymsp[0].minor.yy95); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 101: /* alter_db_options ::= alter_db_options alter_db_option */ -{ yylhsminor.yy616 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy616, &yymsp[0].minor.yy409); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setAlterDatabaseOption(pCxt, yymsp[-1].minor.yy840, &yymsp[0].minor.yy95); } + yymsp[-1].minor.yy840 = yylhsminor.yy840; break; case 102: /* alter_db_option ::= CACHEMODEL NK_STRING */ -{ yymsp[-1].minor.yy409.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy409.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy95.type = DB_OPTION_CACHEMODEL; yymsp[-1].minor.yy95.val = yymsp[0].minor.yy0; } break; case 103: /* alter_db_option ::= CACHESIZE NK_INTEGER */ -{ yymsp[-1].minor.yy409.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy409.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy95.type = DB_OPTION_CACHESIZE; yymsp[-1].minor.yy95.val = yymsp[0].minor.yy0; } break; case 104: /* alter_db_option ::= WAL_FSYNC_PERIOD NK_INTEGER */ -{ yymsp[-1].minor.yy409.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy409.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy95.type = DB_OPTION_FSYNC; yymsp[-1].minor.yy95.val = yymsp[0].minor.yy0; } break; case 105: /* alter_db_option ::= KEEP integer_list */ case 106: /* alter_db_option ::= KEEP variable_list */ yytestcase(yyruleno==106); -{ yymsp[-1].minor.yy409.type = DB_OPTION_KEEP; yymsp[-1].minor.yy409.pList = yymsp[0].minor.yy356; } +{ yymsp[-1].minor.yy95.type = DB_OPTION_KEEP; yymsp[-1].minor.yy95.pList = yymsp[0].minor.yy544; } break; case 107: /* alter_db_option ::= WAL_LEVEL NK_INTEGER */ -{ yymsp[-1].minor.yy409.type = DB_OPTION_WAL; yymsp[-1].minor.yy409.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy95.type = DB_OPTION_WAL; yymsp[-1].minor.yy95.val = yymsp[0].minor.yy0; } break; case 108: /* integer_list ::= NK_INTEGER */ -{ yylhsminor.yy356 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy356 = yylhsminor.yy356; +{ yylhsminor.yy544 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy544 = yylhsminor.yy544; break; case 109: /* integer_list ::= integer_list NK_COMMA NK_INTEGER */ case 284: /* dnode_list ::= dnode_list DNODE NK_INTEGER */ yytestcase(yyruleno==284); -{ yylhsminor.yy356 = addNodeToList(pCxt, yymsp[-2].minor.yy356, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy356 = yylhsminor.yy356; +{ yylhsminor.yy544 = addNodeToList(pCxt, yymsp[-2].minor.yy544, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy544 = yylhsminor.yy544; break; case 110: /* variable_list ::= NK_VARIABLE */ -{ yylhsminor.yy356 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy356 = yylhsminor.yy356; +{ yylhsminor.yy544 = createNodeList(pCxt, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy544 = yylhsminor.yy544; break; case 111: /* variable_list ::= variable_list NK_COMMA NK_VARIABLE */ -{ yylhsminor.yy356 = addNodeToList(pCxt, yymsp[-2].minor.yy356, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy356 = yylhsminor.yy356; +{ yylhsminor.yy544 = addNodeToList(pCxt, yymsp[-2].minor.yy544, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy544 = yylhsminor.yy544; break; case 112: /* retention_list ::= retention */ case 132: /* multi_create_clause ::= create_subtable_clause */ yytestcase(yyruleno==132); @@ -3682,8 +3796,8 @@ static YYACTIONTYPE yy_reduce( case 374: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==374); case 428: /* select_list ::= select_item */ yytestcase(yyruleno==428); case 482: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==482); -{ yylhsminor.yy356 = createNodeList(pCxt, yymsp[0].minor.yy616); } - yymsp[0].minor.yy356 = yylhsminor.yy356; +{ yylhsminor.yy544 = createNodeList(pCxt, yymsp[0].minor.yy840); } + yymsp[0].minor.yy544 = yylhsminor.yy544; break; case 113: /* retention_list ::= retention_list NK_COMMA retention */ case 143: /* column_def_list ::= column_def_list NK_COMMA column_def */ yytestcase(yyruleno==143); @@ -3694,250 +3808,250 @@ static YYACTIONTYPE yy_reduce( case 375: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==375); case 429: /* select_list ::= select_list NK_COMMA select_item */ yytestcase(yyruleno==429); case 483: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==483); -{ yylhsminor.yy356 = addNodeToList(pCxt, yymsp[-2].minor.yy356, yymsp[0].minor.yy616); } - yymsp[-2].minor.yy356 = yylhsminor.yy356; +{ yylhsminor.yy544 = addNodeToList(pCxt, yymsp[-2].minor.yy544, yymsp[0].minor.yy840); } + yymsp[-2].minor.yy544 = yylhsminor.yy544; break; case 114: /* retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -{ yylhsminor.yy616 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createNodeListNodeEx(pCxt, createDurationValueNode(pCxt, &yymsp[-2].minor.yy0), createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 115: /* cmd ::= CREATE TABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def_opt table_options */ case 117: /* cmd ::= CREATE STABLE not_exists_opt full_table_name NK_LP column_def_list NK_RP tags_def table_options */ yytestcase(yyruleno==117); -{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy151, yymsp[-5].minor.yy616, yymsp[-3].minor.yy356, yymsp[-1].minor.yy356, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createCreateTableStmt(pCxt, yymsp[-6].minor.yy313, yymsp[-5].minor.yy840, yymsp[-3].minor.yy544, yymsp[-1].minor.yy544, yymsp[0].minor.yy840); } break; case 116: /* cmd ::= CREATE TABLE multi_create_clause */ -{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy356); } +{ pCxt->pRootNode = createCreateMultiTableStmt(pCxt, yymsp[0].minor.yy544); } break; case 118: /* cmd ::= DROP TABLE multi_drop_clause */ -{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy356); } +{ pCxt->pRootNode = createDropTableStmt(pCxt, yymsp[0].minor.yy544); } break; case 119: /* cmd ::= DROP STABLE exists_opt full_table_name */ -{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy151, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createDropSuperTableStmt(pCxt, yymsp[-1].minor.yy313, yymsp[0].minor.yy840); } break; case 120: /* cmd ::= ALTER TABLE alter_table_clause */ case 286: /* cmd ::= query_expression */ yytestcase(yyruleno==286); -{ pCxt->pRootNode = yymsp[0].minor.yy616; } +{ pCxt->pRootNode = yymsp[0].minor.yy840; } break; case 121: /* cmd ::= ALTER STABLE alter_table_clause */ -{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy616); } +{ pCxt->pRootNode = setAlterSuperTableType(yymsp[0].minor.yy840); } break; case 122: /* alter_table_clause ::= full_table_name alter_table_options */ -{ yylhsminor.yy616 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy616, yymsp[0].minor.yy616); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createAlterTableModifyOptions(pCxt, yymsp[-1].minor.yy840, yymsp[0].minor.yy840); } + yymsp[-1].minor.yy840 = yylhsminor.yy840; break; case 123: /* alter_table_clause ::= full_table_name ADD COLUMN column_name type_name */ -{ yylhsminor.yy616 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy361, yymsp[0].minor.yy600); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy840, TSDB_ALTER_TABLE_ADD_COLUMN, &yymsp[-1].minor.yy617, yymsp[0].minor.yy784); } + yymsp[-4].minor.yy840 = yylhsminor.yy840; break; case 124: /* alter_table_clause ::= full_table_name DROP COLUMN column_name */ -{ yylhsminor.yy616 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy616, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy361); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy840, TSDB_ALTER_TABLE_DROP_COLUMN, &yymsp[0].minor.yy617); } + yymsp[-3].minor.yy840 = yylhsminor.yy840; break; case 125: /* alter_table_clause ::= full_table_name MODIFY COLUMN column_name type_name */ -{ yylhsminor.yy616 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy361, yymsp[0].minor.yy600); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy840, TSDB_ALTER_TABLE_UPDATE_COLUMN_BYTES, &yymsp[-1].minor.yy617, yymsp[0].minor.yy784); } + yymsp[-4].minor.yy840 = yylhsminor.yy840; break; case 126: /* alter_table_clause ::= full_table_name RENAME COLUMN column_name column_name */ -{ yylhsminor.yy616 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy361, &yymsp[0].minor.yy361); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy840, TSDB_ALTER_TABLE_UPDATE_COLUMN_NAME, &yymsp[-1].minor.yy617, &yymsp[0].minor.yy617); } + yymsp[-4].minor.yy840 = yylhsminor.yy840; break; case 127: /* alter_table_clause ::= full_table_name ADD TAG column_name type_name */ -{ yylhsminor.yy616 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy361, yymsp[0].minor.yy600); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy840, TSDB_ALTER_TABLE_ADD_TAG, &yymsp[-1].minor.yy617, yymsp[0].minor.yy784); } + yymsp[-4].minor.yy840 = yylhsminor.yy840; break; case 128: /* alter_table_clause ::= full_table_name DROP TAG column_name */ -{ yylhsminor.yy616 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy616, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy361); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createAlterTableDropCol(pCxt, yymsp[-3].minor.yy840, TSDB_ALTER_TABLE_DROP_TAG, &yymsp[0].minor.yy617); } + yymsp[-3].minor.yy840 = yylhsminor.yy840; break; case 129: /* alter_table_clause ::= full_table_name MODIFY TAG column_name type_name */ -{ yylhsminor.yy616 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy361, yymsp[0].minor.yy600); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createAlterTableAddModifyCol(pCxt, yymsp[-4].minor.yy840, TSDB_ALTER_TABLE_UPDATE_TAG_BYTES, &yymsp[-1].minor.yy617, yymsp[0].minor.yy784); } + yymsp[-4].minor.yy840 = yylhsminor.yy840; break; case 130: /* alter_table_clause ::= full_table_name RENAME TAG column_name column_name */ -{ yylhsminor.yy616 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy616, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy361, &yymsp[0].minor.yy361); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createAlterTableRenameCol(pCxt, yymsp[-4].minor.yy840, TSDB_ALTER_TABLE_UPDATE_TAG_NAME, &yymsp[-1].minor.yy617, &yymsp[0].minor.yy617); } + yymsp[-4].minor.yy840 = yylhsminor.yy840; break; case 131: /* alter_table_clause ::= full_table_name SET TAG column_name NK_EQ signed_literal */ -{ yylhsminor.yy616 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy616, &yymsp[-2].minor.yy361, yymsp[0].minor.yy616); } - yymsp[-5].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createAlterTableSetTag(pCxt, yymsp[-5].minor.yy840, &yymsp[-2].minor.yy617, yymsp[0].minor.yy840); } + yymsp[-5].minor.yy840 = yylhsminor.yy840; break; case 133: /* multi_create_clause ::= multi_create_clause create_subtable_clause */ case 136: /* multi_drop_clause ::= multi_drop_clause drop_table_clause */ yytestcase(yyruleno==136); -{ yylhsminor.yy356 = addNodeToList(pCxt, yymsp[-1].minor.yy356, yymsp[0].minor.yy616); } - yymsp[-1].minor.yy356 = yylhsminor.yy356; +{ yylhsminor.yy544 = addNodeToList(pCxt, yymsp[-1].minor.yy544, yymsp[0].minor.yy840); } + yymsp[-1].minor.yy544 = yylhsminor.yy544; break; case 134: /* create_subtable_clause ::= not_exists_opt full_table_name USING full_table_name specific_cols_opt TAGS NK_LP expression_list NK_RP table_options */ -{ yylhsminor.yy616 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy151, yymsp[-8].minor.yy616, yymsp[-6].minor.yy616, yymsp[-5].minor.yy356, yymsp[-2].minor.yy356, yymsp[0].minor.yy616); } - yymsp[-9].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createCreateSubTableClause(pCxt, yymsp[-9].minor.yy313, yymsp[-8].minor.yy840, yymsp[-6].minor.yy840, yymsp[-5].minor.yy544, yymsp[-2].minor.yy544, yymsp[0].minor.yy840); } + yymsp[-9].minor.yy840 = yylhsminor.yy840; break; case 137: /* drop_table_clause ::= exists_opt full_table_name */ -{ yylhsminor.yy616 = createDropTableClause(pCxt, yymsp[-1].minor.yy151, yymsp[0].minor.yy616); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createDropTableClause(pCxt, yymsp[-1].minor.yy313, yymsp[0].minor.yy840); } + yymsp[-1].minor.yy840 = yylhsminor.yy840; break; case 138: /* specific_cols_opt ::= */ case 169: /* tags_def_opt ::= */ yytestcase(yyruleno==169); case 437: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==437); case 454: /* group_by_clause_opt ::= */ yytestcase(yyruleno==454); case 470: /* order_by_clause_opt ::= */ yytestcase(yyruleno==470); -{ yymsp[1].minor.yy356 = NULL; } +{ yymsp[1].minor.yy544 = NULL; } break; case 139: /* specific_cols_opt ::= NK_LP col_name_list NK_RP */ -{ yymsp[-2].minor.yy356 = yymsp[-1].minor.yy356; } +{ yymsp[-2].minor.yy544 = yymsp[-1].minor.yy544; } break; case 140: /* full_table_name ::= table_name */ -{ yylhsminor.yy616 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy361, NULL); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRealTableNode(pCxt, NULL, &yymsp[0].minor.yy617, NULL); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 141: /* full_table_name ::= db_name NK_DOT table_name */ -{ yylhsminor.yy616 = createRealTableNode(pCxt, &yymsp[-2].minor.yy361, &yymsp[0].minor.yy361, NULL); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRealTableNode(pCxt, &yymsp[-2].minor.yy617, &yymsp[0].minor.yy617, NULL); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 144: /* column_def ::= column_name type_name */ -{ yylhsminor.yy616 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy361, yymsp[0].minor.yy600, NULL); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createColumnDefNode(pCxt, &yymsp[-1].minor.yy617, yymsp[0].minor.yy784, NULL); } + yymsp[-1].minor.yy840 = yylhsminor.yy840; break; case 145: /* column_def ::= column_name type_name COMMENT NK_STRING */ -{ yylhsminor.yy616 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy361, yymsp[-2].minor.yy600, &yymsp[0].minor.yy0); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createColumnDefNode(pCxt, &yymsp[-3].minor.yy617, yymsp[-2].minor.yy784, &yymsp[0].minor.yy0); } + yymsp[-3].minor.yy840 = yylhsminor.yy840; break; case 146: /* type_name ::= BOOL */ -{ yymsp[0].minor.yy600 = createDataType(TSDB_DATA_TYPE_BOOL); } +{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_BOOL); } break; case 147: /* type_name ::= TINYINT */ -{ yymsp[0].minor.yy600 = createDataType(TSDB_DATA_TYPE_TINYINT); } +{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_TINYINT); } break; case 148: /* type_name ::= SMALLINT */ -{ yymsp[0].minor.yy600 = createDataType(TSDB_DATA_TYPE_SMALLINT); } +{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_SMALLINT); } break; case 149: /* type_name ::= INT */ case 150: /* type_name ::= INTEGER */ yytestcase(yyruleno==150); -{ yymsp[0].minor.yy600 = createDataType(TSDB_DATA_TYPE_INT); } +{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_INT); } break; case 151: /* type_name ::= BIGINT */ -{ yymsp[0].minor.yy600 = createDataType(TSDB_DATA_TYPE_BIGINT); } +{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_BIGINT); } break; case 152: /* type_name ::= FLOAT */ -{ yymsp[0].minor.yy600 = createDataType(TSDB_DATA_TYPE_FLOAT); } +{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_FLOAT); } break; case 153: /* type_name ::= DOUBLE */ -{ yymsp[0].minor.yy600 = createDataType(TSDB_DATA_TYPE_DOUBLE); } +{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_DOUBLE); } break; case 154: /* type_name ::= BINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy600 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy784 = createVarLenDataType(TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy0); } break; case 155: /* type_name ::= TIMESTAMP */ -{ yymsp[0].minor.yy600 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } +{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_TIMESTAMP); } break; case 156: /* type_name ::= NCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy600 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy784 = createVarLenDataType(TSDB_DATA_TYPE_NCHAR, &yymsp[-1].minor.yy0); } break; case 157: /* type_name ::= TINYINT UNSIGNED */ -{ yymsp[-1].minor.yy600 = createDataType(TSDB_DATA_TYPE_UTINYINT); } +{ yymsp[-1].minor.yy784 = createDataType(TSDB_DATA_TYPE_UTINYINT); } break; case 158: /* type_name ::= SMALLINT UNSIGNED */ -{ yymsp[-1].minor.yy600 = createDataType(TSDB_DATA_TYPE_USMALLINT); } +{ yymsp[-1].minor.yy784 = createDataType(TSDB_DATA_TYPE_USMALLINT); } break; case 159: /* type_name ::= INT UNSIGNED */ -{ yymsp[-1].minor.yy600 = createDataType(TSDB_DATA_TYPE_UINT); } +{ yymsp[-1].minor.yy784 = createDataType(TSDB_DATA_TYPE_UINT); } break; case 160: /* type_name ::= BIGINT UNSIGNED */ -{ yymsp[-1].minor.yy600 = createDataType(TSDB_DATA_TYPE_UBIGINT); } +{ yymsp[-1].minor.yy784 = createDataType(TSDB_DATA_TYPE_UBIGINT); } break; case 161: /* type_name ::= JSON */ -{ yymsp[0].minor.yy600 = createDataType(TSDB_DATA_TYPE_JSON); } +{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_JSON); } break; case 162: /* type_name ::= VARCHAR NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy600 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy784 = createVarLenDataType(TSDB_DATA_TYPE_VARCHAR, &yymsp[-1].minor.yy0); } break; case 163: /* type_name ::= MEDIUMBLOB */ -{ yymsp[0].minor.yy600 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } +{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_MEDIUMBLOB); } break; case 164: /* type_name ::= BLOB */ -{ yymsp[0].minor.yy600 = createDataType(TSDB_DATA_TYPE_BLOB); } +{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_BLOB); } break; case 165: /* type_name ::= VARBINARY NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy600 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } +{ yymsp[-3].minor.yy784 = createVarLenDataType(TSDB_DATA_TYPE_VARBINARY, &yymsp[-1].minor.yy0); } break; case 166: /* type_name ::= DECIMAL */ -{ yymsp[0].minor.yy600 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[0].minor.yy784 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 167: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_RP */ -{ yymsp[-3].minor.yy600 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-3].minor.yy784 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 168: /* type_name ::= DECIMAL NK_LP NK_INTEGER NK_COMMA NK_INTEGER NK_RP */ -{ yymsp[-5].minor.yy600 = createDataType(TSDB_DATA_TYPE_DECIMAL); } +{ yymsp[-5].minor.yy784 = createDataType(TSDB_DATA_TYPE_DECIMAL); } break; case 170: /* tags_def_opt ::= tags_def */ case 373: /* star_func_para_list ::= other_para_list */ yytestcase(yyruleno==373); -{ yylhsminor.yy356 = yymsp[0].minor.yy356; } - yymsp[0].minor.yy356 = yylhsminor.yy356; +{ yylhsminor.yy544 = yymsp[0].minor.yy544; } + yymsp[0].minor.yy544 = yylhsminor.yy544; break; case 171: /* tags_def ::= TAGS NK_LP column_def_list NK_RP */ -{ yymsp[-3].minor.yy356 = yymsp[-1].minor.yy356; } +{ yymsp[-3].minor.yy544 = yymsp[-1].minor.yy544; } break; case 172: /* table_options ::= */ -{ yymsp[1].minor.yy616 = createDefaultTableOptions(pCxt); } +{ yymsp[1].minor.yy840 = createDefaultTableOptions(pCxt); } break; case 173: /* table_options ::= table_options COMMENT NK_STRING */ -{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-2].minor.yy616, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setTableOption(pCxt, yymsp[-2].minor.yy840, TABLE_OPTION_COMMENT, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 174: /* table_options ::= table_options MAX_DELAY duration_list */ -{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-2].minor.yy616, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy356); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setTableOption(pCxt, yymsp[-2].minor.yy840, TABLE_OPTION_MAXDELAY, yymsp[0].minor.yy544); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 175: /* table_options ::= table_options WATERMARK duration_list */ -{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-2].minor.yy616, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy356); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setTableOption(pCxt, yymsp[-2].minor.yy840, TABLE_OPTION_WATERMARK, yymsp[0].minor.yy544); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 176: /* table_options ::= table_options ROLLUP NK_LP rollup_func_list NK_RP */ -{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-4].minor.yy616, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy356); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setTableOption(pCxt, yymsp[-4].minor.yy840, TABLE_OPTION_ROLLUP, yymsp[-1].minor.yy544); } + yymsp[-4].minor.yy840 = yylhsminor.yy840; break; case 177: /* table_options ::= table_options TTL NK_INTEGER */ -{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-2].minor.yy616, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setTableOption(pCxt, yymsp[-2].minor.yy840, TABLE_OPTION_TTL, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 178: /* table_options ::= table_options SMA NK_LP col_name_list NK_RP */ -{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-4].minor.yy616, TABLE_OPTION_SMA, yymsp[-1].minor.yy356); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setTableOption(pCxt, yymsp[-4].minor.yy840, TABLE_OPTION_SMA, yymsp[-1].minor.yy544); } + yymsp[-4].minor.yy840 = yylhsminor.yy840; break; case 179: /* alter_table_options ::= alter_table_option */ -{ yylhsminor.yy616 = createAlterTableOptions(pCxt); yylhsminor.yy616 = setTableOption(pCxt, yylhsminor.yy616, yymsp[0].minor.yy409.type, &yymsp[0].minor.yy409.val); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createAlterTableOptions(pCxt); yylhsminor.yy840 = setTableOption(pCxt, yylhsminor.yy840, yymsp[0].minor.yy95.type, &yymsp[0].minor.yy95.val); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 180: /* alter_table_options ::= alter_table_options alter_table_option */ -{ yylhsminor.yy616 = setTableOption(pCxt, yymsp[-1].minor.yy616, yymsp[0].minor.yy409.type, &yymsp[0].minor.yy409.val); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setTableOption(pCxt, yymsp[-1].minor.yy840, yymsp[0].minor.yy95.type, &yymsp[0].minor.yy95.val); } + yymsp[-1].minor.yy840 = yylhsminor.yy840; break; case 181: /* alter_table_option ::= COMMENT NK_STRING */ -{ yymsp[-1].minor.yy409.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy409.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy95.type = TABLE_OPTION_COMMENT; yymsp[-1].minor.yy95.val = yymsp[0].minor.yy0; } break; case 182: /* alter_table_option ::= TTL NK_INTEGER */ -{ yymsp[-1].minor.yy409.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy409.val = yymsp[0].minor.yy0; } +{ yymsp[-1].minor.yy95.type = TABLE_OPTION_TTL; yymsp[-1].minor.yy95.val = yymsp[0].minor.yy0; } break; case 183: /* duration_list ::= duration_literal */ case 340: /* expression_list ::= expression */ yytestcase(yyruleno==340); -{ yylhsminor.yy356 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy616)); } - yymsp[0].minor.yy356 = yylhsminor.yy356; +{ yylhsminor.yy544 = createNodeList(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy840)); } + yymsp[0].minor.yy544 = yylhsminor.yy544; break; case 184: /* duration_list ::= duration_list NK_COMMA duration_literal */ case 341: /* expression_list ::= expression_list NK_COMMA expression */ yytestcase(yyruleno==341); -{ yylhsminor.yy356 = addNodeToList(pCxt, yymsp[-2].minor.yy356, releaseRawExprNode(pCxt, yymsp[0].minor.yy616)); } - yymsp[-2].minor.yy356 = yylhsminor.yy356; +{ yylhsminor.yy544 = addNodeToList(pCxt, yymsp[-2].minor.yy544, releaseRawExprNode(pCxt, yymsp[0].minor.yy840)); } + yymsp[-2].minor.yy544 = yylhsminor.yy544; break; case 187: /* rollup_func_name ::= function_name */ -{ yylhsminor.yy616 = createFunctionNode(pCxt, &yymsp[0].minor.yy361, NULL); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createFunctionNode(pCxt, &yymsp[0].minor.yy617, NULL); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 188: /* rollup_func_name ::= FIRST */ case 189: /* rollup_func_name ::= LAST */ yytestcase(yyruleno==189); -{ yylhsminor.yy616 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 192: /* col_name ::= column_name */ -{ yylhsminor.yy616 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy361); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy617); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 193: /* cmd ::= SHOW DNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DNODES_STMT); } @@ -3949,13 +4063,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_DATABASES_STMT); } break; case 196: /* cmd ::= SHOW db_name_cond_opt TABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy616, yymsp[0].minor.yy616, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TABLES_STMT, yymsp[-2].minor.yy840, yymsp[0].minor.yy840, OP_TYPE_LIKE); } break; case 197: /* cmd ::= SHOW db_name_cond_opt STABLES like_pattern_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy616, yymsp[0].minor.yy616, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_STABLES_STMT, yymsp[-2].minor.yy840, yymsp[0].minor.yy840, OP_TYPE_LIKE); } break; case 198: /* cmd ::= SHOW db_name_cond_opt VGROUPS */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy616, NULL, OP_TYPE_LIKE); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_VGROUPS_STMT, yymsp[-1].minor.yy840, NULL, OP_TYPE_LIKE); } break; case 199: /* cmd ::= SHOW MNODES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_MNODES_STMT); } @@ -3970,7 +4084,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_FUNCTIONS_STMT); } break; case 203: /* cmd ::= SHOW INDEXES FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy616, yymsp[-1].minor.yy616, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_INDEXES_STMT, yymsp[0].minor.yy840, yymsp[-1].minor.yy840, OP_TYPE_EQUAL); } break; case 204: /* cmd ::= SHOW STREAMS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_STREAMS_STMT); } @@ -3989,13 +4103,13 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_LICENCES_STMT); } break; case 210: /* cmd ::= SHOW CREATE DATABASE db_name */ -{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy361); } +{ pCxt->pRootNode = createShowCreateDatabaseStmt(pCxt, &yymsp[0].minor.yy617); } break; case 211: /* cmd ::= SHOW CREATE TABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_TABLE_STMT, yymsp[0].minor.yy840); } break; case 212: /* cmd ::= SHOW CREATE STABLE full_table_name */ -{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createShowCreateTableStmt(pCxt, QUERY_NODE_SHOW_CREATE_STABLE_STMT, yymsp[0].minor.yy840); } break; case 213: /* cmd ::= SHOW QUERIES */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_QUERIES_STMT); } @@ -4028,7 +4142,7 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_TRANSACTIONS_STMT); } break; case 223: /* cmd ::= SHOW TABLE DISTRIBUTED full_table_name */ -{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createShowTableDistributedStmt(pCxt, yymsp[0].minor.yy840); } break; case 224: /* cmd ::= SHOW CONSUMERS */ { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_CONSUMERS_STMT); } @@ -4037,15 +4151,15 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createShowStmt(pCxt, QUERY_NODE_SHOW_SUBSCRIPTIONS_STMT); } break; case 226: /* cmd ::= SHOW TAGS FROM table_name_cond from_db_opt */ -{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy616, yymsp[-1].minor.yy616, OP_TYPE_EQUAL); } +{ pCxt->pRootNode = createShowStmtWithCond(pCxt, QUERY_NODE_SHOW_TAGS_STMT, yymsp[0].minor.yy840, yymsp[-1].minor.yy840, OP_TYPE_EQUAL); } break; case 227: /* db_name_cond_opt ::= */ case 232: /* from_db_opt ::= */ yytestcase(yyruleno==232); -{ yymsp[1].minor.yy616 = createDefaultDatabaseCondValue(pCxt); } +{ yymsp[1].minor.yy840 = createDefaultDatabaseCondValue(pCxt); } break; case 228: /* db_name_cond_opt ::= db_name NK_DOT */ -{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy361); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-1].minor.yy617); } + yymsp[-1].minor.yy840 = yylhsminor.yy840; break; case 229: /* like_pattern_opt ::= */ case 268: /* into_opt ::= */ yytestcase(yyruleno==268); @@ -4059,133 +4173,133 @@ static YYACTIONTYPE yy_reduce( case 462: /* every_opt ::= */ yytestcase(yyruleno==462); case 472: /* slimit_clause_opt ::= */ yytestcase(yyruleno==472); case 476: /* limit_clause_opt ::= */ yytestcase(yyruleno==476); -{ yymsp[1].minor.yy616 = NULL; } +{ yymsp[1].minor.yy840 = NULL; } break; case 230: /* like_pattern_opt ::= LIKE NK_STRING */ -{ yymsp[-1].minor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy840 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } break; case 231: /* table_name_cond ::= table_name */ -{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy361); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy617); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 233: /* from_db_opt ::= FROM db_name */ -{ yymsp[-1].minor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy361); } +{ yymsp[-1].minor.yy840 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy617); } break; case 234: /* cmd ::= CREATE SMA INDEX not_exists_opt full_table_name ON full_table_name index_options */ -{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy151, yymsp[-3].minor.yy616, yymsp[-1].minor.yy616, NULL, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createCreateIndexStmt(pCxt, INDEX_TYPE_SMA, yymsp[-4].minor.yy313, yymsp[-3].minor.yy840, yymsp[-1].minor.yy840, NULL, yymsp[0].minor.yy840); } break; case 235: /* cmd ::= DROP INDEX exists_opt full_table_name */ -{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy151, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createDropIndexStmt(pCxt, yymsp[-1].minor.yy313, yymsp[0].minor.yy840); } break; case 236: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-9].minor.yy616 = createIndexOption(pCxt, yymsp[-7].minor.yy356, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), NULL, yymsp[-1].minor.yy616, yymsp[0].minor.yy616); } +{ yymsp[-9].minor.yy840 = createIndexOption(pCxt, yymsp[-7].minor.yy544, releaseRawExprNode(pCxt, yymsp[-3].minor.yy840), NULL, yymsp[-1].minor.yy840, yymsp[0].minor.yy840); } break; case 237: /* index_options ::= FUNCTION NK_LP func_list NK_RP INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt sma_stream_opt */ -{ yymsp[-11].minor.yy616 = createIndexOption(pCxt, yymsp[-9].minor.yy356, releaseRawExprNode(pCxt, yymsp[-5].minor.yy616), releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), yymsp[-1].minor.yy616, yymsp[0].minor.yy616); } +{ yymsp[-11].minor.yy840 = createIndexOption(pCxt, yymsp[-9].minor.yy544, releaseRawExprNode(pCxt, yymsp[-5].minor.yy840), releaseRawExprNode(pCxt, yymsp[-3].minor.yy840), yymsp[-1].minor.yy840, yymsp[0].minor.yy840); } break; case 240: /* func ::= function_name NK_LP expression_list NK_RP */ -{ yylhsminor.yy616 = createFunctionNode(pCxt, &yymsp[-3].minor.yy361, yymsp[-1].minor.yy356); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createFunctionNode(pCxt, &yymsp[-3].minor.yy617, yymsp[-1].minor.yy544); } + yymsp[-3].minor.yy840 = yylhsminor.yy840; break; case 241: /* sma_stream_opt ::= */ case 270: /* stream_options ::= */ yytestcase(yyruleno==270); -{ yymsp[1].minor.yy616 = createStreamOptions(pCxt); } +{ yymsp[1].minor.yy840 = createStreamOptions(pCxt); } break; case 242: /* sma_stream_opt ::= stream_options WATERMARK duration_literal */ case 274: /* stream_options ::= stream_options WATERMARK duration_literal */ yytestcase(yyruleno==274); -{ ((SStreamOptions*)yymsp[-2].minor.yy616)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy616); yylhsminor.yy616 = yymsp[-2].minor.yy616; } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ ((SStreamOptions*)yymsp[-2].minor.yy840)->pWatermark = releaseRawExprNode(pCxt, yymsp[0].minor.yy840); yylhsminor.yy840 = yymsp[-2].minor.yy840; } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 243: /* sma_stream_opt ::= stream_options MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-2].minor.yy616)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy616); yylhsminor.yy616 = yymsp[-2].minor.yy616; } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ ((SStreamOptions*)yymsp[-2].minor.yy840)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy840); yylhsminor.yy840 = yymsp[-2].minor.yy840; } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 244: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS query_expression */ -{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy151, &yymsp[-2].minor.yy361, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createCreateTopicStmtUseQuery(pCxt, yymsp[-3].minor.yy313, &yymsp[-2].minor.yy617, yymsp[0].minor.yy840); } break; case 245: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy151, &yymsp[-3].minor.yy361, &yymsp[0].minor.yy361, false); } +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-4].minor.yy313, &yymsp[-3].minor.yy617, &yymsp[0].minor.yy617, false); } break; case 246: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS DATABASE db_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy151, &yymsp[-5].minor.yy361, &yymsp[0].minor.yy361, true); } +{ pCxt->pRootNode = createCreateTopicStmtUseDb(pCxt, yymsp[-6].minor.yy313, &yymsp[-5].minor.yy617, &yymsp[0].minor.yy617, true); } break; case 247: /* cmd ::= CREATE TOPIC not_exists_opt topic_name AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy151, &yymsp[-3].minor.yy361, yymsp[0].minor.yy616, false); } +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-4].minor.yy313, &yymsp[-3].minor.yy617, yymsp[0].minor.yy840, false); } break; case 248: /* cmd ::= CREATE TOPIC not_exists_opt topic_name WITH META AS STABLE full_table_name */ -{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy151, &yymsp[-5].minor.yy361, yymsp[0].minor.yy616, true); } +{ pCxt->pRootNode = createCreateTopicStmtUseTable(pCxt, yymsp[-6].minor.yy313, &yymsp[-5].minor.yy617, yymsp[0].minor.yy840, true); } break; case 249: /* cmd ::= DROP TOPIC exists_opt topic_name */ -{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy151, &yymsp[0].minor.yy361); } +{ pCxt->pRootNode = createDropTopicStmt(pCxt, yymsp[-1].minor.yy313, &yymsp[0].minor.yy617); } break; case 250: /* cmd ::= DROP CONSUMER GROUP exists_opt cgroup_name ON topic_name */ -{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy151, &yymsp[-2].minor.yy361, &yymsp[0].minor.yy361); } +{ pCxt->pRootNode = createDropCGroupStmt(pCxt, yymsp[-3].minor.yy313, &yymsp[-2].minor.yy617, &yymsp[0].minor.yy617); } break; case 251: /* cmd ::= DESC full_table_name */ case 252: /* cmd ::= DESCRIBE full_table_name */ yytestcase(yyruleno==252); -{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createDescribeStmt(pCxt, yymsp[0].minor.yy840); } break; case 253: /* cmd ::= RESET QUERY CACHE */ { pCxt->pRootNode = createResetQueryCacheStmt(pCxt); } break; case 254: /* cmd ::= EXPLAIN analyze_opt explain_options query_expression */ -{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy151, yymsp[-1].minor.yy616, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createExplainStmt(pCxt, yymsp[-2].minor.yy313, yymsp[-1].minor.yy840, yymsp[0].minor.yy840); } break; case 256: /* analyze_opt ::= ANALYZE */ case 263: /* agg_func_opt ::= AGGREGATE */ yytestcase(yyruleno==263); case 426: /* set_quantifier_opt ::= DISTINCT */ yytestcase(yyruleno==426); -{ yymsp[0].minor.yy151 = true; } +{ yymsp[0].minor.yy313 = true; } break; case 257: /* explain_options ::= */ -{ yymsp[1].minor.yy616 = createDefaultExplainOptions(pCxt); } +{ yymsp[1].minor.yy840 = createDefaultExplainOptions(pCxt); } break; case 258: /* explain_options ::= explain_options VERBOSE NK_BOOL */ -{ yylhsminor.yy616 = setExplainVerbose(pCxt, yymsp[-2].minor.yy616, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setExplainVerbose(pCxt, yymsp[-2].minor.yy840, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 259: /* explain_options ::= explain_options RATIO NK_FLOAT */ -{ yylhsminor.yy616 = setExplainRatio(pCxt, yymsp[-2].minor.yy616, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setExplainRatio(pCxt, yymsp[-2].minor.yy840, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 260: /* cmd ::= CREATE agg_func_opt FUNCTION not_exists_opt function_name AS NK_STRING OUTPUTTYPE type_name bufsize_opt */ -{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy151, yymsp[-8].minor.yy151, &yymsp[-5].minor.yy361, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy600, yymsp[0].minor.yy734); } +{ pCxt->pRootNode = createCreateFunctionStmt(pCxt, yymsp[-6].minor.yy313, yymsp[-8].minor.yy313, &yymsp[-5].minor.yy617, &yymsp[-3].minor.yy0, yymsp[-1].minor.yy784, yymsp[0].minor.yy844); } break; case 261: /* cmd ::= DROP FUNCTION exists_opt function_name */ -{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy151, &yymsp[0].minor.yy361); } +{ pCxt->pRootNode = createDropFunctionStmt(pCxt, yymsp[-1].minor.yy313, &yymsp[0].minor.yy617); } break; case 264: /* bufsize_opt ::= */ -{ yymsp[1].minor.yy734 = 0; } +{ yymsp[1].minor.yy844 = 0; } break; case 265: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ -{ yymsp[-1].minor.yy734 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } +{ yymsp[-1].minor.yy844 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } break; case 266: /* cmd ::= CREATE STREAM not_exists_opt stream_name stream_options into_opt AS query_expression */ -{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy151, &yymsp[-4].minor.yy361, yymsp[-2].minor.yy616, yymsp[-3].minor.yy616, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createCreateStreamStmt(pCxt, yymsp[-5].minor.yy313, &yymsp[-4].minor.yy617, yymsp[-2].minor.yy840, yymsp[-3].minor.yy840, yymsp[0].minor.yy840); } break; case 267: /* cmd ::= DROP STREAM exists_opt stream_name */ -{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy151, &yymsp[0].minor.yy361); } +{ pCxt->pRootNode = createDropStreamStmt(pCxt, yymsp[-1].minor.yy313, &yymsp[0].minor.yy617); } break; case 269: /* into_opt ::= INTO full_table_name */ case 407: /* from_clause_opt ::= FROM table_reference_list */ yytestcase(yyruleno==407); case 436: /* where_clause_opt ::= WHERE search_condition */ yytestcase(yyruleno==436); case 459: /* having_clause_opt ::= HAVING search_condition */ yytestcase(yyruleno==459); -{ yymsp[-1].minor.yy616 = yymsp[0].minor.yy616; } +{ yymsp[-1].minor.yy840 = yymsp[0].minor.yy840; } break; case 271: /* stream_options ::= stream_options TRIGGER AT_ONCE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy616)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy616 = yymsp[-2].minor.yy616; } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ ((SStreamOptions*)yymsp[-2].minor.yy840)->triggerType = STREAM_TRIGGER_AT_ONCE; yylhsminor.yy840 = yymsp[-2].minor.yy840; } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 272: /* stream_options ::= stream_options TRIGGER WINDOW_CLOSE */ -{ ((SStreamOptions*)yymsp[-2].minor.yy616)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy616 = yymsp[-2].minor.yy616; } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ ((SStreamOptions*)yymsp[-2].minor.yy840)->triggerType = STREAM_TRIGGER_WINDOW_CLOSE; yylhsminor.yy840 = yymsp[-2].minor.yy840; } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 273: /* stream_options ::= stream_options TRIGGER MAX_DELAY duration_literal */ -{ ((SStreamOptions*)yymsp[-3].minor.yy616)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy616)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy616); yylhsminor.yy616 = yymsp[-3].minor.yy616; } - yymsp[-3].minor.yy616 = yylhsminor.yy616; +{ ((SStreamOptions*)yymsp[-3].minor.yy840)->triggerType = STREAM_TRIGGER_MAX_DELAY; ((SStreamOptions*)yymsp[-3].minor.yy840)->pDelay = releaseRawExprNode(pCxt, yymsp[0].minor.yy840); yylhsminor.yy840 = yymsp[-3].minor.yy840; } + yymsp[-3].minor.yy840 = yylhsminor.yy840; break; case 275: /* stream_options ::= stream_options IGNORE EXPIRED */ -{ ((SStreamOptions*)yymsp[-2].minor.yy616)->ignoreExpired = true; yylhsminor.yy616 = yymsp[-2].minor.yy616; } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ ((SStreamOptions*)yymsp[-2].minor.yy840)->ignoreExpired = true; yylhsminor.yy840 = yymsp[-2].minor.yy840; } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 276: /* cmd ::= KILL CONNECTION NK_INTEGER */ { pCxt->pRootNode = createKillStmt(pCxt, QUERY_NODE_KILL_CONNECTION_STMT, &yymsp[0].minor.yy0); } @@ -4203,42 +4317,42 @@ static YYACTIONTYPE yy_reduce( { pCxt->pRootNode = createMergeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; case 281: /* cmd ::= REDISTRIBUTE VGROUP NK_INTEGER dnode_list */ -{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy356); } +{ pCxt->pRootNode = createRedistributeVgroupStmt(pCxt, &yymsp[-1].minor.yy0, yymsp[0].minor.yy544); } break; case 282: /* cmd ::= SPLIT VGROUP NK_INTEGER */ { pCxt->pRootNode = createSplitVgroupStmt(pCxt, &yymsp[0].minor.yy0); } break; case 283: /* dnode_list ::= DNODE NK_INTEGER */ -{ yymsp[-1].minor.yy356 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } +{ yymsp[-1].minor.yy544 = createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &yymsp[0].minor.yy0)); } break; case 285: /* cmd ::= DELETE FROM full_table_name where_clause_opt */ -{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy616, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createDeleteStmt(pCxt, yymsp[-1].minor.yy840, yymsp[0].minor.yy840); } break; case 287: /* cmd ::= INSERT INTO full_table_name NK_LP col_name_list NK_RP query_expression */ -{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy616, yymsp[-2].minor.yy356, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-4].minor.yy840, yymsp[-2].minor.yy544, yymsp[0].minor.yy840); } break; case 288: /* cmd ::= INSERT INTO full_table_name query_expression */ -{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy616, NULL, yymsp[0].minor.yy616); } +{ pCxt->pRootNode = createInsertStmt(pCxt, yymsp[-1].minor.yy840, NULL, yymsp[0].minor.yy840); } break; case 289: /* literal ::= NK_INTEGER */ -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 290: /* literal ::= NK_FLOAT */ -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 291: /* literal ::= NK_STRING */ -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 292: /* literal ::= NK_BOOL */ -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 293: /* literal ::= TIMESTAMP NK_STRING */ -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0)); } + yymsp[-1].minor.yy840 = yylhsminor.yy840; break; case 294: /* literal ::= duration_literal */ case 304: /* signed_literal ::= signed */ yytestcase(yyruleno==304); @@ -4258,167 +4372,167 @@ static YYACTIONTYPE yy_reduce( case 415: /* table_primary ::= parenthesized_joined_table */ yytestcase(yyruleno==415); case 465: /* query_expression_body ::= query_primary */ yytestcase(yyruleno==465); case 468: /* query_primary ::= query_specification */ yytestcase(yyruleno==468); -{ yylhsminor.yy616 = yymsp[0].minor.yy616; } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = yymsp[0].minor.yy840; } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 295: /* literal ::= NULL */ -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 296: /* literal ::= NK_QUESTION */ -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 297: /* duration_literal ::= NK_VARIABLE */ -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createDurationValueNode(pCxt, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 298: /* signed ::= NK_INTEGER */ -{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 299: /* signed ::= NK_PLUS NK_INTEGER */ -{ yymsp[-1].minor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy840 = createValueNode(pCxt, TSDB_DATA_TYPE_UBIGINT, &yymsp[0].minor.yy0); } break; case 300: /* signed ::= NK_MINUS NK_INTEGER */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); + yylhsminor.yy840 = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &t); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; + yymsp[-1].minor.yy840 = yylhsminor.yy840; break; case 301: /* signed ::= NK_FLOAT */ -{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 302: /* signed ::= NK_PLUS NK_FLOAT */ -{ yymsp[-1].minor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy840 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &yymsp[0].minor.yy0); } break; case 303: /* signed ::= NK_MINUS NK_FLOAT */ { SToken t = yymsp[-1].minor.yy0; t.n = (yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z; - yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); + yylhsminor.yy840 = createValueNode(pCxt, TSDB_DATA_TYPE_DOUBLE, &t); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; + yymsp[-1].minor.yy840 = yylhsminor.yy840; break; case 305: /* signed_literal ::= NK_STRING */ -{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 306: /* signed_literal ::= NK_BOOL */ -{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createValueNode(pCxt, TSDB_DATA_TYPE_BOOL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 307: /* signed_literal ::= TIMESTAMP NK_STRING */ -{ yymsp[-1].minor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } +{ yymsp[-1].minor.yy840 = createValueNode(pCxt, TSDB_DATA_TYPE_TIMESTAMP, &yymsp[0].minor.yy0); } break; case 308: /* signed_literal ::= duration_literal */ case 310: /* signed_literal ::= literal_func */ yytestcase(yyruleno==310); case 376: /* star_func_para ::= expression */ yytestcase(yyruleno==376); case 431: /* select_item ::= common_expression */ yytestcase(yyruleno==431); case 481: /* search_condition ::= common_expression */ yytestcase(yyruleno==481); -{ yylhsminor.yy616 = releaseRawExprNode(pCxt, yymsp[0].minor.yy616); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = releaseRawExprNode(pCxt, yymsp[0].minor.yy840); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 309: /* signed_literal ::= NULL */ -{ yylhsminor.yy616 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createValueNode(pCxt, TSDB_DATA_TYPE_NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 311: /* signed_literal ::= NK_QUESTION */ -{ yylhsminor.yy616 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createPlaceholderValueNode(pCxt, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 329: /* expression ::= NK_LP expression NK_RP */ case 403: /* boolean_primary ::= NK_LP boolean_value_expression NK_RP */ yytestcase(yyruleno==403); -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy616)); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, releaseRawExprNode(pCxt, yymsp[-1].minor.yy840)); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 330: /* expression ::= NK_PLUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy616)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, releaseRawExprNode(pCxt, yymsp[0].minor.yy840)); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; + yymsp[-1].minor.yy840 = yylhsminor.yy840; break; case 331: /* expression ::= NK_MINUS expression */ { - SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy616), NULL)); + SToken t = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &t, createOperatorNode(pCxt, OP_TYPE_MINUS, releaseRawExprNode(pCxt, yymsp[0].minor.yy840), NULL)); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; + yymsp[-1].minor.yy840 = yylhsminor.yy840; break; case 332: /* expression ::= expression NK_PLUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy840); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_ADD, releaseRawExprNode(pCxt, yymsp[-2].minor.yy840), releaseRawExprNode(pCxt, yymsp[0].minor.yy840))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 333: /* expression ::= expression NK_MINUS expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy840); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_SUB, releaseRawExprNode(pCxt, yymsp[-2].minor.yy840), releaseRawExprNode(pCxt, yymsp[0].minor.yy840))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 334: /* expression ::= expression NK_STAR expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy840); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_MULTI, releaseRawExprNode(pCxt, yymsp[-2].minor.yy840), releaseRawExprNode(pCxt, yymsp[0].minor.yy840))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 335: /* expression ::= expression NK_SLASH expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy840); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_DIV, releaseRawExprNode(pCxt, yymsp[-2].minor.yy840), releaseRawExprNode(pCxt, yymsp[0].minor.yy840))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 336: /* expression ::= expression NK_REM expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy840); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_REM, releaseRawExprNode(pCxt, yymsp[-2].minor.yy840), releaseRawExprNode(pCxt, yymsp[0].minor.yy840))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 337: /* expression ::= column_reference NK_ARROW NK_STRING */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_JSON_GET_VALUE, releaseRawExprNode(pCxt, yymsp[-2].minor.yy840), createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[0].minor.yy0))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 338: /* expression ::= expression NK_BITAND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy840); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy840), releaseRawExprNode(pCxt, yymsp[0].minor.yy840))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 339: /* expression ::= expression NK_BITOR expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy840); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, OP_TYPE_BIT_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy840), releaseRawExprNode(pCxt, yymsp[0].minor.yy840))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 342: /* column_reference ::= column_name */ -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy361, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy361)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNode(pCxt, &yymsp[0].minor.yy617, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy617)); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 343: /* column_reference ::= table_name NK_DOT column_name */ -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy361, &yymsp[0].minor.yy361, createColumnNode(pCxt, &yymsp[-2].minor.yy361, &yymsp[0].minor.yy361)); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy617, &yymsp[0].minor.yy617, createColumnNode(pCxt, &yymsp[-2].minor.yy617, &yymsp[0].minor.yy617)); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 344: /* pseudo_column ::= ROWTS */ case 345: /* pseudo_column ::= TBNAME */ yytestcase(yyruleno==345); @@ -4429,321 +4543,321 @@ static YYACTIONTYPE yy_reduce( case 351: /* pseudo_column ::= WEND */ yytestcase(yyruleno==351); case 352: /* pseudo_column ::= WDURATION */ yytestcase(yyruleno==352); case 358: /* literal_func ::= NOW */ yytestcase(yyruleno==358); -{ yylhsminor.yy616 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNode(pCxt, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, NULL)); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 346: /* pseudo_column ::= table_name NK_DOT TBNAME */ -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy361, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy361)))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy617, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[0].minor.yy0, createNodeList(pCxt, createValueNode(pCxt, TSDB_DATA_TYPE_BINARY, &yymsp[-2].minor.yy617)))); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 353: /* function_expression ::= function_name NK_LP expression_list NK_RP */ case 354: /* function_expression ::= star_func NK_LP star_func_para_list NK_RP */ yytestcase(yyruleno==354); -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy361, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy361, yymsp[-1].minor.yy356)); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNodeExt(pCxt, &yymsp[-3].minor.yy617, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-3].minor.yy617, yymsp[-1].minor.yy544)); } + yymsp[-3].minor.yy840 = yylhsminor.yy840; break; case 355: /* function_expression ::= CAST NK_LP expression AS type_name NK_RP */ -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), yymsp[-1].minor.yy600)); } - yymsp[-5].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNodeExt(pCxt, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, createCastFunctionNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy840), yymsp[-1].minor.yy784)); } + yymsp[-5].minor.yy840 = yylhsminor.yy840; break; case 357: /* literal_func ::= noarg_func NK_LP NK_RP */ -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy361, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy361, NULL)); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy617, &yymsp[0].minor.yy0, createFunctionNode(pCxt, &yymsp[-2].minor.yy617, NULL)); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 372: /* star_func_para_list ::= NK_STAR */ -{ yylhsminor.yy356 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } - yymsp[0].minor.yy356 = yylhsminor.yy356; +{ yylhsminor.yy544 = createNodeList(pCxt, createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0)); } + yymsp[0].minor.yy544 = yylhsminor.yy544; break; case 377: /* star_func_para ::= table_name NK_DOT NK_STAR */ case 434: /* select_item ::= table_name NK_DOT NK_STAR */ yytestcase(yyruleno==434); -{ yylhsminor.yy616 = createColumnNode(pCxt, &yymsp[-2].minor.yy361, &yymsp[0].minor.yy0); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createColumnNode(pCxt, &yymsp[-2].minor.yy617, &yymsp[0].minor.yy0); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 378: /* predicate ::= expression compare_op expression */ case 383: /* predicate ::= expression in_op in_predicate_value */ yytestcase(yyruleno==383); { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy526, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy840); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &s, &e, createOperatorNode(pCxt, yymsp[-1].minor.yy198, releaseRawExprNode(pCxt, yymsp[-2].minor.yy840), releaseRawExprNode(pCxt, yymsp[0].minor.yy840))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 379: /* predicate ::= expression BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy616), releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-4].minor.yy840); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &s, &e, createBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-4].minor.yy840), releaseRawExprNode(pCxt, yymsp[-2].minor.yy840), releaseRawExprNode(pCxt, yymsp[0].minor.yy840))); } - yymsp[-4].minor.yy616 = yylhsminor.yy616; + yymsp[-4].minor.yy840 = yylhsminor.yy840; break; case 380: /* predicate ::= expression NOT BETWEEN expression AND expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy616), releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-5].minor.yy840); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &s, &e, createNotBetweenAnd(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy840), releaseRawExprNode(pCxt, yymsp[-2].minor.yy840), releaseRawExprNode(pCxt, yymsp[0].minor.yy840))); } - yymsp[-5].minor.yy616 = yylhsminor.yy616; + yymsp[-5].minor.yy840 = yylhsminor.yy840; break; case 381: /* predicate ::= expression IS NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NULL, releaseRawExprNode(pCxt, yymsp[-2].minor.yy840), NULL)); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 382: /* predicate ::= expression IS NOT NULL */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), NULL)); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-3].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &s, &yymsp[0].minor.yy0, createOperatorNode(pCxt, OP_TYPE_IS_NOT_NULL, releaseRawExprNode(pCxt, yymsp[-3].minor.yy840), NULL)); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; + yymsp[-3].minor.yy840 = yylhsminor.yy840; break; case 384: /* compare_op ::= NK_LT */ -{ yymsp[0].minor.yy526 = OP_TYPE_LOWER_THAN; } +{ yymsp[0].minor.yy198 = OP_TYPE_LOWER_THAN; } break; case 385: /* compare_op ::= NK_GT */ -{ yymsp[0].minor.yy526 = OP_TYPE_GREATER_THAN; } +{ yymsp[0].minor.yy198 = OP_TYPE_GREATER_THAN; } break; case 386: /* compare_op ::= NK_LE */ -{ yymsp[0].minor.yy526 = OP_TYPE_LOWER_EQUAL; } +{ yymsp[0].minor.yy198 = OP_TYPE_LOWER_EQUAL; } break; case 387: /* compare_op ::= NK_GE */ -{ yymsp[0].minor.yy526 = OP_TYPE_GREATER_EQUAL; } +{ yymsp[0].minor.yy198 = OP_TYPE_GREATER_EQUAL; } break; case 388: /* compare_op ::= NK_NE */ -{ yymsp[0].minor.yy526 = OP_TYPE_NOT_EQUAL; } +{ yymsp[0].minor.yy198 = OP_TYPE_NOT_EQUAL; } break; case 389: /* compare_op ::= NK_EQ */ -{ yymsp[0].minor.yy526 = OP_TYPE_EQUAL; } +{ yymsp[0].minor.yy198 = OP_TYPE_EQUAL; } break; case 390: /* compare_op ::= LIKE */ -{ yymsp[0].minor.yy526 = OP_TYPE_LIKE; } +{ yymsp[0].minor.yy198 = OP_TYPE_LIKE; } break; case 391: /* compare_op ::= NOT LIKE */ -{ yymsp[-1].minor.yy526 = OP_TYPE_NOT_LIKE; } +{ yymsp[-1].minor.yy198 = OP_TYPE_NOT_LIKE; } break; case 392: /* compare_op ::= MATCH */ -{ yymsp[0].minor.yy526 = OP_TYPE_MATCH; } +{ yymsp[0].minor.yy198 = OP_TYPE_MATCH; } break; case 393: /* compare_op ::= NMATCH */ -{ yymsp[0].minor.yy526 = OP_TYPE_NMATCH; } +{ yymsp[0].minor.yy198 = OP_TYPE_NMATCH; } break; case 394: /* compare_op ::= CONTAINS */ -{ yymsp[0].minor.yy526 = OP_TYPE_JSON_CONTAINS; } +{ yymsp[0].minor.yy198 = OP_TYPE_JSON_CONTAINS; } break; case 395: /* in_op ::= IN */ -{ yymsp[0].minor.yy526 = OP_TYPE_IN; } +{ yymsp[0].minor.yy198 = OP_TYPE_IN; } break; case 396: /* in_op ::= NOT IN */ -{ yymsp[-1].minor.yy526 = OP_TYPE_NOT_IN; } +{ yymsp[-1].minor.yy198 = OP_TYPE_NOT_IN; } break; case 397: /* in_predicate_value ::= NK_LP literal_list NK_RP */ -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy356)); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, createNodeListNode(pCxt, yymsp[-1].minor.yy544)); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 399: /* boolean_value_expression ::= NOT boolean_primary */ { - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy616), NULL)); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &yymsp[-1].minor.yy0, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_NOT, releaseRawExprNode(pCxt, yymsp[0].minor.yy840), NULL)); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; + yymsp[-1].minor.yy840 = yylhsminor.yy840; break; case 400: /* boolean_value_expression ::= boolean_value_expression OR boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy840); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_OR, releaseRawExprNode(pCxt, yymsp[-2].minor.yy840), releaseRawExprNode(pCxt, yymsp[0].minor.yy840))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 401: /* boolean_value_expression ::= boolean_value_expression AND boolean_value_expression */ { - SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy616); - SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy616); - yylhsminor.yy616 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); + SToken s = getTokenFromRawExprNode(pCxt, yymsp[-2].minor.yy840); + SToken e = getTokenFromRawExprNode(pCxt, yymsp[0].minor.yy840); + yylhsminor.yy840 = createRawExprNodeExt(pCxt, &s, &e, createLogicConditionNode(pCxt, LOGIC_COND_TYPE_AND, releaseRawExprNode(pCxt, yymsp[-2].minor.yy840), releaseRawExprNode(pCxt, yymsp[0].minor.yy840))); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 409: /* table_reference_list ::= table_reference_list NK_COMMA table_reference */ -{ yylhsminor.yy616 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy616, yymsp[0].minor.yy616, NULL); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createJoinTableNode(pCxt, JOIN_TYPE_INNER, yymsp[-2].minor.yy840, yymsp[0].minor.yy840, NULL); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 412: /* table_primary ::= table_name alias_opt */ -{ yylhsminor.yy616 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy361, &yymsp[0].minor.yy361); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRealTableNode(pCxt, NULL, &yymsp[-1].minor.yy617, &yymsp[0].minor.yy617); } + yymsp[-1].minor.yy840 = yylhsminor.yy840; break; case 413: /* table_primary ::= db_name NK_DOT table_name alias_opt */ -{ yylhsminor.yy616 = createRealTableNode(pCxt, &yymsp[-3].minor.yy361, &yymsp[-1].minor.yy361, &yymsp[0].minor.yy361); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRealTableNode(pCxt, &yymsp[-3].minor.yy617, &yymsp[-1].minor.yy617, &yymsp[0].minor.yy617); } + yymsp[-3].minor.yy840 = yylhsminor.yy840; break; case 414: /* table_primary ::= subquery alias_opt */ -{ yylhsminor.yy616 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy616), &yymsp[0].minor.yy361); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createTempTableNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy840), &yymsp[0].minor.yy617); } + yymsp[-1].minor.yy840 = yylhsminor.yy840; break; case 416: /* alias_opt ::= */ -{ yymsp[1].minor.yy361 = nil_token; } +{ yymsp[1].minor.yy617 = nil_token; } break; case 417: /* alias_opt ::= table_alias */ -{ yylhsminor.yy361 = yymsp[0].minor.yy361; } - yymsp[0].minor.yy361 = yylhsminor.yy361; +{ yylhsminor.yy617 = yymsp[0].minor.yy617; } + yymsp[0].minor.yy617 = yylhsminor.yy617; break; case 418: /* alias_opt ::= AS table_alias */ -{ yymsp[-1].minor.yy361 = yymsp[0].minor.yy361; } +{ yymsp[-1].minor.yy617 = yymsp[0].minor.yy617; } break; case 419: /* parenthesized_joined_table ::= NK_LP joined_table NK_RP */ case 420: /* parenthesized_joined_table ::= NK_LP parenthesized_joined_table NK_RP */ yytestcase(yyruleno==420); -{ yymsp[-2].minor.yy616 = yymsp[-1].minor.yy616; } +{ yymsp[-2].minor.yy840 = yymsp[-1].minor.yy840; } break; case 421: /* joined_table ::= table_reference join_type JOIN table_reference ON search_condition */ -{ yylhsminor.yy616 = createJoinTableNode(pCxt, yymsp[-4].minor.yy504, yymsp[-5].minor.yy616, yymsp[-2].minor.yy616, yymsp[0].minor.yy616); } - yymsp[-5].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createJoinTableNode(pCxt, yymsp[-4].minor.yy708, yymsp[-5].minor.yy840, yymsp[-2].minor.yy840, yymsp[0].minor.yy840); } + yymsp[-5].minor.yy840 = yylhsminor.yy840; break; case 422: /* join_type ::= */ -{ yymsp[1].minor.yy504 = JOIN_TYPE_INNER; } +{ yymsp[1].minor.yy708 = JOIN_TYPE_INNER; } break; case 423: /* join_type ::= INNER */ -{ yymsp[0].minor.yy504 = JOIN_TYPE_INNER; } +{ yymsp[0].minor.yy708 = JOIN_TYPE_INNER; } break; case 424: /* query_specification ::= SELECT set_quantifier_opt select_list from_clause_opt where_clause_opt partition_by_clause_opt range_opt every_opt fill_opt twindow_clause_opt group_by_clause_opt having_clause_opt */ { - yymsp[-11].minor.yy616 = createSelectStmt(pCxt, yymsp[-10].minor.yy151, yymsp[-9].minor.yy356, yymsp[-8].minor.yy616); - yymsp[-11].minor.yy616 = addWhereClause(pCxt, yymsp[-11].minor.yy616, yymsp[-7].minor.yy616); - yymsp[-11].minor.yy616 = addPartitionByClause(pCxt, yymsp[-11].minor.yy616, yymsp[-6].minor.yy356); - yymsp[-11].minor.yy616 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy616, yymsp[-2].minor.yy616); - yymsp[-11].minor.yy616 = addGroupByClause(pCxt, yymsp[-11].minor.yy616, yymsp[-1].minor.yy356); - yymsp[-11].minor.yy616 = addHavingClause(pCxt, yymsp[-11].minor.yy616, yymsp[0].minor.yy616); - yymsp[-11].minor.yy616 = addRangeClause(pCxt, yymsp[-11].minor.yy616, yymsp[-5].minor.yy616); - yymsp[-11].minor.yy616 = addEveryClause(pCxt, yymsp[-11].minor.yy616, yymsp[-4].minor.yy616); - yymsp[-11].minor.yy616 = addFillClause(pCxt, yymsp[-11].minor.yy616, yymsp[-3].minor.yy616); + yymsp[-11].minor.yy840 = createSelectStmt(pCxt, yymsp[-10].minor.yy313, yymsp[-9].minor.yy544, yymsp[-8].minor.yy840); + yymsp[-11].minor.yy840 = addWhereClause(pCxt, yymsp[-11].minor.yy840, yymsp[-7].minor.yy840); + yymsp[-11].minor.yy840 = addPartitionByClause(pCxt, yymsp[-11].minor.yy840, yymsp[-6].minor.yy544); + yymsp[-11].minor.yy840 = addWindowClauseClause(pCxt, yymsp[-11].minor.yy840, yymsp[-2].minor.yy840); + yymsp[-11].minor.yy840 = addGroupByClause(pCxt, yymsp[-11].minor.yy840, yymsp[-1].minor.yy544); + yymsp[-11].minor.yy840 = addHavingClause(pCxt, yymsp[-11].minor.yy840, yymsp[0].minor.yy840); + yymsp[-11].minor.yy840 = addRangeClause(pCxt, yymsp[-11].minor.yy840, yymsp[-5].minor.yy840); + yymsp[-11].minor.yy840 = addEveryClause(pCxt, yymsp[-11].minor.yy840, yymsp[-4].minor.yy840); + yymsp[-11].minor.yy840 = addFillClause(pCxt, yymsp[-11].minor.yy840, yymsp[-3].minor.yy840); } break; case 427: /* set_quantifier_opt ::= ALL */ -{ yymsp[0].minor.yy151 = false; } +{ yymsp[0].minor.yy313 = false; } break; case 430: /* select_item ::= NK_STAR */ -{ yylhsminor.yy616 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createColumnNode(pCxt, NULL, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy840 = yylhsminor.yy840; break; case 432: /* select_item ::= common_expression column_alias */ -{ yylhsminor.yy616 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy616), &yymsp[0].minor.yy361); } - yymsp[-1].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy840), &yymsp[0].minor.yy617); } + yymsp[-1].minor.yy840 = yylhsminor.yy840; break; case 433: /* select_item ::= common_expression AS column_alias */ -{ yylhsminor.yy616 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), &yymsp[0].minor.yy361); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = setProjectionAlias(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy840), &yymsp[0].minor.yy617); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 438: /* partition_by_clause_opt ::= PARTITION BY expression_list */ case 455: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==455); case 471: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==471); -{ yymsp[-2].minor.yy356 = yymsp[0].minor.yy356; } +{ yymsp[-2].minor.yy544 = yymsp[0].minor.yy544; } break; case 440: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ -{ yymsp[-5].minor.yy616 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), releaseRawExprNode(pCxt, yymsp[-1].minor.yy616)); } +{ yymsp[-5].minor.yy840 = createSessionWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy840), releaseRawExprNode(pCxt, yymsp[-1].minor.yy840)); } break; case 441: /* twindow_clause_opt ::= STATE_WINDOW NK_LP expression NK_RP */ -{ yymsp[-3].minor.yy616 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy616)); } +{ yymsp[-3].minor.yy840 = createStateWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-1].minor.yy840)); } break; case 442: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-5].minor.yy616 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), NULL, yymsp[-1].minor.yy616, yymsp[0].minor.yy616); } +{ yymsp[-5].minor.yy840 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy840), NULL, yymsp[-1].minor.yy840, yymsp[0].minor.yy840); } break; case 443: /* twindow_clause_opt ::= INTERVAL NK_LP duration_literal NK_COMMA duration_literal NK_RP sliding_opt fill_opt */ -{ yymsp[-7].minor.yy616 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy616), releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), yymsp[-1].minor.yy616, yymsp[0].minor.yy616); } +{ yymsp[-7].minor.yy840 = createIntervalWindowNode(pCxt, releaseRawExprNode(pCxt, yymsp[-5].minor.yy840), releaseRawExprNode(pCxt, yymsp[-3].minor.yy840), yymsp[-1].minor.yy840, yymsp[0].minor.yy840); } break; case 445: /* sliding_opt ::= SLIDING NK_LP duration_literal NK_RP */ case 463: /* every_opt ::= EVERY NK_LP duration_literal NK_RP */ yytestcase(yyruleno==463); -{ yymsp[-3].minor.yy616 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy616); } +{ yymsp[-3].minor.yy840 = releaseRawExprNode(pCxt, yymsp[-1].minor.yy840); } break; case 447: /* fill_opt ::= FILL NK_LP fill_mode NK_RP */ -{ yymsp[-3].minor.yy616 = createFillNode(pCxt, yymsp[-1].minor.yy494, NULL); } +{ yymsp[-3].minor.yy840 = createFillNode(pCxt, yymsp[-1].minor.yy816, NULL); } break; case 448: /* fill_opt ::= FILL NK_LP VALUE NK_COMMA literal_list NK_RP */ -{ yymsp[-5].minor.yy616 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy356)); } +{ yymsp[-5].minor.yy840 = createFillNode(pCxt, FILL_MODE_VALUE, createNodeListNode(pCxt, yymsp[-1].minor.yy544)); } break; case 449: /* fill_mode ::= NONE */ -{ yymsp[0].minor.yy494 = FILL_MODE_NONE; } +{ yymsp[0].minor.yy816 = FILL_MODE_NONE; } break; case 450: /* fill_mode ::= PREV */ -{ yymsp[0].minor.yy494 = FILL_MODE_PREV; } +{ yymsp[0].minor.yy816 = FILL_MODE_PREV; } break; case 451: /* fill_mode ::= NULL */ -{ yymsp[0].minor.yy494 = FILL_MODE_NULL; } +{ yymsp[0].minor.yy816 = FILL_MODE_NULL; } break; case 452: /* fill_mode ::= LINEAR */ -{ yymsp[0].minor.yy494 = FILL_MODE_LINEAR; } +{ yymsp[0].minor.yy816 = FILL_MODE_LINEAR; } break; case 453: /* fill_mode ::= NEXT */ -{ yymsp[0].minor.yy494 = FILL_MODE_NEXT; } +{ yymsp[0].minor.yy816 = FILL_MODE_NEXT; } break; case 456: /* group_by_list ::= expression */ -{ yylhsminor.yy356 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); } - yymsp[0].minor.yy356 = yylhsminor.yy356; +{ yylhsminor.yy544 = createNodeList(pCxt, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy840))); } + yymsp[0].minor.yy544 = yylhsminor.yy544; break; case 457: /* group_by_list ::= group_by_list NK_COMMA expression */ -{ yylhsminor.yy356 = addNodeToList(pCxt, yymsp[-2].minor.yy356, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy616))); } - yymsp[-2].minor.yy356 = yylhsminor.yy356; +{ yylhsminor.yy544 = addNodeToList(pCxt, yymsp[-2].minor.yy544, createGroupingSetNode(pCxt, releaseRawExprNode(pCxt, yymsp[0].minor.yy840))); } + yymsp[-2].minor.yy544 = yylhsminor.yy544; break; case 461: /* range_opt ::= RANGE NK_LP expression NK_COMMA expression NK_RP */ -{ yymsp[-5].minor.yy616 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy616), releaseRawExprNode(pCxt, yymsp[-1].minor.yy616)); } +{ yymsp[-5].minor.yy840 = createInterpTimeRange(pCxt, releaseRawExprNode(pCxt, yymsp[-3].minor.yy840), releaseRawExprNode(pCxt, yymsp[-1].minor.yy840)); } break; case 464: /* query_expression ::= query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt */ { - yylhsminor.yy616 = addOrderByClause(pCxt, yymsp[-3].minor.yy616, yymsp[-2].minor.yy356); - yylhsminor.yy616 = addSlimitClause(pCxt, yylhsminor.yy616, yymsp[-1].minor.yy616); - yylhsminor.yy616 = addLimitClause(pCxt, yylhsminor.yy616, yymsp[0].minor.yy616); + yylhsminor.yy840 = addOrderByClause(pCxt, yymsp[-3].minor.yy840, yymsp[-2].minor.yy544); + yylhsminor.yy840 = addSlimitClause(pCxt, yylhsminor.yy840, yymsp[-1].minor.yy840); + yylhsminor.yy840 = addLimitClause(pCxt, yylhsminor.yy840, yymsp[0].minor.yy840); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; + yymsp[-3].minor.yy840 = yylhsminor.yy840; break; case 466: /* query_expression_body ::= query_expression_body UNION ALL query_expression_body */ -{ yylhsminor.yy616 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy616, yymsp[0].minor.yy616); } - yymsp[-3].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createSetOperator(pCxt, SET_OP_TYPE_UNION_ALL, yymsp[-3].minor.yy840, yymsp[0].minor.yy840); } + yymsp[-3].minor.yy840 = yylhsminor.yy840; break; case 467: /* query_expression_body ::= query_expression_body UNION query_expression_body */ -{ yylhsminor.yy616 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy616, yymsp[0].minor.yy616); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy840, yymsp[0].minor.yy840); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 469: /* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */ { - yymsp[-5].minor.yy616 = addOrderByClause(pCxt, yymsp[-4].minor.yy616, yymsp[-3].minor.yy356); - yymsp[-5].minor.yy616 = addSlimitClause(pCxt, yymsp[-5].minor.yy616, yymsp[-2].minor.yy616); - yymsp[-5].minor.yy616 = addLimitClause(pCxt, yymsp[-5].minor.yy616, yymsp[-1].minor.yy616); + yymsp[-5].minor.yy840 = addOrderByClause(pCxt, yymsp[-4].minor.yy840, yymsp[-3].minor.yy544); + yymsp[-5].minor.yy840 = addSlimitClause(pCxt, yymsp[-5].minor.yy840, yymsp[-2].minor.yy840); + yymsp[-5].minor.yy840 = addLimitClause(pCxt, yymsp[-5].minor.yy840, yymsp[-1].minor.yy840); } break; case 473: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ case 477: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==477); -{ yymsp[-1].minor.yy616 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } +{ yymsp[-1].minor.yy840 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } break; case 474: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ case 478: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==478); -{ yymsp[-3].minor.yy616 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } +{ yymsp[-3].minor.yy840 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } break; case 475: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ case 479: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==479); -{ yymsp[-3].minor.yy616 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } +{ yymsp[-3].minor.yy840 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } break; case 480: /* subquery ::= NK_LP query_expression NK_RP */ -{ yylhsminor.yy616 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy616); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy840); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 484: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ -{ yylhsminor.yy616 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy616), yymsp[-1].minor.yy58, yymsp[0].minor.yy613); } - yymsp[-2].minor.yy616 = yylhsminor.yy616; +{ yylhsminor.yy840 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy840), yymsp[-1].minor.yy204, yymsp[0].minor.yy277); } + yymsp[-2].minor.yy840 = yylhsminor.yy840; break; case 485: /* ordering_specification_opt ::= */ -{ yymsp[1].minor.yy58 = ORDER_ASC; } +{ yymsp[1].minor.yy204 = ORDER_ASC; } break; case 486: /* ordering_specification_opt ::= ASC */ -{ yymsp[0].minor.yy58 = ORDER_ASC; } +{ yymsp[0].minor.yy204 = ORDER_ASC; } break; case 487: /* ordering_specification_opt ::= DESC */ -{ yymsp[0].minor.yy58 = ORDER_DESC; } +{ yymsp[0].minor.yy204 = ORDER_DESC; } break; case 488: /* null_ordering_opt ::= */ -{ yymsp[1].minor.yy613 = NULL_ORDER_DEFAULT; } +{ yymsp[1].minor.yy277 = NULL_ORDER_DEFAULT; } break; case 489: /* null_ordering_opt ::= NULLS FIRST */ -{ yymsp[-1].minor.yy613 = NULL_ORDER_FIRST; } +{ yymsp[-1].minor.yy277 = NULL_ORDER_FIRST; } break; case 490: /* null_ordering_opt ::= NULLS LAST */ -{ yymsp[-1].minor.yy613 = NULL_ORDER_LAST; } +{ yymsp[-1].minor.yy277 = NULL_ORDER_LAST; } break; default: break; diff --git a/source/libs/parser/test/mockCatalog.cpp b/source/libs/parser/test/mockCatalog.cpp index ad491af105..b376c33d1a 100644 --- a/source/libs/parser/test/mockCatalog.cpp +++ b/source/libs/parser/test/mockCatalog.cpp @@ -35,25 +35,25 @@ void generateInformationSchema(MockCatalogService* mcs) { { ITableBuilder& builder = mcs->createTableBuilder(TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_DNODES, TSDB_SYSTEM_TABLE, 1) - .addColumn("id", TSDB_DATA_TYPE_INT); + .addColumn("endpoint", TSDB_DATA_TYPE_BINARY, TSDB_EP_LEN); builder.done(); } { ITableBuilder& builder = mcs->createTableBuilder(TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_MNODES, TSDB_SYSTEM_TABLE, 1) - .addColumn("id", TSDB_DATA_TYPE_INT); + .addColumn("endpoint", TSDB_DATA_TYPE_BINARY, TSDB_EP_LEN); builder.done(); } { ITableBuilder& builder = mcs->createTableBuilder(TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_MODULES, TSDB_SYSTEM_TABLE, 1) - .addColumn("id", TSDB_DATA_TYPE_INT); + .addColumn("endpoint", TSDB_DATA_TYPE_BINARY, TSDB_EP_LEN); builder.done(); } { ITableBuilder& builder = mcs->createTableBuilder(TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_QNODES, TSDB_SYSTEM_TABLE, 1) - .addColumn("id", TSDB_DATA_TYPE_INT); + .addColumn("endpoint", TSDB_DATA_TYPE_BINARY, TSDB_EP_LEN); builder.done(); } { @@ -70,7 +70,8 @@ void generateInformationSchema(MockCatalogService* mcs) { } { ITableBuilder& builder = - mcs->createTableBuilder(TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_INDEXES, TSDB_SYSTEM_TABLE, 2) + mcs->createTableBuilder(TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_INDEXES, TSDB_SYSTEM_TABLE, 3) + .addColumn("index_name", TSDB_DATA_TYPE_BINARY, TSDB_TABLE_NAME_LEN) .addColumn("db_name", TSDB_DATA_TYPE_BINARY, TSDB_DB_NAME_LEN) .addColumn("table_name", TSDB_DATA_TYPE_BINARY, TSDB_TABLE_NAME_LEN); builder.done(); @@ -98,7 +99,7 @@ void generateInformationSchema(MockCatalogService* mcs) { { ITableBuilder& builder = mcs->createTableBuilder(TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_USERS, TSDB_SYSTEM_TABLE, 1) - .addColumn("user_name", TSDB_DATA_TYPE_BINARY, TSDB_USER_LEN); + .addColumn("name", TSDB_DATA_TYPE_BINARY, TSDB_USER_LEN); builder.done(); } { @@ -122,7 +123,7 @@ void generateInformationSchema(MockCatalogService* mcs) { { ITableBuilder& builder = mcs->createTableBuilder(TSDB_INFORMATION_SCHEMA_DB, TSDB_INS_TABLE_CLUSTER, TSDB_SYSTEM_TABLE, 1) - .addColumn("id", TSDB_DATA_TYPE_BIGINT); + .addColumn("name", TSDB_DATA_TYPE_BINARY, TSDB_CLUSTER_ID_LEN); builder.done(); } } diff --git a/source/libs/parser/test/parSelectTest.cpp b/source/libs/parser/test/parSelectTest.cpp index 5b222a8dec..716dd7ffc0 100644 --- a/source/libs/parser/test/parSelectTest.cpp +++ b/source/libs/parser/test/parSelectTest.cpp @@ -294,16 +294,6 @@ TEST_F(ParserSelectTest, intervalSemanticCheck) { TEST_F(ParserSelectTest, interp) { useDb("root", "test"); - run("SELECT INTERP(c1) FROM t1"); - - run("SELECT INTERP(c1) FROM t1 RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00')"); - - run("SELECT INTERP(c1) FROM t1 RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00') FILL(LINEAR)"); - - run("SELECT INTERP(c1) FROM t1 EVERY(5s)"); - - run("SELECT INTERP(c1) FROM t1 RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00') EVERY(5s)"); - run("SELECT INTERP(c1) FROM t1 RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00') EVERY(5s) FILL(LINEAR)"); } diff --git a/source/libs/planner/test/planBasicTest.cpp b/source/libs/planner/test/planBasicTest.cpp index d7c947a20d..27ec409d52 100644 --- a/source/libs/planner/test/planBasicTest.cpp +++ b/source/libs/planner/test/planBasicTest.cpp @@ -93,8 +93,6 @@ TEST_F(PlanBasicTest, tailFunc) { TEST_F(PlanBasicTest, interpFunc) { useDb("root", "test"); - run("SELECT INTERP(c1) FROM t1"); - run("SELECT INTERP(c1) FROM t1 RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00') EVERY(5s) FILL(LINEAR)"); } diff --git a/tests/script/tmp/data.sim b/tests/script/tmp/data.sim index f43987ffcb..adce1dd37c 100644 --- a/tests/script/tmp/data.sim +++ b/tests/script/tmp/data.sim @@ -49,7 +49,7 @@ return print =============== step2: create database sql create database db vgroups 1 replica 3 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tmp/r1.sim b/tests/script/tmp/r1.sim index 3fc875ad23..a51bf80b3d 100644 --- a/tests/script/tmp/r1.sim +++ b/tests/script/tmp/r1.sim @@ -33,7 +33,7 @@ endi print =============== step2: create database sql create database db vgroups 1 replica 1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/alter/table.sim b/tests/script/tsim/alter/table.sim index 348bef21fe..48ab7ddab0 100644 --- a/tests/script/tsim/alter/table.sim +++ b/tests/script/tsim/alter/table.sim @@ -659,7 +659,7 @@ endi print ======= over sql drop database d1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/backup/arbitrator/offline_replica2_dropDb_online.sim b/tests/script/tsim/backup/arbitrator/offline_replica2_dropDb_online.sim index 9f21193400..b923a71335 100644 --- a/tests/script/tsim/backup/arbitrator/offline_replica2_dropDb_online.sim +++ b/tests/script/tsim/backup/arbitrator/offline_replica2_dropDb_online.sim @@ -169,7 +169,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show databases +sql select * from information_schema.ins_databases if $rows != 0 then sleep 2000 goto wait_database_dropped diff --git a/tests/script/tsim/backup/arbitrator/offline_replica3_dropDb_online.sim b/tests/script/tsim/backup/arbitrator/offline_replica3_dropDb_online.sim index 3abfc40161..0dfc937408 100644 --- a/tests/script/tsim/backup/arbitrator/offline_replica3_dropDb_online.sim +++ b/tests/script/tsim/backup/arbitrator/offline_replica3_dropDb_online.sim @@ -169,7 +169,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show databases +sql select * from information_schema.ins_databases if $rows != 0 then sleep 2000 goto wait_database_dropped diff --git a/tests/script/tsim/backup/arbitrator/sync_replica2_dropDb.sim b/tests/script/tsim/backup/arbitrator/sync_replica2_dropDb.sim index e4e7f95188..511c796506 100644 --- a/tests/script/tsim/backup/arbitrator/sync_replica2_dropDb.sim +++ b/tests/script/tsim/backup/arbitrator/sync_replica2_dropDb.sim @@ -189,7 +189,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show databases +sql select * from information_schema.ins_databases if $rows != 0 then sleep 2000 goto wait_database_dropped diff --git a/tests/script/tsim/backup/arbitrator/sync_replica3_dropDb.sim b/tests/script/tsim/backup/arbitrator/sync_replica3_dropDb.sim index 83e53eaeeb..4f258a0245 100644 --- a/tests/script/tsim/backup/arbitrator/sync_replica3_dropDb.sim +++ b/tests/script/tsim/backup/arbitrator/sync_replica3_dropDb.sim @@ -189,7 +189,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show databases +sql select * from information_schema.ins_databases if $rows != 0 then sleep 2000 goto wait_database_dropped diff --git a/tests/script/tsim/backup/cluster/cluster_main.sim b/tests/script/tsim/backup/cluster/cluster_main.sim index d3750be6b4..c6da56e2f7 100644 --- a/tests/script/tsim/backup/cluster/cluster_main.sim +++ b/tests/script/tsim/backup/cluster/cluster_main.sim @@ -237,7 +237,7 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step13: alter replica 2 sql alter database $db replica 2 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 if $data04 != 2 then @@ -259,7 +259,7 @@ sleep 20000 print ============== step15: alter replica 1 sql alter database $db replica 1 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 if $data04 != 1 then print rplica is not modify to 1, error!!!!!! @@ -268,7 +268,7 @@ endi print ============== step16: alter replica 2 sql alter database $db replica 2 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 if $data04 != 2 then print rplica is not modify to 2, error!!!!!! @@ -285,7 +285,7 @@ endi print ============== step18: alter replica 3 sql alter database $db replica 3 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 if $data04 != 3 then print rplica is not modify to 3, error!!!!!! diff --git a/tests/script/tsim/backup/cluster/cluster_main0.sim b/tests/script/tsim/backup/cluster/cluster_main0.sim index 48403d011b..d1a05eff32 100644 --- a/tests/script/tsim/backup/cluster/cluster_main0.sim +++ b/tests/script/tsim/backup/cluster/cluster_main0.sim @@ -224,7 +224,7 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step13: alter replica 2 sql alter database $db replica 2 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 if $data04 != 2 then @@ -244,7 +244,7 @@ sleep 20000 print ============== step15: alter replica 1 sql alter database $db replica 1 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 if $data04 != 1 then print rplica is not modify to 1, error!!!!!! @@ -253,7 +253,7 @@ endi print ============== step16: alter replica 2 sql alter database $db replica 2 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 if $data04 != 2 then print rplica is not modify to 2, error!!!!!! @@ -270,7 +270,7 @@ endi print ============== step18: alter replica 3 sql alter database $db replica 3 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 if $data04 != 3 then print rplica is not modify to 3, error!!!!!! diff --git a/tests/script/tsim/backup/cluster/cluster_main1.sim b/tests/script/tsim/backup/cluster/cluster_main1.sim index a2426dc574..958ce8531a 100644 --- a/tests/script/tsim/backup/cluster/cluster_main1.sim +++ b/tests/script/tsim/backup/cluster/cluster_main1.sim @@ -223,7 +223,7 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step13: alter replica 2 sql alter database $db replica 2 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 @@ -253,7 +253,7 @@ sleep 20000 print ============== step15: alter replica 1 sql alter database $db replica 1 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 @@ -273,7 +273,7 @@ endi print ============== step16: alter replica 2 sql alter database $db replica 2 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 @@ -301,7 +301,7 @@ endi print ============== step18: alter replica 3 sql alter database $db replica 3 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 diff --git a/tests/script/tsim/backup/cluster/cluster_main2.sim b/tests/script/tsim/backup/cluster/cluster_main2.sim index e050ab3acf..ab043641b2 100644 --- a/tests/script/tsim/backup/cluster/cluster_main2.sim +++ b/tests/script/tsim/backup/cluster/cluster_main2.sim @@ -227,7 +227,7 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step13: alter replica 2 sql alter database $db replica 2 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 @@ -257,7 +257,7 @@ sleep 20000 print ============== step15: alter replica 1 sql alter database $db replica 1 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 @@ -277,7 +277,7 @@ endi print ============== step16: alter replica 2 sql alter database $db replica 2 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 @@ -305,7 +305,7 @@ endi print ============== step18: alter replica 3 sql alter database $db replica 3 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 diff --git a/tests/script/tsim/compute/avg.sim b/tests/script/tsim/compute/avg.sim index c366de5f4c..41a3a48251 100644 --- a/tests/script/tsim/compute/avg.sim +++ b/tests/script/tsim/compute/avg.sim @@ -157,7 +157,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/compute/block_dist.sim b/tests/script/tsim/compute/block_dist.sim index 37ad8d8cff..ad33575153 100644 --- a/tests/script/tsim/compute/block_dist.sim +++ b/tests/script/tsim/compute/block_dist.sim @@ -93,7 +93,7 @@ sql_error select _block_dist() from (select * from $mt) print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/compute/bottom.sim b/tests/script/tsim/compute/bottom.sim index a17584734b..141d7f314b 100644 --- a/tests/script/tsim/compute/bottom.sim +++ b/tests/script/tsim/compute/bottom.sim @@ -92,7 +92,7 @@ step6: print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/compute/count.sim b/tests/script/tsim/compute/count.sim index cf2ad933bc..ae8a851559 100644 --- a/tests/script/tsim/compute/count.sim +++ b/tests/script/tsim/compute/count.sim @@ -185,7 +185,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/compute/diff.sim b/tests/script/tsim/compute/diff.sim index 6043f18b27..0882b835c8 100644 --- a/tests/script/tsim/compute/diff.sim +++ b/tests/script/tsim/compute/diff.sim @@ -85,7 +85,7 @@ step6: print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/compute/diff2.sim b/tests/script/tsim/compute/diff2.sim index 5a2c3706ee..bd8a1223be 100644 --- a/tests/script/tsim/compute/diff2.sim +++ b/tests/script/tsim/compute/diff2.sim @@ -147,7 +147,7 @@ step6: print =============== clear #sql drop database $db -#sql show databases +#sql select * from information_schema.ins_databases #if $rows != 2 then # return -1 #endi diff --git a/tests/script/tsim/compute/first.sim b/tests/script/tsim/compute/first.sim index f8efeee513..8595416c07 100644 --- a/tests/script/tsim/compute/first.sim +++ b/tests/script/tsim/compute/first.sim @@ -159,7 +159,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/compute/interval.sim b/tests/script/tsim/compute/interval.sim index 9c0804efe7..903e80769b 100644 --- a/tests/script/tsim/compute/interval.sim +++ b/tests/script/tsim/compute/interval.sim @@ -196,7 +196,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/compute/last.sim b/tests/script/tsim/compute/last.sim index 6080a2fa97..be2ee47733 100644 --- a/tests/script/tsim/compute/last.sim +++ b/tests/script/tsim/compute/last.sim @@ -163,7 +163,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/compute/last_row.sim b/tests/script/tsim/compute/last_row.sim index 70fb6626cd..57bdc36f6d 100644 --- a/tests/script/tsim/compute/last_row.sim +++ b/tests/script/tsim/compute/last_row.sim @@ -208,7 +208,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/compute/leastsquare.sim b/tests/script/tsim/compute/leastsquare.sim index 59a5213620..0ead02da56 100644 --- a/tests/script/tsim/compute/leastsquare.sim +++ b/tests/script/tsim/compute/leastsquare.sim @@ -87,7 +87,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/compute/max.sim b/tests/script/tsim/compute/max.sim index 7101359026..21bca6be08 100644 --- a/tests/script/tsim/compute/max.sim +++ b/tests/script/tsim/compute/max.sim @@ -163,7 +163,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/compute/min.sim b/tests/script/tsim/compute/min.sim index 1ffdf19ac2..cf22b6f2be 100644 --- a/tests/script/tsim/compute/min.sim +++ b/tests/script/tsim/compute/min.sim @@ -161,7 +161,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/compute/null.sim b/tests/script/tsim/compute/null.sim index 48fa70ae7a..2dbf61bb07 100644 --- a/tests/script/tsim/compute/null.sim +++ b/tests/script/tsim/compute/null.sim @@ -223,7 +223,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/compute/percentile.sim b/tests/script/tsim/compute/percentile.sim index 93b4640442..1ea82a998b 100644 --- a/tests/script/tsim/compute/percentile.sim +++ b/tests/script/tsim/compute/percentile.sim @@ -122,7 +122,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/compute/stddev.sim b/tests/script/tsim/compute/stddev.sim index dbdcde9a16..9e7a52a774 100644 --- a/tests/script/tsim/compute/stddev.sim +++ b/tests/script/tsim/compute/stddev.sim @@ -93,7 +93,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/compute/sum.sim b/tests/script/tsim/compute/sum.sim index 950b861b4c..717389e061 100644 --- a/tests/script/tsim/compute/sum.sim +++ b/tests/script/tsim/compute/sum.sim @@ -163,7 +163,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/compute/top.sim b/tests/script/tsim/compute/top.sim index d10b3803e3..75445762d0 100644 --- a/tests/script/tsim/compute/top.sim +++ b/tests/script/tsim/compute/top.sim @@ -94,7 +94,7 @@ step6: print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/db/alter_option.sim b/tests/script/tsim/db/alter_option.sim index 00baa9b3f6..a7f80c6784 100644 --- a/tests/script/tsim/db/alter_option.sim +++ b/tests/script/tsim/db/alter_option.sim @@ -47,7 +47,7 @@ print ============= create database # | WAL_LEVEL value [1 | 2] sql create database db CACHEMODEL 'both' COMP 0 DURATION 240 WAL_FSYNC_PERIOD 1000 MAXROWS 8000 MINROWS 10 KEEP 1000 PRECISION 'ns' REPLICA 3 WAL_LEVEL 2 VGROUPS 6 SINGLE_STABLE 1 -sql show databases +sql select * from information_schema.ins_databases print rows: $rows print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 @@ -184,13 +184,13 @@ sql_error alter database db replica 5 sql_error alter database db replica -1 sql_error alter database db replica 0 #sql alter database db replica 1 -#sql show databases +#sql select * from information_schema.ins_databases #print replica: $data4_db #if $data4_db != 1 then # return -1 #endi #sql alter database db replica 3 -#sql show databases +#sql select * from information_schema.ins_databases #print replica: $data4_db #if $data4_db != 3 then # return -1 @@ -198,13 +198,13 @@ sql_error alter database db replica 0 #print ============== modify quorum #sql alter database db quorum 2 -#sql show databases +#sql select * from information_schema.ins_databases #print quorum $data5_db #if $data5_db != 2 then # return -1 #endi #sql alter database db quorum 1 -#sql show databases +#sql select * from information_schema.ins_databases #print quorum $data5_db #if $data5_db != 1 then # return -1 @@ -224,14 +224,14 @@ sql_error alter database db duration 14400 # set over than keep print ============== modify keep sql alter database db keep 2400 -sql show databases +sql select * from information_schema.ins_databases print keep $data7_db if $data7_db != 3456000m,3456000m,3456000m then return -1 endi #sql alter database db keep 1000,2000 -#sql show databases +#sql select * from information_schema.ins_databases #print keep $data7_db #if $data7_db != 500,500,500 then # return -1 @@ -261,13 +261,13 @@ sql_error alter database db keep -1 #print ============== modify blocks #sql alter database db blocks 3 -#sql show databases +#sql select * from information_schema.ins_databases #print blocks $data9_db #if $data9_db != 3 then # return -1 #endi #sql alter database db blocks 11 -#sql show databases +#sql select * from information_schema.ins_databases #print blocks $data9_db #if $data9_db != 11 then # return -1 @@ -298,13 +298,13 @@ sql_error alter database db maxrows 10 # little than minrows print ============== step wal_level sql alter database db wal_level 1 -sql show databases +sql select * from information_schema.ins_databases print wal_level $data20_db if $data20_db != 1 then return -1 endi sql alter database db wal_level 2 -sql show databases +sql select * from information_schema.ins_databases print wal_level $data20_db if $data20_db != 2 then return -1 @@ -317,19 +317,19 @@ sql_error alter database db wal_level -1 print ============== modify wal_fsync_period sql alter database db wal_fsync_period 2000 -sql show databases +sql select * from information_schema.ins_databases print wal_fsync_period $data21_db if $data21_db != 2000 then return -1 endi sql alter database db wal_fsync_period 500 -sql show databases +sql select * from information_schema.ins_databases print wal_fsync_period $data21_db if $data21_db != 500 then return -1 endi sql alter database db wal_fsync_period 0 -sql show databases +sql select * from information_schema.ins_databases print wal_fsync_period $data21_db if $data21_db != 0 then return -1 @@ -349,31 +349,31 @@ sql_error alter database db comp -1 print ============== modify cachelast [0, 1, 2, 3] sql alter database db cachemodel 'last_value' -sql show databases +sql select * from information_schema.ins_databases print cachelast $data18_db if $data18_db != last_value then return -1 endi sql alter database db cachemodel 'last_row' -sql show databases +sql select * from information_schema.ins_databases print cachelast $data18_db if $data18_db != last_row then return -1 endi sql alter database db cachemodel 'none' -sql show databases +sql select * from information_schema.ins_databases print cachelast $data18_db if $data18_db != none then return -1 endi sql alter database db cachemodel 'last_value' -sql show databases +sql select * from information_schema.ins_databases print cachelast $data18_db if $data18_db != last_value then return -1 endi sql alter database db cachemodel 'both' -sql show databases +sql select * from information_schema.ins_databases print cachelast $data18_db if $data18_db != both then return -1 diff --git a/tests/script/tsim/db/alter_replica_13.sim b/tests/script/tsim/db/alter_replica_13.sim index 4d45b92967..76e3be60a5 100644 --- a/tests/script/tsim/db/alter_replica_13.sim +++ b/tests/script/tsim/db/alter_replica_13.sim @@ -35,7 +35,7 @@ endi print =============== step2: create database sql create database db vgroups 1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/db/alter_replica_31.sim b/tests/script/tsim/db/alter_replica_31.sim index e9a295820c..021aa68534 100644 --- a/tests/script/tsim/db/alter_replica_31.sim +++ b/tests/script/tsim/db/alter_replica_31.sim @@ -46,7 +46,7 @@ endi print =============== step2: create database sql create database db vgroups 1 replica 3 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/db/basic1.sim b/tests/script/tsim/db/basic1.sim index 49568d64ed..6a11549b1d 100644 --- a/tests/script/tsim/db/basic1.sim +++ b/tests/script/tsim/db/basic1.sim @@ -5,7 +5,7 @@ sql connect print =============== create database sql create database d1 vgroups 2 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -39,7 +39,7 @@ endi print =============== drop database sql drop database d1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi @@ -48,7 +48,7 @@ print =============== more databases sql create database d2 vgroups 2 sql create database d3 vgroups 3 sql create database d4 vgroups 4 -sql show databases +sql select * from information_schema.ins_databases if $rows != 5 then return -1 endi @@ -110,7 +110,7 @@ endi print =============== drop database sql drop database d2 sql drop database d3 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -152,8 +152,8 @@ print =============== restart system sh/exec.sh -n dnode1 -s stop -x SIGKILL system sh/exec.sh -n dnode1 -s start -print =============== show databases -sql show databases +print =============== select * from information_schema.ins_databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/db/basic2.sim b/tests/script/tsim/db/basic2.sim index 71f0fe33fa..114adf98e6 100644 --- a/tests/script/tsim/db/basic2.sim +++ b/tests/script/tsim/db/basic2.sim @@ -11,7 +11,7 @@ sql create table t2 (ts timestamp, i int); sql create table t3 (ts timestamp, i int); sql create table t4 (ts timestamp, i int); -sql show databases +sql select * from information_schema.ins_databases print rows: $rows print $data00 $data01 $data02 $data03 print $data10 $data11 $data12 $data13 @@ -43,7 +43,7 @@ sql create table t1 (ts timestamp, i int); sql create table t2 (ts timestamp, i int); sql create table t3 (ts timestamp, i int); -sql show databases +sql select * from information_schema.ins_databases if $rows != 4 then return -1 endi diff --git a/tests/script/tsim/db/basic3.sim b/tests/script/tsim/db/basic3.sim index 17faee993c..30faec0494 100644 --- a/tests/script/tsim/db/basic3.sim +++ b/tests/script/tsim/db/basic3.sim @@ -10,7 +10,7 @@ sql create table d1.t2 (ts timestamp, i int); sql create table d1.t3 (ts timestamp, i int); sql create table d1.t4 (ts timestamp, i int); -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -38,7 +38,7 @@ sql create table d2.t1 (ts timestamp, i int); sql create table d2.t2 (ts timestamp, i int); sql create table d2.t3 (ts timestamp, i int); -sql show databases +sql select * from information_schema.ins_databases if $rows != 4 then return -1 endi diff --git a/tests/script/tsim/db/basic4.sim b/tests/script/tsim/db/basic4.sim index 0d1db9dd19..f407c6352d 100644 --- a/tests/script/tsim/db/basic4.sim +++ b/tests/script/tsim/db/basic4.sim @@ -10,7 +10,7 @@ sql create table d1.t2 (ts timestamp, i int); sql create table d1.t3 (ts timestamp, i int); sql create table d1.t4 (ts timestamp, i int); -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -46,7 +46,7 @@ endi print =============== drop table sql drop table d1.t1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -83,7 +83,7 @@ sql drop table d1.t2 sql drop table d1.t3 sql drop table d1.t4 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/db/basic6.sim b/tests/script/tsim/db/basic6.sim index 917345e25f..8d161e5287 100644 --- a/tests/script/tsim/db/basic6.sim +++ b/tests/script/tsim/db/basic6.sim @@ -16,7 +16,7 @@ $tb = $tbPrefix . $i print =============== step1 # quorum presicion sql create database $db vgroups 8 replica 1 duration 2 keep 10 minrows 80 maxrows 10000 wal_level 2 wal_fsync_period 1000 comp 0 cachemodel 'last_value' precision 'us' -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 if $rows != 3 then @@ -50,14 +50,14 @@ endi print =============== step2 sql_error create database $db sql create database if not exists $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi print =============== step3 sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi @@ -67,7 +67,7 @@ sql_error drop database $db print =============== step5 sql create database $db replica 1 duration 15 keep 1500 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 if $data20 != $db then return -1 @@ -312,7 +312,7 @@ if $rows != 5 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/db/create_all_options.sim b/tests/script/tsim/db/create_all_options.sim index 56752166e1..79ee4c606f 100644 --- a/tests/script/tsim/db/create_all_options.sim +++ b/tests/script/tsim/db/create_all_options.sim @@ -70,7 +70,7 @@ print ============= create database with all options print ====> create database db, with default sql create database db -sql show databases +sql select * from information_schema.ins_databases print rows: $rows print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $rows != 3 then @@ -133,7 +133,7 @@ sql drop database db #print ====> BLOCKS value [3~1000, default: 6] #sql create database db BLOCKS 3 -#sql show databases +#sql select * from information_schema.ins_databases #print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db #if $data9_db != 3 then # return -1 @@ -141,7 +141,7 @@ sql drop database db #sql drop database db #sql create database db BLOCKS 1000 -#sql show databases +#sql select * from information_schema.ins_databases #print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db #if $data9_db != 1000 then # return -1 @@ -153,7 +153,7 @@ sql drop database db #print ====> CACHE value [default: 16] #sql create database db CACHE 1 -#sql show databases +#sql select * from information_schema.ins_databases #print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db #if $data8_db != 1 then # return -1 @@ -161,7 +161,7 @@ sql drop database db #sql drop database db #sql create database db CACHE 128 -#sql show databases +#sql select * from information_schema.ins_databases #print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db #if $data8_db != 128 then # return -1 @@ -170,7 +170,7 @@ sql drop database db print ====> CACHEMODEL value [0, 1, 2, 3, default: 0] sql create database db CACHEMODEL 'last_row' -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data18_db != last_row then return -1 @@ -178,7 +178,7 @@ endi sql drop database db sql create database db CACHEMODEL 'last_value' -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data18_db != last_value then return -1 @@ -186,7 +186,7 @@ endi sql drop database db sql create database db CACHEMODEL 'both' -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data18_db != both then return -1 @@ -197,7 +197,7 @@ sql_error create database db CACHEMODEL '-1' print ====> COMP [0 | 1 | 2, default: 2] sql create database db COMP 1 -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data13_db != 1 then return -1 @@ -205,7 +205,7 @@ endi sql drop database db sql create database db COMP 0 -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data13_db != 0 then return -1 @@ -217,7 +217,7 @@ sql_error create database db COMP -1 #print ====> DURATION value [60m ~ min(3650d,keep), default: 10d, unit may be minut/hour/day] #print ====> KEEP value [max(1d ~ 365000d), default: 1d, unit may be minut/hour/day] #sql create database db DURATION 60m KEEP 60m -#sql show databases +#sql select * from information_schema.ins_databases #print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db #if $data6_db != 60 then # return -1 @@ -227,7 +227,7 @@ sql_error create database db COMP -1 #endi #sql drop database db #sql create database db DURATION 60m KEEP 1d -#sql show databases +#sql select * from information_schema.ins_databases #print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db #if $data6_db != 60 then # return -1 @@ -236,7 +236,7 @@ sql_error create database db COMP -1 # return -1 #endi #sql create database db DURATION 3650d KEEP 365000d -#sql show databases +#sql select * from information_schema.ins_databases #print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db #if $data6_db != 5256000 then # return -1 @@ -256,7 +256,7 @@ sql_error create database db COMP -1 print ====> WAL_FSYNC_PERIOD value [0 ~ 180000 ms, default: 3000] sql create database db WAL_FSYNC_PERIOD 0 -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data21_db != 0 then return -1 @@ -264,7 +264,7 @@ endi sql drop database db sql create database db WAL_FSYNC_PERIOD 180000 -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data21_db != 180000 then return -1 @@ -275,7 +275,7 @@ sql_error create database db WAL_FSYNC_PERIOD -1 print ====> MAXROWS value [200~10000, default: 4096], MINROWS value [10~1000, default: 100] sql create database db MAXROWS 10000 MINROWS 1000 -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data11_db != 1000 then return -1 @@ -286,7 +286,7 @@ endi sql drop database db sql create database db MAXROWS 200 MINROWS 10 -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data11_db != 10 then return -1 @@ -307,7 +307,7 @@ sql_error create database db MAXROWS 500 MINROWS 1000 print ====> PRECISION ['ms' | 'us' | 'ns', default: ms] sql create database db PRECISION 'us' -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data14_db != us then return -1 @@ -315,7 +315,7 @@ endi sql drop database db sql create database db PRECISION 'ns' -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data14_db != ns then return -1 @@ -326,7 +326,7 @@ sql_error create database db PRECISION -1 print ====> QUORUM value [1 | 2, default: 1] 3.0 not support this item #sql_error create database db QUORUM 2 -#sql show databases +#sql select * from information_schema.ins_databases #print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db #if $data5_db != 2 then # return -1 @@ -334,7 +334,7 @@ print ====> QUORUM value [1 | 2, default: 1] 3.0 not support this item #sql drop database db #sql create database db QUORUM 1 -#sql show databases +#sql select * from information_schema.ins_databases #print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db #if $data5_db != 1 then # return -1 @@ -348,7 +348,7 @@ sql_error create database db QUORUM -1 print ====> REPLICA value [1 | 3, default: 1] sql create database db REPLICA 3 -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data4_db != 3 then return -1 @@ -356,7 +356,7 @@ endi sql drop database db sql create database db REPLICA 1 -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data4_db != 1 then return -1 @@ -369,7 +369,7 @@ sql_error create database db REPLICA 4 #print ====> TTL value [1d ~ , default: 1] #sql create database db TTL 1 -#sql show databases +#sql select * from information_schema.ins_databases #print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db #if $dataXX_db != 1 then # return -1 @@ -377,7 +377,7 @@ sql_error create database db REPLICA 4 #sql drop database db #sql create database db TTL 10 -#sql show databases +#sql select * from information_schema.ins_databases #print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db #if $dataXX_db != 10 then # return -1 @@ -388,7 +388,7 @@ sql_error create database db REPLICA 4 print ====> WAL_LEVEL value [1 | 2, default: 1] sql create database db WAL_LEVEL 2 -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data20_db != 2 then return -1 @@ -396,7 +396,7 @@ endi sql drop database db sql create database db WAL_LEVEL 1 -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data20_db != 1 then return -1 @@ -408,7 +408,7 @@ sql_error create database db WAL_LEVEL 0 print ====> VGROUPS value [1~4096, default: 2] sql create database db VGROUPS 1 -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data2_db != 1 then return -1 @@ -416,7 +416,7 @@ endi sql drop database db sql create database db VGROUPS 16 -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db if $data2_db != 16 then return -1 @@ -428,7 +428,7 @@ sql_error create database db VGROUPS 0 print ====> SINGLE_STABLE [0 | 1, default: ] sql create database db SINGLE_STABLE 1 -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db #if $dataXXXX_db != 1 then # return -1 @@ -436,7 +436,7 @@ print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $dat sql drop database db sql create database db SINGLE_STABLE 0 -sql show databases +sql select * from information_schema.ins_databases print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db #if $dataXXXX_db != 0 then # return -1 @@ -447,7 +447,7 @@ sql_error create database db SINGLE_STABLE -1 #print ====> STREAM_MODE [0 | 1, default: ] #sql create database db STREAM_MODE 1 -#sql show databases +#sql select * from information_schema.ins_databases #print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db #if $dataXXX_db != 1 then # return -1 @@ -455,7 +455,7 @@ sql_error create database db SINGLE_STABLE -1 #sql drop database db #sql create database db STREAM_MODE 0 -#sql show databases +#sql select * from information_schema.ins_databases #print $data0_db $data1_db $data2_db $data3_db $data4_db $data5_db $data6_db $data7_db $data8_db $data9_db $data10_db $data11_db $data12_db $data13_db $data14_db $data15_db $data16_db $data17_db #if $dataXXX_db != 0 then # return -1 diff --git a/tests/script/tsim/db/delete_reusevnode.sim b/tests/script/tsim/db/delete_reusevnode.sim index 09d9e855cf..d194f82d08 100644 --- a/tests/script/tsim/db/delete_reusevnode.sim +++ b/tests/script/tsim/db/delete_reusevnode.sim @@ -24,7 +24,7 @@ while $i < 30 endw print ======== step2 -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi @@ -89,7 +89,7 @@ while $i < 10 endw print ======== step2 -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/db/delete_reusevnode2.sim b/tests/script/tsim/db/delete_reusevnode2.sim index ea6d4f825a..754a6d695b 100644 --- a/tests/script/tsim/db/delete_reusevnode2.sim +++ b/tests/script/tsim/db/delete_reusevnode2.sim @@ -57,7 +57,7 @@ endw print ======== step2 sql drop database db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/db/error1.sim b/tests/script/tsim/db/error1.sim index 3460647bc9..e99af1580d 100644 --- a/tests/script/tsim/db/error1.sim +++ b/tests/script/tsim/db/error1.sim @@ -41,7 +41,7 @@ re-create1: sql create database d1 vgroups 2 -x re-create1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -80,7 +80,7 @@ re-create2: sql create database d1 vgroups 5 -x re-create2 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/db/keep.sim b/tests/script/tsim/db/keep.sim index dc92492a48..e146a666d0 100644 --- a/tests/script/tsim/db/keep.sim +++ b/tests/script/tsim/db/keep.sim @@ -40,7 +40,7 @@ $num1 = $rows + 40 print ======== step3 alter db sql alter database keepdb keep 60 sql flush database keepdb -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 if $data22 != 2 then return -1 @@ -82,7 +82,7 @@ endi print ======== step6 alter db sql alter database keepdb keep 30 -sql show databases +sql select * from information_schema.ins_databases if $data22 != 2 then return -1 endi diff --git a/tests/script/tsim/db/len.sim b/tests/script/tsim/db/len.sim index 212fdfd40d..ae475ddf47 100644 --- a/tests/script/tsim/db/len.sim +++ b/tests/script/tsim/db/len.sim @@ -10,33 +10,33 @@ sql create database -x step1 return -1 step1: -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi print =============== step2 sql create database a -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi sql drop database a -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi print =============== step3 sql create database a12345678 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi sql drop database a12345678 -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi @@ -45,7 +45,7 @@ print =============== step4 sql create database a012345678901201234567890120123456789012a012345678901201234567890120123456789012 -x step4 return -1 step4: -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi @@ -53,7 +53,7 @@ endi print =============== step5 sql create database a;1 sql drop database a -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi @@ -63,7 +63,7 @@ sql create database a'1 -x step6 return -1 step6: -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi @@ -72,7 +72,7 @@ print =============== step7 sql create database (a) -x step7 return -1 step7: -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi @@ -81,7 +81,7 @@ print =============== step8 sql create database a.1 -x step8 return -1 step8: -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/db/tables.sim b/tests/script/tsim/db/tables.sim index 23cb0c6163..cdee504753 100644 --- a/tests/script/tsim/db/tables.sim +++ b/tests/script/tsim/db/tables.sim @@ -5,7 +5,7 @@ sql connect print =============== step2 sql create database db -sql show databases +sql select * from information_schema.ins_databases print $rows $data07 if $rows != 3 then @@ -68,7 +68,7 @@ sql reset query cache print =============== step7 sql create database db -sql show databases +sql select * from information_schema.ins_databases print $rows $data07 if $rows != 3 then diff --git a/tests/script/tsim/db/taosdlog.sim b/tests/script/tsim/db/taosdlog.sim index 149c12c41f..25725709ed 100644 --- a/tests/script/tsim/db/taosdlog.sim +++ b/tests/script/tsim/db/taosdlog.sim @@ -8,7 +8,7 @@ sql connect print =============== create database sql create database d1 vgroups 2 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -20,9 +20,9 @@ sleep 200 system rm -rf ../../sim/dnode1/log system sh/exec.sh -n dnode1 -s start -print =============== show databases +print =============== select * from information_schema.ins_databases sql create database d2 vgroups 6 -sql show databases +sql select * from information_schema.ins_databases if $rows != 4 then return -1 endi diff --git a/tests/script/tsim/dnode/create_dnode.sim b/tests/script/tsim/dnode/create_dnode.sim index 730b80b866..12c85cc480 100644 --- a/tests/script/tsim/dnode/create_dnode.sim +++ b/tests/script/tsim/dnode/create_dnode.sim @@ -82,7 +82,7 @@ print =============== create database sql create database d1 vgroups 4; sql create database d2; -sql show databases +sql select * from information_schema.ins_databases if $rows != 4 then return -1 endi diff --git a/tests/script/tsim/field/2.sim b/tests/script/tsim/field/2.sim index 3161f02097..cf32760c33 100644 --- a/tests/script/tsim/field/2.sim +++ b/tests/script/tsim/field/2.sim @@ -288,7 +288,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/field/3.sim b/tests/script/tsim/field/3.sim index 72b65c7406..8b428febcd 100644 --- a/tests/script/tsim/field/3.sim +++ b/tests/script/tsim/field/3.sim @@ -511,7 +511,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/field/4.sim b/tests/script/tsim/field/4.sim index d37c05173c..361ca4c326 100644 --- a/tests/script/tsim/field/4.sim +++ b/tests/script/tsim/field/4.sim @@ -701,7 +701,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/field/5.sim b/tests/script/tsim/field/5.sim index 127dcd2683..3461eaec3b 100644 --- a/tests/script/tsim/field/5.sim +++ b/tests/script/tsim/field/5.sim @@ -824,7 +824,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/field/6.sim b/tests/script/tsim/field/6.sim index 474582fcae..52fd0b3780 100644 --- a/tests/script/tsim/field/6.sim +++ b/tests/script/tsim/field/6.sim @@ -979,7 +979,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/field/bigint.sim b/tests/script/tsim/field/bigint.sim index d9401ed88f..ce35cacd84 100644 --- a/tests/script/tsim/field/bigint.sim +++ b/tests/script/tsim/field/bigint.sim @@ -151,7 +151,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/field/binary.sim b/tests/script/tsim/field/binary.sim index 59005e1ef1..b96209c644 100644 --- a/tests/script/tsim/field/binary.sim +++ b/tests/script/tsim/field/binary.sim @@ -65,7 +65,7 @@ sql_error select count(tbcol), avg(tbcol), sum(tbcol), min(tbcol), max(tbcol), f print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/field/bool.sim b/tests/script/tsim/field/bool.sim index 04cd48ab2d..87f7bc1df7 100644 --- a/tests/script/tsim/field/bool.sim +++ b/tests/script/tsim/field/bool.sim @@ -150,7 +150,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/field/double.sim b/tests/script/tsim/field/double.sim index c7b26add65..1f0cea4be8 100644 --- a/tests/script/tsim/field/double.sim +++ b/tests/script/tsim/field/double.sim @@ -149,7 +149,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/field/float.sim b/tests/script/tsim/field/float.sim index 1e11eed3be..17120c8c0e 100644 --- a/tests/script/tsim/field/float.sim +++ b/tests/script/tsim/field/float.sim @@ -150,7 +150,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/field/int.sim b/tests/script/tsim/field/int.sim index 484272631b..d0057ba695 100644 --- a/tests/script/tsim/field/int.sim +++ b/tests/script/tsim/field/int.sim @@ -150,7 +150,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/field/single.sim b/tests/script/tsim/field/single.sim index 115e76ffeb..730122a19f 100644 --- a/tests/script/tsim/field/single.sim +++ b/tests/script/tsim/field/single.sim @@ -208,7 +208,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/field/smallint.sim b/tests/script/tsim/field/smallint.sim index 326186f6c2..66bfee5838 100644 --- a/tests/script/tsim/field/smallint.sim +++ b/tests/script/tsim/field/smallint.sim @@ -150,7 +150,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/field/tinyint.sim b/tests/script/tsim/field/tinyint.sim index cba4ac504d..9a4dd2aa0f 100644 --- a/tests/script/tsim/field/tinyint.sim +++ b/tests/script/tsim/field/tinyint.sim @@ -150,7 +150,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/field/unsigined_bigint.sim b/tests/script/tsim/field/unsigined_bigint.sim index 0a492ae44c..baa57ce1f6 100644 --- a/tests/script/tsim/field/unsigined_bigint.sim +++ b/tests/script/tsim/field/unsigined_bigint.sim @@ -155,7 +155,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/insert/backquote.sim b/tests/script/tsim/insert/backquote.sim index db2cddd2ca..fc8aa29c4e 100644 --- a/tests/script/tsim/insert/backquote.sim +++ b/tests/script/tsim/insert/backquote.sim @@ -7,7 +7,7 @@ sql connect print =============== create database sql create database `database` sql create database `DataBase` -sql show databases +sql select * from information_schema.ins_databases print rows: $rows print $data00 $data01 print $data10 $data11 @@ -184,7 +184,7 @@ print =============== stop and restart taosd system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s start -sql show databases +sql select * from information_schema.ins_databases print rows: $rows print $data00 $data01 print $data10 $data11 diff --git a/tests/script/tsim/insert/basic0.sim b/tests/script/tsim/insert/basic0.sim index 7d91a77a83..5b506de01f 100644 --- a/tests/script/tsim/insert/basic0.sim +++ b/tests/script/tsim/insert/basic0.sim @@ -5,7 +5,7 @@ sql connect print =============== create database sql create database d0 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/insert/basic1.sim b/tests/script/tsim/insert/basic1.sim index b8458b1b51..72a883bedf 100644 --- a/tests/script/tsim/insert/basic1.sim +++ b/tests/script/tsim/insert/basic1.sim @@ -5,7 +5,7 @@ sql connect print =============== create database sql create database d1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/insert/commit-merge0.sim b/tests/script/tsim/insert/commit-merge0.sim index 66486c4c31..dfc22354d2 100644 --- a/tests/script/tsim/insert/commit-merge0.sim +++ b/tests/script/tsim/insert/commit-merge0.sim @@ -5,7 +5,7 @@ sql connect print =============== create database sql create database db duration 300 keep 365000d,365000d,365000d -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/insert/null.sim b/tests/script/tsim/insert/null.sim index 1b7017038a..49adb8ebe0 100644 --- a/tests/script/tsim/insert/null.sim +++ b/tests/script/tsim/insert/null.sim @@ -5,7 +5,7 @@ sql connect print =============== create database sql create database d0 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/insert/query_block1_file.sim b/tests/script/tsim/insert/query_block1_file.sim index e4e8928bf8..c6bda6d061 100644 --- a/tests/script/tsim/insert/query_block1_file.sim +++ b/tests/script/tsim/insert/query_block1_file.sim @@ -184,7 +184,7 @@ endi clear: sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/insert/query_block1_memory.sim b/tests/script/tsim/insert/query_block1_memory.sim index a8e1a0439c..110255bd90 100644 --- a/tests/script/tsim/insert/query_block1_memory.sim +++ b/tests/script/tsim/insert/query_block1_memory.sim @@ -169,7 +169,7 @@ endi clear: sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/insert/query_block2_file.sim b/tests/script/tsim/insert/query_block2_file.sim index 5557621e0f..c87262ab14 100644 --- a/tests/script/tsim/insert/query_block2_file.sim +++ b/tests/script/tsim/insert/query_block2_file.sim @@ -190,7 +190,7 @@ endi clear: sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/insert/query_block2_memory.sim b/tests/script/tsim/insert/query_block2_memory.sim index 910207d13b..f919a2a61f 100644 --- a/tests/script/tsim/insert/query_block2_memory.sim +++ b/tests/script/tsim/insert/query_block2_memory.sim @@ -161,7 +161,7 @@ if $rows != 0 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/insert/query_file_memory.sim b/tests/script/tsim/insert/query_file_memory.sim index c0aafd2686..0d37484494 100644 --- a/tests/script/tsim/insert/query_file_memory.sim +++ b/tests/script/tsim/insert/query_file_memory.sim @@ -189,7 +189,7 @@ endi clear: sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/insert/query_multi_file.sim b/tests/script/tsim/insert/query_multi_file.sim index f996317721..750eb04029 100644 --- a/tests/script/tsim/insert/query_multi_file.sim +++ b/tests/script/tsim/insert/query_multi_file.sim @@ -36,7 +36,7 @@ if $rows < $N then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/mnode/basic2.sim b/tests/script/tsim/mnode/basic2.sim index ff0101dd8e..e4188c6815 100644 --- a/tests/script/tsim/mnode/basic2.sim +++ b/tests/script/tsim/mnode/basic2.sim @@ -74,7 +74,7 @@ if $rows != 2 then endi sql create database db -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -100,7 +100,7 @@ if $rows != 2 then return -1 endi -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/parser/alter.sim b/tests/script/tsim/parser/alter.sim index 499d4d302b..bdebbeb528 100644 --- a/tests/script/tsim/parser/alter.sim +++ b/tests/script/tsim/parser/alter.sim @@ -36,7 +36,7 @@ sql_error alter database $db keep 20,19,18 sql_error alter database $db keep 20,20,20,20 sql_error alter database $db keep 365001,365001,365001 sql alter database $db keep 21 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -44,7 +44,7 @@ if $data27 != 30240m,30240m,30240m then return -1 endi sql alter database $db keep 11,12 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -52,7 +52,7 @@ if $data27 != 15840m,17280m,17280m then return -1 endi sql alter database $db keep 20,20,20 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -60,7 +60,7 @@ if $data27 != 28800m,28800m,28800m then return -1 endi sql alter database $db keep 10,10,10 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -68,7 +68,7 @@ if $data27 != 14400m,14400m,14400m then return -1 endi sql alter database $db keep 10,10,11 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -76,7 +76,7 @@ if $data27 != 14400m,14400m,15840m then return -1 endi sql alter database $db keep 11,12,13 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -84,7 +84,7 @@ if $data27 != 15840m,17280m,18720m then return -1 endi sql alter database $db keep 365000,365000,365000 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -310,7 +310,7 @@ sql_error alter table mt add column c1 int sql_error alter table mt drop column c9 #sql drop database $db -#sql show databases +#sql select * from information_schema.ins_databases #if $rows != 0 then # return -1 #endi diff --git a/tests/script/tsim/parser/alter1.sim b/tests/script/tsim/parser/alter1.sim index 6771b35eae..9d0049e45e 100644 --- a/tests/script/tsim/parser/alter1.sim +++ b/tests/script/tsim/parser/alter1.sim @@ -125,7 +125,7 @@ if $rows != 3 then endi #sql drop database $db -#sql show databases +#sql select * from information_schema.ins_databases #if $rows != 0 then # return -1 #endi diff --git a/tests/script/tsim/parser/alter__for_community_version.sim b/tests/script/tsim/parser/alter__for_community_version.sim index 9a960e21c2..bb3d68f359 100644 --- a/tests/script/tsim/parser/alter__for_community_version.sim +++ b/tests/script/tsim/parser/alter__for_community_version.sim @@ -19,7 +19,7 @@ $mt = $mtPrefix . $i sql drop database if exists $db sql create database $db duration 10 keep 20 sql use $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -45,7 +45,7 @@ sql_error alter database $db keep 20,20,20,20 sql_error alter database $db keep 365001,365001,365001 sql_error alter database $db keep 365001 sql_error alter database $db keep 20 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -53,7 +53,7 @@ if $data27 != 28800m,28800m,28800m then return -1 endi sql alter database $db keep 10 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -61,7 +61,7 @@ if $data27 != 14400m,14400m,14400m then return -1 endi sql alter database $db keep 11 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -69,7 +69,7 @@ if $data27 != 15840m,15840m,15840m then return -1 endi sql alter database $db keep 13 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -77,7 +77,7 @@ if $data27 != 18720m,18720m,18720m then return -1 endi sql alter database $db keep 365000 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -297,7 +297,7 @@ sql_error alter table mt add column c1 int sql_error alter table mt drop column c9 #sql drop database $db -#sql show databases +#sql select * from information_schema.ins_databases #if $rows != 0 then # return -1 #endi diff --git a/tests/script/tsim/parser/auto_create_tb.sim b/tests/script/tsim/parser/auto_create_tb.sim index 3a64b79239..771e16b9f2 100644 --- a/tests/script/tsim/parser/auto_create_tb.sim +++ b/tests/script/tsim/parser/auto_create_tb.sim @@ -289,7 +289,7 @@ if $rows != 1 then endi #sql drop database $db -#sql show databases +#sql select * from information_schema.ins_databases #if $rows != 0 then # return -1 #endi diff --git a/tests/script/tsim/parser/create_db.sim b/tests/script/tsim/parser/create_db.sim index d50b53b2f7..31c665f2ce 100644 --- a/tests/script/tsim/parser/create_db.sim +++ b/tests/script/tsim/parser/create_db.sim @@ -21,7 +21,7 @@ $mt = $mtPrefix . $i sql_error createdatabase $db sql create database $db sql use $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 @@ -36,7 +36,7 @@ print =========== create_db.sim case1: case insensitivity test sql_error CREATEDATABASE $db sql CREATE DATABASE $db sql use $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 @@ -64,7 +64,7 @@ $CN_db3 = db数据库1 sql_error create database $CN_db1 sql_error create database $CN_db2 sql_error create database $CN_db3 -#sql show databases +#sql select * from information_schema.ins_databases #if $rows != 3 then # return -1 #endi @@ -86,7 +86,7 @@ print case_chinese_char_in_db_name test passed print create_db.sim case4: db_already_exists sql create database db0 sql create database db0 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -108,7 +108,7 @@ $wal = 1 # valid value is 1, 2 $comp = 1 # max=32, automatically trimmed when exceeding sql create database $db replica $replica duration $duration keep $keep maxrows $rows_db wal_level $wal comp $comp -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -151,7 +151,7 @@ sql_error create database $db keep 8 sql_error create database $db keep 12,11 sql_error create database $db keep 365001,365001,365001 sql create database dbk0 keep 19 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -160,7 +160,7 @@ if $data27 != 27360m,27360m,27360m then endi sql drop database dbk0 sql create database dbka keep 19,20 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -170,7 +170,7 @@ endi sql drop database dbka sql create database dbk1 keep 11,11,11 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -179,7 +179,7 @@ if $data27 != 15840m,15840m,15840m then endi sql drop database dbk1 sql create database dbk2 keep 11,12,13 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -188,7 +188,7 @@ if $data27 != 15840m,17280m,18720m then endi sql drop database dbk2 sql create database dbk3 keep 11,11,13 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -197,7 +197,7 @@ if $data27 != 15840m,15840m,18720m then endi sql drop database dbk3 sql create database dbk4 keep 11,13,13 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -226,17 +226,17 @@ sql_error create database $db ctime 40961 # wal {0, 2} sql_error create database testwal wal_level 0 -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi sql create database testwal wal_level 1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi -sql show databases +sql select * from information_schema.ins_databases print wallevel $data20_testwal if $data20_testwal != 1 then return -1 @@ -244,7 +244,7 @@ endi sql drop database testwal sql create database testwal wal_level 2 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -262,7 +262,7 @@ sql_error create database $db comp -1 sql_error create database $db comp 3 sql_error drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/create_mt.sim b/tests/script/tsim/parser/create_mt.sim index 8f0c0e030b..328478470c 100644 --- a/tests/script/tsim/parser/create_mt.sim +++ b/tests/script/tsim/parser/create_mt.sim @@ -240,7 +240,7 @@ $mt2 = mt2 print chinese_char_in_metrics test passed sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/create_tb.sim b/tests/script/tsim/parser/create_tb.sim index 384c8f8757..3da7ec9d26 100644 --- a/tests/script/tsim/parser/create_tb.sim +++ b/tests/script/tsim/parser/create_tb.sim @@ -180,7 +180,7 @@ sql_error create table $tbname65 (ts timestamp, col int) print table_already_exists test passed sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/distinct.sim b/tests/script/tsim/parser/distinct.sim index 6d7dec0659..fd2117656f 100644 --- a/tests/script/tsim/parser/distinct.sim +++ b/tests/script/tsim/parser/distinct.sim @@ -75,7 +75,7 @@ endi ### select distinct sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/fill.sim b/tests/script/tsim/parser/fill.sim index 396bdd1e56..0631cf1080 100644 --- a/tests/script/tsim/parser/fill.sim +++ b/tests/script/tsim/parser/fill.sim @@ -1061,7 +1061,7 @@ endi print =============== clear #sql drop database $db -#sql show databases +#sql select * from information_schema.ins_databases #if $rows != 0 then # return -1 #endi diff --git a/tests/script/tsim/parser/fill_stb.sim b/tests/script/tsim/parser/fill_stb.sim index 107bac7089..72ed2f3966 100644 --- a/tests/script/tsim/parser/fill_stb.sim +++ b/tests/script/tsim/parser/fill_stb.sim @@ -431,7 +431,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 0 then return -1 endi diff --git a/tests/script/tsim/parser/fill_us.sim b/tests/script/tsim/parser/fill_us.sim index 82d282642e..110818b58d 100644 --- a/tests/script/tsim/parser/fill_us.sim +++ b/tests/script/tsim/parser/fill_us.sim @@ -844,7 +844,7 @@ endi #print =============== clear #sql drop database $db -#sql show databases +#sql select * from information_schema.ins_databases #if $rows != 0 then # return -1 #endi diff --git a/tests/script/tsim/parser/fourArithmetic-basic.sim b/tests/script/tsim/parser/fourArithmetic-basic.sim index bfda75e54d..0e5ed9da39 100644 --- a/tests/script/tsim/parser/fourArithmetic-basic.sim +++ b/tests/script/tsim/parser/fourArithmetic-basic.sim @@ -6,7 +6,7 @@ sql connect $dbNamme = d0 print =============== create database sql create database $dbNamme vgroups 1 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 if $rows != 3 then return -1 diff --git a/tests/script/tsim/parser/import_commit3.sim b/tests/script/tsim/parser/import_commit3.sim index 1dc985cc1d..8a2d0f69cd 100644 --- a/tests/script/tsim/parser/import_commit3.sim +++ b/tests/script/tsim/parser/import_commit3.sim @@ -41,7 +41,7 @@ $ts = $ts0 + $delta $ts = $ts + 1 sql import into $tb values ( $ts , -2, -2, -2, -2, -2) -sql show databases +sql select * from information_schema.ins_databases sql select count(*) from $tb $res = $rowNum + 2 diff --git a/tests/script/tsim/parser/insert_tb.sim b/tests/script/tsim/parser/insert_tb.sim index 426ac4001f..e340e84dbd 100644 --- a/tests/script/tsim/parser/insert_tb.sim +++ b/tests/script/tsim/parser/insert_tb.sim @@ -221,7 +221,7 @@ if $rows != 1 then endi #sql drop database $db -#sql show databases +#sql select * from information_schema.ins_databases #if $rows != 0 then # return -1 #endi diff --git a/tests/script/tsim/parser/mixed_blocks.sim b/tests/script/tsim/parser/mixed_blocks.sim index 80cdfcac99..64926dbf46 100644 --- a/tests/script/tsim/parser/mixed_blocks.sim +++ b/tests/script/tsim/parser/mixed_blocks.sim @@ -50,7 +50,7 @@ while $x < $rowNum $x = $x + 1 endw print ====== tables created -sql show databases +sql select * from information_schema.ins_databases print ================== restart server to commit data into disk system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/parser/nchar.sim b/tests/script/tsim/parser/nchar.sim index ca94d964bb..22a3f12fa7 100644 --- a/tests/script/tsim/parser/nchar.sim +++ b/tests/script/tsim/parser/nchar.sim @@ -305,7 +305,7 @@ endi # case: query_with_wildcard # print =============== clear # sql drop database $db -# sql show databases +# sql select * from information_schema.ins_databases # if $rows != 0 then # return -1 # endi diff --git a/tests/script/tsim/parser/precision_ns.sim b/tests/script/tsim/parser/precision_ns.sim index 45b140f382..d290fd7562 100644 --- a/tests/script/tsim/parser/precision_ns.sim +++ b/tests/script/tsim/parser/precision_ns.sim @@ -100,7 +100,7 @@ sql select count(*) from $mt interval(100000000b) sliding(100000000b) print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/select_across_vnodes.sim b/tests/script/tsim/parser/select_across_vnodes.sim index c9696e563d..9aaa47bbbf 100644 --- a/tests/script/tsim/parser/select_across_vnodes.sim +++ b/tests/script/tsim/parser/select_across_vnodes.sim @@ -71,7 +71,7 @@ if $rows != $tbNum then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/select_distinct_tag.sim b/tests/script/tsim/parser/select_distinct_tag.sim index ec33ff8ac6..19e31b72f8 100644 --- a/tests/script/tsim/parser/select_distinct_tag.sim +++ b/tests/script/tsim/parser/select_distinct_tag.sim @@ -50,7 +50,7 @@ endi sql_error select distinct t1, t2 from &stb sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/slimit_query.sim b/tests/script/tsim/parser/slimit_query.sim index 37f96dc7be..4cc708895d 100644 --- a/tests/script/tsim/parser/slimit_query.sim +++ b/tests/script/tsim/parser/slimit_query.sim @@ -128,7 +128,7 @@ endi ## [TBASE-604] #sql_error select count(tbname) from slm_stb0 partition by t1 -#sql show databases +#sql select * from information_schema.ins_databases ## [TBASE-605] sql select * from slm_stb0 where t2 >= 2 and t3 <= 9 partition by tbname slimit 40 limit 1; diff --git a/tests/script/tsim/parser/stableOp.sim b/tests/script/tsim/parser/stableOp.sim index 76f9fe202b..368bcab2f9 100644 --- a/tests/script/tsim/parser/stableOp.sim +++ b/tests/script/tsim/parser/stableOp.sim @@ -84,7 +84,7 @@ endi print create/alter/drop stable test passed sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/tags_filter.sim b/tests/script/tsim/parser/tags_filter.sim index 10fb135de3..21d32b0c72 100644 --- a/tests/script/tsim/parser/tags_filter.sim +++ b/tests/script/tsim/parser/tags_filter.sim @@ -99,7 +99,7 @@ if $data01 != 4 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/union.sim b/tests/script/tsim/parser/union.sim index 8bafeff444..a82e8fe959 100644 --- a/tests/script/tsim/parser/union.sim +++ b/tests/script/tsim/parser/union.sim @@ -365,6 +365,6 @@ endi sql_error (show tables) union all (show tables) sql_error (show stables) union all (show stables) -sql_error (show databases) union all (show databases) +sql_error (select * from information_schema.ins_databases) union all (select * from information_schema.ins_databases) system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/query/charScalarFunction.sim b/tests/script/tsim/query/charScalarFunction.sim index 49d3499738..0adb296079 100644 --- a/tests/script/tsim/query/charScalarFunction.sim +++ b/tests/script/tsim/query/charScalarFunction.sim @@ -8,7 +8,7 @@ $dbNamme = db print =============== create database $dbNamme vgroups $vgroups sql create database $dbNamme vgroups $vgroups -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 #print $data20 $data21 $data22 $data23 $data24 $data25 $data26 $data27 $data28 $data29 diff --git a/tests/script/tsim/query/complex_group.sim b/tests/script/tsim/query/complex_group.sim index a0cb727253..98a20f3b22 100644 --- a/tests/script/tsim/query/complex_group.sim +++ b/tests/script/tsim/query/complex_group.sim @@ -5,7 +5,7 @@ sql connect print =============== create database sql create database db -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/query/complex_having.sim b/tests/script/tsim/query/complex_having.sim index 29a600dab5..3b6b33bf44 100644 --- a/tests/script/tsim/query/complex_having.sim +++ b/tests/script/tsim/query/complex_having.sim @@ -5,7 +5,7 @@ sql connect print =============== create database sql create database db -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/query/complex_where.sim b/tests/script/tsim/query/complex_where.sim index c634efabfe..c061bf9277 100644 --- a/tests/script/tsim/query/complex_where.sim +++ b/tests/script/tsim/query/complex_where.sim @@ -5,7 +5,7 @@ sql connect print =============== create database sql create database db -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/query/crash_sql.sim b/tests/script/tsim/query/crash_sql.sim index 88ff812d68..1d20491869 100644 --- a/tests/script/tsim/query/crash_sql.sim +++ b/tests/script/tsim/query/crash_sql.sim @@ -5,7 +5,7 @@ sql connect print =============== create database sql create database db -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/query/diff.sim b/tests/script/tsim/query/diff.sim index 8604859dc5..f0d82b01e9 100644 --- a/tests/script/tsim/query/diff.sim +++ b/tests/script/tsim/query/diff.sim @@ -102,7 +102,7 @@ step6: print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/query/explain.sim b/tests/script/tsim/query/explain.sim index 7cc1458657..40635dbfd3 100644 --- a/tests/script/tsim/query/explain.sim +++ b/tests/script/tsim/query/explain.sim @@ -6,7 +6,7 @@ sql connect print ======== step1 sql create database db1 vgroups 3; sql use db1; -sql show databases; +sql select * from information_schema.ins_databases; sql create stable st1 (ts timestamp, f1 int, f2 binary(200)) tags(t1 int); sql create stable st2 (ts timestamp, f1 int, f2 binary(200)) tags(t1 int); sql create table tb1 using st1 tags(1); diff --git a/tests/script/tsim/query/interval.sim b/tests/script/tsim/query/interval.sim index bd607848d0..cc8a73daec 100644 --- a/tests/script/tsim/query/interval.sim +++ b/tests/script/tsim/query/interval.sim @@ -172,7 +172,7 @@ endi print =============== clear #sql drop database $db -#sql show databases +#sql select * from information_schema.ins_databases #if $rows != 0 then # return -1 #endi diff --git a/tests/script/tsim/query/scalarFunction.sim b/tests/script/tsim/query/scalarFunction.sim index 27aa1a7e10..0b1bee19c8 100644 --- a/tests/script/tsim/query/scalarFunction.sim +++ b/tests/script/tsim/query/scalarFunction.sim @@ -8,7 +8,7 @@ $dbNamme = d0 print =============== create database $dbNamme vgroups $vgroups sql create database $dbNamme vgroups $vgroups -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 #print $data20 $data21 $data22 $data23 $data24 $data25 $data26 $data27 $data28 $data29 diff --git a/tests/script/tsim/query/scalarNull.sim b/tests/script/tsim/query/scalarNull.sim index 77aae17afc..ec95c94f23 100644 --- a/tests/script/tsim/query/scalarNull.sim +++ b/tests/script/tsim/query/scalarNull.sim @@ -6,7 +6,7 @@ sql connect print ======== step1 sql create database db1 vgroups 3; sql use db1; -sql show databases; +sql select * from information_schema.ins_databases; sql create stable st1 (ts timestamp, f1 int, f2 binary(200)) tags(t1 int); sql create table tb1 using st1 tags(1); sql insert into tb1 values ('2022-04-26 15:15:00', 1, "a"); diff --git a/tests/script/tsim/query/session.sim b/tests/script/tsim/query/session.sim index 3f219f7be9..be814c2bd2 100644 --- a/tests/script/tsim/query/session.sim +++ b/tests/script/tsim/query/session.sim @@ -8,7 +8,7 @@ $dbNamme = d0 print ====> create database $dbNamme vgroups $vgroups sql create database $dbNamme vgroups $vgroups -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08 $data09 print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17 $data18 $data19 #print $data20 $data21 $data22 $data23 $data24 $data25 $data26 $data27 $data28 $data29 diff --git a/tests/script/tsim/query/stddev.sim b/tests/script/tsim/query/stddev.sim index 291ee32e74..cc424f6ad4 100644 --- a/tests/script/tsim/query/stddev.sim +++ b/tests/script/tsim/query/stddev.sim @@ -5,7 +5,7 @@ sql connect print =============== create database sql create database db -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -404,7 +404,7 @@ sql_error select stddev(c7) from t1 print =============== clear sql drop database db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/query/time_process.sim b/tests/script/tsim/query/time_process.sim index e0ca724ef1..8d5c12a2ba 100644 --- a/tests/script/tsim/query/time_process.sim +++ b/tests/script/tsim/query/time_process.sim @@ -5,7 +5,7 @@ sql connect print =============== create database sql create database db -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -106,7 +106,7 @@ print =============== step2 after wal print =============== clear sql drop database db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/query/udf.sim b/tests/script/tsim/query/udf.sim index 2f685f8e24..7cc1403bcb 100644 --- a/tests/script/tsim/query/udf.sim +++ b/tests/script/tsim/query/udf.sim @@ -13,7 +13,7 @@ print ======== step1 udf system sh/compile_udf.sh sql create database udf vgroups 3; sql use udf; -sql show databases; +sql select * from information_schema.ins_databases; sql create table t (ts timestamp, f int); sql insert into t values(now, 1)(now+1s, 2); diff --git a/tests/script/tsim/show/basic.sim b/tests/script/tsim/show/basic.sim index cc2b847d1a..bfe674def7 100644 --- a/tests/script/tsim/show/basic.sim +++ b/tests/script/tsim/show/basic.sim @@ -50,7 +50,7 @@ if $rows != 1 then endi #sql show modules #sql show qnodes -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -148,7 +148,7 @@ if $rows != 1 then endi #sql show modules #sql show qnodes -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/stable/alter_metrics.sim b/tests/script/tsim/stable/alter_metrics.sim index f33246dfe2..e32250de13 100644 --- a/tests/script/tsim/stable/alter_metrics.sim +++ b/tests/script/tsim/stable/alter_metrics.sim @@ -756,7 +756,7 @@ endi print ======= over sql drop database d2 -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/stable/disk.sim b/tests/script/tsim/stable/disk.sim index aeb1f1d91f..e0e51b2625 100644 --- a/tests/script/tsim/stable/disk.sim +++ b/tests/script/tsim/stable/disk.sim @@ -183,7 +183,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/stable/dnode3.sim b/tests/script/tsim/stable/dnode3.sim index 9e728a12ab..656e72f32a 100644 --- a/tests/script/tsim/stable/dnode3.sim +++ b/tests/script/tsim/stable/dnode3.sim @@ -191,7 +191,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/stable/metrics.sim b/tests/script/tsim/stable/metrics.sim index a1c370d40a..055c7ea78d 100644 --- a/tests/script/tsim/stable/metrics.sim +++ b/tests/script/tsim/stable/metrics.sim @@ -121,7 +121,7 @@ if $rows != 0 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/stable/refcount.sim b/tests/script/tsim/stable/refcount.sim index 8f4f09cbb3..a83c0ca53f 100644 --- a/tests/script/tsim/stable/refcount.sim +++ b/tests/script/tsim/stable/refcount.sim @@ -14,7 +14,7 @@ sql insert into d1.t2 values(now, 1); sql drop table d1.t1; sql drop database d1; -sql show databases; +sql select * from information_schema.ins_databases; if $rows != 2 then return -1 endi @@ -43,7 +43,7 @@ endi sql drop database d2; -sql show databases; +sql select * from information_schema.ins_databases; if $rows != 2 then return -1 endi @@ -72,7 +72,7 @@ endi sql drop database d3; -sql show databases; +sql select * from information_schema.ins_databases; if $rows != 2 then return -1 endi @@ -100,7 +100,7 @@ endi sql drop database d4; -sql show databases; +sql select * from information_schema.ins_databases; if $rows != 2 then return -1 endi @@ -117,7 +117,7 @@ sql drop table d5.t1; sql drop database d5; -sql show databases; +sql select * from information_schema.ins_databases; if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/stable/vnode3.sim b/tests/script/tsim/stable/vnode3.sim index 584578b211..4bf9ec8d1c 100644 --- a/tests/script/tsim/stable/vnode3.sim +++ b/tests/script/tsim/stable/vnode3.sim @@ -164,7 +164,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/stream/basic0.sim b/tests/script/tsim/stream/basic0.sim index 61f7a57dcf..9a5fb8012f 100644 --- a/tests/script/tsim/stream/basic0.sim +++ b/tests/script/tsim/stream/basic0.sim @@ -6,7 +6,7 @@ sql connect print =============== create database sql create database d0 vgroups 1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/stream/basic1.sim b/tests/script/tsim/stream/basic1.sim index d4e575801c..5392979c0a 100644 --- a/tests/script/tsim/stream/basic1.sim +++ b/tests/script/tsim/stream/basic1.sim @@ -6,7 +6,7 @@ sql connect print =============== create database sql create database test vgroups 1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -463,7 +463,7 @@ if $data25 != 3 then endi sql create database test2 vgroups 1 -sql show databases +sql select * from information_schema.ins_databases sql use test2 sql create stable st(ts timestamp, a int, b int, c int, d double) tags(ta int,tb int,tc int); diff --git a/tests/script/tsim/stream/basic2.sim b/tests/script/tsim/stream/basic2.sim index 1a6c7c5c25..20e8c95391 100644 --- a/tests/script/tsim/stream/basic2.sim +++ b/tests/script/tsim/stream/basic2.sim @@ -6,7 +6,7 @@ sql connect print =============== create database sql create database d0 vgroups 1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/stream/ignoreExpiredData.sim b/tests/script/tsim/stream/ignoreExpiredData.sim index a3b14c4f7a..8cdebe599c 100644 --- a/tests/script/tsim/stream/ignoreExpiredData.sim +++ b/tests/script/tsim/stream/ignoreExpiredData.sim @@ -36,7 +36,7 @@ print ===== step2 print =============== create database sql create database test vgroups 1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -102,7 +102,7 @@ endi print =============== create database sql create database test1 vgroups 4 -sql show databases +sql select * from information_schema.ins_databases print ======database=$rows diff --git a/tests/script/tsim/stream/session0.sim b/tests/script/tsim/stream/session0.sim index d05a9e1814..09edc187e4 100644 --- a/tests/script/tsim/stream/session0.sim +++ b/tests/script/tsim/stream/session0.sim @@ -6,7 +6,7 @@ sql connect print =============== create database sql create database test vgroups 1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/stream/session1.sim b/tests/script/tsim/stream/session1.sim index 12ff2a6199..ab173c5929 100644 --- a/tests/script/tsim/stream/session1.sim +++ b/tests/script/tsim/stream/session1.sim @@ -6,7 +6,7 @@ sql connect print =============== create database sql create database test vgroups 1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/stream/sliding.sim b/tests/script/tsim/stream/sliding.sim index 8ebadbfb50..bd8d3b0579 100644 --- a/tests/script/tsim/stream/sliding.sim +++ b/tests/script/tsim/stream/sliding.sim @@ -6,7 +6,7 @@ sql connect print =============== create database sql create database test vgroups 1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/stream/state0.sim b/tests/script/tsim/stream/state0.sim index 2573b44e19..4fa883b813 100644 --- a/tests/script/tsim/stream/state0.sim +++ b/tests/script/tsim/stream/state0.sim @@ -6,7 +6,7 @@ sql connect print =============== create database sql create database test vgroups 1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi @@ -450,7 +450,7 @@ if $data26 != 14 then endi sql create database test1 vgroups 1 -sql show databases +sql select * from information_schema.ins_databases print $data00 $data01 $data02 diff --git a/tests/script/tsim/stream/triggerInterval0.sim b/tests/script/tsim/stream/triggerInterval0.sim index db6f27ed51..7353f026bb 100644 --- a/tests/script/tsim/stream/triggerInterval0.sim +++ b/tests/script/tsim/stream/triggerInterval0.sim @@ -6,7 +6,7 @@ sql connect print =============== create database sql create database test vgroups 1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/stream/triggerSession0.sim b/tests/script/tsim/stream/triggerSession0.sim index b15083ab1b..2ea689ef78 100644 --- a/tests/script/tsim/stream/triggerSession0.sim +++ b/tests/script/tsim/stream/triggerSession0.sim @@ -6,7 +6,7 @@ sql connect print =============== create database sql create database test vgroups 1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/stream/windowClose.sim b/tests/script/tsim/stream/windowClose.sim index 1f024b9836..0d435a9fbd 100644 --- a/tests/script/tsim/stream/windowClose.sim +++ b/tests/script/tsim/stream/windowClose.sim @@ -6,7 +6,7 @@ sql connect print =============== create database sql create database test vgroups 1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/sync/3Replica1VgElect.sim b/tests/script/tsim/sync/3Replica1VgElect.sim index 7cd291e56f..5e077566d3 100644 --- a/tests/script/tsim/sync/3Replica1VgElect.sim +++ b/tests/script/tsim/sync/3Replica1VgElect.sim @@ -59,7 +59,7 @@ if $loop_cnt == 100 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] $data[2][7] $data[2][8] $data[2][9] $data[2][6] $data[2][11] $data[2][12] $data[2][13] $data[2][14] $data[2][15] $data[2][16] $data[2][17] $data[2][18] $data[2][19] if $rows != 3 then @@ -406,7 +406,7 @@ if $loop_cnt == 100 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data(db1)[0] $data(db1)[1] $data(db1)[2] $data(db1)[3] $data(db1)[4] $data(db1)[5] $data(db1)[6] $data(db1)[7] $data(db1)[8] $data(db1)[9] $data(db1)[6] $data(db1)[11] $data(db1)[12] $data(db1)[13] $data(db1)[14] $data(db1)[15] $data(db1)[16] $data(db1)[17] $data(db1)[18] $data(db1)[19] if $rows != 4 then diff --git a/tests/script/tsim/sync/3Replica5VgElect.sim b/tests/script/tsim/sync/3Replica5VgElect.sim index a9858acbfb..0996ac94a1 100644 --- a/tests/script/tsim/sync/3Replica5VgElect.sim +++ b/tests/script/tsim/sync/3Replica5VgElect.sim @@ -59,7 +59,7 @@ if $loop_cnt == 100 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] $data[2][7] $data[2][8] $data[2][9] $data[2][6] $data[2][11] $data[2][12] $data[2][13] $data[2][14] $data[2][15] $data[2][16] $data[2][17] $data[2][18] $data[2][19] if $rows != 3 then @@ -572,7 +572,7 @@ if $loop_cnt == 100 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data(db1)[0] $data(db1)[1] $data(db1)[2] $data(db1)[3] $data(db1)[4] $data(db1)[5] $data(db1)[6] $data(db1)[7] $data(db1)[8] $data(db1)[9] $data(db1)[6] $data(db1)[11] $data(db1)[12] $data(db1)[13] $data(db1)[14] $data(db1)[15] $data(db1)[16] $data(db1)[17] $data(db1)[18] $data(db1)[19] if $rows != 4 then diff --git a/tests/script/tsim/sync/3Replica5VgElect3mnode.sim b/tests/script/tsim/sync/3Replica5VgElect3mnode.sim index 22ff28a485..420df6e418 100644 --- a/tests/script/tsim/sync/3Replica5VgElect3mnode.sim +++ b/tests/script/tsim/sync/3Replica5VgElect3mnode.sim @@ -57,7 +57,7 @@ if $loop_cnt == 100 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] $data[2][7] $data[2][8] $data[2][9] $data[2][6] $data[2][11] $data[2][12] $data[2][13] $data[2][14] $data[2][15] $data[2][16] $data[2][17] $data[2][18] $data[2][19] if $rows != 3 then @@ -692,7 +692,7 @@ if $loop_cnt == 100 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data(db1)[0] $data(db1)[1] $data(db1)[2] $data(db1)[3] $data(db1)[4] $data(db1)[5] $data(db1)[6] $data(db1)[7] $data(db1)[8] $data(db1)[9] $data(db1)[6] $data(db1)[11] $data(db1)[12] $data(db1)[13] $data(db1)[14] $data(db1)[15] $data(db1)[16] $data(db1)[17] $data(db1)[18] $data(db1)[19] if $rows != 4 then diff --git a/tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim b/tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim index 5d906d8857..bee574960e 100644 --- a/tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim +++ b/tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim @@ -59,7 +59,7 @@ if $loop_cnt == 100 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] $data[2][7] $data[2][8] $data[2][9] $data[2][6] $data[2][11] $data[2][12] $data[2][13] $data[2][14] $data[2][15] $data[2][16] $data[2][17] $data[2][18] $data[2][19] if $rows != 3 then diff --git a/tests/script/tsim/sync/electTest.sim b/tests/script/tsim/sync/electTest.sim index e421517961..3203c3333a 100644 --- a/tests/script/tsim/sync/electTest.sim +++ b/tests/script/tsim/sync/electTest.sim @@ -59,7 +59,7 @@ if $loop_cnt == 100 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] $data[2][7] $data[2][8] $data[2][9] $data[2][6] $data[2][11] $data[2][12] $data[2][13] $data[2][14] $data[2][15] $data[2][16] $data[2][17] $data[2][18] $data[2][19] if $rows != 3 then diff --git a/tests/script/tsim/sync/oneReplica1VgElect.sim b/tests/script/tsim/sync/oneReplica1VgElect.sim index 423f70646e..fe0def8d92 100644 --- a/tests/script/tsim/sync/oneReplica1VgElect.sim +++ b/tests/script/tsim/sync/oneReplica1VgElect.sim @@ -59,7 +59,7 @@ if $loop_cnt == 100 then print ====> db1 not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data(db1)[0] $data(db)[1] $data(db)[2] $data(db)[3] $data(db)[4] $data(db)[5] $data(db)[6] $data(db)[7] $data(db)[8] $data(db)[9] $data(db)[10] $data(db)[11] $data(db)[12] print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $data(db)[18] $data(db)[19] $data(db)[20] diff --git a/tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim b/tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim index d2b5565308..ecd69fd9f0 100644 --- a/tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim +++ b/tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim @@ -59,7 +59,7 @@ if $loop_cnt == 10 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data(db)[0] $data(db)[1] $data(db)[2] $data(db)[3] $data(db)[4] $data(db)[5] $data(db)[6] $data(db)[7] $data(db)[8] $data(db)[9] $data(db)[10] $data(db)[11] $data(db)[12] print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $data(db)[18] $data(db)[19] $data(db)[20] diff --git a/tests/script/tsim/sync/oneReplica5VgElect.sim b/tests/script/tsim/sync/oneReplica5VgElect.sim index 765ba35ebd..d4e58f871e 100644 --- a/tests/script/tsim/sync/oneReplica5VgElect.sim +++ b/tests/script/tsim/sync/oneReplica5VgElect.sim @@ -59,7 +59,7 @@ if $loop_cnt == 100 then print ====> db1 not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data(db1)[0] $data(db)[1] $data(db)[2] $data(db)[3] $data(db)[4] $data(db)[5] $data(db)[6] $data(db)[7] $data(db)[8] $data(db)[9] $data(db)[10] $data(db)[11] $data(db)[12] if $rows != 3 then diff --git a/tests/script/tsim/sync/threeReplica1VgElect.sim b/tests/script/tsim/sync/threeReplica1VgElect.sim index 7a4fa1c2a6..feea99ff6e 100644 --- a/tests/script/tsim/sync/threeReplica1VgElect.sim +++ b/tests/script/tsim/sync/threeReplica1VgElect.sim @@ -59,7 +59,7 @@ if $loop_cnt == 10 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data(db)[0] $data(db)[1] $data(db)[2] $data(db)[3] $data(db)[4] $data(db)[5] $data(db)[6] $data(db)[7] $data(db)[8] $data(db)[9] $data(db)[10] $data(db)[11] $data(db)[12] print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $data(db)[18] $data(db)[19] $data(db)[20] diff --git a/tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim b/tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim index 967b3f1406..9c6cce0c86 100644 --- a/tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim +++ b/tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim @@ -59,7 +59,7 @@ if $loop_cnt == 10 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data(db)[0] $data(db)[1] $data(db)[2] $data(db)[3] $data(db)[4] $data(db)[5] $data(db)[6] $data(db)[7] $data(db)[8] $data(db)[9] $data(db)[10] $data(db)[11] $data(db)[12] print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $data(db)[18] $data(db)[19] $data(db)[20] diff --git a/tests/script/tsim/sync/vnode-insert.sim b/tests/script/tsim/sync/vnode-insert.sim index 18ed40a881..d995f5f098 100644 --- a/tests/script/tsim/sync/vnode-insert.sim +++ b/tests/script/tsim/sync/vnode-insert.sim @@ -59,7 +59,7 @@ if $loop_cnt == 100 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] $data[2][7] $data[2][8] $data[2][9] $data[2][6] $data[2][11] $data[2][12] $data[2][13] $data[2][14] $data[2][15] $data[2][16] $data[2][17] $data[2][18] $data[2][19] if $rows != 3 then diff --git a/tests/script/tsim/sync/vnodeLeaderTransfer.sim b/tests/script/tsim/sync/vnodeLeaderTransfer.sim index 4fa08a8fbb..86f81fd550 100644 --- a/tests/script/tsim/sync/vnodeLeaderTransfer.sim +++ b/tests/script/tsim/sync/vnodeLeaderTransfer.sim @@ -59,7 +59,7 @@ if $loop_cnt == 100 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] $data[2][7] $data[2][8] $data[2][9] $data[2][6] $data[2][11] $data[2][12] $data[2][13] $data[2][14] $data[2][15] $data[2][16] $data[2][17] $data[2][18] $data[2][19] if $rows != 3 then diff --git a/tests/script/tsim/sync/vnodeLogAnalyzeTest.sim b/tests/script/tsim/sync/vnodeLogAnalyzeTest.sim index f159ac66b2..869cb5fd59 100644 --- a/tests/script/tsim/sync/vnodeLogAnalyzeTest.sim +++ b/tests/script/tsim/sync/vnodeLogAnalyzeTest.sim @@ -59,7 +59,7 @@ if $loop_cnt == 100 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] $data[2][7] $data[2][8] $data[2][9] $data[2][6] $data[2][11] $data[2][12] $data[2][13] $data[2][14] $data[2][15] $data[2][16] $data[2][17] $data[2][18] $data[2][19] if $rows != 3 then diff --git a/tests/script/tsim/sync/vnodesnapshot-rsma-test.sim b/tests/script/tsim/sync/vnodesnapshot-rsma-test.sim index c4e0503aa9..454ad792d2 100644 --- a/tests/script/tsim/sync/vnodesnapshot-rsma-test.sim +++ b/tests/script/tsim/sync/vnodesnapshot-rsma-test.sim @@ -60,7 +60,7 @@ if $loop_cnt == 100 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] $data[2][7] $data[2][8] $data[2][9] $data[2][6] $data[2][11] $data[2][12] $data[2][13] $data[2][14] $data[2][15] $data[2][16] $data[2][17] $data[2][18] $data[2][19] if $rows != 3 then diff --git a/tests/script/tsim/sync/vnodesnapshot-test.sim b/tests/script/tsim/sync/vnodesnapshot-test.sim index 9f4cd37b6d..402c03f67c 100644 --- a/tests/script/tsim/sync/vnodesnapshot-test.sim +++ b/tests/script/tsim/sync/vnodesnapshot-test.sim @@ -59,7 +59,7 @@ if $loop_cnt == 100 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] $data[2][7] $data[2][8] $data[2][9] $data[2][6] $data[2][11] $data[2][12] $data[2][13] $data[2][14] $data[2][15] $data[2][16] $data[2][17] $data[2][18] $data[2][19] if $rows != 3 then diff --git a/tests/script/tsim/sync/vnodesnapshot.sim b/tests/script/tsim/sync/vnodesnapshot.sim index bec13d7e79..21a3a707e6 100644 --- a/tests/script/tsim/sync/vnodesnapshot.sim +++ b/tests/script/tsim/sync/vnodesnapshot.sim @@ -59,7 +59,7 @@ if $loop_cnt == 100 then print ====> db not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ===> rows: $rows print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] $data[2][7] $data[2][8] $data[2][9] $data[2][6] $data[2][11] $data[2][12] $data[2][13] $data[2][14] $data[2][15] $data[2][16] $data[2][17] $data[2][18] $data[2][19] if $rows != 3 then diff --git a/tests/script/tsim/table/autocreate.sim b/tests/script/tsim/table/autocreate.sim index 1267e33932..50ce0c6af7 100644 --- a/tests/script/tsim/table/autocreate.sim +++ b/tests/script/tsim/table/autocreate.sim @@ -5,7 +5,7 @@ sql connect print =============== create database sql create database db -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/table/basic1.sim b/tests/script/tsim/table/basic1.sim index 6cb5bc54f7..2d45362ff2 100644 --- a/tests/script/tsim/table/basic1.sim +++ b/tests/script/tsim/table/basic1.sim @@ -28,7 +28,7 @@ endi print =============== create database sql create database d1 -sql show databases +sql select * from information_schema.ins_databases if $rows != 6 then return -1 endi diff --git a/tests/script/tsim/table/basic2.sim b/tests/script/tsim/table/basic2.sim index 297ae3d333..67c1ca0feb 100644 --- a/tests/script/tsim/table/basic2.sim +++ b/tests/script/tsim/table/basic2.sim @@ -19,7 +19,7 @@ if $rows != 2 then endi print =============== show -sql show databases +sql select * from information_schema.ins_databases if $data22 != 2 then return -1 endi diff --git a/tests/script/tsim/table/basic3.sim b/tests/script/tsim/table/basic3.sim index c9335b6d1b..35cdb74b99 100644 --- a/tests/script/tsim/table/basic3.sim +++ b/tests/script/tsim/table/basic3.sim @@ -5,7 +5,7 @@ sql connect print =============== create database sql create database db -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/table/bigint.sim b/tests/script/tsim/table/bigint.sim index 4611db112f..a9e2b2684c 100644 --- a/tests/script/tsim/table/bigint.sim +++ b/tests/script/tsim/table/bigint.sim @@ -62,7 +62,7 @@ if $data01 != 9223372036854770000 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/binary.sim b/tests/script/tsim/table/binary.sim index a2cfc77796..2b63a534ed 100644 --- a/tests/script/tsim/table/binary.sim +++ b/tests/script/tsim/table/binary.sim @@ -52,7 +52,7 @@ if $data00 != 34567 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/bool.sim b/tests/script/tsim/table/bool.sim index 454bf47d33..2731baf522 100644 --- a/tests/script/tsim/table/bool.sim +++ b/tests/script/tsim/table/bool.sim @@ -81,7 +81,7 @@ if $data01 != 0 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/column2.sim b/tests/script/tsim/table/column2.sim index e540835c14..bd917b2324 100644 --- a/tests/script/tsim/table/column2.sim +++ b/tests/script/tsim/table/column2.sim @@ -15,7 +15,7 @@ if $rows != 1 then endi sql drop database db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/column_name.sim b/tests/script/tsim/table/column_name.sim index bad6c95bb1..5a19695a0f 100644 --- a/tests/script/tsim/table/column_name.sim +++ b/tests/script/tsim/table/column_name.sim @@ -75,7 +75,7 @@ if $rows != 1 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/column_num.sim b/tests/script/tsim/table/column_num.sim index 0a5d151adf..5913b17936 100644 --- a/tests/script/tsim/table/column_num.sim +++ b/tests/script/tsim/table/column_num.sim @@ -74,7 +74,7 @@ if $rows != 1 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/column_value.sim b/tests/script/tsim/table/column_value.sim index 861e2f1a8d..578a9b4d0a 100644 --- a/tests/script/tsim/table/column_value.sim +++ b/tests/script/tsim/table/column_value.sim @@ -64,7 +64,7 @@ if $rows != 1 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/createmulti.sim b/tests/script/tsim/table/createmulti.sim index e204bd4f3d..a73b1bfe8a 100644 --- a/tests/script/tsim/table/createmulti.sim +++ b/tests/script/tsim/table/createmulti.sim @@ -5,7 +5,7 @@ sql connect print =============== create database sql create database db -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/table/date.sim b/tests/script/tsim/table/date.sim index f2361cf4f5..aa19baec15 100644 --- a/tests/script/tsim/table/date.sim +++ b/tests/script/tsim/table/date.sim @@ -79,7 +79,7 @@ if $rows != 1 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/db.table.sim b/tests/script/tsim/table/db.table.sim index b5d8294b6e..fbf45424b1 100644 --- a/tests/script/tsim/table/db.table.sim +++ b/tests/script/tsim/table/db.table.sim @@ -36,7 +36,7 @@ sql drop table $table sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/describe.sim b/tests/script/tsim/table/describe.sim index 28690e5794..3d600bd24f 100644 --- a/tests/script/tsim/table/describe.sim +++ b/tests/script/tsim/table/describe.sim @@ -38,7 +38,7 @@ if $data12 != 4 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/double.sim b/tests/script/tsim/table/double.sim index 08f0dc7663..4bb5944664 100644 --- a/tests/script/tsim/table/double.sim +++ b/tests/script/tsim/table/double.sim @@ -87,7 +87,7 @@ if $data01 != 2.000000000 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/float.sim b/tests/script/tsim/table/float.sim index c53b4bb1a4..5ba68bdff9 100644 --- a/tests/script/tsim/table/float.sim +++ b/tests/script/tsim/table/float.sim @@ -87,7 +87,7 @@ if $data01 != 2.00000 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/int.sim b/tests/script/tsim/table/int.sim index 7e3cefc7ca..56bae09178 100644 --- a/tests/script/tsim/table/int.sim +++ b/tests/script/tsim/table/int.sim @@ -119,7 +119,7 @@ if $data01 != -123 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/limit.sim b/tests/script/tsim/table/limit.sim index d20938367e..acc86c63da 100644 --- a/tests/script/tsim/table/limit.sim +++ b/tests/script/tsim/table/limit.sim @@ -81,7 +81,7 @@ if $rows != 8 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/smallint.sim b/tests/script/tsim/table/smallint.sim index a7547c7282..5ed3e29043 100644 --- a/tests/script/tsim/table/smallint.sim +++ b/tests/script/tsim/table/smallint.sim @@ -91,7 +91,7 @@ if $data01 != 2 then return -1 endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/table.sim b/tests/script/tsim/table/table.sim index 65774dd03c..b59922b3f3 100644 --- a/tests/script/tsim/table/table.sim +++ b/tests/script/tsim/table/table.sim @@ -212,7 +212,7 @@ if $rows != 7 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/table_len.sim b/tests/script/tsim/table/table_len.sim index e48c5d419e..e48e45e0d8 100644 --- a/tests/script/tsim/table/table_len.sim +++ b/tests/script/tsim/table/table_len.sim @@ -94,7 +94,7 @@ sql create table a.1 (ts timestamp, speed int) -x step8 step8: sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/tinyint.sim b/tests/script/tsim/table/tinyint.sim index 4764600b5b..92e152f6d6 100644 --- a/tests/script/tsim/table/tinyint.sim +++ b/tests/script/tsim/table/tinyint.sim @@ -91,7 +91,7 @@ if $data01 != 2 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/table/vgroup.sim b/tests/script/tsim/table/vgroup.sim index 2925e9de4c..b6a88f3113 100644 --- a/tests/script/tsim/table/vgroup.sim +++ b/tests/script/tsim/table/vgroup.sim @@ -128,7 +128,7 @@ $db = $dbPrefix . $i sql create database $db sql use $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 7 then return -1 endi @@ -139,7 +139,7 @@ while $i < 5 sql drop database $db $i = $i + 1 endw -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/3.sim b/tests/script/tsim/tag/3.sim index d816aec3e3..ee794d6fc7 100644 --- a/tests/script/tsim/tag/3.sim +++ b/tests/script/tsim/tag/3.sim @@ -511,7 +511,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/4.sim b/tests/script/tsim/tag/4.sim index fcdb146fb9..7ad253bf14 100644 --- a/tests/script/tsim/tag/4.sim +++ b/tests/script/tsim/tag/4.sim @@ -701,7 +701,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/5.sim b/tests/script/tsim/tag/5.sim index 319d9c7bc0..eaf613e9d1 100644 --- a/tests/script/tsim/tag/5.sim +++ b/tests/script/tsim/tag/5.sim @@ -824,7 +824,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/6.sim b/tests/script/tsim/tag/6.sim index 4f7f5b88d1..31aa5b1747 100644 --- a/tests/script/tsim/tag/6.sim +++ b/tests/script/tsim/tag/6.sim @@ -979,7 +979,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/add.sim b/tests/script/tsim/tag/add.sim index c08ae0ff4c..78244d74c3 100644 --- a/tests/script/tsim/tag/add.sim +++ b/tests/script/tsim/tag/add.sim @@ -838,7 +838,7 @@ sql alter table $mt add tag tgcol8 bigint print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/bigint.sim b/tests/script/tsim/tag/bigint.sim index 565688270c..dc5a03152b 100644 --- a/tests/script/tsim/tag/bigint.sim +++ b/tests/script/tsim/tag/bigint.sim @@ -229,7 +229,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/binary.sim b/tests/script/tsim/tag/binary.sim index f3f89d6659..b3f243b8c0 100644 --- a/tests/script/tsim/tag/binary.sim +++ b/tests/script/tsim/tag/binary.sim @@ -229,7 +229,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/binary_binary.sim b/tests/script/tsim/tag/binary_binary.sim index 071b457b44..ad6c0ca1cb 100644 --- a/tests/script/tsim/tag/binary_binary.sim +++ b/tests/script/tsim/tag/binary_binary.sim @@ -298,7 +298,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/bool.sim b/tests/script/tsim/tag/bool.sim index 25c7b2d967..c0f4c1ccdd 100644 --- a/tests/script/tsim/tag/bool.sim +++ b/tests/script/tsim/tag/bool.sim @@ -227,7 +227,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/bool_binary.sim b/tests/script/tsim/tag/bool_binary.sim index 3fcb085e37..627aea4495 100644 --- a/tests/script/tsim/tag/bool_binary.sim +++ b/tests/script/tsim/tag/bool_binary.sim @@ -298,7 +298,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/bool_int.sim b/tests/script/tsim/tag/bool_int.sim index 2ff640b329..1e291573ef 100644 --- a/tests/script/tsim/tag/bool_int.sim +++ b/tests/script/tsim/tag/bool_int.sim @@ -314,7 +314,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/change.sim b/tests/script/tsim/tag/change.sim index 13b2da4693..53f9f49396 100644 --- a/tests/script/tsim/tag/change.sim +++ b/tests/script/tsim/tag/change.sim @@ -502,7 +502,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/column.sim b/tests/script/tsim/tag/column.sim index f4e2e5b7fe..cc692900ce 100644 --- a/tests/script/tsim/tag/column.sim +++ b/tests/script/tsim/tag/column.sim @@ -83,7 +83,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/commit.sim b/tests/script/tsim/tag/commit.sim index 1a47fd838f..cc63e16700 100644 --- a/tests/script/tsim/tag/commit.sim +++ b/tests/script/tsim/tag/commit.sim @@ -1170,7 +1170,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/delete.sim b/tests/script/tsim/tag/delete.sim index 720f4341f9..36ef1110f8 100644 --- a/tests/script/tsim/tag/delete.sim +++ b/tests/script/tsim/tag/delete.sim @@ -813,7 +813,7 @@ step145: print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/double.sim b/tests/script/tsim/tag/double.sim index b8292b64e8..7af2f19c59 100644 --- a/tests/script/tsim/tag/double.sim +++ b/tests/script/tsim/tag/double.sim @@ -230,7 +230,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/filter.sim b/tests/script/tsim/tag/filter.sim index b9f2df0cc6..9fb5f66c36 100644 --- a/tests/script/tsim/tag/filter.sim +++ b/tests/script/tsim/tag/filter.sim @@ -139,7 +139,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/float.sim b/tests/script/tsim/tag/float.sim index 26a09e2973..d176188329 100644 --- a/tests/script/tsim/tag/float.sim +++ b/tests/script/tsim/tag/float.sim @@ -230,7 +230,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/int.sim b/tests/script/tsim/tag/int.sim index 13255eb2ba..5a35695cbe 100644 --- a/tests/script/tsim/tag/int.sim +++ b/tests/script/tsim/tag/int.sim @@ -229,7 +229,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/int_binary.sim b/tests/script/tsim/tag/int_binary.sim index 01d73cf0c2..53058ee331 100644 --- a/tests/script/tsim/tag/int_binary.sim +++ b/tests/script/tsim/tag/int_binary.sim @@ -298,7 +298,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/int_float.sim b/tests/script/tsim/tag/int_float.sim index 0b20ff3d62..826e1f5c08 100644 --- a/tests/script/tsim/tag/int_float.sim +++ b/tests/script/tsim/tag/int_float.sim @@ -314,7 +314,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/set.sim b/tests/script/tsim/tag/set.sim index 5bd3463e3a..ebca50a3be 100644 --- a/tests/script/tsim/tag/set.sim +++ b/tests/script/tsim/tag/set.sim @@ -447,7 +447,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/smallint.sim b/tests/script/tsim/tag/smallint.sim index 70c5ee0771..9fb3ca1426 100644 --- a/tests/script/tsim/tag/smallint.sim +++ b/tests/script/tsim/tag/smallint.sim @@ -229,7 +229,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tag/tinyint.sim b/tests/script/tsim/tag/tinyint.sim index b7f7616cf4..11cd6ee3b2 100644 --- a/tests/script/tsim/tag/tinyint.sim +++ b/tests/script/tsim/tag/tinyint.sim @@ -229,7 +229,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/tmq/prepareBasicEnv-1vgrp.sim b/tests/script/tsim/tmq/prepareBasicEnv-1vgrp.sim index 4630e295a9..8668e41e53 100644 --- a/tests/script/tsim/tmq/prepareBasicEnv-1vgrp.sim +++ b/tests/script/tsim/tmq/prepareBasicEnv-1vgrp.sim @@ -35,7 +35,7 @@ if $loop_cnt == 10 then print ====> database not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ==> rows: $rows print ==> $data(db)[0] $data(db)[1] $data(db)[2] $data(db)[3] $data(db)[4] $data(db)[5] $data(db)[6] $data(db)[7] $data(db)[8] $data(db)[9] $data(db)[10] $data(db)[11] $data(db)[12] print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $data(db)[18] $data(db)[19] $data(db)[20] diff --git a/tests/script/tsim/tmq/prepareBasicEnv-4vgrp.sim b/tests/script/tsim/tmq/prepareBasicEnv-4vgrp.sim index bce2292f97..0c24205335 100644 --- a/tests/script/tsim/tmq/prepareBasicEnv-4vgrp.sim +++ b/tests/script/tsim/tmq/prepareBasicEnv-4vgrp.sim @@ -35,7 +35,7 @@ if $loop_cnt == 10 then print ====> database not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ==> rows: $rows print ==> $data(db)[0] $data(db)[1] $data(db)[2] $data(db)[3] $data(db)[4] $data(db)[5] $data(db)[6] $data(db)[7] $data(db)[8] $data(db)[9] $data(db)[10] $data(db)[11] $data(db)[12] print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $data(db)[18] $data(db)[19] $data(db)[20] diff --git a/tests/script/tsim/tmq/topic.sim b/tests/script/tsim/tmq/topic.sim index 33a5b861b6..602b106472 100644 --- a/tests/script/tsim/tmq/topic.sim +++ b/tests/script/tsim/tmq/topic.sim @@ -27,7 +27,7 @@ if $loop_cnt == 10 then print ====> database not ready! return -1 endi -sql show databases +sql select * from information_schema.ins_databases print ==> rows: $rows print ==> $data(db)[0] $data(db)[1] $data(db)[2] $data(db)[3] $data(db)[4] $data(db)[5] $data(db)[6] $data(db)[7] $data(db)[8] $data(db)[9] $data(db)[10] $data(db)[11] $data(db)[12] print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $data(db)[18] $data(db)[19] $data(db)[20] diff --git a/tests/script/tsim/trans/create_db.sim b/tests/script/tsim/trans/create_db.sim index 057711aa88..bda1fe9f18 100644 --- a/tests/script/tsim/trans/create_db.sim +++ b/tests/script/tsim/trans/create_db.sim @@ -124,7 +124,7 @@ if $system_content != Windows_NT then return -1 endi - sql show databases ; + sql select * from information_schema.ins_databases ; if $rows != 4 then return -1 endi diff --git a/tests/script/tsim/user/privilege_db.sim b/tests/script/tsim/user/privilege_db.sim index a694d21f2f..f5d25266dc 100644 --- a/tests/script/tsim/user/privilege_db.sim +++ b/tests/script/tsim/user/privilege_db.sim @@ -7,7 +7,7 @@ print =============== create db sql create database d1 vgroups 1; sql create database d2 vgroups 1; sql create database d3 vgroups 1; -sql show databases +sql select * from information_schema.ins_databases if $rows != 5 then return -1 endi diff --git a/tests/script/tsim/valgrind/checkError1.sim b/tests/script/tsim/valgrind/checkError1.sim index f06a26aec6..529b2d325f 100644 --- a/tests/script/tsim/valgrind/checkError1.sim +++ b/tests/script/tsim/valgrind/checkError1.sim @@ -63,7 +63,7 @@ if $rows != 1 then return -1 endi -sql show databases +sql select * from information_schema.ins_databases if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/valgrind/checkError2.sim b/tests/script/tsim/valgrind/checkError2.sim index e3322f0366..d9e96d14dc 100644 --- a/tests/script/tsim/valgrind/checkError2.sim +++ b/tests/script/tsim/valgrind/checkError2.sim @@ -24,7 +24,7 @@ endi print =============== step2: create db sql create database d1 vgroups 2 buffer 3 -sql show databases +sql select * from information_schema.ins_databases sql use d1 sql show vgroups diff --git a/tests/script/tsim/valgrind/checkError3.sim b/tests/script/tsim/valgrind/checkError3.sim index 41623896b3..66d41ca6ea 100644 --- a/tests/script/tsim/valgrind/checkError3.sim +++ b/tests/script/tsim/valgrind/checkError3.sim @@ -24,7 +24,7 @@ endi print =============== step2: create db sql create database d1 vgroups 3 buffer 3 -sql show databases +sql select * from information_schema.ins_databases sql use d1 sql show vgroups diff --git a/tests/script/tsim/valgrind/checkError4.sim b/tests/script/tsim/valgrind/checkError4.sim index 745ff40517..37472d487b 100644 --- a/tests/script/tsim/valgrind/checkError4.sim +++ b/tests/script/tsim/valgrind/checkError4.sim @@ -25,7 +25,7 @@ endi print =============== step2: create db sql create database d1 vgroups 2 buffer 3 sql create database d2 vgroups 2 buffer 3 -sql show databases; +sql select * from information_schema.ins_databases; sql show d1.vgroups; print =============== step3: create show stable diff --git a/tests/script/tsim/valgrind/checkUdf.sim b/tests/script/tsim/valgrind/checkUdf.sim index 1026bad3d0..594d649714 100644 --- a/tests/script/tsim/valgrind/checkUdf.sim +++ b/tests/script/tsim/valgrind/checkUdf.sim @@ -8,7 +8,7 @@ print ======== step1 udf system sh/copy_udf.sh sql create database udf vgroups 3; sql use udf; -sql show databases; +sql select * from information_schema.ins_databases; sql create table t (ts timestamp, f int); sql insert into t values(now, 1)(now+1s, 2); diff --git a/tests/script/tsim/vector/metrics_field.sim b/tests/script/tsim/vector/metrics_field.sim index b75ba9cffe..9936859e15 100644 --- a/tests/script/tsim/vector/metrics_field.sim +++ b/tests/script/tsim/vector/metrics_field.sim @@ -601,7 +601,7 @@ step63: print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/vector/metrics_mix.sim b/tests/script/tsim/vector/metrics_mix.sim index fa93f0b2e3..ccc5101ec5 100644 --- a/tests/script/tsim/vector/metrics_mix.sim +++ b/tests/script/tsim/vector/metrics_mix.sim @@ -603,7 +603,7 @@ step63: print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/vector/metrics_query.sim b/tests/script/tsim/vector/metrics_query.sim index 5d433486e8..d69b8cfd60 100644 --- a/tests/script/tsim/vector/metrics_query.sim +++ b/tests/script/tsim/vector/metrics_query.sim @@ -597,7 +597,7 @@ step63: print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/vector/metrics_tag.sim b/tests/script/tsim/vector/metrics_tag.sim index c8380590d5..cbc4d4e19a 100644 --- a/tests/script/tsim/vector/metrics_tag.sim +++ b/tests/script/tsim/vector/metrics_tag.sim @@ -599,7 +599,7 @@ step63: print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/vector/metrics_time.sim b/tests/script/tsim/vector/metrics_time.sim index efa1ae4c84..71dea35487 100644 --- a/tests/script/tsim/vector/metrics_time.sim +++ b/tests/script/tsim/vector/metrics_time.sim @@ -599,7 +599,7 @@ step63: print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/vector/multi.sim b/tests/script/tsim/vector/multi.sim index 1b592cdd0a..bea46b0d81 100644 --- a/tests/script/tsim/vector/multi.sim +++ b/tests/script/tsim/vector/multi.sim @@ -192,7 +192,7 @@ sql select a + f from $tb where g = 2 and ts > now + 4m order by ts asc print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/vector/single.sim b/tests/script/tsim/vector/single.sim index 4da7c78110..ed373f5a14 100644 --- a/tests/script/tsim/vector/single.sim +++ b/tests/script/tsim/vector/single.sim @@ -285,7 +285,7 @@ sql select tbcol + 2 from $tb print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/vector/table_field.sim b/tests/script/tsim/vector/table_field.sim index d5bdad8be2..17cbfddcd6 100644 --- a/tests/script/tsim/vector/table_field.sim +++ b/tests/script/tsim/vector/table_field.sim @@ -599,7 +599,7 @@ step63: print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/vector/table_mix.sim b/tests/script/tsim/vector/table_mix.sim index 79ecb09d81..186620e47c 100644 --- a/tests/script/tsim/vector/table_mix.sim +++ b/tests/script/tsim/vector/table_mix.sim @@ -599,7 +599,7 @@ step63: print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/vector/table_query.sim b/tests/script/tsim/vector/table_query.sim index d69d16eba5..2a6bf3eb4e 100644 --- a/tests/script/tsim/vector/table_query.sim +++ b/tests/script/tsim/vector/table_query.sim @@ -599,7 +599,7 @@ step63: print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/vector/table_time.sim b/tests/script/tsim/vector/table_time.sim index f16c95ad4a..129e171b95 100644 --- a/tests/script/tsim/vector/table_time.sim +++ b/tests/script/tsim/vector/table_time.sim @@ -599,7 +599,7 @@ step63: print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/vnode/stable_dnode2.sim b/tests/script/tsim/vnode/stable_dnode2.sim index 99047086c4..58d8974abc 100644 --- a/tests/script/tsim/vnode/stable_dnode2.sim +++ b/tests/script/tsim/vnode/stable_dnode2.sim @@ -189,7 +189,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/vnode/stable_dnode2_stop.sim b/tests/script/tsim/vnode/stable_dnode2_stop.sim index 87972a15f9..55d9f4a02f 100644 --- a/tests/script/tsim/vnode/stable_dnode2_stop.sim +++ b/tests/script/tsim/vnode/stable_dnode2_stop.sim @@ -163,7 +163,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/vnode/stable_dnode3.sim b/tests/script/tsim/vnode/stable_dnode3.sim index 279fb3b441..41abf00bd0 100644 --- a/tests/script/tsim/vnode/stable_dnode3.sim +++ b/tests/script/tsim/vnode/stable_dnode3.sim @@ -191,7 +191,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi From 103776b4d0f7bf486840be0f1657ad60cf423bac Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Thu, 11 Aug 2022 20:40:43 +0800 Subject: [PATCH 16/52] doc: change readme doc --- README-CN.md | 8 -------- README.md | 8 -------- 2 files changed, 16 deletions(-) diff --git a/README-CN.md b/README-CN.md index 95387433da..8ad0173b05 100644 --- a/README-CN.md +++ b/README-CN.md @@ -300,14 +300,6 @@ TDengine 提供了丰富的应用程序开发接口,其中包括 C/C++、Java - [Rust](https://www.taosdata.com/cn/documentation/connector/rust) -## 第三方连接器 - -TDengine 社区生态中也有一些非常友好的第三方连接器,可以通过以下链接访问它们的源码。 - -- [Rust Bindings](https://github.com/songtianyi/tdengine-rust-bindings/tree/master/examples) -- [.Net Core Connector](https://github.com/maikebing/Maikebing.EntityFrameworkCore.Taos) -- [Lua Connector](https://github.com/taosdata/TDengine/tree/develop/examples/lua) - # 运行和添加测试例 TDengine 的测试框架和所有测试例全部开源。 diff --git a/README.md b/README.md index 72e441f92a..5e306fc07e 100644 --- a/README.md +++ b/README.md @@ -321,14 +321,6 @@ TDengine provides abundant developing tools for users to develop on TDengine. Fo - [Node.js](https://www.taosdata.com/en/documentation/connector#nodejs) - [Rust](https://www.taosdata.com/en/documentation/connector/rust) -## Third Party Connectors - -The TDengine community has also kindly built some of their own connectors! Follow the links below to find the source code for them. - -- [Rust Bindings](https://github.com/songtianyi/tdengine-rust-bindings/tree/master/examples) -- [.Net Core Connector](https://github.com/maikebing/Maikebing.EntityFrameworkCore.Taos) -- [Lua Connector](https://github.com/taosdata/TDengine/tree/develop/tests/examples/lua) - # How to run the test cases and how to add a new test case TDengine's test framework and all test cases are fully open source. From a7cf8c3d0fbac398db00c80697bb0f4f2139be11 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 11 Aug 2022 20:54:03 +0800 Subject: [PATCH 17/52] docs: refine k8s docs for3.0 (#16011) * docs: update k8s doc for 3.0 * docs: update 03-k8s.md * docs: refine 03-k8s.md --- docs/zh/10-deployment/03-k8s.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/docs/zh/10-deployment/03-k8s.md b/docs/zh/10-deployment/03-k8s.md index ab1bff4449..6bab4d2cec 100644 --- a/docs/zh/10-deployment/03-k8s.md +++ b/docs/zh/10-deployment/03-k8s.md @@ -3,11 +3,20 @@ sidebar_label: Kubernetes title: 在 Kubernetes 上部署 TDengine 集群 --- -以下配置文件可以从 [GitHub 仓库](https://github.com/taosdata/TDengine-Operator/tree/3.0/src/tdengine) 下载。 +作为面向云原生架构设计的时序数据库,可以方便的通过 Kubernetes 部署并管理 TDengine 集群。这里介绍如何使用 YAML 文件一步一步从头创建一个TDengine集群,并重点介绍 Kubernetes 环境下 TDengine 的常用操作。 + +## 前置条件 + +要使用 Kubernetes 部署管理 TDengine 集群,需要做好如下准备工作。 + +* 本文和下一章使用 minikube、kubectl 和 helm 等工具进行安装部署,请提前安装好相应软件 +* Kubernetes 已经安装部署并能正常访问使用或更新必要的容器仓库或其他服务 + +以下配置文件也可以从 [GitHub 仓库](https://github.com/taosdata/TDengine-Operator/tree/3.0/src/tdengine) 下载。 ## 配置 Service 服务 -创建一个 Service 配置文件:`taosd-service.yaml`,服务名称 `metadata.name` (此处为 "taosd") 将在下一步中使用到。添加 TDengine 所用到的所有端口: +创建一个 Service 配置文件:`taosd-service.yaml`,服务名称 `metadata.name` (此处为 "taosd") 将在下一步中使用到。添加 TDengine 所用到的端口: ```yaml --- @@ -31,7 +40,8 @@ spec: ## 有状态服务 StatefulSet -根据 Kubernetes 对各类部署的说明,我们将使用 StatefulSet 作为 TDengine 的服务类型,创建文件 `tdengine.yaml`: +根据 Kubernetes 对各类部署的说明,我们将使用 StatefulSet 作为 TDengine 的服务类型。 +创建文件 `tdengine.yaml`,其中 replicas 定义集群节点的数量为 3。节点时区为中国(Asia/Shanghai),每个节点分配 10G 标准(standard)存储。你也可以根据实际情况进行相应修改。 ```yaml --- @@ -43,7 +53,7 @@ metadata: app: "tdengine" spec: serviceName: "taosd" - replicas: 2 + replicas: 3 updateStrategy: type: RollingUpdate selector: @@ -58,10 +68,7 @@ spec: containers: - name: "tdengine" image: "tdengine/tdengine:3.0.0.0" - imagePullPolicy: "Always" - envFrom: - - configMapRef: - name: taoscfg + imagePullPolicy: "IfNotPresent" ports: - name: tcp6030 protocol: "TCP" @@ -130,10 +137,9 @@ spec: ```bash kubectl apply -f taosd-service.yaml kubectl apply -f tdengine.yaml - ``` -上面的配置将生成一个三节点的 TDengine 集群,dnode 是自动配置的,可以使用 show dnodes 命令查看当前集群的节点: +上面的配置将生成一个三节点的 TDengine 集群,dnode 为自动配置,可以使用 show dnodes 命令查看当前集群的节点: ```bash kubectl exec -i -t tdengine-0 -- taos -s "show dnodes" From 44df51f98f2c95700c447feb6d329a1e3c4ff548 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 11 Aug 2022 20:56:31 +0800 Subject: [PATCH 18/52] enh: show command optimize --- tests/pytest/account/account_create.py | 4 ++-- tests/script/tmp/data.sim | 6 ++--- tests/script/tmp/monitor.sim | 2 +- tests/script/tmp/r1.sim | 2 +- .../arbitrator/check_cluster_cfg_para.sim | 4 ++-- .../arbitrator/dn2_mn1_cache_file_sync.sim | 4 ++-- .../dn2_mn1_cache_file_sync_second.sim | 2 +- ...3_mn1_nw_disable_timeout_autoDropDnode.sim | 6 ++--- .../arbitrator/dn3_mn1_r2_vnode_delDir.sim | 8 +++---- .../arbitrator/dn3_mn1_r3_vnode_delDir.sim | 8 +++---- .../dn3_mn1_replica2_wal1_AddDelDnode.sim | 8 +++---- .../arbitrator/dn3_mn1_replica_change.sim | 8 +++---- .../dn3_mn1_replica_change_dropDnod.sim | 2 +- .../arbitrator/dn3_mn1_stopDnode_timeout.sim | 10 ++++---- .../arbitrator/dn3_mn1_vnode_change.sim | 8 +++---- .../dn3_mn1_vnode_corruptFile_offline.sim | 10 ++++---- .../dn3_mn1_vnode_corruptFile_online.sim | 10 ++++---- .../dn3_mn1_vnode_createErrData_online.sim | 6 ++--- .../arbitrator/dn3_mn1_vnode_delDir.sim | 12 +++++----- .../dn3_mn1_vnode_noCorruptFile_offline.sim | 10 ++++---- .../arbitrator/dn3_mn1_vnode_nomaster.sim | 4 ++-- .../arbitrator/insert_duplicationTs.sim | 4 ++-- .../offline_replica2_alterTable_online.sim | 4 ++-- .../offline_replica2_alterTag_online.sim | 4 ++-- .../offline_replica2_createTable_online.sim | 4 ++-- .../offline_replica2_dropDb_online.sim | 2 +- .../offline_replica2_dropTable_online.sim | 4 ++-- .../offline_replica3_alterTable_online.sim | 4 ++-- .../offline_replica3_alterTag_online.sim | 4 ++-- .../offline_replica3_createTable_online.sim | 4 ++-- .../offline_replica3_dropDb_online.sim | 2 +- .../offline_replica3_dropTable_online.sim | 4 ++-- .../replica_changeWithArbitrator.sim | 4 ++-- .../sync_replica2_alterTable_add.sim | 2 +- .../sync_replica2_alterTable_drop.sim | 2 +- .../arbitrator/sync_replica2_dropDb.sim | 2 +- .../arbitrator/sync_replica2_dropTable.sim | 2 +- .../sync_replica3_alterTable_add.sim | 2 +- .../sync_replica3_alterTable_drop.sim | 2 +- .../arbitrator/sync_replica3_createTable.sim | 2 +- ...ca3_dnodeChang_DropAddAlterTableDropDb.sim | 8 +++---- .../arbitrator/sync_replica3_dropDb.sim | 2 +- .../arbitrator/sync_replica3_dropTable.sim | 2 +- .../backup/clusterSimCase/cluster_main.sim | 2 +- tests/script/tsim/bnode/basic1.sim | 6 ++--- tests/script/tsim/db/alter_option.sim | 2 +- tests/script/tsim/db/alter_replica_13.sim | 8 +++---- tests/script/tsim/db/alter_replica_31.sim | 6 ++--- tests/script/tsim/db/basic1.sim | 4 ++-- tests/script/tsim/db/commit.sim | 2 +- tests/script/tsim/db/create_all_options.sim | 2 +- tests/script/tsim/db/error1.sim | 2 +- tests/script/tsim/dnode/balance1.sim | 22 ++++++++--------- tests/script/tsim/dnode/balance2.sim | 12 +++++----- tests/script/tsim/dnode/balance3.sim | 18 +++++++------- tests/script/tsim/dnode/balance_replica1.sim | 4 ++-- tests/script/tsim/dnode/balance_replica3.sim | 4 ++-- tests/script/tsim/dnode/balancex.sim | 14 +++++------ tests/script/tsim/dnode/create_dnode.sim | 6 ++--- .../tsim/dnode/drop_dnode_has_mnode.sim | 8 +++---- .../drop_dnode_has_multi_vnode_replica1.sim | 8 +++---- .../drop_dnode_has_multi_vnode_replica3.sim | 8 +++---- .../tsim/dnode/drop_dnode_has_qnode_snode.sim | 6 ++--- .../dnode/drop_dnode_has_vnode_replica1.sim | 10 ++++---- .../dnode/drop_dnode_has_vnode_replica3.sim | 8 +++---- tests/script/tsim/dnode/offline_reason.sim | 16 ++++++------- .../dnode/redistribute_vgroup_replica1.sim | 4 ++-- ...distribute_vgroup_replica3_v1_follower.sim | 4 ++-- ...redistribute_vgroup_replica3_v1_leader.sim | 4 ++-- .../dnode/redistribute_vgroup_replica3_v2.sim | 4 ++-- .../dnode/redistribute_vgroup_replica3_v3.sim | 4 ++-- tests/script/tsim/dnode/use_dropped_dnode.sim | 6 ++--- tests/script/tsim/dnode/vnode_clean.sim | 24 +++++++++---------- tests/script/tsim/mnode/basic1.sim | 4 ++-- tests/script/tsim/mnode/basic2.sim | 10 ++++---- tests/script/tsim/mnode/basic3.sim | 16 ++++++------- tests/script/tsim/mnode/basic4.sim | 4 ++-- tests/script/tsim/mnode/basic5.sim | 14 +++++------ .../tsim/parser/fourArithmetic-basic.sim | 2 +- tests/script/tsim/qnode/basic1.sim | 8 +++---- .../script/tsim/query/charScalarFunction.sim | 2 +- tests/script/tsim/query/complex_group.sim | 2 +- tests/script/tsim/query/complex_having.sim | 2 +- tests/script/tsim/query/complex_limit.sim | 2 +- tests/script/tsim/query/complex_select.sim | 2 +- tests/script/tsim/query/complex_where.sim | 2 +- tests/script/tsim/query/interval-offset.sim | 2 +- tests/script/tsim/query/scalarFunction.sim | 2 +- tests/script/tsim/query/session.sim | 2 +- tests/script/tsim/query/stddev.sim | 2 +- tests/script/tsim/query/time_process.sim | 2 +- tests/script/tsim/show/basic.sim | 12 +++++----- tests/script/tsim/sma/drop_sma.sim | 2 +- tests/script/tsim/snode/basic1.sim | 8 +++---- tests/script/tsim/stable/dnode3.sim | 2 +- .../tsim/stream/distributeInterval0.sim | 2 +- .../stream/distributeIntervalRetrive0.sim | 2 +- .../script/tsim/stream/distributeSession0.sim | 2 +- tests/script/tsim/stream/drop_stream.sim | 2 +- .../script/tsim/stream/ignoreExpiredData.sim | 2 +- tests/script/tsim/sync/3Replica1VgElect.sim | 6 ++--- tests/script/tsim/sync/3Replica5VgElect.sim | 6 ++--- .../tsim/sync/3Replica5VgElect3mnode.sim | 6 ++--- .../tsim/sync/3Replica5VgElect3mnodedrop.sim | 8 +++---- tests/script/tsim/sync/electTest.sim | 2 +- .../script/tsim/sync/mnodeLeaderTransfer.sim | 4 ++-- tests/script/tsim/sync/oneReplica1VgElect.sim | 2 +- .../sync/oneReplica1VgElectWithInsert.sim | 2 +- tests/script/tsim/sync/oneReplica5VgElect.sim | 4 ++-- .../script/tsim/sync/threeReplica1VgElect.sim | 2 +- .../sync/threeReplica1VgElectWihtInsert.sim | 2 +- tests/script/tsim/sync/vnode-insert.sim | 2 +- .../script/tsim/sync/vnodeLeaderTransfer.sim | 2 +- .../script/tsim/sync/vnodeLogAnalyzeTest.sim | 2 +- .../tsim/sync/vnodesnapshot-rsma-test.sim | 2 +- tests/script/tsim/sync/vnodesnapshot-test.sim | 2 +- tests/script/tsim/sync/vnodesnapshot.sim | 2 +- tests/script/tsim/trans/create_db.sim | 6 ++--- tests/script/tsim/trans/lossdata1.sim | 4 ++-- tests/script/tsim/user/basic.sim | 18 +++++++------- tests/script/tsim/user/password.sim | 8 +++---- tests/script/tsim/user/privilege_db.sim | 4 ++-- tests/script/tsim/user/privilege_sysinfo.sim | 4 ++-- tests/script/tsim/valgrind/basic1.sim | 4 ++-- tests/script/tsim/valgrind/basic2.sim | 4 ++-- tests/script/tsim/valgrind/basic3.sim | 4 ++-- tests/script/tsim/valgrind/basic4.sim | 4 ++-- tests/script/tsim/valgrind/checkError1.sim | 10 ++++---- tests/script/tsim/valgrind/checkError2.sim | 4 ++-- tests/script/tsim/valgrind/checkError3.sim | 4 ++-- tests/script/tsim/valgrind/checkError4.sim | 4 ++-- tests/script/tsim/valgrind/checkError5.sim | 4 ++-- tests/script/tsim/valgrind/checkError6.sim | 4 ++-- tests/script/tsim/vnode/replica3_basic.sim | 2 +- tests/script/tsim/vnode/replica3_import.sim | 2 +- tests/script/tsim/vnode/replica3_many.sim | 2 +- tests/script/tsim/vnode/replica3_repeat.sim | 2 +- tests/script/tsim/vnode/replica3_vgroup.sim | 2 +- .../tsim/vnode/stable_balance_replica1.sim | 6 ++--- tests/script/tsim/vnode/stable_dnode2.sim | 2 +- .../script/tsim/vnode/stable_dnode2_stop.sim | 6 ++--- tests/script/tsim/vnode/stable_dnode3.sim | 2 +- .../tsim/vnode/stable_replica3_dnode6.sim | 4 ++-- .../tsim/vnode/stable_replica3_vnode3.sim | 2 +- tests/system-test/0-others/user_control.py | 14 +++++------ .../6-cluster/5dnode3mnodeRecreateMnode.py | 2 +- 146 files changed, 370 insertions(+), 370 deletions(-) diff --git a/tests/pytest/account/account_create.py b/tests/pytest/account/account_create.py index c008acccd8..48b6bcde34 100644 --- a/tests/pytest/account/account_create.py +++ b/tests/pytest/account/account_create.py @@ -24,11 +24,11 @@ class TDTestCase: tdSql.init(conn.cursor(), logSql) def run(self): - tdSql.query("show users") + tdSql.query("select * from information_schema.ins_users") rows = tdSql.queryRows tdSql.execute("create user test PASS 'test' ") - tdSql.query("show users") + tdSql.query("select * from information_schema.ins_users") tdSql.checkRows(rows + 1) tdSql.error("create user tdenginetdenginetdengine PASS 'test' ") diff --git a/tests/script/tmp/data.sim b/tests/script/tmp/data.sim index adce1dd37c..6b7ab81529 100644 --- a/tests/script/tmp/data.sim +++ b/tests/script/tmp/data.sim @@ -23,7 +23,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> rows: $rows print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 @@ -57,7 +57,7 @@ if $data(db)[4] != 3 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $data(2)[2] != 1 then return -1 endi @@ -69,7 +69,7 @@ if $data(4)[2] != 1 then endi # vnodes -sql show dnodes +sql select * from information_schema.ins_dnodes if $data(2)[2] != 1 then return -1 endi diff --git a/tests/script/tmp/monitor.sim b/tests/script/tmp/monitor.sim index ec728fe733..8eb787e950 100644 --- a/tests/script/tmp/monitor.sim +++ b/tests/script/tmp/monitor.sim @@ -14,7 +14,7 @@ system sh/cfg.sh -n dnode1 -c monitorComp -v 1 system sh/exec.sh -n dnode1 -s start sql connect -print =============== show dnodes +print =============== select * from information_schema.ins_dnodes sql create database db vgroups 2; sql use db; sql create table db.stb (ts timestamp, c1 int, c2 binary(4)) tags(t1 int, t2 binary(16)) comment "abd"; diff --git a/tests/script/tmp/r1.sim b/tests/script/tmp/r1.sim index a51bf80b3d..42f7498d69 100644 --- a/tests/script/tmp/r1.sim +++ b/tests/script/tmp/r1.sim @@ -17,7 +17,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> rows: $rows print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 diff --git a/tests/script/tsim/backup/arbitrator/check_cluster_cfg_para.sim b/tests/script/tsim/backup/arbitrator/check_cluster_cfg_para.sim index 7bf2c2ac42..8ac75c3995 100644 --- a/tests/script/tsim/backup/arbitrator/check_cluster_cfg_para.sim +++ b/tests/script/tsim/backup/arbitrator/check_cluster_cfg_para.sim @@ -114,7 +114,7 @@ $loopCnt = $loopCnt + 1 if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 8 then sleep 2000 goto wait_dnode_created @@ -164,7 +164,7 @@ $loopCnt = $loopCnt + 1 if $loopCnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 diff --git a/tests/script/tsim/backup/arbitrator/dn2_mn1_cache_file_sync.sim b/tests/script/tsim/backup/arbitrator/dn2_mn1_cache_file_sync.sim index dbd0e2bd87..cc8130217a 100644 --- a/tests/script/tsim/backup/arbitrator/dn2_mn1_cache_file_sync.sim +++ b/tests/script/tsim/backup/arbitrator/dn2_mn1_cache_file_sync.sim @@ -119,7 +119,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode3_offline @@ -187,7 +187,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode3_ready diff --git a/tests/script/tsim/backup/arbitrator/dn2_mn1_cache_file_sync_second.sim b/tests/script/tsim/backup/arbitrator/dn2_mn1_cache_file_sync_second.sim index e15edb3f3d..9395beb0ef 100644 --- a/tests/script/tsim/backup/arbitrator/dn2_mn1_cache_file_sync_second.sim +++ b/tests/script/tsim/backup/arbitrator/dn2_mn1_cache_file_sync_second.sim @@ -16,7 +16,7 @@ system sh/exec.sh -n dnode2 -s start sleep 2000 wait_dnode2_ready: -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode2_ready diff --git a/tests/script/tsim/backup/arbitrator/dn3_mn1_nw_disable_timeout_autoDropDnode.sim b/tests/script/tsim/backup/arbitrator/dn3_mn1_nw_disable_timeout_autoDropDnode.sim index 2af7cf56b7..a2c1bf9883 100644 --- a/tests/script/tsim/backup/arbitrator/dn3_mn1_nw_disable_timeout_autoDropDnode.sim +++ b/tests/script/tsim/backup/arbitrator/dn3_mn1_nw_disable_timeout_autoDropDnode.sim @@ -101,7 +101,7 @@ if $data00 != $totalRows then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then return -1 endi @@ -119,7 +119,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode4_dropped @@ -153,7 +153,7 @@ endi print ============== step4: restart dnode4, but there no dnode4 in cluster system sh/exec.sh -n dnode4 -s start -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/backup/arbitrator/dn3_mn1_r2_vnode_delDir.sim b/tests/script/tsim/backup/arbitrator/dn3_mn1_r2_vnode_delDir.sim index 96fde9061a..560aef5c17 100644 --- a/tests/script/tsim/backup/arbitrator/dn3_mn1_r2_vnode_delDir.sim +++ b/tests/script/tsim/backup/arbitrator/dn3_mn1_r2_vnode_delDir.sim @@ -102,7 +102,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode3_offline_0 @@ -169,7 +169,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode3_reready @@ -236,7 +236,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode2_offline @@ -281,7 +281,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode2_reready diff --git a/tests/script/tsim/backup/arbitrator/dn3_mn1_r3_vnode_delDir.sim b/tests/script/tsim/backup/arbitrator/dn3_mn1_r3_vnode_delDir.sim index da76cc467b..d8a410283e 100644 --- a/tests/script/tsim/backup/arbitrator/dn3_mn1_r3_vnode_delDir.sim +++ b/tests/script/tsim/backup/arbitrator/dn3_mn1_r3_vnode_delDir.sim @@ -104,7 +104,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_offline_0 @@ -171,7 +171,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_reready @@ -238,7 +238,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode23_offline @@ -282,7 +282,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode23_reready diff --git a/tests/script/tsim/backup/arbitrator/dn3_mn1_replica2_wal1_AddDelDnode.sim b/tests/script/tsim/backup/arbitrator/dn3_mn1_replica2_wal1_AddDelDnode.sim index c924fee1ae..ab144212e4 100644 --- a/tests/script/tsim/backup/arbitrator/dn3_mn1_replica2_wal1_AddDelDnode.sim +++ b/tests/script/tsim/backup/arbitrator/dn3_mn1_replica2_wal1_AddDelDnode.sim @@ -140,7 +140,7 @@ if $data00 != $totalRows then endi #sleep 2000 -#sql show dnodes +#sql select * from information_schema.ins_dnodes #print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 #print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 #print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 @@ -173,7 +173,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_drop @@ -227,7 +227,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print rows: $rows if $rows != 4 then sleep 2000 @@ -279,7 +279,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode5 diff --git a/tests/script/tsim/backup/arbitrator/dn3_mn1_replica_change.sim b/tests/script/tsim/backup/arbitrator/dn3_mn1_replica_change.sim index b9008e4c42..7ebba54418 100644 --- a/tests/script/tsim/backup/arbitrator/dn3_mn1_replica_change.sim +++ b/tests/script/tsim/backup/arbitrator/dn3_mn1_replica_change.sim @@ -59,7 +59,7 @@ step1: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 $data4_1 print dnode2 $data4_2 @@ -140,7 +140,7 @@ step2: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 $data4_1 print dnode2 $data4_2 print dnode3 $data4_3 @@ -229,7 +229,7 @@ step6: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 $data4_1 print dnode2 $data4_2 print dnode3 $data4_3 @@ -320,7 +320,7 @@ step9: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then goto step9 endi diff --git a/tests/script/tsim/backup/arbitrator/dn3_mn1_replica_change_dropDnod.sim b/tests/script/tsim/backup/arbitrator/dn3_mn1_replica_change_dropDnod.sim index 73702835f4..31040ef0a1 100644 --- a/tests/script/tsim/backup/arbitrator/dn3_mn1_replica_change_dropDnod.sim +++ b/tests/script/tsim/backup/arbitrator/dn3_mn1_replica_change_dropDnod.sim @@ -106,7 +106,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_dropped diff --git a/tests/script/tsim/backup/arbitrator/dn3_mn1_stopDnode_timeout.sim b/tests/script/tsim/backup/arbitrator/dn3_mn1_stopDnode_timeout.sim index 27b308411a..b9e92563ff 100644 --- a/tests/script/tsim/backup/arbitrator/dn3_mn1_stopDnode_timeout.sim +++ b/tests/script/tsim/backup/arbitrator/dn3_mn1_stopDnode_timeout.sim @@ -102,7 +102,7 @@ if $data00 != $totalRows then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then return -1 endi @@ -118,7 +118,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode4_dropped @@ -153,7 +153,7 @@ endi print ============== step4: restart dnode4, but there are not dnode4 in cluster system sh/exec.sh -n dnode4 -s start sleep 2000 -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then return -1 endi @@ -161,7 +161,7 @@ endi print ============== step5: recreate dnode4 into cluster, result should fail sql create dnode $hostname4 sleep 12000 -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then return -1 endi @@ -191,7 +191,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_ready diff --git a/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_change.sim b/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_change.sim index 6d81effab6..5477ef3580 100644 --- a/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_change.sim +++ b/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_change.sim @@ -94,7 +94,7 @@ if $data00 != $totalRows then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 @@ -109,7 +109,7 @@ $loopCnt = $loopCnt + 1 if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_offline_0 @@ -175,7 +175,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_reready @@ -244,7 +244,7 @@ $loopCnt = $loopCnt + 1 if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode23_offline diff --git a/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim b/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim index d22aca07cb..07475adad6 100644 --- a/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim +++ b/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_corruptFile_offline.sim @@ -106,7 +106,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode3_offline_0 @@ -197,7 +197,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode3_reready @@ -275,7 +275,7 @@ $loopCnt = $loopCnt + 1 if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode2_offline_0 @@ -334,7 +334,7 @@ endi print ============== step6: stop dnode3 for falling disck system sh/exec.sh -n dnode3 -s stop -x SIGINT sleep $sleepTimer -sql show dnodes +sql select * from information_schema.ins_dnodes print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 @@ -356,7 +356,7 @@ $loopCnt = $loopCnt + 1 if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode23_reready_2 diff --git a/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_corruptFile_online.sim b/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_corruptFile_online.sim index 884a43bce1..e3dfccf700 100644 --- a/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_corruptFile_online.sim +++ b/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_corruptFile_online.sim @@ -110,8 +110,8 @@ if $data00 != $totalRows then return -1 endi -print show dnodes -sql show dnodes +print select * from information_schema.ins_dnodes +sql select * from information_schema.ins_dnodes print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 @@ -158,7 +158,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode2_offline_0 @@ -225,7 +225,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode3_offline_0 @@ -292,7 +292,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode3_reready diff --git a/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_createErrData_online.sim b/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_createErrData_online.sim index 3c74de4916..677e9bbacb 100644 --- a/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_createErrData_online.sim +++ b/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_createErrData_online.sim @@ -120,7 +120,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode2_offline_0 @@ -187,7 +187,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode3_offline_0 @@ -254,7 +254,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode3_reready diff --git a/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_delDir.sim b/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_delDir.sim index d0399222f1..0ac8f56d91 100644 --- a/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_delDir.sim +++ b/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_delDir.sim @@ -105,7 +105,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_offline_0 @@ -166,7 +166,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_reready @@ -226,7 +226,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode3_offline @@ -266,7 +266,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode3_reready @@ -342,7 +342,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode2_offline @@ -382,7 +382,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode2_reready diff --git a/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim b/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim index 19b29bf342..6448cc02b8 100644 --- a/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim +++ b/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_noCorruptFile_offline.sim @@ -106,7 +106,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode3_offline_0 @@ -197,7 +197,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode3_reready @@ -275,7 +275,7 @@ $loopCnt = $loopCnt + 1 if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode2_offline_0 @@ -334,7 +334,7 @@ endi print ============== step6: stop dnode3 for falling disck system sh/exec.sh -n dnode3 -s stop -x SIGINT sleep $sleepTimer -sql show dnodes +sql select * from information_schema.ins_dnodes print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 @@ -356,7 +356,7 @@ $loopCnt = $loopCnt + 1 if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode23_reready_2 diff --git a/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_nomaster.sim b/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_nomaster.sim index b9ee508f78..f8ca114437 100644 --- a/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_nomaster.sim +++ b/tests/script/tsim/backup/arbitrator/dn3_mn1_vnode_nomaster.sim @@ -109,7 +109,7 @@ $loopCnt = $loopCnt + 1 if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_offline_0 @@ -218,7 +218,7 @@ $loopCnt = $loopCnt + 1 if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode3_offline_0 diff --git a/tests/script/tsim/backup/arbitrator/insert_duplicationTs.sim b/tests/script/tsim/backup/arbitrator/insert_duplicationTs.sim index 4af47ca336..1e439f1605 100644 --- a/tests/script/tsim/backup/arbitrator/insert_duplicationTs.sim +++ b/tests/script/tsim/backup/arbitrator/insert_duplicationTs.sim @@ -131,7 +131,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode2_offline @@ -189,7 +189,7 @@ if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode2_ready diff --git a/tests/script/tsim/backup/arbitrator/offline_replica2_alterTable_online.sim b/tests/script/tsim/backup/arbitrator/offline_replica2_alterTable_online.sim index 0adb6b4759..f93332a21a 100644 --- a/tests/script/tsim/backup/arbitrator/offline_replica2_alterTable_online.sim +++ b/tests/script/tsim/backup/arbitrator/offline_replica2_alterTable_online.sim @@ -107,7 +107,7 @@ $loopCnt = $loopCnt + 1 if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_offline_0 @@ -173,7 +173,7 @@ $loopCnt = $loopCnt + 1 if $loopCnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_ready diff --git a/tests/script/tsim/backup/arbitrator/offline_replica2_alterTag_online.sim b/tests/script/tsim/backup/arbitrator/offline_replica2_alterTag_online.sim index a0877ad89c..873005daf5 100644 --- a/tests/script/tsim/backup/arbitrator/offline_replica2_alterTag_online.sim +++ b/tests/script/tsim/backup/arbitrator/offline_replica2_alterTag_online.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_offline_0 @@ -203,7 +203,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_ready diff --git a/tests/script/tsim/backup/arbitrator/offline_replica2_createTable_online.sim b/tests/script/tsim/backup/arbitrator/offline_replica2_createTable_online.sim index 376484a066..02625ba490 100644 --- a/tests/script/tsim/backup/arbitrator/offline_replica2_createTable_online.sim +++ b/tests/script/tsim/backup/arbitrator/offline_replica2_createTable_online.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_offline_0 @@ -189,7 +189,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_ready diff --git a/tests/script/tsim/backup/arbitrator/offline_replica2_dropDb_online.sim b/tests/script/tsim/backup/arbitrator/offline_replica2_dropDb_online.sim index b923a71335..3b8dbeb637 100644 --- a/tests/script/tsim/backup/arbitrator/offline_replica2_dropDb_online.sim +++ b/tests/script/tsim/backup/arbitrator/offline_replica2_dropDb_online.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_offline_0 diff --git a/tests/script/tsim/backup/arbitrator/offline_replica2_dropTable_online.sim b/tests/script/tsim/backup/arbitrator/offline_replica2_dropTable_online.sim index cb3bbb3a73..a6d84da45a 100644 --- a/tests/script/tsim/backup/arbitrator/offline_replica2_dropTable_online.sim +++ b/tests/script/tsim/backup/arbitrator/offline_replica2_dropTable_online.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_offline_0 @@ -175,7 +175,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_ready diff --git a/tests/script/tsim/backup/arbitrator/offline_replica3_alterTable_online.sim b/tests/script/tsim/backup/arbitrator/offline_replica3_alterTable_online.sim index 8a9995f891..42be85bf4b 100644 --- a/tests/script/tsim/backup/arbitrator/offline_replica3_alterTable_online.sim +++ b/tests/script/tsim/backup/arbitrator/offline_replica3_alterTable_online.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_offline_0 @@ -177,7 +177,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_ready diff --git a/tests/script/tsim/backup/arbitrator/offline_replica3_alterTag_online.sim b/tests/script/tsim/backup/arbitrator/offline_replica3_alterTag_online.sim index 6eed563bbc..212c9130df 100644 --- a/tests/script/tsim/backup/arbitrator/offline_replica3_alterTag_online.sim +++ b/tests/script/tsim/backup/arbitrator/offline_replica3_alterTag_online.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_offline_0 @@ -203,7 +203,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_ready diff --git a/tests/script/tsim/backup/arbitrator/offline_replica3_createTable_online.sim b/tests/script/tsim/backup/arbitrator/offline_replica3_createTable_online.sim index 2633d822c9..ae26952b6b 100644 --- a/tests/script/tsim/backup/arbitrator/offline_replica3_createTable_online.sim +++ b/tests/script/tsim/backup/arbitrator/offline_replica3_createTable_online.sim @@ -107,7 +107,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_offline_0 @@ -190,7 +190,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_ready diff --git a/tests/script/tsim/backup/arbitrator/offline_replica3_dropDb_online.sim b/tests/script/tsim/backup/arbitrator/offline_replica3_dropDb_online.sim index 0dfc937408..a8143b2c75 100644 --- a/tests/script/tsim/backup/arbitrator/offline_replica3_dropDb_online.sim +++ b/tests/script/tsim/backup/arbitrator/offline_replica3_dropDb_online.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_offline_0 diff --git a/tests/script/tsim/backup/arbitrator/offline_replica3_dropTable_online.sim b/tests/script/tsim/backup/arbitrator/offline_replica3_dropTable_online.sim index f2acb8b90a..c606d2a38f 100644 --- a/tests/script/tsim/backup/arbitrator/offline_replica3_dropTable_online.sim +++ b/tests/script/tsim/backup/arbitrator/offline_replica3_dropTable_online.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_offline_0 @@ -175,7 +175,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_ready diff --git a/tests/script/tsim/backup/arbitrator/replica_changeWithArbitrator.sim b/tests/script/tsim/backup/arbitrator/replica_changeWithArbitrator.sim index 9d0e967f4e..df82f7d7d2 100644 --- a/tests/script/tsim/backup/arbitrator/replica_changeWithArbitrator.sim +++ b/tests/script/tsim/backup/arbitrator/replica_changeWithArbitrator.sim @@ -114,7 +114,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode2_ready @@ -160,7 +160,7 @@ $cnt = $cnt + 1 if $cnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 3 then sleep 2000 goto wait_dnode_ready diff --git a/tests/script/tsim/backup/arbitrator/sync_replica2_alterTable_add.sim b/tests/script/tsim/backup/arbitrator/sync_replica2_alterTable_add.sim index a8c0e83cc1..23d22e4f7f 100644 --- a/tests/script/tsim/backup/arbitrator/sync_replica2_alterTable_add.sim +++ b/tests/script/tsim/backup/arbitrator/sync_replica2_alterTable_add.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_offline_0 diff --git a/tests/script/tsim/backup/arbitrator/sync_replica2_alterTable_drop.sim b/tests/script/tsim/backup/arbitrator/sync_replica2_alterTable_drop.sim index 951d26635b..3fc28f4d81 100644 --- a/tests/script/tsim/backup/arbitrator/sync_replica2_alterTable_drop.sim +++ b/tests/script/tsim/backup/arbitrator/sync_replica2_alterTable_drop.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_offline_0 diff --git a/tests/script/tsim/backup/arbitrator/sync_replica2_dropDb.sim b/tests/script/tsim/backup/arbitrator/sync_replica2_dropDb.sim index 511c796506..808bc1109e 100644 --- a/tests/script/tsim/backup/arbitrator/sync_replica2_dropDb.sim +++ b/tests/script/tsim/backup/arbitrator/sync_replica2_dropDb.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_offline_0 diff --git a/tests/script/tsim/backup/arbitrator/sync_replica2_dropTable.sim b/tests/script/tsim/backup/arbitrator/sync_replica2_dropTable.sim index 0049dc6fba..710c72fbd3 100644 --- a/tests/script/tsim/backup/arbitrator/sync_replica2_dropTable.sim +++ b/tests/script/tsim/backup/arbitrator/sync_replica2_dropTable.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_offline_0 diff --git a/tests/script/tsim/backup/arbitrator/sync_replica3_alterTable_add.sim b/tests/script/tsim/backup/arbitrator/sync_replica3_alterTable_add.sim index 4990899601..024d38da06 100644 --- a/tests/script/tsim/backup/arbitrator/sync_replica3_alterTable_add.sim +++ b/tests/script/tsim/backup/arbitrator/sync_replica3_alterTable_add.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_offline_0 diff --git a/tests/script/tsim/backup/arbitrator/sync_replica3_alterTable_drop.sim b/tests/script/tsim/backup/arbitrator/sync_replica3_alterTable_drop.sim index 10bd4fc8bd..5dd716ce97 100644 --- a/tests/script/tsim/backup/arbitrator/sync_replica3_alterTable_drop.sim +++ b/tests/script/tsim/backup/arbitrator/sync_replica3_alterTable_drop.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 20 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_offline_0 diff --git a/tests/script/tsim/backup/arbitrator/sync_replica3_createTable.sim b/tests/script/tsim/backup/arbitrator/sync_replica3_createTable.sim index a0b391dd76..f085ab4340 100644 --- a/tests/script/tsim/backup/arbitrator/sync_replica3_createTable.sim +++ b/tests/script/tsim/backup/arbitrator/sync_replica3_createTable.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_offline_0 diff --git a/tests/script/tsim/backup/arbitrator/sync_replica3_dnodeChang_DropAddAlterTableDropDb.sim b/tests/script/tsim/backup/arbitrator/sync_replica3_dnodeChang_DropAddAlterTableDropDb.sim index 68c6ecbd6e..ed2dc120af 100644 --- a/tests/script/tsim/backup/arbitrator/sync_replica3_dnodeChang_DropAddAlterTableDropDb.sim +++ b/tests/script/tsim/backup/arbitrator/sync_replica3_dnodeChang_DropAddAlterTableDropDb.sim @@ -105,7 +105,7 @@ $cnt = $cnt + 1 if $cnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_offline_0 @@ -173,7 +173,7 @@ $cnt = $cnt + 1 if $cnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_ready @@ -280,7 +280,7 @@ $cnt = $cnt + 1 if $cnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_ready_2 @@ -403,7 +403,7 @@ $cnt = $cnt + 1 if $cnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 4 then sleep 2000 goto wait_dnode4_ready_3 diff --git a/tests/script/tsim/backup/arbitrator/sync_replica3_dropDb.sim b/tests/script/tsim/backup/arbitrator/sync_replica3_dropDb.sim index 4f258a0245..a3d0d84f71 100644 --- a/tests/script/tsim/backup/arbitrator/sync_replica3_dropDb.sim +++ b/tests/script/tsim/backup/arbitrator/sync_replica3_dropDb.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_offline_0 diff --git a/tests/script/tsim/backup/arbitrator/sync_replica3_dropTable.sim b/tests/script/tsim/backup/arbitrator/sync_replica3_dropTable.sim index 7496541b76..a214fdeb22 100644 --- a/tests/script/tsim/backup/arbitrator/sync_replica3_dropTable.sim +++ b/tests/script/tsim/backup/arbitrator/sync_replica3_dropTable.sim @@ -106,7 +106,7 @@ $cnt = $cnt + 1 if $cnt == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 5 then sleep 2000 goto wait_dnode4_offline_0 diff --git a/tests/script/tsim/backup/clusterSimCase/cluster_main.sim b/tests/script/tsim/backup/clusterSimCase/cluster_main.sim index 274ce85974..dba09f94e6 100644 --- a/tests/script/tsim/backup/clusterSimCase/cluster_main.sim +++ b/tests/script/tsim/backup/clusterSimCase/cluster_main.sim @@ -1,6 +1,6 @@ # scp -r root@114.116.252.220:/home/ubuntu/clusterSimCase unique/. -#taos> show dnodes; +#taos> select * from information_schema.ins_dnodes; # id | end_point | vnodes | cores | status | role | create_time | #================================================================================================================== # 1 | ubuntu-OptiPlex-7060:7100 | 0 | 12 | ready | mnode | 2020-07-22 06:25:31.677 | diff --git a/tests/script/tsim/bnode/basic1.sim b/tests/script/tsim/bnode/basic1.sim index c1b1a7ea9a..3dc732ffd4 100644 --- a/tests/script/tsim/bnode/basic1.sim +++ b/tests/script/tsim/bnode/basic1.sim @@ -5,8 +5,8 @@ system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode2 -s start sql connect -print =============== show dnodes -sql show dnodes; +print =============== select * from information_schema.ins_dnodes +sql select * from information_schema.ins_dnodes; if $rows != 1 then return -1 endi @@ -32,7 +32,7 @@ print =============== create dnodes sql create dnode $hostname port 7200 sleep 2000 -sql show dnodes; +sql select * from information_schema.ins_dnodes; if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/db/alter_option.sim b/tests/script/tsim/db/alter_option.sim index a7f80c6784..fd14e025a5 100644 --- a/tests/script/tsim/db/alter_option.sim +++ b/tests/script/tsim/db/alter_option.sim @@ -18,7 +18,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/db/alter_replica_13.sim b/tests/script/tsim/db/alter_replica_13.sim index 76e3be60a5..d232c9bcd3 100644 --- a/tests/script/tsim/db/alter_replica_13.sim +++ b/tests/script/tsim/db/alter_replica_13.sim @@ -20,7 +20,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then @@ -43,13 +43,13 @@ if $data(db)[4] != 1 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $data(2)[2] != 1 then return -1 endi # vnodes -sql show dnodes +sql select * from information_schema.ins_dnodes if $data(2)[2] != 1 then return -1 endi @@ -81,7 +81,7 @@ step3: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> rows: $rows print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 diff --git a/tests/script/tsim/db/alter_replica_31.sim b/tests/script/tsim/db/alter_replica_31.sim index 021aa68534..17ab040520 100644 --- a/tests/script/tsim/db/alter_replica_31.sim +++ b/tests/script/tsim/db/alter_replica_31.sim @@ -22,7 +22,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> rows: $rows print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 @@ -54,7 +54,7 @@ if $data(db)[4] != 3 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $data(2)[2] != 1 then return -1 endi @@ -66,7 +66,7 @@ if $data(4)[2] != 1 then endi # vnodes -sql show dnodes +sql select * from information_schema.ins_dnodes if $data(2)[2] != 1 then return -1 endi diff --git a/tests/script/tsim/db/basic1.sim b/tests/script/tsim/db/basic1.sim index 6a11549b1d..679440590f 100644 --- a/tests/script/tsim/db/basic1.sim +++ b/tests/script/tsim/db/basic1.sim @@ -136,8 +136,8 @@ if $rows != 4 then return -1 endi -print =============== show dnodes -sql show dnodes +print =============== select * from information_schema.ins_dnodes +sql select * from information_schema.ins_dnodes if $data00 != 1 then return -1 diff --git a/tests/script/tsim/db/commit.sim b/tests/script/tsim/db/commit.sim index 191f618adb..731f2aa256 100644 --- a/tests/script/tsim/db/commit.sim +++ b/tests/script/tsim/db/commit.sim @@ -18,7 +18,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then diff --git a/tests/script/tsim/db/create_all_options.sim b/tests/script/tsim/db/create_all_options.sim index 79ee4c606f..5ac2ee6c4e 100644 --- a/tests/script/tsim/db/create_all_options.sim +++ b/tests/script/tsim/db/create_all_options.sim @@ -17,7 +17,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/db/error1.sim b/tests/script/tsim/db/error1.sim index e99af1580d..32dbe826cc 100644 --- a/tests/script/tsim/db/error1.sim +++ b/tests/script/tsim/db/error1.sim @@ -16,7 +16,7 @@ create1: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $data4_2 != ready then goto create1 endi diff --git a/tests/script/tsim/dnode/balance1.sim b/tests/script/tsim/dnode/balance1.sim index 6471529a1e..d91f514645 100644 --- a/tests/script/tsim/dnode/balance1.sim +++ b/tests/script/tsim/dnode/balance1.sim @@ -20,7 +20,7 @@ sql insert into d1.t1 values(now+3s, 13) sql insert into d1.t1 values(now+4s, 12) sql insert into d1.t1 values(now+5s, 11) -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] if $data(1)[2] != 1 then return -1 @@ -38,7 +38,7 @@ step2: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then @@ -52,7 +52,7 @@ if $data(2)[4] != ready then endi sql balance vgroup -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(2)[2] if $data(1)[2] != 0 then @@ -71,7 +71,7 @@ sql insert into d2.t2 values(now+3s, 23) sql insert into d2.t2 values(now+4s, 22) sql insert into d2.t2 values(now+5s, 21) -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(2)[2] if $data(1)[2] != 0 then @@ -83,7 +83,7 @@ endi print ========== step4 sql drop dnode 2 -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(2)[2] if $data(1)[2] != 2 then @@ -107,7 +107,7 @@ step5: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then @@ -121,7 +121,7 @@ if $data(3)[4] != ready then endi sql balance vgroup -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(3)[2] if $data(1)[2] != 1 then @@ -140,7 +140,7 @@ sql insert into d3.t3 values(now+3s, 33) sql insert into d3.t3 values(now+4s, 32) sql insert into d3.t3 values(now+5s, 31) -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(3)[2] if $data(1)[2] != 1 then @@ -162,7 +162,7 @@ step7: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -188,7 +188,7 @@ sql insert into d4.t4 values(now+3s, 43) sql insert into d4.t4 values(now+4s, 42) sql insert into d4.t4 values(now+5s, 41) -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(3)[2] print dnode2 openVnodes $data(4)[2] @@ -204,7 +204,7 @@ endi print ========== step9 sql drop dnode 3 -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(4)[2] if $data(1)[2] != 2 then diff --git a/tests/script/tsim/dnode/balance2.sim b/tests/script/tsim/dnode/balance2.sim index 5da9a659f3..f677d3925c 100644 --- a/tests/script/tsim/dnode/balance2.sim +++ b/tests/script/tsim/dnode/balance2.sim @@ -27,7 +27,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -78,7 +78,7 @@ sql insert into d4.t4 values(now+4s, 42) sql insert into d4.t4 values(now+5s, 41) print ========== step2.1 -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(2)[2] print dnode3 openVnodes $data(3)[2] @@ -106,7 +106,7 @@ step3: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -132,7 +132,7 @@ if $data(5)[4] != ready then endi sql balance vgroup -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode3 openVnodes $data(2)[2] print dnode3 openVnodes $data(3)[2] @@ -156,7 +156,7 @@ endi print ========== step4 sql drop dnode 2 -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode3 openVnodes $data(3)[2] print dnode4 openVnodes $data(4)[2] @@ -178,7 +178,7 @@ system sh/exec.sh -n dnode2 -s stop -x SIGINT print ========== step5 sql drop dnode 3 -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode3 openVnodes $data(3)[2] print dnode4 openVnodes $data(4)[2] diff --git a/tests/script/tsim/dnode/balance3.sim b/tests/script/tsim/dnode/balance3.sim index f26c0eaa21..ce328f10bd 100644 --- a/tests/script/tsim/dnode/balance3.sim +++ b/tests/script/tsim/dnode/balance3.sim @@ -31,7 +31,7 @@ step10: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -122,7 +122,7 @@ sql insert into d2.t2 values(now+3s, 23) sql insert into d2.t2 values(now+4s, 22) sql insert into d2.t2 values(now+5s, 21) -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(2)[2] print dnode3 openVnodes $data(3)[2] @@ -142,7 +142,7 @@ endi print ========== step2 sql drop dnode 2 -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(2)[2] print dnode3 openVnodes $data(3)[2] @@ -174,7 +174,7 @@ step3: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -196,7 +196,7 @@ if $data(5)[4] != ready then endi sql balance vgroup -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode3 openVnodes $data(3)[2] print dnode4 openVnodes $data(4)[2] @@ -223,7 +223,7 @@ sql insert into d3.t3 values(now+3s, 33) sql insert into d3.t3 values(now+4s, 32) sql insert into d3.t3 values(now+5s, 31) -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode3 openVnodes $data(3)[2] print dnode4 openVnodes $data(4)[2] @@ -253,7 +253,7 @@ step5: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -279,7 +279,7 @@ if $data(6)[4] != ready then endi sql balance vgroup -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode3 openVnodes $data(3)[2] print dnode4 openVnodes $data(4)[2] @@ -303,7 +303,7 @@ endi print ========== step6 sql drop dnode 3 -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode3 openVnodes $data(3)[2] print dnode4 openVnodes $data(4)[2] diff --git a/tests/script/tsim/dnode/balance_replica1.sim b/tests/script/tsim/dnode/balance_replica1.sim index 998d0654ab..580b53f9f9 100644 --- a/tests/script/tsim/dnode/balance_replica1.sim +++ b/tests/script/tsim/dnode/balance_replica1.sim @@ -22,7 +22,7 @@ step1: print ---> dnode not online! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ---> $data00 $data01 $data02 $data03 $data04 $data05 print ---> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 3 then @@ -78,7 +78,7 @@ step3: print ---> dnode not online! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ---> $data00 $data01 $data02 $data03 $data04 $data05 print ---> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 3 then diff --git a/tests/script/tsim/dnode/balance_replica3.sim b/tests/script/tsim/dnode/balance_replica3.sim index 276621cfcc..afd7603b16 100644 --- a/tests/script/tsim/dnode/balance_replica3.sim +++ b/tests/script/tsim/dnode/balance_replica3.sim @@ -30,7 +30,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -199,7 +199,7 @@ step4: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/dnode/balancex.sim b/tests/script/tsim/dnode/balancex.sim index 124ccbebba..6b16e8b569 100644 --- a/tests/script/tsim/dnode/balancex.sim +++ b/tests/script/tsim/dnode/balancex.sim @@ -28,7 +28,7 @@ sql insert into d2.t2 values(now+3s, 23) sql insert into d2.t2 values(now+4s, 22) sql insert into d2.t2 values(now+5s, 21) -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] if $data(1)[2] != 2 then return -1 @@ -48,7 +48,7 @@ step2: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -66,7 +66,7 @@ if $data(3)[4] != ready then endi sql balance vgroup -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(2)[2] print dnode2 openVnodes $data(3)[2] @@ -89,7 +89,7 @@ sql insert into d3.t3 values(now+3s, 33) sql insert into d3.t3 values(now+4s, 32) sql insert into d3.t3 values(now+5s, 31) -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(2)[2] print dnode2 openVnodes $data(3)[2] @@ -115,7 +115,7 @@ step3: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -137,7 +137,7 @@ if $data(4)[4] != ready then endi sql balance vgroup -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(2)[2] print dnode2 openVnodes $data(3)[2] @@ -157,7 +157,7 @@ endi print ========== step5 sql drop dnode 2 -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(2)[2] print dnode2 openVnodes $data(3)[2] diff --git a/tests/script/tsim/dnode/create_dnode.sim b/tests/script/tsim/dnode/create_dnode.sim index 12c85cc480..b307ad0341 100644 --- a/tests/script/tsim/dnode/create_dnode.sim +++ b/tests/script/tsim/dnode/create_dnode.sim @@ -5,8 +5,8 @@ system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode2 -s start sql connect -print =============== show dnodes -sql show dnodes; +print =============== select * from information_schema.ins_dnodes +sql select * from information_schema.ins_dnodes; print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] if $rows != 1 then return -1 @@ -35,7 +35,7 @@ print =============== create dnodes sql create dnode $hostname port 7200 sleep 2000 -sql show dnodes; +sql select * from information_schema.ins_dnodes; if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/dnode/drop_dnode_has_mnode.sim b/tests/script/tsim/dnode/drop_dnode_has_mnode.sim index 16cd2bb3b0..b1959ad8a6 100644 --- a/tests/script/tsim/dnode/drop_dnode_has_mnode.sim +++ b/tests/script/tsim/dnode/drop_dnode_has_mnode.sim @@ -17,7 +17,7 @@ step1: print ====> dnode not online! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 3 then @@ -37,7 +37,7 @@ print =============== step2 drop dnode 3 sql_error drop dnode 1 sql drop dnode 3 -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then @@ -73,8 +73,8 @@ print =============== step4: drop dnode 2 sql_error drop dnode 1 sql drop dnode 2 -print show dnodes; -sql show dnodes; +print select * from information_schema.ins_dnodes; +sql select * from information_schema.ins_dnodes; print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] if $rows != 1 then diff --git a/tests/script/tsim/dnode/drop_dnode_has_multi_vnode_replica1.sim b/tests/script/tsim/dnode/drop_dnode_has_multi_vnode_replica1.sim index 20eac3836c..a5f7e0ad02 100644 --- a/tests/script/tsim/dnode/drop_dnode_has_multi_vnode_replica1.sim +++ b/tests/script/tsim/dnode/drop_dnode_has_multi_vnode_replica1.sim @@ -19,7 +19,7 @@ step1: print ====> dnode not online! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 3 then @@ -76,7 +76,7 @@ step4: print ====> dnode not online! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 3 then @@ -95,8 +95,8 @@ endi print =============== step3: drop dnode2 sql drop dnode 2 -print show dnodes; -sql show dnodes; +print select * from information_schema.ins_dnodes; +sql select * from information_schema.ins_dnodes; print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] if $rows != 2 then diff --git a/tests/script/tsim/dnode/drop_dnode_has_multi_vnode_replica3.sim b/tests/script/tsim/dnode/drop_dnode_has_multi_vnode_replica3.sim index e1b7c4a3a4..0fa7320ff6 100644 --- a/tests/script/tsim/dnode/drop_dnode_has_multi_vnode_replica3.sim +++ b/tests/script/tsim/dnode/drop_dnode_has_multi_vnode_replica3.sim @@ -25,7 +25,7 @@ step1: print ====> dnode not online! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 5 then @@ -189,7 +189,7 @@ step4: print ====> dnode not online! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 5 then @@ -214,8 +214,8 @@ endi print =============== step5: drop dnode2 sql drop dnode 2 -print show dnodes; -sql show dnodes; +print select * from information_schema.ins_dnodes; +sql select * from information_schema.ins_dnodes; print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] if $rows != 4 then diff --git a/tests/script/tsim/dnode/drop_dnode_has_qnode_snode.sim b/tests/script/tsim/dnode/drop_dnode_has_qnode_snode.sim index 6641ce053c..c50cf0f56e 100644 --- a/tests/script/tsim/dnode/drop_dnode_has_qnode_snode.sim +++ b/tests/script/tsim/dnode/drop_dnode_has_qnode_snode.sim @@ -16,7 +16,7 @@ step1: print ====> dnode not online! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then @@ -46,8 +46,8 @@ endi print =============== step3: drop dnode 2 sql drop dnode 2 -print show dnodes; -sql show dnodes; +print select * from information_schema.ins_dnodes; +sql select * from information_schema.ins_dnodes; print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] if $rows != 1 then diff --git a/tests/script/tsim/dnode/drop_dnode_has_vnode_replica1.sim b/tests/script/tsim/dnode/drop_dnode_has_vnode_replica1.sim index 63639877ee..066e989df2 100644 --- a/tests/script/tsim/dnode/drop_dnode_has_vnode_replica1.sim +++ b/tests/script/tsim/dnode/drop_dnode_has_vnode_replica1.sim @@ -19,7 +19,7 @@ step1: print ====> dnode not online! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 3 then @@ -72,7 +72,7 @@ step4: print ====> dnode not online! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 3 then @@ -102,7 +102,7 @@ step5: print ====> dnode not online! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 3 then @@ -121,8 +121,8 @@ endi print =============== step6: drop dnode2 sql drop dnode 2 -print show dnodes; -sql show dnodes; +print select * from information_schema.ins_dnodes; +sql select * from information_schema.ins_dnodes; print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] if $rows != 2 then diff --git a/tests/script/tsim/dnode/drop_dnode_has_vnode_replica3.sim b/tests/script/tsim/dnode/drop_dnode_has_vnode_replica3.sim index 4855f4dccf..2510692846 100644 --- a/tests/script/tsim/dnode/drop_dnode_has_vnode_replica3.sim +++ b/tests/script/tsim/dnode/drop_dnode_has_vnode_replica3.sim @@ -25,7 +25,7 @@ step1: print ====> dnode not online! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 5 then @@ -126,7 +126,7 @@ step4: print ====> dnode not online! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 5 then @@ -151,8 +151,8 @@ endi print =============== step5: drop dnode2 sql drop dnode 2 -print show dnodes; -sql show dnodes; +print select * from information_schema.ins_dnodes; +sql select * from information_schema.ins_dnodes; print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/dnode/offline_reason.sim b/tests/script/tsim/dnode/offline_reason.sim index 3608dd4a3a..6b1686dbb4 100644 --- a/tests/script/tsim/dnode/offline_reason.sim +++ b/tests/script/tsim/dnode/offline_reason.sim @@ -7,7 +7,7 @@ system sh/exec.sh -n dnode1 -s start sql connect sql create dnode $hostname port 7200 -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 off: $data(1)[6] print dnode2 off: $data(2)[6] @@ -26,7 +26,7 @@ step2: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then @@ -49,7 +49,7 @@ step3: if $x == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 off: $data(1)[6] print dnode2 off: $data(2)[6] if $data(2)[6] != @status msg timeout@ then @@ -58,7 +58,7 @@ endi print ========== step4 sql drop dnode 2 -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 1 then return -1 endi @@ -76,7 +76,7 @@ step5: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 off: $data(1)[6] print dnode2 off: $data(3)[6] if $data(3)[6] != @dnodeId not match@ then @@ -97,7 +97,7 @@ step6: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 off: $data(1)[6] print dnode2 off: $data(3)[6] print dnode3 off: $data(4)[6] @@ -119,7 +119,7 @@ step7: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 off: $data(1)[6] print dnode3 off: $data(3)[6] print dnode4 off: $data(4)[6] @@ -142,7 +142,7 @@ step8: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 off: $data(1)[6] print dnode3 off: $data(3)[6] print dnode4 off: $data(4)[6] diff --git a/tests/script/tsim/dnode/redistribute_vgroup_replica1.sim b/tests/script/tsim/dnode/redistribute_vgroup_replica1.sim index d3b5a02a23..09da0ee6aa 100644 --- a/tests/script/tsim/dnode/redistribute_vgroup_replica1.sim +++ b/tests/script/tsim/dnode/redistribute_vgroup_replica1.sim @@ -26,7 +26,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -54,7 +54,7 @@ step2: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/dnode/redistribute_vgroup_replica3_v1_follower.sim b/tests/script/tsim/dnode/redistribute_vgroup_replica3_v1_follower.sim index 00c6e8a98d..a576969697 100644 --- a/tests/script/tsim/dnode/redistribute_vgroup_replica3_v1_follower.sim +++ b/tests/script/tsim/dnode/redistribute_vgroup_replica3_v1_follower.sim @@ -32,7 +32,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -87,7 +87,7 @@ step2: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/dnode/redistribute_vgroup_replica3_v1_leader.sim b/tests/script/tsim/dnode/redistribute_vgroup_replica3_v1_leader.sim index 947482b3d4..739e3f2984 100644 --- a/tests/script/tsim/dnode/redistribute_vgroup_replica3_v1_leader.sim +++ b/tests/script/tsim/dnode/redistribute_vgroup_replica3_v1_leader.sim @@ -32,7 +32,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -66,7 +66,7 @@ step2: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/dnode/redistribute_vgroup_replica3_v2.sim b/tests/script/tsim/dnode/redistribute_vgroup_replica3_v2.sim index 6614009497..652f0c14b4 100644 --- a/tests/script/tsim/dnode/redistribute_vgroup_replica3_v2.sim +++ b/tests/script/tsim/dnode/redistribute_vgroup_replica3_v2.sim @@ -34,7 +34,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -69,7 +69,7 @@ step2: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/dnode/redistribute_vgroup_replica3_v3.sim b/tests/script/tsim/dnode/redistribute_vgroup_replica3_v3.sim index c78d90e352..30e644f170 100644 --- a/tests/script/tsim/dnode/redistribute_vgroup_replica3_v3.sim +++ b/tests/script/tsim/dnode/redistribute_vgroup_replica3_v3.sim @@ -40,7 +40,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -77,7 +77,7 @@ step2: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/dnode/use_dropped_dnode.sim b/tests/script/tsim/dnode/use_dropped_dnode.sim index 9c546e295f..21bf02f61a 100644 --- a/tests/script/tsim/dnode/use_dropped_dnode.sim +++ b/tests/script/tsim/dnode/use_dropped_dnode.sim @@ -19,7 +19,7 @@ step1: print ====> dnode not online! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -48,7 +48,7 @@ step2: print ====> dnode not online! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -83,7 +83,7 @@ step3: print ====> dnode not online! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/dnode/vnode_clean.sim b/tests/script/tsim/dnode/vnode_clean.sim index 9fcf9451c1..112e5f28a4 100644 --- a/tests/script/tsim/dnode/vnode_clean.sim +++ b/tests/script/tsim/dnode/vnode_clean.sim @@ -16,7 +16,7 @@ sql insert into d1.t1 values(now+3s, 13) sql insert into d1.t1 values(now+4s, 12) sql insert into d1.t1 values(now+5s, 11) -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] if $data(1)[2] != 1 then return -1 @@ -34,7 +34,7 @@ step2: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then @@ -48,7 +48,7 @@ if $data(2)[4] != ready then endi sql balance vgroup -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(2)[2] if $data(1)[2] != 0 then @@ -68,7 +68,7 @@ sql insert into d2.t2 values(now+3s, 23) sql insert into d2.t2 values(now+4s, 22) sql insert into d2.t2 values(now+5s, 21) -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(2)[2] if $data(1)[2] != 0 then @@ -80,7 +80,7 @@ endi print ========== step4 sql drop dnode 2 -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(2)[2] if $data(1)[2] != 2 then @@ -104,7 +104,7 @@ step5: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then @@ -118,7 +118,7 @@ if $data(3)[4] != ready then endi sql balance vgroup -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(3)[2] if $data(1)[2] != 1 then @@ -137,7 +137,7 @@ sql insert into d3.t3 values(now+3s, 33) sql insert into d3.t3 values(now+4s, 32) sql insert into d3.t3 values(now+5s, 31) -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(3)[2] if $data(1)[2] != 1 then @@ -159,7 +159,7 @@ step7: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -177,7 +177,7 @@ if $data(4)[4] != ready then endi sql balance vgroup -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(3)[2] print dnode2 openVnodes $data(4)[2] @@ -200,7 +200,7 @@ sql insert into d4.t4 values(now+3s, 43) sql insert into d4.t4 values(now+4s, 42) sql insert into d4.t4 values(now+5s, 41) -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(3)[2] print dnode2 openVnodes $data(4)[2] @@ -216,7 +216,7 @@ endi print ========== step9 sql drop dnode 3 -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(3)[2] print dnode2 openVnodes $data(4)[2] diff --git a/tests/script/tsim/mnode/basic1.sim b/tests/script/tsim/mnode/basic1.sim index d93d4ca53f..05515dac59 100644 --- a/tests/script/tsim/mnode/basic1.sim +++ b/tests/script/tsim/mnode/basic1.sim @@ -5,7 +5,7 @@ system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode2 -s start sql connect -print =============== show dnodes +print =============== select * from information_schema.ins_dnodes sql show mnodes; if $rows != 1 then return -1 @@ -28,7 +28,7 @@ step1: if $x == 20 then return -1 endi -sql show dnodes -x step1 +sql select * from information_schema.ins_dnodes -x step1 if $data(1)[4] != ready then goto step1 endi diff --git a/tests/script/tsim/mnode/basic2.sim b/tests/script/tsim/mnode/basic2.sim index e4188c6815..217d823d61 100644 --- a/tests/script/tsim/mnode/basic2.sim +++ b/tests/script/tsim/mnode/basic2.sim @@ -5,7 +5,7 @@ system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode2 -s start sql connect -print =============== show dnodes +print =============== select * from information_schema.ins_dnodes sql show mnodes; if $rows != 1 then return -1 @@ -28,7 +28,7 @@ step1: if $x == 20 then return -1 endi -sql show dnodes -x step1 +sql select * from information_schema.ins_dnodes -x step1 if $data(1)[4] != ready then goto step1 endi @@ -68,7 +68,7 @@ endi print =============== create user sql create user user1 PASS 'user1' -sql show users +sql select * from information_schema.ins_users if $rows != 2 then return -1 endi @@ -95,7 +95,7 @@ endi print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 -sql show users +sql select * from information_schema.ins_users if $rows != 2 then return -1 endi @@ -112,7 +112,7 @@ step3: if $x == 20 then return -1 endi -sql show dnodes -x step3 +sql select * from information_schema.ins_dnodes -x step3 print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $data(1)[4] != ready then diff --git a/tests/script/tsim/mnode/basic3.sim b/tests/script/tsim/mnode/basic3.sim index 695e23f3ac..d1b7587db1 100644 --- a/tests/script/tsim/mnode/basic3.sim +++ b/tests/script/tsim/mnode/basic3.sim @@ -25,7 +25,7 @@ step1: if $x == 10 then return -1 endi -sql show dnodes -x step1 +sql select * from information_schema.ins_dnodes -x step1 if $data(1)[4] != ready then goto step1 endi @@ -69,7 +69,7 @@ endi print =============== step3: create user sql create user user1 PASS 'user1' -sql show users +sql select * from information_schema.ins_users if $rows != 2 then return -1 endi @@ -92,7 +92,7 @@ print $data(1)[0] $data(1)[1] $data(1)[2] print $data(2)[0] $data(2)[1] $data(2)[2] print $data(3)[0] $data(3)[1] $data(3)[2] -sql show users +sql select * from information_schema.ins_users if $rows != 2 then return -1 endi @@ -104,7 +104,7 @@ step41: if $x == 10 then return -1 endi -sql show dnodes -x step41 +sql select * from information_schema.ins_dnodes -x step41 print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -131,7 +131,7 @@ print $data(1)[0] $data(1)[1] $data(1)[2] print $data(2)[0] $data(2)[1] $data(2)[2] print $data(3)[0] $data(3)[1] $data(3)[2] -sql show users +sql select * from information_schema.ins_users if $rows != 2 then return -1 endi @@ -143,7 +143,7 @@ step51: if $x == 10 then return -1 endi -sql show dnodes -x step51 +sql select * from information_schema.ins_dnodes -x step51 print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -170,7 +170,7 @@ print $data(1)[0] $data(1)[1] $data(1)[2] print $data(2)[0] $data(2)[1] $data(2)[2] print $data(3)[0] $data(3)[1] $data(3)[2] -sql show users +sql select * from information_schema.ins_users if $rows != 2 then return -1 endi @@ -182,7 +182,7 @@ step61: if $x == 10 then return -1 endi -sql show dnodes -x step61 +sql select * from information_schema.ins_dnodes -x step61 print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/mnode/basic4.sim b/tests/script/tsim/mnode/basic4.sim index 0ffcdd8c00..8ad054746a 100644 --- a/tests/script/tsim/mnode/basic4.sim +++ b/tests/script/tsim/mnode/basic4.sim @@ -17,7 +17,7 @@ step1: if $x == 5 then return -1 endi -sql show dnodes -x step1 +sql select * from information_schema.ins_dnodes -x step1 if $data(1)[4] != ready then goto step1 endi @@ -38,7 +38,7 @@ step2: if $x == 5 then return -1 endi -sql show dnodes -x step2 +sql select * from information_schema.ins_dnodes -x step2 if $data(1)[4] != ready then goto step2 endi diff --git a/tests/script/tsim/mnode/basic5.sim b/tests/script/tsim/mnode/basic5.sim index f23be019f7..73faf5abe2 100644 --- a/tests/script/tsim/mnode/basic5.sim +++ b/tests/script/tsim/mnode/basic5.sim @@ -22,7 +22,7 @@ step1: if $x == 5 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $data(1)[4] != ready then goto step1 endi @@ -46,7 +46,7 @@ step3: if $x == 5 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes if $data(2)[4] != ready then goto step3 endi @@ -104,7 +104,7 @@ step5: if $x == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -132,7 +132,7 @@ step51: if $x == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -186,7 +186,7 @@ step71: if $x == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -246,7 +246,7 @@ step91: if $x == 10 then return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -330,7 +330,7 @@ stepb: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/parser/fourArithmetic-basic.sim b/tests/script/tsim/parser/fourArithmetic-basic.sim index df1afe6554..55ffde14d9 100644 --- a/tests/script/tsim/parser/fourArithmetic-basic.sim +++ b/tests/script/tsim/parser/fourArithmetic-basic.sim @@ -105,7 +105,7 @@ if $loop_test == 0 then print ====> dnode not ready! return -1 endi - sql show dnodes + sql select * from information_schema.ins_dnodes print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 if $data00 != 1 then return -1 diff --git a/tests/script/tsim/qnode/basic1.sim b/tests/script/tsim/qnode/basic1.sim index 81d95c704d..27a3aa9e2a 100644 --- a/tests/script/tsim/qnode/basic1.sim +++ b/tests/script/tsim/qnode/basic1.sim @@ -5,7 +5,7 @@ system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode2 -s start sql connect -print =============== show dnodes +print =============== select * from information_schema.ins_dnodes sql create dnode $hostname port 7200 $x = 0 @@ -16,7 +16,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -31,8 +31,8 @@ if $data(2)[4] != ready then goto step1 endi -print =============== show dnodes -sql show dnodes; +print =============== select * from information_schema.ins_dnodes +sql select * from information_schema.ins_dnodes; if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/query/charScalarFunction.sim b/tests/script/tsim/query/charScalarFunction.sim index 0adb296079..320f086fa5 100644 --- a/tests/script/tsim/query/charScalarFunction.sim +++ b/tests/script/tsim/query/charScalarFunction.sim @@ -693,7 +693,7 @@ if $loop_test == 0 then print ====> dnode not ready! return -1 endi - sql show dnodes + sql select * from information_schema.ins_dnodes print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 if $data00 != 1 then return -1 diff --git a/tests/script/tsim/query/complex_group.sim b/tests/script/tsim/query/complex_group.sim index 98a20f3b22..3dad8059cd 100644 --- a/tests/script/tsim/query/complex_group.sim +++ b/tests/script/tsim/query/complex_group.sim @@ -267,7 +267,7 @@ check_dnode_ready_0: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 if $data00 != 1 then return -1 diff --git a/tests/script/tsim/query/complex_having.sim b/tests/script/tsim/query/complex_having.sim index 3b6b33bf44..9e28c3803e 100644 --- a/tests/script/tsim/query/complex_having.sim +++ b/tests/script/tsim/query/complex_having.sim @@ -214,7 +214,7 @@ check_dnode_ready_0: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 if $data00 != 1 then return -1 diff --git a/tests/script/tsim/query/complex_limit.sim b/tests/script/tsim/query/complex_limit.sim index edcf5734aa..2a90e7ff1d 100644 --- a/tests/script/tsim/query/complex_limit.sim +++ b/tests/script/tsim/query/complex_limit.sim @@ -290,7 +290,7 @@ check_dnode_ready_0: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 if $data00 != 1 then return -1 diff --git a/tests/script/tsim/query/complex_select.sim b/tests/script/tsim/query/complex_select.sim index ed6c40f616..f4c9877bfd 100644 --- a/tests/script/tsim/query/complex_select.sim +++ b/tests/script/tsim/query/complex_select.sim @@ -540,7 +540,7 @@ check_dnode_ready_0: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 if $data00 != 1 then return -1 diff --git a/tests/script/tsim/query/complex_where.sim b/tests/script/tsim/query/complex_where.sim index c061bf9277..bda1c036f0 100644 --- a/tests/script/tsim/query/complex_where.sim +++ b/tests/script/tsim/query/complex_where.sim @@ -373,7 +373,7 @@ check_dnode_ready_0: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 if $data00 != 1 then return -1 diff --git a/tests/script/tsim/query/interval-offset.sim b/tests/script/tsim/query/interval-offset.sim index b7d367ad90..f4d95df083 100644 --- a/tests/script/tsim/query/interval-offset.sim +++ b/tests/script/tsim/query/interval-offset.sim @@ -235,7 +235,7 @@ check_dnode_ready: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 if $data00 != 1 then return -1 diff --git a/tests/script/tsim/query/scalarFunction.sim b/tests/script/tsim/query/scalarFunction.sim index 0b1bee19c8..103e66e54e 100644 --- a/tests/script/tsim/query/scalarFunction.sim +++ b/tests/script/tsim/query/scalarFunction.sim @@ -453,7 +453,7 @@ if $loop_test == 0 then print ====> dnode not ready! return -1 endi - sql show dnodes + sql select * from information_schema.ins_dnodes print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 if $data00 != 1 then return -1 diff --git a/tests/script/tsim/query/session.sim b/tests/script/tsim/query/session.sim index be814c2bd2..158448d765 100644 --- a/tests/script/tsim/query/session.sim +++ b/tests/script/tsim/query/session.sim @@ -308,7 +308,7 @@ if $loop_test == 0 then print ====> dnode not ready! return -1 endi - sql show dnodes + sql select * from information_schema.ins_dnodes print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 if $data00 != 1 then return -1 diff --git a/tests/script/tsim/query/stddev.sim b/tests/script/tsim/query/stddev.sim index cc424f6ad4..d61c7273e1 100644 --- a/tests/script/tsim/query/stddev.sim +++ b/tests/script/tsim/query/stddev.sim @@ -238,7 +238,7 @@ check_dnode_ready_0: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 if $data00 != 1 then return -1 diff --git a/tests/script/tsim/query/time_process.sim b/tests/script/tsim/query/time_process.sim index 8d5c12a2ba..b3c0e9561f 100644 --- a/tests/script/tsim/query/time_process.sim +++ b/tests/script/tsim/query/time_process.sim @@ -92,7 +92,7 @@ check_dnode_ready_0: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 if $data00 != 1 then return -1 diff --git a/tests/script/tsim/show/basic.sim b/tests/script/tsim/show/basic.sim index bfe674def7..af9b74665a 100644 --- a/tests/script/tsim/show/basic.sim +++ b/tests/script/tsim/show/basic.sim @@ -13,7 +13,7 @@ sql connect # print ====> dnode not ready! # return -1 # endi -#sql show dnodes +#sql select * from information_schema.ins_dnodes #print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 #if $data00 != 1 then # return -1 @@ -39,7 +39,7 @@ sql create table t0 using stb tags (0) sql create table tba (ts timestamp, c1 binary(10), c2 nchar(10)); print =============== run show xxxx -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 2 then return -1 endi @@ -67,7 +67,7 @@ if $rows != 2 then return -1 endi #sql show user_table_distributed -sql show users +sql select * from information_schema.ins_users if $rows != 1 then return -1 endi @@ -126,7 +126,7 @@ check_dnode_ready: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05 if $data00 != 1 then return -1 @@ -137,7 +137,7 @@ endi print ==== again run show / select of above print =============== run show xxxx -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 2 then return -1 endi @@ -165,7 +165,7 @@ if $rows != 2 then return -1 endi #sql show user_table_distributed -sql show users +sql select * from information_schema.ins_users if $rows != 1 then return -1 endi diff --git a/tests/script/tsim/sma/drop_sma.sim b/tests/script/tsim/sma/drop_sma.sim index 2b4c292284..0d2712f8db 100644 --- a/tests/script/tsim/sma/drop_sma.sim +++ b/tests/script/tsim/sma/drop_sma.sim @@ -24,7 +24,7 @@ step2: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 3 then diff --git a/tests/script/tsim/snode/basic1.sim b/tests/script/tsim/snode/basic1.sim index 93bf04ef41..d20f312e34 100644 --- a/tests/script/tsim/snode/basic1.sim +++ b/tests/script/tsim/snode/basic1.sim @@ -5,7 +5,7 @@ system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode2 -s start sql connect -print =============== show dnodes +print =============== select * from information_schema.ins_dnodes sql create dnode $hostname port 7200 $x = 0 @@ -16,7 +16,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -31,8 +31,8 @@ if $data(2)[4] != ready then goto step1 endi -print =============== show dnodes -sql show dnodes; +print =============== select * from information_schema.ins_dnodes +sql select * from information_schema.ins_dnodes; if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/stable/dnode3.sim b/tests/script/tsim/stable/dnode3.sim index 656e72f32a..b4b7d2ab9c 100644 --- a/tests/script/tsim/stable/dnode3.sim +++ b/tests/script/tsim/stable/dnode3.sim @@ -18,7 +18,7 @@ createDnode: if $x == 20 then return -1 endi -sql show dnodes; +sql select * from information_schema.ins_dnodes; if $data4_2 == offline then goto createDnode endi diff --git a/tests/script/tsim/stream/distributeInterval0.sim b/tests/script/tsim/stream/distributeInterval0.sim index 1ee72527e9..b6b427343e 100644 --- a/tests/script/tsim/stream/distributeInterval0.sim +++ b/tests/script/tsim/stream/distributeInterval0.sim @@ -19,7 +19,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then diff --git a/tests/script/tsim/stream/distributeIntervalRetrive0.sim b/tests/script/tsim/stream/distributeIntervalRetrive0.sim index 927301c3c8..79edea2a3c 100644 --- a/tests/script/tsim/stream/distributeIntervalRetrive0.sim +++ b/tests/script/tsim/stream/distributeIntervalRetrive0.sim @@ -19,7 +19,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then diff --git a/tests/script/tsim/stream/distributeSession0.sim b/tests/script/tsim/stream/distributeSession0.sim index 190304ff19..d752f5c29c 100644 --- a/tests/script/tsim/stream/distributeSession0.sim +++ b/tests/script/tsim/stream/distributeSession0.sim @@ -19,7 +19,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then diff --git a/tests/script/tsim/stream/drop_stream.sim b/tests/script/tsim/stream/drop_stream.sim index 747f59fe85..b25e002140 100644 --- a/tests/script/tsim/stream/drop_stream.sim +++ b/tests/script/tsim/stream/drop_stream.sim @@ -22,7 +22,7 @@ step2: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then diff --git a/tests/script/tsim/stream/ignoreExpiredData.sim b/tests/script/tsim/stream/ignoreExpiredData.sim index 8cdebe599c..a789416f5b 100644 --- a/tests/script/tsim/stream/ignoreExpiredData.sim +++ b/tests/script/tsim/stream/ignoreExpiredData.sim @@ -19,7 +19,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then diff --git a/tests/script/tsim/sync/3Replica1VgElect.sim b/tests/script/tsim/sync/3Replica1VgElect.sim index 5e077566d3..f069ff40e5 100644 --- a/tests/script/tsim/sync/3Replica1VgElect.sim +++ b/tests/script/tsim/sync/3Replica1VgElect.sim @@ -24,7 +24,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -296,7 +296,7 @@ check_dnode_ready3: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] @@ -338,7 +338,7 @@ check_dnode_ready_2: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] diff --git a/tests/script/tsim/sync/3Replica5VgElect.sim b/tests/script/tsim/sync/3Replica5VgElect.sim index 0996ac94a1..37e4199e23 100644 --- a/tests/script/tsim/sync/3Replica5VgElect.sim +++ b/tests/script/tsim/sync/3Replica5VgElect.sim @@ -24,7 +24,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -464,7 +464,7 @@ check_dnode_ready3: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] @@ -506,7 +506,7 @@ check_dnode_ready_2: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] diff --git a/tests/script/tsim/sync/3Replica5VgElect3mnode.sim b/tests/script/tsim/sync/3Replica5VgElect3mnode.sim index 420df6e418..96a895303d 100644 --- a/tests/script/tsim/sync/3Replica5VgElect3mnode.sim +++ b/tests/script/tsim/sync/3Replica5VgElect3mnode.sim @@ -22,7 +22,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -545,7 +545,7 @@ check_dnode_ready3: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] @@ -626,7 +626,7 @@ check_dnode_ready_2: print ====> restart and dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] diff --git a/tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim b/tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim index bee574960e..72ecd8ed50 100644 --- a/tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim +++ b/tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim @@ -24,7 +24,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -477,7 +477,7 @@ check_dnode_ready3: return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] @@ -504,7 +504,7 @@ if $loop_cnt == 300 then return -1 endi -sql show users +sql select * from information_schema.ins_users print ===> rows: $rows print ===> $rows $data[0][0] $data[0][1] $data[0][2] print ===> $rows $data[1][0] $data[1][1] $data[1][2] @@ -585,7 +585,7 @@ print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] -sql show users +sql select * from information_schema.ins_users print ===> rows: $rows print ===> $rows $data[0][0] $data[0][1] $data[0][2] print ===> $rows $data[1][0] $data[1][1] $data[1][2] diff --git a/tests/script/tsim/sync/electTest.sim b/tests/script/tsim/sync/electTest.sim index 3203c3333a..af0029b539 100644 --- a/tests/script/tsim/sync/electTest.sim +++ b/tests/script/tsim/sync/electTest.sim @@ -24,7 +24,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/sync/mnodeLeaderTransfer.sim b/tests/script/tsim/sync/mnodeLeaderTransfer.sim index 00329ced76..6780fb413c 100644 --- a/tests/script/tsim/sync/mnodeLeaderTransfer.sim +++ b/tests/script/tsim/sync/mnodeLeaderTransfer.sim @@ -7,7 +7,7 @@ system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode3 -s start sql connect -print =============== show dnodes +print =============== select * from information_schema.ins_dnodes sql show mnodes; if $rows != 1 then return -1 @@ -34,7 +34,7 @@ sleep 3000 print =============== create user sql create user user1 PASS 'user1' -sql show users +sql select * from information_schema.ins_users if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/sync/oneReplica1VgElect.sim b/tests/script/tsim/sync/oneReplica1VgElect.sim index fe0def8d92..733a624f7c 100644 --- a/tests/script/tsim/sync/oneReplica1VgElect.sim +++ b/tests/script/tsim/sync/oneReplica1VgElect.sim @@ -24,7 +24,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim b/tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim index ecd69fd9f0..69e970b70f 100644 --- a/tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim +++ b/tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim @@ -24,7 +24,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/sync/oneReplica5VgElect.sim b/tests/script/tsim/sync/oneReplica5VgElect.sim index d4e58f871e..e42ef5fb82 100644 --- a/tests/script/tsim/sync/oneReplica5VgElect.sim +++ b/tests/script/tsim/sync/oneReplica5VgElect.sim @@ -24,7 +24,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -360,7 +360,7 @@ check_dnode_ready_2: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6] diff --git a/tests/script/tsim/sync/threeReplica1VgElect.sim b/tests/script/tsim/sync/threeReplica1VgElect.sim index feea99ff6e..3f30d3d506 100644 --- a/tests/script/tsim/sync/threeReplica1VgElect.sim +++ b/tests/script/tsim/sync/threeReplica1VgElect.sim @@ -24,7 +24,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim b/tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim index 9c6cce0c86..3e747dc61a 100644 --- a/tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim +++ b/tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim @@ -24,7 +24,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/sync/vnode-insert.sim b/tests/script/tsim/sync/vnode-insert.sim index d995f5f098..c05f08bfa6 100644 --- a/tests/script/tsim/sync/vnode-insert.sim +++ b/tests/script/tsim/sync/vnode-insert.sim @@ -24,7 +24,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/sync/vnodeLeaderTransfer.sim b/tests/script/tsim/sync/vnodeLeaderTransfer.sim index 86f81fd550..20cf879325 100644 --- a/tests/script/tsim/sync/vnodeLeaderTransfer.sim +++ b/tests/script/tsim/sync/vnodeLeaderTransfer.sim @@ -24,7 +24,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/sync/vnodeLogAnalyzeTest.sim b/tests/script/tsim/sync/vnodeLogAnalyzeTest.sim index 869cb5fd59..ee5f1129eb 100644 --- a/tests/script/tsim/sync/vnodeLogAnalyzeTest.sim +++ b/tests/script/tsim/sync/vnodeLogAnalyzeTest.sim @@ -24,7 +24,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/sync/vnodesnapshot-rsma-test.sim b/tests/script/tsim/sync/vnodesnapshot-rsma-test.sim index 454ad792d2..6f8c095162 100644 --- a/tests/script/tsim/sync/vnodesnapshot-rsma-test.sim +++ b/tests/script/tsim/sync/vnodesnapshot-rsma-test.sim @@ -24,7 +24,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/sync/vnodesnapshot-test.sim b/tests/script/tsim/sync/vnodesnapshot-test.sim index 402c03f67c..018df43ba2 100644 --- a/tests/script/tsim/sync/vnodesnapshot-test.sim +++ b/tests/script/tsim/sync/vnodesnapshot-test.sim @@ -24,7 +24,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/sync/vnodesnapshot.sim b/tests/script/tsim/sync/vnodesnapshot.sim index 21a3a707e6..8b69ea6ea4 100644 --- a/tests/script/tsim/sync/vnodesnapshot.sim +++ b/tests/script/tsim/sync/vnodesnapshot.sim @@ -24,7 +24,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/trans/create_db.sim b/tests/script/tsim/trans/create_db.sim index bda1fe9f18..8543bec144 100644 --- a/tests/script/tsim/trans/create_db.sim +++ b/tests/script/tsim/trans/create_db.sim @@ -18,7 +18,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then @@ -73,7 +73,7 @@ step2: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then @@ -156,7 +156,7 @@ step3: print ====> dnode not ready! return -1 endi - sql show dnodes + sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then diff --git a/tests/script/tsim/trans/lossdata1.sim b/tests/script/tsim/trans/lossdata1.sim index 44785934e5..82e5923468 100644 --- a/tests/script/tsim/trans/lossdata1.sim +++ b/tests/script/tsim/trans/lossdata1.sim @@ -13,7 +13,7 @@ sql connect print =============== create user1 sql create user user1 PASS 'user1' sql create user user2 PASS 'user2' -sql show users +sql select * from information_schema.ins_users if $rows != 3 then return -1 endi @@ -25,7 +25,7 @@ system cp ../../../../sim/dnode1/data/mnode/data/sdb.data.bak1 ../../../../sim/ system sh/exec.sh -n dnode1 -s start sql connect -sql show users +sql select * from information_schema.ins_users if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/user/basic.sim b/tests/script/tsim/user/basic.sim index 298e0cf6e3..8b91efd5df 100644 --- a/tests/script/tsim/user/basic.sim +++ b/tests/script/tsim/user/basic.sim @@ -4,7 +4,7 @@ system sh/exec.sh -n dnode1 -s start sql connect print =============== step0 -sql show users +sql select * from information_schema.ins_users if $data(root)[1] != 1 then return -1 endi @@ -40,7 +40,7 @@ sql_error REVOKE read,write ON *.* from root; print =============== step1: sysinfo create sql CREATE USER u1 PASS 'taosdata' SYSINFO 0; -sql show users +sql select * from information_schema.ins_users if $rows != 2 then return -1 endi @@ -55,7 +55,7 @@ if $data(u1)[3] != 0 then endi sql CREATE USER u2 PASS 'taosdata' SYSINFO 1; -sql show users +sql select * from information_schema.ins_users if $rows != 3 then return -1 endi @@ -71,7 +71,7 @@ endi print =============== step2: sysinfo alter sql ALTER USER u1 SYSINFO 1 -sql show users +sql select * from information_schema.ins_users if $data(u1)[1] != 0 then return -1 endi @@ -83,7 +83,7 @@ if $data(u1)[3] != 1 then endi sql ALTER USER u1 SYSINFO 0 -sql show users +sql select * from information_schema.ins_users if $data(u1)[1] != 0 then return -1 endi @@ -98,14 +98,14 @@ sql ALTER USER u1 SYSINFO 0 sql ALTER USER u1 SYSINFO 0 sql drop user u1 -sql show users +sql select * from information_schema.ins_users if $rows != 2 then return -1 endi print =============== step3: enable alter sql ALTER USER u2 enable 0 -sql show users +sql select * from information_schema.ins_users if $rows != 2 then return -1 endi @@ -120,7 +120,7 @@ if $data(u2)[3] != 1 then endi sql ALTER USER u2 enable 1 -sql show users +sql select * from information_schema.ins_users if $data(u2)[1] != 0 then return -1 endi @@ -139,7 +139,7 @@ system sh/exec.sh -n dnode1 -s stop system sh/exec.sh -n dnode1 -s start print =============== step4: enable privilege -sql show users +sql select * from information_schema.ins_users if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/user/password.sim b/tests/script/tsim/user/password.sim index d26b9dbc2e..19eb3a4423 100644 --- a/tests/script/tsim/user/password.sim +++ b/tests/script/tsim/user/password.sim @@ -10,7 +10,7 @@ sql create user u_write pass 'taosdata1' sql alter user u_read pass 'taosdata' sql alter user u_write pass 'taosdata' -sql show users +sql select * from information_schema.ins_users if $rows != 3 then return -1 endi @@ -26,7 +26,7 @@ sql_error alter user u_write pass 'taosdata1' sql_error create user read1 pass 'taosdata1' sql_error create user write1 pass 'taosdata1' -sql show users +sql select * from information_schema.ins_users if $rows != 3 then return -1 endi @@ -41,7 +41,7 @@ sql_error create user write2 pass 'taosdata1' sql alter user u_write pass 'taosdata' sql_error alter user u_read pass 'taosdata' -sql show users +sql select * from information_schema.ins_users if $rows != 3 then return -1 endi @@ -56,7 +56,7 @@ sql_error create userabcd012345678901234567891234567890abcd012345678901234567891 sql_error create user abcd0123456789012345678901234567890111 PASS '123' sql create user abc01234567890123456789 PASS '123' -sql show users +sql select * from information_schema.ins_users if $rows != 5 then return -1 endi diff --git a/tests/script/tsim/user/privilege_db.sim b/tests/script/tsim/user/privilege_db.sim index f5d25266dc..83933e0e47 100644 --- a/tests/script/tsim/user/privilege_db.sim +++ b/tests/script/tsim/user/privilege_db.sim @@ -15,7 +15,7 @@ endi print =============== create users sql create user user1 PASS 'user1' sql create user user2 PASS 'user2' -sql show users +sql select * from information_schema.ins_users if $rows != 3 then return -1 endi @@ -71,7 +71,7 @@ sql REVOKE read,write ON *.* from user1; print =============== create users sql create user u1 PASS 'taosdata' -sql show users +sql select * from information_schema.ins_users if $rows != 4 then return -1 endi diff --git a/tests/script/tsim/user/privilege_sysinfo.sim b/tests/script/tsim/user/privilege_sysinfo.sim index 10c31dc288..f98eae13c3 100644 --- a/tests/script/tsim/user/privilege_sysinfo.sim +++ b/tests/script/tsim/user/privilege_sysinfo.sim @@ -49,9 +49,9 @@ sql_error show db.stables sql_error show db.tables print =============== check show -sql_error show users +sql_error select * from information_schema.ins_users sql_error show cluster -sql_error show dnodes +sql_error select * from information_schema.ins_dnodes sql_error show mnodes sql_error show snodes sql_error show qnodes diff --git a/tests/script/tsim/valgrind/basic1.sim b/tests/script/tsim/valgrind/basic1.sim index 2d70284c8b..1934584c0c 100644 --- a/tests/script/tsim/valgrind/basic1.sim +++ b/tests/script/tsim/valgrind/basic1.sim @@ -3,7 +3,7 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start -v sql connect -print =============== step1: create drop show dnodes +print =============== step1: create drop select * from information_schema.ins_dnodes $x = 0 step1: $x = $x + 1 @@ -12,7 +12,7 @@ step1: print ---> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ---> $data00 $data01 $data02 $data03 $data04 $data05 if $rows != 1 then return -1 diff --git a/tests/script/tsim/valgrind/basic2.sim b/tests/script/tsim/valgrind/basic2.sim index 522070f487..b6fdac84e6 100644 --- a/tests/script/tsim/valgrind/basic2.sim +++ b/tests/script/tsim/valgrind/basic2.sim @@ -3,7 +3,7 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start -v sql connect -print =============== step1: create drop show dnodes +print =============== step1: create drop select * from information_schema.ins_dnodes $x = 0 step1: $x = $x + 1 @@ -12,7 +12,7 @@ step1: print ---> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ---> $data00 $data01 $data02 $data03 $data04 $data05 if $rows != 1 then return -1 diff --git a/tests/script/tsim/valgrind/basic3.sim b/tests/script/tsim/valgrind/basic3.sim index 8ef1ff2a41..fe812da39f 100644 --- a/tests/script/tsim/valgrind/basic3.sim +++ b/tests/script/tsim/valgrind/basic3.sim @@ -4,7 +4,7 @@ system sh/cfg.sh -n dnode1 -c debugflag -v 131 system sh/exec.sh -n dnode1 -s start -v sql connect -print =============== step1: create drop show dnodes +print =============== step1: create drop select * from information_schema.ins_dnodes $x = 0 step1: $x = $x + 1 @@ -13,7 +13,7 @@ step1: print ---> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ---> $data00 $data01 $data02 $data03 $data04 $data05 if $rows != 1 then return -1 diff --git a/tests/script/tsim/valgrind/basic4.sim b/tests/script/tsim/valgrind/basic4.sim index 98c4f8f2a8..6646aaf2ca 100644 --- a/tests/script/tsim/valgrind/basic4.sim +++ b/tests/script/tsim/valgrind/basic4.sim @@ -4,7 +4,7 @@ system sh/cfg.sh -n dnode1 -c debugflag -v 131 system sh/exec.sh -n dnode1 -s start -v sql connect -print =============== step1: create drop show dnodes +print =============== step1: create drop select * from information_schema.ins_dnodes $x = 0 step1: $x = $x + 1 @@ -13,7 +13,7 @@ step1: print ---> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ---> $data00 $data01 $data02 $data03 $data04 $data05 if $rows != 1 then return -1 diff --git a/tests/script/tsim/valgrind/checkError1.sim b/tests/script/tsim/valgrind/checkError1.sim index 529b2d325f..d5fdaf1430 100644 --- a/tests/script/tsim/valgrind/checkError1.sim +++ b/tests/script/tsim/valgrind/checkError1.sim @@ -10,7 +10,7 @@ sql connect print =============== step1: create alter drop show user sql create user u1 pass 'taosdata' -sql show users +sql select * from information_schema.ins_users sql alter user u1 sysinfo 1 sql alter user u1 enable 1 sql alter user u1 pass 'taosdata' @@ -23,7 +23,7 @@ sql create dnode $hostname port 7300 sql drop dnode 3 sql alter dnode 1 'debugflag 131' -print =============== step3: show dnodes +print =============== step3: select * from information_schema.ins_dnodes $x = 0 step3: $x = $x + 1 @@ -32,7 +32,7 @@ step3: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then @@ -53,7 +53,7 @@ sql create table t0 using stb tags (0) sql create table tba (ts timestamp, c1 binary(10), c2 nchar(10)); print =============== run show xxxx -sql show dnodes +sql select * from information_schema.ins_dnodes if $rows != 2 then return -1 endi @@ -78,7 +78,7 @@ if $rows != 2 then return -1 endi -sql show users +sql select * from information_schema.ins_users if $rows != 1 then return -1 endi diff --git a/tests/script/tsim/valgrind/checkError2.sim b/tests/script/tsim/valgrind/checkError2.sim index d9e96d14dc..7a3b765e39 100644 --- a/tests/script/tsim/valgrind/checkError2.sim +++ b/tests/script/tsim/valgrind/checkError2.sim @@ -4,7 +4,7 @@ system sh/cfg.sh -n dnode1 -c debugflag -v 131 system sh/exec.sh -n dnode1 -s start -v sql connect -print =============== step1: create drop show dnodes +print =============== step1: create drop select * from information_schema.ins_dnodes $x = 0 step1: $x = $x + 1 @@ -13,7 +13,7 @@ step1: print ---> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ---> $data00 $data01 $data02 $data03 $data04 $data05 if $rows != 1 then return -1 diff --git a/tests/script/tsim/valgrind/checkError3.sim b/tests/script/tsim/valgrind/checkError3.sim index 66d41ca6ea..6fa7e39335 100644 --- a/tests/script/tsim/valgrind/checkError3.sim +++ b/tests/script/tsim/valgrind/checkError3.sim @@ -4,7 +4,7 @@ system sh/cfg.sh -n dnode1 -c debugflag -v 131 system sh/exec.sh -n dnode1 -s start sql connect -print =============== step1: create drop show dnodes +print =============== step1: create drop select * from information_schema.ins_dnodes $x = 0 step1: $x = $x + 1 @@ -13,7 +13,7 @@ step1: print ---> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ---> $data00 $data01 $data02 $data03 $data04 $data05 if $rows != 1 then return -1 diff --git a/tests/script/tsim/valgrind/checkError4.sim b/tests/script/tsim/valgrind/checkError4.sim index 37472d487b..49da99dd37 100644 --- a/tests/script/tsim/valgrind/checkError4.sim +++ b/tests/script/tsim/valgrind/checkError4.sim @@ -4,7 +4,7 @@ system sh/cfg.sh -n dnode1 -c debugflag -v 131 system sh/exec.sh -n dnode1 -s start -v sql connect -print =============== step1: create drop show dnodes +print =============== step1: create drop select * from information_schema.ins_dnodes $x = 0 step1: $x = $x + 1 @@ -13,7 +13,7 @@ step1: print ---> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ---> $data00 $data01 $data02 $data03 $data04 $data05 if $rows != 1 then return -1 diff --git a/tests/script/tsim/valgrind/checkError5.sim b/tests/script/tsim/valgrind/checkError5.sim index bf3f9a1b0b..ef37951e77 100644 --- a/tests/script/tsim/valgrind/checkError5.sim +++ b/tests/script/tsim/valgrind/checkError5.sim @@ -4,7 +4,7 @@ system sh/cfg.sh -n dnode1 -c debugflag -v 131 system sh/exec.sh -n dnode1 -s start -v sql connect -print =============== step1: create drop show dnodes +print =============== step1: create drop select * from information_schema.ins_dnodes $x = 0 step1: $x = $x + 1 @@ -13,7 +13,7 @@ step1: print ---> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ---> $data00 $data01 $data02 $data03 $data04 $data05 if $rows != 1 then return -1 diff --git a/tests/script/tsim/valgrind/checkError6.sim b/tests/script/tsim/valgrind/checkError6.sim index cd8b94e1d0..00de00f71d 100644 --- a/tests/script/tsim/valgrind/checkError6.sim +++ b/tests/script/tsim/valgrind/checkError6.sim @@ -4,7 +4,7 @@ system sh/cfg.sh -n dnode1 -c debugflag -v 131 system sh/exec.sh -n dnode1 -s start -v sql connect -print =============== step1: create drop show dnodes +print =============== step1: create drop select * from information_schema.ins_dnodes $x = 0 step1: $x = $x + 1 @@ -13,7 +13,7 @@ step1: print ---> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ---> $data00 $data01 $data02 $data03 $data04 $data05 if $rows != 1 then return -1 diff --git a/tests/script/tsim/vnode/replica3_basic.sim b/tests/script/tsim/vnode/replica3_basic.sim index f7dd5dd136..c0e9d0cc6d 100644 --- a/tests/script/tsim/vnode/replica3_basic.sim +++ b/tests/script/tsim/vnode/replica3_basic.sim @@ -20,7 +20,7 @@ step01: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/vnode/replica3_import.sim b/tests/script/tsim/vnode/replica3_import.sim index d1e73b9f27..99608c72e2 100644 --- a/tests/script/tsim/vnode/replica3_import.sim +++ b/tests/script/tsim/vnode/replica3_import.sim @@ -31,7 +31,7 @@ stepa: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/vnode/replica3_many.sim b/tests/script/tsim/vnode/replica3_many.sim index 4fd3e39fdf..00bce3017a 100644 --- a/tests/script/tsim/vnode/replica3_many.sim +++ b/tests/script/tsim/vnode/replica3_many.sim @@ -23,7 +23,7 @@ step0: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/vnode/replica3_repeat.sim b/tests/script/tsim/vnode/replica3_repeat.sim index 7419139277..83b0ccedb7 100644 --- a/tests/script/tsim/vnode/replica3_repeat.sim +++ b/tests/script/tsim/vnode/replica3_repeat.sim @@ -23,7 +23,7 @@ step0: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/vnode/replica3_vgroup.sim b/tests/script/tsim/vnode/replica3_vgroup.sim index 746a9d67ae..6643966344 100644 --- a/tests/script/tsim/vnode/replica3_vgroup.sim +++ b/tests/script/tsim/vnode/replica3_vgroup.sim @@ -23,7 +23,7 @@ step0: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/vnode/stable_balance_replica1.sim b/tests/script/tsim/vnode/stable_balance_replica1.sim index dfc8de5160..f124979397 100644 --- a/tests/script/tsim/vnode/stable_balance_replica1.sim +++ b/tests/script/tsim/vnode/stable_balance_replica1.sim @@ -50,7 +50,7 @@ endw sleep 100 print =============== step2 -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] if $data(1)[2] != 4 then return -1 @@ -68,7 +68,7 @@ step3: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then @@ -82,7 +82,7 @@ if $data(2)[4] != ready then endi sql balance vgroup -sql show dnodes +sql select * from information_schema.ins_dnodes print dnode1 openVnodes $data(1)[2] print dnode2 openVnodes $data(2)[2] if $data(1)[2] != 2 then diff --git a/tests/script/tsim/vnode/stable_dnode2.sim b/tests/script/tsim/vnode/stable_dnode2.sim index 58d8974abc..2c82f5d856 100644 --- a/tests/script/tsim/vnode/stable_dnode2.sim +++ b/tests/script/tsim/vnode/stable_dnode2.sim @@ -23,7 +23,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then diff --git a/tests/script/tsim/vnode/stable_dnode2_stop.sim b/tests/script/tsim/vnode/stable_dnode2_stop.sim index 55d9f4a02f..2fd1b78e56 100644 --- a/tests/script/tsim/vnode/stable_dnode2_stop.sim +++ b/tests/script/tsim/vnode/stable_dnode2_stop.sim @@ -23,7 +23,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then @@ -45,7 +45,7 @@ $tbNum = 10 $rowNum = 20 $totalNum = 200 -sql show dnodes; +sql select * from information_schema.ins_dnodes; print dnodes ==> $rows if $rows != 2 then return -1 @@ -105,7 +105,7 @@ dnode2: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then diff --git a/tests/script/tsim/vnode/stable_dnode3.sim b/tests/script/tsim/vnode/stable_dnode3.sim index 41abf00bd0..a39dae644c 100644 --- a/tests/script/tsim/vnode/stable_dnode3.sim +++ b/tests/script/tsim/vnode/stable_dnode3.sim @@ -25,7 +25,7 @@ step1: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 3 then diff --git a/tests/script/tsim/vnode/stable_replica3_dnode6.sim b/tests/script/tsim/vnode/stable_replica3_dnode6.sim index e5c677ccbc..6e886b8a18 100644 --- a/tests/script/tsim/vnode/stable_replica3_dnode6.sim +++ b/tests/script/tsim/vnode/stable_replica3_dnode6.sim @@ -35,7 +35,7 @@ step10: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -70,7 +70,7 @@ $tbNum = 10 $rowNum = 20 $totalNum = 200 -sql show dnodes; +sql select * from information_schema.ins_dnodes; print dnodes ==> $rows if $rows != 6 then return -1 diff --git a/tests/script/tsim/vnode/stable_replica3_vnode3.sim b/tests/script/tsim/vnode/stable_replica3_vnode3.sim index ca26b2fd10..ff16941577 100644 --- a/tests/script/tsim/vnode/stable_replica3_vnode3.sim +++ b/tests/script/tsim/vnode/stable_replica3_vnode3.sim @@ -31,7 +31,7 @@ step10: print ====> dnode not ready! return -1 endi -sql show dnodes +sql select * from information_schema.ins_dnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/system-test/0-others/user_control.py b/tests/system-test/0-others/user_control.py index 3be59f0adf..b020dbae2b 100644 --- a/tests/system-test/0-others/user_control.py +++ b/tests/system-test/0-others/user_control.py @@ -196,7 +196,7 @@ class TDTestCase: for i in range(self.users_count): tdSql.execute(f"create user {users[i]} pass '{passwds[i]}' ") - tdSql.query("show users") + tdSql.query("select * from information_schema.ins_users") tdSql.checkRows(self.users_count + 1) def create_user_err(self): @@ -586,7 +586,7 @@ class TDTestCase: # 默认只有 root 用户 tdLog.printNoPrefix("==========step0: init, user list only has root account") - tdSql.query("show users") + tdSql.query("select * from information_schema.ins_users") tdSql.checkData(0, 0, "root") tdSql.checkData(0, 1, "1") @@ -597,7 +597,7 @@ class TDTestCase: # 查看用户 tdLog.printNoPrefix("==========step2: show user test") - tdSql.query("show users") + tdSql.query("select * from information_schema.ins_users") tdSql.checkRows(self.users_count + 1) # 密码登录认证 @@ -619,7 +619,7 @@ class TDTestCase: tdDnodes.stop(1) tdDnodes.start(1) - tdSql.query("show users") + tdSql.query("select * from information_schema.ins_users") tdSql.checkRows(self.users_count + 1) # 普通用户权限 @@ -632,7 +632,7 @@ class TDTestCase: user.error("create use utest1 pass 'utest1pass'") # 可以查看用户 tdLog.printNoPrefix("==========step4.2: normal user can show user") - user.query("show users") + user.query("select * from information_schema.ins_users") assert user.queryRows == self.users_count + 1 # 不可以修改其他用户的密码 tdLog.printNoPrefix("==========step4.3: normal user can not alter other user pass") @@ -705,7 +705,7 @@ class TDTestCase: tdLog.printNoPrefix("==========step7: super user drop normal user") self.test_drop_user() - tdSql.query("show users") + tdSql.query("select * from information_schema.ins_users") tdSql.checkRows(1) tdSql.checkData(0, 0, "root") tdSql.checkData(0, 1, "1") @@ -719,7 +719,7 @@ class TDTestCase: self.login_err(self.__user_list[1], self.__passwd_list[1]) self.login_err(self.__user_list[1], f"new{self.__passwd_list[1]}") - tdSql.query("show users") + tdSql.query("select * from information_schema.ins_users") tdSql.checkRows(1) tdSql.checkData(0, 0, "root") tdSql.checkData(0, 1, "1") diff --git a/tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py b/tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py index 65d525cfd1..8e8a4d957c 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py +++ b/tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py @@ -158,7 +158,7 @@ class TDTestCase: # check status of clusters clusterComCheck.checkMnodeStatus(3) tdSql.execute("create user %s pass '%s' ;"%(username,passwd)) - tdSql.query("show users") + tdSql.query("select * from information_schema.ins_users") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "%s"%username : tdLog.info("create user:%s successfully"%username) From 76e4b18c3d0130f7c6a650a89608de86b9820d65 Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Thu, 11 Aug 2022 21:05:42 +0800 Subject: [PATCH 19/52] doc: change readme doc --- README-CN.md | 23 ++++++++++------------- examples/rust | 1 + tools/taos-tools | 1 + 3 files changed, 12 insertions(+), 13 deletions(-) create mode 160000 examples/rust create mode 160000 tools/taos-tools diff --git a/README-CN.md b/README-CN.md index 8ad0173b05..21c337793c 100644 --- a/README-CN.md +++ b/README-CN.md @@ -14,7 +14,6 @@ [![Build status](https://ci.appveyor.com/api/projects/status/kf3pwh2or5afsgl9/branch/master?svg=true)](https://ci.appveyor.com/project/sangshuduo/tdengine-2n8ge/branch/master) [![Coverage Status](https://coveralls.io/repos/github/taosdata/TDengine/badge.svg?branch=develop)](https://coveralls.io/github/taosdata/TDengine?branch=develop) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4201/badge)](https://bestpractices.coreinfrastructure.org/projects/4201) -[![tdengine](https://snapcraft.io//tdengine/badge.svg)](https://snapcraft.io/tdengine) 简体中文 | [English](README.md) | 很多职位正在热招中,请看[这里](https://www.taosdata.com/cn/careers/) @@ -42,11 +41,13 @@ TDengine 可以广泛应用于物联网、工业互联网、车联网、IT 运 # 文档 -TDengine 采用传统的关系数据库模型,您可以像使用关系型数据库 MySQL 一样来使用它。但由于引入了超级表,一个采集点一张表的概念,建议您在使用前仔细阅读一遍下面的文档,特别是 [数据模型](https://www.taosdata.com/cn/documentation/architecture) 与 [数据建模](https://www.taosdata.com/cn/documentation/model)。除本文档之外,欢迎 [下载产品白皮书](https://www.taosdata.com/downloads/TDengine%20White%20Paper.pdf)。 +TDengine 采用传统的关系数据库模型,您可以像使用关系型数据库 MySQL 一样来使用它。但由于引入了超级表,一个采集点一张表的概念,建议您在使用前仔细阅读一遍下面的文档,特别是 [数据模型](https://www.taosdata.com/cn/documentation/architecture) 与 [数据建模](https://www.taosdata.com/cn/documentation/model)。 # 构建 -TDengine 目前 2.0 版服务器仅能在 Linux 系统上安装和运行,后续会支持 Windows、macOS 等系统。客户端可以在 Windows 或 Linux 上安装和运行。任何 OS 的应用也可以选择 RESTful 接口连接服务器 taosd。CPU 支持 X64/ARM64/MIPS64/Alpha64,后续会支持 ARM32、RISC-V 等 CPU 架构。用户可根据需求选择通过[源码](https://www.taosdata.com/cn/getting-started/#通过源码安装)或者[安装包](https://www.taosdata.com/cn/getting-started/#通过安装包安装)来安装。本快速指南仅适用于通过源码安装。 +TDengine 目前 3.0 版可以在 Linux、 Windows 等平台上安装和运行。任何 OS 的应用也可以选择 taosAdapter 的 RESTful 接口连接服务端 taosd。CPU 支持 X64/ARM64,后续会支持 MIPS64、Alpha64、ARM32、RISC-V 等 CPU 架构。 + +用户可根据需求选择通过[源码](https://www.taosdata.com/cn/getting-started/#通过源码安装)或者[安装包](https://www.taosdata.com/cn/getting-started/#通过安装包安装)来安装。本快速指南仅适用于通过源码安装。 ## 安装工具 @@ -106,6 +107,12 @@ go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.cn,direct ``` +默认情况下,内嵌的 http 服务仍然可以从 TDengine 源码构建。当然您也可以使用以下命令选择构建 taosAdapter 作为 RESTful 接口的服务。 + +``` +cmake .. -DBUILD_HTTP=false +``` + ### 设置 rust 开发环境 TDengine 包含数个使用 Rust 语言开发的组件. 请参考 rust-lang.org 官方文档设置 rust 开发环境。 @@ -300,12 +307,6 @@ TDengine 提供了丰富的应用程序开发接口,其中包括 C/C++、Java - [Rust](https://www.taosdata.com/cn/documentation/connector/rust) -# 运行和添加测试例 - -TDengine 的测试框架和所有测试例全部开源。 - -点击 [这里](https://github.com/taosdata/TDengine/blob/develop/tests/How-To-Run-Test-And-How-To-Add-New-Test-Case.md),了解如何运行测试例和添加新的测试例。 - # 成为社区贡献者 点击 [这里](https://www.taosdata.com/cn/contributor/),了解如何成为 TDengine 的贡献者。 @@ -313,7 +314,3 @@ TDengine 的测试框架和所有测试例全部开源。 # 加入技术交流群 TDengine 官方社群「物联网大数据群」对外开放,欢迎您加入讨论。搜索微信号 "tdengine",加小 T 为好友,即可入群。 - -# [谁在使用 TDengine](https://github.com/taosdata/TDengine/issues/2432) - -欢迎所有 TDengine 用户及贡献者在 [这里](https://github.com/taosdata/TDengine/issues/2432) 分享您在当前工作中开发/使用 TDengine 的故事。 diff --git a/examples/rust b/examples/rust new file mode 160000 index 0000000000..7ed7a97715 --- /dev/null +++ b/examples/rust @@ -0,0 +1 @@ +Subproject commit 7ed7a97715388fa144718764d6bf20f9bfc29a12 diff --git a/tools/taos-tools b/tools/taos-tools new file mode 160000 index 0000000000..57bdfbfbcd --- /dev/null +++ b/tools/taos-tools @@ -0,0 +1 @@ +Subproject commit 57bdfbfbcd8b4f8a3d38ab8eb9fd44d372a65911 From cfca841567e7733aff38afac1c78e46c5423bcdb Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Thu, 11 Aug 2022 21:06:17 +0800 Subject: [PATCH 20/52] fix: comment out tsma debug print --- source/dnode/vnode/src/vnd/vnodeSvr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index 2c0c7f7c88..7a1cc04cdc 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -357,7 +357,7 @@ int32_t vnodeProcessFetchMsg(SVnode *pVnode, SRpcMsg *pMsg, SQueueInfo *pInfo) { // TODO: remove the function void smaHandleRes(void *pVnode, int64_t smaId, const SArray *data) { // TODO - blockDebugShowDataBlocks(data, __func__); + // blockDebugShowDataBlocks(data, __func__); tdProcessTSmaInsert(((SVnode *)pVnode)->pSma, smaId, (const char *)data); } From c4d9fdbf043654bd2e3e449e109c9f701b410847 Mon Sep 17 00:00:00 2001 From: Linhe Huo Date: Thu, 11 Aug 2022 21:08:29 +0800 Subject: [PATCH 21/52] chore(rust): remove rust in insert data docs (#16012) Schemaless module is not avalible since it's not avalible via websocket. --- docs/en/07-develop/03-insert-data/02-influxdb-line.mdx | 3 --- docs/en/07-develop/03-insert-data/03-opentsdb-telnet.mdx | 3 --- docs/en/07-develop/03-insert-data/04-opentsdb-json.mdx | 3 --- docs/zh/07-develop/03-insert-data/02-influxdb-line.mdx | 3 --- docs/zh/07-develop/03-insert-data/03-opentsdb-telnet.mdx | 3 --- docs/zh/07-develop/03-insert-data/04-opentsdb-json.mdx | 3 --- docs/zh/07-develop/03-insert-data/_rust_line.mdx | 1 - docs/zh/07-develop/03-insert-data/_rust_opts_json.mdx | 1 - docs/zh/07-develop/03-insert-data/_rust_opts_telnet.mdx | 1 - 9 files changed, 21 deletions(-) diff --git a/docs/en/07-develop/03-insert-data/02-influxdb-line.mdx b/docs/en/07-develop/03-insert-data/02-influxdb-line.mdx index be46ebf0c9..4110993705 100644 --- a/docs/en/07-develop/03-insert-data/02-influxdb-line.mdx +++ b/docs/en/07-develop/03-insert-data/02-influxdb-line.mdx @@ -55,9 +55,6 @@ For more details please refer to [InfluxDB Line Protocol](https://docs.influxdat - - - diff --git a/docs/en/07-develop/03-insert-data/03-opentsdb-telnet.mdx b/docs/en/07-develop/03-insert-data/03-opentsdb-telnet.mdx index 2061961e42..81e1169489 100644 --- a/docs/en/07-develop/03-insert-data/03-opentsdb-telnet.mdx +++ b/docs/en/07-develop/03-insert-data/03-opentsdb-telnet.mdx @@ -46,9 +46,6 @@ Please refer to [OpenTSDB Telnet API](http://opentsdb.net/docs/build/html/api_te - - - diff --git a/docs/en/07-develop/03-insert-data/04-opentsdb-json.mdx b/docs/en/07-develop/03-insert-data/04-opentsdb-json.mdx index a8f3423787..aad94c3d91 100644 --- a/docs/en/07-develop/03-insert-data/04-opentsdb-json.mdx +++ b/docs/en/07-develop/03-insert-data/04-opentsdb-json.mdx @@ -63,9 +63,6 @@ Please refer to [OpenTSDB HTTP API](http://opentsdb.net/docs/build/html/api_http - - - diff --git a/docs/zh/07-develop/03-insert-data/02-influxdb-line.mdx b/docs/zh/07-develop/03-insert-data/02-influxdb-line.mdx index 54f02c9147..f88284ad67 100644 --- a/docs/zh/07-develop/03-insert-data/02-influxdb-line.mdx +++ b/docs/zh/07-develop/03-insert-data/02-influxdb-line.mdx @@ -54,9 +54,6 @@ meters,location=California.LosAngeles,groupid=2 current=13.4,voltage=223,phase=0 - - - diff --git a/docs/zh/07-develop/03-insert-data/03-opentsdb-telnet.mdx b/docs/zh/07-develop/03-insert-data/03-opentsdb-telnet.mdx index 1cc402c3c0..4f63e17635 100644 --- a/docs/zh/07-develop/03-insert-data/03-opentsdb-telnet.mdx +++ b/docs/zh/07-develop/03-insert-data/03-opentsdb-telnet.mdx @@ -46,9 +46,6 @@ meters.current 1648432611250 11.3 location=California.LosAngeles groupid=3 - - - diff --git a/docs/zh/07-develop/03-insert-data/04-opentsdb-json.mdx b/docs/zh/07-develop/03-insert-data/04-opentsdb-json.mdx index 09cb698fba..b0257b9cb7 100644 --- a/docs/zh/07-develop/03-insert-data/04-opentsdb-json.mdx +++ b/docs/zh/07-develop/03-insert-data/04-opentsdb-json.mdx @@ -63,9 +63,6 @@ OpenTSDB JSON 格式协议采用一个 JSON 字符串表示一行或多行数据 - - - diff --git a/docs/zh/07-develop/03-insert-data/_rust_line.mdx b/docs/zh/07-develop/03-insert-data/_rust_line.mdx index dbb35d76bc..25d322f8a7 100644 --- a/docs/zh/07-develop/03-insert-data/_rust_line.mdx +++ b/docs/zh/07-develop/03-insert-data/_rust_line.mdx @@ -1,3 +1,2 @@ ```rust -{{#include docs/examples/rust/schemalessexample/examples/influxdb_line_example.rs}} ``` diff --git a/docs/zh/07-develop/03-insert-data/_rust_opts_json.mdx b/docs/zh/07-develop/03-insert-data/_rust_opts_json.mdx index cc2055510b..25d322f8a7 100644 --- a/docs/zh/07-develop/03-insert-data/_rust_opts_json.mdx +++ b/docs/zh/07-develop/03-insert-data/_rust_opts_json.mdx @@ -1,3 +1,2 @@ ```rust -{{#include docs/examples/rust/schemalessexample/examples/opentsdb_json_example.rs}} ``` diff --git a/docs/zh/07-develop/03-insert-data/_rust_opts_telnet.mdx b/docs/zh/07-develop/03-insert-data/_rust_opts_telnet.mdx index 109c0c5d01..25d322f8a7 100644 --- a/docs/zh/07-develop/03-insert-data/_rust_opts_telnet.mdx +++ b/docs/zh/07-develop/03-insert-data/_rust_opts_telnet.mdx @@ -1,3 +1,2 @@ ```rust -{{#include docs/examples/rust/schemalessexample/examples/opentsdb_telnet_example.rs}} ``` From d48205bc82697cf0952baa6b0196ddf2e96e57ec Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Thu, 11 Aug 2022 21:20:43 +0800 Subject: [PATCH 22/52] doc: change readme doc --- README-CN.md | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/README-CN.md b/README-CN.md index 21c337793c..35ba07d6c2 100644 --- a/README-CN.md +++ b/README-CN.md @@ -86,15 +86,27 @@ sudo dnf install -y gcc gcc-c++ make cmake epel-release git openssl-devel #### 在 CentOS 上构建 taosTools 安装依赖软件 -为了在 CentOS 上构建 [taosTools](https://github.com/taosdata/taos-tools) 需要安装如下依赖软件 +#### For CentOS 7/RHEL -```bash -sudo yum install zlib-devel xz-devel snappy-devel jansson jansson-devel pkgconfig libatomic libstdc++-static openssl-devel +``` +sudo yum install -y zlib-devel xz-devel snappy-devel jansson jansson-devel pkgconfig libatomic libstdc++-static openssl-devel ``` -注意:由于 snappy 缺乏 pkg-config 支持 -(参考 [链接](https://github.com/google/snappy/pull/86)),会导致 -cmake 提示无法发现 libsnappy,实际上工作正常。 +#### For CentOS 8/Rocky Linux + +``` +sudo yum install -y epel-release +sudo yum install -y dnf-plugins-core +sudo yum config-manager --set-enabled powertools +sudo yum install -y zlib-devel xz-devel snappy-devel jansson jansson-devel pkgconfig libatomic libstdc++-static openssl-devel +``` + +注意:由于 snappy 缺乏 pkg-config 支持(参考 [链接](https://github.com/google/snappy/pull/86)),会导致 cmake 提示无法发现 libsnappy,实际上工作正常。 + +若 powertools 安装失败,可以尝试改用: +``` +sudo yum config-manager --set-enabled Powertools +``` ### 设置 golang 开发环境 From d9d892bf29ea50b0fc3c7fb8581748a66c5caf3c Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 11 Aug 2022 21:21:59 +0800 Subject: [PATCH 23/52] enh: show command optimize --- tests/pytest/client/client.py | 2 +- .../backup/arbitrator/dn3_mn2_killDnode.sim | 2 +- .../replica_changeWithArbitrator.sim | 2 +- .../tsim/backup/cluster/cluster_main.sim | 28 +++++++++---------- .../tsim/backup/cluster/cluster_main0.sim | 24 ++++++++-------- .../tsim/backup/cluster/cluster_main1.sim | 24 ++++++++-------- .../tsim/backup/cluster/cluster_main2.sim | 24 ++++++++-------- .../backup/clusterSimCase/cluster_main.sim | 2 +- tests/script/tsim/bnode/basic1.sim | 4 +-- tests/script/tsim/dnode/create_dnode.sim | 4 +-- .../tsim/dnode/drop_dnode_has_mnode.sim | 6 ++-- tests/script/tsim/dnode/use_dropped_dnode.sim | 2 +- tests/script/tsim/mnode/basic1.sim | 12 ++++---- tests/script/tsim/mnode/basic2.sim | 6 ++-- tests/script/tsim/mnode/basic3.sim | 8 +++--- tests/script/tsim/mnode/basic4.sim | 10 +++---- tests/script/tsim/mnode/basic5.sim | 10 +++---- tests/script/tsim/qnode/basic1.sim | 2 +- tests/script/tsim/show/basic.sim | 4 +-- tests/script/tsim/snode/basic1.sim | 2 +- .../tsim/sync/3Replica5VgElect3mnode.sim | 6 ++-- .../tsim/sync/3Replica5VgElect3mnodedrop.sim | 6 ++-- .../script/tsim/sync/mnodeLeaderTransfer.sim | 2 +- tests/script/tsim/user/password.sim | 8 +++--- tests/script/tsim/user/privilege_sysinfo.sim | 2 +- tests/script/tsim/valgrind/checkError1.sim | 2 +- tests/script/tsim/vnode/replica3_basic.sim | 2 +- tests/system-test/0-others/user_control.py | 2 +- tests/system-test/6-cluster/5dnode1mnode.py | 2 +- tests/system-test/6-cluster/5dnode2mnode.py | 4 +-- .../system-test/6-cluster/5dnode3mnodeDrop.py | 24 ++++++++-------- .../6-cluster/5dnode3mnodeDropInsert.py | 24 ++++++++-------- .../5dnode3mnodeSeperate1VnodeStopInsert.py | 18 ++++++------ .../6-cluster/5dnode3mnodeStopInsert.py | 18 ++++++------ .../6-cluster/clusterCommonCheck.py | 6 ++-- .../4dnode1mnode_basic_createDb_replica1.py | 2 +- ...4dnode1mnode_basic_replica1_insertdatas.py | 2 +- ...mnode_basic_replica1_insertdatas_querys.py | 2 +- ...4dnode1mnode_basic_replica3_insertdatas.py | 2 +- ...lica3_insertdatas_force_stop_all_dnodes.py | 2 +- ...mnode_basic_replica3_insertdatas_querys.py | 2 +- ...sertdatas_querys_loop_restart_all_vnode.py | 2 +- ...nsertdatas_querys_loop_restart_follower.py | 2 +- ..._insertdatas_querys_loop_restart_leader.py | 2 +- ...ic_replica3_insertdatas_stop_all_dnodes.py | 2 +- ...replica3_insertdatas_stop_follower_sync.py | 2 +- ...plica3_insertdatas_stop_follower_unsync.py | 2 +- ...rtdatas_stop_follower_unsync_force_stop.py | 2 +- ..._basic_replica3_insertdatas_stop_leader.py | 2 +- ...ca3_insertdatas_stop_leader_forece_stop.py | 2 +- ...asic_replica3_mnode3_insertdatas_querys.py | 4 +-- ...basic_replica3_querydatas_stop_follower.py | 2 +- ...ca3_querydatas_stop_follower_force_stop.py | 2 +- ...e_basic_replica3_querydatas_stop_leader.py | 2 +- ...lica3_querydatas_stop_leader_force_stop.py | 2 +- .../4dnode1mnode_basic_replica3_vgroups.py | 2 +- ...de1mnode_basic_replica3_vgroups_stopOne.py | 2 +- tests/system-test/7-tmq/tmq3mnodeSwitch.py | 6 ++-- 58 files changed, 178 insertions(+), 178 deletions(-) diff --git a/tests/pytest/client/client.py b/tests/pytest/client/client.py index 9a155a4df9..6cfb1252bd 100644 --- a/tests/pytest/client/client.py +++ b/tests/pytest/client/client.py @@ -47,7 +47,7 @@ class TDTestCase: time.sleep(1) - ret = tdSql.query('show mnodes') + ret = tdSql.query('select * from information_schema.ins_mnodes') tdSql.checkRows(1) tdSql.checkData(0, 2, "master") diff --git a/tests/script/tsim/backup/arbitrator/dn3_mn2_killDnode.sim b/tests/script/tsim/backup/arbitrator/dn3_mn2_killDnode.sim index d90853d2e4..92731c2202 100644 --- a/tests/script/tsim/backup/arbitrator/dn3_mn2_killDnode.sim +++ b/tests/script/tsim/backup/arbitrator/dn3_mn2_killDnode.sim @@ -94,7 +94,7 @@ print ============== step3: stop dnode2 system sh/exec.sh -n dnode2 -s stop sleep 2000 -sql show mnodes +sql select * from information_schema.ins_mnodes print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 diff --git a/tests/script/tsim/backup/arbitrator/replica_changeWithArbitrator.sim b/tests/script/tsim/backup/arbitrator/replica_changeWithArbitrator.sim index df82f7d7d2..b34f1c8304 100644 --- a/tests/script/tsim/backup/arbitrator/replica_changeWithArbitrator.sim +++ b/tests/script/tsim/backup/arbitrator/replica_changeWithArbitrator.sim @@ -203,7 +203,7 @@ $cnt = $cnt + 1 if $cnt == 10 then return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes if $rows != 2 then sleep 2000 goto wait_dnode2_master diff --git a/tests/script/tsim/backup/cluster/cluster_main.sim b/tests/script/tsim/backup/cluster/cluster_main.sim index c6da56e2f7..024d1922f5 100644 --- a/tests/script/tsim/backup/cluster/cluster_main.sim +++ b/tests/script/tsim/backup/cluster/cluster_main.sim @@ -121,8 +121,8 @@ sleep 10000 #system rm -rf ../../../sim/dnode1/data #sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -137,8 +137,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step6-1: restart dnode1 system sh/exec.sh -n dnode1 -s start sleep 10000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -154,8 +154,8 @@ print ============== step7: stop dnode2 system sh/exec.sh -n dnode2 -s stop -x SIGINT sleep 3000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -170,8 +170,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step8: restart dnode2, then wait sync end system sh/exec.sh -n dnode2 -s start sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -186,8 +186,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step9: stop dnode3, then wait sync end system sh/exec.sh -n dnode3 -s stop -x SIGINT sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -202,8 +202,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step10: restart dnode3, then wait sync end system sh/exec.sh -n dnode3 -s start sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -222,8 +222,8 @@ sleep 20000 print ============== step12: restart dnode4, then wait sync end system sh/exec.sh -n dnode4 -s start sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 diff --git a/tests/script/tsim/backup/cluster/cluster_main0.sim b/tests/script/tsim/backup/cluster/cluster_main0.sim index d1a05eff32..70c14eaff7 100644 --- a/tests/script/tsim/backup/cluster/cluster_main0.sim +++ b/tests/script/tsim/backup/cluster/cluster_main0.sim @@ -124,8 +124,8 @@ print ============== step6-1: restart dnode1 system sh/exec.sh -n dnode1 -s start sleep 10000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -141,8 +141,8 @@ print ============== step7: stop dnode2 system sh/exec.sh -n dnode2 -s stop -x SIGINT sleep 3000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -157,8 +157,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step8: restart dnode2, then wait sync end system sh/exec.sh -n dnode2 -s start sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -173,8 +173,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step9: stop dnode3, then wait sync end system sh/exec.sh -n dnode3 -s stop -x SIGINT sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -189,8 +189,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step10: restart dnode3, then wait sync end system sh/exec.sh -n dnode3 -s start sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -209,8 +209,8 @@ sleep 20000 print ============== step12: restart dnode4, then wait sync end system sh/exec.sh -n dnode4 -s start sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 diff --git a/tests/script/tsim/backup/cluster/cluster_main1.sim b/tests/script/tsim/backup/cluster/cluster_main1.sim index 958ce8531a..db7708bc24 100644 --- a/tests/script/tsim/backup/cluster/cluster_main1.sim +++ b/tests/script/tsim/backup/cluster/cluster_main1.sim @@ -123,8 +123,8 @@ print ============== step6-1: restart dnode1 system sh/exec.sh -n dnode1 -s start sleep 10000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -140,8 +140,8 @@ print ============== step7: stop dnode2 system sh/exec.sh -n dnode2 -s stop -x SIGINT sleep 3000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -156,8 +156,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step8: restart dnode2, then wait sync end system sh/exec.sh -n dnode2 -s start sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -172,8 +172,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step9: stop dnode3, then wait sync end system sh/exec.sh -n dnode3 -s stop -x SIGINT sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -188,8 +188,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step10: restart dnode3, then wait sync end system sh/exec.sh -n dnode3 -s start sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -208,8 +208,8 @@ sleep 20000 #print ============== step12: restart dnode4, then wait sync end #system sh/exec.sh -n dnode4 -s start #sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 diff --git a/tests/script/tsim/backup/cluster/cluster_main2.sim b/tests/script/tsim/backup/cluster/cluster_main2.sim index ab043641b2..d4ef23d266 100644 --- a/tests/script/tsim/backup/cluster/cluster_main2.sim +++ b/tests/script/tsim/backup/cluster/cluster_main2.sim @@ -127,8 +127,8 @@ print ============== step6-1: restart dnode1 system sh/exec.sh -n dnode1 -s start sleep 10000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -144,8 +144,8 @@ print ============== step7: stop dnode2 system sh/exec.sh -n dnode2 -s stop -x SIGINT sleep 3000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -160,8 +160,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step8: restart dnode2, then wait sync end system sh/exec.sh -n dnode2 -s start sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -176,8 +176,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step9: stop dnode3, then wait sync end system sh/exec.sh -n dnode3 -s stop -x SIGINT sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -192,8 +192,8 @@ print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9 print ============== step10: restart dnode3, then wait sync end system sh/exec.sh -n dnode3 -s start sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 @@ -212,8 +212,8 @@ sleep 20000 #print ============== step12: restart dnode4, then wait sync end #system sh/exec.sh -n dnode4 -s start #sleep 20000 -sql show mnodes -print show mnodes +sql select * from information_schema.ins_mnodes +print select * from information_schema.ins_mnodes print rows: $rows print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 diff --git a/tests/script/tsim/backup/clusterSimCase/cluster_main.sim b/tests/script/tsim/backup/clusterSimCase/cluster_main.sim index dba09f94e6..8614164f8a 100644 --- a/tests/script/tsim/backup/clusterSimCase/cluster_main.sim +++ b/tests/script/tsim/backup/clusterSimCase/cluster_main.sim @@ -16,7 +16,7 @@ # 5 | 718 | ready | 2 | 3 | master | 2 | slave | #Query OK, 4 row(s) in set (0.002749s) # -#taos> show mnodes +#taos> select * from information_schema.ins_mnodes # -> ; # id | end_point | role | create_time | #===================================================================================== diff --git a/tests/script/tsim/bnode/basic1.sim b/tests/script/tsim/bnode/basic1.sim index 3dc732ffd4..003d0ceb3d 100644 --- a/tests/script/tsim/bnode/basic1.sim +++ b/tests/script/tsim/bnode/basic1.sim @@ -15,7 +15,7 @@ if $data00 != 1 then return -1 endi -sql show mnodes; +sql select * from information_schema.ins_mnodes; if $rows != 1 then return -1 endi @@ -62,7 +62,7 @@ if $data14 != ready then return -1 endi -sql show mnodes; +sql select * from information_schema.ins_mnodes; if $rows != 1 then return -1 endi diff --git a/tests/script/tsim/dnode/create_dnode.sim b/tests/script/tsim/dnode/create_dnode.sim index b307ad0341..42e2e21bdc 100644 --- a/tests/script/tsim/dnode/create_dnode.sim +++ b/tests/script/tsim/dnode/create_dnode.sim @@ -17,7 +17,7 @@ if $data00 != 1 then endi -sql show mnodes; +sql select * from information_schema.ins_mnodes; print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] if $rows != 1 then return -1 @@ -65,7 +65,7 @@ if $data14 != ready then return -1 endi -sql show mnodes; +sql select * from information_schema.ins_mnodes; if $rows != 1 then return -1 endi diff --git a/tests/script/tsim/dnode/drop_dnode_has_mnode.sim b/tests/script/tsim/dnode/drop_dnode_has_mnode.sim index b1959ad8a6..054f978607 100644 --- a/tests/script/tsim/dnode/drop_dnode_has_mnode.sim +++ b/tests/script/tsim/dnode/drop_dnode_has_mnode.sim @@ -59,7 +59,7 @@ step3: if $x == 10 then return -1 endi -sql show mnodes -x step3 +sql select * from information_schema.ins_mnodes -x step3 print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] if $data(1)[2] != leader then @@ -84,8 +84,8 @@ if $data00 != 1 then return -1 endi -print show mnodes; -sql show mnodes +print select * from information_schema.ins_mnodes; +sql select * from information_schema.ins_mnodes print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] if $rows != 1 then diff --git a/tests/script/tsim/dnode/use_dropped_dnode.sim b/tests/script/tsim/dnode/use_dropped_dnode.sim index 21bf02f61a..3a5defc505 100644 --- a/tests/script/tsim/dnode/use_dropped_dnode.sim +++ b/tests/script/tsim/dnode/use_dropped_dnode.sim @@ -115,7 +115,7 @@ step4: print ====> dnode not online! return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 if $rows != 2 then diff --git a/tests/script/tsim/mnode/basic1.sim b/tests/script/tsim/mnode/basic1.sim index 05515dac59..59156080c8 100644 --- a/tests/script/tsim/mnode/basic1.sim +++ b/tests/script/tsim/mnode/basic1.sim @@ -6,7 +6,7 @@ system sh/exec.sh -n dnode2 -s start sql connect print =============== select * from information_schema.ins_dnodes -sql show mnodes; +sql select * from information_schema.ins_mnodes; if $rows != 1 then return -1 endi @@ -49,7 +49,7 @@ step2: if $x == 20 then return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes print $data(1)[0] $data(1)[1] $data(1)[2] print $data(2)[0] $data(2)[1] $data(2)[2] @@ -72,7 +72,7 @@ endi sleep 2000 print ============ drop mnode 2 sql drop mnode on dnode 2 -sql show mnodes +sql select * from information_schema.ins_mnodes if $rows != 1 then return -1 endi @@ -85,7 +85,7 @@ step2: if $x == 20 then return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes print $data(1)[0] $data(1)[1] $data(1)[2] print $data(2)[0] $data(2)[1] $data(2)[2] @@ -109,7 +109,7 @@ sleep 2000 print =============== create mnodes sql create mnode on dnode 2 -sql show mnodes +sql select * from information_schema.ins_mnodes if $rows != 2 then return -1 endi @@ -121,7 +121,7 @@ step3: if $x == 20 then return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes print $data(1)[0] $data(1)[1] $data(1)[2] print $data(2)[0] $data(2)[1] $data(2)[2] diff --git a/tests/script/tsim/mnode/basic2.sim b/tests/script/tsim/mnode/basic2.sim index 217d823d61..5be29e88a6 100644 --- a/tests/script/tsim/mnode/basic2.sim +++ b/tests/script/tsim/mnode/basic2.sim @@ -6,7 +6,7 @@ system sh/exec.sh -n dnode2 -s start sql connect print =============== select * from information_schema.ins_dnodes -sql show mnodes; +sql select * from information_schema.ins_mnodes; if $rows != 1 then return -1 endi @@ -46,7 +46,7 @@ step2: if $x == 20 then return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes print $data(1)[0] $data(1)[1] $data(1)[2] print $data(2)[0] $data(2)[1] $data(2)[2] @@ -88,7 +88,7 @@ system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode2 -s start sql connect -sql show mnodes +sql select * from information_schema.ins_mnodes if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/mnode/basic3.sim b/tests/script/tsim/mnode/basic3.sim index d1b7587db1..02650ba10d 100644 --- a/tests/script/tsim/mnode/basic3.sim +++ b/tests/script/tsim/mnode/basic3.sim @@ -49,7 +49,7 @@ step2: if $x == 10 then return -1 endi -sql show mnodes -x step2 +sql select * from information_schema.ins_mnodes -x step2 print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 @@ -87,7 +87,7 @@ step4: if $x == 10 then return -1 endi -sql show mnodes -x step4 +sql select * from information_schema.ins_mnodes -x step4 print $data(1)[0] $data(1)[1] $data(1)[2] print $data(2)[0] $data(2)[1] $data(2)[2] print $data(3)[0] $data(3)[1] $data(3)[2] @@ -126,7 +126,7 @@ step5: if $x == 10 then return -1 endi -sql show mnodes -x step5 +sql select * from information_schema.ins_mnodes -x step5 print $data(1)[0] $data(1)[1] $data(1)[2] print $data(2)[0] $data(2)[1] $data(2)[2] print $data(3)[0] $data(3)[1] $data(3)[2] @@ -165,7 +165,7 @@ step6: if $x == 10 then return -1 endi -sql show mnodes -x step6 +sql select * from information_schema.ins_mnodes -x step6 print $data(1)[0] $data(1)[1] $data(1)[2] print $data(2)[0] $data(2)[1] $data(2)[2] print $data(3)[0] $data(3)[1] $data(3)[2] diff --git a/tests/script/tsim/mnode/basic4.sim b/tests/script/tsim/mnode/basic4.sim index 8ad054746a..a2b8aa2f96 100644 --- a/tests/script/tsim/mnode/basic4.sim +++ b/tests/script/tsim/mnode/basic4.sim @@ -49,7 +49,7 @@ endi system sh/exec.sh -n dnode3 -s stop sql_error create mnode on dnode 3 -print =============== step3: show mnodes +print =============== step3: select * from information_schema.ins_mnodes $x = 0 step3: @@ -58,7 +58,7 @@ step3: if $x == 10 then return -1 endi -sql show mnodes -x step3 +sql select * from information_schema.ins_mnodes -x step3 print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] @@ -96,7 +96,7 @@ step4: if $x == 10 then return -1 endi -sql show mnodes -x step4 +sql select * from information_schema.ins_mnodes -x step4 print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] @@ -135,7 +135,7 @@ step5: if $x == 10 then return -1 endi -sql show mnodes -x step5 +sql select * from information_schema.ins_mnodes -x step5 print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] @@ -173,7 +173,7 @@ step6: if $x == 10 then return -1 endi -sql show mnodes -x step6 +sql select * from information_schema.ins_mnodes -x step6 print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] diff --git a/tests/script/tsim/mnode/basic5.sim b/tests/script/tsim/mnode/basic5.sim index 73faf5abe2..387f38a717 100644 --- a/tests/script/tsim/mnode/basic5.sim +++ b/tests/script/tsim/mnode/basic5.sim @@ -67,7 +67,7 @@ step31: if $x == 50 then return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes $leaderNum = 0 if $data(1)[2] == leader then $leaderNum = 1 @@ -161,7 +161,7 @@ step61: if $x == 10 then return -1 endi -sql show mnodes -x step61 +sql select * from information_schema.ins_mnodes -x step61 print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -215,7 +215,7 @@ step81: if $x == 10 then return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -271,7 +271,7 @@ step92: if $x == 20 then return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 @@ -301,7 +301,7 @@ stepa: if $x == 10 then return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes print ===> $data00 $data01 $data02 $data03 $data04 $data05 print ===> $data10 $data11 $data12 $data13 $data14 $data15 print ===> $data20 $data21 $data22 $data23 $data24 $data25 diff --git a/tests/script/tsim/qnode/basic1.sim b/tests/script/tsim/qnode/basic1.sim index 27a3aa9e2a..deaa457e1e 100644 --- a/tests/script/tsim/qnode/basic1.sim +++ b/tests/script/tsim/qnode/basic1.sim @@ -62,7 +62,7 @@ if $data14 != ready then return -1 endi -sql show mnodes; +sql select * from information_schema.ins_mnodes; if $rows != 1 then return -1 endi diff --git a/tests/script/tsim/show/basic.sim b/tests/script/tsim/show/basic.sim index af9b74665a..eb2c808dad 100644 --- a/tests/script/tsim/show/basic.sim +++ b/tests/script/tsim/show/basic.sim @@ -44,7 +44,7 @@ if $rows != 2 then return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes if $rows != 1 then return -1 endi @@ -142,7 +142,7 @@ if $rows != 2 then return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes if $rows != 1 then return -1 endi diff --git a/tests/script/tsim/snode/basic1.sim b/tests/script/tsim/snode/basic1.sim index d20f312e34..86072215f7 100644 --- a/tests/script/tsim/snode/basic1.sim +++ b/tests/script/tsim/snode/basic1.sim @@ -62,7 +62,7 @@ if $data14 != ready then return -1 endi -sql show mnodes; +sql select * from information_schema.ins_mnodes; if $rows != 1 then return -1 endi diff --git a/tests/script/tsim/sync/3Replica5VgElect3mnode.sim b/tests/script/tsim/sync/3Replica5VgElect3mnode.sim index 96a895303d..a431f5634d 100644 --- a/tests/script/tsim/sync/3Replica5VgElect3mnode.sim +++ b/tests/script/tsim/sync/3Replica5VgElect3mnode.sim @@ -276,7 +276,7 @@ check_mnode_ready_2: print ====> first create three mnode not ready! return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] @@ -568,7 +568,7 @@ check_mnode_ready_3: print ====> second mnode not ready! return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] @@ -847,7 +847,7 @@ check_mnode_ready_3: print ====> third: mnode not ready! return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] diff --git a/tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim b/tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim index 72ecd8ed50..a0826d9708 100644 --- a/tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim +++ b/tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim @@ -278,7 +278,7 @@ check_mnode_ready_2: print ====> first create three mnode not ready! return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] @@ -531,7 +531,7 @@ check_mnode_ready_3: print ====> second mnode not ready! return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] @@ -580,7 +580,7 @@ if $loop_cnt == 300 then print ====> vgroups not ready! return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] diff --git a/tests/script/tsim/sync/mnodeLeaderTransfer.sim b/tests/script/tsim/sync/mnodeLeaderTransfer.sim index 6780fb413c..ed21ac19c3 100644 --- a/tests/script/tsim/sync/mnodeLeaderTransfer.sim +++ b/tests/script/tsim/sync/mnodeLeaderTransfer.sim @@ -8,7 +8,7 @@ system sh/exec.sh -n dnode3 -s start sql connect print =============== select * from information_schema.ins_dnodes -sql show mnodes; +sql select * from information_schema.ins_mnodes; if $rows != 1 then return -1 endi diff --git a/tests/script/tsim/user/password.sim b/tests/script/tsim/user/password.sim index 19eb3a4423..d26b9dbc2e 100644 --- a/tests/script/tsim/user/password.sim +++ b/tests/script/tsim/user/password.sim @@ -10,7 +10,7 @@ sql create user u_write pass 'taosdata1' sql alter user u_read pass 'taosdata' sql alter user u_write pass 'taosdata' -sql select * from information_schema.ins_users +sql show users if $rows != 3 then return -1 endi @@ -26,7 +26,7 @@ sql_error alter user u_write pass 'taosdata1' sql_error create user read1 pass 'taosdata1' sql_error create user write1 pass 'taosdata1' -sql select * from information_schema.ins_users +sql show users if $rows != 3 then return -1 endi @@ -41,7 +41,7 @@ sql_error create user write2 pass 'taosdata1' sql alter user u_write pass 'taosdata' sql_error alter user u_read pass 'taosdata' -sql select * from information_schema.ins_users +sql show users if $rows != 3 then return -1 endi @@ -56,7 +56,7 @@ sql_error create userabcd012345678901234567891234567890abcd012345678901234567891 sql_error create user abcd0123456789012345678901234567890111 PASS '123' sql create user abc01234567890123456789 PASS '123' -sql select * from information_schema.ins_users +sql show users if $rows != 5 then return -1 endi diff --git a/tests/script/tsim/user/privilege_sysinfo.sim b/tests/script/tsim/user/privilege_sysinfo.sim index f98eae13c3..cbf714ed73 100644 --- a/tests/script/tsim/user/privilege_sysinfo.sim +++ b/tests/script/tsim/user/privilege_sysinfo.sim @@ -52,7 +52,7 @@ print =============== check show sql_error select * from information_schema.ins_users sql_error show cluster sql_error select * from information_schema.ins_dnodes -sql_error show mnodes +sql_error select * from information_schema.ins_mnodes sql_error show snodes sql_error show qnodes sql_error show bnodes diff --git a/tests/script/tsim/valgrind/checkError1.sim b/tests/script/tsim/valgrind/checkError1.sim index d5fdaf1430..5f82d2d935 100644 --- a/tests/script/tsim/valgrind/checkError1.sim +++ b/tests/script/tsim/valgrind/checkError1.sim @@ -58,7 +58,7 @@ if $rows != 2 then return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes if $rows != 1 then return -1 endi diff --git a/tests/script/tsim/vnode/replica3_basic.sim b/tests/script/tsim/vnode/replica3_basic.sim index c0e9d0cc6d..473e53e84b 100644 --- a/tests/script/tsim/vnode/replica3_basic.sim +++ b/tests/script/tsim/vnode/replica3_basic.sim @@ -47,7 +47,7 @@ step02: if $x == 20 then return -1 endi -sql show mnodes +sql select * from information_schema.ins_mnodes print $data(1)[0] $data(1)[1] $data(1)[2] print $data(2)[0] $data(2)[1] $data(2)[2] print $data(3)[0] $data(3)[1] $data(3)[2] diff --git a/tests/system-test/0-others/user_control.py b/tests/system-test/0-others/user_control.py index b020dbae2b..5e0a2b4102 100644 --- a/tests/system-test/0-others/user_control.py +++ b/tests/system-test/0-others/user_control.py @@ -692,7 +692,7 @@ class TDTestCase: taos4_conn = taos.connect(user=self.__user_list[4], password=f"new{self.__passwd_list[4]}") taos4_except = True try: - taos4_conn.query(f"show mnodes") + taos4_conn.query(f"select * from information_schema.ins_mnodes") taos4_conn.query(f"show {DBNAME}.vgroups") except BaseException: taos4_except = False diff --git a/tests/system-test/6-cluster/5dnode1mnode.py b/tests/system-test/6-cluster/5dnode1mnode.py index 6a8f5a2efb..60b70433ed 100644 --- a/tests/system-test/6-cluster/5dnode1mnode.py +++ b/tests/system-test/6-cluster/5dnode1mnode.py @@ -94,7 +94,7 @@ class TDTestCase: tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') tdSql.checkData(4,4,'ready') - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'leader') tdSql.checkData(0,3,'ready') diff --git a/tests/system-test/6-cluster/5dnode2mnode.py b/tests/system-test/6-cluster/5dnode2mnode.py index 59d4f5f18f..f62483cfe2 100644 --- a/tests/system-test/6-cluster/5dnode2mnode.py +++ b/tests/system-test/6-cluster/5dnode2mnode.py @@ -48,7 +48,7 @@ class TDTestCase: tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') tdSql.checkData(4,4,'ready') - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'leader') tdSql.checkData(0,3,'ready') @@ -62,7 +62,7 @@ class TDTestCase: count=0 while count < 10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(2) if tdSql.queryResult[0][2]=='leader' : if tdSql.queryResult[1][2]=='follower': diff --git a/tests/system-test/6-cluster/5dnode3mnodeDrop.py b/tests/system-test/6-cluster/5dnode3mnodeDrop.py index 32f222dacb..d95124c445 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeDrop.py +++ b/tests/system-test/6-cluster/5dnode3mnodeDrop.py @@ -117,7 +117,7 @@ class TDTestCase: count=0 while count < 10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3) : tdLog.debug("mnode is three nodes") if tdSql.queryResult[0][2]=='leader' : @@ -141,7 +141,7 @@ class TDTestCase: tdLog.debug("three mnodes is not ready in 10s ") return -1 - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(3) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,3,'ready') @@ -154,7 +154,7 @@ class TDTestCase: count=0 while count < 10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3) : tdLog.debug("mnode is three nodes") if tdSql.queryResult[0][2]=='offline' : @@ -172,7 +172,7 @@ class TDTestCase: return -1 tdSql.error("drop mnode on dnode 1;") - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(3) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'offline') @@ -186,7 +186,7 @@ class TDTestCase: count=0 while count < 40: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3) : tdLog.debug("mnode is three nodes") if tdSql.queryResult[0][2]=='leader' : @@ -200,7 +200,7 @@ class TDTestCase: return -1 tdSql.error("drop mnode on dnode 2;") - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(3) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'leader') @@ -216,7 +216,7 @@ class TDTestCase: count=0 while count < 10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3) : tdLog.debug("mnode is three nodes") if tdSql.queryResult[0][2]=='leader' : @@ -229,7 +229,7 @@ class TDTestCase: tdLog.debug("stop mnodes on dnode 3 failed in 10s") return -1 tdSql.error("drop mnode on dnode 3;") - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(3) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'leader') @@ -249,7 +249,7 @@ class TDTestCase: tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') tdSql.checkData(4,4,'ready') - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(1) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'leader') @@ -276,11 +276,11 @@ class TDTestCase: for i in range(1,3): tdLog.debug("drop mnode on dnode %d"%(i+1)) tdSql.execute("drop mnode on dnode %d"%(i+1)) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") count=0 while count<10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(2): tdLog.debug("drop mnode %d successfully"%(i+1)) break @@ -290,7 +290,7 @@ class TDTestCase: count=0 while count<10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3): tdLog.debug("drop mnode %d successfully"%(i+1)) break diff --git a/tests/system-test/6-cluster/5dnode3mnodeDropInsert.py b/tests/system-test/6-cluster/5dnode3mnodeDropInsert.py index 106bb26264..6443a4a7f0 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeDropInsert.py +++ b/tests/system-test/6-cluster/5dnode3mnodeDropInsert.py @@ -209,7 +209,7 @@ class TDTestCase: count=0 while count < 10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3) : print("mnode is three nodes") if tdSql.queryResult[0][2]=='leader' : @@ -232,7 +232,7 @@ class TDTestCase: print("three mnodes is not ready in 10s ") return -1 - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(3) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,3,'ready') @@ -245,7 +245,7 @@ class TDTestCase: count=0 while count < 10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3) : print("mnode is three nodes") if tdSql.queryResult[0][2]=='offline' : @@ -263,7 +263,7 @@ class TDTestCase: return -1 tdSql.error("drop mnode on dnode 1;") - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(3) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'offline') @@ -277,7 +277,7 @@ class TDTestCase: count=0 while count < 40: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3) : print("mnode is three nodes") if tdSql.queryResult[0][2]=='leader' : @@ -291,7 +291,7 @@ class TDTestCase: return -1 tdSql.error("drop mnode on dnode 2;") - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(3) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'leader') @@ -307,7 +307,7 @@ class TDTestCase: count=0 while count < 10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3) : print("mnode is three nodes") if tdSql.queryResult[0][2]=='leader' : @@ -320,7 +320,7 @@ class TDTestCase: print("stop mnodes on dnode 3 failed in 10s") return -1 tdSql.error("drop mnode on dnode 3;") - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(3) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'leader') @@ -348,7 +348,7 @@ class TDTestCase: tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') tdSql.checkData(4,4,'ready') - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(1) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'leader') @@ -383,11 +383,11 @@ class TDTestCase: for i in range(1,3): tdLog.debug("drop mnode on dnode %d"%(i+1)) tdSql.execute("drop mnode on dnode %d"%(i+1)) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") count=0 while count<10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(2): print("drop mnode %d successfully"%(i+1)) break @@ -397,7 +397,7 @@ class TDTestCase: count=0 while count<10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3): print("drop mnode %d successfully"%(i+1)) break diff --git a/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py b/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py index bc1530bb8b..870596175e 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py @@ -128,7 +128,7 @@ class TDTestCase: count=0 while count < 10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3) : print("mnode is three nodes") if tdSql.queryResult[0][2]=='leader' : @@ -151,7 +151,7 @@ class TDTestCase: print("three mnodes is not ready in 10s ") return -1 - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(3) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,3,'ready') @@ -164,7 +164,7 @@ class TDTestCase: count=0 while count < 10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3) : print("mnode is three nodes") if tdSql.queryResult[0][2]=='offline' : @@ -182,7 +182,7 @@ class TDTestCase: return -1 tdSql.error("drop mnode on dnode 1;") - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(3) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'offline') @@ -196,7 +196,7 @@ class TDTestCase: count=0 while count < 40: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3) : print("mnode is three nodes") if tdSql.queryResult[0][2]=='leader' : @@ -210,7 +210,7 @@ class TDTestCase: return -1 tdSql.error("drop mnode on dnode 2;") - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(3) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'leader') @@ -226,7 +226,7 @@ class TDTestCase: count=0 while count < 10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3) : print("mnode is three nodes") if tdSql.queryResult[0][2]=='leader' : @@ -239,7 +239,7 @@ class TDTestCase: print("stop mnodes on dnode 3 failed in 10s") return -1 tdSql.error("drop mnode on dnode 3;") - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(3) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'leader') @@ -265,7 +265,7 @@ class TDTestCase: tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') tdSql.checkData(4,4,'ready') - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(1) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'leader') diff --git a/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py b/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py index 0d7e453042..94796a8280 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py @@ -167,7 +167,7 @@ class TDTestCase: count=0 while count < 10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3) : tdLog.debug("mnode is three nodes") if tdSql.queryResult[0][2]=='leader' : @@ -190,7 +190,7 @@ class TDTestCase: tdLog.debug("three mnodes is not ready in 10s ") return -1 - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(3) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,3,'ready') @@ -203,7 +203,7 @@ class TDTestCase: count=0 while count < 10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3) : tdLog.debug("mnode is three nodes") if tdSql.queryResult[0][2]=='offline' : @@ -221,7 +221,7 @@ class TDTestCase: return -1 tdSql.error("drop mnode on dnode 1;") - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(3) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'offline') @@ -235,7 +235,7 @@ class TDTestCase: count=0 while count < 40: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3) : tdLog.debug("mnode is three nodes") if tdSql.queryResult[0][2]=='leader' : @@ -249,7 +249,7 @@ class TDTestCase: return -1 tdSql.error("drop mnode on dnode 2;") - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(3) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'leader') @@ -265,7 +265,7 @@ class TDTestCase: count=0 while count < 10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(3) : tdLog.debug("mnode is three nodes") if tdSql.queryResult[0][2]=='leader' : @@ -278,7 +278,7 @@ class TDTestCase: tdLog.debug("stop mnodes on dnode 3 failed in 10s") return -1 tdSql.error("drop mnode on dnode 3;") - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(3) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'leader') @@ -296,7 +296,7 @@ class TDTestCase: tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') tdSql.checkData(4,4,'ready') - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(1) tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(0,2,'leader') diff --git a/tests/system-test/6-cluster/clusterCommonCheck.py b/tests/system-test/6-cluster/clusterCommonCheck.py index 196b362f45..b16956c497 100644 --- a/tests/system-test/6-cluster/clusterCommonCheck.py +++ b/tests/system-test/6-cluster/clusterCommonCheck.py @@ -117,7 +117,7 @@ class ClusterComCheck: while count < 10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(self.mnodeNums) : tdLog.success("cluster has %d mnodes" %self.mnodeNums ) @@ -164,7 +164,7 @@ class ClusterComCheck: count=0 while count < 10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(mnodeNums) : tdLog.success("cluster has %d mnodes" %self.mnodeNums ) else: @@ -210,7 +210,7 @@ class ClusterComCheck: count=0 while count < 10: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(mnodeNums) : tdLog.success("cluster has %d mnodes" %self.mnodeNums ) else: diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py index e93b13278b..ed846f8f05 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py @@ -41,7 +41,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py index 7638d8227f..7f7543971c 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py @@ -47,7 +47,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py index 02d944b08f..0a3c4544a0 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py @@ -48,7 +48,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py index 5d112f4352..588b815dce 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py @@ -47,7 +47,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py index 3d01015af6..481ce93358 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py @@ -57,7 +57,7 @@ class TDTestCase: def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py index 3649617c21..302914d775 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py @@ -48,7 +48,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py index db05eca9ce..aea6d798fb 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py @@ -50,7 +50,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py index fdd5ec7d46..5d50ff0353 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py @@ -50,7 +50,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py index cbb007d961..fd54b28a82 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py @@ -50,7 +50,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py index 63c4942c9e..210e5efcbf 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py @@ -57,7 +57,7 @@ class TDTestCase: def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py index c608c93f5e..802cd752ee 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py @@ -56,7 +56,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py index 25c26c7288..545feaf5f1 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py @@ -56,7 +56,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py index edff274793..dbdc590eae 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py @@ -56,7 +56,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py index 1020139d63..00448cbae6 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py @@ -139,7 +139,7 @@ class TDTestCase: return check_status def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py index 6abe700bd6..9bbb84281e 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py @@ -139,7 +139,7 @@ class TDTestCase: return check_status def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py index ed20a51595..5ec17ec0e0 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py @@ -48,7 +48,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode @@ -190,7 +190,7 @@ class TDTestCase: # create mnode tdSql.execute("create mnode on dnode 2 ") tdSql.execute("create mnode on dnode 3 ") - os.system("taos -s 'show mnodes;'") + os.system("taos -s 'select * from information_schema.ins_mnodes;'") # start writing constantly writing = threading.Thread(target = self.create_db_replica_3_insertdatas, args=(self.db_name , self.replica , self.vgroups , self.tb_nums , self.row_nums)) writing.start() diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py index d60817a2b4..33e0ae3058 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py @@ -58,7 +58,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py index da9dc115eb..7c67bde776 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py @@ -58,7 +58,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py index 561159af89..ed1fcc026c 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py @@ -58,7 +58,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py index fb0ddd5435..97ebf4292e 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py @@ -58,7 +58,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py index ff7f84a29d..dc12c74a98 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py @@ -47,7 +47,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py index 97a497dfe9..5f6ac9fcc7 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py @@ -50,7 +50,7 @@ class TDTestCase: return buildPath def check_setup_cluster_status(self): - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") for mnode in tdSql.queryResult: name = mnode[1] info = mnode diff --git a/tests/system-test/7-tmq/tmq3mnodeSwitch.py b/tests/system-test/7-tmq/tmq3mnodeSwitch.py index 305a93128e..9a98c69aff 100644 --- a/tests/system-test/7-tmq/tmq3mnodeSwitch.py +++ b/tests/system-test/7-tmq/tmq3mnodeSwitch.py @@ -63,7 +63,7 @@ class TDTestCase: count=0 while count < self.mnodeCheckCnt: time.sleep(1) - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") if tdSql.checkRows(self.mnodes) : tdLog.debug("mnode is three nodes") else: @@ -87,7 +87,7 @@ class TDTestCase: else: tdLog.exit("three mnodes is not ready in 10s ") - tdSql.query("show mnodes;") + tdSql.query("select * from information_schema.ins_mnodes;") tdSql.checkRows(self.mnodes) tdSql.checkData(0,self.mnodeEpIndex,'%s:%d'%(self.host,self.startPort)) tdSql.checkData(0,self.mnodeStatusIndex,'ready') @@ -100,7 +100,7 @@ class TDTestCase: count=0 while count < self.mnodeCheckCnt: time.sleep(1) - tdSql.query("show mnodes") + tdSql.query("select * from information_schema.ins_mnodes") tdLog.debug(tdSql.queryResult) # if tdSql.checkRows(self.mnodes) : # tdLog.debug("mnode is three nodes") From 421353c1f5c91fe0dc80f28da90218aa97fba3f4 Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Thu, 11 Aug 2022 21:23:20 +0800 Subject: [PATCH 24/52] doc: change readme doc --- examples/rust | 1 - tools/taos-tools | 1 - 2 files changed, 2 deletions(-) delete mode 160000 examples/rust delete mode 160000 tools/taos-tools diff --git a/examples/rust b/examples/rust deleted file mode 160000 index 7ed7a97715..0000000000 --- a/examples/rust +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7ed7a97715388fa144718764d6bf20f9bfc29a12 diff --git a/tools/taos-tools b/tools/taos-tools deleted file mode 160000 index 57bdfbfbcd..0000000000 --- a/tools/taos-tools +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 57bdfbfbcd8b4f8a3d38ab8eb9fd44d372a65911 From 4fff65276f4e7114c3980d175cd4e7f2ee8385fd Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Thu, 11 Aug 2022 21:30:32 +0800 Subject: [PATCH 25/52] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7206e7156b..307d7c0b8f 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ English | [简体中文](README-CN.md) | We are hiring, check [here](https://tde # What is TDengine? -TDengine is an open source, cloud native time-series database optimized for Internet of Things (IoT), Connected Cars, and Industrial IoT. It enables efficient, real-time data ingestion, processing, and monitoring of TB and even PB scale data per day, generated by billions of sensors and data collectors. Below are the most outstanding advantages of TDengine: +TDengine is an open source, cloud native time-series database optimized for Internet of Things (IoT), Connected Cars, and Industrial IoT. It enables efficient, real-time data ingestion, processing, and monitoring of TB and even PB scale data per day, generated by billions of sensors and data collectors. TDengine differentiates itself from other TSDBs with the following advantages.: - High-Performance: TDengine is the only time-series database to solve the high cardinality issue to support billions of data collection points while out performing other time-series databases for data ingestion, querying and data compression. @@ -28,7 +28,7 @@ TDengine is an open source, cloud native time-series database optimized for Inte - Cloud Native: Through native distributed design, sharding and partitioning, separation of compute and storage, RAFT, support for kubernetes deployment and full observability, TDengine can be deployed on public, private or hybrid clouds. -- Open Source: TDengine’s core modules, including cluster feature, are all available under open source licenses. It has gathered 18.7k stars on GitHub, an active developer community, and over 137k running instances worldwide. +- Open Source: TDengine’s core modules, including cluster feature, are all available under open source licenses. It has gathered 18.8k stars on GitHub, an active developer community, and over 137k running instances worldwide. - Ease of Use: For administrators, TDengine significantly reduces the effort to deploy and maintain. For developers, it provides a simple interface, simplified solution and seamless integrations for third party tools. For data users, it gives easy data access. @@ -124,11 +124,11 @@ To build the [taosTools](https://github.com/taosdata/taos-tools) on CentOS, the sudo yum install zlib-devel xz-devel snappy-devel jansson jansson-devel pkgconfig libatomic libstdc++-static openssl-devel ``` -Note: Since snappy lacks pkg-config support (refer to [link](https://github.com/google/snappy/pull/86)), it lead a cmake prompt libsnappy not found. But snappy will works well. +Note: Since snappy lacks pkg-config support (refer to [link](https://github.com/google/snappy/pull/86)), it leads a cmake prompt libsnappy not found. But snappy will works well. ### Setup golang environment -TDengine includes few components developed by Go language. Please refer to golang.org official documentation for golang environment setup. +TDengine includes a few components developed by Go language. Please refer to golang.org official documentation for golang environment setup. Please use version 1.14+. For the user in China, we recommend using a proxy to accelerate package downloading. @@ -139,7 +139,7 @@ go env -w GOPROXY=https://goproxy.cn,direct ### Setup rust environment -TDengine includees few compoments developed by Rust language. Please refer to rust-lang.org official documentation for rust environment setup. +TDengine includees a few compoments developed by Rust language. Please refer to rust-lang.org official documentation for rust environment setup. ## Get the source codes From 64a92ff8397d2e28982459697e8660044d511d58 Mon Sep 17 00:00:00 2001 From: Cary Xu Date: Thu, 11 Aug 2022 21:31:34 +0800 Subject: [PATCH 26/52] test: tsma case optimization --- tests/script/tsim/sma/tsmaCreateInsertQuery.sim | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/script/tsim/sma/tsmaCreateInsertQuery.sim b/tests/script/tsim/sma/tsmaCreateInsertQuery.sim index e3b38d415c..718ff58ed4 100644 --- a/tests/script/tsim/sma/tsmaCreateInsertQuery.sim +++ b/tests/script/tsim/sma/tsmaCreateInsertQuery.sim @@ -61,6 +61,7 @@ endi print =============== select * from stb from memory in designated vgroup sql select _wstart, _wend, min(c1),max(c2),max(c1) from stb interval(5m,10s) sliding(5m); print $data00 $data01 $data02 $data03 $data04 +print $data10 $data11 $data12 $data13 $data14 if $rows != 1 then print rows $rows != 1 return -1 From 5bca437633bc2d12c012c058a3a4cea4926951ea Mon Sep 17 00:00:00 2001 From: Linhe Huo Date: Thu, 11 Aug 2022 21:38:33 +0800 Subject: [PATCH 27/52] chore: fix docs build error (#16013) --- docs/zh/14-reference/03-connector/rust.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/zh/14-reference/03-connector/rust.mdx b/docs/zh/14-reference/03-connector/rust.mdx index cc2a9986e9..ae644e1911 100644 --- a/docs/zh/14-reference/03-connector/rust.mdx +++ b/docs/zh/14-reference/03-connector/rust.mdx @@ -54,10 +54,11 @@ Rust 连接器仍然在快速开发中,1.0 之前无法保证其向后兼容 taos = "*" ``` - + + -在 `Cargo.toml` 文件中添加 [taos][taos]: +在 `Cargo.toml` 文件中添加 [taos][taos],并启用 `native` 特性: ```toml [dependencies] From 23fe5448c3ed5596a85c3536b3b92d8b27834798 Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Thu, 11 Aug 2022 21:40:20 +0800 Subject: [PATCH 28/52] build: check version before install --- cmake/cmake.install | 6 +++++- packaging/deb/DEBIAN/control | 2 +- packaging/deb/DEBIAN/preinst | 5 +++++ packaging/deb/DEBIAN/prerm | 4 ++++ packaging/rpm/tdengine.spec | 4 ++++ 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/cmake/cmake.install b/cmake/cmake.install index 07773d1015..4e3d0b166a 100644 --- a/cmake/cmake.install +++ b/cmake/cmake.install @@ -1,4 +1,8 @@ -IF (TD_LINUX) +IF (EXISTS /var/lib/taos/dnode/dnodeCfg.json) + INSTALL(CODE "MESSAGE(\"The default data directory /var/lib/taos contains old data of tdengine 2.x, please clear it before installing!\")") +ELSEIF (EXISTS C:/TDengine/data/dnode/dnodeCfg.json) + INSTALL(CODE "MESSAGE(\"The default data directory C:/TDengine/data contains old data of tdengine 2.x, please clear it before installing!\")") +ELSEIF (TD_LINUX) SET(TD_MAKE_INSTALL_SH "${TD_SOURCE_DIR}/packaging/tools/make_install.sh") INSTALL(CODE "MESSAGE(\"make install script: ${TD_MAKE_INSTALL_SH}\")") INSTALL(CODE "execute_process(COMMAND bash ${TD_MAKE_INSTALL_SH} ${TD_SOURCE_DIR} ${PROJECT_BINARY_DIR} Linux ${TD_VER_NUMBER})") diff --git a/packaging/deb/DEBIAN/control b/packaging/deb/DEBIAN/control index fd3f81ba08..a2005be138 100644 --- a/packaging/deb/DEBIAN/control +++ b/packaging/deb/DEBIAN/control @@ -1,5 +1,5 @@ Package: tdengine -Version: 1.0.0 +Version: 3.0.0 Section: utils Priority: optional #Essential: no diff --git a/packaging/deb/DEBIAN/preinst b/packaging/deb/DEBIAN/preinst index 184653991c..8a1a7d4d81 100644 --- a/packaging/deb/DEBIAN/preinst +++ b/packaging/deb/DEBIAN/preinst @@ -1,5 +1,10 @@ #!/bin/bash +if [ -f /var/lib/taos/dnode/dnodeCfg.json ]; then + echo -e "The default data directory \033[41;37m/var/lib/taos\033[0m contains old data of tdengine 2.x, please clear it before installing!" + exit 1 +fi + csudo="" if command -v sudo > /dev/null; then csudo="sudo " diff --git a/packaging/deb/DEBIAN/prerm b/packaging/deb/DEBIAN/prerm index 14c814eb83..5676bf5c43 100644 --- a/packaging/deb/DEBIAN/prerm +++ b/packaging/deb/DEBIAN/prerm @@ -1,5 +1,9 @@ #!/bin/bash +if [ $1 -eq "abort-upgrade" ]; then + exit 0 +fi + insmetaPath="/usr/local/taos/script" csudo="" diff --git a/packaging/rpm/tdengine.spec b/packaging/rpm/tdengine.spec index d3d4bab0e6..7a34f7a222 100644 --- a/packaging/rpm/tdengine.spec +++ b/packaging/rpm/tdengine.spec @@ -132,6 +132,10 @@ fi #Scripts executed before installation %pre +if [ -f /var/lib/taos/dnode/dnodeCfg.json ]; then + echo -e "The default data directory \033[41;37m/var/lib/taos\033[0m contains old data of tdengine 2.x, please clear it before installing!" + exit 1 +fi csudo="" if command -v sudo > /dev/null; then csudo="sudo " From 4155a3bef4a3c1ee9f398197f83f004162eeb2c8 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 11 Aug 2022 21:55:20 +0800 Subject: [PATCH 29/52] enh: show command optimize --- source/libs/parser/src/parTranslater.c | 16 +++++----- .../taosbenchmark/auto_create_table_json.py | 4 +-- .../taosdump/taosdumpTestTypeBigInt.py | 2 +- .../taosdump/taosdumpTestTypeBinary.py | 2 +- .../taosdump/taosdumpTestTypeBool.py | 2 +- .../taosdump/taosdumpTestTypeDouble.py | 2 +- .../taosdump/taosdumpTestTypeFloat.py | 2 +- .../taosdump/taosdumpTestTypeInt.py | 2 +- .../taosdump/taosdumpTestTypeJson.py | 2 +- .../taosdump/taosdumpTestTypeSmallInt.py | 2 +- .../taosdump/taosdumpTestTypeTinyInt.py | 2 +- .../taosdumpTestTypeUnsignedBigInt.py | 2 +- .../taosdump/taosdumpTestTypeUnsignedInt.py | 2 +- .../taosdumpTestTypeUnsignedSmallInt.py | 2 +- .../taosdumpTestTypeUnsignedTinyInt.py | 2 +- tests/pytest/alter/alter_cacheLastRow.py | 6 ++-- tests/pytest/alter/alter_create_exception.py | 4 +-- tests/pytest/alter/alter_debugFlag.py | 2 +- tests/pytest/alter/alter_keep.py | 30 +++++++++---------- tests/pytest/alter/db_update_options.py | 10 +++---- tests/pytest/client/alterDatabase.py | 6 ++-- tests/pytest/client/client.py | 2 +- .../cluster/killAndRestartDnodesTest.py | 6 ++-- tests/pytest/cluster/offlineThresholdTest.py | 2 +- tests/pytest/cluster/oneReplicaOfflineTest.py | 2 +- tests/pytest/cluster/stopAllDnodesTest.py | 8 ++--- tests/pytest/cluster/stopTwoDnodesTest.py | 8 ++--- tests/pytest/crash_gen/crash_gen_main.py | 6 ++-- tests/pytest/crash_gen/service_manager.py | 4 +-- tests/pytest/crash_gen/shared/db.py | 4 +-- tests/pytest/dbmgmt/database-name-boundary.py | 4 +-- tests/pytest/dbmgmt/nanoSecondCheck.py | 2 +- tests/pytest/functions/queryTestCases.py | 14 ++++----- tests/pytest/insert/date.py | 6 ++-- tests/pytest/insert/insert_locking.py | 2 +- .../manualTest/TD-5114/continueCreateDn.py | 4 +-- tests/pytest/manualTest/manual_alter_block.py | 4 +-- tests/pytest/manualTest/manual_alter_comp.py | 10 +++---- tests/pytest/perfbenchmark/bug3433.py | 2 +- tests/pytest/query/query1970YearsAf.py | 2 +- tests/pytest/query/queryJoin10tables.py | 2 +- tests/pytest/query/queryStddevWithGroupby.py | 2 +- tests/pytest/query/queryTscomputWithNow.py | 2 +- tests/pytest/query/removeDBAndSTable.py | 4 +-- tests/pytest/restful/restful_bind_db1.py | 4 +-- tests/pytest/restful/restful_bind_db2.py | 4 +-- tests/pytest/stream/test2.py | 2 +- tests/pytest/table/column_num.py | 6 ++-- tests/pytest/table/db_table.py | 4 +-- tests/pytest/tag_lite/3.py | 6 ++-- tests/pytest/tag_lite/4.py | 6 ++-- tests/pytest/tag_lite/5.py | 6 ++-- tests/pytest/tag_lite/6.py | 6 ++-- tests/pytest/tag_lite/add.py | 6 ++-- tests/pytest/tag_lite/bigint.py | 6 ++-- tests/pytest/tag_lite/binary.py | 6 ++-- tests/pytest/tag_lite/binary_binary.py | 6 ++-- tests/pytest/tag_lite/bool.py | 6 ++-- tests/pytest/tag_lite/bool_binary.py | 6 ++-- tests/pytest/tag_lite/bool_int.py | 6 ++-- tests/pytest/tag_lite/change.py | 6 ++-- tests/pytest/tag_lite/column.py | 6 ++-- tests/pytest/tag_lite/commit.py | 6 ++-- tests/pytest/tag_lite/delete.py | 6 ++-- tests/pytest/tag_lite/double.py | 6 ++-- tests/pytest/tag_lite/filter.py | 6 ++-- tests/pytest/tag_lite/float.py | 6 ++-- tests/pytest/tag_lite/int.py | 6 ++-- tests/pytest/tag_lite/int_binary.py | 6 ++-- tests/pytest/tag_lite/int_float.py | 6 ++-- tests/pytest/tag_lite/set.py | 6 ++-- tests/pytest/tag_lite/smallint.py | 6 ++-- tests/pytest/tag_lite/tinyint.py | 6 ++-- tests/pytest/tag_lite/unsignedBigint.py | 6 ++-- tests/pytest/tag_lite/unsignedInt.py | 6 ++-- tests/pytest/tag_lite/unsignedSmallint.py | 6 ++-- tests/pytest/tag_lite/unsignedTinyint.py | 6 ++-- .../pytest/tools/taosdemoTestWithoutMetric.py | 2 +- tests/pytest/tools/taosdumpTest.py | 4 +-- tests/pytest/tools/taosdumpTest2.py | 6 ++-- tests/pytest/tsdb/tsdbCompCluster.py | 2 +- tests/pytest/tsdb/tsdbCompClusterReplica2.py | 2 +- tests/pytest/util/cluster.py | 2 +- tests/pytest/wal/sdbCompCluster.py | 2 +- tests/pytest/wal/sdbCompClusterReplica2.py | 2 +- .../tsim/dnode/drop_dnode_has_qnode_snode.sim | 4 +-- tests/script/tsim/parser/auto_create_tb.sim | 2 +- tests/script/tsim/parser/create_db.sim | 2 +- tests/script/tsim/parser/create_mt.sim | 2 +- tests/script/tsim/parser/create_tb.sim | 2 +- tests/script/tsim/parser/distinct.sim | 2 +- tests/script/tsim/parser/fill_stb.sim | 2 +- tests/script/tsim/parser/fill_us.sim | 2 +- tests/script/tsim/parser/insert_tb.sim | 2 +- tests/script/tsim/parser/nchar.sim | 2 +- tests/script/tsim/parser/precision_ns.sim | 2 +- .../tsim/parser/select_across_vnodes.sim | 2 +- .../tsim/parser/select_distinct_tag.sim | 2 +- tests/script/tsim/parser/stableOp.sim | 2 +- tests/script/tsim/parser/tags_filter.sim | 2 +- tests/script/tsim/qnode/basic1.sim | 12 ++++---- tests/script/tsim/show/basic.sim | 4 +-- tests/script/tsim/stream/session0.sim | 2 +- tests/script/tsim/user/privilege_sysinfo.sim | 2 +- tests/system-test/0-others/cachemodel.py | 6 ++-- tests/system-test/0-others/fsync.py | 28 ++++++++--------- tests/system-test/0-others/taosShell.py | 18 +++++------ tests/system-test/0-others/taosShellError.py | 4 +-- tests/system-test/0-others/taosdlog.py | 4 +-- tests/system-test/0-others/user_control.py | 8 ++--- .../system-test/1-insert/create_retentions.py | 2 +- .../system-test/1-insert/db_tb_name_check.py | 2 +- .../1-insert/insertWithMoreVgroup.py | 2 +- tests/system-test/1-insert/insert_drop.py | 2 +- tests/system-test/1-insert/mutil_stage.py | 4 +-- tests/system-test/1-insert/time_range_wise.py | 2 +- tests/system-test/2-query/check_tsdb.py | 4 +-- tests/system-test/2-query/csum.py | 2 +- tests/system-test/2-query/explain.py | 4 +-- tests/system-test/2-query/function_diff.py | 2 +- tests/system-test/2-query/mavg.py | 2 +- tests/system-test/2-query/qnodeCluster.py | 2 +- tests/system-test/2-query/queryQnode.py | 20 ++++++------- tests/system-test/2-query/sample.py | 2 +- tests/system-test/6-cluster/5dnode1mnode.py | 6 ++-- tests/system-test/6-cluster/5dnode2mnode.py | 4 +-- .../6-cluster/5dnode3mnodeAdd1Ddnoe.py | 4 +-- .../system-test/6-cluster/5dnode3mnodeDrop.py | 4 +-- .../6-cluster/5dnode3mnodeDropInsert.py | 6 ++-- .../6-cluster/5dnode3mnodeRecreateMnode.py | 4 +-- .../5dnode3mnodeRestartDnodeInsertData.py | 4 +-- ...5dnode3mnodeRestartDnodeInsertDataAsync.py | 4 +-- .../5dnode3mnodeSep1VnodeStopDnodeCreateDb.py | 6 ++-- ...5dnode3mnodeSep1VnodeStopDnodeCreateStb.py | 4 +-- ...dnode3mnodeSep1VnodeStopDnodeInsertData.py | 4 +-- .../5dnode3mnodeSep1VnodeStopMnodeCreateDb.py | 6 ++-- ...ode3mnodeSep1VnodeStopMnodeCreateDbRep3.py | 6 ++-- ...5dnode3mnodeSep1VnodeStopMnodeCreateStb.py | 4 +-- .../5dnode3mnodeSep1VnodeStopVnodeCreateDb.py | 6 ++-- ...5dnode3mnodeSep1VnodeStopVnodeCreateStb.py | 4 +-- .../5dnode3mnodeSeperate1VnodeStopInsert.py | 8 ++--- .../system-test/6-cluster/5dnode3mnodeStop.py | 4 +-- .../6-cluster/5dnode3mnodeStop2Follower.py | 4 +-- .../6-cluster/5dnode3mnodeStopConnect.py | 4 +-- .../5dnode3mnodeStopFollowerLeader.py | 4 +-- .../6-cluster/5dnode3mnodeStopInsert.py | 6 ++-- .../6-cluster/5dnode3mnodeStopLoop.py | 4 +-- .../6-cluster/clusterCommonCheck.py | 8 ++--- .../4dnode1mnode_basic_createDb_replica1.py | 2 +- ...4dnode1mnode_basic_replica1_insertdatas.py | 2 +- ...mnode_basic_replica1_insertdatas_querys.py | 2 +- ...4dnode1mnode_basic_replica3_insertdatas.py | 2 +- ...lica3_insertdatas_force_stop_all_dnodes.py | 6 ++-- ...mnode_basic_replica3_insertdatas_querys.py | 2 +- ...sertdatas_querys_loop_restart_all_vnode.py | 6 ++-- ...nsertdatas_querys_loop_restart_follower.py | 6 ++-- ..._insertdatas_querys_loop_restart_leader.py | 6 ++-- ...ic_replica3_insertdatas_stop_all_dnodes.py | 6 ++-- ...replica3_insertdatas_stop_follower_sync.py | 6 ++-- ...plica3_insertdatas_stop_follower_unsync.py | 6 ++-- ...rtdatas_stop_follower_unsync_force_stop.py | 10 +++---- ..._basic_replica3_insertdatas_stop_leader.py | 12 ++++---- ...ca3_insertdatas_stop_leader_forece_stop.py | 8 ++--- ...asic_replica3_mnode3_insertdatas_querys.py | 2 +- ...basic_replica3_querydatas_stop_follower.py | 8 ++--- ...ca3_querydatas_stop_follower_force_stop.py | 8 ++--- ...e_basic_replica3_querydatas_stop_leader.py | 8 ++--- ...lica3_querydatas_stop_leader_force_stop.py | 8 ++--- .../4dnode1mnode_basic_replica3_vgroups.py | 2 +- ...de1mnode_basic_replica3_vgroups_stopOne.py | 10 +++---- tests/system-test/7-tmq/basic5.py | 4 +-- tests/system-test/7-tmq/tmq3mnodeSwitch.py | 2 +- tests/system-test/99-TDcase/TD-15517.py | 2 +- tests/system-test/99-TDcase/TD-15554.py | 4 +-- 174 files changed, 423 insertions(+), 423 deletions(-) diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index cebb8d9b92..e7eff7588e 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -68,49 +68,49 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = { .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_DNODES, .numOfShowCols = 1, - .pShowCols = {"endpoint"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_MNODES_STMT, .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_MNODES, .numOfShowCols = 1, - .pShowCols = {"endpoint"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_MODULES_STMT, .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_MODULES, .numOfShowCols = 1, - .pShowCols = {"endpoint"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_QNODES_STMT, .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_QNODES, .numOfShowCols = 1, - .pShowCols = {"endpoint"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_SNODES_STMT, .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_SNODES, .numOfShowCols = 1, - .pShowCols = {"endpoint"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_BNODES_STMT, .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_BNODES, .numOfShowCols = 1, - .pShowCols = {"endpoint"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_CLUSTER_STMT, .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_CLUSTER, .numOfShowCols = 1, - .pShowCols = {"name"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_DATABASES_STMT, @@ -131,7 +131,7 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = { .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_INDEXES, .numOfShowCols = 1, - .pShowCols = {"index_name"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_STABLES_STMT, diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py index 734f7da974..8509136a34 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/auto_create_table_json.py @@ -111,7 +111,7 @@ class TDTestCase: tdSql.checkData(0, 0, 8) tdSql.query("select count(*) from db.stb2") tdSql.checkData(0, 0, 160) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkData(2, 14, "us") tdSql.execute("reset query cache") @@ -128,7 +128,7 @@ class TDTestCase: tdSql.checkData(0, 0, 8) tdSql.query("select count(*) from db.stb3") tdSql.checkData(0, 0, 160) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkData(2, 14, "ns") tdSql.execute("reset query cache") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBigInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBigInt.py index 82c17a459b..75885edf9f 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBigInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBigInt.py @@ -97,7 +97,7 @@ class TDTestCase: os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBinary.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBinary.py index 4909eb3762..41d4ba128d 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBinary.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBinary.py @@ -85,7 +85,7 @@ class TDTestCase: os.system("%staosdump -i %s" % (binPath, self.tmpdir)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBool.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBool.py index 138f7ba81c..043fb49af3 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBool.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeBool.py @@ -86,7 +86,7 @@ class TDTestCase: os.system("%staosdump -i %s" % (binPath, self.tmpdir)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeDouble.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeDouble.py index 24ebb0fa77..1eaa2bbfff 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeDouble.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeDouble.py @@ -96,7 +96,7 @@ class TDTestCase: os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeFloat.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeFloat.py index 2ce42bb771..4373aa5669 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeFloat.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeFloat.py @@ -96,7 +96,7 @@ class TDTestCase: os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeInt.py index b6a24a6eee..45009a716a 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeInt.py @@ -92,7 +92,7 @@ class TDTestCase: os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeJson.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeJson.py index cf0c7f4ac5..d1c4313c40 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeJson.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeJson.py @@ -92,7 +92,7 @@ class TDTestCase: os.system("%staosdump -i %s -g" % (binPath, self.tmpdir)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py index 2fc1ffb75e..941de25683 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeSmallInt.py @@ -94,7 +94,7 @@ class TDTestCase: os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py index dfc18fcd01..e5392d38fe 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeTinyInt.py @@ -94,7 +94,7 @@ class TDTestCase: os.system("%staosdump -i %s -T 1" % (binPath, self.tmpdir)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py index 1a6e9a69d9..dd8dd5d76d 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedBigInt.py @@ -90,7 +90,7 @@ class TDTestCase: os.system("%staosdump -i %s -T 1 -g" % (binPath, self.tmpdir)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py index e71650bc8a..eacd1bb7dd 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedInt.py @@ -90,7 +90,7 @@ class TDTestCase: os.system("%staosdump -i %s -T 1 -g" % (binPath, self.tmpdir)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py index d05a397c36..ea362ad2b4 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedSmallInt.py @@ -90,7 +90,7 @@ class TDTestCase: os.system("%staosdump -i %s -T 1 -g" % (binPath, self.tmpdir)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.execute("use db") diff --git a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py index 9995d3812b..a3ffc13d62 100644 --- a/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py +++ b/tests/develop-test/5-taos-tools/taosdump/taosdumpTestTypeUnsignedTinyInt.py @@ -90,7 +90,7 @@ class TDTestCase: os.system("%staosdump -i %s -T 1 -g" % (binPath, self.tmpdir)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.execute("use db") diff --git a/tests/pytest/alter/alter_cacheLastRow.py b/tests/pytest/alter/alter_cacheLastRow.py index 3152e46af1..30fd9c8884 100644 --- a/tests/pytest/alter/alter_cacheLastRow.py +++ b/tests/pytest/alter/alter_cacheLastRow.py @@ -41,7 +41,7 @@ class TDTestCase: def run(self): tdSql.prepare() - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,15,0) buildPath = self.getBuildPath() if (buildPath == ""): @@ -68,7 +68,7 @@ class TDTestCase: for i in range(5): #switch lastRow to off and check tdSql.execute('alter database db cachemodel 'none'') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,15,0) #run last_row(*) query 500 times @@ -80,7 +80,7 @@ class TDTestCase: #switch lastRow to on and check tdSql.execute('alter database db cachemodel 'last_row'') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,15,1) #run last_row(*) query 500 times diff --git a/tests/pytest/alter/alter_create_exception.py b/tests/pytest/alter/alter_create_exception.py index d8400c1fa9..91c83470b8 100644 --- a/tests/pytest/alter/alter_create_exception.py +++ b/tests/pytest/alter/alter_create_exception.py @@ -49,7 +49,7 @@ class TDTestCase: tdSql.error('create database db keep "3650"') tdSql.error('create database db wal_fsync_period "3650"') tdSql.execute('create database db precision "us"') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,16,'us') tdSql.execute('drop database if exists db') @@ -79,7 +79,7 @@ class TDTestCase: tdSql.error('alter database db keep ,,60,') tdSql.error('alter database db keep \t') tdSql.execute('alter database db keep \t50') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,7,'50,50,50') def stop(self): diff --git a/tests/pytest/alter/alter_debugFlag.py b/tests/pytest/alter/alter_debugFlag.py index 38d972b582..c17a109c9f 100644 --- a/tests/pytest/alter/alter_debugFlag.py +++ b/tests/pytest/alter/alter_debugFlag.py @@ -37,7 +37,7 @@ class TDTestCase: if randomFlag != 131 and randomFlag != 135 and randomFlag != 143: tdSql.error("alter local %s %d" % (flag, randomFlag)) - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") dnodeId = tdSql.getData(0, 0) for flag in flagList: diff --git a/tests/pytest/alter/alter_keep.py b/tests/pytest/alter/alter_keep.py index b23f364fc6..5f7843ec98 100644 --- a/tests/pytest/alter/alter_keep.py +++ b/tests/pytest/alter/alter_keep.py @@ -27,12 +27,12 @@ class TDTestCase: tdLog.notice('running Keep Test, Community Version') tdLog.notice('running parameter test for keep during create') #testing keep parameter during create - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,7,'3650') tdSql.execute('drop database db') tdSql.execute('create database db keep 100') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,7,'100') tdSql.execute('drop database db') @@ -47,7 +47,7 @@ class TDTestCase: tdLog.notice('running parameter test for keep during alter') tdSql.execute('alter database db keep 100') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,7,'100') tdSql.error('alter database db keep ') @@ -55,7 +55,7 @@ class TDTestCase: tdSql.error('alter database db keep 10,20') tdSql.error('alter database db keep 10,20,30') tdSql.error('alter database db keep 20,30,40,50') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,7,'100') def alterKeepEnterprise(self): @@ -63,22 +63,22 @@ class TDTestCase: #testing keep parameter during create tdLog.notice('running parameter test for keep during create') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,7,'3650,3650,3650') tdSql.execute('drop database db') tdSql.execute('create database db keep 100') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,7,'100,100,100') tdSql.execute('drop database db') tdSql.execute('create database db keep 20, 30') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,7,'20,30,30') tdSql.execute('drop database db') tdSql.execute('create database db keep 30,40,50') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,7,'30,40,50') tdSql.execute('drop database db') @@ -95,15 +95,15 @@ class TDTestCase: tdLog.notice('running parameter test for keep during alter') tdSql.execute('alter database db keep 10') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,7,'10,10,10') tdSql.execute('alter database db keep 20,30') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,7,'20,30,30') tdSql.execute('alter database db keep 100,200,300') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,7,'100,200,300') tdSql.error('alter database db keep ') @@ -113,7 +113,7 @@ class TDTestCase: tdSql.error('alter database db keep 100,40,50') tdSql.error('alter database db keep 20,100,50') tdSql.error('alter database db keep 50,60,20') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,7,'100,200,300') @@ -148,7 +148,7 @@ class TDTestCase: #test case for TD-4459 and TD-4445 tdLog.notice('testing keep will be altered changing from small to big') tdSql.execute('alter database db keep 40,40,40') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,7,'40,40,40') tdSql.error('insert into tb values (now-60d, 10)') tdSql.execute('insert into tb values (now-30d, 10)') @@ -160,7 +160,7 @@ class TDTestCase: rowNum += 1 tdSql.execute('alter database db keep 20,20,20') tdSql.execute('alter database db keep 40,40,40') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,7,'40,40,40') tdSql.error('insert into tb values (now-60d, 10)') tdSql.execute('insert into tb values (now-30d, 10)') @@ -169,7 +169,7 @@ class TDTestCase: tdLog.notice('testing keep will be altered changing from big to small') tdSql.execute('alter database db keep 10,10,10') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,7,'10,10,10') tdSql.error('insert into tb values (now-15d, 10)') tdSql.query('select * from tb') diff --git a/tests/pytest/alter/db_update_options.py b/tests/pytest/alter/db_update_options.py index 224e0f25b0..f8116722b4 100644 --- a/tests/pytest/alter/db_update_options.py +++ b/tests/pytest/alter/db_update_options.py @@ -21,7 +21,7 @@ class TDTestCase: # check default update value sql = "create database if not exists db" tdSql.execute(sql) - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkRows(1) tdSql.checkData(0,16,0) @@ -29,14 +29,14 @@ class TDTestCase: # check update value tdSql.execute(sql) - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkRows(1) tdSql.checkData(0,16,1) sql = "alter database db update 0" tdSql.execute(sql) - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkRows(1) tdSql.checkData(0,16,0) @@ -46,7 +46,7 @@ class TDTestCase: sql = "alter database db update 100" tdSql.error(sql) - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkRows(1) tdSql.checkData(0,16,0) @@ -56,7 +56,7 @@ class TDTestCase: tdSql.execute('create database db update 1') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkRows(1) tdSql.checkData(0,16,1) diff --git a/tests/pytest/client/alterDatabase.py b/tests/pytest/client/alterDatabase.py index bc8c4fc17e..1ac1bcbdcd 100644 --- a/tests/pytest/client/alterDatabase.py +++ b/tests/pytest/client/alterDatabase.py @@ -29,18 +29,18 @@ class TDTestCase: tdSql.checkData(0, 0, "db") tdSql.execute("alter database db comp 2") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkData(0, 14, 2) tdSql.execute("alter database db keep 365,365,365") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkData(0, 7, "365,365,365") tdSql.error("alter database db quorum 2") tdSql.execute("alter database db blocks 100") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkData(0, 9, 100) diff --git a/tests/pytest/client/client.py b/tests/pytest/client/client.py index 6cfb1252bd..0d7ace10b2 100644 --- a/tests/pytest/client/client.py +++ b/tests/pytest/client/client.py @@ -37,7 +37,7 @@ class TDTestCase: time.sleep(1) - ret = tdSql.query('show dnodes') + ret = tdSql.query('select * from information_schema.ins_dnodes') dnodeId = tdSql.getData(0, 0); dnodeEndpoint = tdSql.getData(0, 1); diff --git a/tests/pytest/cluster/killAndRestartDnodesTest.py b/tests/pytest/cluster/killAndRestartDnodesTest.py index be927e862f..d0236c0f71 100644 --- a/tests/pytest/cluster/killAndRestartDnodesTest.py +++ b/tests/pytest/cluster/killAndRestartDnodesTest.py @@ -30,7 +30,7 @@ class ClusterTestcase: tdSql.init(ctest.conn.cursor(), False) nodes.node1.stopTaosd() - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") tdSql.checkRows(3) tdSql.checkData(0, 4, "offline") tdSql.checkData(1, 4, "ready") @@ -43,7 +43,7 @@ class ClusterTestcase: tdSql.checkData(2, 4, "ready") nodes.node2.stopTaosd() - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") tdSql.checkRows(3) tdSql.checkData(0, 4, "ready") tdSql.checkData(1, 4, "offline") @@ -56,7 +56,7 @@ class ClusterTestcase: tdSql.checkData(2, 4, "ready") nodes.node3.stopTaosd() - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") tdSql.checkRows(3) tdSql.checkData(0, 4, "ready") tdSql.checkData(1, 4, "ready") diff --git a/tests/pytest/cluster/offlineThresholdTest.py b/tests/pytest/cluster/offlineThresholdTest.py index 8373424f93..50cf18fcfe 100644 --- a/tests/pytest/cluster/offlineThresholdTest.py +++ b/tests/pytest/cluster/offlineThresholdTest.py @@ -33,7 +33,7 @@ class ClusterTestcase: nodes.node3.stopTaosd() tdLog.sleep(10) - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") tdSql.checkRows(3) tdSql.checkData(2, 4, "offline") diff --git a/tests/pytest/cluster/oneReplicaOfflineTest.py b/tests/pytest/cluster/oneReplicaOfflineTest.py index 0223dfe01a..135abcc294 100644 --- a/tests/pytest/cluster/oneReplicaOfflineTest.py +++ b/tests/pytest/cluster/oneReplicaOfflineTest.py @@ -55,7 +55,7 @@ class ClusterTestcase: tdSql.execute("drop database %s" % ctest.dbName) nodes.node2.startTaosd() - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(0) tdSql.close() diff --git a/tests/pytest/cluster/stopAllDnodesTest.py b/tests/pytest/cluster/stopAllDnodesTest.py index a71ae52e3d..3c9807a24e 100644 --- a/tests/pytest/cluster/stopAllDnodesTest.py +++ b/tests/pytest/cluster/stopAllDnodesTest.py @@ -26,19 +26,19 @@ class ClusterTestcase: ctest = ClusterTest(nodes.node1.hostName) tdSql.init(ctest.conn.cursor(), False) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") count = tdSql.queryRows; nodes.stopAllTaosd() nodes.node1.startTaosd() - tdSql.error("show databases") + tdSql.error("select * from information_schema.ins_databases") nodes.node2.startTaosd() - tdSql.error("show databases") + tdSql.error("select * from information_schema.ins_databases") nodes.node3.startTaosd() tdLog.sleep(10) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(count) ct = ClusterTestcase() diff --git a/tests/pytest/cluster/stopTwoDnodesTest.py b/tests/pytest/cluster/stopTwoDnodesTest.py index 9e9958e2d3..2b14fcbc40 100644 --- a/tests/pytest/cluster/stopTwoDnodesTest.py +++ b/tests/pytest/cluster/stopTwoDnodesTest.py @@ -29,19 +29,19 @@ class ClusterTestcase: ctest.run() tdSql.init(ctest.conn.cursor(), False) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") count = tdSql.queryRows; tdSql.execute("use %s" % ctest.dbName) tdSql.execute("alter database %s replica 3" % ctest.dbName) nodes.node2.stopTaosd() nodes.node3.stopTaosd() - tdSql.error("show databases") + tdSql.error("select * from information_schema.ins_databases") nodes.node2.startTaosd() - tdSql.error("show databases") + tdSql.error("select * from information_schema.ins_databases") nodes.node3.startTaosd() - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(count) ct = ClusterTestcase() diff --git a/tests/pytest/crash_gen/crash_gen_main.py b/tests/pytest/crash_gen/crash_gen_main.py index 2fa99230bc..203541f14a 100755 --- a/tests/pytest/crash_gen/crash_gen_main.py +++ b/tests/pytest/crash_gen/crash_gen_main.py @@ -996,7 +996,7 @@ class StateMechine: return # do nothing # this should show up in the server log, separating steps - dbc.execute("show dnodes") + dbc.execute("select * from information_schema.ins_dnodes") # Generic Checks, first based on the start state if not Config.getConfig().ignore_errors: # verify state, only if we are asked not to ignore certain errors. @@ -2042,7 +2042,7 @@ class TaskRestartService(StateTransitionTask): if Dice.throw(self.CHANCE_TO_RESTART_SERVICE) == 0: # 1 in N chance dbc = wt.getDbConn() - dbc.execute("show databases") # simple delay, align timing with other workers + dbc.execute("select * from information_schema.ins_databases") # simple delay, align timing with other workers gSvcMgr.restart() self._isRunning = False @@ -2335,7 +2335,7 @@ class ClientManager: # def _printLastNumbers(self): # to verify data durability # dbManager = DbManager() # dbc = dbManager.getDbConn() - # if dbc.query("show databases") <= 1: # no database (we have a default called "log") + # if dbc.query("select * from information_schema.ins_databases") <= 1: # no database (we have a default called "log") # return # dbc.execute("use db") # if dbc.query("show tables") == 0: # no tables diff --git a/tests/pytest/crash_gen/service_manager.py b/tests/pytest/crash_gen/service_manager.py index c0cfd33123..b19c079544 100644 --- a/tests/pytest/crash_gen/service_manager.py +++ b/tests/pytest/crash_gen/service_manager.py @@ -185,7 +185,7 @@ quorum 2 return ["exec " + self.getExecFile(), '-c', self.getCfgDir()] # used in subproce.Popen() def _getDnodes(self, dbc): - dbc.query("show dnodes") + dbc.query("select * from information_schema.ins_dnodes") cols = dbc.getQueryResult() # id,end_point,vnodes,cores,status,role,create_time,offline reason return {c[1]:c[4] for c in cols} # {'xxx:6030':'ready', 'xxx:6130':'ready'} @@ -768,7 +768,7 @@ class ServiceManagerThread: def _verifyDnode(self, tInst: TdeInstance): dbc = DbConn.createNative(tInst.getDbTarget()) dbc.open() - dbc.query("show dnodes") + dbc.query("select * from information_schema.ins_dnodes") # dbc.query("DESCRIBE {}.{}".format(dbName, self._stName)) cols = dbc.getQueryResult() # id,end_point,vnodes,cores,status,role,create_time,offline reason # ret = {row[0]:row[1] for row in stCols if row[3]=='TAG'} # name:type diff --git a/tests/pytest/crash_gen/shared/db.py b/tests/pytest/crash_gen/shared/db.py index 6da0216d95..60c830f4f7 100644 --- a/tests/pytest/crash_gen/shared/db.py +++ b/tests/pytest/crash_gen/shared/db.py @@ -114,7 +114,7 @@ class DbConn: def existsDatabase(self, dbName: str): ''' Check if a certain database exists ''' - self.query("show databases") + self.query("select * from information_schema.ins_databases") dbs = [v[0] for v in self.getQueryResult()] # ref: https://stackoverflow.com/questions/643823/python-list-transformation # ret2 = dbName in dbs # print("dbs = {}, str = {}, ret2={}, type2={}".format(dbs, dbName,ret2, type(dbName))) @@ -157,7 +157,7 @@ class DbConn: def getResultCols(self): raise RuntimeError("Unexpected execution, should be overriden") -# Sample: curl -u root:taosdata -d "show databases" localhost:6020/rest/sql +# Sample: curl -u root:taosdata -d "select * from information_schema.ins_databases" localhost:6020/rest/sql class DbConnRest(DbConn): diff --git a/tests/pytest/dbmgmt/database-name-boundary.py b/tests/pytest/dbmgmt/database-name-boundary.py index df3b027ba7..6802cb00b7 100644 --- a/tests/pytest/dbmgmt/database-name-boundary.py +++ b/tests/pytest/dbmgmt/database-name-boundary.py @@ -47,7 +47,7 @@ class TDTestCase: tdLog.info('create database %s' % db_name) tdSql.execute('create database %s' % db_name) - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkRows(1) tdSql.checkData(0, 0, db_name.lower()) @@ -57,7 +57,7 @@ class TDTestCase: tdLog.info('create database %s' % db_name) tdSql.execute('create database %s' % db_name) - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkRows(2) tdSql.checkData(0, 0, db_name.lower()) diff --git a/tests/pytest/dbmgmt/nanoSecondCheck.py b/tests/pytest/dbmgmt/nanoSecondCheck.py index a5e9adacee..ef49be1103 100644 --- a/tests/pytest/dbmgmt/nanoSecondCheck.py +++ b/tests/pytest/dbmgmt/nanoSecondCheck.py @@ -32,7 +32,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') tdSql.execute('create database db precision "ns";') - tdSql.query('show databases;') + tdSql.query('select * from information_schema.ins_databases;') tdSql.checkData(0,16,'ns') tdSql.execute('use db') diff --git a/tests/pytest/functions/queryTestCases.py b/tests/pytest/functions/queryTestCases.py index 96de8f064c..b1e8d838c9 100644 --- a/tests/pytest/functions/queryTestCases.py +++ b/tests/pytest/functions/queryTestCases.py @@ -68,7 +68,7 @@ class TDTestCase: tdSql.query("show variables") tdSql.checkData(26, 1, -1) - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) @@ -269,7 +269,7 @@ class TDTestCase: tdSql.execute("create database if not exists db") tdSql.query("show variables") tdSql.checkData(38, 1, 3650) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkData(0,7,"3650,3650,3650") days = tdSql.getData(0, 6) @@ -288,12 +288,12 @@ class TDTestCase: tdSql.error("alter database db keep0 36500") tdSql.execute("alter database db keep 36500") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkData(0, 7, "3650,3650,36500") tdSql.execute("drop database if exists db") tdSql.execute("create database if not exists db1") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkData(0, 7, "3650,3650,3650") tdSql.query("show variables") tdSql.checkData(38, 1, 3650) @@ -311,7 +311,7 @@ class TDTestCase: maxTablesPerVnode = 10 maxVgroupsPerDb = 100 - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) @@ -334,7 +334,7 @@ class TDTestCase: for i in range(100): tdSql.execute(f"create table db.t1{i} using db.stb1 tags({i})") insert_sql += f" t1{i} values({1604298064000 + i*1000}, {i})" - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") vnode_count = tdSql.getData(0, 2) if vnode_count <= 1: tdLog.exit("vnode is less than 2") @@ -443,7 +443,7 @@ class TDTestCase: # f50, f51, f52, f53 = tdSql.getData(0,1), tdSql.getData(0,2), tdSql.getData(0,3), tdSql.getData(0,4) # 关闭服务并获取未开启压缩情况下的数据容量 - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) diff --git a/tests/pytest/insert/date.py b/tests/pytest/insert/date.py index 6e22e5b72e..d4f1176f61 100644 --- a/tests/pytest/insert/date.py +++ b/tests/pytest/insert/date.py @@ -174,9 +174,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/insert/insert_locking.py b/tests/pytest/insert/insert_locking.py index 0d780a7132..dc320edd1f 100644 --- a/tests/pytest/insert/insert_locking.py +++ b/tests/pytest/insert/insert_locking.py @@ -33,7 +33,7 @@ class TDTestCase: tdLog.info("\n\n----------step1 : drop db and create db----------\n") tdSql.execute('''drop database if exists db ;''') tdSql.execute('''create database db ;''') - sql = '''show databases;''' + sql = '''select * from information_schema.ins_databases;''' tdSql.query(sql) tdSql.checkRows(1) diff --git a/tests/pytest/manualTest/TD-5114/continueCreateDn.py b/tests/pytest/manualTest/TD-5114/continueCreateDn.py index 9494ee5f36..af232cdb3f 100644 --- a/tests/pytest/manualTest/TD-5114/continueCreateDn.py +++ b/tests/pytest/manualTest/TD-5114/continueCreateDn.py @@ -46,7 +46,7 @@ class TwoClients: for i in range(10): os.system("taosdemo -f manualTest/TD-5114/insertDataDb3Replica2.json -y ") # # check data correct - tdSql.execute("show databases") + tdSql.execute("select * from information_schema.ins_databases") tdSql.execute("use db3") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 20000) @@ -78,7 +78,7 @@ class TwoClients: # % (j, self.ts + i*1000, i + 1, i + 1, i + 1, i + 1, i + 1, i + 0.1, i + 0.1, i % 2, i + 1, i + 1, i + 1, i + 1, i + 1, i + 1)) # # check data correct - # tdSql.execute("show databases") + # tdSql.execute("select * from information_schema.ins_databases") # tdSql.execute("use db3") # tdSql.query("select count (tbname) from test") # tdSql.checkData(0, 0, 200) diff --git a/tests/pytest/manualTest/manual_alter_block.py b/tests/pytest/manualTest/manual_alter_block.py index ccd98b1421..540dfa978a 100644 --- a/tests/pytest/manualTest/manual_alter_block.py +++ b/tests/pytest/manualTest/manual_alter_block.py @@ -51,7 +51,7 @@ class TDTestCase: #alter cache block to 3, then check alter tdSql.execute('alter database db blocks 3') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,9,3) #run taosdemo to occupy all cache, need to manually check memory consumption @@ -60,7 +60,7 @@ class TDTestCase: #alter cache block to 8, then check alter tdSql.execute('alter database db blocks 8') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,9,8) #run taosdemo to occupy all cache, need to manually check memory consumption diff --git a/tests/pytest/manualTest/manual_alter_comp.py b/tests/pytest/manualTest/manual_alter_comp.py index 6c3e0fc296..cc8b2a277b 100644 --- a/tests/pytest/manualTest/manual_alter_comp.py +++ b/tests/pytest/manualTest/manual_alter_comp.py @@ -71,7 +71,7 @@ class TDTestCase: #comp is at 14 #check disk usage when comp=2 - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.execute('alter database db blocks 3') # minimize the data in cache tdSql.checkData(0,14,2) os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath) @@ -86,10 +86,10 @@ class TDTestCase: #check disk usage when comp=0 tdSql.prepare() - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,14,2) tdSql.execute('alter database db comp 0') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,14,0) os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath) print("default location is at /home/bryan/Documents/Github/TDengine/sim/dnode1/data") @@ -103,10 +103,10 @@ class TDTestCase: #check disk usage when comp=1 tdSql.prepare() - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,14,2) tdSql.execute('alter database db comp 1') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkData(0,14,1) os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath) print("default location is at /home/bryan/Documents/Github/TDengine/sim/dnode1/data") diff --git a/tests/pytest/perfbenchmark/bug3433.py b/tests/pytest/perfbenchmark/bug3433.py index 3e7de39bed..a60e077453 100644 --- a/tests/pytest/perfbenchmark/bug3433.py +++ b/tests/pytest/perfbenchmark/bug3433.py @@ -224,7 +224,7 @@ class TDTestCase: self.inserttable(file_create_table) tdLog.printNoPrefix("==========step2:check database and stable records") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkData(0, 2, 2000) tdSql.execute("use db") tdSql.query("show stables") diff --git a/tests/pytest/query/query1970YearsAf.py b/tests/pytest/query/query1970YearsAf.py index e7e9fa5329..7ecb02bfc8 100644 --- a/tests/pytest/query/query1970YearsAf.py +++ b/tests/pytest/query/query1970YearsAf.py @@ -235,7 +235,7 @@ class TDTestCase: self.sqlsquery() # after wal and sync, check again - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/pytest/query/queryJoin10tables.py b/tests/pytest/query/queryJoin10tables.py index 01a7397d44..796edcb9d9 100644 --- a/tests/pytest/query/queryJoin10tables.py +++ b/tests/pytest/query/queryJoin10tables.py @@ -184,7 +184,7 @@ class TDTestCase: self.queryjointable() # after wal and sync, check again - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/pytest/query/queryStddevWithGroupby.py b/tests/pytest/query/queryStddevWithGroupby.py index aee88ca9c5..e446d4b187 100644 --- a/tests/pytest/query/queryStddevWithGroupby.py +++ b/tests/pytest/query/queryStddevWithGroupby.py @@ -54,7 +54,7 @@ class TDTestCase: self.querysqls() tdLog.printNoPrefix("==========step3:after wal,check again") - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/pytest/query/queryTscomputWithNow.py b/tests/pytest/query/queryTscomputWithNow.py index 3b808d551c..c7974268ae 100644 --- a/tests/pytest/query/queryTscomputWithNow.py +++ b/tests/pytest/query/queryTscomputWithNow.py @@ -155,7 +155,7 @@ class TDTestCase: self.inertnow() self.querynow() - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/pytest/query/removeDBAndSTable.py b/tests/pytest/query/removeDBAndSTable.py index 4616c7e378..f27e2b8231 100644 --- a/tests/pytest/query/removeDBAndSTable.py +++ b/tests/pytest/query/removeDBAndSTable.py @@ -50,14 +50,14 @@ class TDTestCase: tdSql.checkData(0, 0, "st_vplu") tdSql.execute("drop database db") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.checkData(0, 0, "db_vplu") tdDnodes.stopAll() tdDnodes.start(1) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(1) tdSql.checkData(0, 0, "db_vplu") diff --git a/tests/pytest/restful/restful_bind_db1.py b/tests/pytest/restful/restful_bind_db1.py index 9620535fd7..e44df14d0e 100644 --- a/tests/pytest/restful/restful_bind_db1.py +++ b/tests/pytest/restful/restful_bind_db1.py @@ -75,10 +75,10 @@ class TDTestCase(): # test with no bind databases - sqls = ["show databases;", + sqls = ["select * from information_schema.ins_databases;", "use test", "show tables;", - "show dnodes;", + "select * from information_schema.ins_dnodes;", "show vgroups;", "create database db;", "drop database db;", diff --git a/tests/pytest/restful/restful_bind_db2.py b/tests/pytest/restful/restful_bind_db2.py index 35aa1408a7..cfe7bb2f42 100644 --- a/tests/pytest/restful/restful_bind_db2.py +++ b/tests/pytest/restful/restful_bind_db2.py @@ -60,10 +60,10 @@ class TDTestCase(): # test with no bind databases - sqls = ["show databases;", + sqls = ["select * from information_schema.ins_databases;", "use test", "show tables;", - "show dnodes;", + "select * from information_schema.ins_dnodes;", "show vgroups;", "create database db;", "drop database db;", diff --git a/tests/pytest/stream/test2.py b/tests/pytest/stream/test2.py index e6044662e9..4cd33bf569 100644 --- a/tests/pytest/stream/test2.py +++ b/tests/pytest/stream/test2.py @@ -14,7 +14,7 @@ class TDTestCase: #for i in range(100): tdSql.prepare() dbname = tdCom.getLongName(10, "letters") - tdSql.execute('show databases') + tdSql.execute('select * from information_schema.ins_databases') tdSql.execute('drop database if exists ttxkbrzmpo') tdSql.execute('create database if not exists ttxkbrzmpo vgroups 1') tdSql.execute('use ttxkbrzmpo') diff --git a/tests/pytest/table/column_num.py b/tests/pytest/table/column_num.py index 3abedb083c..47c866f50e 100644 --- a/tests/pytest/table/column_num.py +++ b/tests/pytest/table/column_num.py @@ -104,9 +104,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/table/db_table.py b/tests/pytest/table/db_table.py index 5ead829e26..0c9460837b 100644 --- a/tests/pytest/table/db_table.py +++ b/tests/pytest/table/db_table.py @@ -34,8 +34,8 @@ class TDTestCase: tdLog.info('=============== step6') tdLog.info('drop database db') tdSql.execute('drop database db') - tdLog.info('show databases') - tdSql.query('show databases') + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) # convert end diff --git a/tests/pytest/tag_lite/3.py b/tests/pytest/tag_lite/3.py index bbdf0868fa..c3acf336f2 100644 --- a/tests/pytest/tag_lite/3.py +++ b/tests/pytest/tag_lite/3.py @@ -1311,9 +1311,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/4.py b/tests/pytest/tag_lite/4.py index df81dd8100..ef1a401f46 100644 --- a/tests/pytest/tag_lite/4.py +++ b/tests/pytest/tag_lite/4.py @@ -1855,9 +1855,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/5.py b/tests/pytest/tag_lite/5.py index 28c8fc125a..d9b3eb9487 100644 --- a/tests/pytest/tag_lite/5.py +++ b/tests/pytest/tag_lite/5.py @@ -2283,9 +2283,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/6.py b/tests/pytest/tag_lite/6.py index 5cf43f1047..63bf233c22 100644 --- a/tests/pytest/tag_lite/6.py +++ b/tests/pytest/tag_lite/6.py @@ -2731,9 +2731,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/add.py b/tests/pytest/tag_lite/add.py index eb52e9cb9b..29ad187ca6 100644 --- a/tests/pytest/tag_lite/add.py +++ b/tests/pytest/tag_lite/add.py @@ -2055,9 +2055,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('sql drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/bigint.py b/tests/pytest/tag_lite/bigint.py index 733d30983d..7226cb50bc 100644 --- a/tests/pytest/tag_lite/bigint.py +++ b/tests/pytest/tag_lite/bigint.py @@ -561,9 +561,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/binary.py b/tests/pytest/tag_lite/binary.py index 3825c6637f..f1c3445a96 100644 --- a/tests/pytest/tag_lite/binary.py +++ b/tests/pytest/tag_lite/binary.py @@ -565,9 +565,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/binary_binary.py b/tests/pytest/tag_lite/binary_binary.py index 2a76238f59..af1b36be54 100644 --- a/tests/pytest/tag_lite/binary_binary.py +++ b/tests/pytest/tag_lite/binary_binary.py @@ -776,9 +776,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/bool.py b/tests/pytest/tag_lite/bool.py index 11ce9eb7f8..894f5ad2c5 100644 --- a/tests/pytest/tag_lite/bool.py +++ b/tests/pytest/tag_lite/bool.py @@ -560,9 +560,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/bool_binary.py b/tests/pytest/tag_lite/bool_binary.py index 934d91c908..437f4c0b6d 100644 --- a/tests/pytest/tag_lite/bool_binary.py +++ b/tests/pytest/tag_lite/bool_binary.py @@ -770,9 +770,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/bool_int.py b/tests/pytest/tag_lite/bool_int.py index 1e857192ed..ea83b8b34c 100644 --- a/tests/pytest/tag_lite/bool_int.py +++ b/tests/pytest/tag_lite/bool_int.py @@ -802,9 +802,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/change.py b/tests/pytest/tag_lite/change.py index b8ddc3ff87..10482b21e1 100644 --- a/tests/pytest/tag_lite/change.py +++ b/tests/pytest/tag_lite/change.py @@ -924,9 +924,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/column.py b/tests/pytest/tag_lite/column.py index f82f83c356..c08f478ae8 100644 --- a/tests/pytest/tag_lite/column.py +++ b/tests/pytest/tag_lite/column.py @@ -176,9 +176,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/commit.py b/tests/pytest/tag_lite/commit.py index 8b69d4aa5f..8807dd83c6 100644 --- a/tests/pytest/tag_lite/commit.py +++ b/tests/pytest/tag_lite/commit.py @@ -2300,9 +2300,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/delete.py b/tests/pytest/tag_lite/delete.py index 5e82a96bf4..fe21719777 100644 --- a/tests/pytest/tag_lite/delete.py +++ b/tests/pytest/tag_lite/delete.py @@ -1697,9 +1697,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/double.py b/tests/pytest/tag_lite/double.py index c9d3a5af9e..9f9fea3a65 100644 --- a/tests/pytest/tag_lite/double.py +++ b/tests/pytest/tag_lite/double.py @@ -561,9 +561,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/filter.py b/tests/pytest/tag_lite/filter.py index aeb13a1715..5713074612 100644 --- a/tests/pytest/tag_lite/filter.py +++ b/tests/pytest/tag_lite/filter.py @@ -351,9 +351,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/float.py b/tests/pytest/tag_lite/float.py index 589df89ab9..7e841a52b0 100644 --- a/tests/pytest/tag_lite/float.py +++ b/tests/pytest/tag_lite/float.py @@ -561,9 +561,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/int.py b/tests/pytest/tag_lite/int.py index 1297d083a0..72e06c3d8c 100644 --- a/tests/pytest/tag_lite/int.py +++ b/tests/pytest/tag_lite/int.py @@ -560,9 +560,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/int_binary.py b/tests/pytest/tag_lite/int_binary.py index 6ce9a9a431..d702a3fca1 100644 --- a/tests/pytest/tag_lite/int_binary.py +++ b/tests/pytest/tag_lite/int_binary.py @@ -768,9 +768,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/int_float.py b/tests/pytest/tag_lite/int_float.py index 341acfd5ae..e1ea9b10b6 100644 --- a/tests/pytest/tag_lite/int_float.py +++ b/tests/pytest/tag_lite/int_float.py @@ -804,9 +804,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/set.py b/tests/pytest/tag_lite/set.py index 1e3cdfaa93..f1029f5a77 100644 --- a/tests/pytest/tag_lite/set.py +++ b/tests/pytest/tag_lite/set.py @@ -875,9 +875,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/smallint.py b/tests/pytest/tag_lite/smallint.py index 93fde22ca9..1bd08429a9 100644 --- a/tests/pytest/tag_lite/smallint.py +++ b/tests/pytest/tag_lite/smallint.py @@ -561,9 +561,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/tinyint.py b/tests/pytest/tag_lite/tinyint.py index fc4af4ee96..9d4f4f08bb 100644 --- a/tests/pytest/tag_lite/tinyint.py +++ b/tests/pytest/tag_lite/tinyint.py @@ -561,9 +561,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/unsignedBigint.py b/tests/pytest/tag_lite/unsignedBigint.py index 6a33812f88..eed5f00614 100644 --- a/tests/pytest/tag_lite/unsignedBigint.py +++ b/tests/pytest/tag_lite/unsignedBigint.py @@ -561,9 +561,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/unsignedInt.py b/tests/pytest/tag_lite/unsignedInt.py index 6e741d351a..8c6ae156ee 100644 --- a/tests/pytest/tag_lite/unsignedInt.py +++ b/tests/pytest/tag_lite/unsignedInt.py @@ -562,9 +562,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/unsignedSmallint.py b/tests/pytest/tag_lite/unsignedSmallint.py index 21c390d9dc..0ac921823e 100644 --- a/tests/pytest/tag_lite/unsignedSmallint.py +++ b/tests/pytest/tag_lite/unsignedSmallint.py @@ -561,9 +561,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tag_lite/unsignedTinyint.py b/tests/pytest/tag_lite/unsignedTinyint.py index 7ce3a83984..a4a6ccf527 100644 --- a/tests/pytest/tag_lite/unsignedTinyint.py +++ b/tests/pytest/tag_lite/unsignedTinyint.py @@ -561,9 +561,9 @@ class TDTestCase: # TSIM: sql drop database $db tdLog.info('drop database db') tdSql.execute('drop database db') - # TSIM: sql show databases - tdLog.info('show databases') - tdSql.query('show databases') + # TSIM: sql select * from information_schema.ins_databases + tdLog.info('select * from information_schema.ins_databases') + tdSql.query('select * from information_schema.ins_databases') # TSIM: if $rows != 0 then tdLog.info('tdSql.checkRow(0)') tdSql.checkRows(0) diff --git a/tests/pytest/tools/taosdemoTestWithoutMetric.py b/tests/pytest/tools/taosdemoTestWithoutMetric.py index 01e19355d9..0f10197180 100644 --- a/tests/pytest/tools/taosdemoTestWithoutMetric.py +++ b/tests/pytest/tools/taosdemoTestWithoutMetric.py @@ -53,7 +53,7 @@ class TDTestCase: os.system("%staosdemo -N -y -t %d -n %d" % (binPath, self.numberOfTables, self.numberOfRecords)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(18): print(tdSql.getData(0, i) ) tdSql.checkData(0, 2, self.numberOfTables) diff --git a/tests/pytest/tools/taosdumpTest.py b/tests/pytest/tools/taosdumpTest.py index d23e2f79af..4bfb7d5ba3 100644 --- a/tests/pytest/tools/taosdumpTest.py +++ b/tests/pytest/tools/taosdumpTest.py @@ -99,14 +99,14 @@ class TDTestCase: tdSql.execute("drop database db") tdSql.execute("drop database db1") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(2) os.system("%s -i ./taosdumptest/tmp1" % binPath) os.system("%s -i ./taosdumptest/tmp2" % binPath) tdSql.execute("use db") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(4) dbresult = tdSql.queryResult # 6--duration,7--keep0,keep1,keep diff --git a/tests/pytest/tools/taosdumpTest2.py b/tests/pytest/tools/taosdumpTest2.py index f611623241..a8117ec04c 100644 --- a/tests/pytest/tools/taosdumpTest2.py +++ b/tests/pytest/tools/taosdumpTest2.py @@ -81,12 +81,12 @@ class TDTestCase: binPath) tdSql.execute("drop database db") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(2) os.system("%s -i ./taosdumptest/tmp" % binPath) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(3) tdSql.checkData(2, 0, 'db') @@ -115,7 +115,7 @@ class TDTestCase: os.system("%s -D test -o ./taosdumptest/tmp -y" % binPath) tdSql.execute("drop database test") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.checkRows(3) os.system("%s -i ./taosdumptest/tmp -y" % binPath) diff --git a/tests/pytest/tsdb/tsdbCompCluster.py b/tests/pytest/tsdb/tsdbCompCluster.py index 3df4c9a9d4..aca4d0e9ce 100644 --- a/tests/pytest/tsdb/tsdbCompCluster.py +++ b/tests/pytest/tsdb/tsdbCompCluster.py @@ -131,7 +131,7 @@ class TwoClients: # check data correct - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.execute("use db2") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 1) diff --git a/tests/pytest/tsdb/tsdbCompClusterReplica2.py b/tests/pytest/tsdb/tsdbCompClusterReplica2.py index cfda271497..32fbfd4f37 100644 --- a/tests/pytest/tsdb/tsdbCompClusterReplica2.py +++ b/tests/pytest/tsdb/tsdbCompClusterReplica2.py @@ -142,7 +142,7 @@ class TwoClients: tdSql.init(cur2, True) # check data correct - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdSql.execute("use db2") tdSql.query("select count (tbname) from stb0") tdSql.checkData(0, 0, 1) diff --git a/tests/pytest/util/cluster.py b/tests/pytest/util/cluster.py index e892e1cc02..2b9af8de25 100644 --- a/tests/pytest/util/cluster.py +++ b/tests/pytest/util/cluster.py @@ -72,7 +72,7 @@ class ConfigureyCluster: tdSql.init(conn.cursor()) count=0 while count < 5: - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") # tdLog.debug(tdSql.queryResult) status=0 for i in range(self.dnodeNums): diff --git a/tests/pytest/wal/sdbCompCluster.py b/tests/pytest/wal/sdbCompCluster.py index 4fa84817ec..15cb000fd3 100644 --- a/tests/pytest/wal/sdbCompCluster.py +++ b/tests/pytest/wal/sdbCompCluster.py @@ -106,7 +106,7 @@ class TwoClients: tdSql.init(cur2, True) # use new wal file to start up tasod - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0]=="db2": assert tdSql.queryResult[i][4]==1 , "replica is wrong" diff --git a/tests/pytest/wal/sdbCompClusterReplica2.py b/tests/pytest/wal/sdbCompClusterReplica2.py index ba80e3864a..87a14e0541 100644 --- a/tests/pytest/wal/sdbCompClusterReplica2.py +++ b/tests/pytest/wal/sdbCompClusterReplica2.py @@ -116,7 +116,7 @@ class TwoClients: tdSql.init(cur2, True) # use new wal file to start up tasod - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0]=="db2": assert tdSql.queryResult[i][4]==2 , "replica is wrong" diff --git a/tests/script/tsim/dnode/drop_dnode_has_qnode_snode.sim b/tests/script/tsim/dnode/drop_dnode_has_qnode_snode.sim index c50cf0f56e..7013742884 100644 --- a/tests/script/tsim/dnode/drop_dnode_has_qnode_snode.sim +++ b/tests/script/tsim/dnode/drop_dnode_has_qnode_snode.sim @@ -33,7 +33,7 @@ print =============== step2: create qnode snode on dnode 2 sql create qnode on dnode 2 sql create snode on dnode 2 -sql show qnodes +sql select * from information_schema.ins_qnodes if $rows != 1 then return -1 endi @@ -57,7 +57,7 @@ if $data00 != 1 then return -1 endi -sql show qnodes +sql select * from information_schema.ins_qnodes if $rows != 0 then return -1 endi diff --git a/tests/script/tsim/parser/auto_create_tb.sim b/tests/script/tsim/parser/auto_create_tb.sim index faf573f949..312964a1ab 100644 --- a/tests/script/tsim/parser/auto_create_tb.sim +++ b/tests/script/tsim/parser/auto_create_tb.sim @@ -289,7 +289,7 @@ if $rows != 1 then endi #sql drop database $db -#sql show databases +#sql select * from information_schema.ins_databases #if $rows != 0 then # return -1 #endi diff --git a/tests/script/tsim/parser/create_db.sim b/tests/script/tsim/parser/create_db.sim index 6fa635cd42..db25240262 100644 --- a/tests/script/tsim/parser/create_db.sim +++ b/tests/script/tsim/parser/create_db.sim @@ -262,7 +262,7 @@ sql_error create database $db comp -1 sql_error create database $db comp 3 sql_error drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/create_mt.sim b/tests/script/tsim/parser/create_mt.sim index e2f02f9740..dd2a7834c4 100644 --- a/tests/script/tsim/parser/create_mt.sim +++ b/tests/script/tsim/parser/create_mt.sim @@ -240,7 +240,7 @@ $mt2 = mt2 print chinese_char_in_metrics test passed sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/create_tb.sim b/tests/script/tsim/parser/create_tb.sim index ea6709807f..cd823cc685 100644 --- a/tests/script/tsim/parser/create_tb.sim +++ b/tests/script/tsim/parser/create_tb.sim @@ -180,7 +180,7 @@ sql_error create table $tbname65 (ts timestamp, col int) print table_already_exists test passed sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/distinct.sim b/tests/script/tsim/parser/distinct.sim index 78eaa68dab..2a4da10bf4 100644 --- a/tests/script/tsim/parser/distinct.sim +++ b/tests/script/tsim/parser/distinct.sim @@ -75,7 +75,7 @@ endi ### select distinct sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/fill_stb.sim b/tests/script/tsim/parser/fill_stb.sim index 88032cc2bd..195bd2e1c3 100644 --- a/tests/script/tsim/parser/fill_stb.sim +++ b/tests/script/tsim/parser/fill_stb.sim @@ -431,7 +431,7 @@ endi print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 0 then return -1 endi diff --git a/tests/script/tsim/parser/fill_us.sim b/tests/script/tsim/parser/fill_us.sim index 94f6918c65..03231d2241 100644 --- a/tests/script/tsim/parser/fill_us.sim +++ b/tests/script/tsim/parser/fill_us.sim @@ -844,7 +844,7 @@ endi #print =============== clear #sql drop database $db -#sql show databases +#sql select * from information_schema.ins_databases #if $rows != 0 then # return -1 #endi diff --git a/tests/script/tsim/parser/insert_tb.sim b/tests/script/tsim/parser/insert_tb.sim index a10e3f553e..9283ac7fee 100644 --- a/tests/script/tsim/parser/insert_tb.sim +++ b/tests/script/tsim/parser/insert_tb.sim @@ -221,7 +221,7 @@ if $rows != 1 then endi #sql drop database $db -#sql show databases +#sql select * from information_schema.ins_databases #if $rows != 0 then # return -1 #endi diff --git a/tests/script/tsim/parser/nchar.sim b/tests/script/tsim/parser/nchar.sim index 1f37b057dc..9358a31cc1 100644 --- a/tests/script/tsim/parser/nchar.sim +++ b/tests/script/tsim/parser/nchar.sim @@ -305,7 +305,7 @@ endi # case: query_with_wildcard # print =============== clear # sql drop database $db -# sql show databases +# sql select * from information_schema.ins_databases # if $rows != 0 then # return -1 # endi diff --git a/tests/script/tsim/parser/precision_ns.sim b/tests/script/tsim/parser/precision_ns.sim index 522e5174a2..c2268cae30 100644 --- a/tests/script/tsim/parser/precision_ns.sim +++ b/tests/script/tsim/parser/precision_ns.sim @@ -100,7 +100,7 @@ sql select count(*) from $mt interval(100000000b) sliding(100000000b) print =============== clear sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/select_across_vnodes.sim b/tests/script/tsim/parser/select_across_vnodes.sim index f58f7a2943..e58ffa7473 100644 --- a/tests/script/tsim/parser/select_across_vnodes.sim +++ b/tests/script/tsim/parser/select_across_vnodes.sim @@ -71,7 +71,7 @@ if $rows != $tbNum then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/select_distinct_tag.sim b/tests/script/tsim/parser/select_distinct_tag.sim index 5f31a0a901..2d29384730 100644 --- a/tests/script/tsim/parser/select_distinct_tag.sim +++ b/tests/script/tsim/parser/select_distinct_tag.sim @@ -50,7 +50,7 @@ endi sql_error select distinct t1, t2 from &stb sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/stableOp.sim b/tests/script/tsim/parser/stableOp.sim index 213cd10546..a1d0219fef 100644 --- a/tests/script/tsim/parser/stableOp.sim +++ b/tests/script/tsim/parser/stableOp.sim @@ -84,7 +84,7 @@ endi print create/alter/drop stable test passed sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/parser/tags_filter.sim b/tests/script/tsim/parser/tags_filter.sim index cbdd9646ff..ea1c93ebd5 100644 --- a/tests/script/tsim/parser/tags_filter.sim +++ b/tests/script/tsim/parser/tags_filter.sim @@ -99,7 +99,7 @@ if $data01 != 4 then endi sql drop database $db -sql show databases +sql select * from information_schema.ins_databases if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/qnode/basic1.sim b/tests/script/tsim/qnode/basic1.sim index deaa457e1e..66f02d9c7d 100644 --- a/tests/script/tsim/qnode/basic1.sim +++ b/tests/script/tsim/qnode/basic1.sim @@ -77,7 +77,7 @@ endi print =============== create drop qnode 1 sql create qnode on dnode 1 -sql show qnodes +sql select * from information_schema.ins_qnodes if $rows != 1 then return -1 endi @@ -87,7 +87,7 @@ endi sql_error create qnode on dnode 1 sql drop qnode on dnode 1 -sql show qnodes +sql select * from information_schema.ins_qnodes if $rows != 0 then return -1 endi @@ -95,7 +95,7 @@ sql_error drop qnode on dnode 1 print =============== create drop qnode 2 sql create qnode on dnode 2 -sql show qnodes +sql select * from information_schema.ins_qnodes if $rows != 1 then return -1 endi @@ -105,7 +105,7 @@ endi sql_error create qnode on dnode 2 sql drop qnode on dnode 2 -sql show qnodes +sql select * from information_schema.ins_qnodes if $rows != 0 then return -1 endi @@ -114,7 +114,7 @@ sql_error drop qnode on dnode 2 print =============== create drop qnodes sql create qnode on dnode 1 sql create qnode on dnode 2 -sql show qnodes +sql select * from information_schema.ins_qnodes if $rows != 2 then return -1 endi @@ -125,7 +125,7 @@ system sh/exec.sh -n dnode2 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode2 -s start -sql show qnodes +sql select * from information_schema.ins_qnodes if $rows != 2 then return -1 endi diff --git a/tests/script/tsim/show/basic.sim b/tests/script/tsim/show/basic.sim index eb2c808dad..162e74ea14 100644 --- a/tests/script/tsim/show/basic.sim +++ b/tests/script/tsim/show/basic.sim @@ -49,7 +49,7 @@ if $rows != 1 then return -1 endi #sql show modules -#sql show qnodes +#sql select * from information_schema.ins_qnodes sql select * from information_schema.ins_databases if $rows != 3 then return -1 @@ -147,7 +147,7 @@ if $rows != 1 then return -1 endi #sql show modules -#sql show qnodes +#sql select * from information_schema.ins_qnodes sql select * from information_schema.ins_databases if $rows != 3 then return -1 diff --git a/tests/script/tsim/stream/session0.sim b/tests/script/tsim/stream/session0.sim index 7cd9b75a4b..fee8c98cce 100644 --- a/tests/script/tsim/stream/session0.sim +++ b/tests/script/tsim/stream/session0.sim @@ -6,7 +6,7 @@ sql connect print =============== create database sql create database test vgroups 1; -sql show databases; +sql select * from information_schema.ins_databases; if $rows != 3 then return -1 endi diff --git a/tests/script/tsim/user/privilege_sysinfo.sim b/tests/script/tsim/user/privilege_sysinfo.sim index cbf714ed73..3f81037af4 100644 --- a/tests/script/tsim/user/privilege_sysinfo.sim +++ b/tests/script/tsim/user/privilege_sysinfo.sim @@ -54,7 +54,7 @@ sql_error show cluster sql_error select * from information_schema.ins_dnodes sql_error select * from information_schema.ins_mnodes sql_error show snodes -sql_error show qnodes +sql_error select * from information_schema.ins_qnodes sql_error show bnodes sql_error show grants sql_error show dnode 1 variables; diff --git a/tests/system-test/0-others/cachemodel.py b/tests/system-test/0-others/cachemodel.py index 7fc2003983..42c52a2f3c 100644 --- a/tests/system-test/0-others/cachemodel.py +++ b/tests/system-test/0-others/cachemodel.py @@ -84,7 +84,7 @@ class TDTestCase: # check cache_last value for database - tdSql.query(" show databases ") + tdSql.query(" select * from information_schema.ins_databases ") databases_infos = tdSql.queryResult cache_lasts = {} for db_info in databases_infos: @@ -117,7 +117,7 @@ class TDTestCase: abs_vnodePath = os.path.abspath(dataPath)+"/vnode/" tdLog.info("abs_vnodePath: %s" % abs_vnodePath) - tdSql.query(" show dnodes ") + tdSql.query(" select * from information_schema.ins_dnodes ") dnode_id = tdSql.queryResult[0][0] for dbname in cache_lasts.keys(): @@ -144,7 +144,7 @@ class TDTestCase: def restart_check_cachemodel_sets(self): for i in range(3): - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/system-test/0-others/fsync.py b/tests/system-test/0-others/fsync.py index fcc790040c..6eefc3db24 100644 --- a/tests/system-test/0-others/fsync.py +++ b/tests/system-test/0-others/fsync.py @@ -41,7 +41,7 @@ class TDTestCase: def test_fsync_current(self): wal_index = 0 fsync_index = 0 - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryCols): if tdSql.cursor.description[i][0] == "wal_level": wal_index = i @@ -50,35 +50,35 @@ class TDTestCase: tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal_level 1") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, wal_index, 1) tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal_level 2") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, wal_index, 2) tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal_fsync_period 0") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 0) tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal_fsync_period 3000") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal_fsync_period 180000") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 180000) @@ -86,7 +86,7 @@ class TDTestCase: tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal_level 1 wal_fsync_period 6000") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 6000) @@ -94,49 +94,49 @@ class TDTestCase: tdSql.execute("drop database if exists db1") tdSql.execute("create database db1 wal_level 2 wal_fsync_period 3000") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) tdSql.checkData(i, wal_index, 2) tdSql.execute("alter database db1 wal_level 1") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) tdSql.checkData(i, wal_index, 1) tdSql.execute("alter database db1 wal_level 2") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) tdSql.checkData(i, wal_index, 2) tdSql.execute("alter database db1 wal_fsync_period 0") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 0) tdSql.checkData(i, wal_index, 2) tdSql.execute("alter database db1 wal_fsync_period 3000") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) tdSql.checkData(i, wal_index, 2) tdSql.execute("alter database db1 wal_fsync_period 18000") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 18000) tdSql.checkData(i, wal_index, 2) tdSql.execute("alter database db1 wal_level 1 wal_fsync_period 3000") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.queryResult[i][0] == "db1": tdSql.checkData(i, fsync_index, 3000) diff --git a/tests/system-test/0-others/taosShell.py b/tests/system-test/0-others/taosShell.py index 4f24a3bf4a..ed53f74d66 100644 --- a/tests/system-test/0-others/taosShell.py +++ b/tests/system-test/0-others/taosShell.py @@ -162,8 +162,8 @@ class TDTestCase: tdLog.exit("taos -h %s fail"%keyDict['h']) else: #dataDbName = ["information_schema", "performance_schema", "db", newDbName] - tdSql.query("show databases") - #tdSql.getResult("show databases") + tdSql.query("select * from information_schema.ins_databases") + #tdSql.getResult("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.getData(i, 0) == newDbName: break @@ -184,7 +184,7 @@ class TDTestCase: if retCode != "TAOS_OK": tdLog.exit("taos -P %s fail"%keyDict['P']) else: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.getData(i, 0) == newDbName: break @@ -200,7 +200,7 @@ class TDTestCase: if retCode != "TAOS_OK": tdLog.exit("taos -u %s -p%s fail"%(keyDict['u'], keyDict['p'])) else: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.getData(i, 0) == newDbName: break @@ -220,7 +220,7 @@ class TDTestCase: if retCode != "TAOS_OK": tdLog.exit("taos -u %s -a %s"%(keyDict['u'], retVal)) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.getData(i, 0) == newDbName: break @@ -237,7 +237,7 @@ class TDTestCase: tdLog.exit("taos -s fail") print ("========== check new db ==========") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.getData(i, 0) == newDbName: break @@ -302,7 +302,7 @@ class TDTestCase: else: sql3 = "echo 'create table ntbf (ts timestamp, c binary(40))' >> " + sqlFile sql4 = "echo 'insert into ntbf values (\"2021-04-01 08:00:00.000\", \"test taos -f1\")(\"2021-04-01 08:00:01.000\", \"test taos -f2\")' >> " + sqlFile - sql5 = "echo show databases >> " + sqlFile + sql5 = "echo select * from information_schema.ins_databases >> " + sqlFile os.system(sql1) os.system(sql2) os.system(sql3) @@ -316,7 +316,7 @@ class TDTestCase: tdLog.exit("taos -f fail") print ("========== check new db ==========") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): #print ("dbseq: %d, dbname: %s"%(i, tdSql.getData(i, 0))) if tdSql.getData(i, 0) == newDbName: @@ -384,7 +384,7 @@ class TDTestCase: if retCode != "TAOS_OK": tdLog.exit("taos -d %s fail"%(keyDict['d'])) else: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): if tdSql.getData(i, 0) == newDbName: break diff --git a/tests/system-test/0-others/taosShellError.py b/tests/system-test/0-others/taosShellError.py index 8666c2e54d..0b9baaa512 100644 --- a/tests/system-test/0-others/taosShellError.py +++ b/tests/system-test/0-others/taosShellError.py @@ -244,7 +244,7 @@ class TDTestCase: else: sql3 = "echo 'create table ntbf (ts timestamp, c binary(40)) no this item' >> " + sqlFile sql4 = "echo 'insert into ntbf values (\"2021-04-01 08:00:00.000\", \"test taos -f1\")(\"2021-04-01 08:00:01.000\", \"test taos -f2\")' >> " + sqlFile - sql5 = "echo show databases >> " + sqlFile + sql5 = "echo select * from information_schema.ins_databases >> " + sqlFile os.system(sql1) os.system(sql2) os.system(sql3) @@ -258,7 +258,7 @@ class TDTestCase: tdLog.exit("taos -f fail") print ("========== check new db ==========") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for i in range(tdSql.queryRows): #print ("dbseq: %d, dbname: %s"%(i, tdSql.getData(i, 0))) if tdSql.getData(i, 0) == newDbName: diff --git a/tests/system-test/0-others/taosdlog.py b/tests/system-test/0-others/taosdlog.py index f8898daf41..bd3d6b9b4c 100644 --- a/tests/system-test/0-others/taosdlog.py +++ b/tests/system-test/0-others/taosdlog.py @@ -45,7 +45,7 @@ class TDTestCase: tdDnodes.stop(1) time.sleep(2) - tdSql.error("show databases") + tdSql.error("select * from information_schema.ins_databases") os.system("rm -rf %s" % logPath) if os.path.exists(logPath) == True: tdLog.exit("log pat still exist!") @@ -55,7 +55,7 @@ class TDTestCase: if os.path.exists(logPath) != True: tdLog.exit("log pat is not generated!") - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") def stop(self): tdSql.close() diff --git a/tests/system-test/0-others/user_control.py b/tests/system-test/0-others/user_control.py index 5e0a2b4102..35752f5ba9 100644 --- a/tests/system-test/0-others/user_control.py +++ b/tests/system-test/0-others/user_control.py @@ -649,12 +649,12 @@ class TDTestCase: tdLog.printNoPrefix("==========step5: enable info") taos1_conn = taos.connect(user=self.__user_list[1], password=f"new{self.__passwd_list[1]}") - taos1_conn.query(f"show databases") + taos1_conn.query(f"select * from information_schema.ins_databases") tdSql.execute(f"alter user {self.__user_list[1]} enable 0") tdSql.execute(f"alter user {self.__user_list[2]} enable 0") taos1_except = True try: - taos1_conn.query("show databases") + taos1_conn.query("select * from information_schema.ins_databases") except BaseException: taos1_except = False if taos1_except: @@ -674,13 +674,13 @@ class TDTestCase: tdLog.printNoPrefix("==========step6: sysinfo info") taos3_conn = taos.connect(user=self.__user_list[3], password=f"new{self.__passwd_list[3]}") - taos3_conn.query(f"show dnodes") + taos3_conn.query(f"select * from information_schema.ins_dnodes") taos3_conn.query(f"show {DBNAME}.vgroups") tdSql.execute(f"alter user {self.__user_list[3]} sysinfo 0") tdSql.execute(f"alter user {self.__user_list[4]} sysinfo 0") taos3_except = True try: - taos3_conn.query(f"show dnodes") + taos3_conn.query(f"select * from information_schema.ins_dnodes") taos3_conn.query(f"show {DBNAME}.vgroups") except BaseException: taos3_except = False diff --git a/tests/system-test/1-insert/create_retentions.py b/tests/system-test/1-insert/create_retentions.py index 24c0dfc046..54abcec391 100644 --- a/tests/system-test/1-insert/create_retentions.py +++ b/tests/system-test/1-insert/create_retentions.py @@ -135,7 +135,7 @@ class TDTestCase: tdSql.error(err_sql) for cur_sql in self.create_databases_sql_current: tdSql.execute(cur_sql) - # tdSql.query("show databases") + # tdSql.query("select * from information_schema.ins_databases") for alter_sql in self.alter_database_sql: tdSql.error(alter_sql) diff --git a/tests/system-test/1-insert/db_tb_name_check.py b/tests/system-test/1-insert/db_tb_name_check.py index e4b164e01f..5017fde68a 100644 --- a/tests/system-test/1-insert/db_tb_name_check.py +++ b/tests/system-test/1-insert/db_tb_name_check.py @@ -44,7 +44,7 @@ class TDTestCase: new_dbname.insert(i,j) dbname_1 = ''.join(new_dbname) tdSql.execute(f'create database if not exists `{dbname_1}`') - tdSql.query('show databases') + tdSql.query('select * from information_schema.ins_databases') tdSql.checkEqual(tdSql.queryResult[2][0],str(dbname_1)) tdSql.execute(f'drop database `{dbname_1}`') for i in range(len(list(dbname))+1): diff --git a/tests/system-test/1-insert/insertWithMoreVgroup.py b/tests/system-test/1-insert/insertWithMoreVgroup.py index aea0feda02..b80a5f9a4a 100644 --- a/tests/system-test/1-insert/insertWithMoreVgroup.py +++ b/tests/system-test/1-insert/insertWithMoreVgroup.py @@ -238,7 +238,7 @@ class TDTestCase: tsql.execute("create database %s vgroups %d"%(dbname,vgroups)) print("db has been created") - # tsql.getResult("show databases") + # tsql.getResult("select * from information_schema.ins_databases") # print(tdSql.queryResult) tsql.execute("use %s" %dbname) diff --git a/tests/system-test/1-insert/insert_drop.py b/tests/system-test/1-insert/insert_drop.py index bfba4c9e4a..3e30e94a6b 100644 --- a/tests/system-test/1-insert/insert_drop.py +++ b/tests/system-test/1-insert/insert_drop.py @@ -37,7 +37,7 @@ class TDTestCase: sql_list.append(f'drop database test;') tlist = self.genMultiThreadSeq(sql_list) self.multiThreadRun(tlist) - tdSql.query(f'show databases') + tdSql.query(f'select * from information_schema.ins_databases') def stop(self): diff --git a/tests/system-test/1-insert/mutil_stage.py b/tests/system-test/1-insert/mutil_stage.py index fcad114edd..764da1f166 100644 --- a/tests/system-test/1-insert/mutil_stage.py +++ b/tests/system-test/1-insert/mutil_stage.py @@ -176,7 +176,7 @@ class TDTestCase: self.cfg_str_list(filename=self.taos_cfg_path, update_list=cfg_case) tdDnodes.starttaosd(1) time.sleep(2) - tdSql.error(f"show databases") + tdSql.error(f"select * from information_schema.ins_databases") for cfg_case in self.__current_cfg: self.del_old_datadir(filename=self.taos_cfg_path) @@ -184,7 +184,7 @@ class TDTestCase: tdDnodes.deploy(1) self.cfg_str_list(filename=self.taos_cfg_path, update_list=cfg_case) tdDnodes.start(1) - tdSql.query(f"show databases") + tdSql.query(f"select * from information_schema.ins_databases") def __create_tb(self, stb=STBNAME, ctb_pre = CTB_PRE, ctb_num=20, ntb_pre=NTB_PRE, ntbnum=1, dbname=DBNAME): tdLog.printNoPrefix("==========step: create table") diff --git a/tests/system-test/1-insert/time_range_wise.py b/tests/system-test/1-insert/time_range_wise.py index e66f5560df..8f61da221d 100644 --- a/tests/system-test/1-insert/time_range_wise.py +++ b/tests/system-test/1-insert/time_range_wise.py @@ -291,7 +291,7 @@ class TDTestCase: return False tdSql.query("select database()") dbname = tdSql.getData(0,0) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for index , value in enumerate(tdSql.cursor.description): if value[0] == "retention": r_index = index diff --git a/tests/system-test/2-query/check_tsdb.py b/tests/system-test/2-query/check_tsdb.py index 8d5bcc370d..f504a55dcd 100644 --- a/tests/system-test/2-query/check_tsdb.py +++ b/tests/system-test/2-query/check_tsdb.py @@ -67,11 +67,11 @@ class TDTestCase: tdDnodes.stop(1) tdDnodes.start(1) time.sleep(2) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") status = False while status==False: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") for db_info in tdSql.queryResult: if db_info[0]==dbname : if db_info[15]=="ready": diff --git a/tests/system-test/2-query/csum.py b/tests/system-test/2-query/csum.py index 953dd1e491..83aaca8f12 100644 --- a/tests/system-test/2-query/csum.py +++ b/tests/system-test/2-query/csum.py @@ -406,7 +406,7 @@ class TDTestCase: tdLog.printNoPrefix("######## check after WAL test:") - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/system-test/2-query/explain.py b/tests/system-test/2-query/explain.py index 7ecf12b917..b1d4b39312 100644 --- a/tests/system-test/2-query/explain.py +++ b/tests/system-test/2-query/explain.py @@ -185,11 +185,11 @@ class TDTestCase: tdLog.printNoPrefix("===step 0: err case, must return err") tdSql.error( f"explain select hyperloglog({INT_COL}) from {dbname}.ct8" ) - tdSql.error( f"explain show databases " ) + tdSql.error( f"explain select * from information_schema.ins_databases " ) tdSql.error( f"explain show {dbname}.stables " ) tdSql.error( f"explain show {dbname}.tables " ) tdSql.error( f"explain show {dbname}.vgroups " ) - tdSql.error( f"explain show dnodes " ) + tdSql.error( f"explain select * from information_schema.ins_dnodes " ) tdSql.error( f'''explain select hyperloglog(['{INT_COL} + {INT_COL}', '{INT_COL} + {BINT_COL}', '{INT_COL} + {SINT_COL}', '{INT_COL} + {TINT_COL}', '{INT_COL} + {FLOAT_COL}', '{INT_COL} + {DOUBLE_COL}', '{INT_COL} + {BOOL_COL}', '{INT_COL} + {BINARY_COL}', '{INT_COL} + {NCHAR_COL}', '{INT_COL} + {TS_COL}']) from {dbname}.ct1 where ['{INT_COL} + {INT_COL}', '{INT_COL} + {BINT_COL}', '{INT_COL} + {SINT_COL}', '{INT_COL} + {TINT_COL}', '{INT_COL} + {FLOAT_COL}', '{INT_COL} + {DOUBLE_COL}', '{INT_COL} + {BOOL_COL}', '{INT_COL} + {BINARY_COL}', '{INT_COL} + {NCHAR_COL}', '{INT_COL} + {TS_COL}'] is not null diff --git a/tests/system-test/2-query/function_diff.py b/tests/system-test/2-query/function_diff.py index bd615cc3c1..fd5d6ea1cf 100644 --- a/tests/system-test/2-query/function_diff.py +++ b/tests/system-test/2-query/function_diff.py @@ -439,7 +439,7 @@ class TDTestCase: tdLog.printNoPrefix("######## check after WAL test:") - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/system-test/2-query/mavg.py b/tests/system-test/2-query/mavg.py index 91e5e013b4..d7dc5e6143 100644 --- a/tests/system-test/2-query/mavg.py +++ b/tests/system-test/2-query/mavg.py @@ -658,7 +658,7 @@ class TDTestCase: tdLog.printNoPrefix("######## check after WAL test:") - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/system-test/2-query/qnodeCluster.py b/tests/system-test/2-query/qnodeCluster.py index 23adfb768d..f68eb58a7a 100644 --- a/tests/system-test/2-query/qnodeCluster.py +++ b/tests/system-test/2-query/qnodeCluster.py @@ -218,7 +218,7 @@ class TDTestCase: mnodeNums=int(mnodeNums) vnodeNumbers = int(dnodeNumbers-mnodeNums) - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdLog.debug(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/2-query/queryQnode.py b/tests/system-test/2-query/queryQnode.py index 176c7ccf3e..7bd573d7fc 100644 --- a/tests/system-test/2-query/queryQnode.py +++ b/tests/system-test/2-query/queryQnode.py @@ -240,7 +240,7 @@ class TDTestCase: tsql.execute("create database %s vgroups %d"%(dbname,vgroups)) print("db has been created") - # tsql.getResult("show databases") + # tsql.getResult("select * from information_schema.ins_databases") # print(tdSql.queryResult) tsql.execute("use %s" %dbname) @@ -282,7 +282,7 @@ class TDTestCase: def test_case1(self): self.taosBenchCreate("127.0.0.1","no","db1", "stb1", 1, 2, 1*10) tdSql.execute("use db1;") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") dnodeId=tdSql.getData(0,0) print(dnodeId) tdLog.debug("create qnode on dnode %s"%dnodeId) @@ -296,7 +296,7 @@ class TDTestCase: tdSql.query("select c0,c1 from stb11_1 where (c0>1000) union all select c0,c1 from stb11_1 where c0>2000;") unionallQnode=tdSql.queryResult - # tdSql.query("show qnodes;") + # tdSql.query("select * from information_schema.ins_qnodes;") # qnodeId=tdSql.getData(0,0) tdLog.debug("drop qnode on dnode %s"%dnodeId) tdSql.execute("drop qnode on dnode %s"%dnodeId) @@ -330,7 +330,7 @@ class TDTestCase: tdSql.execute("reset query cache") tdSql.execute("use db1;") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") dnodeId=tdSql.getData(0,0) tdLog.debug("create qnode on dnode %s"%dnodeId) @@ -344,7 +344,7 @@ class TDTestCase: tdSql.query("select c0,c1 from stb11_1 where (c0>1000) union all select c0,c1 from stb11_1 where c0>2000;") assert unionallQnode==tdSql.queryResult - # tdSql.query("show qnodes;") + # tdSql.query("select * from information_schema.ins_qnodes;") # qnodeId=tdSql.getData(0,0) tdLog.debug("drop qnode on dnode %s"%dnodeId) tdSql.execute("drop qnode on dnode %s"%dnodeId) @@ -377,7 +377,7 @@ class TDTestCase: tdSql.execute("reset query cache") tdSql.execute("use db1;") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") dnodeId=tdSql.getData(0,0) tdLog.debug("create qnode on dnode %s"%dnodeId) @@ -405,7 +405,7 @@ class TDTestCase: tdSql.execute("reset query cache") tdSql.execute("use db1;") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") dnodeId=tdSql.getData(0,0) tdSql.query("select max(c1) from stb10;") assert maxQnode==tdSql.getData(0,0) @@ -419,7 +419,7 @@ class TDTestCase: # test case : queryPolicy = 2 def test_case2(self): self.taosBenchCreate("127.0.0.1","no","db1", "stb1", 10, 2, 1*10) - tdSql.query("show qnodes") + tdSql.query("select * from information_schema.ins_qnodes") if tdSql.queryRows == 1 : tdLog.debug("drop qnode on dnode 1") tdSql.execute("drop qnode on dnode 1") @@ -455,7 +455,7 @@ class TDTestCase: tdLog.debug("create qnode on dnode 1") tdSql.execute("create qnode on dnode 1") tdSql.execute("use db1;") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") dnodeId=tdSql.getData(0,0) print(dnodeId) @@ -468,7 +468,7 @@ class TDTestCase: tdSql.query("select c0,c1 from stb11_1 where (c0>1000) union all select c0,c1 from stb11_1 where c0>2000;") unionallQnode=tdSql.queryResult - # tdSql.query("show qnodes;") + # tdSql.query("select * from information_schema.ins_qnodes;") # qnodeId=tdSql.getData(0,0) tdLog.debug("drop qnode on dnode %s"%dnodeId) diff --git a/tests/system-test/2-query/sample.py b/tests/system-test/2-query/sample.py index cb74c33d92..34615c0515 100644 --- a/tests/system-test/2-query/sample.py +++ b/tests/system-test/2-query/sample.py @@ -846,7 +846,7 @@ class TDTestCase: tdLog.printNoPrefix("######## check after WAL test:") - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") index = tdSql.getData(0, 0) tdDnodes.stop(index) tdDnodes.start(index) diff --git a/tests/system-test/6-cluster/5dnode1mnode.py b/tests/system-test/6-cluster/5dnode1mnode.py index 60b70433ed..367d0bfbd7 100644 --- a/tests/system-test/6-cluster/5dnode1mnode.py +++ b/tests/system-test/6-cluster/5dnode1mnode.py @@ -89,7 +89,7 @@ class TDTestCase: tdLog.info(" create cluster done! ") def five_dnode_one_mnode(self): - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') @@ -121,11 +121,11 @@ class TDTestCase: for i in range(4): tdSql.execute(f'create table ct{i+1} using stb1 tags ( {i+1} )') - tdSql.query('show databases;') + tdSql.query('select * from information_schema.ins_databases;') tdSql.checkData(2,5,'off') tdSql.error("alter database db strict 'off'") # tdSql.execute('alter database db strict 'on'') - # tdSql.query('show databases;') + # tdSql.query('select * from information_schema.ins_databases;') # tdSql.checkData(2,5,'on') def getConnection(self, dnode): diff --git a/tests/system-test/6-cluster/5dnode2mnode.py b/tests/system-test/6-cluster/5dnode2mnode.py index f62483cfe2..7cbadde8bf 100644 --- a/tests/system-test/6-cluster/5dnode2mnode.py +++ b/tests/system-test/6-cluster/5dnode2mnode.py @@ -43,7 +43,7 @@ class TDTestCase: return buildPath def five_dnode_two_mnode(self): - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') @@ -101,7 +101,7 @@ class TDTestCase: for i in range(4): tdSql.execute(f'create table ct{i+1} using stb1 tags ( {i+1} )') tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(5) # restart all taosd diff --git a/tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py b/tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py index af78dfae9d..909decc195 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py +++ b/tests/system-test/6-cluster/5dnode3mnodeAdd1Ddnoe.py @@ -120,7 +120,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -136,7 +136,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeDrop.py b/tests/system-test/6-cluster/5dnode3mnodeDrop.py index d95124c445..33dc3ebaac 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeDrop.py +++ b/tests/system-test/6-cluster/5dnode3mnodeDrop.py @@ -244,7 +244,7 @@ class TDTestCase: def five_dnode_three_mnode(self): - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') @@ -267,7 +267,7 @@ class TDTestCase: tdSql.error("drop mnode on dnode 1") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdLog.debug(tdSql.queryResult) # drop follower of mnode diff --git a/tests/system-test/6-cluster/5dnode3mnodeDropInsert.py b/tests/system-test/6-cluster/5dnode3mnodeDropInsert.py index 6443a4a7f0..74a7c32206 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeDropInsert.py +++ b/tests/system-test/6-cluster/5dnode3mnodeDropInsert.py @@ -184,7 +184,7 @@ class TDTestCase: while count < 10: time.sleep(1) statusReadyBumber=0 - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") if tdSql.checkRows(dnodenumber) : print("dnode is %d nodes"%dnodenumber) for i in range(dnodenumber): @@ -343,7 +343,7 @@ class TDTestCase: rowsPerTable=100 startTs=1640966400000 # 2022-01-01 00:00:00.000 - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') @@ -362,7 +362,7 @@ class TDTestCase: self.check3mnode() tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) tdLog.debug("stop all of mnode ") diff --git a/tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py b/tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py index 8e8a4d957c..2e107561b5 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py +++ b/tests/system-test/6-cluster/5dnode3mnodeRecreateMnode.py @@ -122,7 +122,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -138,7 +138,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py index 8a0c90966b..3fe6a689cb 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py +++ b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertData.py @@ -120,7 +120,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -136,7 +136,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py index 5f02efc7ce..0d56729280 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py +++ b/tests/system-test/6-cluster/5dnode3mnodeRestartDnodeInsertDataAsync.py @@ -120,7 +120,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -136,7 +136,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py index 6debffdeb8..a215a74559 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateDb.py @@ -115,7 +115,7 @@ class TDTestCase: allStbNumbers=(paraDict['stbNumbers']*restartNumbers) tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -131,7 +131,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) @@ -185,7 +185,7 @@ class TDTestCase: tr.join() tdLog.info("check dnode number:") clusterComCheck.checkDnodes(dnodeNumbers) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdLog.debug("we find %d databases but exepect to create %d databases "%(tdSql.queryRows-2,allDbNumbers)) # tdLog.info("check DB Rows:") diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py index 919c560330..9df1ffb3df 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeCreateStb.py @@ -89,7 +89,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -105,7 +105,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py index 562721581d..caaf1dd898 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopDnodeInsertData.py @@ -120,7 +120,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -136,7 +136,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py index 3736166a83..58ed8cde63 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDb.py @@ -90,7 +90,7 @@ class TDTestCase: allStbNumbers=(paraDict['stbNumbers']*restartNumbers) tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -108,7 +108,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) @@ -160,7 +160,7 @@ class TDTestCase: tr.join() tdLog.info("check dnode number:") clusterComCheck.checkDnodes(dnodeNumbers) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdLog.debug("we find %d databases but exepect to create %d databases "%(tdSql.queryRows-2,allDbNumbers)) # tdLog.info("check DB Rows:") diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py index ea8e9612a2..3dc3e7ec65 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateDbRep3.py @@ -90,7 +90,7 @@ class TDTestCase: allStbNumbers=(paraDict['stbNumbers']*restartNumbers) tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -106,7 +106,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) @@ -158,7 +158,7 @@ class TDTestCase: tr.join() tdLog.info("check dnode number:") clusterComCheck.checkDnodes(dnodeNumbers) - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") tdLog.debug("we find %d databases but exepect to create %d databases "%(tdSql.queryRows-2,allDbNumbers)) # tdLog.info("check DB Rows:") diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py index d8c9b9e54d..371d147efc 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopMnodeCreateStb.py @@ -114,7 +114,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -130,7 +130,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py index 706c8ad9d5..6fbe262b8e 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateDb.py @@ -90,7 +90,7 @@ class TDTestCase: allStbNumbers=(paraDict['stbNumbers']*restartNumbers) tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -106,7 +106,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) @@ -159,7 +159,7 @@ class TDTestCase: for tr in threads: tr.join() clusterComCheck.checkDnodes(dnodeNumbers) - # tdSql.query("show databases") + # tdSql.query("select * from information_schema.ins_databases") # tdLog.debug("we find %d databases but exepect to create %d databases "%(tdSql.queryRows-2,allDbNumbers)) # tdLog.info("check DB Rows:") diff --git a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateStb.py b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateStb.py index c9f7cdacaf..56bafe8abc 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateStb.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSep1VnodeStopVnodeCreateStb.py @@ -115,7 +115,7 @@ class TDTestCase: print(tdSql) tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodeNumbers) @@ -131,7 +131,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodeNumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py b/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py index 870596175e..539e5e38a7 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py +++ b/tests/system-test/6-cluster/5dnode3mnodeSeperate1VnodeStopInsert.py @@ -103,7 +103,7 @@ class TDTestCase: while count < 100: time.sleep(1) statusReadyBumber=0 - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") if tdSql.checkRows(dnodenumber) : print("dnode is %d nodes"%dnodenumber) for i in range(dnodenumber): @@ -253,14 +253,14 @@ class TDTestCase: def check5dnode(self): - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') tdSql.checkData(4,4,'ready') def five_dnode_three_mnode(self,dnodenumber): - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') @@ -279,7 +279,7 @@ class TDTestCase: self.check3mnode() tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) tdLog.debug("stop all of mnode ") diff --git a/tests/system-test/6-cluster/5dnode3mnodeStop.py b/tests/system-test/6-cluster/5dnode3mnodeStop.py index 09974db884..c43d41199b 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStop.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStop.py @@ -71,7 +71,7 @@ class TDTestCase: dbNumbers = int(dnodenumbers * restartNumber) tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodenumbers) @@ -87,7 +87,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") # print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodenumbers) # restart all taosd diff --git a/tests/system-test/6-cluster/5dnode3mnodeStop2Follower.py b/tests/system-test/6-cluster/5dnode3mnodeStop2Follower.py index 9211ed3af8..584dd645f6 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStop2Follower.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStop2Follower.py @@ -71,7 +71,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodenumbers) @@ -87,7 +87,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") # print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodenumbers) # restart all taosd diff --git a/tests/system-test/6-cluster/5dnode3mnodeStopConnect.py b/tests/system-test/6-cluster/5dnode3mnodeStopConnect.py index 0a8c94b080..5638b01070 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStopConnect.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStopConnect.py @@ -71,7 +71,7 @@ class TDTestCase: dbNumbers = int(dnodenumbers * restartNumber) tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodenumbers) @@ -87,7 +87,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodenumbers) diff --git a/tests/system-test/6-cluster/5dnode3mnodeStopFollowerLeader.py b/tests/system-test/6-cluster/5dnode3mnodeStopFollowerLeader.py index e5cf7c5254..6daa4c260a 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStopFollowerLeader.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStopFollowerLeader.py @@ -71,7 +71,7 @@ class TDTestCase: dbNumbers = 1 tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodenumbers) @@ -87,7 +87,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") # print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodenumbers) # restart all taosd diff --git a/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py b/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py index 94796a8280..dcd9e56a64 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStopInsert.py @@ -142,7 +142,7 @@ class TDTestCase: while count < 10: time.sleep(1) statusReadyBumber=0 - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") if tdSql.checkRows(dnodenumber) : tdLog.debug("dnode is %d nodes"%dnodenumber) for i in range(dnodenumber): @@ -291,7 +291,7 @@ class TDTestCase: tdSql.checkData(2,3,'ready') def five_dnode_three_mnode(self,dnodenumber): - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) tdSql.checkData(0,4,'ready') @@ -310,7 +310,7 @@ class TDTestCase: self.check3mnode() tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdLog.debug(tdSql.queryResult) tdLog.debug("stop all of mnode ") diff --git a/tests/system-test/6-cluster/5dnode3mnodeStopLoop.py b/tests/system-test/6-cluster/5dnode3mnodeStopLoop.py index c7c45a19c6..1644686568 100644 --- a/tests/system-test/6-cluster/5dnode3mnodeStopLoop.py +++ b/tests/system-test/6-cluster/5dnode3mnodeStopLoop.py @@ -71,7 +71,7 @@ class TDTestCase: dbNumbers = int(dnodenumbers * restartNumber) tdLog.info("first check dnode and mnode") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") tdSql.checkData(0,1,'%s:6030'%self.host) tdSql.checkData(4,1,'%s:6430'%self.host) clusterComCheck.checkDnodes(dnodenumbers) @@ -87,7 +87,7 @@ class TDTestCase: # add some error operations and tdLog.info("Confirm the status of the dnode again") tdSql.error("create mnode on dnode 2") - tdSql.query("show dnodes;") + tdSql.query("select * from information_schema.ins_dnodes;") # print(tdSql.queryResult) clusterComCheck.checkDnodes(dnodenumbers) # restart all taosd diff --git a/tests/system-test/6-cluster/clusterCommonCheck.py b/tests/system-test/6-cluster/clusterCommonCheck.py index b16956c497..c37e3541d4 100644 --- a/tests/system-test/6-cluster/clusterCommonCheck.py +++ b/tests/system-test/6-cluster/clusterCommonCheck.py @@ -41,7 +41,7 @@ class ClusterComCheck: count=0 # print(tdSql) while count < 30: - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") # tdLog.debug(tdSql.queryResult) status=0 for i in range(dnodeNumbers): @@ -55,7 +55,7 @@ class ClusterComCheck: count+=1 time.sleep(1) else: - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") tdLog.debug(tdSql.queryResult) tdLog.exit("it find cluster with %d dnodes but check that there dnodes are not ready within 30s ! "%dnodeNumbers) @@ -63,7 +63,7 @@ class ClusterComCheck: dbNumbers=int(dbNumbers) count=0 while count < 5: - tdSql.query("show databases;") + tdSql.query("select * from information_schema.ins_databases;") count+=1 if tdSql.checkRows(dbNumbers+2): tdLog.success("we find %d databases and expect %d in clusters! " %(tdSql.queryRows,dbNumbers+2)) @@ -81,7 +81,7 @@ class ClusterComCheck: query_status=0 for j in range(dbNumbers): for i in range(alldbNumbers): - tdSql.query("show databases;") + tdSql.query("select * from information_schema.ins_databases;") if "%s_%d"%(dbNameIndex,j) == tdSql.queryResult[i][0] : if tdSql.queryResult[i][15] == "ready": query_status+=1 diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py index ed846f8f05..050c10d093 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py @@ -47,7 +47,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py index 7f7543971c..1e1f45d65e 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py @@ -53,7 +53,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py index 0a3c4544a0..ca12dd6c9d 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py @@ -54,7 +54,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py index 588b815dce..2d3e5e3178 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py @@ -53,7 +53,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py index 481ce93358..0557836ab2 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_force_stop_all_dnodes.py @@ -63,7 +63,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -217,7 +217,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -239,7 +239,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py index 302914d775..c8fa8ee435 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py @@ -54,7 +54,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py index aea6d798fb..447da77db3 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py @@ -56,7 +56,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -184,7 +184,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -207,7 +207,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py index 5d50ff0353..6175f4e7cc 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py @@ -56,7 +56,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -200,7 +200,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -223,7 +223,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py index fd54b28a82..27405774cc 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py @@ -56,7 +56,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -199,7 +199,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -222,7 +222,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py index 210e5efcbf..01c52577f0 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_all_dnodes.py @@ -63,7 +63,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -217,7 +217,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -239,7 +239,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py index 802cd752ee..1dc364c2fd 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py @@ -62,7 +62,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -259,7 +259,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -282,7 +282,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py index 545feaf5f1..3873040d20 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py @@ -62,7 +62,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -258,7 +258,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -280,7 +280,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py index dbdc590eae..188b0030f2 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py @@ -62,7 +62,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -258,7 +258,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -281,7 +281,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -452,7 +452,7 @@ class TDTestCase: # force stop taosd by kill -9 self.force_stop_dnode(self.stop_dnode_id) self.wait_stop_dnode_OK(newTdSql) - os.system(" taos -s 'show dnodes;' ") + os.system(" taos -s 'select * from information_schema.ins_dnodes;' ") tdDnodes[self.stop_dnode_id-1].starttaosd() self.wait_start_dnode_OK(newTdSql) end = time.time() @@ -508,7 +508,7 @@ class TDTestCase: def force_stop_dnode(self, dnode_id ): - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") port = None for dnode_info in tdSql.queryResult: if dnode_id == dnode_info[0]: diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py index 00448cbae6..2451b0cd90 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader.py @@ -145,7 +145,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -213,7 +213,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -235,7 +235,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -304,12 +304,12 @@ class TDTestCase: self.current_thread = threading.Thread(target=self.start_benchmark_inserts, args=(dbname,json_file)) self.current_thread.start() - tdSql.query(" show databases ") + tdSql.query(" select * from information_schema.ins_databases ") # make sure create database ok while (tdSql.queryRows!=3): time.sleep(0.5) - tdSql.query(" show databases ") + tdSql.query(" select * from information_schema.ins_databases ") # # make sure create stable ok tdSql.query(" show {}.stables ".format(dbname)) @@ -318,7 +318,7 @@ class TDTestCase: tdSql.query(" show {}.stables ".format(dbname)) # stop leader of database when insert 10% rows - # os.system("taos -s 'show databases';") + # os.system("taos -s 'select * from information_schema.ins_databases';") tdSql.query(" select count(*) from {}.{} ".format(dbname,"stb1")) while not tdSql.queryResult: diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py index 9bbb84281e..5ba6c6ab8d 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py @@ -145,7 +145,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -340,7 +340,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -363,7 +363,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -416,7 +416,7 @@ class TDTestCase: def force_stop_dnode(self, dnode_id ): - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") port = None for dnode_info in tdSql.queryResult: if dnode_id == dnode_info[0]: diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py index 5ec17ec0e0..0a4162bd99 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py @@ -54,7 +54,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py index 33e0ae3058..8e261c8d8f 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower.py @@ -64,7 +64,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -218,7 +218,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -240,7 +240,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -346,7 +346,7 @@ class TDTestCase: def force_stop_dnode(self, dnode_id ): - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") port = None for dnode_info in tdSql.queryResult: if dnode_id == dnode_info[0]: diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py index 7c67bde776..8f11d3f63c 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_follower_force_stop.py @@ -64,7 +64,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -218,7 +218,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -240,7 +240,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -346,7 +346,7 @@ class TDTestCase: def force_stop_dnode(self, dnode_id ): - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") port = None for dnode_info in tdSql.queryResult: if dnode_id == dnode_info[0]: diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py index ed1fcc026c..b4f5046a37 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader.py @@ -64,7 +64,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -218,7 +218,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -263,7 +263,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -381,7 +381,7 @@ class TDTestCase: def force_stop_dnode(self, dnode_id ): - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") port = None for dnode_info in tdSql.queryResult: if dnode_id == dnode_info[0]: diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py index 97ebf4292e..3b3a27c834 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_querydatas_stop_leader_force_stop.py @@ -64,7 +64,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -218,7 +218,7 @@ class TDTestCase: # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -262,7 +262,7 @@ class TDTestCase: def _get_status(): # newTdSql=tdCom.newTdSql() status = "" - newTdSql.query("show dnodes") + newTdSql.query("select * from information_schema.ins_dnodes") dnode_infos = newTdSql.queryResult for dnode_info in dnode_infos: id = dnode_info[0] @@ -380,7 +380,7 @@ class TDTestCase: def force_stop_dnode(self, dnode_id ): - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") port = None for dnode_info in tdSql.queryResult: if dnode_id == dnode_info[0]: diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py index dc12c74a98..31f380f29f 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py @@ -53,7 +53,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py index 5f6ac9fcc7..5475d1cc37 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py @@ -56,7 +56,7 @@ class TDTestCase: info = mnode self.mnode_list[name] = info - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") for dnode in tdSql.queryResult: name = dnode[1] info = dnode @@ -166,7 +166,7 @@ class TDTestCase: def _get_status(): status = "" - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") dnode_infos = tdSql.queryResult for dnode_info in dnode_infos: endpoint = dnode_info[1] @@ -188,7 +188,7 @@ class TDTestCase: def _get_status(): status = "" - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") dnode_infos = tdSql.queryResult for dnode_info in dnode_infos: endpoint = dnode_info[1] @@ -214,7 +214,7 @@ class TDTestCase: tdDnodes=cluster.dnodes tdDnodes[stop_dnode_id-1].stoptaosd() self.wait_stop_dnode_OK() - # os.system("taos -s 'show dnodes;'") + # os.system("taos -s 'select * from information_schema.ins_dnodes;'") def Restart_stop_dnode(self): @@ -222,7 +222,7 @@ class TDTestCase: stop_dnode_id = self.dnode_list[self.stop_dnode][0] tdDnodes[stop_dnode_id-1].starttaosd() self.wait_start_dnode_OK() - # os.system("taos -s 'show dnodes;'") + # os.system("taos -s 'select * from information_schema.ins_dnodes;'") def check_vgroups_init_done(self,dbname): diff --git a/tests/system-test/7-tmq/basic5.py b/tests/system-test/7-tmq/basic5.py index 94201a335d..9531541f13 100644 --- a/tests/system-test/7-tmq/basic5.py +++ b/tests/system-test/7-tmq/basic5.py @@ -249,7 +249,7 @@ class TDTestCase: # wait db ready while 1: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") if tdSql.getRows() == 4: print ('==================================================') print (tdSql.getData(0,0), tdSql.getData(1,0),tdSql.getData(2,0)) @@ -393,7 +393,7 @@ class TDTestCase: # wait db ready while 1: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") if tdSql.getRows() == 5: print ('==================================================dbname: %s'%parameterDict['dbName']) print (tdSql.getData(0,0), tdSql.getData(1,0),tdSql.getData(2,0),tdSql.getData(3,0),tdSql.getData(4,0)) diff --git a/tests/system-test/7-tmq/tmq3mnodeSwitch.py b/tests/system-test/7-tmq/tmq3mnodeSwitch.py index 9a98c69aff..7ba914c05c 100644 --- a/tests/system-test/7-tmq/tmq3mnodeSwitch.py +++ b/tests/system-test/7-tmq/tmq3mnodeSwitch.py @@ -40,7 +40,7 @@ class TDTestCase: def checkDnodesStatusAndCreateMnode(self,dnodeNumbers): count=0 while count < dnodeNumbers: - tdSql.query("show dnodes") + tdSql.query("select * from information_schema.ins_dnodes") # tdLog.debug(tdSql.queryResult) dCnt = 0 for i in range(dnodeNumbers): diff --git a/tests/system-test/99-TDcase/TD-15517.py b/tests/system-test/99-TDcase/TD-15517.py index 99ca02aab7..fe2d9b9041 100644 --- a/tests/system-test/99-TDcase/TD-15517.py +++ b/tests/system-test/99-TDcase/TD-15517.py @@ -250,7 +250,7 @@ class TDTestCase: # wait db ready while 1: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") if tdSql.getRows() == 4: print (tdSql.getData(0,0), tdSql.getData(1,0),tdSql.getData(2,0),) break diff --git a/tests/system-test/99-TDcase/TD-15554.py b/tests/system-test/99-TDcase/TD-15554.py index 4012696dc7..16a34086b7 100644 --- a/tests/system-test/99-TDcase/TD-15554.py +++ b/tests/system-test/99-TDcase/TD-15554.py @@ -236,7 +236,7 @@ class TDTestCase: # wait db ready while 1: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") if tdSql.getRows() == 4: print (tdSql.getData(0,0), tdSql.getData(1,0),tdSql.getData(2,0),) break @@ -358,7 +358,7 @@ class TDTestCase: # wait db ready while 1: - tdSql.query("show databases") + tdSql.query("select * from information_schema.ins_databases") if tdSql.getRows() == 4: print (tdSql.getData(0,0), tdSql.getData(1,0),tdSql.getData(2,0),) break From 03784406c472f15de0cec9ba2a7c1c69eab64d75 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 11 Aug 2022 22:08:19 +0800 Subject: [PATCH 30/52] fix: improve create stream check --- include/libs/nodes/querynodes.h | 1 + source/libs/parser/src/parTranslater.c | 14 +++++++++++++- source/libs/planner/src/planOptimizer.c | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/include/libs/nodes/querynodes.h b/include/libs/nodes/querynodes.h index db87bde521..38c5055059 100644 --- a/include/libs/nodes/querynodes.h +++ b/include/libs/nodes/querynodes.h @@ -269,6 +269,7 @@ typedef struct SSelectStmt { bool hasInterpFunc; bool hasLastRowFunc; bool hasTimeLineFunc; + bool hasUdaf; bool onlyHasKeepOrderFunc; bool groupSort; } SSelectStmt; diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 4743a9aa9a..be4ac404fd 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -1350,6 +1350,7 @@ static void setFuncClassification(SNode* pCurrStmt, SFunctionNode* pFunc) { pSelect->hasInterpFunc = pSelect->hasInterpFunc ? true : (FUNCTION_TYPE_INTERP == pFunc->funcType); pSelect->hasLastRowFunc = pSelect->hasLastRowFunc ? true : (FUNCTION_TYPE_LAST_ROW == pFunc->funcType); pSelect->hasTimeLineFunc = pSelect->hasTimeLineFunc ? true : fmIsTimelineFunc(pFunc->funcId); + pSelect->hasUdaf = pSelect->hasUdaf ? true : fmIsUserDefinedFunc(pFunc->funcId) && fmIsAggFunc(pFunc->funcId); pSelect->onlyHasKeepOrderFunc = pSelect->onlyHasKeepOrderFunc ? fmIsKeepOrderFunc(pFunc->funcId) : false; } } @@ -2644,6 +2645,11 @@ static int32_t translateInterp(STranslateContext* pCxt, SSelectStmt* pSelect) { return TSDB_CODE_SUCCESS; } + if (NULL == pSelect->pRange || NULL == pSelect->pEvery || NULL == pSelect->pFill) { + return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_INTERP_CLAUSE, + "Missing RANGE clause, EVERY clause or FILL clause"); + } + int32_t code = translateExpr(pCxt, &pSelect->pRange); if (TSDB_CODE_SUCCESS == code) { code = translateExpr(pCxt, &pSelect->pEvery); @@ -4734,6 +4740,11 @@ static bool crossTableWithoutAggOper(SSelectStmt* pSelect) { !isPartitionByTbname(pSelect->pPartitionByList); } +static bool crossTableWithUdaf(SSelectStmt* pSelect) { + return pSelect->hasUdaf && TSDB_SUPER_TABLE == ((SRealTableNode*)pSelect->pFromTable)->pMeta->tableType && + !isPartitionByTbname(pSelect->pPartitionByList); +} + static int32_t checkCreateStream(STranslateContext* pCxt, SCreateStreamStmt* pStmt) { if (NULL != pStmt->pOptions->pWatermark && (DEAL_RES_ERROR == translateValue(pCxt, (SValueNode*)pStmt->pOptions->pWatermark))) { @@ -4785,7 +4796,8 @@ static int32_t addWstartTsToCreateStreamQuery(SNode* pStmt) { static int32_t checkStreamQuery(STranslateContext* pCxt, SSelectStmt* pSelect) { if (TSDB_DATA_TYPE_TIMESTAMP != ((SExprNode*)nodesListGetNode(pSelect->pProjectionList, 0))->resType.type || - !pSelect->isTimeLineResult || crossTableWithoutAggOper(pSelect)) { + !pSelect->isTimeLineResult || crossTableWithoutAggOper(pSelect) || NULL != pSelect->pOrderByList || + crossTableWithUdaf(pSelect)) { return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_STREAM_QUERY, "Unsupported stream query"); } return TSDB_CODE_SUCCESS; diff --git a/source/libs/planner/src/planOptimizer.c b/source/libs/planner/src/planOptimizer.c index f4f7c9aefd..45ab3903a9 100644 --- a/source/libs/planner/src/planOptimizer.c +++ b/source/libs/planner/src/planOptimizer.c @@ -1615,6 +1615,9 @@ static int32_t partTagsOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogicSub if (QUERY_NODE_LOGIC_PLAN_PARTITION == nodeType(pNode)) { TSWAP(((SPartitionLogicNode*)pNode)->pPartitionKeys, pScan->pGroupTags); int32_t code = replaceLogicNode(pLogicSubplan, pNode, (SLogicNode*)pScan); + if (TSDB_CODE_SUCCESS == code) { + code = adjustLogicNodeDataRequirement((SLogicNode*)pScan, pNode->resultDataOrder); + } if (TSDB_CODE_SUCCESS == code) { NODES_CLEAR_LIST(pNode->pChildren); nodesDestroyNode((SNode*)pNode); From cce189934ab9ac5b88922b1efb75cc2ffbd79d05 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 11 Aug 2022 22:16:28 +0800 Subject: [PATCH 31/52] fix: improve create stream check --- source/common/src/systable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 16681fb705..6dddcc2f74 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -346,7 +346,7 @@ static const SSysTableMeta perfsMeta[] = { {TSDB_PERFS_TABLE_TOPICS, topicSchema, tListLen(topicSchema)}, {TSDB_PERFS_TABLE_CONSUMERS, consumerSchema, tListLen(consumerSchema)}, {TSDB_PERFS_TABLE_SUBSCRIPTIONS, subscriptionSchema, tListLen(subscriptionSchema)}, - {TSDB_PERFS_TABLE_OFFSETS, offsetSchema, tListLen(offsetSchema)}, + // {TSDB_PERFS_TABLE_OFFSETS, offsetSchema, tListLen(offsetSchema)}, {TSDB_PERFS_TABLE_TRANS, transSchema, tListLen(transSchema)}, {TSDB_PERFS_TABLE_SMAS, smaSchema, tListLen(smaSchema)}, {TSDB_PERFS_TABLE_STREAMS, streamSchema, tListLen(streamSchema)}, From 60f18066ded85029e8afcd992d5e9f8c8fec87b0 Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Thu, 11 Aug 2022 22:23:56 +0800 Subject: [PATCH 32/52] Update 03-k8s.md --- docs/zh/10-deployment/03-k8s.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/10-deployment/03-k8s.md b/docs/zh/10-deployment/03-k8s.md index 6bab4d2cec..eb8afd0505 100644 --- a/docs/zh/10-deployment/03-k8s.md +++ b/docs/zh/10-deployment/03-k8s.md @@ -3,7 +3,7 @@ sidebar_label: Kubernetes title: 在 Kubernetes 上部署 TDengine 集群 --- -作为面向云原生架构设计的时序数据库,可以方便的通过 Kubernetes 部署并管理 TDengine 集群。这里介绍如何使用 YAML 文件一步一步从头创建一个TDengine集群,并重点介绍 Kubernetes 环境下 TDengine 的常用操作。 +作为面向云原生架构设计的时序数据库,TDengine 支持 Kubernetes 部署。这里介绍如何使用 YAML 文件一步一步从头创建一个 TDengine 集群,并重点介绍 Kubernetes 环境下 TDengine 的常用操作。 ## 前置条件 From 75f56d8d55e1389cd3d62c7701ac5c3bb1eab0d1 Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Thu, 11 Aug 2022 22:28:30 +0800 Subject: [PATCH 33/52] Update 02-intro.md --- docs/zh/02-intro.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/zh/02-intro.md b/docs/zh/02-intro.md index ea548570d5..7890d9611d 100644 --- a/docs/zh/02-intro.md +++ b/docs/zh/02-intro.md @@ -26,6 +26,7 @@ TDengine的主要功能如下: 13. 支持 [REST 接口](/reference/rest-api/) 14. 支持与[ Grafana 无缝集成](/third-party/grafana) 15. 支持与 Google Data Studio 无缝集成 +16. 支持 [Kubenetes 部署](/deployment/k8s/) 更多细小的功能,请阅读整个文档。 From 6d7fa83dda524adf5f168f09a536c5db204ff98c Mon Sep 17 00:00:00 2001 From: Bo Ding Date: Thu, 11 Aug 2022 23:06:09 +0800 Subject: [PATCH 34/52] docs: update intro.md (#16017) --- docs/zh/01-index.md | 2 +- docs/zh/02-intro.md | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/zh/01-index.md b/docs/zh/01-index.md index 771b3f020c..64a7d419e1 100644 --- a/docs/zh/01-index.md +++ b/docs/zh/01-index.md @@ -10,7 +10,7 @@ TDengine 充分利用了时序数据的特点,提出了“一个数据采集 如果你是开发者,请一定仔细阅读[开发指南](./develop)一章,该部分对数据库连接、建模、插入数据、查询、流式计算、缓存、数据订阅、用户自定义函数等功能都做了详细介绍,并配有各种编程语言的示例代码。大部分情况下,你只要把示例代码拷贝粘贴,针对自己的应用稍作改动,就能跑起来。 -我们已经生活在大数据的时代,纵向扩展已经无法满足日益增长的业务需求,任何系统都必须具有水平扩展的能力,集群成为大数据以及 database 系统的不可缺失功能。TDengine 团队不仅实现了集群功能,而且将这一重要核心功能开源。怎么部署、管理和维护 TDengine 集群,请参考[集群管理](./cluster)一章。 +我们已经生活在大数据的时代,纵向扩展已经无法满足日益增长的业务需求,任何系统都必须具有水平扩展的能力,集群成为大数据以及 database 系统的不可缺失功能。TDengine 团队不仅实现了集群功能,而且将这一重要核心功能开源。怎么部署、管理和维护 TDengine 集群,请参考[部署集群](./deployment)一章。 TDengine 采用 SQL 作为其查询语言,大大降低学习成本、降低迁移成本,但同时针对时序数据场景,又做了一些扩展,以支持插值、降采样、时间加权平均等操作。[SQL 手册](./taos-sql)一章详细描述了 SQL 语法、详细列出了各种支持的命令和函数。 diff --git a/docs/zh/02-intro.md b/docs/zh/02-intro.md index 7890d9611d..e561114929 100644 --- a/docs/zh/02-intro.md +++ b/docs/zh/02-intro.md @@ -3,7 +3,7 @@ title: 产品简介 toc_max_heading_level: 2 --- -TDengine 是一款[开源](https://www.taosdata.com/tdengine/open_source_time-series_database)、[高性能](https://www.taosdata.com/tdengine/fast)、[云原生](https://www.taosdata.com/tdengine/cloud_native_time-series_database)的时序数据库 (Time-Series Database, TSDB)。TDengine 能被广泛运用于物联网、工业互联网、车联网、IT 运维、金融等领域。除核心的时序数据库功能外,TDengine 还提供[缓存](/develop/cache/)、[数据订阅](/develop/subscribe)、[流式计算](/develop/continuous-query)等功能,是一极简的时序数据处理平台,最大程度的减小系统设计的复杂度,降低研发和运营成本。 +TDengine 是一款[开源](https://www.taosdata.com/tdengine/open_source_time-series_database)、[高性能](https://www.taosdata.com/tdengine/fast)、[云原生](https://www.taosdata.com/tdengine/cloud_native_time-series_database)的时序数据库 (Time-Series Database, TSDB)。TDengine 能被广泛运用于物联网、工业互联网、车联网、IT 运维、金融等领域。除核心的时序数据库功能外,TDengine 还提供[缓存](../develop/cache/)、[数据订阅](../develop/subscribe)、[流式计算](../develop/continuous-query)等功能,是一极简的时序数据处理平台,最大程度的减小系统设计的复杂度,降低研发和运营成本。 本章节介绍TDengine的主要功能、竞争优势、适用场景、与其他数据库的对比测试等等,让大家对TDengine有个整体的了解。 @@ -11,22 +11,22 @@ TDengine 是一款[开源](https://www.taosdata.com/tdengine/open_source_time-se TDengine的主要功能如下: -1. 高速数据写入,除 [SQL 写入](/develop/insert-data/sql-writing)外,还支持 [Schemaless 写入](/reference/schemaless/),支持 [InfluxDB LINE 协议](/develop/insert-data/influxdb-line),[OpenTSDB Telnet](/develop/insert-data/opentsdb-telnet), [OpenTSDB JSON ](/develop/insert-data/opentsdb-json)等协议写入; -2. 第三方数据采集工具 [Telegraf](/third-party/telegraf),[Prometheus](/third-party/prometheus),[StatsD](/third-party/statsd),[collectd](/third-party/collectd),[icinga2](/third-party/icinga2), [TCollector](/third-party/tcollector), [EMQ](/third-party/emq-broker), [HiveMQ](/third-party/hive-mq-broker) 等都可以进行配置后,不用任何代码,即可将数据写入; -3. 支持[各种查询](/develop/query-data),包括聚合查询、嵌套查询、降采样查询、插值等 -4. 支持[用户自定义函数](/develop/udf) -5. 支持[缓存](/develop/cache),将每张表的最后一条记录缓存起来,这样无需 Redis -6. 支持[流式计算](/develop/continuous-query)(Stream Processing) -7. 支持[数据订阅](/develop/subscribe),而且可以指定过滤条件 -8. 支持[集群](/cluster/),可以通过多节点进行水平扩展,并通过多副本实现高可靠 -9. 提供[命令行程序](/reference/taos-shell),便于管理集群,检查系统状态,做即席查询 -10. 提供多种数据的[导入](/operation/import)、[导出](/operation/export) -11. 支持对[TDengine 集群本身的监控](/operation/monitor) -12. 提供 [C/C++](/reference/connector/cpp), [Java](/reference/connector/java), [Python](/reference/connector/python), [Go](/reference/connector/go), [Rust](/reference/connector/rust), [Node.js](/reference/connector/node) 等多种编程语言的[连接器](/reference/connector/) -13. 支持 [REST 接口](/reference/rest-api/) -14. 支持与[ Grafana 无缝集成](/third-party/grafana) +1. 高速数据写入,除 [SQL 写入](../develop/insert-data/sql-writing)外,还支持 [Schemaless 写入](../reference/schemaless/),支持 [InfluxDB LINE 协议](../develop/insert-data/influxdb-line),[OpenTSDB Telnet](../develop/insert-data/opentsdb-telnet), [OpenTSDB JSON ](../develop/insert-data/opentsdb-json)等协议写入; +2. 第三方数据采集工具 [Telegraf](../third-party/telegraf),[Prometheus](../third-party/prometheus),[StatsD](../third-party/statsd),[collectd](../third-party/collectd),[icinga2](../third-party/icinga2), [TCollector](../third-party/tcollector), [EMQ](../third-party/emq-broker), [HiveMQ](../third-party/hive-mq-broker) 等都可以进行配置后,不用任何代码,即可将数据写入; +3. 支持[各种查询](../develop/query-data),包括聚合查询、嵌套查询、降采样查询、插值等 +4. 支持[用户自定义函数](../develop/udf) +5. 支持[缓存](../develop/cache),将每张表的最后一条记录缓存起来,这样无需 Redis +6. 支持[流式计算](../develop/continuous-query)(Stream Processing) +7. 支持[数据订阅](../develop/subscribe),而且可以指定过滤条件 +8. 支持[集群](../cluster/),可以通过多节点进行水平扩展,并通过多副本实现高可靠 +9. 提供[命令行程序](../reference/taos-shell),便于管理集群,检查系统状态,做即席查询 +10. 提供多种数据的[导入](../operation/import)、[导出](../operation/export) +11. 支持对[TDengine 集群本身的监控](../operation/monitor) +12. 提供 [C/C++](../reference/connector/cpp), [Java](../reference/connector/java), [Python](../reference/connector/python), [Go](../reference/connector/go), [Rust](../reference/connector/rust), [Node.js](../reference/connector/node) 等多种编程语言的[连接器](../reference/connector/) +13. 支持 [REST 接口](../reference/rest-api/) +14. 支持与[ Grafana 无缝集成](../third-party/grafana) 15. 支持与 Google Data Studio 无缝集成 -16. 支持 [Kubenetes 部署](/deployment/k8s/) +16. 支持 [Kubenetes 部署](../deployment/k8s) 更多细小的功能,请阅读整个文档。 From 15fae2418ca7359551ba72d67fc16634aac4f900 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 11 Aug 2022 23:13:45 +0800 Subject: [PATCH 35/52] enh: show command optimize --- tests/pytest/insert/insert_locking.py | 2 +- tests/script/tmp/data.sim | 4 ++-- tests/script/tmp/prepare.sim | 2 +- tests/script/tsim/stable/alter_comment.sim | 16 ++++++++-------- tests/script/tsim/stable/column_add.sim | 8 ++++---- tests/script/tsim/stable/column_drop.sim | 8 ++++---- tests/script/tsim/stable/metrics.sim | 6 +++--- tests/script/tsim/stable/tag_add.sim | 8 ++++---- tests/script/tsim/stable/tag_drop.sim | 10 +++++----- tests/script/tsim/table/autocreate.sim | 6 +++--- tests/script/tsim/table/basic3.sim | 8 ++++---- tests/script/tsim/table/createmulti.sim | 8 ++++---- tests/script/tsim/user/privilege_sysinfo.sim | 4 ++-- tests/script/tsim/valgrind/checkError5.sim | 4 ++-- tests/system-test/1-insert/table_comment.py | 4 ++-- tests/system-test/2-query/distribute_agg_sum.py | 2 +- tests/system-test/2-query/twa.py | 2 +- .../5-taos-tools/taosdump/taosdumpTestColTag.py | 10 +++++----- 18 files changed, 56 insertions(+), 56 deletions(-) diff --git a/tests/pytest/insert/insert_locking.py b/tests/pytest/insert/insert_locking.py index dc320edd1f..d62c2e525d 100644 --- a/tests/pytest/insert/insert_locking.py +++ b/tests/pytest/insert/insert_locking.py @@ -41,7 +41,7 @@ class TDTestCase: tdSql.execute('''create stable db.stable_1 (ts timestamp, payload binary(256)) tags(t1 binary(16),t2 int);''') - sql = '''show db.stables;''' + sql = '''select * from information_schema.ins_stables where db_name = 'db';''' tdSql.query(sql) tdSql.checkRows(1) diff --git a/tests/script/tmp/data.sim b/tests/script/tmp/data.sim index 6b7ab81529..c59a43263b 100644 --- a/tests/script/tmp/data.sim +++ b/tests/script/tmp/data.sim @@ -118,8 +118,8 @@ sql use db; sql create table stb (ts timestamp, c int) tags (t int); sql create table t0 using stb tags (0); sql insert into t0 values(now, 1); -sql show db.stables; -sql show db.tables; +sql select * from information_schema.ins_stables where db_name = 'db'; +sql select * from information_schema.ins_tables where db_name = 'db'; sql show db.vgroups; return diff --git a/tests/script/tmp/prepare.sim b/tests/script/tmp/prepare.sim index 2e16ee7bda..0ddd6a3ba7 100644 --- a/tests/script/tmp/prepare.sim +++ b/tests/script/tmp/prepare.sim @@ -35,5 +35,5 @@ sql use db; sql create table if not exists stb (ts timestamp, c1 int, c2 float, c3 double) tags (t1 int unsigned); sql create table ct1 using stb tags(1000); sql create table ct2 using stb tags(1000) ; -sql show db.tables; +sql select * from information_schema.ins_tables where db_name = 'db'; sql insert into ct1 values(now+0s, 10, 2.0, 3.0); \ No newline at end of file diff --git a/tests/script/tsim/stable/alter_comment.sim b/tests/script/tsim/stable/alter_comment.sim index 19f4858585..beb049985c 100644 --- a/tests/script/tsim/stable/alter_comment.sim +++ b/tests/script/tsim/stable/alter_comment.sim @@ -8,7 +8,7 @@ sql create database db sql use db sql create table db.stb (ts timestamp, c1 int, c2 binary(4)) tags(t1 int, t2 float, t3 binary(16)) comment "abd" -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $rows != 1 then return -1 endi @@ -33,7 +33,7 @@ sql alter table db.stb add column c3 int sql alter table db.stb add column c4 bigint sql alter table db.stb add column c5 binary(12) -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $rows != 1 then return -1 endi @@ -54,7 +54,7 @@ sql_error alter table db.stb drop column t3 sql alter table db.stb drop column c1 sql alter table db.stb drop column c4 -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $rows != 1 then return -1 endi @@ -73,7 +73,7 @@ sql_error alter table db.stb MODIFY column t3 binary(20) sql_error alter table db.stb MODIFY column c2 binary(3) sql alter table db.stb MODIFY column c2 binary(32) -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $rows != 1 then return -1 endi @@ -98,7 +98,7 @@ sql alter table db.stb add tag t4 bigint sql alter table db.stb add tag c1 int sql alter table db.stb add tag t5 binary(12) -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $rows != 1 then return -1 endi @@ -119,7 +119,7 @@ sql_error alter table db.stb drop tag tx sql alter table db.stb drop tag c1 sql alter table db.stb drop tag t5 -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $rows != 1 then return -1 endi @@ -139,7 +139,7 @@ sql_error alter table db.stb MODIFY tag t1 binary(20) sql_error alter table db.stb MODIFY tag tx binary(20) sql alter table db.stb MODIFY tag t3 binary(32) -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $rows != 1 then return -1 endi @@ -161,7 +161,7 @@ print ========== alter common sql alter table db.stb comment 'abcde' ; sql_error alter table db.stb ttl 10 ; -sql show db.stables; +sql select * from information_schema.ins_stables where db_name = 'db'; if $data[0][6] != abcde then return -1 endi diff --git a/tests/script/tsim/stable/column_add.sim b/tests/script/tsim/stable/column_add.sim index db592e6c69..c0f3b4f490 100644 --- a/tests/script/tsim/stable/column_add.sim +++ b/tests/script/tsim/stable/column_add.sim @@ -9,7 +9,7 @@ sql create table db.stb (ts timestamp, c1 int, c2 binary(4)) tags(t1 int, t2 flo sql create table db.ctb using db.stb tags(101, 102, "103") sql insert into db.ctb values(now, 1, "2") -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $rows != 1 then return -1 endi @@ -29,7 +29,7 @@ if $data[0][6] != abd then return -1 endi -sql show db.tables +sql select * from information_schema.ins_tables where db_name = 'db' if $rows != 1 then return -1 endi @@ -74,12 +74,12 @@ sql_error alter table db.stb add column c1 int print ========== step1 add column c3 sql alter table db.stb add column c3 int -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $data[0][3] != 4 then return -1 endi -sql show db.tables +sql select * from information_schema.ins_tables where db_name = 'db' if $data[0][3] != 4 then return -1 endi diff --git a/tests/script/tsim/stable/column_drop.sim b/tests/script/tsim/stable/column_drop.sim index 63ac44eccd..0aa7c7035f 100644 --- a/tests/script/tsim/stable/column_drop.sim +++ b/tests/script/tsim/stable/column_drop.sim @@ -9,7 +9,7 @@ sql create table db.stb (ts timestamp, c1 int, c2 binary(4), c3 int, c4 bigint, sql create table db.ctb using db.stb tags(101, 102, "103") sql insert into db.ctb values(now, 1, "2", 3, 4, 5, 6) -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $rows != 1 then return -1 endi @@ -29,7 +29,7 @@ if $data[0][6] != abd then return -1 endi -sql show db.tables +sql select * from information_schema.ins_tables where db_name = 'db' if $rows != 1 then return -1 endi @@ -86,12 +86,12 @@ sql_error alter table db.stb drop column c9 print ========== step1 drop column c6 sql alter table db.stb drop column c6 -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $data[0][3] != 6 then return -1 endi -sql show db.tables +sql select * from information_schema.ins_tables where db_name = 'db' if $data[0][3] != 6 then return -1 endi diff --git a/tests/script/tsim/stable/metrics.sim b/tests/script/tsim/stable/metrics.sim index 055c7ea78d..896f6fa3c8 100644 --- a/tests/script/tsim/stable/metrics.sim +++ b/tests/script/tsim/stable/metrics.sim @@ -34,7 +34,7 @@ endi print =============== step3 sql create table $mt (ts timestamp, speed int) TAGS(sp int) -sql show stables +sql select * from information_schema.ins_stables where db_name = '$@db@' if $rows != 1 then return -1 endi @@ -60,7 +60,7 @@ $i = 2 $tb = $tbPrefix . $i sql create table $tb using $mt tags(3) -sql show tables +sql select * from information_schema.ins_tables where db_name = '$@db@' if $rows != 3 then return -1 endi @@ -68,7 +68,7 @@ if $data04 != $mt then return -1 endi -sql show stables +sql select * from information_schema.ins_stables where db_name = '$@db@' if $rows != 1 then return -1 endi diff --git a/tests/script/tsim/stable/tag_add.sim b/tests/script/tsim/stable/tag_add.sim index a7615df14c..7ee9aee974 100644 --- a/tests/script/tsim/stable/tag_add.sim +++ b/tests/script/tsim/stable/tag_add.sim @@ -9,7 +9,7 @@ sql create table db.stb (ts timestamp, c1 int, c2 binary(4)) tags(t1 int, t2 bin sql create table db.ctb using db.stb tags(101, "102") sql insert into db.ctb values(now, 1, "2") -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $rows != 1 then return -1 endi @@ -29,7 +29,7 @@ if $data[0][6] != abd then return -1 endi -sql show db.tables +sql select * from information_schema.ins_tables where db_name = 'db' if $rows != 1 then return -1 endi @@ -78,12 +78,12 @@ sql_error alter table db.stb add tag c2 int print ========== step1 add tag t3 sql alter table db.stb add tag t3 int -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $data[0][3] != 3 then return -1 endi -sql show db.tables +sql select * from information_schema.ins_tables where db_name = 'db' if $data[0][3] != 3 then return -1 endi diff --git a/tests/script/tsim/stable/tag_drop.sim b/tests/script/tsim/stable/tag_drop.sim index 50907be23e..7902358817 100644 --- a/tests/script/tsim/stable/tag_drop.sim +++ b/tests/script/tsim/stable/tag_drop.sim @@ -9,7 +9,7 @@ sql create table db.stb (ts timestamp, c1 int, c2 binary(4)) tags(t1 int, t2 bin sql create table db.ctb using db.stb tags(101, "102") sql insert into db.ctb values(now, 1, "2") -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $rows != 1 then return -1 endi @@ -29,7 +29,7 @@ if $data[0][6] != abd then return -1 endi -sql show db.tables +sql select * from information_schema.ins_tables where db_name = 'db' if $rows != 1 then return -1 endi @@ -78,7 +78,7 @@ sql_error alter table db.stb drop tag c2 int print ========== step1 drop tag t2 sql alter table db.stb drop tag t2 -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $data[0][4] != 1 then return -1 endi @@ -112,7 +112,7 @@ endi print ========== step2 add tag t3 sql alter table db.stb add tag t3 int -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $data[0][4] != 2 then return -1 endi @@ -300,7 +300,7 @@ endi print ========== step7 drop tag t1 sql alter table db.stb drop tag t1 -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $data[0][4] != 3 then return -1 endi diff --git a/tests/script/tsim/table/autocreate.sim b/tests/script/tsim/table/autocreate.sim index 50ce0c6af7..9d1d1563b8 100644 --- a/tests/script/tsim/table/autocreate.sim +++ b/tests/script/tsim/table/autocreate.sim @@ -15,7 +15,7 @@ print $data00 $data01 $data02 print =============== create super table sql create table db.st1 (ts timestamp, i int) tags (j int) sql create table db.st2 (ts timestamp, i int, j int) tags (t1 int, t2 int, t3 int) -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $rows != 2 then return -1 endi @@ -32,7 +32,7 @@ sql insert into db.c2 using db.st1 tags(2) values(now+1s, 2); sql insert into db.c3 using db.st1 tags(3) values(now+1s, 3); sql insert into db.c4 using db.st1 tags(4) values(now+1s, 4); -sql show db.tables +sql select * from information_schema.ins_tables where db_name = 'db' if $rows != 4 then return -1 endi @@ -76,7 +76,7 @@ sql insert into db.s2 using db.st2 tags(2, 2, 2) values(now+2s, 2, 3); sql insert into db.s3 using db.st2 tags(3, 3, 3) values(now+2s, 3, 4); sql insert into db.s4 using db.st2 tags(4, 4, 4) values(now+2s, 4, 5); -sql show db.tables +sql select * from information_schema.ins_tables where db_name = 'db' if $rows != 8 then return -1 endi diff --git a/tests/script/tsim/table/basic3.sim b/tests/script/tsim/table/basic3.sim index 35cdb74b99..69bf9bb926 100644 --- a/tests/script/tsim/table/basic3.sim +++ b/tests/script/tsim/table/basic3.sim @@ -14,7 +14,7 @@ print $data00 $data01 $data02 print =============== create normal table sql create table db.n1 (ts timestamp, i int) -sql show db.tables +sql select * from information_schema.ins_tables where db_name = 'db' if $rows != 1 then return -1 endi @@ -23,7 +23,7 @@ print $data00 $data01 $data02 print =============== create super table sql create table db.st (ts timestamp, i int) tags (j int) -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $rows != 1 then return -1 endi @@ -33,7 +33,7 @@ print $data00 $data01 $data02 print =============== create child table sql create table db.c1 using db.st tags(1) sql create table db.c2 using db.st tags(2) -sql show db.tables +sql select * from information_schema.ins_tables where db_name = 'db' if $rows != 3 then return -1 endi @@ -71,7 +71,7 @@ endi print =============== drop stable sql drop table db.st -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $rows != 0 then return -1 endi diff --git a/tests/script/tsim/table/createmulti.sim b/tests/script/tsim/table/createmulti.sim index a73b1bfe8a..c9ba4e643e 100644 --- a/tests/script/tsim/table/createmulti.sim +++ b/tests/script/tsim/table/createmulti.sim @@ -15,7 +15,7 @@ print $data00 $data01 $data02 print =============== create super table sql create table db.st1 (ts timestamp, i int) tags (j int) sql create table db.st2 (ts timestamp, i int, j int) tags (t1 int, t2 int, t3 int) -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' if $rows != 2 then return -1 endi @@ -25,19 +25,19 @@ print $data00 $data01 $data02 print =============== create multiple child tables sql create table db.ct1 using db.st1 tags(1) db.ct2 using db.st1 tags(2); -sql show db.tables +sql select * from information_schema.ins_tables where db_name = 'db' if $rows != 2 then return -1 endi sql create table db.ct3 using db.st2 tags(1, 1, 1) db.ct4 using db.st2 tags(2, 2, 2); -sql show db.tables +sql select * from information_schema.ins_tables where db_name = 'db' if $rows != 4 then return -1 endi sql create table db.ct5 using db.st1 tags(3) db.ct6 using db.st2 tags(3, 3, 3); -sql show db.tables +sql select * from information_schema.ins_tables where db_name = 'db' if $rows != 6 then return -1 endi diff --git a/tests/script/tsim/user/privilege_sysinfo.sim b/tests/script/tsim/user/privilege_sysinfo.sim index 3f81037af4..718083f0d9 100644 --- a/tests/script/tsim/user/privilege_sysinfo.sim +++ b/tests/script/tsim/user/privilege_sysinfo.sim @@ -45,8 +45,8 @@ sql_error drop database db sql_error use db sql_error alter database db replica 1; sql_error show db.vgroups -sql_error show db.stables -sql_error show db.tables +sql_error select * from information_schema.ins_stables where db_name = 'db' +sql_error select * from information_schema.ins_tables where db_name = 'db' print =============== check show sql_error select * from information_schema.ins_users diff --git a/tests/script/tsim/valgrind/checkError5.sim b/tests/script/tsim/valgrind/checkError5.sim index ef37951e77..fe8f588a44 100644 --- a/tests/script/tsim/valgrind/checkError5.sim +++ b/tests/script/tsim/valgrind/checkError5.sim @@ -68,13 +68,13 @@ sql select * from tb order by ts desc print =============== step5: alter stb and insert data sql create table stb (ts timestamp, c1 int, c2 binary(4)) tags(t1 int, t2 float, t3 binary(16)) comment "abd" -sql show db.stables +sql select * from information_schema.ins_stables where db_name = 'db' sql describe stb sql_error alter table stb add column ts int sql create table db.ctb using db.stb tags(101, 102, "103") sql insert into db.ctb values(now, 1, "2") -sql show db.tables +sql select * from information_schema.ins_tables where db_name = 'db' sql select * from db.stb sql select * from tb diff --git a/tests/system-test/1-insert/table_comment.py b/tests/system-test/1-insert/table_comment.py index 465179855e..a0ae364fcd 100644 --- a/tests/system-test/1-insert/table_comment.py +++ b/tests/system-test/1-insert/table_comment.py @@ -105,13 +105,13 @@ class TDTestCase: tdSql.error(f'alter table {tbname} comment "{comment_info}"') def check_comment_info(self,comment_info=None,tb_type=''): if tb_type == '' or tb_type == 'normal_table' or tb_type == 'child_table': - tdSql.query('show tables') + tdSql.query('select * from information_schema.ins_tables where db_name = \'db\'') if comment_info == None: tdSql.checkEqual(tdSql.queryResult[0][8],None) else : tdSql.checkEqual(tdSql.queryResult[0][8],comment_info) elif tb_type == 'stable': - tdSql.query('show stables') + tdSql.query('select * from information_schema.ins_stables where db_name = \'db\'') if comment_info == None: tdSql.checkEqual(tdSql.queryResult[0][6],None) else : diff --git a/tests/system-test/2-query/distribute_agg_sum.py b/tests/system-test/2-query/distribute_agg_sum.py index 90946f388d..9be4602fd9 100644 --- a/tests/system-test/2-query/distribute_agg_sum.py +++ b/tests/system-test/2-query/distribute_agg_sum.py @@ -109,7 +109,7 @@ class TDTestCase: vnode_tables[vgroup_id[0]]=[] # check sub_table of per vnode ,make sure sub_table has been distributed - tdSql.query(f"show {dbname}.tables like 'ct%'") + tdSql.query(f"select * from information_schema.ins_tables where db_name = '{dbname}' and table_name like 'ct%'") table_names = tdSql.queryResult tablenames = [] for table_name in table_names: diff --git a/tests/system-test/2-query/twa.py b/tests/system-test/2-query/twa.py index 108f955977..8281527bd4 100644 --- a/tests/system-test/2-query/twa.py +++ b/tests/system-test/2-query/twa.py @@ -69,7 +69,7 @@ class TDTestCase: vnode_tables[vgroup_id[0]]=[] # check sub_table of per vnode ,make sure sub_table has been distributed - tdSql.query("show tables like 'ct%'") + tdSql.query(f"select * from information_schema.ins_tables where db_name = 'testdb' and table_name like 'ct%'") table_names = tdSql.queryResult tablenames = [] for table_name in table_names: diff --git a/tests/system-test/5-taos-tools/taosdump/taosdumpTestColTag.py b/tests/system-test/5-taos-tools/taosdump/taosdumpTestColTag.py index eb4de435ec..8c62f713b8 100644 --- a/tests/system-test/5-taos-tools/taosdump/taosdumpTestColTag.py +++ b/tests/system-test/5-taos-tools/taosdump/taosdumpTestColTag.py @@ -288,16 +288,16 @@ class TDTestCase: datacheck = self.table1_checkall(sql) tdSql.checkRows(4) - tdSql.query("show db.stables like 'stable_1%' ") + tdSql.query("select * from information_schema.ins_stables where db_name = 'db' like 'stable_1%' ") tdSql.checkRows(1) - tdSql.query("show db.tables like 'table%' ") + tdSql.query("select * from information_schema.ins_tables where db_name = 'db' like 'table%' ") tdSql.checkRows(2) self.cr_tb1 = "create_table_1~!@#$%^&*()-_+=[]{}':,<.>/?stST13579" tdSql.execute( "create table db.`%s` as select avg(`%s`) from db.`%s` where ts > now interval(1m) sliding(30s);" % (self.cr_tb1, self.col_bigint, self.stb1)) - tdSql.query("show db.tables like 'create_table_%' ") + tdSql.query("select * from information_schema.ins_tables where db_name = 'db' like 'create_table_%' ") tdSql.checkRows(1) print(r"==============drop\ add\ change\ modify column or tag") @@ -696,7 +696,7 @@ class TDTestCase: tdLog.exit(e) tdSql.error("select * from db.`%s`" % self.tb1) - tdSql.query("show db.stables like 'stable_1%' ") + tdSql.query("select * from information_schema.ins_stables where db_name = 'db' like 'stable_1%' ") tdSql.checkRows(1) try: @@ -785,7 +785,7 @@ class TDTestCase: tdSql.execute( "create table `%s` as select * from `%s` ;" % (self.cr_tb2, self.stb2)) - tdSql.query("show db.tables like 'create_table_%' ") + tdSql.query("select * from information_schema.ins_tables where db_name = 'db' like 'create_table_%' ") tdSql.checkRows(1) print("==============step3,#create regular_table; insert regular_table; show regular_table; select regular_table; drop regular_table") From 22b214afc01ca730d0eca149b7be34b82be34613 Mon Sep 17 00:00:00 2001 From: Bo Ding Date: Thu, 11 Aug 2022 23:18:26 +0800 Subject: [PATCH 36/52] docs: fix links (#16018) * docs: fix links * Update 02-intro.md --- docs/zh/02-intro.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/zh/02-intro.md b/docs/zh/02-intro.md index e561114929..e3ab7459c0 100644 --- a/docs/zh/02-intro.md +++ b/docs/zh/02-intro.md @@ -16,9 +16,9 @@ TDengine的主要功能如下: 3. 支持[各种查询](../develop/query-data),包括聚合查询、嵌套查询、降采样查询、插值等 4. 支持[用户自定义函数](../develop/udf) 5. 支持[缓存](../develop/cache),将每张表的最后一条记录缓存起来,这样无需 Redis -6. 支持[流式计算](../develop/continuous-query)(Stream Processing) -7. 支持[数据订阅](../develop/subscribe),而且可以指定过滤条件 -8. 支持[集群](../cluster/),可以通过多节点进行水平扩展,并通过多副本实现高可靠 +6. 支持[流式计算](../develop/stream)(Stream Processing) +7. 支持[数据订阅](../develop/tmq),而且可以指定过滤条件 +8. 支持[集群](../deployment/),可以通过多节点进行水平扩展,并通过多副本实现高可靠 9. 提供[命令行程序](../reference/taos-shell),便于管理集群,检查系统状态,做即席查询 10. 提供多种数据的[导入](../operation/import)、[导出](../operation/export) 11. 支持对[TDengine 集群本身的监控](../operation/monitor) From 2e9cadfe898d08415b20fb73f4b2aea469b19872 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Thu, 11 Aug 2022 23:20:13 +0800 Subject: [PATCH 37/52] fix: improve create stream check --- source/libs/parser/test/parSelectTest.cpp | 10 ---------- source/libs/planner/test/planBasicTest.cpp | 2 -- 2 files changed, 12 deletions(-) diff --git a/source/libs/parser/test/parSelectTest.cpp b/source/libs/parser/test/parSelectTest.cpp index 5b222a8dec..716dd7ffc0 100644 --- a/source/libs/parser/test/parSelectTest.cpp +++ b/source/libs/parser/test/parSelectTest.cpp @@ -294,16 +294,6 @@ TEST_F(ParserSelectTest, intervalSemanticCheck) { TEST_F(ParserSelectTest, interp) { useDb("root", "test"); - run("SELECT INTERP(c1) FROM t1"); - - run("SELECT INTERP(c1) FROM t1 RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00')"); - - run("SELECT INTERP(c1) FROM t1 RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00') FILL(LINEAR)"); - - run("SELECT INTERP(c1) FROM t1 EVERY(5s)"); - - run("SELECT INTERP(c1) FROM t1 RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00') EVERY(5s)"); - run("SELECT INTERP(c1) FROM t1 RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00') EVERY(5s) FILL(LINEAR)"); } diff --git a/source/libs/planner/test/planBasicTest.cpp b/source/libs/planner/test/planBasicTest.cpp index d7c947a20d..27ec409d52 100644 --- a/source/libs/planner/test/planBasicTest.cpp +++ b/source/libs/planner/test/planBasicTest.cpp @@ -93,8 +93,6 @@ TEST_F(PlanBasicTest, tailFunc) { TEST_F(PlanBasicTest, interpFunc) { useDb("root", "test"); - run("SELECT INTERP(c1) FROM t1"); - run("SELECT INTERP(c1) FROM t1 RANGE('2017-7-14 18:00:00', '2017-7-14 19:00:00') EVERY(5s) FILL(LINEAR)"); } From 465a3db8ac2cb4e9106eba5d8359900782148d70 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 11 Aug 2022 23:23:12 +0800 Subject: [PATCH 38/52] feat: update taostools 43924b8 for3.0 (#16016) * feat: update taos-tools for 3.0 [TD-14141] * feat: update taos-tools for 3.0 * feat: update taos-tools for 3.0 * feat: update taos-tools for 3.0 * feat: update taos-tools for 3.0 * feat: update taos-tools for 3.0 * feat: update taos-tools for 3.0 * feat: update taos-tools for 3.0 * feat: update taos-tools for 3.0 * feat: update taos-tools for 3.0 * feat: update taos-tools 8e3b3ee * fix: remove submodules * feat: update taos-tools c529299 * feat: update taos-tools 9dc2fec for 3.0 * fix: optim upx * feat: update taos-tools f4e456a for 3.0 * feat: update taos-tools 2a2def1 for 3.0 * feat: update taos-tools c9cc20f for 3.0 * feat: update taostoosl 8a5e336 for 3.0 * feat: update taostools 3c7dafe for 3.0 * feat: update taos-tools 2d68404 for 3.0 * feat: update taos-tools 57bdfbf for 3.0 * fix: jenkinsfile2 to upgrade pip * feat: update taostoosl 11d23e5 for 3.0 * feat: update taostools 43924b8 for 3.0 --- cmake/taostools_CMakeLists.txt.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/taostools_CMakeLists.txt.in b/cmake/taostools_CMakeLists.txt.in index 04c85eeaa5..989f90a150 100644 --- a/cmake/taostools_CMakeLists.txt.in +++ b/cmake/taostools_CMakeLists.txt.in @@ -2,7 +2,7 @@ # taos-tools ExternalProject_Add(taos-tools GIT_REPOSITORY https://github.com/taosdata/taos-tools.git - GIT_TAG 11d23e5 + GIT_TAG 43924b8 SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools" BINARY_DIR "" #BUILD_IN_SOURCE TRUE From 03a39381c09fc7372edaf1b15bb033ddf6e78ea3 Mon Sep 17 00:00:00 2001 From: Xiaoyu Wang Date: Fri, 12 Aug 2022 00:07:24 +0800 Subject: [PATCH 39/52] enh: show command optimize --- source/libs/parser/src/parTranslater.c | 2 +- tests/script/tsim/parser/union.sim | 2 +- tests/system-test/0-others/taosShell.py | 2 +- tests/system-test/0-others/taosShellError.py | 2 +- tests/system-test/0-others/user_control.py | 24 ++++----- tests/system-test/2-query/bottom.py | 2 +- .../2-query/distribute_agg_apercentile.py | 2 +- .../system-test/2-query/distribute_agg_avg.py | 2 +- .../2-query/distribute_agg_count.py | 2 +- .../system-test/2-query/distribute_agg_max.py | 2 +- .../system-test/2-query/distribute_agg_min.py | 2 +- .../2-query/distribute_agg_spread.py | 2 +- .../2-query/distribute_agg_stddev.py | 2 +- tests/system-test/2-query/explain.py | 4 +- tests/system-test/2-query/first.py | 2 +- tests/system-test/2-query/hyperloglog.py | 2 +- tests/system-test/2-query/last.py | 2 +- tests/system-test/2-query/max.py | 2 +- tests/system-test/2-query/top.py | 2 +- tests/system-test/2-query/ttl_comment.py | 54 +++++++++---------- 20 files changed, 58 insertions(+), 58 deletions(-) diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index e7eff7588e..ba97d47e19 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -166,7 +166,7 @@ static const SSysTableShowAdapter sysTableShowAdapter[] = { .pDbName = TSDB_INFORMATION_SCHEMA_DB, .pTableName = TSDB_INS_TABLE_USERS, .numOfShowCols = 1, - .pShowCols = {"name"} + .pShowCols = {"*"} }, { .showType = QUERY_NODE_SHOW_LICENCES_STMT, diff --git a/tests/script/tsim/parser/union.sim b/tests/script/tsim/parser/union.sim index a82e8fe959..8bafeff444 100644 --- a/tests/script/tsim/parser/union.sim +++ b/tests/script/tsim/parser/union.sim @@ -365,6 +365,6 @@ endi sql_error (show tables) union all (show tables) sql_error (show stables) union all (show stables) -sql_error (select * from information_schema.ins_databases) union all (select * from information_schema.ins_databases) +sql_error (show databases) union all (show databases) system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/system-test/0-others/taosShell.py b/tests/system-test/0-others/taosShell.py index ed53f74d66..879d78e7ac 100644 --- a/tests/system-test/0-others/taosShell.py +++ b/tests/system-test/0-others/taosShell.py @@ -302,7 +302,7 @@ class TDTestCase: else: sql3 = "echo 'create table ntbf (ts timestamp, c binary(40))' >> " + sqlFile sql4 = "echo 'insert into ntbf values (\"2021-04-01 08:00:00.000\", \"test taos -f1\")(\"2021-04-01 08:00:01.000\", \"test taos -f2\")' >> " + sqlFile - sql5 = "echo select * from information_schema.ins_databases >> " + sqlFile + sql5 = "echo show databases >> " + sqlFile os.system(sql1) os.system(sql2) os.system(sql3) diff --git a/tests/system-test/0-others/taosShellError.py b/tests/system-test/0-others/taosShellError.py index 0b9baaa512..0dca5ff40f 100644 --- a/tests/system-test/0-others/taosShellError.py +++ b/tests/system-test/0-others/taosShellError.py @@ -244,7 +244,7 @@ class TDTestCase: else: sql3 = "echo 'create table ntbf (ts timestamp, c binary(40)) no this item' >> " + sqlFile sql4 = "echo 'insert into ntbf values (\"2021-04-01 08:00:00.000\", \"test taos -f1\")(\"2021-04-01 08:00:01.000\", \"test taos -f2\")' >> " + sqlFile - sql5 = "echo select * from information_schema.ins_databases >> " + sqlFile + sql5 = "echo show databases >> " + sqlFile os.system(sql1) os.system(sql2) os.system(sql3) diff --git a/tests/system-test/0-others/user_control.py b/tests/system-test/0-others/user_control.py index 35752f5ba9..3be59f0adf 100644 --- a/tests/system-test/0-others/user_control.py +++ b/tests/system-test/0-others/user_control.py @@ -196,7 +196,7 @@ class TDTestCase: for i in range(self.users_count): tdSql.execute(f"create user {users[i]} pass '{passwds[i]}' ") - tdSql.query("select * from information_schema.ins_users") + tdSql.query("show users") tdSql.checkRows(self.users_count + 1) def create_user_err(self): @@ -586,7 +586,7 @@ class TDTestCase: # 默认只有 root 用户 tdLog.printNoPrefix("==========step0: init, user list only has root account") - tdSql.query("select * from information_schema.ins_users") + tdSql.query("show users") tdSql.checkData(0, 0, "root") tdSql.checkData(0, 1, "1") @@ -597,7 +597,7 @@ class TDTestCase: # 查看用户 tdLog.printNoPrefix("==========step2: show user test") - tdSql.query("select * from information_schema.ins_users") + tdSql.query("show users") tdSql.checkRows(self.users_count + 1) # 密码登录认证 @@ -619,7 +619,7 @@ class TDTestCase: tdDnodes.stop(1) tdDnodes.start(1) - tdSql.query("select * from information_schema.ins_users") + tdSql.query("show users") tdSql.checkRows(self.users_count + 1) # 普通用户权限 @@ -632,7 +632,7 @@ class TDTestCase: user.error("create use utest1 pass 'utest1pass'") # 可以查看用户 tdLog.printNoPrefix("==========step4.2: normal user can show user") - user.query("select * from information_schema.ins_users") + user.query("show users") assert user.queryRows == self.users_count + 1 # 不可以修改其他用户的密码 tdLog.printNoPrefix("==========step4.3: normal user can not alter other user pass") @@ -649,12 +649,12 @@ class TDTestCase: tdLog.printNoPrefix("==========step5: enable info") taos1_conn = taos.connect(user=self.__user_list[1], password=f"new{self.__passwd_list[1]}") - taos1_conn.query(f"select * from information_schema.ins_databases") + taos1_conn.query(f"show databases") tdSql.execute(f"alter user {self.__user_list[1]} enable 0") tdSql.execute(f"alter user {self.__user_list[2]} enable 0") taos1_except = True try: - taos1_conn.query("select * from information_schema.ins_databases") + taos1_conn.query("show databases") except BaseException: taos1_except = False if taos1_except: @@ -674,13 +674,13 @@ class TDTestCase: tdLog.printNoPrefix("==========step6: sysinfo info") taos3_conn = taos.connect(user=self.__user_list[3], password=f"new{self.__passwd_list[3]}") - taos3_conn.query(f"select * from information_schema.ins_dnodes") + taos3_conn.query(f"show dnodes") taos3_conn.query(f"show {DBNAME}.vgroups") tdSql.execute(f"alter user {self.__user_list[3]} sysinfo 0") tdSql.execute(f"alter user {self.__user_list[4]} sysinfo 0") taos3_except = True try: - taos3_conn.query(f"select * from information_schema.ins_dnodes") + taos3_conn.query(f"show dnodes") taos3_conn.query(f"show {DBNAME}.vgroups") except BaseException: taos3_except = False @@ -692,7 +692,7 @@ class TDTestCase: taos4_conn = taos.connect(user=self.__user_list[4], password=f"new{self.__passwd_list[4]}") taos4_except = True try: - taos4_conn.query(f"select * from information_schema.ins_mnodes") + taos4_conn.query(f"show mnodes") taos4_conn.query(f"show {DBNAME}.vgroups") except BaseException: taos4_except = False @@ -705,7 +705,7 @@ class TDTestCase: tdLog.printNoPrefix("==========step7: super user drop normal user") self.test_drop_user() - tdSql.query("select * from information_schema.ins_users") + tdSql.query("show users") tdSql.checkRows(1) tdSql.checkData(0, 0, "root") tdSql.checkData(0, 1, "1") @@ -719,7 +719,7 @@ class TDTestCase: self.login_err(self.__user_list[1], self.__passwd_list[1]) self.login_err(self.__user_list[1], f"new{self.__passwd_list[1]}") - tdSql.query("select * from information_schema.ins_users") + tdSql.query("show users") tdSql.checkRows(1) tdSql.checkData(0, 0, "root") tdSql.checkData(0, 1, "1") diff --git a/tests/system-test/2-query/bottom.py b/tests/system-test/2-query/bottom.py index 923575695f..e75fde3ed4 100644 --- a/tests/system-test/2-query/bottom.py +++ b/tests/system-test/2-query/bottom.py @@ -109,7 +109,7 @@ class TDTestCase: for i in range(self.tbnum): tdSql.execute(f"create table {stbname}_{i} using {stbname} tags({tag_values[0]})") self.insert_data(self.column_dict,f'{stbname}_{i}',self.rowNum) - tdSql.query(f'show {self.dbname}.tables') + tdSql.query(f'select * from information_schema.ins_tables where db_name = "{self.dbname}"') vgroup_list = [] for i in range(len(tdSql.queryResult)): vgroup_list.append(tdSql.queryResult[i][6]) diff --git a/tests/system-test/2-query/distribute_agg_apercentile.py b/tests/system-test/2-query/distribute_agg_apercentile.py index 34164acfa4..9b8ec2ece8 100644 --- a/tests/system-test/2-query/distribute_agg_apercentile.py +++ b/tests/system-test/2-query/distribute_agg_apercentile.py @@ -69,7 +69,7 @@ class TDTestCase: # check sub_table of per vnode ,make sure sub_table has been distributed - tdSql.query(f"show {dbname}.tables like 'ct%'") + tdSql.query(f"select * from information_schema.ins_tables where db_name = '{dbname}' and table_name like 'ct%'") table_names = tdSql.queryResult tablenames = [] for table_name in table_names: diff --git a/tests/system-test/2-query/distribute_agg_avg.py b/tests/system-test/2-query/distribute_agg_avg.py index 3892ae0da1..c54b89a2ba 100644 --- a/tests/system-test/2-query/distribute_agg_avg.py +++ b/tests/system-test/2-query/distribute_agg_avg.py @@ -86,7 +86,7 @@ class TDTestCase: # check sub_table of per vnode ,make sure sub_table has been distributed - tdSql.query(f"show {dbname}.tables like 'ct%'") + tdSql.query(f"select * from information_schema.ins_tables where db_name = '{dbname}' and table_name like 'ct%'") table_names = tdSql.queryResult tablenames = [] for table_name in table_names: diff --git a/tests/system-test/2-query/distribute_agg_count.py b/tests/system-test/2-query/distribute_agg_count.py index 835d1eeb57..f61b6d7c2e 100644 --- a/tests/system-test/2-query/distribute_agg_count.py +++ b/tests/system-test/2-query/distribute_agg_count.py @@ -87,7 +87,7 @@ class TDTestCase: # check sub_table of per vnode ,make sure sub_table has been distributed - tdSql.query(f"show {dbname}.tables like 'ct%'") + tdSql.query(f"select * from information_schema.ins_tables where db_name = '{dbname}' and table_name like 'ct%'") table_names = tdSql.queryResult tablenames = [] for table_name in table_names: diff --git a/tests/system-test/2-query/distribute_agg_max.py b/tests/system-test/2-query/distribute_agg_max.py index f67088d9e6..51b0ad4f94 100644 --- a/tests/system-test/2-query/distribute_agg_max.py +++ b/tests/system-test/2-query/distribute_agg_max.py @@ -88,7 +88,7 @@ class TDTestCase: vnode_tables[vgroup_id[0]]=[] # check sub_table of per vnode ,make sure sub_table has been distributed - tdSql.query(f"show {dbname}.tables like 'ct%'") + tdSql.query(f"select * from information_schema.ins_tables where db_name = '{dbname}' and table_name like 'ct%'") table_names = tdSql.queryResult tablenames = [] for table_name in table_names: diff --git a/tests/system-test/2-query/distribute_agg_min.py b/tests/system-test/2-query/distribute_agg_min.py index 29e7c5f519..543142ddfa 100644 --- a/tests/system-test/2-query/distribute_agg_min.py +++ b/tests/system-test/2-query/distribute_agg_min.py @@ -87,7 +87,7 @@ class TDTestCase: vnode_tables[vgroup_id[0]]=[] # check sub_table of per vnode ,make sure sub_table has been distributed - tdSql.query(f"show {dbname}.tables like 'ct%'") + tdSql.query(f"select * from information_schema.ins_tables where db_name = '{dbname}' and table_name like 'ct%'") table_names = tdSql.queryResult tablenames = [] for table_name in table_names: diff --git a/tests/system-test/2-query/distribute_agg_spread.py b/tests/system-test/2-query/distribute_agg_spread.py index c8957f216d..222bd7315e 100644 --- a/tests/system-test/2-query/distribute_agg_spread.py +++ b/tests/system-test/2-query/distribute_agg_spread.py @@ -111,7 +111,7 @@ class TDTestCase: vnode_tables[vgroup_id[0]]=[] # check sub_table of per vnode ,make sure sub_table has been distributed - tdSql.query(f"show {dbname}.tables like 'ct%'") + tdSql.query(f"select * from information_schema.ins_tables where db_name = '{dbname}' and table_name like 'ct%'") table_names = tdSql.queryResult tablenames = [] for table_name in table_names: diff --git a/tests/system-test/2-query/distribute_agg_stddev.py b/tests/system-test/2-query/distribute_agg_stddev.py index 56768d3be4..6b77fc7368 100644 --- a/tests/system-test/2-query/distribute_agg_stddev.py +++ b/tests/system-test/2-query/distribute_agg_stddev.py @@ -120,7 +120,7 @@ class TDTestCase: vnode_tables[vgroup_id[0]]=[] # check sub_table of per vnode ,make sure sub_table has been distributed - tdSql.query(f"show {dbname}.tables like 'ct%'") + tdSql.query(f"select * from information_schema.ins_tables where db_name = '{dbname}' and table_name like 'ct%'") table_names = tdSql.queryResult tablenames = [] for table_name in table_names: diff --git a/tests/system-test/2-query/explain.py b/tests/system-test/2-query/explain.py index b1d4b39312..7ecf12b917 100644 --- a/tests/system-test/2-query/explain.py +++ b/tests/system-test/2-query/explain.py @@ -185,11 +185,11 @@ class TDTestCase: tdLog.printNoPrefix("===step 0: err case, must return err") tdSql.error( f"explain select hyperloglog({INT_COL}) from {dbname}.ct8" ) - tdSql.error( f"explain select * from information_schema.ins_databases " ) + tdSql.error( f"explain show databases " ) tdSql.error( f"explain show {dbname}.stables " ) tdSql.error( f"explain show {dbname}.tables " ) tdSql.error( f"explain show {dbname}.vgroups " ) - tdSql.error( f"explain select * from information_schema.ins_dnodes " ) + tdSql.error( f"explain show dnodes " ) tdSql.error( f'''explain select hyperloglog(['{INT_COL} + {INT_COL}', '{INT_COL} + {BINT_COL}', '{INT_COL} + {SINT_COL}', '{INT_COL} + {TINT_COL}', '{INT_COL} + {FLOAT_COL}', '{INT_COL} + {DOUBLE_COL}', '{INT_COL} + {BOOL_COL}', '{INT_COL} + {BINARY_COL}', '{INT_COL} + {NCHAR_COL}', '{INT_COL} + {TS_COL}']) from {dbname}.ct1 where ['{INT_COL} + {INT_COL}', '{INT_COL} + {BINT_COL}', '{INT_COL} + {SINT_COL}', '{INT_COL} + {TINT_COL}', '{INT_COL} + {FLOAT_COL}', '{INT_COL} + {DOUBLE_COL}', '{INT_COL} + {BOOL_COL}', '{INT_COL} + {BINARY_COL}', '{INT_COL} + {NCHAR_COL}', '{INT_COL} + {TS_COL}'] is not null diff --git a/tests/system-test/2-query/first.py b/tests/system-test/2-query/first.py index 762455fa8c..1aa51f8bb7 100644 --- a/tests/system-test/2-query/first.py +++ b/tests/system-test/2-query/first.py @@ -125,7 +125,7 @@ class TDTestCase: tdSql.query(f"select first(*) from {i}") tdSql.checkRows(1) tdSql.checkData(0, 1, None) - tdSql.query(f'show {dbname}.tables') + tdSql.query(f"select * from information_schema.ins_tables where db_name = '{dbname}'") vgroup_list = [] for i in range(len(tdSql.queryResult)): vgroup_list.append(tdSql.queryResult[i][6]) diff --git a/tests/system-test/2-query/hyperloglog.py b/tests/system-test/2-query/hyperloglog.py index ac7a0ec488..e481d2c043 100644 --- a/tests/system-test/2-query/hyperloglog.py +++ b/tests/system-test/2-query/hyperloglog.py @@ -232,7 +232,7 @@ class TDTestCase: self.__create_stable(dbname, stbname,column_dict,tag_dict) for i in range(childtable_num): tdSql.execute(f"create table {dbname}.{stbname}_{i} using {dbname}.{stbname} tags('beijing')") - tdSql.query(f'show {dbname}.tables') + tdSql.query(f"select * from information_schema.ins_tables where db_name = '{dbname}'") vgroup_list = [] for i in range(len(tdSql.queryResult)): vgroup_list.append(tdSql.queryResult[i][6]) diff --git a/tests/system-test/2-query/last.py b/tests/system-test/2-query/last.py index afc7ed36a5..3bca9f1671 100644 --- a/tests/system-test/2-query/last.py +++ b/tests/system-test/2-query/last.py @@ -202,7 +202,7 @@ class TDTestCase: f"create table {stbname}_{i} using {stbname} tags('beijing')") tdSql.execute( f"insert into {stbname}_{i}(ts) values(%d)" % (self.ts - 1-i)) - tdSql.query(f'show {dbname}.tables') + tdSql.query(f"select * from information_schema.ins_tables where db_name = '{dbname}'") vgroup_list = [] for i in range(len(tdSql.queryResult)): vgroup_list.append(tdSql.queryResult[i][6]) diff --git a/tests/system-test/2-query/max.py b/tests/system-test/2-query/max.py index 8a5dca3763..34442a3725 100644 --- a/tests/system-test/2-query/max.py +++ b/tests/system-test/2-query/max.py @@ -167,7 +167,7 @@ class TDTestCase: # check sub_table of per vnode ,make sure sub_table has been distributed - tdSql.query("show tables like 'ct%'") + tdSql.query("select * from information_schema.ins_tables where db_name = 'testdb' and table_name like 'ct%'") table_names = tdSql.queryResult tablenames = [] for table_name in table_names: diff --git a/tests/system-test/2-query/top.py b/tests/system-test/2-query/top.py index 41d6f32cfd..7fd143f683 100644 --- a/tests/system-test/2-query/top.py +++ b/tests/system-test/2-query/top.py @@ -112,7 +112,7 @@ class TDTestCase: for i in range(self.tbnum): tdSql.execute(f"create table {self.stbname}_{i} using {self.stbname} tags({tag_values[0]})") self.insert_data(self.column_dict,f'{self.stbname}_{i}',self.rowNum) - tdSql.query(f'show {self.dbname}.tables') + tdSql.query(f'select * from information_schema.ins_tables where db_name = "{self.dbname}"') vgroup_list = [] for i in range(len(tdSql.queryResult)): vgroup_list.append(tdSql.queryResult[i][6]) diff --git a/tests/system-test/2-query/ttl_comment.py b/tests/system-test/2-query/ttl_comment.py index 8fc582c587..33bd61b66c 100644 --- a/tests/system-test/2-query/ttl_comment.py +++ b/tests/system-test/2-query/ttl_comment.py @@ -41,50 +41,50 @@ class TDTestCase: tdSql.execute("create table normal_table2(ts timestamp, i int) comment '' ttl 3") tdSql.execute("create table normal_table3(ts timestamp, i int) ttl 2100000000020 comment 'hello'") - tdSql.query("show tables like 'normal_table1'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'normal_table1'") tdSql.checkData(0, 0, 'normal_table1') tdSql.checkData(0, 7, 0) tdSql.checkData(0, 8, None) - tdSql.query("show tables like 'normal_table2'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'normal_table2'") tdSql.checkData(0, 0, 'normal_table2') tdSql.checkData(0, 7, 3) tdSql.checkData(0, 8, '') - tdSql.query("show tables like 'normal_table3'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'normal_table3'") tdSql.checkData(0, 0, 'normal_table3') tdSql.checkData(0, 7, 2147483647) tdSql.checkData(0, 8, 'hello') tdSql.execute("alter table normal_table1 comment 'nihao'") - tdSql.query("show tables like 'normal_table1'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'normal_table1'") tdSql.checkData(0, 0, 'normal_table1') tdSql.checkData(0, 8, 'nihao') tdSql.execute("alter table normal_table1 comment ''") - tdSql.query("show tables like 'normal_table1'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'normal_table1'") tdSql.checkData(0, 0, 'normal_table1') tdSql.checkData(0, 8, '') tdSql.execute("alter table normal_table2 comment 'fly'") - tdSql.query("show tables like 'normal_table2'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'normal_table2'") tdSql.checkData(0, 0, 'normal_table2') tdSql.checkData(0, 8, 'fly') tdSql.execute("alter table normal_table3 comment 'fly'") - tdSql.query("show tables like 'normal_table3'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'normal_table3'") tdSql.checkData(0, 0, 'normal_table3') tdSql.checkData(0, 8, 'fly') tdSql.execute("alter table normal_table1 ttl 1") - tdSql.query("show tables like 'normal_table1'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'normal_table1'") tdSql.checkData(0, 0, 'normal_table1') tdSql.checkData(0, 7, 1) tdSql.execute("alter table normal_table3 ttl 0") - tdSql.query("show tables like 'normal_table3'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'normal_table3'") tdSql.checkData(0, 0, 'normal_table3') tdSql.checkData(0, 7, 0) @@ -95,38 +95,38 @@ class TDTestCase: tdSql.execute("create table super_table2(ts timestamp, i int) tags(t int) comment ''") tdSql.execute("create table super_table3(ts timestamp, i int) tags(t int) comment 'super'") - tdSql.query("show stables like 'super_table1'") + tdSql.query("select * from information_schema.ins_stables where stable_name like 'super_table1'") tdSql.checkData(0, 0, 'super_table1') tdSql.checkData(0, 6, None) - tdSql.query("show stables like 'super_table2'") + tdSql.query("select * from information_schema.ins_stables where stable_name like 'super_table2'") tdSql.checkData(0, 0, 'super_table2') tdSql.checkData(0, 6, '') - tdSql.query("show stables like 'super_table3'") + tdSql.query("select * from information_schema.ins_stables where stable_name like 'super_table3'") tdSql.checkData(0, 0, 'super_table3') tdSql.checkData(0, 6, 'super') tdSql.execute("alter table super_table1 comment 'nihao'") - tdSql.query("show stables like 'super_table1'") + tdSql.query("select * from information_schema.ins_stables where stable_name like 'super_table1'") tdSql.checkData(0, 0, 'super_table1') tdSql.checkData(0, 6, 'nihao') tdSql.execute("alter table super_table1 comment ''") - tdSql.query("show stables like 'super_table1'") + tdSql.query("select * from information_schema.ins_stables where stable_name like 'super_table1'") tdSql.checkData(0, 0, 'super_table1') tdSql.checkData(0, 6, '') tdSql.execute("alter table super_table2 comment 'fly'") - tdSql.query("show stables like 'super_table2'") + tdSql.query("select * from information_schema.ins_stables where stable_name like 'super_table2'") tdSql.checkData(0, 0, 'super_table2') tdSql.checkData(0, 6, 'fly') tdSql.execute("alter table super_table3 comment 'tdengine'") - tdSql.query("show stables like 'super_table3'") + tdSql.query("select * from information_schema.ins_stables where stable_name like 'super_table3'") tdSql.checkData(0, 0, 'super_table3') tdSql.checkData(0, 6, 'tdengine') @@ -138,61 +138,61 @@ class TDTestCase: tdSql.execute("insert into child_table4 using super_table1 tags(1) values(now, 1)") - tdSql.query("show tables like 'child_table1'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'child_table1'") tdSql.checkData(0, 0, 'child_table1') tdSql.checkData(0, 7, 10) tdSql.checkData(0, 8, None) - tdSql.query("show tables like 'child_table2'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'child_table2'") tdSql.checkData(0, 0, 'child_table2') tdSql.checkData(0, 7, 0) tdSql.checkData(0, 8, '') - tdSql.query("show tables like 'child_table3'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'child_table3'") tdSql.checkData(0, 0, 'child_table3') tdSql.checkData(0, 8, 'child') - tdSql.query("show tables like 'child_table4'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'child_table4'") tdSql.checkData(0, 0, 'child_table4') tdSql.checkData(0, 7, 0) tdSql.checkData(0, 8, None) tdSql.execute("alter table child_table1 comment 'nihao'") - tdSql.query("show tables like 'child_table1'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'child_table1'") tdSql.checkData(0, 0, 'child_table1') tdSql.checkData(0, 8, 'nihao') tdSql.execute("alter table child_table1 comment ''") - tdSql.query("show tables like 'child_table1'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'child_table1'") tdSql.checkData(0, 0, 'child_table1') tdSql.checkData(0, 8, '') tdSql.execute("alter table child_table2 comment 'fly'") - tdSql.query("show tables like 'child_table2'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'child_table2'") tdSql.checkData(0, 0, 'child_table2') tdSql.checkData(0, 8, 'fly') tdSql.execute("alter table child_table3 comment 'tdengine'") - tdSql.query("show tables like 'child_table3'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'child_table3'") tdSql.checkData(0, 0, 'child_table3') tdSql.checkData(0, 8, 'tdengine') tdSql.execute("alter table child_table4 comment 'tdengine'") - tdSql.query("show tables like 'child_table4'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'child_table4'") tdSql.checkData(0, 0, 'child_table4') tdSql.checkData(0, 8, 'tdengine') tdSql.execute("alter table child_table4 ttl 9") - tdSql.query("show tables like 'child_table4'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'child_table4'") tdSql.checkData(0, 0, 'child_table4') tdSql.checkData(0, 7, 9) tdSql.execute("alter table child_table3 ttl 9") - tdSql.query("show tables like 'child_table3'") + tdSql.query("select * from information_schema.ins_tables where table_name like 'child_table3'") tdSql.checkData(0, 0, 'child_table3') tdSql.checkData(0, 7, 9) From 443ccfdb690ecff3fc5e642dc69b4528822f2a73 Mon Sep 17 00:00:00 2001 From: Sean Ely <105326513+sean-tdengine@users.noreply.github.com> Date: Thu, 11 Aug 2022 13:58:59 -0700 Subject: [PATCH 40/52] Docs: Updated Readme - Support Win/macOS Don't we support Windows and macOS in v3.0? --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 31f8dcd277..65dafdf8fb 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ For user manual, system design and architecture, please refer to [TDengine Docum # Building -At the moment, TDengine server only supports running on Linux systems. You can choose to [install from packages](https://www.taosdata.com/en/getting-started/#Install-from-Package) or build it from the source code. This quick guide is for installation from the source only. +At the moment, TDengine server supports running on Linux, Windows, and macOS systems. You can choose to [install from packages](https://www.taosdata.com/en/getting-started/#Install-from-Package) or build it from the source code. This quick guide is for installation from the source only. To build TDengine, use [CMake](https://cmake.org/) 3.0.2 or higher versions in the project directory. @@ -86,7 +86,7 @@ To build the [taosTools](https://github.com/taosdata/taos-tools) on CentOS, the sudo yum install zlib-devel xz-devel snappy-devel jansson jansson-devel pkgconfig libatomic libstdc++-static openssl-devel ``` -Note: Since snappy lacks pkg-config support (refer to [link](https://github.com/google/snappy/pull/86)), it leads a cmake prompt libsnappy not found. But snappy will works well. +Note: Since snappy lacks pkg-config support (refer to [link](https://github.com/google/snappy/pull/86)), it leads a cmake prompt libsnappy not found. But snappy still works well. ### Setup golang environment @@ -114,7 +114,7 @@ cd TDengine The connectors for go & Grafana and some tools have been moved to separated repositories. -You can modify the file ~/.gitconfig to use ssh protocol instead of https for better download speed. You need to upload ssh public key to GitHub first. Please refer to GitHub official documentation for detail. +You can modify the file ~/.gitconfig to use ssh protocol instead of https for better download speed. You will need to upload ssh public key to GitHub first. Please refer to GitHub official documentation for detail. ``` [url "git@github.com:"] From 177020f514f12e5a34b4e425835061feba803816 Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Fri, 12 Aug 2022 08:04:17 +0800 Subject: [PATCH 41/52] fix: modify udf document on udf return code --- docs/zh/07-develop/09-udf.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zh/07-develop/09-udf.md b/docs/zh/07-develop/09-udf.md index 61b4974451..bb2cef3a44 100644 --- a/docs/zh/07-develop/09-udf.md +++ b/docs/zh/07-develop/09-udf.md @@ -8,7 +8,7 @@ description: "支持用户编码的聚合函数和标量函数,在查询中嵌 TDengine 支持通过 C/C++ 语言进行 UDF 定义。接下来结合示例讲解 UDF 的使用方法。 -用户可以通过 UDF 实现两类函数: 标量函数和聚合函数。标量函数对每行数据返回一个值,如求绝对值 abs,正弦函数 sin,字符串拼接函数 concat 等。聚合函数对多行数据进行返回一个值,如求平均数 avg,最大值 max 等。 +用户可以通过 UDF 实现两类函数: 标量函数和聚合函数。标量函数对每行数据输出一个值,如求绝对值 abs,正弦函数 sin,字符串拼接函数 concat 等。聚合函数对多行数据进行输出一个值,如求平均数 avg,最大值 max 等。 实现 UDF 时,需要实现规定的接口函数 - 标量函数需要实现标量接口函数 scalarfn 。 @@ -104,7 +104,7 @@ aggfn为函数名的占位符,需要修改为自己的函数名,如l2norm。 接口函数的名称是 udf 名称,或者是 udf 名称和特定后缀(_start, _finish, _init, _destroy)的连接。以下描述中函数名称中的 scalarfn,aggfn, udf 需要替换成udf函数名。 -接口函数返回值表示是否成功,如果错误返回错误代码,错误代码见taoserror.h。 +接口函数返回值表示是否成功,如果错误返回错误代码。定义在taoserror.h,和 taos.h 中的API使用同样的返回结果。例如,TSDB_CODE_SUCCESS 表示成功, TSDB_CODE_UDF_INVALID_INPUT 表示输入无效输入。TSDB_CODE_OUT_OF_MEMORY 表示内存不足。 接口函数参数类型见数据结构定义。 From e6d3e2606e7a50deb8088712b61cf2bce3a5e0ba Mon Sep 17 00:00:00 2001 From: dingbo Date: Fri, 12 Aug 2022 08:22:21 +0800 Subject: [PATCH 42/52] docs: fix links --- docs/zh/02-intro.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zh/02-intro.md b/docs/zh/02-intro.md index e3ab7459c0..97322c68a2 100644 --- a/docs/zh/02-intro.md +++ b/docs/zh/02-intro.md @@ -3,7 +3,7 @@ title: 产品简介 toc_max_heading_level: 2 --- -TDengine 是一款[开源](https://www.taosdata.com/tdengine/open_source_time-series_database)、[高性能](https://www.taosdata.com/tdengine/fast)、[云原生](https://www.taosdata.com/tdengine/cloud_native_time-series_database)的时序数据库 (Time-Series Database, TSDB)。TDengine 能被广泛运用于物联网、工业互联网、车联网、IT 运维、金融等领域。除核心的时序数据库功能外,TDengine 还提供[缓存](../develop/cache/)、[数据订阅](../develop/subscribe)、[流式计算](../develop/continuous-query)等功能,是一极简的时序数据处理平台,最大程度的减小系统设计的复杂度,降低研发和运营成本。 +TDengine 是一款[开源](https://www.taosdata.com/tdengine/open_source_time-series_database)、[高性能](https://www.taosdata.com/tdengine/fast)、[云原生](https://www.taosdata.com/tdengine/cloud_native_time-series_database)的时序数据库 (Time-Series Database, TSDB)。TDengine 能被广泛运用于物联网、工业互联网、车联网、IT 运维、金融等领域。除核心的时序数据库功能外,TDengine 还提供[缓存](../develop/cache/)、[数据订阅](../develop/tmq)、[流式计算](../develop/stream)等功能,是一极简的时序数据处理平台,最大程度的减小系统设计的复杂度,降低研发和运营成本。 本章节介绍TDengine的主要功能、竞争优势、适用场景、与其他数据库的对比测试等等,让大家对TDengine有个整体的了解。 @@ -26,7 +26,7 @@ TDengine的主要功能如下: 13. 支持 [REST 接口](../reference/rest-api/) 14. 支持与[ Grafana 无缝集成](../third-party/grafana) 15. 支持与 Google Data Studio 无缝集成 -16. 支持 [Kubenetes 部署](../deployment/k8s) +16. 支持 [Kubernetes 部署](../deployment/k8s) 更多细小的功能,请阅读整个文档。 From 9ed135d0116d39e12e28d8e497a49d47a8d63de8 Mon Sep 17 00:00:00 2001 From: wade zhang <95411902+gccgdb1234@users.noreply.github.com> Date: Fri, 12 Aug 2022 08:34:54 +0800 Subject: [PATCH 43/52] Update 03-package.md --- docs/zh/05-get-started/03-package.md | 115 ++++----------------------- 1 file changed, 16 insertions(+), 99 deletions(-) diff --git a/docs/zh/05-get-started/03-package.md b/docs/zh/05-get-started/03-package.md index e78721e0e1..c29aa92014 100644 --- a/docs/zh/05-get-started/03-package.md +++ b/docs/zh/05-get-started/03-package.md @@ -34,7 +34,7 @@ echo "deb [arch=amd64] http://repos.taosdata.com/tdengine-beta beta main" | sudo **使用 apt-get 命令安装** -``` +```bash sudo apt-get update apt-cache policy tdengine sudo apt-get install tdengine @@ -46,122 +46,39 @@ apt-get 方式只适用于 Debian 或 Ubuntu 系统 -1、从官网下载获得 deb 安装包,例如 TDengine-server-3.0.0.10002-Linux-x64.deb; -2、进入到 TDengine-server-3.0.0.10002-Linux-x64.deb 安装包所在目录,执行如下的安装命令: - -``` -$ sudo dpkg -i TDengine-server-3.0.0.10002-Linux-x64.deb -Selecting previously unselected package tdengine. -(Reading database ... 119653 files and directories currently installed.) -Preparing to unpack TDengine-server-3.0.0.10002-Linux-x64.deb ... -Unpacking tdengine (3.0.0.10002) ... -Setting up tdengine (3.0.0.10002) ... -Start to install TDengine... - -System hostname is: v3cluster-0002 - -Enter FQDN:port (like h1.taosdata.com:6030) of an existing TDengine cluster node to join -OR leave it blank to build one: - -Enter your email address for priority support or enter empty to skip: -Created symlink /etc/systemd/system/multi-user.target.wants/taosd.service → /etc/systemd/system/taosd.service. - -To configure TDengine : edit /etc/taos/taos.cfg -To start TDengine : sudo systemctl start taosd -To access TDengine : taos -h v3cluster-0002 to login into TDengine server - - -TDengine is installed successfully! +1、从官网下载获得 deb 安装包,例如 TDengine-server-3.0.0.0-Linux-x64.deb; +2、进入到 TDengine-server-3.0.0.0-Linux-x64.deb 安装包所在目录,执行如下的安装命令: +```bash +sudo dpkg -i TDengine-server-3.0.0.0-Linux-x64.deb ``` -1、从官网下载获得 rpm 安装包,例如 TDengine-server-3.0.0.10002-Linux-x64.rpm; -2、进入到 TDengine-server-3.0.0.10002-Linux-x64.rpm 安装包所在目录,执行如下的安装命令: - -``` -$ sudo rpm -ivh TDengine-server-3.0.0.10002-Linux-x64.rpm -Preparing... ################################# [100%] -Stop taosd service success! -Updating / installing... - 1:tdengine-3.0.0.10002-3 ################################# [100%] -Start to install TDengine... - -System hostname is: chenhaoran01 - -Enter FQDN:port (like h1.taosdata.com:6030) of an existing TDengine cluster node to join -OR leave it blank to build one: - -Enter your email address for priority support or enter empty to skip: -Created symlink from /etc/systemd/system/multi-user.target.wants/taosd.service to /etc/systemd/system/taosd.service. - -To configure TDengine : edit /etc/taos/taos.cfg -To start TDengine : sudo systemctl start taosd -To access TDengine : taos -h chenhaoran01 to login into TDengine server - - -TDengine is installed successfully! +1、从官网下载获得 rpm 安装包,例如 TDengine-server-3.0.0.0-Linux-x64.rpm; +2、进入到 TDengine-server-3.0.0.0-Linux-x64.rpm 安装包所在目录,执行如下的安装命令: +```bash +sudo rpm -ivh TDengine-server-3.0.0.0-Linux-x64.rpm ``` -1、从官网下载获得 tar.gz 安装包,例如 TDengine-server-3.0.0.10002-Linux-x64.tar.gz; -2、进入到 TDengine-server-3.0.0.10002-Linux-x64.tar.gz 安装包所在目录,先解压文件后,进入子目录,执行其中的 install.sh 安装脚本: +1、从官网下载获得 tar.gz 安装包,例如 TDengine-server-3.0.0.0-Linux-x64.tar.gz; +2、进入到 TDengine-server-3.0.0.0-Linux-x64.tar.gz 安装包所在目录,先解压文件后,进入子目录,执行其中的 install.sh 安装脚本: -``` -$ tar -zxvf TDengine-server-3.0.0.10002-Linux-x64.tar.gz -TDengine-server-3.0.0.10002/ -TDengine-server-3.0.0.10002/driver/ -TDengine-server-3.0.0.10002/driver/libtaos.so.3.0.0.10002 -TDengine-server-3.0.0.10002/driver/vercomp.txt -TDengine-server-3.0.0.10002/release_note -TDengine-server-3.0.0.10002/taos.tar.gz -TDengine-server-3.0.0.10002/install.sh +```bash +tar -zxvf TDengine-server-3.0.0.0-Linux-x64.tar.gz ... -$ ll -total 56832 -drwxr-xr-x 3 root root 4096 Aug 8 10:29 ./ -drwxrwxrwx 6 root root 4096 Aug 5 16:45 ../ -drwxr-xr-x 4 root root 4096 Aug 4 18:03 TDengine-server-3.0.0.10002/ --rwxr-xr-x 1 root root 58183066 Aug 8 10:28 TDengine-server-3.0.0.10002-Linux-x64.tar.gz* +解压后进入相应路径,执行 -$ cd TDengine-server-3.0.0.10002/ - - $ ll -total 51612 -drwxr-xr-x 4 root root 4096 Aug 4 18:03 ./ -drwxr-xr-x 3 root root 4096 Aug 8 10:29 ../ -drwxr-xr-x 2 root root 4096 Aug 4 18:03 driver/ -drwxr-xr-x 11 root root 4096 Aug 4 18:03 examples/ --rwxr-xr-x 1 root root 30980 Aug 4 18:03 install.sh* --rw-r--r-- 1 root root 6724 Aug 4 18:03 release_note --rw-r--r-- 1 root root 52793079 Aug 4 18:03 taos.tar.gz - -$ sudo ./install.sh - -Start to install TDengine... -Created symlink /etc/systemd/system/multi-user.target.wants/taosd.service → /etc/systemd/system/taosd.service. - -System hostname is: v3cluster-0002 - -Enter FQDN:port (like h1.taosdata.com:6030) of an existing TDengine cluster node to join -OR leave it blank to build one: - -Enter your email address for priority support or enter empty to skip: - -To configure TDengine : edit /etc/taos/taos.cfg -To configure taosadapter (if has) : edit /etc/taos/taosadapter.toml -To start TDengine : sudo systemctl start taosd -To access TDengine : taos -h v3cluster-0002 to login into TDengine server - -TDengine is installed successfully! +```bash +sudo ./install.sh ``` :::info From be7d3af4a502b37c2d770d1d1e56671ccafeb472 Mon Sep 17 00:00:00 2001 From: wade zhang <95411902+gccgdb1234@users.noreply.github.com> Date: Fri, 12 Aug 2022 08:35:50 +0800 Subject: [PATCH 44/52] Update 03-package.md --- docs/zh/05-get-started/03-package.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/zh/05-get-started/03-package.md b/docs/zh/05-get-started/03-package.md index c29aa92014..d8aadea0bd 100644 --- a/docs/zh/05-get-started/03-package.md +++ b/docs/zh/05-get-started/03-package.md @@ -21,14 +21,14 @@ TDengine 开源版本提供 deb 和 rpm 格式安装包,用户可以根据自 **安装包仓库** -``` +```bash wget -qO - http://repos.taosdata.com/tdengine.key | sudo apt-key add - echo "deb [arch=amd64] http://repos.taosdata.com/tdengine-stable stable main" | sudo tee /etc/apt/sources.list.d/tdengine-stable.list ``` 如果安装 Beta 版需要安装包仓库 -``` +```bash echo "deb [arch=amd64] http://repos.taosdata.com/tdengine-beta beta main" | sudo tee /etc/apt/sources.list.d/tdengine-beta.list ``` From 9c738c7418c9c6bc40c0a0b00623c3f81bede479 Mon Sep 17 00:00:00 2001 From: wade zhang <95411902+gccgdb1234@users.noreply.github.com> Date: Fri, 12 Aug 2022 08:40:35 +0800 Subject: [PATCH 45/52] Update 03-package.md --- docs/zh/05-get-started/03-package.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/05-get-started/03-package.md b/docs/zh/05-get-started/03-package.md index d8aadea0bd..6423cc7105 100644 --- a/docs/zh/05-get-started/03-package.md +++ b/docs/zh/05-get-started/03-package.md @@ -73,7 +73,7 @@ sudo rpm -ivh TDengine-server-3.0.0.0-Linux-x64.rpm ```bash tar -zxvf TDengine-server-3.0.0.0-Linux-x64.tar.gz -... +``` 解压后进入相应路径,执行 From 30841f83ed9852d68f2b38ca10c7f911c9c8cd33 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Fri, 12 Aug 2022 08:48:53 +0800 Subject: [PATCH 46/52] doc: copy Chinese version of get started to English version --- docs/en/05-get-started/01-docker.md | 116 ++++++++++ docs/en/05-get-started/03-package.md | 221 ++++++++++++++++++++ docs/en/05-get-started/_apt_get_install.mdx | 10 +- docs/en/05-get-started/_category_.yml | 2 +- docs/en/05-get-started/_pkg_install.mdx | 14 +- docs/en/05-get-started/index.md | 174 +-------------- 6 files changed, 359 insertions(+), 178 deletions(-) create mode 100644 docs/en/05-get-started/01-docker.md create mode 100644 docs/en/05-get-started/03-package.md diff --git a/docs/en/05-get-started/01-docker.md b/docs/en/05-get-started/01-docker.md new file mode 100644 index 0000000000..08d897ec07 --- /dev/null +++ b/docs/en/05-get-started/01-docker.md @@ -0,0 +1,116 @@ +--- +sidebar_label: Docker +title: 通过 Docker 快速体验 TDengine +--- +:::info +如果您希望对 TDengine 贡献代码或对内部实现感兴趣,请参考我们的 [TDengine GitHub 主页](https://github.com/taosdata/TDengine) 下载源码构建和安装. +::: + +本节首先介绍如何通过 Docker 快速体验 TDengine,然后介绍如何在 Docker 环境下体验 TDengine 的写入和查询功能。 + +## 启动 TDengine + +如果已经安装了 docker, 只需执行下面的命令。 + +```shell +docker run -d -p 6030:6030 -p 6041/6041 -p 6043-6049/6043-6049 -p 6043-6049:6043-6049/udp tdengine/tdengine +``` + +注意:TDengine 3.0 服务端仅使用 6030 TCP 端口。6041 为 taosAdapter 所使用提供 REST 服务端口。6043-6049 为 taosAdapter 提供第三方应用接入所使用端口,可根据需要选择是否打开。 + +确定该容器已经启动并且在正常运行 + +```shell +docker ps +``` + +进入该容器并执行 bash + +```shell +docker exec -it bash +``` + +然后就可以执行相关的 Linux 命令操作和访问 TDengine + +:::info + +Docker 工具自身的下载请参考 [Docker 官网文档](https://docs.docker.com/get-docker/)。 + +安装完毕后可以在命令行终端查看 Docker 版本。如果版本号正常输出,则说明 Docker 环境已经安装成功。 + +```bash +$ docker -v +Docker version 20.10.3, build 48d30b5 +``` + +::: + +## 运行 TDengine CLI + +进入容器,执行 taos + +``` +$ taos +Welcome to the TDengine shell from Linux, Client Version:3.0.0.0 +Copyright (c) 2022 by TAOS Data, Inc. All rights reserved. + +Server is Community Edition. + +taos> + +``` + +## 写入数据 + +可以使用 TDengine 的自带工具 taosBenchmark 快速体验 TDengine 的写入。 + +进入容器,启动 taosBenchmark: + + ```bash + $ taosBenchmark + + ``` + + 该命令将在数据库 test 下面自动创建一张超级表 meters,该超级表下有 1 万张表,表名为 "d0" 到 "d9999",每张表有 1 万条记录,每条记录有 (ts, current, voltage, phase) 四个字段,时间戳从 "2017-07-14 10:40:00 000" 到 "2017-07-14 10:40:09 999",每张表带有标签 location 和 groupId,groupId 被设置为 1 到 10, location 被设置为 "San Francisco" 或者 "Los Angeles"等城市名称。 + + 这条命令很快完成 1 亿条记录的插入。具体时间取决于硬件性能。 + + taosBenchmark 命令本身带有很多选项,配置表的数目、记录条数等等,您可以设置不同参数进行体验,请执行 `taosBenchmark --help` 详细列出。taosBenchmark 详细使用方法请参照 [taosBenchmark 参考手册](../../reference/taosbenchmark)。 + +## 体验查询 + +使用上述 taosBenchmark 插入数据后,可以在 TDengine CLI 输入查询命令,体验查询速度。。 + +查询超级表下记录总条数: + +```sql +taos> select count(*) from test.meters; +``` + +查询 1 亿条记录的平均值、最大值、最小值等: + +```sql +taos> select avg(current), max(voltage), min(phase) from test.meters; +``` + +查询 location="San Francisco" 的记录总条数: + +```sql +taos> select count(*) from test.meters where location="San Francisco"; +``` + +查询 groupId=10 的所有记录的平均值、最大值、最小值等: + +```sql +taos> select avg(current), max(voltage), min(phase) from test.meters where groupId=10; +``` + +对表 d10 按 10s 进行平均值、最大值和最小值聚合统计: + +```sql +taos> select avg(current), max(voltage), min(phase) from test.d10 interval(10s); +``` + +## 其它 + +更多关于在 Docker 环境下使用 TDengine 的细节,请参考 [在 Docker 下使用 TDengine](../../reference/docker) \ No newline at end of file diff --git a/docs/en/05-get-started/03-package.md b/docs/en/05-get-started/03-package.md new file mode 100644 index 0000000000..6423cc7105 --- /dev/null +++ b/docs/en/05-get-started/03-package.md @@ -0,0 +1,221 @@ +--- +sidebar_label: 安装包 +title: 使用安装包立即开始 +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +:::info +如果您希望对 TDengine 贡献代码或对内部实现感兴趣,请参考我们的 [TDengine GitHub 主页](https://github.com/taosdata/TDengine) 下载源码构建和安装. + +::: + +TDengine 开源版本提供 deb 和 rpm 格式安装包,用户可以根据自己的运行环境选择合适的安装包。其中 deb 支持 Debian/Ubuntu 及衍生系统,rpm 支持 CentOS/RHEL/SUSE 及衍生系统。同时我们也为企业用户提供 tar.gz 格式安装包,也支持通过 `apt-get` 工具从线上进行安装。 + +## 安装 + + + +可以使用 apt-get 工具从官方仓库安装。 + +**安装包仓库** + +```bash +wget -qO - http://repos.taosdata.com/tdengine.key | sudo apt-key add - +echo "deb [arch=amd64] http://repos.taosdata.com/tdengine-stable stable main" | sudo tee /etc/apt/sources.list.d/tdengine-stable.list +``` + +如果安装 Beta 版需要安装包仓库 + +```bash +echo "deb [arch=amd64] http://repos.taosdata.com/tdengine-beta beta main" | sudo tee /etc/apt/sources.list.d/tdengine-beta.list +``` + +**使用 apt-get 命令安装** + +```bash +sudo apt-get update +apt-cache policy tdengine +sudo apt-get install tdengine +``` + +:::tip +apt-get 方式只适用于 Debian 或 Ubuntu 系统 +:::: + + + +1、从官网下载获得 deb 安装包,例如 TDengine-server-3.0.0.0-Linux-x64.deb; +2、进入到 TDengine-server-3.0.0.0-Linux-x64.deb 安装包所在目录,执行如下的安装命令: + +```bash +sudo dpkg -i TDengine-server-3.0.0.0-Linux-x64.deb +``` + + + + + +1、从官网下载获得 rpm 安装包,例如 TDengine-server-3.0.0.0-Linux-x64.rpm; +2、进入到 TDengine-server-3.0.0.0-Linux-x64.rpm 安装包所在目录,执行如下的安装命令: + +```bash +sudo rpm -ivh TDengine-server-3.0.0.0-Linux-x64.rpm +``` + + + + + +1、从官网下载获得 tar.gz 安装包,例如 TDengine-server-3.0.0.0-Linux-x64.tar.gz; +2、进入到 TDengine-server-3.0.0.0-Linux-x64.tar.gz 安装包所在目录,先解压文件后,进入子目录,执行其中的 install.sh 安装脚本: + +```bash +tar -zxvf TDengine-server-3.0.0.0-Linux-x64.tar.gz +``` + +解压后进入相应路径,执行 + +```bash +sudo ./install.sh +``` + +:::info +install.sh 安装脚本在执行过程中,会通过命令行交互界面询问一些配置信息。如果希望采取无交互安装方式,那么可以用 -e no 参数来执行 install.sh 脚本。运行 `./install.sh -h` 指令可以查看所有参数的详细说明信息。 + +::: + + + + +:::note +当安装第一个节点时,出现 Enter FQDN:提示的时候,不需要输入任何内容。只有当安装第二个或以后更多的节点时,才需要输入已有集群中任何一个可用节点的 FQDN,支持该新节点加入集群。当然也可以不输入,而是在新节点启动前,配置到新节点的配置文件中。 + +::: + +## 启动 + +安装后,请使用 `systemctl` 命令来启动 TDengine 的服务进程。 + +```bash +systemctl start taosd +``` + +检查服务是否正常工作: + +```bash +systemctl status taosd +``` + +如果服务进程处于活动状态,则 status 指令会显示如下的相关信息: + +``` +Active: active (running) +``` + +如果后台服务进程处于停止状态,则 status 指令会显示如下的相关信息: + +``` +Active: inactive (dead) +``` + +如果 TDengine 服务正常工作,那么您可以通过 TDengine 的命令行程序 `taos` 来访问并体验 TDengine。 + +systemctl 命令汇总: + +- 启动服务进程:`systemctl start taosd` + +- 停止服务进程:`systemctl stop taosd` + +- 重启服务进程:`systemctl restart taosd` + +- 查看服务状态:`systemctl status taosd` + +:::info + +- systemctl 命令需要 _root_ 权限来运行,如果您非 _root_ 用户,请在命令前添加 sudo 。 +- `systemctl stop taosd` 指令在执行后并不会马上停止 TDengine 服务,而是会等待系统中必要的落盘工作正常完成。在数据量很大的情况下,这可能会消耗较长时间。 +- 如果系统中不支持 `systemd`,也可以用手动运行 `/usr/local/taos/bin/taosd` 方式启动 TDengine 服务。 + +::: + +## TDengine 命令行 (CLI) + +为便于检查 TDengine 的状态,执行数据库 (Database) 的各种即席(Ad Hoc)查询,TDengine 提供一命令行应用程序(以下简称为 TDengine CLI) taos。要进入 TDengine 命令行,您只要在安装有 TDengine 的 Linux 终端执行 `taos` 即可。 + +```bash +taos +``` + +如果连接服务成功,将会打印出欢迎消息和版本信息。如果失败,则会打印错误消息出来(请参考 [FAQ](/train-faq/faq) 来解决终端连接服务端失败的问题)。 TDengine CLI 的提示符号如下: + +```cmd +taos> +``` + +在 TDengine CLI 中,用户可以通过 SQL 命令来创建/删除数据库、表等,并进行数据库(database)插入查询操作。在终端中运行的 SQL 语句需要以分号结束来运行。示例: + +```sql +create database demo; +use demo; +create table t (ts timestamp, speed int); +insert into t values ('2019-07-15 00:00:00', 10); +insert into t values ('2019-07-15 01:00:00', 20); +select * from t; + ts | speed | +======================================== + 2019-07-15 00:00:00.000 | 10 | + 2019-07-15 01:00:00.000 | 20 | +Query OK, 2 row(s) in set (0.003128s) +``` + +除执行 SQL 语句外,系统管理员还可以从 TDengine CLI 进行检查系统运行状态、添加删除用户账号等操作。TDengine CLI 连同应用驱动也可以独立安装在 Linux 或 Windows 机器上运行,更多细节请参考 [这里](../../reference/taos-shell/) + +## 使用 taosBenchmark 体验写入速度 + +启动 TDengine 的服务,在 Linux 终端执行 `taosBenchmark` (曾命名为 `taosdemo`): + +```bash +taosBenchmark +``` + +该命令将在数据库 test 下面自动创建一张超级表 meters,该超级表下有 1 万张表,表名为 "d0" 到 "d9999",每张表有 1 万条记录,每条记录有 (ts, current, voltage, phase) 四个字段,时间戳从 "2017-07-14 10:40:00 000" 到 "2017-07-14 10:40:09 999",每张表带有标签 location 和 groupId,groupId 被设置为 1 到 10, location 被设置为 "California.SanFrancisco" 或者 "California.LosAngeles"。 + +这条命令很快完成 1 亿条记录的插入。具体时间取决于硬件性能,即使在一台普通的 PC 服务器往往也仅需十几秒。 + +taosBenchmark 命令本身带有很多选项,配置表的数目、记录条数等等,您可以设置不同参数进行体验,请执行 `taosBenchmark --help` 详细列出。taosBenchmark 详细使用方法请参照 [如何使用 taosBenchmark 对 TDengine 进行性能测试](https://www.taosdata.com/2021/10/09/3111.html)。 + +## 使用 TDengine CLI 体验查询速度 + +使用上述 taosBenchmark 插入数据后,可以在 TDengine CLI 输入查询命令,体验查询速度。 + +查询超级表下记录总条数: + +```sql +taos> select count(*) from test.meters; +``` + +查询 1 亿条记录的平均值、最大值、最小值等: + +```sql +taos> select avg(current), max(voltage), min(phase) from test.meters; +``` + +查询 location="California.SanFrancisco" 的记录总条数: + +```sql +taos> select count(*) from test.meters where location="California.SanFrancisco"; +``` + +查询 groupId=10 的所有记录的平均值、最大值、最小值等: + +```sql +taos> select avg(current), max(voltage), min(phase) from test.meters where groupId=10; +``` + +对表 d10 按 10s 进行平均值、最大值和最小值聚合统计: + +```sql +taos> select avg(current), max(voltage), min(phase) from test.d10 interval(10s); +``` diff --git a/docs/en/05-get-started/_apt_get_install.mdx b/docs/en/05-get-started/_apt_get_install.mdx index 40f6cad1f6..b1bc4a1351 100644 --- a/docs/en/05-get-started/_apt_get_install.mdx +++ b/docs/en/05-get-started/_apt_get_install.mdx @@ -1,19 +1,19 @@ -`apt-get` can be used to install TDengine from official package repository. +可以使用 apt-get 工具从官方仓库安装。 -**Package Repository** +**安装包仓库** ``` wget -qO - http://repos.taosdata.com/tdengine.key | sudo apt-key add - echo "deb [arch=amd64] http://repos.taosdata.com/tdengine-stable stable main" | sudo tee /etc/apt/sources.list.d/tdengine-stable.list ``` -The repository required for installing beta versions can be configured as below: +如果安装 Beta 版需要安装包仓库 ``` echo "deb [arch=amd64] http://repos.taosdata.com/tdengine-beta beta main" | sudo tee /etc/apt/sources.list.d/tdengine-beta.list ``` -**Install With apt-get** +**使用 apt-get 命令安装** ``` sudo apt-get update @@ -22,5 +22,5 @@ sudo apt-get install tdengine ``` :::tip -`apt-get` can only be used on Debian or Ubuntu Linux. +apt-get 方式只适用于 Debian 或 Ubuntu 系统 :::: diff --git a/docs/en/05-get-started/_category_.yml b/docs/en/05-get-started/_category_.yml index 043ae21554..b2348fade6 100644 --- a/docs/en/05-get-started/_category_.yml +++ b/docs/en/05-get-started/_category_.yml @@ -1 +1 @@ -label: Get Started +label: 立即开始 diff --git a/docs/en/05-get-started/_pkg_install.mdx b/docs/en/05-get-started/_pkg_install.mdx index cf10497c96..83c987af8b 100644 --- a/docs/en/05-get-started/_pkg_install.mdx +++ b/docs/en/05-get-started/_pkg_install.mdx @@ -1,17 +1,17 @@ import PkgList from "/components/PkgList"; -It's very easy to install TDengine and would take you only a few minutes from downloading to finishing installation. +TDengine 的安装非常简单,从下载到安装成功仅仅只要几秒钟。 -For the convenience of users, from version 2.4.0.10, the standard server side installation package includes `taos`, `taosd`, `taosAdapter`, `taosBenchmark` and sample code. If only the `taosd` server and C/C++ connector are required, you can also choose to download the lite package. +为方便使用,从 2.4.0.10 开始,标准的服务端安装包包含了 taos、taosd、taosAdapter、taosdump、taosBenchmark、TDinsight 安装脚本和示例代码;如果您只需要用到服务端程序和客户端连接的 C/C++ 语言支持,也可以仅下载 lite 版本的安装包。 -Three kinds of packages are provided, tar.gz, rpm and deb. Especially the tar.gz package is provided for the convenience of enterprise customers on different kinds of operating systems, it includes `taosdump` and TDinsight installation script which are normally only provided in taos-tools rpm and deb packages. +在安装包格式上,我们提供 tar.gz, rpm 和 deb 格式,为企业客户提供 tar.gz 格式安装包,以方便在特定操作系统上使用。需要注意的是,rpm 和 deb 包不含 taosdump、taosBenchmark 和 TDinsight 安装脚本,这些工具需要通过安装 taosTool 包获得。 -Between two major release versions, some beta versions may be delivered for users to try some new features. +发布版本包括稳定版和 Beta 版,Beta 版含有更多新功能。正式上线或测试建议安装稳定版。您可以根据需要选择下载: -For the details please refer to [Install and Uninstall](/operation/pkg-install)。 - -To see the details of versions, please refer to [Download List](https://tdengine.com/all-downloads) and [Release Notes](https://github.com/taosdata/TDengine/releases). +具体的安装方法,请参见[安装包的安装和卸载](/operation/pkg-install)。 +下载其他组件、最新 Beta 版及之前版本的安装包,请点击[这里](https://www.taosdata.com/all-downloads) +查看 Release Notes, 请点击[这里](https://github.com/taosdata/TDengine/releases) diff --git a/docs/en/05-get-started/index.md b/docs/en/05-get-started/index.md index 9c5a853820..794081b4e4 100644 --- a/docs/en/05-get-started/index.md +++ b/docs/en/05-get-started/index.md @@ -1,171 +1,15 @@ --- -title: Get Started -description: 'Install TDengine from Docker image, apt-get or package, and run TDengine CLI and taosBenchmark to experience the features' +title: 立即开始 +description: '快速设置 TDengine 环境并体验其高效写入和查询' --- -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; -import PkgInstall from "./\_pkg_install.mdx"; -import AptGetInstall from "./\_apt_get_install.mdx"; +TDengine 完整的软件包包括服务端(taosd)、用于与第三方系统对接并提供 RESTful 接口的 taosAdapter、应用驱动(taosc)、命令行程序 (CLI,taos) 和一些工具软件。TDengine 除了提供多种语言的连接器之外,还通过 [taosAdapter](/reference/taosadapter) 提供 [RESTful 接口](/reference/rest-api)。 -## Quick Install +本章主要介绍如何利用 Docker 或者安装包快速设置 TDengine 环境并体验其高效写入和查询。 -The full package of TDengine includes the server(taosd), taosAdapter for connecting with third-party systems and providing a RESTful interface, client driver(taosc), command-line program(CLI, taos) and some tools. For the current version, the server taosd and taosAdapter can only be installed and run on Linux systems. In the future taosd and taosAdapter will also be supported on Windows, macOS and other systems. The client driver taosc and TDengine CLI can be installed and run on Windows or Linux. In addition to connectors for multiple languages, TDengine also provides a [RESTful interface](/reference/rest-api) through [taosAdapter](/reference/taosadapter). Prior to version 2.4.0.0, taosAdapter did not exist and the RESTful interface was provided by the built-in HTTP service of taosd. +```mdx-code-block +import DocCardList from '@theme/DocCardList'; +import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; -TDengine supports X64/ARM64/MIPS64/Alpha64 hardware platforms, and will support ARM32, RISC-V and other CPU architectures in the future. - - - -If docker is already installed on your computer, execute the following command: - -```shell -docker run -d -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp tdengine/tdengine -``` - -Make sure the container is running - -```shell -docker ps -``` - -Enter into container and execute bash - -```shell -docker exec -it bash -``` - -Then you can execute the Linux commands and access TDengine. - -For detailed steps, please visit [Experience TDengine via Docker](/train-faq/docker)。 - -:::info -Starting from 2.4.0.10,besides taosd,TDengine docker image includes: taos,taosAdapter,taosdump,taosBenchmark,TDinsight, scripts and sample code. Once the TDengine container is started,it will start both taosAdapter and taosd automatically to support RESTful interface. - -::: - - - - - - - - - - -If you like to check the source code, build the package by yourself or contribute to the project, please check [TDengine GitHub Repository](https://github.com/taosdata/TDengine) - - - - -## Quick Launch - -After installation, you can launch the TDengine service by the 'systemctl' command to start 'taosd'. - -```bash -systemctl start taosd -``` - -Check if taosd is running: - -```bash -systemctl status taosd -``` - -If everything is fine, you can run TDengine command-line interface `taos` to access TDengine and test it out yourself. - -:::info - -- systemctl requires _root_ privileges,if you are not _root_ ,please add sudo before the command. -- To get feedback and keep improving the product, TDengine is collecting some basic usage information, but you can turn it off by setting telemetryReporting to 0 in configuration file taos.cfg. -- TDengine uses FQDN (usually hostname)as the ID for a node. To make the system work, you need to configure the FQDN for the server running taosd, and configure the DNS service or hosts file on the the machine where the application or TDengine CLI runs to ensure that the FQDN can be resolved. -- `systemctl stop taosd` won't stop the server right away, it will wait until all the data in memory are flushed to disk. It may takes time depending on the cache size. - -TDengine supports the installation on system which runs [`systemd`](https://en.wikipedia.org/wiki/Systemd) for process management,use `which systemctl` to check if the system has `systemd` installed: - -```bash -which systemctl -``` - -If the system does not have `systemd`,you can start TDengine manually by executing `/usr/local/taos/bin/taosd` - -:::note - -## Command Line Interface - -To manage the TDengine running instance,or execute ad-hoc queries, TDengine provides a Command Line Interface (hereinafter referred to as TDengine CLI) taos. To enter into the interactive CLI,execute `taos` on a Linux terminal where TDengine is installed. - -```bash -taos -``` - -If it connects to the TDengine server successfully, it will print out the version and welcome message. If it fails, it will print out the error message, please check [FAQ](/train-faq/faq) for trouble shooting connection issue. TDengine CLI's prompt is: - -```cmd -taos> -``` - -Inside TDengine CLI,you can execute SQL commands to create/drop database/table, and run queries. The SQL command must be ended with a semicolon. For example: - -```sql -create database demo; -use demo; -create table t (ts timestamp, speed int); -insert into t values ('2019-07-15 00:00:00', 10); -insert into t values ('2019-07-15 01:00:00', 20); -select * from t; - ts | speed | -======================================== - 2019-07-15 00:00:00.000 | 10 | - 2019-07-15 01:00:00.000 | 20 | -Query OK, 2 row(s) in set (0.003128s) -``` - -Besides executing SQL commands, system administrators can check running status, add/drop user accounts and manage the running instances. TDengine CLI with client driver can be installed and run on either Linux or Windows machines. For more details on CLI, please [check here](../reference/taos-shell/). - -## Experience the blazing fast speed - -After TDengine server is running,execute `taosBenchmark` (previously named taosdemo) from a Linux terminal: - -```bash -taosBenchmark -``` - -This command will create a super table "meters" under database "test". Under "meters", 10000 tables are created with names from "d0" to "d9999". Each table has 10000 rows and each row has four columns (ts, current, voltage, phase). Time stamp is starting from "2017-07-14 10:40:00 000" to "2017-07-14 10:40:09 999". Each table has tags "location" and "groupId". groupId is set 1 to 10 randomly, and location is set to "California.SanFrancisco" or "California.SanDiego". - -This command will insert 100 million rows into the database quickly. Time to insert depends on the hardware configuration, it only takes a dozen seconds for a regular PC server. - -taosBenchmark provides command-line options and a configuration file to customize the scenarios, like number of tables, number of rows per table, number of columns and more. Please execute `taosBenchmark --help` to list them. For details on running taosBenchmark, please check [reference for taosBenchmark](/reference/taosbenchmark) - -## Experience query speed - -After using taosBenchmark to insert a number of rows data, you can execute queries from TDengine CLI to experience the lightning fast query speed. - -query the total number of rows under super table "meters": - -```sql -taos> select count(*) from test.meters; -``` - -query the average, maximum, minimum of 100 million rows: - -```sql -taos> select avg(current), max(voltage), min(phase) from test.meters; -``` - -query the total number of rows with location="California.SanFrancisco": - -```sql -taos> select count(*) from test.meters where location="California.SanFrancisco"; -``` - -query the average, maximum, minimum of all rows with groupId=10: - -```sql -taos> select avg(current), max(voltage), min(phase) from test.meters where groupId=10; -``` - -query the average, maximum, minimum for table d10 in 10 seconds time interval: - -```sql -taos> select avg(current), max(voltage), min(phase) from test.d10 interval(10s); -``` + +``` \ No newline at end of file From 542ff779202bad3c60d1c28ff609d6d2d7a74497 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Fri, 12 Aug 2022 08:57:41 +0800 Subject: [PATCH 47/52] doc: remove welcome message from Shell output --- docs/zh/05-get-started/01-docker.md | 4 ---- docs/zh/10-deployment/01-deploy.md | 5 ----- docs/zh/10-deployment/03-k8s.md | 19 ------------------- .../03-connector/_verify_linux.mdx | 4 ---- .../03-connector/_verify_windows.mdx | 5 ----- docs/zh/14-reference/11-docker/index.md | 9 --------- docs/zh/20-third-party/06-statsd.md | 3 --- 7 files changed, 49 deletions(-) diff --git a/docs/zh/05-get-started/01-docker.md b/docs/zh/05-get-started/01-docker.md index 08d897ec07..66ad82adb8 100644 --- a/docs/zh/05-get-started/01-docker.md +++ b/docs/zh/05-get-started/01-docker.md @@ -51,10 +51,6 @@ Docker version 20.10.3, build 48d30b5 ``` $ taos -Welcome to the TDengine shell from Linux, Client Version:3.0.0.0 -Copyright (c) 2022 by TAOS Data, Inc. All rights reserved. - -Server is Community Edition. taos> diff --git a/docs/zh/10-deployment/01-deploy.md b/docs/zh/10-deployment/01-deploy.md index bfd4804e30..22a9c2ff8e 100644 --- a/docs/zh/10-deployment/01-deploy.md +++ b/docs/zh/10-deployment/01-deploy.md @@ -73,11 +73,6 @@ serverPort 6030 按照《立即开始》里的步骤,启动第一个数据节点,例如 h1.taosdata.com,然后执行 taos,启动 taos shell,从 shell 里执行命令“SHOW DNODES”,如下所示: ``` -Welcome to the TDengine shell from Linux, Client Version:3.0.0.0 -Copyright (c) 2022 by TAOS Data, Inc. All rights reserved. - -Server is Enterprise trial Edition, ver:3.0.0.0 and will never expire. - taos> show dnodes; id | endpoint | vnodes | support_vnodes | status | create_time | note | ============================================================================================================================================ diff --git a/docs/zh/10-deployment/03-k8s.md b/docs/zh/10-deployment/03-k8s.md index eb8afd0505..396b834324 100644 --- a/docs/zh/10-deployment/03-k8s.md +++ b/docs/zh/10-deployment/03-k8s.md @@ -150,9 +150,6 @@ kubectl exec -i -t tdengine-2 -- taos -s "show dnodes" 输出如下: ``` -Welcome to the TDengine shell from Linux, Client Version:3.0.0.0 -Copyright (c) 2022 by TAOS Data, Inc. All rights reserved. - taos> show dnodes id | endpoint | vnodes | support_vnodes | status | create_time | note | ============================================================================================================================================ @@ -230,9 +227,6 @@ kubectl exec -i -t tdengine-3 -- taos -s "show dnodes" 扩容后的四节点 TDengine 集群的 dnode 列表: ``` -Welcome to the TDengine shell from Linux, Client Version:3.0.0.0 -Copyright (c) 2022 by TAOS Data, Inc. All rights reserved. - taos> show dnodes id | endpoint | vnodes | support_vnodes | status | create_time | note | ============================================================================================================================================ @@ -256,9 +250,6 @@ $ kubectl exec -i -t tdengine-0 -- taos -s "drop dnode 4" ```bash $ kubectl exec -it tdengine-0 -- taos -s "show dnodes" -Welcome to the TDengine shell from Linux, Client Version:3.0.0.0 -Copyright (c) 2022 by TAOS Data, Inc. All rights reserved. - taos> show dnodes id | endpoint | vnodes | support_vnodes | status | create_time | note | ============================================================================================================================================ @@ -308,11 +299,6 @@ tdengine-1 1/1 Running 0 34m tdengine-2 1/1 Running 0 12m tdengine-3 0/1 Running 0 7s it@k8s-2:~/TDengine-Operator/src/tdengine$ kubectl exec -it tdengine-0 -- taos -s "show dnodes" - -Welcome to the TDengine shell from Linux, Client Version:3.0.0.0 -Copyright (c) 2022 by TAOS Data, Inc. All rights reserved. - -Server is Community Edition. taos> show dnodes id | endpoint | vnodes | support_vnodes | status | create_time | offline reason | @@ -344,11 +330,6 @@ kubectl delete configmap taoscfg ``` $ kubectl exec -it tdengine-0 -- taos -s "show dnodes" - -Welcome to the TDengine shell from Linux, Client Version:3.0.0.0 -Copyright (c) 2022 by TAOS Data, Inc. All rights reserved. - -Server is Community Edition. taos> show dnodes id | endpoint | vnodes | support_vnodes | status | create_time | offline reason | diff --git a/docs/zh/14-reference/03-connector/_verify_linux.mdx b/docs/zh/14-reference/03-connector/_verify_linux.mdx index 4979b6f72f..28957e77aa 100644 --- a/docs/zh/14-reference/03-connector/_verify_linux.mdx +++ b/docs/zh/14-reference/03-connector/_verify_linux.mdx @@ -2,10 +2,6 @@ ```text $ taos -Welcome to the TDengine shell from Linux, Client Version:3.0.0.0 -Copyright (c) 2022 by TAOS Data, Inc. All rights reserved. - -Server is Community Edition. taos> show databases; name | create_time | vgroups | ntables | replica | strict | duration | keep | buffer | pagesize | pages | minrows | maxrows | comp | precision | status | retention | single_stable | cachemodel | cachesize | wal_level | wal_fsync_period | wal_retention_period | wal_retention_size | wal_roll_period | wal_seg_size | diff --git a/docs/zh/14-reference/03-connector/_verify_windows.mdx b/docs/zh/14-reference/03-connector/_verify_windows.mdx index 8873d2928a..850fb5735d 100644 --- a/docs/zh/14-reference/03-connector/_verify_windows.mdx +++ b/docs/zh/14-reference/03-connector/_verify_windows.mdx @@ -1,11 +1,6 @@ 在 cmd 下进入到 C:\TDengine 目录下直接执行 `taos.exe`,连接到 TDengine 服务,进入到 TDengine CLI 界面,示例如下: ```text -Welcome to the TDengine shell from Windows, Client Version:3.0.0.0 -Copyright (c) 2022 by TAOS Data, Inc. All rights reserved. - -Server is Community Edition. - taos> show databases; name | create_time | vgroups | ntables | replica | strict | duration | keep | buffer | pagesize | pages | minrows | maxrows | comp | precision | status | retention | single_stable | cachemodel | cachesize | wal_level | wal_fsync_period | wal_retention_period | wal_retention_size | wal_roll_period | wal_seg_size | ========================================================================================================================================================================================================================================================================================================================================================================================================================================================================= diff --git a/docs/zh/14-reference/11-docker/index.md b/docs/zh/14-reference/11-docker/index.md index e40f0dbd35..c03990ede2 100644 --- a/docs/zh/14-reference/11-docker/index.md +++ b/docs/zh/14-reference/11-docker/index.md @@ -24,9 +24,6 @@ curl -u root:taosdata -d "show databases" localhost:6041/rest/sql ```shell $ docker exec -it tdengine taos -Welcome to the TDengine shell from Linux, Client Version:2.4.0.0 -Copyright (c) 2020 by TAOS Data, Inc. All rights reserved. - taos> show databases; name | created_time | ntables | vgroups | replica | quorum | days | keep | cache(MB) | blocks | minrows | maxrows | wallevel | fsync | comp | cachelast | precision | update | status | ==================================================================================================================================================================================================================================================================================== @@ -47,9 +44,6 @@ docker run -d --name tdengine --network host tdengine/tdengine ```shell $ taos -Welcome to the TDengine shell from Linux, Client Version:2.4.0.0 -Copyright (c) 2020 by TAOS Data, Inc. All rights reserved. - taos> show dnodes; id | end_point | vnodes | cores | status | role | create_time | offline reason | ====================================================================================================================================== @@ -353,9 +347,6 @@ password: taosdata ```shell $ docker-compose exec td-1 taos -s "show dnodes" - Welcome to the TDengine shell from Linux, Client Version:2.4.0.0 - Copyright (c) 2020 by TAOS Data, Inc. All rights reserved. - taos> show dnodes id | end_point | vnodes | cores | status | role | create_time | offline reason | ====================================================================================================================================== diff --git a/docs/zh/20-third-party/06-statsd.md b/docs/zh/20-third-party/06-statsd.md index bcbd6c42ae..260d011835 100644 --- a/docs/zh/20-third-party/06-statsd.md +++ b/docs/zh/20-third-party/06-statsd.md @@ -39,9 +39,6 @@ $ echo "foo:1|c" | nc -u -w0 127.0.0.1 8125 使用 TDengine CLI 验证从 StatsD 向 TDengine 写入数据并能够正确读出: ``` -Welcome to the TDengine shell from Linux, Client Version:2.4.0.0 -Copyright (c) 2020 by TAOS Data, Inc. All rights reserved. - taos> show databases; name | created_time | ntables | vgroups | replica | quorum | days | keep | cache(MB) | blocks | minrows | maxrows | wallevel | fsync | comp | cachelast | precision | update | status | ==================================================================================================================================================================================================================================================================================== From c16c3d22edd35a14f4d4d498fae889d359c03061 Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Fri, 12 Aug 2022 09:21:06 +0800 Subject: [PATCH 48/52] Update 09-udf.md --- docs/zh/07-develop/09-udf.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/zh/07-develop/09-udf.md b/docs/zh/07-develop/09-udf.md index bb2cef3a44..6496066347 100644 --- a/docs/zh/07-develop/09-udf.md +++ b/docs/zh/07-develop/09-udf.md @@ -4,11 +4,11 @@ title: UDF(用户定义函数) description: "支持用户编码的聚合函数和标量函数,在查询中嵌入并使用用户定义函数,拓展查询的能力和功能。" --- -在有些应用场景中,应用逻辑需要的查询无法直接使用系统内置的函数来表示。利用 UDF 功能,TDengine 可以插入用户编写的处理代码并在查询中使用它们,就能够很方便地解决特殊应用场景中的使用需求。 UDF 通常以数据表中的一列数据做为输入,同时支持以嵌套子查询的结果作为输入。 +在有些应用场景中,应用逻辑需要的查询无法直接使用系统内置的函数来表示。利用 UDF(User Defined Function) 功能,TDengine 可以插入用户编写的处理代码并在查询中使用它们,就能够很方便地解决特殊应用场景中的使用需求。 UDF 通常以数据表中的一列数据做为输入,同时支持以嵌套子查询的结果作为输入。 TDengine 支持通过 C/C++ 语言进行 UDF 定义。接下来结合示例讲解 UDF 的使用方法。 -用户可以通过 UDF 实现两类函数: 标量函数和聚合函数。标量函数对每行数据输出一个值,如求绝对值 abs,正弦函数 sin,字符串拼接函数 concat 等。聚合函数对多行数据进行输出一个值,如求平均数 avg,最大值 max 等。 +用户可以通过 UDF 实现两类函数:标量函数和聚合函数。标量函数对每行数据输出一个值,如求绝对值 abs,正弦函数 sin,字符串拼接函数 concat 等。聚合函数对多行数据进行输出一个值,如求平均数 avg,最大值 max 等。 实现 UDF 时,需要实现规定的接口函数 - 标量函数需要实现标量接口函数 scalarfn 。 @@ -104,7 +104,7 @@ aggfn为函数名的占位符,需要修改为自己的函数名,如l2norm。 接口函数的名称是 udf 名称,或者是 udf 名称和特定后缀(_start, _finish, _init, _destroy)的连接。以下描述中函数名称中的 scalarfn,aggfn, udf 需要替换成udf函数名。 -接口函数返回值表示是否成功,如果错误返回错误代码。定义在taoserror.h,和 taos.h 中的API使用同样的返回结果。例如,TSDB_CODE_SUCCESS 表示成功, TSDB_CODE_UDF_INVALID_INPUT 表示输入无效输入。TSDB_CODE_OUT_OF_MEMORY 表示内存不足。 +接口函数返回值表示是否成功。如果返回值是 TSDB_CODE_SUCCESS,表示操作成功,否则返回的是错误代码。错误代码定义在 taoserror.h,和 taos.h 中的API共享错误码的定义。例如, TSDB_CODE_UDF_INVALID_INPUT 表示输入无效输入。TSDB_CODE_OUT_OF_MEMORY 表示内存不足。 接口函数参数类型见数据结构定义。 From 2bae89dc492feb235688e071e78b5bf5a05b6800 Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Fri, 12 Aug 2022 09:30:13 +0800 Subject: [PATCH 49/52] Update 09-udf.md --- docs/zh/07-develop/09-udf.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/07-develop/09-udf.md b/docs/zh/07-develop/09-udf.md index 6496066347..ef1cd4797a 100644 --- a/docs/zh/07-develop/09-udf.md +++ b/docs/zh/07-develop/09-udf.md @@ -214,7 +214,7 @@ gcc -g -O0 -fPIC -shared add_one.c -o add_one.so 这样就准备好了动态链接库 add_one.so 文件,可以供后文创建 UDF 时使用了。为了保证可靠的系统运行,编译器 GCC 推荐使用 7.5 及以上版本。 ## 管理和使用UDF -关于如何管理和使用UDF,参见[UDF使用说明](../12-taos-sql/26-udf.md) +编译好的UDF,还需要将其加入到系统才能被正常的SQL调用。关于如何管理和使用UDF,参见[UDF使用说明](../12-taos-sql/26-udf.md) ## 示例代码 From d951ba84c260f955fa59a0ae5e4d3e823076dd54 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Fri, 12 Aug 2022 09:36:24 +0800 Subject: [PATCH 50/52] doc: add item for windows --- docs/zh/05-get-started/03-package.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/zh/05-get-started/03-package.md b/docs/zh/05-get-started/03-package.md index 6423cc7105..7a00db015b 100644 --- a/docs/zh/05-get-started/03-package.md +++ b/docs/zh/05-get-started/03-package.md @@ -86,6 +86,11 @@ install.sh 安装脚本在执行过程中,会通过命令行交互界面询问 ::: + + + +TODO + @@ -96,6 +101,9 @@ install.sh 安装脚本在执行过程中,会通过命令行交互界面询问 ## 启动 + + + 安装后,请使用 `systemctl` 命令来启动 TDengine 的服务进程。 ```bash @@ -140,6 +148,15 @@ systemctl 命令汇总: ::: + + + + +TODO + + + + ## TDengine 命令行 (CLI) 为便于检查 TDengine 的状态,执行数据库 (Database) 的各种即席(Ad Hoc)查询,TDengine 提供一命令行应用程序(以下简称为 TDengine CLI) taos。要进入 TDengine 命令行,您只要在安装有 TDengine 的 Linux 终端执行 `taos` 即可。 From 698e0ecec21e33ca31dcd6b2b3daf2c9b73190e6 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Fri, 12 Aug 2022 09:39:12 +0800 Subject: [PATCH 51/52] doc: add tab for windows uninstallation --- docs/zh/17-operation/01-pkg-install.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/zh/17-operation/01-pkg-install.md b/docs/zh/17-operation/01-pkg-install.md index 959510b670..533a01542a 100644 --- a/docs/zh/17-operation/01-pkg-install.md +++ b/docs/zh/17-operation/01-pkg-install.md @@ -84,6 +84,9 @@ $ rmtaos TDengine is removed successfully! ``` + + +TODO From 14562aa0982f0c49f686f97a0b3df11e7126b4b6 Mon Sep 17 00:00:00 2001 From: gccgdb1234 Date: Fri, 12 Aug 2022 09:47:12 +0800 Subject: [PATCH 52/52] doc: refine the brief introduction --- docs/zh/05-get-started/03-package.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/05-get-started/03-package.md b/docs/zh/05-get-started/03-package.md index 7a00db015b..c03a25ef58 100644 --- a/docs/zh/05-get-started/03-package.md +++ b/docs/zh/05-get-started/03-package.md @@ -11,7 +11,7 @@ import TabItem from "@theme/TabItem"; ::: -TDengine 开源版本提供 deb 和 rpm 格式安装包,用户可以根据自己的运行环境选择合适的安装包。其中 deb 支持 Debian/Ubuntu 及衍生系统,rpm 支持 CentOS/RHEL/SUSE 及衍生系统。同时我们也为企业用户提供 tar.gz 格式安装包,也支持通过 `apt-get` 工具从线上进行安装。 +在 Linux 系统上,TDengine 开源版本提供 deb 和 rpm 格式安装包,用户可以根据自己的运行环境选择合适的安装包。其中 deb 支持 Debian/Ubuntu 及衍生系统,rpm 支持 CentOS/RHEL/SUSE 及衍生系统。同时我们也为企业用户提供 tar.gz 格式安装包,也支持通过 `apt-get` 工具从线上进行安装。TDengine 也提供 Windows x64 平台的安装包。 ## 安装