From ead1a3101a4ace9cf23f0c645d0b65fdcbefdcee Mon Sep 17 00:00:00 2001 From: hzcheng Date: Mon, 4 May 2020 16:04:04 +0800 Subject: [PATCH 01/31] fix part of memory leak --- src/vnode/src/vnodeWrite.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/vnode/src/vnodeWrite.c b/src/vnode/src/vnodeWrite.c index 278a2bb747..d7d43cf453 100644 --- a/src/vnode/src/vnodeWrite.c +++ b/src/vnode/src/vnodeWrite.c @@ -111,11 +111,13 @@ static int32_t vnodeProcessCreateTableMsg(SVnodeObj *pVnode, void *pCont, SRspRe int32_t code = 0; dTrace("pVnode:%p vgId:%d, table:%s, start to create", pVnode, pVnode->vgId, pTable->tableId); - int16_t numOfColumns = htons(pTable->numOfColumns); - int16_t numOfTags = htons(pTable->numOfTags); - int32_t sid = htonl(pTable->sid); - uint64_t uid = htobe64(pTable->uid); - SSchema *pSchema = (SSchema *) pTable->data; + int16_t numOfColumns = htons(pTable->numOfColumns); + int16_t numOfTags = htons(pTable->numOfTags); + int32_t sid = htonl(pTable->sid); + uint64_t uid = htobe64(pTable->uid); + SSchema * pSchema = (SSchema *)pTable->data; + STSchema *pDestTagSchema = NULL; + SDataRow dataRow = NULL; int32_t totalCols = numOfColumns + numOfTags; @@ -130,7 +132,7 @@ static int32_t vnodeProcessCreateTableMsg(SVnodeObj *pVnode, void *pCont, SRspRe tsdbTableSetName(&tCfg, pTable->tableId, false); if (numOfTags != 0) { - STSchema *pDestTagSchema = tdNewSchema(numOfTags); + pDestTagSchema = tdNewSchema(numOfTags); for (int i = numOfColumns; i < totalCols; i++) { tdSchemaAddCol(pDestTagSchema, pSchema[i].type, htons(pSchema[i].colId), htons(pSchema[i].bytes)); } @@ -139,7 +141,7 @@ static int32_t vnodeProcessCreateTableMsg(SVnodeObj *pVnode, void *pCont, SRspRe char *pTagData = pTable->data + totalCols * sizeof(SSchema); int accumBytes = 0; - SDataRow dataRow = tdNewDataRowFromSchema(pDestTagSchema); + dataRow = tdNewDataRowFromSchema(pDestTagSchema); for (int i = 0; i < numOfTags; i++) { STColumn *pTCol = schemaColAt(pDestTagSchema, i); @@ -150,6 +152,8 @@ static int32_t vnodeProcessCreateTableMsg(SVnodeObj *pVnode, void *pCont, SRspRe } code = tsdbCreateTable(pVnode->tsdb, &tCfg); + tdFreeDataRow(dataRow); + tfree(pDestTagSchema); tfree(pDestSchema); dTrace("pVnode:%p vgId:%d, table:%s is created, result:%x", pVnode, pVnode->vgId, pTable->tableId, code); From 9ee563996d8377c8ad33aebef7a9754f32f386fb Mon Sep 17 00:00:00 2001 From: hzcheng Date: Mon, 4 May 2020 21:41:03 +0800 Subject: [PATCH 02/31] add uid to SCompIdx --- src/tsdb/inc/tsdbMain.h | 5 +++-- src/tsdb/src/tsdbRWHelper.c | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tsdb/inc/tsdbMain.h b/src/tsdb/inc/tsdbMain.h index 39808ab02f..22d0691416 100644 --- a/src/tsdb/inc/tsdbMain.h +++ b/src/tsdb/inc/tsdbMain.h @@ -261,11 +261,12 @@ SFileGroup *tsdbGetFileGroupNext(SFileGroupIter *pIter); typedef struct { int32_t len; int32_t offset; + int32_t padding; // For padding purpose int32_t hasLast : 1; int32_t numOfBlocks : 31; - int32_t checksum; + int64_t uid; TSKEY maxKey; -} SCompIdx; /* sizeof(SCompIdx) = 24 */ +} SCompIdx; /* sizeof(SCompIdx) = 28 */ /** * if numOfSubBlocks == 0, then the SCompBlock is a sub-block diff --git a/src/tsdb/src/tsdbRWHelper.c b/src/tsdb/src/tsdbRWHelper.c index 653379e03b..e32a646296 100644 --- a/src/tsdb/src/tsdbRWHelper.c +++ b/src/tsdb/src/tsdbRWHelper.c @@ -414,6 +414,7 @@ int tsdbWriteCompInfo(SRWHelper *pHelper) { ASSERT((pIdx->len - sizeof(SCompInfo) - sizeof(TSCKSUM)) % sizeof(SCompBlock) == 0); taosCalcChecksumAppend(0, (uint8_t *)pHelper->pCompInfo, pIdx->len); pIdx->offset = lseek(pHelper->files.nHeadF.fd, 0, SEEK_END); + pIdx->uid = pHelper->tableInfo.uid; if (pIdx->offset < 0) return -1; ASSERT(pIdx->offset >= tsizeof(pHelper->pCompIdx)); From 0cbc8e6e8592a7f08b6fc4c6266e3c3644e5846f Mon Sep 17 00:00:00 2001 From: hzcheng Date: Tue, 5 May 2020 17:18:28 +0800 Subject: [PATCH 03/31] add retention policy --- src/inc/taoserror.h | 1 + src/tsdb/inc/tsdbMain.h | 7 +++-- src/tsdb/src/tsdbFile.c | 69 +++++++++++++++++------------------------ src/tsdb/src/tsdbMain.c | 33 +++++++++++++++----- src/util/inc/ttime.h | 21 +++++++++++-- src/util/src/ttime.c | 24 -------------- 6 files changed, 77 insertions(+), 78 deletions(-) diff --git a/src/inc/taoserror.h b/src/inc/taoserror.h index c9071f4cb0..98355a8672 100644 --- a/src/inc/taoserror.h +++ b/src/inc/taoserror.h @@ -115,6 +115,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_INVALID_QUERY_ID, 0, 255, "invalid query i TAOS_DEFINE_ERROR(TSDB_CODE_INVALID_STREAM_ID, 0, 256, "invalid stream id") TAOS_DEFINE_ERROR(TSDB_CODE_INVALID_CONNECTION, 0, 257, "invalid connection") TAOS_DEFINE_ERROR(TSDB_CODE_SDB_ERROR, 0, 258, "sdb error") +TAOS_DEFINE_ERROR(TSDB_CODE_TIMESTAMP_OUT_OF_RANGE, 0, 259, "timestamp is out of range") // acct TAOS_DEFINE_ERROR(TSDB_CODE_ACCT_ALREADY_EXIST, 0, 300, "accounts already exist") diff --git a/src/tsdb/inc/tsdbMain.h b/src/tsdb/inc/tsdbMain.h index 39808ab02f..e21a35a42f 100644 --- a/src/tsdb/inc/tsdbMain.h +++ b/src/tsdb/inc/tsdbMain.h @@ -227,13 +227,13 @@ typedef struct { int maxFGroups; int numOfFGroups; - SFileGroup fGroup[]; + SFileGroup *fGroup; } STsdbFileH; #define TSDB_MIN_FILE_ID(fh) (fh)->fGroup[0].fileId #define TSDB_MAX_FILE_ID(fh) (fh)->fGroup[(fh)->numOfFGroups - 1].fileId -STsdbFileH *tsdbInitFileH(char *dataDir, int maxFiles); +STsdbFileH *tsdbInitFileH(char *dataDir, STsdbCfg *pCfg); void tsdbCloseFileH(STsdbFileH *pFileH); int tsdbCreateFile(char *dataDir, int fileId, const char *suffix, int maxTables, SFile *pFile, int writeHeader, int toClose); @@ -485,6 +485,9 @@ int tsdbMoveLastBlockIfNeccessary(SRWHelper *pHelper); int tsdbWriteCompInfo(SRWHelper *pHelper); int tsdbWriteCompIdx(SRWHelper *pHelper); +// --------- Other functions need to further organize +void tsdbFitRetention(STsdbRepo *pRepo); + #ifdef __cplusplus } #endif diff --git a/src/tsdb/src/tsdbFile.c b/src/tsdb/src/tsdbFile.c index ab76f69bed..51bdda79e6 100644 --- a/src/tsdb/src/tsdbFile.c +++ b/src/tsdb/src/tsdbFile.c @@ -27,6 +27,7 @@ #include "tchecksum.h" #include "tsdbMain.h" #include "tutil.h" +#include "ttime.h" const char *tsdbFileSuffix[] = { ".head", // TSDB_FILE_TYPE_HEAD @@ -40,13 +41,19 @@ static int tsdbWriteFileHead(SFile *pFile); static int tsdbWriteHeadFileIdx(SFile *pFile, int maxTables); static int tsdbOpenFGroup(STsdbFileH *pFileH, char *dataDir, int fid); -STsdbFileH *tsdbInitFileH(char *dataDir, int maxFiles) { - STsdbFileH *pFileH = (STsdbFileH *)calloc(1, sizeof(STsdbFileH) + sizeof(SFileGroup) * maxFiles); +STsdbFileH *tsdbInitFileH(char *dataDir, STsdbCfg *pCfg) { + STsdbFileH *pFileH = (STsdbFileH *)calloc(1, sizeof(STsdbFileH)); if (pFileH == NULL) { // TODO: deal with ERROR here return NULL; } - pFileH->maxFGroups = maxFiles; + pFileH->maxFGroups = pCfg->keep / pCfg->daysPerFile + 2; + + pFileH->fGroup = (SFileGroup *)calloc(pFileH->maxFGroups, sizeof(SFileGroup)); + if (pFileH->fGroup == NULL) { + free(pFileH); + return NULL; + } DIR *dir = opendir(dataDir); if (dir == NULL) { @@ -69,7 +76,12 @@ STsdbFileH *tsdbInitFileH(char *dataDir, int maxFiles) { return pFileH; } -void tsdbCloseFileH(STsdbFileH *pFileH) { free(pFileH); } +void tsdbCloseFileH(STsdbFileH *pFileH) { + if (pFileH) { + tfree(pFileH->fGroup); + free(pFileH); + } +} static int tsdbInitFile(char *dataDir, int fid, const char *suffix, SFile *pFile) { tsdbGetFileName(dataDir, fid, suffix, pFile->fname); @@ -161,6 +173,18 @@ void tsdbInitFileGroupIter(STsdbFileH *pFileH, SFileGroupIter *pIter, int direct } } +void tsdbFitRetention(STsdbRepo *pRepo) { + STsdbFileH *pFileH = pRepo->tsdbFileH; + SFileGroup *pGroup = pFileH->fGroup; + + int mfid = + tsdbGetKeyFileId(taosGetTimestamp(pRepo->config.precision), pRepo->config.daysPerFile, pRepo->config.precision); + + while (pGroup[0].fileId < mfid) { + tsdbRemoveFileGroup(pFileH, pGroup[0].fileId); + } +} + void tsdbSeekFileGroupIter(SFileGroupIter *pIter, int fid) { if (pIter->numOfFGroups == 0) { assert(pIter->pFileGroup == NULL); @@ -252,43 +276,6 @@ int tsdbCopyBlockDataInFile(SFile *pOutFile, SFile *pInFile, SCompInfo *pCompInf return 0; } -// int tsdbLoadCompIdx(SFileGroup *pGroup, void *buf, int maxTables) { -// SFile *pFile = &(pGroup->files[TSDB_FILE_TYPE_HEAD]); -// if (lseek(pFile->fd, TSDB_FILE_HEAD_SIZE, SEEK_SET) < 0) return -1; - -// if (read(pFile->fd, buf, sizeof(SCompIdx) * maxTables) < 0) return -1; -// // TODO: need to check the correctness -// return 0; -// } - -// int tsdbLoadCompBlocks(SFileGroup *pGroup, SCompIdx *pIdx, void *buf) { -// SFile *pFile = &(pGroup->files[TSDB_FILE_TYPE_HEAD]); - -// if (lseek(pFile->fd, pIdx->offset, SEEK_SET) < 0) return -1; - -// if (read(pFile->fd, buf, pIdx->len) < 0) return -1; - -// // TODO: need to check the correctness - -// return 0; -// } - -// int tsdbLoadCompCols(SFile *pFile, SCompBlock *pBlock, void *buf) { -// // assert(pBlock->numOfSubBlocks == 0 || pBlock->numOfSubBlocks == 1); - -// if (lseek(pFile->fd, pBlock->offset, SEEK_SET) < 0) return -1; -// size_t size = sizeof(SCompData) + sizeof(SCompCol) * pBlock->numOfCols; -// if (read(pFile->fd, buf, size) < 0) return -1; - -// return 0; -// } - -// int tsdbLoadColData(SFile *pFile, SCompCol *pCol, int64_t blockBaseOffset, void *buf) { -// if (lseek(pFile->fd, blockBaseOffset + pCol->offset, SEEK_SET) < 0) return -1; -// if (read(pFile->fd, buf, pCol->len) < 0) return -1; -// return 0; -// } - static int compFGroupKey(const void *key, const void *fgroup) { int fid = *(int *)key; SFileGroup *pFGroup = (SFileGroup *)fgroup; diff --git a/src/tsdb/src/tsdbMain.c b/src/tsdb/src/tsdbMain.c index b1ef3d2d9c..dd5dbd3f8d 100644 --- a/src/tsdb/src/tsdbMain.c +++ b/src/tsdb/src/tsdbMain.c @@ -6,6 +6,7 @@ #include "tsdbMain.h" #include "tscompression.h" #include "tchecksum.h" +#include "ttime.h" int tsdbDebugFlag = 135; @@ -27,7 +28,7 @@ static int32_t tsdbCheckAndSetDefaultCfg(STsdbCfg *pCfg); static int32_t tsdbSetRepoEnv(STsdbRepo *pRepo); static int32_t tsdbDestroyRepoEnv(STsdbRepo *pRepo); // static int tsdbOpenMetaFile(char *tsdbDir); -static int32_t tsdbInsertDataToTable(TsdbRepoT *repo, SSubmitBlk *pBlock); +static int32_t tsdbInsertDataToTable(TsdbRepoT *repo, SSubmitBlk *pBlock, TSKEY now); static int32_t tsdbRestoreCfg(STsdbRepo *pRepo, STsdbCfg *pCfg); static int32_t tsdbGetDataDirName(STsdbRepo *pRepo, char *fname); static void * tsdbCommitData(void *arg); @@ -214,7 +215,7 @@ TsdbRepoT *tsdbOpenRepo(char *tsdbDir, STsdbAppH *pAppH) { } tsdbGetDataDirName(pRepo, dataDir); - pRepo->tsdbFileH = tsdbInitFileH(dataDir, pRepo->config.maxTables); + pRepo->tsdbFileH = tsdbInitFileH(dataDir, &(pRepo->config)); if (pRepo->tsdbFileH == NULL) { tsdbFreeCache(pRepo->tsdbCache); tsdbFreeMeta(pRepo->tsdbMeta); @@ -394,13 +395,16 @@ STableInfo *tsdbGetTableInfo(TsdbRepoT *pRepo, STableId tableId) { // TODO: need to return the number of data inserted int32_t tsdbInsertData(TsdbRepoT *repo, SSubmitMsg *pMsg) { SSubmitMsgIter msgIter; + STsdbRepo *pRepo = (STsdbRepo *)repo; tsdbInitSubmitMsgIter(pMsg, &msgIter); SSubmitBlk *pBlock = NULL; int32_t code = TSDB_CODE_SUCCESS; - + + TSKEY now = taosGetTimestamp(pRepo->config.precision); + while ((pBlock = tsdbGetSubmitMsgNext(&msgIter)) != NULL) { - if ((code = tsdbInsertDataToTable(repo, pBlock)) != TSDB_CODE_SUCCESS) { + if ((code = tsdbInsertDataToTable(repo, pBlock, now)) != TSDB_CODE_SUCCESS) { return code; } } @@ -787,21 +791,31 @@ static int32_t tdInsertRowToTable(STsdbRepo *pRepo, SDataRow row, STable *pTable return 0; } -static int32_t tsdbInsertDataToTable(TsdbRepoT *repo, SSubmitBlk *pBlock) { +static int32_t tsdbInsertDataToTable(TsdbRepoT *repo, SSubmitBlk *pBlock, TSKEY now) { STsdbRepo *pRepo = (STsdbRepo *)repo; STableId tableId = {.uid = pBlock->uid, .tid = pBlock->tid}; STable *pTable = tsdbIsValidTableToInsert(pRepo->tsdbMeta, tableId); if (pTable == NULL) { - uError("failed to get table for insert, uid:%" PRIu64 ", tid:%d", tableId.uid, tableId.tid); + tsdbError("failed to get table for insert, uid:%" PRIu64 ", tid:%d", tableId.uid, tableId.tid); return TSDB_CODE_INVALID_TABLE_ID; } - SSubmitBlkIter blkIter; - SDataRow row; + SSubmitBlkIter blkIter = {0}; + SDataRow row = NULL; + + TSKEY minKey = now - tsMsPerDay[pRepo->config.precision] * pRepo->config.keep; + TSKEY maxKey = now + tsMsPerDay[pRepo->config.precision] * pRepo->config.daysPerFile; tsdbInitSubmitBlkIter(pBlock, &blkIter); while ((row = tsdbGetSubmitBlkNext(&blkIter)) != NULL) { + if (dataRowKey(row) < minKey || dataRowKey(row) > maxKey) { + tsdbError( + "tsdbId: %d, table tid: %d, talbe uid: %ld timestamp is out of range. now: %ld maxKey: %ld, minKey: %ld", + pRepo->config.tsdbId, pTable->tableId.tid, pTable->tableId.uid, now, minKey, maxKey); + return TSDB_CODE_TIMESTAMP_OUT_OF_RANGE; + } + if (tdInsertRowToTable(pRepo, row, pTable) < 0) { return -1; } @@ -903,6 +917,9 @@ static void *tsdbCommitData(void *arg) { } } + // Do retention actions + tsdbFitRetention(pRepo); + _exit: tdFreeDataCols(pDataCols); tsdbDestroyTableIters(iters, pCfg->maxTables); diff --git a/src/util/inc/ttime.h b/src/util/inc/ttime.h index 34c241cbc0..61df65f345 100644 --- a/src/util/inc/ttime.h +++ b/src/util/inc/ttime.h @@ -22,22 +22,37 @@ extern "C" { #include #include +#include "tutil.h" //@return timestamp in second int32_t taosGetTimestampSec(); //@return timestamp in millisecond -int64_t taosGetTimestampMs(); +static FORCE_INLINE int64_t taosGetTimestampMs() { + struct timeval systemTime; + gettimeofday(&systemTime, NULL); + return (int64_t)systemTime.tv_sec * 1000L + (uint64_t)systemTime.tv_usec / 1000; +} //@return timestamp in microsecond -int64_t taosGetTimestampUs(); +static FORCE_INLINE int64_t taosGetTimestampUs() { + struct timeval systemTime; + gettimeofday(&systemTime, NULL); + return (int64_t)systemTime.tv_sec * 1000000L + (uint64_t)systemTime.tv_usec; +} /* * @return timestamp decided by global conf variable, tsTimePrecision * if precision == TSDB_TIME_PRECISION_MICRO, it returns timestamp in microsecond. * precision == TSDB_TIME_PRECISION_MILLI, it returns timestamp in millisecond. */ -int64_t taosGetTimestamp(int32_t precision); +static FORCE_INLINE int64_t taosGetTimestamp(int32_t precision) { + if (precision == TSDB_TIME_PRECISION_MICRO) { + return taosGetTimestampUs(); + } else { + return taosGetTimestampMs(); + } +} int32_t getTimestampInUsFromStr(char* token, int32_t tokenlen, int64_t* ts); diff --git a/src/util/src/ttime.c b/src/util/src/ttime.c index 015cb19606..d34bf0e6ce 100644 --- a/src/util/src/ttime.c +++ b/src/util/src/ttime.c @@ -121,30 +121,6 @@ static int32_t parseLocaltime(char* timestr, int64_t* time, int32_t timePrec); int32_t taosGetTimestampSec() { return (int32_t)time(NULL); } -int64_t taosGetTimestampMs() { - struct timeval systemTime; - gettimeofday(&systemTime, NULL); - return (int64_t)systemTime.tv_sec * 1000L + (uint64_t)systemTime.tv_usec / 1000; -} - -int64_t taosGetTimestampUs() { - struct timeval systemTime; - gettimeofday(&systemTime, NULL); - return (int64_t)systemTime.tv_sec * 1000000L + (uint64_t)systemTime.tv_usec; -} - -/* - * If tsTimePrecision == 1, taosGetTimestamp will return timestamp in microsecond. - * Otherwise, it will return timestamp in millisecond. - */ -int64_t taosGetTimestamp(int32_t precision) { - if (precision == TSDB_TIME_PRECISION_MICRO) { - return taosGetTimestampUs(); - } else { - return taosGetTimestampMs(); - } -} - int32_t taosParseTime(char* timestr, int64_t* time, int32_t len, int32_t timePrec) { /* parse datatime string in with tz */ if (strnchr(timestr, 'T', len, false) != NULL) { From bf06466cf211878d9a0bc1f4ee8b086e62dee291 Mon Sep 17 00:00:00 2001 From: hzcheng Date: Tue, 5 May 2020 22:01:56 +0800 Subject: [PATCH 04/31] add change repository compression options --- src/inc/taoserror.h | 3 ++ src/tsdb/inc/tsdbMain.h | 3 ++ src/tsdb/src/tsdbCache.c | 75 ++++++++++++++++++++++++++++++++++++---- src/tsdb/src/tsdbFile.c | 2 +- src/tsdb/src/tsdbMain.c | 48 ++++++++++++++++++++++--- 5 files changed, 118 insertions(+), 13 deletions(-) diff --git a/src/inc/taoserror.h b/src/inc/taoserror.h index 98355a8672..b5ab4412a9 100644 --- a/src/inc/taoserror.h +++ b/src/inc/taoserror.h @@ -173,6 +173,9 @@ TAOS_DEFINE_ERROR(TSDB_CODE_INVALID_VALUE, 0, 462, "invalid value") // others TAOS_DEFINE_ERROR(TSDB_CODE_INVALID_FILE_FORMAT, 0, 500, "invalid file format") +// TSDB +TAOS_DEFINE_ERROR(TSDB_CODE_INVALID_CONFIG, 0, 550, "invalid TSDB configuration") + #ifdef TAOS_ERROR_C }; diff --git a/src/tsdb/inc/tsdbMain.h b/src/tsdb/inc/tsdbMain.h index 89708a5553..e056a10bba 100644 --- a/src/tsdb/inc/tsdbMain.h +++ b/src/tsdb/inc/tsdbMain.h @@ -160,6 +160,7 @@ typedef struct { typedef struct { int64_t index; + int numOfCacheBlocks; SList * memPool; } STsdbCachePool; @@ -488,6 +489,8 @@ int tsdbWriteCompIdx(SRWHelper *pHelper); // --------- Other functions need to further organize void tsdbFitRetention(STsdbRepo *pRepo); +int tsdbAlterCacheTotalBlocks(STsdbRepo *pRepo, int totalBlocks); +void tsdbAdjustCacheBlocks(STsdbCache *pCache); #ifdef __cplusplus } diff --git a/src/tsdb/src/tsdbCache.c b/src/tsdb/src/tsdbCache.c index 9351bc602b..84f8a81eea 100644 --- a/src/tsdb/src/tsdbCache.c +++ b/src/tsdb/src/tsdbCache.c @@ -20,6 +20,7 @@ static int tsdbAllocBlockFromPool(STsdbCache *pCache); static void tsdbFreeBlockList(SList *list); static void tsdbFreeCacheMem(SCacheMem *mem); +static int tsdbAddCacheBlockToPool(STsdbCache *pCache); STsdbCache *tsdbInitCache(int cacheBlockSize, int totalBlocks, TsdbRepoT *pRepo) { STsdbCache *pCache = (STsdbCache *)calloc(1, sizeof(STsdbCache)); @@ -40,13 +41,7 @@ STsdbCache *tsdbInitCache(int cacheBlockSize, int totalBlocks, TsdbRepoT *pRepo) if (pPool->memPool == NULL) goto _err; for (int i = 0; i < totalBlocks; i++) { - STsdbCacheBlock *pBlock = (STsdbCacheBlock *)malloc(sizeof(STsdbCacheBlock) + cacheBlockSize); - if (pBlock == NULL) { - goto _err; - } - pBlock->offset = 0; - pBlock->remain = cacheBlockSize; - tdListAppend(pPool->memPool, (void *)(&pBlock)); + if (tsdbAddCacheBlockToPool(pCache) < 0) goto _err; } pCache->mem = NULL; @@ -142,4 +137,70 @@ static int tsdbAllocBlockFromPool(STsdbCache *pCache) { tsdbUnLockRepo(pCache->pRepo); return 0; +} + +int tsdbAlterCacheTotalBlocks(STsdbRepo *pRepo, int totalBlocks) { + STsdbCache *pCache = pRepo->tsdbCache; + int oldNumOfBlocks = pCache->totalCacheBlocks; + + tsdbLockRepo((TsdbRepoT *)pRepo); + + ASSERT(pCache->totalCacheBlocks != totalBlocks); + + if (pCache->totalCacheBlocks < totalBlocks) { + ASSERT(pCache->totalCacheBlocks == pCache->pool.numOfCacheBlocks); + int blocksToAdd = pCache->totalCacheBlocks - totalBlocks; + pCache->totalCacheBlocks = totalBlocks; + for (int i = 0; i < blocksToAdd; i++) { + if (tsdbAddCacheBlockToPool(pCache) < 0) { + tsdbUnLockRepo((TsdbRepoT *)pRepo); + tsdbError("tsdbId %d: failed to add cache block to cache pool", pRepo->config.tsdbId); + return -1; + } + } + } else { + pCache->totalCacheBlocks = totalBlocks; + tsdbAdjustCacheBlocks(pCache); + } + + tsdbUnLockRepo((TsdbRepoT *)pRepo); + tsdbTrace("tsdbId %d: tsdb total cache blocks changed from %d to %d", pRepo->config.tsdbId, oldNumOfBlocks, totalBlocks); + return 0; +} + +static int tsdbAddCacheBlockToPool(STsdbCache *pCache) { + STsdbCachePool *pPool = &pCache->pool; + + STsdbCacheBlock *pBlock = malloc(sizeof(STsdbCacheBlock) + pCache->cacheBlockSize); + if (pBlock == NULL) return -1; + + pBlock->offset = 0; + pBlock->remain = pCache->cacheBlockSize; + tdListAppend(pPool->memPool, (void *)(&pBlock)); + pPool->numOfCacheBlocks++; + + return 0; +} + +static int tsdbRemoveCacheBlockFromPool(STsdbCache *pCache) { + STsdbCachePool *pPool = &pCache->pool; + STsdbCacheBlock *pBlock = NULL; + + ASSERT(pCache->totalCacheBlocks >= 0); + + SListNode *node = tdListPopHead(pPool->memPool); + if (node == NULL) return -1; + + tdListNodeGetData(pPool->memPool, node, &pBlock); + free(pBlock); + listNodeFree(node); + pPool->numOfCacheBlocks--; + + return 0; +} + +void tsdbAdjustCacheBlocks(STsdbCache *pCache) { + while (pCache->totalCacheBlocks < pCache->pool.numOfCacheBlocks) { + if (tsdbRemoveCacheBlockFromPool(pCache) < 0) break; + } } \ No newline at end of file diff --git a/src/tsdb/src/tsdbFile.c b/src/tsdb/src/tsdbFile.c index 51bdda79e6..0c1b9e314e 100644 --- a/src/tsdb/src/tsdbFile.c +++ b/src/tsdb/src/tsdbFile.c @@ -47,7 +47,7 @@ STsdbFileH *tsdbInitFileH(char *dataDir, STsdbCfg *pCfg) { return NULL; } - pFileH->maxFGroups = pCfg->keep / pCfg->daysPerFile + 2; + pFileH->maxFGroups = pCfg->keep / pCfg->daysPerFile + 3; pFileH->fGroup = (SFileGroup *)calloc(pFileH->maxFGroups, sizeof(SFileGroup)); if (pFileH->fGroup == NULL) { diff --git a/src/tsdb/src/tsdbMain.c b/src/tsdb/src/tsdbMain.c index dd5dbd3f8d..3f41a3c5fe 100644 --- a/src/tsdb/src/tsdbMain.c +++ b/src/tsdb/src/tsdbMain.c @@ -36,8 +36,9 @@ static int tsdbCommitToFile(STsdbRepo *pRepo, int fid, SSkipListIterator **i SDataCols *pDataCols); static TSKEY tsdbNextIterKey(SSkipListIterator *pIter); static int tsdbHasDataToCommit(SSkipListIterator **iters, int nIters, TSKEY minKey, TSKEY maxKey); -// static int tsdbWriteBlockToFileImpl(SFile *pFile, SDataCols *pCols, int pointsToWrite, int64_t *offset, int32_t *len, -// int64_t uid); +static void tsdbAlterCompression(STsdbRepo *pRepo, int8_t compression); +static void tsdbAlterKeep(STsdbRepo *pRepo, int32_t keep); +static void tsdbAlterMaxTables(STsdbRepo *pRepo, int32_t maxTables); #define TSDB_GET_TABLE_BY_ID(pRepo, sid) (((STSDBRepo *)pRepo)->pTableList)[sid] #define TSDB_GET_TABLE_BY_NAME(pRepo, name) @@ -298,10 +299,23 @@ int32_t tsdbCloseRepo(TsdbRepoT *repo) { */ int32_t tsdbConfigRepo(TsdbRepoT *repo, STsdbCfg *pCfg) { STsdbRepo *pRepo = (STsdbRepo *)repo; + STsdbCfg * pRCfg = &pRepo->config; - pRepo->config = *pCfg; - // TODO - return 0; + if (tsdbCheckAndSetDefaultCfg(pCfg) < 0) return TSDB_CODE_INVALID_CONFIG; + + ASSERT(pRCfg->tsdbId == pCfg->tsdbId); + ASSERT(pRCfg->cacheBlockSize == pCfg->cacheBlockSize); + ASSERT(pRCfg->daysPerFile == pCfg->daysPerFile); + ASSERT(pRCfg->minRowsPerFileBlock == pCfg->minRowsPerFileBlock); + ASSERT(pRCfg->maxRowsPerFileBlock == pCfg->maxRowsPerFileBlock); + ASSERT(pRCfg->precision == pCfg->precision); + + if (pRCfg->compression != pCfg->compression) tsdbAlterCompression(pRepo, pCfg->compression); + if (pRCfg->keep != pCfg->keep) tsdbAlterKeep(pRepo, pCfg->keep); + if (pRCfg->totalBlocks != pCfg->totalBlocks) tsdbAlterCacheTotalBlocks(pRepo, pCfg->totalBlocks); + if (pRCfg->maxTables != pCfg->maxTables) tsdbAlterMaxTables(pRepo, pCfg->maxTables); + + return TSDB_CODE_SUCCESS; } int32_t tsdbTriggerCommit(TsdbRepoT *repo) { @@ -927,6 +941,7 @@ _exit: tsdbLockRepo(arg); tdListMove(pCache->imem->list, pCache->pool.memPool); + tsdbAdjustCacheBlocks(pCache); tdListFree(pCache->imem->list); free(pCache->imem); pCache->imem = NULL; @@ -1045,4 +1060,27 @@ static int tsdbHasDataToCommit(SSkipListIterator **iters, int nIters, TSKEY minK if (nextKey > 0 && (nextKey >= minKey && nextKey <= maxKey)) return 1; } return 0; +} + +static void tsdbAlterCompression(STsdbRepo *pRepo, int8_t compression) { + pRepo->config.compression = compression; +} + +static void tsdbAlterKeep(STsdbRepo *pRepo, int32_t keep) { + STsdbCfg *pCfg = &pRepo->config; + + int maxFiles = keep / pCfg->maxTables + 3; + if (pRepo->config.keep > keep) { + pRepo->tsdbFileH->maxFGroups = maxFiles; + } else { + pRepo->tsdbFileH->fGroup = realloc(pRepo->tsdbFileH->fGroup, sizeof(SFileGroup)); + if (pRepo->tsdbFileH->fGroup == NULL) { + // TODO: deal with the error + } + pRepo->tsdbFileH->maxFGroups = maxFiles; + } +} + +static void tsdbAlterMaxTables(STsdbRepo *pRepo, int32_t maxTables) { + // TODO } \ No newline at end of file From 5eef78722e1d31c9f554ad8814a6fc33aa01b626 Mon Sep 17 00:00:00 2001 From: hjxilinx Date: Tue, 5 May 2020 23:00:48 +0800 Subject: [PATCH 05/31] [td-168] add comments. --- src/client/src/tscParseInsert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/src/tscParseInsert.c b/src/client/src/tscParseInsert.c index 2ce3748dd1..4bee595dac 100644 --- a/src/client/src/tscParseInsert.c +++ b/src/client/src/tscParseInsert.c @@ -310,7 +310,7 @@ int32_t tsParseOneColumnData(SSchema *pSchema, SSQLToken *pToken, char *payload, *payload = TSDB_DATA_BINARY_NULL; } else { // too long values will return invalid sql, not be truncated automatically - if (pToken->n + VARSTR_HEADER_SIZE > pSchema->bytes) { + if (pToken->n + VARSTR_HEADER_SIZE > pSchema->bytes) { //todo refactor return tscInvalidSQLErrMsg(msg, "string data overflow", pToken->z); } From aa296b8ca63e38cb7d687d36d0cc943404b408cc Mon Sep 17 00:00:00 2001 From: slguan Date: Wed, 6 May 2020 15:15:24 +0800 Subject: [PATCH 06/31] #1811 --- src/client/src/tscSql.c | 7 +++++++ src/kit/shell/inc/shell.h | 1 + src/kit/shell/src/shellDarwin.c | 2 +- src/kit/shell/src/shellEngine.c | 2 +- src/kit/shell/src/shellLinux.c | 2 +- src/kit/shell/src/shellWindows.c | 2 +- 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/client/src/tscSql.c b/src/client/src/tscSql.c index 87247d874b..afac69350c 100644 --- a/src/client/src/tscSql.c +++ b/src/client/src/tscSql.c @@ -168,6 +168,13 @@ static void syncConnCallback(void *param, TAOS_RES *tres, int code) { TAOS *taos_connect(const char *ip, const char *user, const char *pass, const char *db, uint16_t port) { tscTrace("try to create a connection to %s", ip); + if (port != 0) { + tsServerPort = port; + tsMnodeShellPort = tsServerPort + TSDB_PORT_MNODESHELL; + tsDnodeShellPort = tsServerPort + TSDB_PORT_DNODESHELL; + tsMnodeDnodePort = tsServerPort + TSDB_PORT_MNODEDNODE; + tsDnodeMnodePort = tsServerPort + TSDB_PORT_DNODEMNODE; + } STscObj *pObj = taosConnectImpl(ip, user, pass, db, port, NULL, NULL, NULL); if (pObj != NULL) { diff --git a/src/kit/shell/inc/shell.h b/src/kit/shell/inc/shell.h index 7abe8a5776..381c6f1dbf 100644 --- a/src/kit/shell/inc/shell.h +++ b/src/kit/shell/inc/shell.h @@ -61,6 +61,7 @@ struct arguments { int threadNum; char* commands; int abort; + int port; }; /**************** Function declarations ****************/ diff --git a/src/kit/shell/src/shellDarwin.c b/src/kit/shell/src/shellDarwin.c index 13513426cd..cd2fe6df33 100644 --- a/src/kit/shell/src/shellDarwin.c +++ b/src/kit/shell/src/shellDarwin.c @@ -81,7 +81,7 @@ void shellParseArgument(int argc, char *argv[], struct arguments *arguments) { // for management port else if (strcmp(argv[i], "-P") == 0) { if (i < argc - 1) { - tsMnodeShellPort = atoi(argv[++i]); + arguments->port = atoi(argv[++i]); } else { fprintf(stderr, "option -P requires an argument\n"); exit(EXIT_FAILURE); diff --git a/src/kit/shell/src/shellEngine.c b/src/kit/shell/src/shellEngine.c index f9ea5f4777..152397c044 100644 --- a/src/kit/shell/src/shellEngine.c +++ b/src/kit/shell/src/shellEngine.c @@ -68,7 +68,7 @@ TAOS *shellInit(struct arguments *args) { tsMeterMetaKeepTimer = 3000; // Connect to the database. - TAOS *con = taos_connect(args->host, args->user, args->password, args->database, tsMnodeShellPort); + TAOS *con = taos_connect(args->host, args->user, args->password, args->database, args->port); if (con == NULL) { return con; } diff --git a/src/kit/shell/src/shellLinux.c b/src/kit/shell/src/shellLinux.c index 22ffa78c81..0d9458e00c 100644 --- a/src/kit/shell/src/shellLinux.c +++ b/src/kit/shell/src/shellLinux.c @@ -63,7 +63,7 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) { break; case 'P': if (arg) { - tsMnodeShellPort = atoi(arg); + arguments->port = atoi(arg); } else { fprintf(stderr, "Invalid port\n"); return -1; diff --git a/src/kit/shell/src/shellWindows.c b/src/kit/shell/src/shellWindows.c index 8863f4fa46..ac04c593fb 100644 --- a/src/kit/shell/src/shellWindows.c +++ b/src/kit/shell/src/shellWindows.c @@ -61,7 +61,7 @@ void shellParseArgument(int argc, char *argv[], struct arguments *arguments) { // for management port else if (strcmp(argv[i], "-P") == 0) { if (i < argc - 1) { - tsMnodeShellPort = atoi(argv[++i]); + arguments->port = atoi(argv[++i]); } else { fprintf(stderr, "option -P requires an argument\n"); exit(EXIT_FAILURE); From c6a90d6afd82b820ae01cd42fbab866998e1ab0f Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Wed, 6 May 2020 15:20:47 +0800 Subject: [PATCH 07/31] enhance memory leak check in ci. --- .travis.yml | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 37e6e5a6c3..f9a27fdabd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,17 +59,30 @@ matrix: GREEN_UNDERLINE='\033[4;32m' NC='\033[0m' - tail -10 mem-error-out.txt - defiMemError=`grep -m 1 'definitely lost' mem-error-out.txt | awk '{print $7}'` - memError=`grep -m 1 'ERROR SUMMARY' mem-error-out.txt | awk '{print $4}'` + grep 'ERROR SUMMARY' mem-error-out.txt | uniq | tee uniq-mem-error-out.txt - if [ -n "$memError" ]; then - if [ "$memError" -gt 16 ] || [ "$defiMemError" -gt 0 ]; then - echo -e "${RED} ## Memory errors number valgrind reports is $memError.\ - Definitely lost is $defiMemError. More than our threshold! ## ${NC}" - travis_terminate $memError + for memError in `cat uniq-mem-error-out.txt | awk '{print $4}'` + do + if [ -n "$memError" ]; then + if [ "$memError" -gt 16 ]; then + echo -e "${RED} ## Memory errors number valgrind reports is $memError.\ + More than our threshold! ## ${NC}" + travis_terminate $memError + fi fi - fi + done + + grep 'definitely lost' mem-error-out.txt | uniq | tee uniq-definitely-lost-out.txt + for defiMemError in `cat uniq-definitely-lost-out.txt | awk '{print $7}'` + do + if [ -n "$defiMemError" ]; then + if [ "$defiMemError" -gt 16 ]; then + echo -e "${RED} ## Memory errors number valgrind reports \ + Definitely lost is $defiMemError. More than our threshold! ## ${NC}" + travis_terminate $defiMemError + fi + fi + done ;; esac From 19836961ced1c60f7184384a9bcc4c83e653f8cf Mon Sep 17 00:00:00 2001 From: jtao1735 Date: Wed, 6 May 2020 10:03:41 +0000 Subject: [PATCH 08/31] use semphore instead of polling for tqeueu --- src/dnode/src/dnodeRead.c | 8 +++++--- src/dnode/src/dnodeWrite.c | 3 +++ src/rpc/src/rpcMain.c | 2 +- src/util/src/tqueue.c | 14 ++++++++++++-- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/dnode/src/dnodeRead.c b/src/dnode/src/dnodeRead.c index e52b59d20a..efa5dc7695 100644 --- a/src/dnode/src/dnodeRead.c +++ b/src/dnode/src/dnodeRead.c @@ -74,8 +74,10 @@ void dnodeCleanupRead() { for (int i=0; i < readPool.max; ++i) { SReadWorker *pWorker = readPool.readWorker + i; - if (pWorker->thread) + if (pWorker->thread) { + pthread_cancel(pWorker->thread); pthread_join(pWorker->thread, NULL); + } } taosCloseQset(readQset); @@ -114,12 +116,12 @@ void dnodeRead(SRpcMsg *pMsg) { pRead->pCont = pCont; pRead->contLen = pHead->contLen; - taosWriteQitem(queue, TAOS_QTYPE_RPC, pRead); - // next vnode leftLen -= pHead->contLen; pCont -= pHead->contLen; queuedMsgNum++; + + taosWriteQitem(queue, TAOS_QTYPE_RPC, pRead); } if (queuedMsgNum == 0) { diff --git a/src/dnode/src/dnodeWrite.c b/src/dnode/src/dnodeWrite.c index 39757c690f..4ca9b1935d 100644 --- a/src/dnode/src/dnodeWrite.c +++ b/src/dnode/src/dnodeWrite.c @@ -71,7 +71,10 @@ void dnodeCleanupWrite() { for (int32_t i = 0; i < wWorkerPool.max; ++i) { SWriteWorker *pWorker = wWorkerPool.writeWorker + i; if (pWorker->thread) { + pthread_cancel(pWorker->thread); pthread_join(pWorker->thread, NULL); + taosFreeQall(pWorker->qall); + taosCloseQset(pWorker->qset); } } diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index d463bc3d95..3e4e05cd11 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -1364,7 +1364,7 @@ static int rpcCheckAuthentication(SRpcConn *pConn, char *msg, int msgLen) { } } } else { - tTrace("%s %p, auth spi not matched, msg discarded", pRpc->label, pConn); + tTrace("%s %p, auth spi:%d not matched with received:%d", pRpc->label, pConn, pConn->spi, pHead->spi); code = TSDB_CODE_AUTH_FAILURE; } diff --git a/src/util/src/tqueue.c b/src/util/src/tqueue.c index c639452823..a458cefc9c 100644 --- a/src/util/src/tqueue.c +++ b/src/util/src/tqueue.c @@ -41,6 +41,7 @@ typedef struct _taos_qset { pthread_mutex_t mutex; int32_t numOfQueues; int32_t numOfItems; + tsem_t sem; } STaosQset; typedef struct _taos_qall { @@ -59,6 +60,7 @@ taos_queue taosOpenQueue() { } pthread_mutex_init(&queue->mutex, NULL); + return queue; } @@ -79,7 +81,7 @@ void taosCloseQueue(taos_queue param) { } pthread_mutex_unlock(&queue->mutex); - + pthread_mutex_destroy(&queue->mutex); free(queue); } @@ -116,11 +118,12 @@ int taosWriteQitem(taos_queue param, int type, void *item) { queue->numOfItems++; if (queue->qset) atomic_add_fetch_32(&queue->qset->numOfItems, 1); - uTrace("item:%p is put into queue:%p, type:%d items:%d", item, queue, type, queue->numOfItems); pthread_mutex_unlock(&queue->mutex); + if (queue->qset) tsem_post(&queue->qset->sem); + return 0; } @@ -217,12 +220,15 @@ taos_qset taosOpenQset() { } pthread_mutex_init(&qset->mutex, NULL); + tsem_init(&qset->sem, 0, 0); return qset; } void taosCloseQset(taos_qset param) { STaosQset *qset = (STaosQset *)param; + pthread_mutex_destroy(&qset->mutex); + tsem_destroy(&qset->sem); free(qset); } @@ -298,6 +304,8 @@ int taosReadQitemFromQset(taos_qset param, int *type, void **pitem, void **phand STaosQnode *pNode = NULL; int code = 0; + tsem_wait(&qset->sem); + pthread_mutex_lock(&qset->mutex); for(int i=0; inumOfQueues; ++i) { @@ -339,6 +347,7 @@ int taosReadAllQitemsFromQset(taos_qset param, taos_qall p2, void **phandle) { STaosQall *qall = (STaosQall *)p2; int code = 0; + tsem_wait(&qset->sem); pthread_mutex_lock(&qset->mutex); for(int i=0; inumOfQueues; ++i) { @@ -364,6 +373,7 @@ int taosReadAllQitemsFromQset(taos_qset param, taos_qall p2, void **phandle) { queue->tail = NULL; queue->numOfItems = 0; atomic_sub_fetch_32(&qset->numOfItems, qall->numOfItems); + for (int j=1; jnumOfItems; ++j) tsem_wait(&qset->sem); } pthread_mutex_unlock(&queue->mutex); From 2b3df7d33efceab754470db38261458a3bf2e54d Mon Sep 17 00:00:00 2001 From: hjxilinx Date: Wed, 6 May 2020 18:40:34 +0800 Subject: [PATCH 09/31] [td-168]fix create binary tag bugs --- src/client/src/tscSQLParser.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index e23086c4e7..12032725c3 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -5520,18 +5520,26 @@ int32_t doCheckForCreateFromStable(SSqlObj* pSql, SSqlInfo* pInfo) { SSchema* pTagSchema = tscGetTableTagSchema(pStableMeterMetaInfo->pTableMeta); char* tagVal = pCreateTable->usingInfo.tagdata.data; + int32_t ret = TSDB_CODE_SUCCESS; + for (int32_t i = 0; i < pList->nExpr; ++i) { - int32_t ret = tVariantDump(&(pList->a[i].pVar), tagVal, pTagSchema[i].type); + + if (pTagSchema[i].type == TSDB_DATA_TYPE_BINARY || pTagSchema[i].type == TSDB_DATA_TYPE_NCHAR) { + // validate the length of binary + if (pList->a[i].pVar.nLen + VARSTR_HEADER_SIZE > pTagSchema[i].bytes) { + return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg3); + } + + *(VarDataLenT*)tagVal = pList->a[i].pVar.nLen; + ret = tVariantDump(&(pList->a[i].pVar), tagVal + VARSTR_HEADER_SIZE, pTagSchema[i].type); + } else { + ret = tVariantDump(&(pList->a[i].pVar), tagVal, pTagSchema[i].type); + } + if (ret != TSDB_CODE_SUCCESS) { return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg4); } - // validate the length of binary - if ((pTagSchema[i].type == TSDB_DATA_TYPE_BINARY || pTagSchema[i].type == TSDB_DATA_TYPE_NCHAR) && - pList->a[i].pVar.nLen > pTagSchema[i].bytes) { - return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg3); - } - tagVal += pTagSchema[i].bytes; } @@ -5541,7 +5549,7 @@ int32_t doCheckForCreateFromStable(SSqlObj* pSql, SSqlInfo* pInfo) { } STableMetaInfo* pTableMeterMetaInfo = tscGetMetaInfo(pQueryInfo, TABLE_INDEX); - int32_t ret = tscSetTableId(pTableMeterMetaInfo, &pInfo->pCreateTableInfo->name, pSql); + ret = tscSetTableId(pTableMeterMetaInfo, &pInfo->pCreateTableInfo->name, pSql); if (ret != TSDB_CODE_SUCCESS) { return ret; } From 9d05238c7beb184379136493022a3b2862965bac Mon Sep 17 00:00:00 2001 From: localvar Date: Wed, 6 May 2020 18:52:53 +0800 Subject: [PATCH 10/31] define msg code and description together --- src/common/src/tmessage.c | 120 +----------------------------- src/inc/taosmsg.h | 151 ++++++++++++++++---------------------- 2 files changed, 64 insertions(+), 207 deletions(-) diff --git a/src/common/src/tmessage.c b/src/common/src/tmessage.c index 5a134df129..0b6dbfdb51 100644 --- a/src/common/src/tmessage.c +++ b/src/common/src/tmessage.c @@ -13,122 +13,6 @@ * along with this program. If not, see . */ -char *taosMsg[] = { - "null", - "registration", - "registration-rsp", - "submit", - "submit-rsp", - "query", - "query-rsp", - "retrieve", - "retrieve-rsp", - "create-table", - "create-table-rsp", //10 - - "drop-table", - "drop-table-rsp", - "alter-table", - "alter-table-rsp", - "create-vnode", - "create-vnode-rsp", - "drop-vnode", - "drop-vnode-rsp", - "alter-vnode", - "alter-vnode-rsp", //20 - - "drop-stable", - "drop-stable-rsp", - "alter-stream", - "alter-stream-rsp", - "config-dnode", - "config-dnode-rsp", - "", - "", - "", - "", //30 - - "connect", - "connect-rsp", - "create-acct", - "create-acct-rsp", - "alter-acct", - "alter-acct-rsp", - "drop-acct", - "drop-acct-rsp", - "create-user", - "create-user-rsp", //40 - - "alter-user", - "alter-user-rsp", - "drop-user", - "drop-user-rsp", - "create-dnode", - "create-dnode-rsp", - "drop-dnode", - "drop-dnode-rsp", - "create-db", - "create-db-rsp", //50 - - "drop-db", - "drop-db-rsp", - "use-db", - "use-db-rsp", - "alter-db", - "alter-db-rsp", - "create-table", - "create-table-rsp", - "drop-table", - "drop-table-rsp", //60 - - "alter-table", - "alter-table-rsp", - "table-meta", - "table-meta-rsp", - "super-table-meta", - "super-stable-meta-rsp", - "multi-table-meta", - "multi-table-meta-rsp", - "alter-stream", - "alter-stream-rsp", //70 - - "show", - "show-rsp", - "kill-query", - "kill-query-rsp", - "kill-stream", - "kill-stream-rsp", - "kill-connection", - "kill-connectoin-rsp", - "heart-beat", - "heart-beat-rsp", //80 - - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", //90 - - "config-table", - "config-table-rsp", - "config-vnode", - "config-vnode-rsp", - "status", - "status-rsp", - "grant", - "grant-rsp", - "", - "", //100 - - "sdb-sync", - "sdb-sync-rsp", - "sdb-forward", - "sdb-forward-rsp", - "max" -}; +#define TAOS_MESSAGE_C +#include "taosmsg.h" diff --git a/src/inc/taosmsg.h b/src/inc/taosmsg.h index 68e72b0964..a91a1e2128 100644 --- a/src/inc/taosmsg.h +++ b/src/inc/taosmsg.h @@ -28,103 +28,76 @@ extern "C" { #include "trpc.h" // message type -#define TSDB_MSG_TYPE_REG 1 -#define TSDB_MSG_TYPE_REG_RSP 2 -#define TSDB_MSG_TYPE_SUBMIT 3 -#define TSDB_MSG_TYPE_SUBMIT_RSP 4 -#define TSDB_MSG_TYPE_QUERY 5 -#define TSDB_MSG_TYPE_QUERY_RSP 6 -#define TSDB_MSG_TYPE_RETRIEVE 7 -#define TSDB_MSG_TYPE_RETRIEVE_RSP 8 + +#ifdef TAOS_MESSAGE_C +#define TAOS_DEFINE_MESSAGE_TYPE( name, msg ) msg, msg "-rsp", +char *taosMsg[] = { + "null", +#else +#define TAOS_DEFINE_MESSAGE_TYPE( name, msg ) name, name##_RSP, +enum { + TSDB_MESSAGE_NULL = 0, +#endif + +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_REG, "registration" ) // 1 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_SUBMIT, "submit" ) // 3 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_QUERY, "query" ) // 5 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_RETRIEVE, "retrieve" ) // 7 // message from mnode to dnode -#define TSDB_MSG_TYPE_MD_CREATE_TABLE 9 -#define TSDB_MSG_TYPE_MD_CREATE_TABLE_RSP 10 -#define TSDB_MSG_TYPE_MD_DROP_TABLE 11 -#define TSDB_MSG_TYPE_MD_DROP_TABLE_RSP 12 -#define TSDB_MSG_TYPE_MD_ALTER_TABLE 13 -#define TSDB_MSG_TYPE_MD_ALTER_TABLE_RSP 14 -#define TSDB_MSG_TYPE_MD_CREATE_VNODE 15 -#define TSDB_MSG_TYPE_MD_CREATE_VNODE_RSP 16 -#define TSDB_MSG_TYPE_MD_DROP_VNODE 17 -#define TSDB_MSG_TYPE_MD_DROP_VNODE_RSP 18 -#define TSDB_MSG_TYPE_MD_DROP_STABLE 19 -#define TSDB_MSG_TYPE_MD_DROP_STABLE_RSP 20 -#define TSDB_MSG_TYPE_MD_ALTER_STREAM 21 -#define TSDB_MSG_TYPE_MD_ALTER_STREAM_RSP 22 -#define TSDB_MSG_TYPE_MD_CONFIG_DNODE 23 -#define TSDB_MSG_TYPE_MD_CONFIG_DNODE_RSP 24 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_MD_CREATE_TABLE, "create-table" ) // 9 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_MD_DROP_TABLE, "drop-table" ) // 11 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_MD_ALTER_TABLE, "alter-table" ) // 13 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_MD_CREATE_VNODE, "create-vnode" ) // 15 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_MD_DROP_VNODE, "drop-vnode" ) // 17 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_MD_DROP_STABLE, "drop-stable" ) // 19 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_MD_ALTER_STREAM, "alter-stream" ) // 21 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_MD_CONFIG_DNODE, "config-dnode" ) // 23 // message from client to mnode -#define TSDB_MSG_TYPE_CM_CONNECT 31 -#define TSDB_MSG_TYPE_CM_CONNECT_RSP 32 -#define TSDB_MSG_TYPE_CM_CREATE_ACCT 33 -#define TSDB_MSG_TYPE_CM_CREATE_ACCT_RSP 34 -#define TSDB_MSG_TYPE_CM_ALTER_ACCT 35 -#define TSDB_MSG_TYPE_CM_ALTER_ACCT_RSP 36 -#define TSDB_MSG_TYPE_CM_DROP_ACCT 37 -#define TSDB_MSG_TYPE_CM_DROP_ACCT_RSP 38 -#define TSDB_MSG_TYPE_CM_CREATE_USER 39 -#define TSDB_MSG_TYPE_CM_CREATE_USER_RSP 40 -#define TSDB_MSG_TYPE_CM_ALTER_USER 41 -#define TSDB_MSG_TYPE_CM_ALTER_USER_RSP 42 -#define TSDB_MSG_TYPE_CM_DROP_USER 43 -#define TSDB_MSG_TYPE_CM_DROP_USER_RSP 44 -#define TSDB_MSG_TYPE_CM_CREATE_DNODE 45 -#define TSDB_MSG_TYPE_CM_CREATE_DNODE_RSP 46 -#define TSDB_MSG_TYPE_CM_DROP_DNODE 47 -#define TSDB_MSG_TYPE_CM_DROP_DNODE_RSP 48 -#define TSDB_MSG_TYPE_CM_CONFIG_DNODE TSDB_MSG_TYPE_MD_CONFIG_DNODE -#define TSDB_MSG_TYPE_CM_CONFIG_DNODE_RSP TSDB_MSG_TYPE_MD_CONFIG_DNODE_RSP -#define TSDB_MSG_TYPE_CM_CREATE_DB 49 -#define TSDB_MSG_TYPE_CM_CREATE_DB_RSP 50 -#define TSDB_MSG_TYPE_CM_DROP_DB 51 -#define TSDB_MSG_TYPE_CM_DROP_DB_RSP 52 -#define TSDB_MSG_TYPE_CM_USE_DB 53 -#define TSDB_MSG_TYPE_CM_USE_DB_RSP 54 -#define TSDB_MSG_TYPE_CM_ALTER_DB 55 -#define TSDB_MSG_TYPE_CM_ALTER_DB_RSP 56 -#define TSDB_MSG_TYPE_CM_CREATE_TABLE 57 -#define TSDB_MSG_TYPE_CM_CREATE_TABLE_RSP 58 -#define TSDB_MSG_TYPE_CM_DROP_TABLE 59 -#define TSDB_MSG_TYPE_CM_DROP_TABLE_RSP 60 -#define TSDB_MSG_TYPE_CM_ALTER_TABLE 61 -#define TSDB_MSG_TYPE_CM_ALTER_TABLE_RSP 62 -#define TSDB_MSG_TYPE_CM_TABLE_META 63 -#define TSDB_MSG_TYPE_CM_TABLE_META_RSP 64 -#define TSDB_MSG_TYPE_CM_STABLE_VGROUP 65 -#define TSDB_MSG_TYPE_CM_STABLE_VGROUP_RSP 66 -#define TSDB_MSG_TYPE_CM_TABLES_META 67 -#define TSDB_MSG_TYPE_CM_TABLES_META_RSP 68 -#define TSDB_MSG_TYPE_CM_ALTER_STREAM 69 -#define TSDB_MSG_TYPE_CM_ALTER_STREAM_RSP 70 -#define TSDB_MSG_TYPE_CM_SHOW 71 -#define TSDB_MSG_TYPE_CM_SHOW_RSP 72 -#define TSDB_MSG_TYPE_CM_KILL_QUERY 73 -#define TSDB_MSG_TYPE_CM_KILL_QUERY_RSP 74 -#define TSDB_MSG_TYPE_CM_KILL_STREAM 75 -#define TSDB_MSG_TYPE_CM_KILL_STREAM_RSP 76 -#define TSDB_MSG_TYPE_CM_KILL_CONN 77 -#define TSDB_MSG_TYPE_CM_KILL_CONN_RSP 78 -#define TSDB_MSG_TYPE_CM_HEARTBEAT 79 -#define TSDB_MSG_TYPE_CM_HEARTBEAT_RSP 80 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_CONNECT, "connect" ) // 31 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_CREATE_ACCT, "create-acct" ) // 33 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_ALTER_ACCT, "alter-acct" ) // 35 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_DROP_ACCT, "drop-acct" ) // 37 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_CREATE_USER, "create-user" ) // 39 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_ALTER_USER, "alter-user" ) // 41 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_DROP_USER, "drop-user" ) // 43 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_CREATE_DNODE, "create-dnode" ) // 45 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_DROP_DNODE, "drop-dnode" ) // 47 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_CREATE_DB, "create-db" ) // 49 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_DROP_DB, "drop-db" ) // 51 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_USE_DB, "use-db" ) // 53 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_ALTER_DB, "alter-db" ) // 55 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_CREATE_TABLE, "create-table" ) // 57 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_DROP_TABLE, "drop-table" ) // 59 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_ALTER_TABLE, "alter-table" ) // 61 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_TABLE_META, "table-meta" ) // 63 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_STABLE_VGROUP, "stable-vgroup" ) // 65 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_TABLES_META, "tables-meta" ) // 67 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_ALTER_STREAM, "alter-stream" ) // 69 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_SHOW, "show" ) // 71 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_KILL_QUERY, "kill-query" ) // 73 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_KILL_STREAM, "kill-stream" ) // 75 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_KILL_CONN, "kill-conn" ) // 77 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_CM_HEARTBEAT, "heartbeat" ) // 79 // message from dnode to mnode -#define TSDB_MSG_TYPE_DM_CONFIG_TABLE 91 -#define TSDB_MSG_TYPE_DM_CONFIG_TABLE_RSP 92 -#define TSDB_MSG_TYPE_DM_CONFIG_VNODE 93 -#define TSDB_MSG_TYPE_DM_CONFIG_VNODE_RSP 94 -#define TSDB_MSG_TYPE_DM_STATUS 95 -#define TSDB_MSG_TYPE_DM_STATUS_RSP 96 -#define TSDB_MSG_TYPE_DM_GRANT 97 -#define TSDB_MSG_TYPE_DM_GRANT_RSP 98 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_DM_CONFIG_TABLE, "config-table" ) // 91 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_DM_CONFIG_VNODE, "config-vnode" ) // 93 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_DM_STATUS, "status" ) // 95 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_DM_GRANT, "grant" ) // 97 -#define TSDB_MSG_TYPE_SDB_SYNC 101 -#define TSDB_MSG_TYPE_SDB_SYNC_RSP 102 -#define TSDB_MSG_TYPE_SDB_FORWARD 103 -#define TSDB_MSG_TYPE_SDB_FORWARD_RSP 104 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_SDB_SYNC, "sdb-sync" ) // 101 +TAOS_DEFINE_MESSAGE_TYPE( TSDB_MSG_TYPE_SDB_FORWARD, "sdb-forward" ) // 103 -#define TSDB_MSG_TYPE_MAX 105 +#ifndef TAOS_MESSAGE_C + TSDB_MSG_TYPE_MAX // 105 +#endif + +}; + +#define TSDB_MSG_TYPE_CM_CONFIG_DNODE TSDB_MSG_TYPE_MD_CONFIG_DNODE +#define TSDB_MSG_TYPE_CM_CONFIG_DNODE_RSP TSDB_MSG_TYPE_MD_CONFIG_DNODE_RSP // IE type #define TSDB_IE_TYPE_SEC 1 From c40d9832769df60c8ee18b76c56bc4706b235fba Mon Sep 17 00:00:00 2001 From: slguan Date: Wed, 6 May 2020 20:04:20 +0800 Subject: [PATCH 11/31] scripts --- src/client/src/tscServer.c | 2 +- tests/script/unique/big/balance.sim | 6 - tests/script/unique/cluster/balance1.sim | 28 +- tests/script/unique/cluster/balance1_bug.sim | 789 ------------------ .../script/unique/cluster/balance1_single.sim | 716 ---------------- tests/script/unique/cluster/balance2.sim | 410 ++++----- tests/script/unique/cluster/balance3.sim | 199 ++--- tests/script/unique/cluster/testSuite.sim | 2 - 8 files changed, 217 insertions(+), 1935 deletions(-) delete mode 100644 tests/script/unique/cluster/balance1_bug.sim delete mode 100644 tests/script/unique/cluster/balance1_single.sim diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index aa4eb01eae..a6ed575686 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -2262,7 +2262,7 @@ int tscProcessConnectRsp(SSqlObj *pSql) { strcpy(pObj->sversion, pConnect->serverVersion); pObj->writeAuth = pConnect->writeAuth; pObj->superAuth = pConnect->superAuth; -// taosTmrReset(tscProcessActivityTimer, tsShellActivityTimer * 500, pObj, tscTmr, &pObj->pTimer); + taosTmrReset(tscProcessActivityTimer, tsShellActivityTimer * 500, pObj, tscTmr, &pObj->pTimer); return 0; } diff --git a/tests/script/unique/big/balance.sim b/tests/script/unique/big/balance.sim index 3ae30f283d..270c3810a7 100644 --- a/tests/script/unique/big/balance.sim +++ b/tests/script/unique/big/balance.sim @@ -1,9 +1,3 @@ - - - - - - system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 diff --git a/tests/script/unique/cluster/balance1.sim b/tests/script/unique/cluster/balance1.sim index a7113b4535..97d5bb468a 100644 --- a/tests/script/unique/cluster/balance1.sim +++ b/tests/script/unique/cluster/balance1.sim @@ -442,19 +442,24 @@ sql reset query cache sleep 1000 sql use c_b1_d1 -sql select * from c_b1_t1 +sql select * from c_b1_d1.c_b1_t1 +print $rows +print $data01 $data11 $data21 $data31 $data41 if $rows != 5 then return -1 endi sql use c_b1_d2 -sql select * from c_b1_t2 -if $rows == 6 then +sql select * from c_b1_d2.c_b1_t2 +print $rows +print $data01 $data11 $data21 $data31 $data41 +if $rows != 6 then return -1 endi sql use c_b1_d3 -sql select * from c_b1_t3 order by t desc +sql select * from c_b1_d3.c_b1_t3 order by t desc +print $rows print $data01 $data11 $data21 $data31 $data41 if $rows != 6 then return -1 @@ -464,11 +469,13 @@ if $data01 != 36 then endi sql use c_b1_d4 -sql select * from c_b1_t4 order by t desc +sql select * from c_b1_d4.c_b1_t4 order by t desc +print $rows print $data01 $data11 $data21 $data31 $data41 sql use c_b1_d5 -sql select * from c_b1_t5 order by t desc +sql select * from c_b1_d5.c_b1_t5 order by t desc +print $rows print $data01 $data11 $data21 $data31 $data41 if $data01 != 51 then return -1 @@ -487,7 +494,8 @@ if $data41 != 55 then endi sql use c_b1_d6 -sql select * from c_b1_t6 order by t desc +sql select * from c_b1_d6.c_b1_t6 order by t desc +print $rows print $data01 $data11 $data21 $data31 $data41 if $data01 != 61 then return -1 @@ -506,7 +514,8 @@ if $data41 != 65 then endi sql use c_b1_d7 -sql select * from c_b1_t7 order by t desc +sql select * from c_b1_d7.c_b1_t7 order by t desc +print $rows print $data01 $data11 $data21 $data31 $data41 if $data01 != 71 then return -1 @@ -525,7 +534,8 @@ if $data41 != 75 then endi sql use c_b1_d8 -sql select * from c_b1_t8 order by t desc +sql select * from c_b1_d8.c_b1_t8 order by t desc +print $rows print $data01 $data11 $data21 $data31 $data41 if $data01 != 81 then return -1 diff --git a/tests/script/unique/cluster/balance1_bug.sim b/tests/script/unique/cluster/balance1_bug.sim deleted file mode 100644 index d9f903d55e..0000000000 --- a/tests/script/unique/cluster/balance1_bug.sim +++ /dev/null @@ -1,789 +0,0 @@ -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/deploy.sh -n dnode2 -i 2 -system sh/deploy.sh -n dnode3 -i 3 -system sh/deploy.sh -n dnode4 -i 4 - -system sh/cfg.sh -n dnode1 -c numOfMPeers -v 3 -system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3 -system sh/cfg.sh -n dnode3 -c numOfMPeers -v 3 -system sh/cfg.sh -n dnode4 -c numOfMPeers -v 3 - -system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 - -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/cfg.sh -n dnode3 -c clog -v 1 -system sh/cfg.sh -n dnode4 -c clog -v 1 - -system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0 -system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 0 -system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 0 -system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 0 - -print ============== step1 -print ========= start dnode1 -system sh/exec_up.sh -n dnode1 -s start -sql connect - -sql create database c_b1_d1 tables 4 -sql use c_b1_d1 - -sql create table c_b1_t1 (t timestamp, i int) -sql insert into c_b1_t1 values(now+1s, 15) -sql insert into c_b1_t1 values(now+2s, 14) -sql insert into c_b1_t1 values(now+2s, 13) -sql insert into c_b1_t1 values(now+3s, 12) -sql insert into c_b1_t1 values(now+4s, 11) - -sql create database c_b1_d2 tables 4 -sql use c_b1_d2 -sql create table c_b1_t2 (t timestamp, i int) -sql insert into c_b1_t2 values(now+1s, 25) -sql insert into c_b1_t2 values(now+2s, 24) -sql insert into c_b1_t2 values(now+3s, 23) -sql insert into c_b1_t2 values(now+4s, 22) -sql insert into c_b1_t2 values(now+5s, 21) - -sql show dnodes -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes - -if $dnode1Vnodes != 2 then - return -1 -endi -if $dnode2Vnodes != null then - return -1 -endi - -print ============================== step2 -print ========= start dnode2 -sleep 2000 -sql create dnode $hostname2 -system sh/exec_up.sh -n dnode2 -s start -sleep 5000 - -$x = 0 -show2: - $x = $x + 1 - sleep 2000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show2 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes - -if $dnode1Vnodes != 3 then - goto show2 -endi -if $dnode2Vnodes != 3 then - goto show2 -endi - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -$dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role -print dnode4 ==> $dnode4Role - -print ============================== step3 -print ========= add db3 -sql create database c_b1_d3 tables 4 -sql use c_b1_d3 -sql create table c_b1_t3 (t timestamp, i int) -sql insert into c_b1_t3 values(now+1s, 35) -sql insert into c_b1_t3 values(now+2s, 34) -sql insert into c_b1_t3 values(now+3s, 33) -sql insert into c_b1_t3 values(now+4s, 32) -sql insert into c_b1_t3 values(now+5s, 31) - -print ============================== step4 -print ========= drop dnode2 -sql drop dnode $hostname2 -sleep 9000 - -$x = 0 -show4: - $x = $x + 1 - sleep 2000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show4 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes - -if $dnode1Vnodes != 1 then - goto show4 -endi -if $dnode2Vnodes != null then - goto show4 -endi - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -$dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role -print dnode4 ==> $dnode4Role - -print ============================== step5 -print ========= add dnode2 -system sh/exec_up.sh -n dnode2 -s stop -x SIGINT -sleep 5000 -system sh/exec_up.sh -n dnode2 -s start -sql create dnode $hostname2 -sleep 9000 - -$x = 0 -show5: - $x = $x + 1 - sleep 2000 - if $x == 20 then - return -1 - endi -sql show dnodes -x show5 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes - -if $dnode1Vnodes != 2 then - goto show5 -endi -if $dnode2Vnodes != 3 then - goto show5 -endi - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -$dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role -print dnode4 ==> $dnode4Role - -print ============================== step6 -print ========= drop dnode1 -system sh/exec_up.sh -n dnode1 -s stop -x SIGINT -print stop dnode1 and sleep 10000 -sleep 10000 - -sql drop dnode $hostname1 -print drop dnode1 and sleep 9000 -sleep 9000 - -$x = 0 -show6: - $x = $x + 1 - sleep 2000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show6 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes - -if $dnode1Vnodes != null then - goto show6 -endi -if $dnode2Vnodes != 1 then - goto show6 -endi - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -$dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role -print dnode4 ==> $dnode4Role - -print ============================== step7 -print ========= add dnode1 -sql create dnode $hostname1 -sleep 23000 -system sh/exec_up.sh -n dnode1 -s start -sleep 14000 - -$x = 0 -show7: - $x = $x + 1 - sleep 2000 - if $x == 20 then - return -1 - endi -sql show dnodes -x show7 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes - -if $dnode1Vnodes != 3 then - goto show7 -endi -if $dnode2Vnodes != 2 then - goto show7 -endi - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -$dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role -print dnode4 ==> $dnode4Role - -print ============================== step8 -print ========= drop dnode2 -system sh/exec_up.sh -n dnode2 -s stop -x SIGINT -print stop dnode2 and sleep 10000 -sleep 20000 -sql drop dnode $hostname2 -print drop dnode2 and sleep 9000 -sleep 19000 - -$x = 0 -show8: - $x = $x + 1 - sleep 2000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show8 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes - -if $dnode1Vnodes != 1 then - goto show8 -endi -if $dnode2Vnodes != null then - goto show8 -endi - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -$dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role -print dnode4 ==> $dnode4Role - -if $dnode1Role != master then - return -1 -endi - -print ============================== step9 -print ========= add dnode2 -sql create dnode $hostname2 -system sh/exec_up.sh -n dnode2 -s start -sleep 9000 - -$x = 0 -show9: - $x = $x + 1 - sleep 2000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show9 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes - -if $dnode1Vnodes != 2 then - goto show9 -endi -if $dnode2Vnodes != 3 then - goto show9 -endi - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -$dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role -print dnode4 ==> $dnode4Role - -print ============================== step10 -print ========= add db4 -sql create database c_b1_d4 tables 4 -sql use c_b1_d4 -sql create table c_b1_t4 (t timestamp, i int) -sql insert into c_b1_t4 values(now+1s, 45) -sql insert into c_b1_t4 values(now+2s, 44) -sql insert into c_b1_t4 values(now+3s, 43) -sql insert into c_b1_t4 values(now+4s, 42) -sql insert into c_b1_t4 values(now+5s, 41) - -$x = 0 -show10: - $x = $x + 1 - sleep 2000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show10 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes - -if $dnode1Vnodes != 2 then - goto show10 -endi -if $dnode2Vnodes != 2 then - goto show10 -endi - -sql use c_b1_d3 -sql insert into c_b1_t3 values(now+1s, 35) - -sql use c_b1_d2 -sql insert into c_b1_t2 values(now+1s, 25) - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role - -if $dnode1Role != master then - return -1 -endi - -print ============================== step11 -print ========= drop dnode2 -sleep 2000 -sql drop dnode $hostname2 -sleep 9000 - -$x = 0 -show11: - $x = $x + 1 - sleep 2000 - if $x == 20 then - return -1 - endi -sql show dnodes -x show11 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes - -if $dnode1Vnodes != 0 then - goto show11 -endi -if $dnode2Vnodes != null then - goto show11 -endi - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -$dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role -print dnode4 ==> $dnode4Role - -system sh/exec_up.sh -n dnode2 -s stop -x SIGINT - -print ============================== step12 -print ========= add db5 -sql create database c_b1_d5 tables 4 -sql use c_b1_d5 -sql create table c_b1_t5 (t timestamp, i int) -x error3 -print no enough vnodes, but create success -return -1 -error3: - -print ============================== step13 -print ========= add dnode2 -sql create dnode $hostname2 -system sh/exec_up.sh -n dnode2 -s start -sleep 9000 - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -$dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role -print dnode4 ==> $dnode4Role - -sql use c_b1_d5; -$x = 0 -create5: - $x = $x + 1 - sleep 1000 - if $x == 50 then - return -1 - endi -sql create table c_b1_t5 (t timestamp, i int) -x create5 -sql insert into c_b1_t5 values(now+1s, 55) -sql insert into c_b1_t5 values(now+2s, 54) -sql insert into c_b1_t5 values(now+3s, 53) -sql insert into c_b1_t5 values(now+4s, 52) -sql insert into c_b1_t5 values(now+5s, 51) - -sql create database c_b1_d6 -sql use c_b1_d6 -$x = 0 -create6: - $x = $x + 1 - sleep 1000 - if $x == 50 then - return -1 - endi -sql create table c_b1_t6 (t timestamp, i int) -x create6 -sql insert into c_b1_t6 values(now+1s, 65) -sql insert into c_b1_t6 values(now+2s, 64) -sql insert into c_b1_t6 values(now+3s, 63) -sql insert into c_b1_t6 values(now+4s, 62) -sql insert into c_b1_t6 values(now+5s, 61) - -sql show dnodes -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes - -#if $dnode1Vnodes != 1 then -# return -1 -#endi -#if $dnode2Vnodes != 1 then -# return -1 -#endi - -print ============================== step14 -print ========= add dnode3 - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -$dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role -print dnode4 ==> $dnode4Role - -sleep 2000 -sql create dnode $hostname3 -system sh/exec_up.sh -n dnode3 -s start -sleep 15000 - -$x = 0 -show14: - $x = $x + 1 - sleep 2000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show14 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes - -if $dnode1Vnodes != 2 then - goto show14 -endi -if $dnode2Vnodes != 2 then - goto show14 -endi -if $dnode3Vnodes != 2 then - goto show14 -endi - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role - -print ============================== step15 -print ========= create db7 db8 - -sql create database c_b1_d7 tables 4 -sql use c_b1_d7 -sql create table c_b1_t7 (t timestamp, i int) -sql insert into c_b1_t7 values(now+1s, 75) -sql insert into c_b1_t7 values(now+2s, 74) -sql insert into c_b1_t7 values(now+3s, 73) -sql insert into c_b1_t7 values(now+4s, 72) -sql insert into c_b1_t7 values(now+5s, 71) - -sql create database c_b1_d8 -sql use c_b1_d8 -sql create table c_b1_t8 (t timestamp, i int) -sql insert into c_b1_t8 values(now+1s, 85) -sql insert into c_b1_t8 values(now+2s, 84) -sql insert into c_b1_t8 values(now+3s, 83) -sql insert into c_b1_t8 values(now+4s, 82) -sql insert into c_b1_t8 values(now+5s, 81) - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -$dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role -print dnode4 ==> $dnode4Role - -print ========== add dnode4 -sleep 2000 -sql create dnode $hostname4 -print sql create dnode $hostname4 over -system sh/exec_up.sh -n dnode4 -s start -print sleep 12000 -sleep 12000 -print sleep 12000 over - -$x = 0 -show15: - $x = $x + 1 - sleep 2000 - if $x == 15 then - return -1 - endi -sql show dnodes -x show15 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes -$dnode4Vnodes = $data2_4 -print dnode4 $dnode4Vnodes - -if $dnode1Vnodes != 2 then - goto show15 -endi -if $dnode2Vnodes != 2 then - goto show15 -endi -if $dnode3Vnodes != 2 then - goto show15 -endi -if $dnode4Vnodes != 2 then - goto show15 -endi - -print ============================== step16 -print ========= drop dnode4, create db9 - -sql drop dnode $hostname4 -sleep 10000 -sql create database c_b1_d9 tables 4 -sql use c_b1_d9 -sql create table c_b1_t9 (t timestamp, i int) -sql insert into c_b1_t9 values(now+1s, 95) -sql insert into c_b1_t9 values(now+2s, 94) -sql insert into c_b1_t9 values(now+3s, 93) -sql insert into c_b1_t9 values(now+4s, 92) -sql insert into c_b1_t9 values(now+5s, 91) - -system sh/exec_up.sh -n dnode4 -s stop -x SIGINT - -$x = 0 -show16: - $x = $x + 1 - sleep 2000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show16 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes - -if $dnode1Vnodes != 1 then - goto show16 -endi -if $dnode2Vnodes != 1 then - goto show16 -endi -if $dnode3Vnodes != 1 then - goto show16 -endi - -print ============================== step17 -print ========= check data - -sleep 2000 - -sql use c_b1_d1 -sql select * from c_b1_t1 order by t desc -x s1 -s1: - -sql use c_b1_d2 -sql select * from c_b1_t2 order by t desc -x s2 -print $data01 $data11 $data21 $data31 $data41 - -if $data01 != 25 then - return -1 -endi - -if $data11 != 21 then - return -1 -endi -if $data21 != 22 then - return -1 -endi -if $data31 != 23 then - return -1 -endi -if $data41 != 24 then - return -1 -endi -s2: - -sql use c_b1_d3 -sql select * from c_b1_t3 order by t desc -x s3 -print $data01 $data11 $data21 $data31 $data41 -if $data01 != 35 then - return -1 -endi -s3: - -sql use c_b1_d4 -sql select * from c_b1_d4.c_b1_t4 order by t desc -x s4 -print $data01 $data11 $data21 $data31 $data41 -s4: - - -sql use c_b1_d5 -sql select * from c_b1_d5.c_b1_t5 order by t desc -x s5 -print $data01 $data11 $data21 $data31 $data41 -if $data01 != 51 then - return -1 -endi -if $data11 != 52 then - return -1 -endi -if $data21 != 53 then - return -1 -endi -if $data31 != 54 then - return -1 -endi -if $data41 != 55 then - return -1 -endi -s5: - -sql use c_b1_d6 -sql select * from c_b1_d6.c_b1_t6 order by t desc -x s6 -print $data01 $data11 $data21 $data31 $data41 -if $data01 != 61 then - return -1 -endi -if $data11 != 62 then - return -1 -endi -if $data21 != 63 then - return -1 -endi -if $data31 != 64 then - return -1 -endi -if $data41 != 65 then - return -1 -endi -s6: - -sql use c_b1_d7 -sql select * from c_b1_d7.c_b1_t7 order by t desc -x s7 -print $data01 $data11 $data21 $data31 $data41 -if $data01 != 71 then - return -1 -endi -if $data11 != 72 then - return -1 -endi -if $data21 != 73 then - return -1 -endi -if $data31 != 74 then - return -1 -endi -if $data41 != 75 then - return -1 -endi -s7: - -sql use c_b1_d9 -sql select * from c_b1_t9 order by t desc -x s8 -print $data01 $data11 $data21 $data31 $data41 -if $data01 != 91 then - return -1 -endi -if $data11 != 92 then - return -1 -endi -if $data21 != 93 then - return -1 -endi -if $data31 != 94 then - return -1 -endi -if $data41 != 95 then - return -1 -endi -s8: - -print ============================================ over -system sh/exec_up.sh -n dnode1 -s stop -x SIGINT -system sh/exec_up.sh -n dnode2 -s stop -x SIGINT -system sh/exec_up.sh -n dnode3 -s stop -x SIGINT -system sh/exec_up.sh -n dnode4 -s stop -x SIGINT - - - diff --git a/tests/script/unique/cluster/balance1_single.sim b/tests/script/unique/cluster/balance1_single.sim deleted file mode 100644 index be46186a59..0000000000 --- a/tests/script/unique/cluster/balance1_single.sim +++ /dev/null @@ -1,716 +0,0 @@ -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/deploy.sh -n dnode2 -i 2 -system sh/deploy.sh -n dnode3 -i 3 -system sh/deploy.sh -n dnode4 -i 4 -system sh/deploy.sh -n dnode5 -i 5 - -system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 -system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 -system sh/cfg.sh -n dnode3 -c numOfMPeers -v 1 -system sh/cfg.sh -n dnode4 -c numOfMPeers -v 1 -system sh/cfg.sh -n dnode5 -c numOfMPeers -v 1 - -system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode5 -c numOfTotalVnodes -v 4 - -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/cfg.sh -n dnode3 -c clog -v 1 -system sh/cfg.sh -n dnode4 -c clog -v 1 -system sh/cfg.sh -n dnode5 -c clog -v 1 - -system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4 -system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4 -system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4 -system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 4 -system sh/cfg.sh -n dnode5 -c mgmtEqualVnodeNum -v 4 - -print ============== step1 -print ========= start dnode1 -system sh/exec_up.sh -n dnode1 -s start -sleep 3000 -sql connect -sql create dnode $hostname2 -system sh/exec_up.sh -n dnode2 -s start - -$x = 0 -show1: - $x = $x + 1 - sleep 1000 - if $x == 50 then - return -1 - endi -sql show dnodes -x show1 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode2Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode3Vnodes - -if $dnode1Vnodes != 4 then - goto show1 -endi -if $dnode2Vnodes != 4 then - goto show1 -endi -sleep 1000 - -sql create database c_b1_d1 tables 4 -sql use c_b1_d1 - -sql create table c_b1_t1 (t timestamp, i int) -sql insert into c_b1_t1 values(now+1s, 15) -sql insert into c_b1_t1 values(now+2s, 14) -sql insert into c_b1_t1 values(now+2s, 13) -sql insert into c_b1_t1 values(now+3s, 12) -sql insert into c_b1_t1 values(now+4s, 11) - -sql create database c_b1_d2 tables 4 -sql use c_b1_d2 -sql create table c_b1_t2 (t timestamp, i int) -sql insert into c_b1_t2 values(now+1s, 25) -sql insert into c_b1_t2 values(now+2s, 24) -sql insert into c_b1_t2 values(now+3s, 23) -sql insert into c_b1_t2 values(now+4s, 22) -sql insert into c_b1_t2 values(now+5s, 21) - -sql show dnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes - -if $dnode2Vnodes != 2 then - return -1 -endi -if $dnode3Vnodes != null then - return -1 -endi - -print ============================== step2 -print ========= start dnode3 -sleep 3000 -sql create dnode $hostname3 -system sh/exec_up.sh -n dnode3 -s start -sleep 8000 - -$x = 0 -show2: - $x = $x + 1 - sleep 1000 - if $x == 50 then - return -1 - endi -sql show dnodes -x show2 -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes - -if $dnode2Vnodes != 3 then - goto show2 -endi -if $dnode3Vnodes != 3 then - goto show2 -endi - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -$dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role -print dnode4 ==> $dnode4Role - -print ============================== step3 -print ========= add db3 -sql create database c_b1_d3 tables 4 -sql use c_b1_d3 -sql create table c_b1_t3 (t timestamp, i int) -sql insert into c_b1_t3 values(now+1s, 35) -sql insert into c_b1_t3 values(now+2s, 34) -sql insert into c_b1_t3 values(now+3s, 33) -sql insert into c_b1_t3 values(now+4s, 32) -sql insert into c_b1_t3 values(now+5s, 31) - - -print ============================== step4 -print ========= drop dnode3 -sql drop dnode $hostname3 -sleep 9000 - -$x = 0 -show4: - $x = $x + 1 - sleep 1000 - if $x == 50 then - return -1 - endi -sql show dnodes -x show4 -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes - -if $dnode2Vnodes != 1 then - goto show4 -endi -if $dnode3Vnodes != null then - goto show4 -endi - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -$dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role -print dnode4 ==> $dnode4Role - -print ============================== step5 -print ========= add dnode3 -system sh/exec_up.sh -n dnode3 -s stop -x SIGINT -sleep 5000 -system sh/exec_up.sh -n dnode3 -s start -sql create dnode $hostname3 -sleep 9000 - -$x = 0 -show5: - $x = $x + 1 - sleep 1000 - if $x == 50 then - return -1 - endi -sql show dnodes -x show5 -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes - -if $dnode2Vnodes != 2 then - goto show5 -endi -if $dnode3Vnodes != 3 then - goto show5 -endi - -print ============================== step6 -print ========= drop dnode2 -system sh/exec_up.sh -n dnode2 -s stop -x SIGINT -print stop dnode2 and sleep 10000 -sleep 10000 - -sql drop dnode $hostname2 -print drop dnode2 and sleep 9000 -sleep 9000 - -$x = 0 -show6: - $x = $x + 1 - sleep 2000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show6 -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes - -if $dnode2Vnodes != null then - goto show6 -endi -if $dnode3Vnodes != 1 then - goto show6 -endi - -#only c_b2_d2 has data, c_b1_d1 and c_b1_d3 is null - -print ============================== step7 -print ========= add dnode2 -sql create dnode $hostname2 -system sh/exec_up.sh -n dnode2 -s start -sleep 9000 - -$x = 0 -show7: - $x = $x + 1 - sleep 1000 - if $x == 50 then - return -1 - endi -sql show dnodes -x show7 -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes - -if $dnode2Vnodes != 3 then - goto show7 -endi -if $dnode3Vnodes != 2 then - goto show7 -endi - -print ============================== step8 -print ========= drop dnode3 -system sh/exec_up.sh -n dnode3 -s stop -x SIGINT -print stop dnode3 and sleep 10000 -sleep 10000 -sql drop dnode $hostname3 -print drop dnode3 and sleep 9000 -sleep 9000 - -$x = 0 -show8: - $x = $x + 1 - sleep 1000 - if $x == 50 then - return -1 - endi -sql show dnodes -x show8 -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes - -if $dnode2Vnodes != 1 then - goto show8 -endi -if $dnode3Vnodes != null then - goto show8 -endi - -print ============================== step9 -print ========= add dnode3 -sql create dnode $hostname3 -system sh/exec_up.sh -n dnode3 -s start -sleep 9000 - -$x = 0 -show9: - $x = $x + 1 - sleep 1000 - if $x == 50 then - return -1 - endi -sql show dnodes -x show9 -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes - -if $dnode2Vnodes != 2 then - goto show9 -endi -if $dnode3Vnodes != 3 then - goto show9 -endi - -print ============================== step10 -print ========= add db4 -sql create database c_b1_d4 tables 4 -sql use c_b1_d4 -sql create table c_b1_t4 (t timestamp, i int) -sql insert into c_b1_t4 values(now+1s, 45) -sql insert into c_b1_t4 values(now+2s, 44) -sql insert into c_b1_t4 values(now+3s, 43) -sql insert into c_b1_t4 values(now+4s, 42) -sql insert into c_b1_t4 values(now+5s, 41) - -$x = 0 -show10: - $x = $x + 1 - sleep 1000 - if $x == 50 then - return -1 - endi -sql show dnodes -x show10 -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes - -if $dnode2Vnodes != 2 then - goto show10 -endi -if $dnode3Vnodes != 2 then - goto show10 -endi - -sql use c_b1_d3 -sql insert into c_b1_t3 values(now+1s, 35) - -sql use c_b1_d2 -sql insert into c_b1_t2 values(now+1s, 25) - -print ============================== step11 -print ========= drop dnode3 -sql drop dnode $hostname3 -sleep 9000 - -$x = 0 -show11: - $x = $x + 1 - sleep 1000 - if $x == 50 then - return -1 - endi -sql show dnodes -x show11 -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes - -if $dnode2Vnodes != 0 then - goto show11 -endi -if $dnode3Vnodes != null then - goto show11 -endi - -system sh/exec_up.sh -n dnode3 -s stop -x SIGINT - -print ============================== step12 -print ========= add db5 -sql create database c_b1_d5 tables 4 -sql use c_b1_d5 - -print ============================== step13 -print ========= add dnode3 -sql create dnode $hostname3 -system sh/exec_up.sh -n dnode3 -s start -sleep 9000 - -sql use c_b1_d5; -$x = 0 -create5: - $x = $x + 1 - sleep 1000 - if $x == 50 then - return -1 - endi -sql create table c_b1_t5 (t timestamp, i int) -x create5 -sql insert into c_b1_t5 values(now+1s, 55) -sql insert into c_b1_t5 values(now+2s, 54) -sql insert into c_b1_t5 values(now+3s, 53) -sql insert into c_b1_t5 values(now+4s, 52) -sql insert into c_b1_t5 values(now+5s, 51) - -sql create database c_b1_d6 tables 4 -sql use c_b1_d6 -$x = 0 -create6: - $x = $x + 1 - sleep 1000 - if $x == 20 then - return -1 - endi -sql create table c_b1_t6 (t timestamp, i int) -x create6 -sql insert into c_b1_t6 values(now+1s, 65) -sql insert into c_b1_t6 values(now+2s, 64) -sql insert into c_b1_t6 values(now+3s, 63) -sql insert into c_b1_t6 values(now+4s, 62) -sql insert into c_b1_t6 values(now+5s, 61) - -sql show dnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes - -#if $dnode2Vnodes != 1 then -# return -1 -#endi -#if $dnode3Vnodes != 1 then -# return -1 -#endi - -print ============================== step14 -print ========= add dnode4 -sql create dnode $hostname4 -system sh/exec_up.sh -n dnode4 -s start -sleep 10000 - -$x = 0 -show14: - $x = $x + 1 - sleep 1000 - if $x == 50 then - return -1 - endi -sql show dnodes -x show14 -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes -$dnode4Vnodes = $data2_4 -print dnode4 $dnode4Vnodes - -if $dnode2Vnodes != 2 then - goto show14 -endi -if $dnode3Vnodes != 2 then - goto show14 -endi -if $dnode4Vnodes != 2 then - goto show14 -endi - -print ============================== step15 -print ========= create db7 db8 - -sql create database c_b1_d7 tables 4 -sql use c_b1_d7 -sql create table c_b1_t7 (t timestamp, i int) -sql insert into c_b1_t7 values(now+1s, 75) -sql insert into c_b1_t7 values(now+2s, 74) -sql insert into c_b1_t7 values(now+3s, 73) -sql insert into c_b1_t7 values(now+4s, 72) -sql insert into c_b1_t7 values(now+5s, 71) - -sql create database c_b1_d8 tables 4 -sql use c_b1_d8 -sql create table c_b1_t8 (t timestamp, i int) -sql insert into c_b1_t8 values(now+1s, 85) -sql insert into c_b1_t8 values(now+2s, 84) -sql insert into c_b1_t8 values(now+3s, 83) -sql insert into c_b1_t8 values(now+4s, 82) -sql insert into c_b1_t8 values(now+5s, 81) - - -print ========== add dnode5 -sql create dnode $hostname5 -print sql create dnode $hostname5 over -system sh/exec_up.sh -n dnode5 -s start -print sleep 12000 -sleep 12000 -print sleep 12000 over - -$x = 0 -show15: - $x = $x + 1 - sleep 1000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show15 -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes -$dnode4Vnodes = $data2_4 -print dnode4 $dnode4Vnodes -$dnode5Vnodes = $data2_5 -print dnode5 $dnode5Vnodes - -if $dnode2Vnodes != 2 then - goto show15 -endi -if $dnode3Vnodes != 2 then - goto show15 -endi -if $dnode4Vnodes != 2 then - goto show15 -endi -if $dnode5Vnodes != 2 then - goto show15 -endi - -print ============================== step16 -print ========= drop dnode5, create db9 - -sql drop dnode $hostname5 -sleep 10000 -sql create database c_b1_d9 tables 4 -sql use c_b1_d9 -sql create table c_b1_t9 (t timestamp, i int) -sql insert into c_b1_t9 values(now+1s, 95) -sql insert into c_b1_t9 values(now+2s, 94) -sql insert into c_b1_t9 values(now+3s, 93) -sql insert into c_b1_t9 values(now+4s, 92) -sql insert into c_b1_t9 values(now+5s, 91) - -system sh/exec_up.sh -n dnode5 -s stop -x SIGINT - -$x = 0 -show16: - $x = $x + 1 - sleep 1000 - if $x == 50 then - return -1 - endi -sql show dnodes -x show16 -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes -$dnode4Vnodes = $data2_4 -print dnode4 $dnode4Vnodes - -if $dnode2Vnodes != 1 then - goto show16 -endi -if $dnode3Vnodes != 1 then - goto show16 -endi -if $dnode4Vnodes != 1 then - goto show16 -endi - -print ============================== step17 -print ========= check data - -sql use c_b1_d1 -sql select * from c_b1_t1 -if $rows != 0 then - return -1 -endi - -sql use c_b1_d2 -sql select * from c_b1_t2 -if $rows != 6 then - return -1 -endi - -sql use c_b1_d3 -sql select * from c_b1_t3 order by t desc -print $data01 $data11 $data21 $data31 $data41 -if $rows != 1 then - return -1 -endi -if $data01 != 35 then - return -1 -endi - -sql use c_b1_d4 -sql select * from c_b1_t4 order by t desc -print $data01 $data11 $data21 $data31 $data41 -if $data01 != 41 then - return -1 -endi -if $data11 != 42 then - return -1 -endi -if $data21 != 43 then - return -1 -endi -if $data31 != 44 then - return -1 -endi -if $data41 != 45 then - return -1 -endi - -sql use c_b1_d5 -sql select * from c_b1_t5 order by t desc -print $data01 $data11 $data21 $data31 $data41 -if $data01 != 51 then - return -1 -endi -if $data11 != 52 then - return -1 -endi -if $data21 != 53 then - return -1 -endi -if $data31 != 54 then - return -1 -endi -if $data41 != 55 then - return -1 -endi - -sql use c_b1_d6 -sql select * from c_b1_t6 order by t desc -print $data01 $data11 $data21 $data31 $data41 -if $data01 != 61 then - return -1 -endi -if $data11 != 62 then - return -1 -endi -if $data21 != 63 then - return -1 -endi -if $data31 != 64 then - return -1 -endi -if $data41 != 65 then - return -1 -endi - -sql use c_b1_d7 -sql select * from c_b1_t7 order by t desc -print $data01 $data11 $data21 $data31 $data41 -if $data01 != 71 then - return -1 -endi -if $data11 != 72 then - return -1 -endi -if $data21 != 73 then - return -1 -endi -if $data31 != 74 then - return -1 -endi -if $data41 != 75 then - return -1 -endi - -sql use c_b1_d8 -sql select * from c_b1_t8 order by t desc -print $data01 $data11 $data21 $data31 $data41 -if $data01 != 81 then - return -1 -endi -if $data11 != 82 then - return -1 -endi -if $data21 != 83 then - return -1 -endi -if $data31 != 84 then - return -1 -endi -if $data41 != 85 then - return -1 -endi - -sql use c_b1_d9 -sql select * from c_b1_t9 order by t desc -print $data01 $data11 $data21 $data31 $data41 -if $data01 != 91 then - return -1 -endi -if $data11 != 92 then - return -1 -endi -if $data21 != 93 then - return -1 -endi -if $data31 != 94 then - return -1 -endi -if $data41 != 95 then - return -1 -endi - - -print ============================================ over -#system sh/exec_up.sh -n dnode2 -s stop -x SIGINT -#system sh/exec_up.sh -n dnode3 -s stop -x SIGINT -#system sh/exec_up.sh -n dnode4 -s stop -x SIGINT -#system sh/exec_up.sh -n dnode5 -s stop -x SIGINT - - - diff --git a/tests/script/unique/cluster/balance2.sim b/tests/script/unique/cluster/balance2.sim index 907b344140..af77db3ce6 100644 --- a/tests/script/unique/cluster/balance2.sim +++ b/tests/script/unique/cluster/balance2.sim @@ -128,13 +128,13 @@ print dnode2 $dnode2Vnodes $dnode3Vnodes = $data2_3 print dnode3 $dnode3Vnodes -if $dnode1Vnodes != 1 then +if $dnode1Vnodes != 3 then goto show2 endi if $dnode2Vnodes != null then goto show2 endi -if $dnode3Vnodes != 1 then +if $dnode3Vnodes != 3 then goto show2 endi @@ -151,18 +151,9 @@ print dnode4 ==> $dnode4Role system sh/exec_up.sh -n dnode2 -s stop -x SIGINT print ============================== step3 -print ========= start dnode2 -sql create dnode $hostname2 - -sleep 3000 -system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3 -system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 0 -sleep 3000 - -system sh/exec_up.sh -n dnode2 -s start +print ========= start dnode4 +sql create dnode $hostname4 +system sh/exec_up.sh -n dnode4 -s start sleep 10000 $x = 0 @@ -175,15 +166,15 @@ show3: sql show dnodes -x show3 $dnode1Vnodes = $data2_1 print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes +$dnode4Vnodes = $data2_4 +print dnode4 $dnode4Vnodes $dnode3Vnodes = $data2_3 print dnode3 $dnode3Vnodes if $dnode1Vnodes != 2 then goto show3 endi -if $dnode2Vnodes != 2 then +if $dnode4Vnodes != 2 then goto show3 endi if $dnode3Vnodes != 2 then @@ -200,6 +191,20 @@ print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role print dnode4 ==> $dnode4Role +if $dnode1Role != master then + return -1 +endi +if $dnode2Role != null then + return -1 +endi +if $dnode3Role != slave then + return -1 +endi + +if $dnode4Role != slave then + return -1 +endi + print ============================== step4 print ========= drop dnode3 sql drop dnode $hostname3 @@ -215,15 +220,15 @@ show4: sql show dnodes -x show4 $dnode1Vnodes = $data2_1 print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes +$dnode4Vnodes = $data2_4 +print dnode4 $dnode4Vnodes $dnode3Vnodes = $data2_3 print dnode3 $dnode3Vnodes -if $dnode1Vnodes != 1 then +if $dnode1Vnodes != 3 then goto show4 endi -if $dnode2Vnodes != 1 then +if $dnode4Vnodes != 3 then goto show4 endi if $dnode3Vnodes != null then @@ -240,21 +245,26 @@ print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role print dnode4 ==> $dnode4Role +if $dnode1Role != master then + return -1 +endi +if $dnode2Role != null then + return -1 +endi +if $dnode3Role != null then + return -1 +endi + +if $dnode4Role != slave then + return -1 +endi + system sh/exec_up.sh -n dnode3 -s stop -x SIGINT print ============================== step5 print ========= start dnode3 -sql create dnode $hostname3 - -sleep 3000 -system sh/deploy.sh -n dnode3 -i 3 -system sh/cfg.sh -n dnode3 -c numOfMPeers -v 3 -system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode3 -c clog -v 1 -system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 0 -sleep 3000 - -system sh/exec_up.sh -n dnode3 -s start +sql create dnode $hostname5 +system sh/exec_up.sh -n dnode5 -s start sleep 9000 $x = 0 @@ -267,33 +277,30 @@ show5: sql show dnodes -x show5 $dnode1Vnodes = $data2_1 print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes +$dnode4Vnodes = $data2_4 +print dnode4 $dnode4Vnodes +$dnode5Vnodes = $data2_5 +print dnode5 $dnode5Vnodes if $dnode1Vnodes != 2 then goto show5 endi -if $dnode2Vnodes != 2 then +if $dnode4Vnodes != 2 then goto show5 endi -if $dnode3Vnodes != 2 then +if $dnode5Vnodes != 2 then goto show5 endi sql show mnodes $dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 $dnode4Role = $data2_4 +$dnode5Role = $data2_5 print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role print dnode4 ==> $dnode4Role +print dnode5 ==> $dnode5Role print ============================== step6 -print ========= drop dnode1 system sh/exec_up.sh -n dnode1 -s stop -x SIGINT print stop dnode1 and sleep 10000 sleep 10000 @@ -302,6 +309,21 @@ sql drop dnode $hostname1 print drop dnode1 and sleep 9000 sleep 9000 +sql show mnodes +$dnode1Role = $data2_1 +$dnode4Role = $data2_4 +$dnode5Role = $data2_5 +print dnode1 ==> $dnode1Role +print dnode4 ==> $dnode4Role +print dnode5 ==> $dnode5Role + +if $dnode1Role != offline then + return -1 +endi + +print ============================== step6.1 +system sh/exec_up.sh -n dnode1 -s start + $x = 0 show6: $x = $x + 1 @@ -312,68 +334,56 @@ show6: sql show dnodes -x show6 $dnode1Vnodes = $data2_1 print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes +$dnode4Vnodes = $data2_4 +print dnode4 $dnode4Vnodes +$dnode5Vnodes = $data2_5 +print dnode5 $dnode5Vnodes if $dnode1Vnodes != null then goto show6 endi -if $dnode2Vnodes != 1 then +if $dnode4Vnodes != 3 then goto show6 endi -if $dnode3Vnodes != 1 then +if $dnode5Vnodes != 3 then goto show6 endi sql show mnodes $dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 $dnode4Role = $data2_4 +$dnode5Role = $data2_5 print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role print dnode4 ==> $dnode4Role +print dnode5 ==> $dnode5Role + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT print ============================== step7 -print ========= start dnode1 -sql create dnode $hostname1 +print ========= start dnode6 +sql create dnode $hostname6 +system sh/exec_up.sh -n dnode6 -s start +sleep 9000 sql show mnodes $dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 $dnode4Role = $data2_4 +$dnode5Role = $data2_5 +$dnode6Role = $data2_6 print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role print dnode4 ==> $dnode4Role - -sleep 3000 -system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c numOfMPeers -v 3 -system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0 -sleep 3000 - -system sh/exec_up.sh -n dnode1 -s start -sleep 9000 +print dnode5 ==> $dnode5Role +print dnode6 ==> $dnode6Role $x = 0 - show7: sql show mnodes - $dnode1Role = $data2_1 - $dnode2Role = $data2_2 - $dnode3Role = $data2_3 $dnode4Role = $data2_4 - print dnode1 ==> $dnode1Role - print dnode2 ==> $dnode2Role - print dnode3 ==> $dnode3Role + $dnode5Role = $data2_5 + $dnode6Role = $data2_6 print dnode4 ==> $dnode4Role + print dnode5 ==> $dnode5Role + print dnode6 ==> $dnode6Role $x = $x + 1 sleep 2000 @@ -381,20 +391,21 @@ show7: return -1 endi sql show dnodes -x show7 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes -if $dnode1Vnodes != 2 then +$dnode4Vnodes = $data2_4 +print dnode4 $dnode4Vnodes +$dnode5Vnodes = $data2_5 +print dnode5 $dnode5Vnodes +$dnode6Vnodes = $data2_6 +print dnode6 $dnode6Vnodes + +if $dnode4Vnodes != 2 then goto show7 endi -if $dnode2Vnodes != 2 then +if $dnode5Vnodes != 2 then goto show7 endi -if $dnode3Vnodes != 2 then +if $dnode6Vnodes != 2 then goto show7 endi @@ -410,19 +421,19 @@ sql insert into c_b2_t4 values(1520000022043, 43) sql insert into c_b2_t4 values(1520000023042, 42) sql insert into c_b2_t4 values(1520000024041, 41) -sql create dnode $hostname4 -system sh/exec_up.sh -n dnode4 -s start +sql create dnode $hostname7 +system sh/exec_up.sh -n dnode7 -s start sleep 9000 sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 $dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role +$dnode5Role = $data2_5 +$dnode6Role = $data2_6 +$dnode7Role = $data2_7 print dnode4 ==> $dnode4Role +print dnode5 ==> $dnode5Role +print dnode6 ==> $dnode6Role +print dnode7 ==> $dnode7Role $x = 0 show8: @@ -432,154 +443,30 @@ show8: return -1 endi sql show dnodes -x show8 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes $dnode4Vnodes = $data2_4 print dnode4 $dnode4Vnodes +$dnode5Vnodes = $data2_5 +print dnode5 $dnode5Vnodes +$dnode6Vnodes = $data2_6 +print dnode6 $dnode6Vnodes +$dnode7Vnodes = $data2_7 +print dnode7 $dnode7Vnodes -if $dnode1Vnodes != 2 then - goto show8 -endi -if $dnode2Vnodes != 2 then - goto show8 -endi -if $dnode3Vnodes != 2 then - goto show8 -endi if $dnode4Vnodes != 2 then goto show8 endi - -print ============================== step9 -print ========= drop dnode1.4 -sql drop dnode $hostname1 -sql drop dnode $hostname4 -sleep 10000 - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -$dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role -print dnode4 ==> $dnode4Role - -$x = 0 -show9: - $x = $x + 1 - sleep 2000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show9 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes -$dnode4Vnodes = $data2_4 -print dnode4 $dnode4Vnodes - -if $dnode1Vnodes != null then - goto show9 +if $dnode5Vnodes != 2 then + goto show8 endi -if $dnode2Vnodes != 0 then - goto show9 +if $dnode6Vnodes != 2 then + goto show8 endi -if $dnode3Vnodes != 0 then - goto show9 -endi -if $dnode4Vnodes != null then - goto show9 -endi - -system sh/exec_up.sh -n dnode1 -s stop -x SIGINT -system sh/exec_up.sh -n dnode4 -s stop -x SIGINT - -print ============================== step10 -print ========= start dnode1.4 -sql create dnode $hostname1 -sql create dnode $hostname4 - -sleep 3000 -system sh/deploy.sh -n dnode1 -i 1 -ssystem sh/cfg.sh -n dnode1 -c numOfMPeers -v 3 -system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0 -sleep 3000 - -sleep 3000 -system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode4 -c numOfMPeers -v 3 -system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode4 -c clog -v 1 -system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 0 -sleep 3000 - -system sh/exec_up.sh -n dnode1 -s start -system sh/exec_up.sh -n dnode4 -s start -sleep 10000 - -$x = 0 -show10: - sql show mnodes - $dnode1Role = $data2_1 - $dnode2Role = $data2_2 - $dnode3Role = $data2_3 - $dnode4Role = $data2_4 - print dnode1 ==> $dnode1Role - print dnode2 ==> $dnode2Role - print dnode3 ==> $dnode3Role - print dnode4 ==> $dnode4Role - - $x = $x + 1 - sleep 2000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show10 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes -$dnode4Vnodes = $data2_4 -print dnode4 $dnode4Vnodes - -if $dnode1Vnodes != 2 then - goto show10 -endi -if $dnode2Vnodes != 2 then - goto show10 -endi -if $dnode3Vnodes != 2 then - goto show10 -endi -if $dnode4Vnodes != 2 then - goto show10 +if $dnode7Vnodes != 2 then + goto show8 endi print ============================== step11 -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -$dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role -print dnode4 ==> $dnode4Role - sql create database c_b2_d5 replica 2 tables 4 sql use c_b2_d5; sql create table c_b2_t5 (t timestamp, i int) @@ -606,43 +493,34 @@ show11: return -1 endi sql show dnodes -x show11 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes $dnode4Vnodes = $data2_4 print dnode4 $dnode4Vnodes +$dnode5Vnodes = $data2_5 +print dnode5 $dnode5Vnodes +$dnode6Vnodes = $data2_6 +print dnode6 $dnode6Vnodes +$dnode7Vnodes = $data2_7 +print dnode7 $dnode7Vnodes -if $dnode1Vnodes != 1 then - goto show11 -endi -if $dnode2Vnodes != 1 then - goto show11 -endi -if $dnode3Vnodes != 1 then - goto show11 -endi if $dnode4Vnodes != 1 then goto show11 endi - -sql show mnodes -$dnode1Role = $data2_1 -$dnode2Role = $data2_2 -$dnode3Role = $data2_3 -$dnode4Role = $data2_4 -print dnode1 ==> $dnode1Role -print dnode2 ==> $dnode2Role -print dnode3 ==> $dnode3Role -print dnode4 ==> $dnode4Role +if $dnode5Vnodes != 1 then + goto show11 +endi +if $dnode6Vnodes != 1 then + goto show11 +endi +if $dnode7Vnodes != 1 then + goto show11 +endi print ============================== step12 print ========= check data -sql use c_b2_d1 -sql select * from c_b2_t1 order by t desc +sql reset query cache + +sql select * from c_b2_d1.c_b2_t1 order by t desc print $data01 $data11 $data21 $data31 $data41 if $data01 != 11 then return -1 @@ -660,8 +538,7 @@ if $data41 != 15 then return -1 endi -sql use c_b2_d2 -sql select * from c_b2_t2 order by t desc +sql select * from c_b2_d2.c_b2_t2 order by t desc print $data01 $data11 $data21 $data31 $data41 #if $data01 != 21 then @@ -680,8 +557,7 @@ print $data01 $data11 $data21 $data31 $data41 # return -1 #endi -sql use c_b2_d3 -sql select * from c_b2_t3 order by t desc +sql select * from c_b2_d3.c_b2_t3 order by t desc print $data01 $data11 $data21 $data31 $data41 if $data01 != 31 then return -1 @@ -699,8 +575,7 @@ if $data41 != 35 then return -1 endi -sql use c_b2_d4 -sql select * from c_b2_t4 order by t desc +sql select * from c_b2_d4.c_b2_t4 order by t desc print $data01 $data11 $data21 $data31 $data41 if $data01 != 41 then return -1 @@ -718,8 +593,7 @@ if $data41 != 45 then return -1 endi -sql use c_b2_d5 -sql select * from c_b2_t5 order by t desc +sql select * from c_b2_d5.c_b2_t5 order by t desc print $data01 $data11 $data21 $data31 $data41 if $data01 != 51 then return -1 @@ -737,8 +611,7 @@ if $data41 != 55 then return -1 endi -sql use c_b2_d6 -sql select * from c_b2_t6 order by t desc +sql select * from c_b2_d6.c_b2_t6 order by t desc print $data01 $data11 $data21 $data31 $data41 if $data01 != 61 then return -1 @@ -756,7 +629,6 @@ if $data41 != 65 then return -1 endi - print ============================================ over system sh/exec_up.sh -n dnode1 -s stop -x SIGINT system sh/exec_up.sh -n dnode2 -s stop -x SIGINT @@ -766,5 +638,3 @@ system sh/exec_up.sh -n dnode5 -s stop -x SIGINT system sh/exec_up.sh -n dnode6 -s stop -x SIGINT system sh/exec_up.sh -n dnode7 -s stop -x SIGINT system sh/exec_up.sh -n dnode8 -s stop -x SIGINT - - diff --git a/tests/script/unique/cluster/balance3.sim b/tests/script/unique/cluster/balance3.sim index 76ea380e8e..1e66fcf253 100644 --- a/tests/script/unique/cluster/balance3.sim +++ b/tests/script/unique/cluster/balance3.sim @@ -1,14 +1,5 @@ system sh/stop_dnodes.sh - - - - - - - - - system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 @@ -188,16 +179,8 @@ endi system sh/exec_up.sh -n dnode2 -s stop -x SIGINT print ============================== step4 -print ========= start dnode2 -sleep 3000 -system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3 -system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 0 -sleep 3000 -sql create dnode $hostname2 -system sh/exec_up.sh -n dnode2 -s start +sql create dnode $hostname5 +system sh/exec_up.sh -n dnode5 -s start sleep 10000 $x = 0 @@ -210,14 +193,14 @@ show4: sql show dnodes -x show4 $dnode1Vnodes = $data2_1 print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes +$dnode5Vnodes = $data2_5 +print dnode5 $dnode5Vnodes $dnode3Vnodes = $data2_3 print dnode3 $dnode3Vnodes $dnode4Vnodes = $data2_4 print dnode4 $dnode4Vnodes -if $dnode2Vnodes != 2 then +if $dnode5Vnodes != 2 then goto show4 endi @@ -236,8 +219,8 @@ show5: sql show dnodes -x show5 $dnode1Vnodes = $data2_1 print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes +$dnode5Vnodes = $data2_5 +print dnode5 $dnode5Vnodes $dnode3Vnodes = $data2_3 print dnode3 $dnode3Vnodes $dnode4Vnodes = $data2_4 @@ -246,7 +229,7 @@ print dnode4 $dnode4Vnodes if $dnode1Vnodes != 1 then goto show5 endi -if $dnode2Vnodes != 1 then +if $dnode5Vnodes != 1 then goto show5 endi if $dnode3Vnodes != null then @@ -256,20 +239,11 @@ if $dnode4Vnodes != 1 then goto show5 endi - system sh/exec_up.sh -n dnode3 -s stop -x SIGINT print ============================== step6 -print ========= start dnode3 -sleep 3000 -system sh/deploy.sh -n dnode3 -i 3 -system sh/cfg.sh -n dnode3 -c numOfMPeers -v 3 -system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode3 -c clog -v 1 -system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 0 -sleep 3000 -sql create dnode $hostname3 -system sh/exec_up.sh -n dnode3 -s start +sql create dnode $hostname6 +system sh/exec_up.sh -n dnode6 -s start sleep 9000 $x = 0 @@ -282,14 +256,14 @@ show6: sql show dnodes -x show6 $dnode1Vnodes = $data2_1 print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes $dnode4Vnodes = $data2_4 print dnode4 $dnode4Vnodes +$dnode5Vnodes = $data2_5 +print dnode5 $dnode5Vnodes +$dnode6Vnodes = $data2_6 +print dnode6 $dnode6Vnodes -if $dnode3Vnodes != 2 then +if $dnode6Vnodes != 2 then goto show6 endi @@ -308,20 +282,20 @@ show7: sql show dnodes -x show7 $dnode1Vnodes = $data2_1 print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes $dnode4Vnodes = $data2_4 print dnode4 $dnode4Vnodes +$dnode5Vnodes = $data2_5 +print dnode5 $dnode5Vnodes +$dnode6Vnodes = $data2_6 +print dnode6 $dnode6Vnodes if $dnode1Vnodes != 1 then goto show7 endi -if $dnode2Vnodes != 1 then +if $dnode5Vnodes != 1 then goto show7 endi -if $dnode3Vnodes != 1 then +if $dnode6Vnodes != 1 then goto show7 endi if $dnode4Vnodes != null then @@ -331,16 +305,8 @@ endi system sh/exec_up.sh -n dnode4 -s stop -x SIGINT print ============================== step8 -print ========= start dnode4 -sleep 3000 -system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode4 -c numOfMPeers -v 3 -system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode4 -c clog -v 1 -system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 0 -sleep 3000 -sql create dnode $hostname4 -system sh/exec_up.sh -n dnode4 -s start +sql create dnode $hostname7 +system sh/exec_up.sh -n dnode7 -s start sleep 9000 $x = 0 @@ -353,14 +319,14 @@ show8: sql show dnodes -x show8 $dnode1Vnodes = $data2_1 print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes -$dnode4Vnodes = $data2_4 -print dnode4 $dnode4Vnodes +$dnode5Vnodes = $data2_5 +print dnode5 $dnode5Vnodes +$dnode6Vnodes = $data2_6 +print dnode6 $dnode6Vnodes +$dnode7Vnodes = $data2_7 +print dnode7 $dnode7Vnodes -if $dnode4Vnodes != 2 then +if $dnode7Vnodes != 2 then goto show8 endi @@ -382,39 +348,26 @@ show9: return -1 endi sql show dnodes -x show9 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes -$dnode4Vnodes = $data2_4 -print dnode4 $dnode4Vnodes +$dnode5Vnodes = $data2_5 +print dnode5 $dnode5Vnodes +$dnode6Vnodes = $data2_6 +print dnode6 $dnode6Vnodes +$dnode7Vnodes = $data2_7 +print dnode7 $dnode7Vnodes -if $dnode1Vnodes != null then +if $dnode5Vnodes != 1 then goto show9 endi -if $dnode2Vnodes != 1 then +if $dnode6Vnodes != 1 then goto show9 endi -if $dnode3Vnodes != 1 then - goto show9 -endi -if $dnode4Vnodes != 1 then +if $dnode7Vnodes != 1 then goto show9 endi print ============================== step10 -print ========= start dnode1 -sleep 3000 -system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c numOfMPeers -v 3 -system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0 -sleep 3000 -sql create dnode $hostname1 -system sh/exec_up.sh -n dnode1 -s start +sql create dnode $hostname8 +system sh/exec_up.sh -n dnode8 -s start sleep 9000 $x = 0 @@ -425,16 +378,16 @@ show10: return -1 endi sql show dnodes -x show10 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes -$dnode4Vnodes = $data2_4 -print dnode4 $dnode4Vnodes +$dnode5Vnodes = $data2_5 +print dnode5 $dnode5Vnodes +$dnode6Vnodes = $data2_6 +print dnode6 $dnode6Vnodes +$dnode7Vnodes = $data2_7 +print dnode7 $dnode7Vnodes +$dnode8Vnodes = $data2_8 +print dnode8 $dnode8Vnodes -if $dnode1Vnodes != 2 then +if $dnode8Vnodes != 2 then goto show10 endi @@ -488,48 +441,15 @@ endi # goto show11 #endi -print ============================== step12 -print ========= drop dnode1 -sql drop dnode $hostname1 -sleep 10000 - -$x = 0 -show12: - $x = $x + 1 - sleep 2000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show12 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes -$dnode4Vnodes = $data2_4 -print dnode4 $dnode4Vnodes - -if $dnode1Vnodes != null then - goto show12 -endi -if $dnode2Vnodes != 0 then - goto show12 -endi -if $dnode3Vnodes != 0 then - goto show12 -endi -if $dnode4Vnodes != 0 then - goto show12 -endi - system sh/exec_up.sh -n dnode1 -s stop -x SIGINT print ============================== step13 +sql reset query cache +sleep 1000 + print ========= check data -sql use c_b3_d1 -sql select * from c_b3_t1 order by t desc +sql select * from c_b3_d1.c_b3_t1 order by t desc print $data01 $data11 $data21 $data31 $data41 if $data01 != 11 then return -1 @@ -547,8 +467,7 @@ if $data41 != 15 then return -1 endi -sql use c_b3_d2 -sql select * from c_b3_t2 order by t desc +sql select * from c_b3_d2.c_b3_t2 order by t desc print $data01 $data11 $data21 $data31 $data41 if $data01 != 21 then @@ -567,8 +486,7 @@ if $data41 != 25 then return -1 endi -sql use c_b3_d3 -sql select * from c_b3_t3 order by t desc +sql select * from c_b3_d3.c_b3_t3 order by t desc print $data01 $data11 $data21 $data31 $data41 if $data01 != 31 then return -1 @@ -586,8 +504,7 @@ if $data41 != 35 then return -1 endi -sql use c_b3_d4 -sql select * from c_b3_t4 order by t desc +sql select * from c_b3_d4.c_b3_t4 order by t desc print $data01 $data11 $data21 $data31 $data41 if $data01 != 41 then return -1 @@ -615,5 +532,3 @@ system sh/exec_up.sh -n dnode5 -s stop -x SIGINT system sh/exec_up.sh -n dnode6 -s stop -x SIGINT system sh/exec_up.sh -n dnode7 -s stop -x SIGINT system sh/exec_up.sh -n dnode8 -s stop -x SIGINT - - diff --git a/tests/script/unique/cluster/testSuite.sim b/tests/script/unique/cluster/testSuite.sim index 74fa2cb271..34cdda85dd 100644 --- a/tests/script/unique/cluster/testSuite.sim +++ b/tests/script/unique/cluster/testSuite.sim @@ -1,5 +1,3 @@ run unique/cluster/balance1.sim run unique/cluster/balance2.sim run unique/cluster/balance3.sim -run unique/cluster/balance1_bug.sim -run unique/cluster/balance1_single.sim \ No newline at end of file From 87fdb0eaf276a31e985dfeaf3333220136509c7c Mon Sep 17 00:00:00 2001 From: slguan Date: Wed, 6 May 2020 20:20:57 +0800 Subject: [PATCH 12/31] read tsdbid error in cfg file --- src/vnode/src/vnodeMain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vnode/src/vnodeMain.c b/src/vnode/src/vnodeMain.c index f9904f7fa8..2c914de20f 100644 --- a/src/vnode/src/vnodeMain.c +++ b/src/vnode/src/vnodeMain.c @@ -184,6 +184,7 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) { pVnode->status = TAOS_VN_STATUS_INIT; pVnode->refCount = 1; pVnode->version = 0; + pVnode->tsdbCfg.tsdbId = pVnode->vgId; taosAddIntHash(tsDnodeVnodesHash, pVnode->vgId, (char *)(&pVnode)); int32_t code = vnodeReadCfg(pVnode); From a83824eccd46228faf6945f987317f2abd9d6e8d Mon Sep 17 00:00:00 2001 From: slguan Date: Wed, 6 May 2020 22:56:25 +0800 Subject: [PATCH 13/31] add log --- src/mnode/src/mgmtDnode.c | 1 + src/mnode/src/mgmtVgroup.c | 5 +---- tests/script/unique/cluster/balance1.sim | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/mnode/src/mgmtDnode.c b/src/mnode/src/mgmtDnode.c index b041d862cf..bb98e1c3e6 100644 --- a/src/mnode/src/mgmtDnode.c +++ b/src/mnode/src/mgmtDnode.c @@ -426,6 +426,7 @@ static int32_t mgmtDropDnodeByEp(char *ep) { return TSDB_CODE_NO_REMOVE_MASTER; } + mPrint("dnode:%d, start to drop it", pDnode->dnodeId); #ifndef _SYNC return mgmtDropDnode(pDnode); #else diff --git a/src/mnode/src/mgmtVgroup.c b/src/mnode/src/mgmtVgroup.c index 2162230606..f83268e760 100644 --- a/src/mnode/src/mgmtVgroup.c +++ b/src/mnode/src/mgmtVgroup.c @@ -160,10 +160,7 @@ static int32_t mgmtVgroupActionUpdate(SSdbOper *pOper) { mgmtDecVgroupRef(pVgroup); - mTrace("vgId:%d, is updated, numOfVnode:%d", pVgroup->vgId, pVgroup->numOfVnodes); - if (pDb) { - mTrace("tables:%d", pDb->cfg.maxTables); - } + mTrace("vgId:%d, is updated, numOfVnode:%d tables:%d", pVgroup->vgId, pVgroup->numOfVnodes, pDb == NULL ? 0 : pDb->cfg.maxTables); return TSDB_CODE_SUCCESS; } diff --git a/tests/script/unique/cluster/balance1.sim b/tests/script/unique/cluster/balance1.sim index 97d5bb468a..50f56688f3 100644 --- a/tests/script/unique/cluster/balance1.sim +++ b/tests/script/unique/cluster/balance1.sim @@ -92,7 +92,7 @@ $x = 0 show2: $x = $x + 1 sleep 2000 - if $x == 30 then + if $x == 20 then return -1 endi sql show dnodes -x show2 @@ -134,7 +134,7 @@ $x = 0 show4: $x = $x + 1 sleep 2000 - if $x == 30 then + if $x == 20 then return -1 endi sql show dnodes -x show4 From 8882fed6672ec85aa8721281a0dfe28fb685cae5 Mon Sep 17 00:00:00 2001 From: jtao1735 Date: Wed, 6 May 2020 15:15:39 +0000 Subject: [PATCH 14/31] optimize the tqueue code for rpc, set the link as secured for success response before sending response --- src/rpc/src/rpcMain.c | 1 + src/util/src/tqueue.c | 10 +++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 3e4e05cd11..20404511f6 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -1083,6 +1083,7 @@ static void rpcSendMsgToPeer(SRpcConn *pConn, void *msg, int msgLen) { pRpc->label, pConn, taosMsg[pHead->msgType], pConn->peerFqdn, pConn->peerPort, msgLen, pHead->sourceId, pHead->destId, pHead->tranId); } else { + if (pHead->code == 0) pConn->secured = 1; // for success response, set link as secured if (pHead->msgType < TSDB_MSG_TYPE_CM_HEARTBEAT || (rpcDebugFlag & 16)) tTrace( "%s %p, %s is sent to %s:%hu, code:0x%x len:%d sig:0x%08x:0x%08x:%d", pRpc->label, pConn, taosMsg[pHead->msgType], pConn->peerFqdn, pConn->peerPort, diff --git a/src/util/src/tqueue.c b/src/util/src/tqueue.c index a458cefc9c..8a203ed917 100644 --- a/src/util/src/tqueue.c +++ b/src/util/src/tqueue.c @@ -94,8 +94,6 @@ void *taosAllocateQitem(int size) { void taosFreeQitem(void *param) { if (param == NULL) return; - uTrace("item:%p is freed", param); - char *temp = (char *)param; temp -= sizeof(STaosQnode); free(temp); @@ -144,7 +142,7 @@ int taosReadQitem(taos_queue param, int *type, void **pitem) { queue->numOfItems--; if (queue->qset) atomic_sub_fetch_32(&queue->qset->numOfItems, 1); code = 1; - //uTrace("item:%p is read out from queue, items:%d", *pitem, queue->numOfItems); + uTrace("item:%p is read out from queue, items:%d", *pitem, queue->numOfItems); } pthread_mutex_unlock(&queue->mutex); @@ -309,13 +307,12 @@ int taosReadQitemFromQset(taos_qset param, int *type, void **pitem, void **phand pthread_mutex_lock(&qset->mutex); for(int i=0; inumOfQueues; ++i) { - //pthread_mutex_lock(&qset->mutex); if (qset->current == NULL) qset->current = qset->head; STaosQueue *queue = qset->current; if (queue) qset->current = queue->next; - //pthread_mutex_unlock(&qset->mutex); if (queue == NULL) break; + if (queue->head == NULL) continue; pthread_mutex_lock(&queue->mutex); @@ -351,13 +348,12 @@ int taosReadAllQitemsFromQset(taos_qset param, taos_qall p2, void **phandle) { pthread_mutex_lock(&qset->mutex); for(int i=0; inumOfQueues; ++i) { - // pthread_mutex_lock(&qset->mutex); if (qset->current == NULL) qset->current = qset->head; queue = qset->current; if (queue) qset->current = queue->next; - // pthread_mutex_unlock(&qset->mutex); if (queue == NULL) break; + if (queue->head == NULL) continue; pthread_mutex_lock(&queue->mutex); From 3582b2380744adc10757ac357127891951d817ba Mon Sep 17 00:00:00 2001 From: slguan Date: Wed, 6 May 2020 23:47:05 +0800 Subject: [PATCH 15/31] scripts --- tests/script/jenkins/basic.txt | 63 +++++++++ tests/script/jenkins/basic1.txt | 11 -- tests/script/unique/account/authority.sim | 3 +- tests/script/unique/account/testSuite.sim | 2 +- tests/script/unique/cluster/balance2.sim | 159 +--------------------- tests/script/uniqueSuite.sim | 5 - 6 files changed, 68 insertions(+), 175 deletions(-) create mode 100644 tests/script/jenkins/basic.txt delete mode 100644 tests/script/jenkins/basic1.txt delete mode 100644 tests/script/uniqueSuite.sim diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt new file mode 100644 index 0000000000..81f6bc55f7 --- /dev/null +++ b/tests/script/jenkins/basic.txt @@ -0,0 +1,63 @@ +cd ../../debug; cmake .. +#cd ../../debug; make clean +cd ../../debug; make + +cd ../../../debug; cmake .. +#cd ../../../debug; make clean +cd ../../../debug; make + +./test.sh -u -f unique/account/account_create.sim +./test.sh -u -f unique/account/account_delete.sim +./test.sh -u -f unique/account/account_len.sim +./test.sh -u -f unique/account/authority.sim +./test.sh -u -f unique/account/basic.sim +./test.sh -u -f unique/account/paras.sim +./test.sh -u -f unique/account/pass_alter.sim +./test.sh -u -f unique/account/pass_len.sim +./test.sh -u -f unique/account/usage.sim +./test.sh -u -f unique/account/user_create.sim +./test.sh -u -f unique/account/user_len.sim + +#big + +./test.sh -u -f unique/cluster/balance1.sim +./test.sh -u -f unique/cluster/balance2.sim +./test.sh -u -f unique/cluster/balance3.sim + +./test.sh -u -f unique/column/replica3.sim + +./test.sh -u -f unique/db/replica_add12.sim +./test.sh -u -f unique/db/replica_add13.sim +./test.sh -u -f unique/db/replica_add23.sim +./test.sh -u -f unique/db/replica_reduce21.sim +./test.sh -u -f unique/db/replica_reduce32.sim +./test.sh -u -f unique/db/replica_reduce31.sim +./test.sh -u -f unique/db/replica_part.sim + +./test.sh -u -f unique/dnode/balance1.sim +./test.sh -u -f unique/dnode/balance2.sim +./test.sh -u -f unique/dnode/balance3.sim +./test.sh -u -f unique/dnode/balancex.sim +./test.sh -u -f unique/dnode/offline1.sim +./test.sh -u -f unique/dnode/offline2.sim + +./test.sh -u -f unique/http/admin.sim + +#import + +#metrics + +./test.sh -u -f unique/mnode/mgmt22.sim +./test.sh -u -f unique/mnode/mgmt23.sim +./test.sh -u -f unique/mnode/mgmt24.sim +./test.sh -u -f unique/mnode/mgmt25.sim +./test.sh -u -f unique/mnode/mgmt26.sim +./test.sh -u -f unique/mnode/mgmt33.sim +./test.sh -u -f unique/mnode/mgmt34.sim + +#stream + +#table + +./test.sh -u -f unique/vnode/replica2_basic2.sim +./test.sh -u -f unique/vnode/replica3_basic.sim \ No newline at end of file diff --git a/tests/script/jenkins/basic1.txt b/tests/script/jenkins/basic1.txt deleted file mode 100644 index ef6d4e239b..0000000000 --- a/tests/script/jenkins/basic1.txt +++ /dev/null @@ -1,11 +0,0 @@ -./test.sh -f general/user/basic1.sim - -./test.sh -f general/db/basic1.sim -./test.sh -f general/db/basic2.sim -./test.sh -f general/db/basic3.sim -./test.sh -f general/db/basic4.sim -./test.sh -f general/db/basic5.sim - -./test.sh -f general/table/basic1.sim -./test.sh -f general/table/basic2.sim -./test.sh -f general/table/basic3.sim \ No newline at end of file diff --git a/tests/script/unique/account/authority.sim b/tests/script/unique/account/authority.sim index e6532458f0..4198f2c333 100644 --- a/tests/script/unique/account/authority.sim +++ b/tests/script/unique/account/authority.sim @@ -227,7 +227,8 @@ print ============= step6 sql close sql connect owrite sleep 2000 - +sql reset query cache +sleep 1000 sql create database d1 sql create database d3 sql create table d1.t1 (ts timestamp, i int) diff --git a/tests/script/unique/account/testSuite.sim b/tests/script/unique/account/testSuite.sim index 38856196c2..9d4141cfe0 100644 --- a/tests/script/unique/account/testSuite.sim +++ b/tests/script/unique/account/testSuite.sim @@ -4,7 +4,7 @@ run unique/account/account_len.sim run unique/account/authority.sim run unique/account/basic.sim run unique/account/paras.sim -#run unique/account/pass_alter.sim +run unique/account/pass_alter.sim run unique/account/pass_len.sim run unique/account/usage.sim run unique/account/user_create.sim diff --git a/tests/script/unique/cluster/balance2.sim b/tests/script/unique/cluster/balance2.sim index af77db3ce6..04ab5f8fe4 100644 --- a/tests/script/unique/cluster/balance2.sim +++ b/tests/script/unique/cluster/balance2.sim @@ -357,168 +357,13 @@ print dnode1 ==> $dnode1Role print dnode4 ==> $dnode4Role print dnode5 ==> $dnode5Role -system sh/exec_up.sh -n dnode1 -s stop -x SIGINT - -print ============================== step7 -print ========= start dnode6 -sql create dnode $hostname6 -system sh/exec_up.sh -n dnode6 -s start -sleep 9000 - -sql show mnodes -$dnode1Role = $data2_1 -$dnode4Role = $data2_4 -$dnode5Role = $data2_5 -$dnode6Role = $data2_6 -print dnode1 ==> $dnode1Role -print dnode4 ==> $dnode4Role -print dnode5 ==> $dnode5Role -print dnode6 ==> $dnode6Role - -$x = 0 -show7: - sql show mnodes - $dnode4Role = $data2_4 - $dnode5Role = $data2_5 - $dnode6Role = $data2_6 - print dnode4 ==> $dnode4Role - print dnode5 ==> $dnode5Role - print dnode6 ==> $dnode6Role - - $x = $x + 1 - sleep 2000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show7 - -$dnode4Vnodes = $data2_4 -print dnode4 $dnode4Vnodes -$dnode5Vnodes = $data2_5 -print dnode5 $dnode5Vnodes -$dnode6Vnodes = $data2_6 -print dnode6 $dnode6Vnodes - -if $dnode4Vnodes != 2 then - goto show7 -endi -if $dnode5Vnodes != 2 then - goto show7 -endi -if $dnode6Vnodes != 2 then - goto show7 -endi - -print ============================== step8 -print ========= add db4 - -sql create database c_b2_d4 replica 2 tables 4 -sql use c_b2_d4 -sql create table c_b2_t4 (t timestamp, i int) -sql insert into c_b2_t4 values(1520000020045, 45) -sql insert into c_b2_t4 values(1520000021044, 44) -sql insert into c_b2_t4 values(1520000022043, 43) -sql insert into c_b2_t4 values(1520000023042, 42) -sql insert into c_b2_t4 values(1520000024041, 41) - -sql create dnode $hostname7 -system sh/exec_up.sh -n dnode7 -s start -sleep 9000 - -sql show mnodes -$dnode4Role = $data2_4 -$dnode5Role = $data2_5 -$dnode6Role = $data2_6 -$dnode7Role = $data2_7 -print dnode4 ==> $dnode4Role -print dnode5 ==> $dnode5Role -print dnode6 ==> $dnode6Role -print dnode7 ==> $dnode7Role - -$x = 0 -show8: - $x = $x + 1 - sleep 2000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show8 -$dnode4Vnodes = $data2_4 -print dnode4 $dnode4Vnodes -$dnode5Vnodes = $data2_5 -print dnode5 $dnode5Vnodes -$dnode6Vnodes = $data2_6 -print dnode6 $dnode6Vnodes -$dnode7Vnodes = $data2_7 -print dnode7 $dnode7Vnodes - -if $dnode4Vnodes != 2 then - goto show8 -endi -if $dnode5Vnodes != 2 then - goto show8 -endi -if $dnode6Vnodes != 2 then - goto show8 -endi -if $dnode7Vnodes != 2 then - goto show8 -endi - -print ============================== step11 - -sql create database c_b2_d5 replica 2 tables 4 -sql use c_b2_d5; -sql create table c_b2_t5 (t timestamp, i int) -sql insert into c_b2_t5 values(1520000020055, 55) -sql insert into c_b2_t5 values(1520000021054, 54) -sql insert into c_b2_t5 values(1520000022053, 53) -sql insert into c_b2_t5 values(1520000023052, 52) -sql insert into c_b2_t5 values(1520000024051, 51) - -sql create database c_b2_d6 replica 2 tables 4 -sql use c_b2_d6 -sql create table c_b2_t6 (t timestamp, i int) -sql insert into c_b2_t6 values(1520000020065, 65) -sql insert into c_b2_t6 values(1520000021064, 64) -sql insert into c_b2_t6 values(1520000022063, 63) -sql insert into c_b2_t6 values(1520000023062, 62) -sql insert into c_b2_t6 values(1520000024061, 61) - -$x = 0 -show11: - $x = $x + 1 - sleep 2000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show11 -$dnode4Vnodes = $data2_4 -print dnode4 $dnode4Vnodes -$dnode5Vnodes = $data2_5 -print dnode5 $dnode5Vnodes -$dnode6Vnodes = $data2_6 -print dnode6 $dnode6Vnodes -$dnode7Vnodes = $data2_7 -print dnode7 $dnode7Vnodes - -if $dnode4Vnodes != 1 then - goto show11 -endi -if $dnode5Vnodes != 1 then - goto show11 -endi -if $dnode6Vnodes != 1 then - goto show11 -endi -if $dnode7Vnodes != 1 then - goto show11 -endi +#system sh/exec_up.sh -n dnode1 -s stop -x SIGINT print ============================== step12 print ========= check data sql reset query cache +sleep 1000 sql select * from c_b2_d1.c_b2_t1 order by t desc print $data01 $data11 $data21 $data31 $data41 diff --git a/tests/script/uniqueSuite.sim b/tests/script/uniqueSuite.sim deleted file mode 100644 index 0a3d57c27e..0000000000 --- a/tests/script/uniqueSuite.sim +++ /dev/null @@ -1,5 +0,0 @@ -################################# - -run unique/mnode/testSuite.sim - -################################## From a12e0d732071036e52a44863169635cd93e29edd Mon Sep 17 00:00:00 2001 From: hjxilinx Date: Thu, 7 May 2020 00:18:35 +0800 Subject: [PATCH 16/31] [td-225]fix bug for arithmetic calculation on aggregated results. --- src/client/inc/tscUtil.h | 2 - src/client/inc/tsclient.h | 4 +- src/client/src/tscFunctionImpl.c | 58 +++++++-------- src/client/src/tscParseInsert.c | 4 ++ src/client/src/tscSQLParser.c | 42 +++-------- src/client/src/tscSecondaryMerge.c | 2 +- src/client/src/tscServer.c | 6 +- src/client/src/tscSql.c | 19 +---- src/client/src/tscStream.c | 2 +- src/client/src/tscSubquery.c | 68 ++++++++++++------ src/client/src/tscUtil.c | 70 +++++++++---------- src/dnode/src/dnodeWrite.c | 2 +- src/inc/taosmsg.h | 2 +- src/query/inc/tsqlfunction.h | 3 +- src/query/src/qast.c | 3 +- src/query/src/queryExecutor.c | 10 +-- .../parser/col_arithmetic_operation.sim | 1 - 17 files changed, 143 insertions(+), 155 deletions(-) diff --git a/src/client/inc/tscUtil.h b/src/client/inc/tscUtil.h index 2b53342e74..4b8a162ef7 100644 --- a/src/client/inc/tscUtil.h +++ b/src/client/inc/tscUtil.h @@ -203,7 +203,6 @@ void tscGetSrcColumnInfo(SSrcColumnInfo* pColInfo, SQueryInfo* pQueryInfo); void tscSetFreeHeatBeat(STscObj* pObj); bool tscShouldFreeHeatBeat(SSqlObj* pHb); -void tscCleanSqlCmd(SSqlCmd* pCmd); bool tscShouldBeFreed(SSqlObj* pSql); STableMetaInfo* tscGetTableMetaInfoFromCmd(SSqlCmd *pCmd, int32_t subClauseIndex, int32_t tableIndex); @@ -220,7 +219,6 @@ STableMetaInfo* tscAddTableMetaInfo(SQueryInfo* pQueryInfo, const char* name, ST STableMetaInfo* tscAddEmptyMetaInfo(SQueryInfo *pQueryInfo); int32_t tscAddSubqueryInfo(SSqlCmd *pCmd); -void tscFreeQueryInfo(SSqlCmd* pCmd); void tscInitQueryInfo(SQueryInfo* pQueryInfo); void tscClearSubqueryInfo(SSqlCmd* pCmd); diff --git a/src/client/inc/tsclient.h b/src/client/inc/tsclient.h index 203ba90c5f..854a12629f 100644 --- a/src/client/inc/tsclient.h +++ b/src/client/inc/tsclient.h @@ -88,7 +88,7 @@ typedef struct SSqlExpr { int16_t functionId; // function id in aAgg array int16_t resType; // return value type int16_t resBytes; // length of return value - int16_t interResBytes; // inter result buffer size + int16_t interBytes; // inter result buffer size int16_t numOfParams; // argument value of each function tVariant param[3]; // parameters are not more than 3 int32_t offset; // sub result column value of arithmetic expression. @@ -283,6 +283,8 @@ typedef struct { int32_t* length; // length for each field for current row char ** buffer; // Buffer used to put multibytes encoded using unicode (wchar_t) SColumnIndex * pColumnIndex; + SArithmeticSupport* pArithSup; // support the arithmetic expression calculation on agg functions + struct SLocalReducer *pLocalReducer; } SSqlRes; diff --git a/src/client/src/tscFunctionImpl.c b/src/client/src/tscFunctionImpl.c index 9995f94dbe..28bfaf916b 100644 --- a/src/client/src/tscFunctionImpl.c +++ b/src/client/src/tscFunctionImpl.c @@ -153,7 +153,7 @@ typedef struct SRateInfo { int32_t getResultDataInfo(int32_t dataType, int32_t dataBytes, int32_t functionId, int32_t param, int16_t *type, - int16_t *bytes, int16_t *interResBytes, int16_t extLength, bool isSuperTable) { + int16_t *bytes, int16_t *interBytes, int16_t extLength, bool isSuperTable) { if (!isValidDataType(dataType, dataBytes)) { tscError("Illegal data type %d or data type length %d", dataType, dataBytes); return TSDB_CODE_INVALID_SQL; @@ -164,35 +164,35 @@ int32_t getResultDataInfo(int32_t dataType, int32_t dataBytes, int32_t functionI functionId == TSDB_FUNC_TAG || functionId == TSDB_FUNC_INTERP) { *type = (int16_t)dataType; *bytes = (int16_t)dataBytes; - *interResBytes = *bytes + sizeof(SResultInfo); + *interBytes = *bytes + sizeof(SResultInfo); return TSDB_CODE_SUCCESS; } if (functionId == TSDB_FUNC_TID_TAG) { // todo use struct *type = TSDB_DATA_TYPE_BINARY; *bytes = dataBytes + sizeof(int64_t) + sizeof(int32_t) + sizeof(int32_t); // (uid, tid) + VGID + TAGSIZE - *interResBytes = *bytes; + *interBytes = *bytes; return TSDB_CODE_SUCCESS; } if (functionId == TSDB_FUNC_COUNT) { *type = TSDB_DATA_TYPE_BIGINT; *bytes = sizeof(int64_t); - *interResBytes = *bytes; + *interBytes = *bytes; return TSDB_CODE_SUCCESS; } if (functionId == TSDB_FUNC_ARITHM) { *type = TSDB_DATA_TYPE_DOUBLE; *bytes = sizeof(double); - *interResBytes = *bytes; + *interBytes = *bytes; return TSDB_CODE_SUCCESS; } if (functionId == TSDB_FUNC_TS_COMP) { *type = TSDB_DATA_TYPE_BINARY; *bytes = sizeof(int32_t); // this results is compressed ts data - *interResBytes = POINTER_BYTES; + *interBytes = POINTER_BYTES; return TSDB_CODE_SUCCESS; } @@ -200,54 +200,54 @@ int32_t getResultDataInfo(int32_t dataType, int32_t dataBytes, int32_t functionI if (functionId == TSDB_FUNC_MIN || functionId == TSDB_FUNC_MAX) { *type = TSDB_DATA_TYPE_BINARY; *bytes = dataBytes + DATA_SET_FLAG_SIZE; - *interResBytes = *bytes; + *interBytes = *bytes; return TSDB_CODE_SUCCESS; } else if (functionId == TSDB_FUNC_SUM) { *type = TSDB_DATA_TYPE_BINARY; *bytes = sizeof(SSumInfo); - *interResBytes = *bytes; + *interBytes = *bytes; return TSDB_CODE_SUCCESS; } else if (functionId == TSDB_FUNC_AVG) { *type = TSDB_DATA_TYPE_BINARY; *bytes = sizeof(SAvgInfo); - *interResBytes = *bytes; + *interBytes = *bytes; return TSDB_CODE_SUCCESS; } else if (functionId >= TSDB_FUNC_RATE && functionId <= TSDB_FUNC_AVG_IRATE) { *type = TSDB_DATA_TYPE_DOUBLE; *bytes = sizeof(SRateInfo); - *interResBytes = sizeof(SRateInfo); + *interBytes = sizeof(SRateInfo); return TSDB_CODE_SUCCESS; } else if (functionId == TSDB_FUNC_TOP || functionId == TSDB_FUNC_BOTTOM) { *type = TSDB_DATA_TYPE_BINARY; *bytes = sizeof(STopBotInfo) + (sizeof(tValuePair) + POINTER_BYTES + extLength) * param; - *interResBytes = *bytes; + *interBytes = *bytes; return TSDB_CODE_SUCCESS; } else if (functionId == TSDB_FUNC_SPREAD) { *type = TSDB_DATA_TYPE_BINARY; *bytes = sizeof(SSpreadInfo); - *interResBytes = *bytes; + *interBytes = *bytes; return TSDB_CODE_SUCCESS; } else if (functionId == TSDB_FUNC_APERCT) { *type = TSDB_DATA_TYPE_BINARY; *bytes = sizeof(SHistBin) * (MAX_HISTOGRAM_BIN + 1) + sizeof(SHistogramInfo) + sizeof(SAPercentileInfo); - *interResBytes = *bytes; + *interBytes = *bytes; return TSDB_CODE_SUCCESS; } else if (functionId == TSDB_FUNC_LAST_ROW) { *type = TSDB_DATA_TYPE_BINARY; *bytes = sizeof(SLastrowInfo) + dataBytes; - *interResBytes = *bytes; + *interBytes = *bytes; return TSDB_CODE_SUCCESS; } else if (functionId == TSDB_FUNC_TWA) { *type = TSDB_DATA_TYPE_DOUBLE; *bytes = sizeof(STwaInfo); - *interResBytes = *bytes; + *interBytes = *bytes; return TSDB_CODE_SUCCESS; } } @@ -260,57 +260,57 @@ int32_t getResultDataInfo(int32_t dataType, int32_t dataBytes, int32_t functionI } *bytes = sizeof(int64_t); - *interResBytes = sizeof(SSumInfo); + *interBytes = sizeof(SSumInfo); return TSDB_CODE_SUCCESS; } else if (functionId == TSDB_FUNC_APERCT) { *type = TSDB_DATA_TYPE_DOUBLE; *bytes = sizeof(double); - *interResBytes = + *interBytes = sizeof(SAPercentileInfo) + sizeof(SHistogramInfo) + sizeof(SHistBin) * (MAX_HISTOGRAM_BIN + 1); return TSDB_CODE_SUCCESS; } else if (functionId == TSDB_FUNC_TWA) { *type = TSDB_DATA_TYPE_DOUBLE; *bytes = sizeof(double); - *interResBytes = sizeof(STwaInfo); + *interBytes = sizeof(STwaInfo); return TSDB_CODE_SUCCESS; } if (functionId == TSDB_FUNC_AVG) { *type = TSDB_DATA_TYPE_DOUBLE; *bytes = sizeof(double); - *interResBytes = sizeof(SAvgInfo); + *interBytes = sizeof(SAvgInfo); } else if (functionId >= TSDB_FUNC_RATE && functionId <= TSDB_FUNC_AVG_IRATE) { *type = TSDB_DATA_TYPE_DOUBLE; *bytes = sizeof(double); - *interResBytes = sizeof(SRateInfo); + *interBytes = sizeof(SRateInfo); } else if (functionId == TSDB_FUNC_STDDEV) { *type = TSDB_DATA_TYPE_DOUBLE; *bytes = sizeof(double); - *interResBytes = sizeof(SStddevInfo); + *interBytes = sizeof(SStddevInfo); } else if (functionId == TSDB_FUNC_MIN || functionId == TSDB_FUNC_MAX) { *type = (int16_t)dataType; *bytes = (int16_t)dataBytes; - *interResBytes = dataBytes + DATA_SET_FLAG_SIZE; + *interBytes = dataBytes + DATA_SET_FLAG_SIZE; } else if (functionId == TSDB_FUNC_FIRST || functionId == TSDB_FUNC_LAST) { *type = (int16_t)dataType; *bytes = (int16_t)dataBytes; - *interResBytes = dataBytes + sizeof(SResultInfo); + *interBytes = dataBytes + sizeof(SResultInfo); } else if (functionId == TSDB_FUNC_SPREAD) { *type = (int16_t)TSDB_DATA_TYPE_DOUBLE; *bytes = sizeof(double); - *interResBytes = sizeof(SSpreadInfo); + *interBytes = sizeof(SSpreadInfo); } else if (functionId == TSDB_FUNC_PERCT) { *type = (int16_t)TSDB_DATA_TYPE_DOUBLE; *bytes = (int16_t)sizeof(double); - *interResBytes = (int16_t)sizeof(double); + *interBytes = (int16_t)sizeof(double); } else if (functionId == TSDB_FUNC_LEASTSQR) { *type = TSDB_DATA_TYPE_BINARY; *bytes = TSDB_AVG_FUNCTION_INTER_BUFFER_SIZE; // string - *interResBytes = *bytes + sizeof(SResultInfo); + *interBytes = *bytes + sizeof(SResultInfo); } else if (functionId == TSDB_FUNC_FIRST_DST || functionId == TSDB_FUNC_LAST_DST) { *type = TSDB_DATA_TYPE_BINARY; *bytes = dataBytes + sizeof(SFirstLastInfo); - *interResBytes = *bytes; + *interBytes = *bytes; } else if (functionId == TSDB_FUNC_TOP || functionId == TSDB_FUNC_BOTTOM) { *type = (int16_t)dataType; *bytes = (int16_t)dataBytes; @@ -318,11 +318,11 @@ int32_t getResultDataInfo(int32_t dataType, int32_t dataBytes, int32_t functionI size_t size = sizeof(STopBotInfo) + (sizeof(tValuePair) + POINTER_BYTES + extLength) * param; // the output column may be larger than sizeof(STopBotInfo) - *interResBytes = size; + *interBytes = size; } else if (functionId == TSDB_FUNC_LAST_ROW) { *type = (int16_t)dataType; *bytes = (int16_t)dataBytes; - *interResBytes = dataBytes + sizeof(SLastrowInfo); + *interBytes = dataBytes + sizeof(SLastrowInfo); } else { return TSDB_CODE_INVALID_SQL; } diff --git a/src/client/src/tscParseInsert.c b/src/client/src/tscParseInsert.c index 4bee595dac..5cb13c4464 100644 --- a/src/client/src/tscParseInsert.c +++ b/src/client/src/tscParseInsert.c @@ -960,6 +960,10 @@ static int32_t tscCheckIfCreateTable(char **sqlstr, SSqlObj *pSql) { *sqlstr = sql; } + if (*sqlstr == NULL) { + code = TSDB_CODE_INVALID_SQL; + } + return code; } diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 12032725c3..844eb2b1dc 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -1198,48 +1198,26 @@ int32_t parseSelectClause(SSqlCmd* pCmd, int32_t clauseIndex, tSQLExprList* pSel columnList.num = 0; columnList.ids[0] = (SColumnIndex) {0, 0}; - insertResultField(pQueryInfo, i, &columnList, sizeof(double), TSDB_DATA_TYPE_DOUBLE, "abc", NULL); + insertResultField(pQueryInfo, i, &columnList, sizeof(double), TSDB_DATA_TYPE_DOUBLE, "dummy_column", NULL); int32_t slot = tscNumOfFields(pQueryInfo) - 1; SFieldSupInfo* pInfo = tscFieldInfoGetSupp(&pQueryInfo->fieldsInfo, slot); if (pInfo->pSqlExpr == NULL) { - SExprInfo* pFuncExpr = calloc(1, sizeof(SExprInfo)); - pInfo->pArithExprInfo = pFuncExpr; + SExprInfo* pArithExprInfo = calloc(1, sizeof(SExprInfo)); // arithmetic expression always return result in the format of double float - pFuncExpr->bytes = sizeof(double); - pFuncExpr->interResBytes = sizeof(double); - pFuncExpr->type = TSDB_DATA_TYPE_DOUBLE; + pArithExprInfo->bytes = sizeof(double); + pArithExprInfo->interBytes = sizeof(double); + pArithExprInfo->type = TSDB_DATA_TYPE_DOUBLE; - tExprNode* pNode = NULL; -// SArray* colList = taosArrayInit(10, sizeof(SColIndex)); - - int32_t ret = exprTreeFromSqlExpr(&pNode, pItem->pNode, pQueryInfo->exprList, pQueryInfo, NULL); + int32_t ret = exprTreeFromSqlExpr(&pArithExprInfo->pExpr, pItem->pNode, pQueryInfo->exprList, pQueryInfo, NULL); if (ret != TSDB_CODE_SUCCESS) { - tExprTreeDestroy(&pNode, NULL); + tExprTreeDestroy(&pArithExprInfo->pExpr, NULL); return invalidSqlErrMsg(pQueryInfo->msg, "invalid expression in select clause"); } - pFuncExpr->pExpr = pNode; - assert(0); -// pExprInfo->pReqColumns = pColIndex; - -// for(int32_t k = 0; k < pFuncExpr->numOfCols; ++k) { -// SColIndex* pCol = &pFuncExpr->colList[k]; -// size_t size = tscSqlExprNumOfExprs(pQueryInfo); -// -// for(int32_t f = 0; f < size; ++f) { -// SSqlExpr* pExpr = tscSqlExprGet(pQueryInfo, f); -// if (strcmp(pExpr->aliasName, pCol->name) == 0) { -// pCol->colIndex = f; -// break; -// } -// } -// -// assert(pCol->colIndex >= 0 && pCol->colIndex < size); -// tfree(pNode); -// } + pInfo->pArithExprInfo = pArithExprInfo; } } } else { @@ -2278,7 +2256,7 @@ int32_t tscTansformSQLFuncForSTableQuery(SQueryInfo* pQueryInfo) { tscSqlExprUpdate(pQueryInfo, k, functionId, pExpr->colInfo.colIndex, TSDB_DATA_TYPE_BINARY, bytes); // todo refactor - pExpr->interResBytes = intermediateBytes; + pExpr->interBytes = intermediateBytes; } } @@ -4937,7 +4915,7 @@ static void doUpdateSqlFunctionForTagPrj(SQueryInfo* pQueryInfo) { if (pExpr->functionId != TSDB_FUNC_TAG_DUMMY && pExpr->functionId != TSDB_FUNC_TS_DUMMY) { SSchema* pColSchema = &pSchema[pExpr->colInfo.colIndex]; getResultDataInfo(pColSchema->type, pColSchema->bytes, pExpr->functionId, pExpr->param[0].i64Key, &pExpr->resType, - &pExpr->resBytes, &pExpr->interResBytes, tagLength, true); + &pExpr->resBytes, &pExpr->interBytes, tagLength, true); } } } diff --git a/src/client/src/tscSecondaryMerge.c b/src/client/src/tscSecondaryMerge.c index 1abefdfd5a..8c75ed6c35 100644 --- a/src/client/src/tscSecondaryMerge.c +++ b/src/client/src/tscSecondaryMerge.c @@ -101,7 +101,7 @@ static void tscInitSqlContext(SSqlCmd *pCmd, SSqlRes *pRes, SLocalReducer *pRedu } SResultInfo *pResInfo = &pReducer->pResInfo[i]; - pResInfo->bufLen = pExpr->interResBytes; + pResInfo->bufLen = pExpr->interBytes; pResInfo->interResultBuf = calloc(1, (size_t)pResInfo->bufLen); pCtx->resultInfo = &pReducer->pResInfo[i]; diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index aa4eb01eae..5e873945aa 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -2363,8 +2363,10 @@ int tscProcessRetrieveRspFromNode(SSqlObj *pSql) { pRes->data = pRetrieve->data; SQueryInfo* pQueryInfo = tscGetQueryInfoDetail(pCmd, pCmd->clauseIndex); - tscSetResultPointer(pQueryInfo, pRes); - + if (tscCreateResPointerInfo(pRes, pQueryInfo) != TSDB_CODE_SUCCESS) { + return pRes->code; + } + if (pSql->pSubscription != NULL) { int32_t numOfCols = pQueryInfo->fieldsInfo.numOfOutput; diff --git a/src/client/src/tscSql.c b/src/client/src/tscSql.c index 87247d874b..922790ad70 100644 --- a/src/client/src/tscSql.c +++ b/src/client/src/tscSql.c @@ -433,23 +433,6 @@ int taos_fetch_block_impl(TAOS_RES *res, TAOS_ROW *rows) { return (pQueryInfo->order.order == TSDB_ORDER_DESC) ? pRes->numOfRows : -pRes->numOfRows; } -static UNUSED_FUNC char *getArithemicInputSrc(void *param, const char *name, int32_t colId) { -// SArithmeticSupport *pSupport = (SArithmeticSupport *)param; -// SExprInfo * pExpr = pSupport->pArithExpr; - -// int32_t index = -1; -// for (int32_t i = 0; i < pExpr->numOfCols; ++i) { -// if (strcmp(name, pExpr->colList[i].name) == 0) { -// index = i; -// break; -// } -// } -// -// assert(index >= 0 && index < pExpr->numOfCols); -// return pSupport->data[index] + pSupport->offset * pSupport->elemSize[index]; -return 0; -} - static void waitForRetrieveRsp(void *param, TAOS_RES *tres, int numOfRows) { SSqlObj* pSql = (SSqlObj*) tres; @@ -878,7 +861,7 @@ int taos_validate_sql(TAOS *taos, const char *sql) { static int tscParseTblNameList(SSqlObj *pSql, const char *tblNameList, int32_t tblListLen) { // must before clean the sqlcmd object - tscCleanSqlCmd(&pSql->cmd); + tscResetSqlCmdObj(&pSql->cmd); SSqlCmd *pCmd = &pSql->cmd; diff --git a/src/client/src/tscStream.c b/src/client/src/tscStream.c index 5f5af09cf8..d7c22b2248 100644 --- a/src/client/src/tscStream.c +++ b/src/client/src/tscStream.c @@ -508,7 +508,7 @@ TAOS_STREAM *taos_open_stream(TAOS *taos, const char *sqlstr, void (*fp)(void *p SSqlInfo SQLInfo = {0}; tSQLParse(&SQLInfo, pSql->sqlstr); - tscCleanSqlCmd(&pSql->cmd); + tscResetSqlCmdObj(&pSql->cmd); ret = tscAllocPayload(&pSql->cmd, TSDB_DEFAULT_PAYLOAD_SIZE); if (TSDB_CODE_SUCCESS != ret) { setErrorInfo(pObj, ret, NULL); diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index c3d6c0f5fc..7682287f94 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -14,6 +14,7 @@ */ #include "tscSubquery.h" +#include #include #include #include "os.h" @@ -1924,7 +1925,7 @@ void tscBuildResFromSubqueries(SSqlObj *pSql) { static void transferNcharData(SSqlObj *pSql, int32_t columnIndex, TAOS_FIELD *pField) { SSqlRes *pRes = &pSql->res; - if (isNull(pRes->tsrow[columnIndex], pField->type)) { + if (pRes->tsrow[columnIndex] != NULL && isNull(pRes->tsrow[columnIndex], pField->type)) { pRes->tsrow[columnIndex] = NULL; } else if (pField->type == TSDB_DATA_TYPE_NCHAR) { // convert unicode to native code in a temporary buffer extra one byte for terminated symbol @@ -1944,6 +1945,24 @@ static void transferNcharData(SSqlObj *pSql, int32_t columnIndex, TAOS_FIELD *pF } } +static char *getArithemicInputSrc(void *param, const char *name, int32_t colId) { + SArithmeticSupport *pSupport = (SArithmeticSupport *) param; + + int32_t index = -1; + SSqlExpr* pExpr = NULL; + + for (int32_t i = 0; i < pSupport->numOfCols; ++i) { + pExpr = taosArrayGetP(pSupport->exprList, i); + if (strncmp(name, pExpr->aliasName, TSDB_COL_NAME_LEN) == 0) { + index = i; + break; + } + } + + assert(index >= 0 && index < pSupport->numOfCols); + return pSupport->data[index] + pSupport->offset * pExpr->resBytes; +} + void **doSetResultRowData(SSqlObj *pSql, bool finalResult) { SSqlCmd *pCmd = &pSql->cmd; SSqlRes *pRes = &pSql->res; @@ -1981,27 +2000,30 @@ void **doSetResultRowData(SSqlObj *pSql, bool finalResult) { // calculate the result from several other columns if (pSup->pArithExprInfo != NULL) { -// SArithmeticSupport *sas = (SArithmeticSupport *)calloc(1, sizeof(SArithmeticSupport)); -// sas->offset = 0; -// sas-> = pQueryInfo->fieldsInfo.pExpr[i]; -// -// sas->numOfCols = sas->pExpr->binExprInfo.numOfCols; -// -// if (pRes->buffer[i] == NULL) { -// pRes->buffer[i] = malloc(tscFieldInfoGetField(pQueryInfo, i)->bytes); -// } -// -// for(int32_t k = 0; k < sas->numOfCols; ++k) { -// int32_t columnIndex = sas->pExpr->binExprInfo.pReqColumns[k].colIdxInBuf; -// SSqlExpr* pExpr = tscSqlExprGet(pQueryInfo, columnIndex); -// -// sas->elemSize[k] = pExpr->resBytes; -// sas->data[k] = (pRes->data + pRes->numOfRows* pExpr->offset) + pRes->row*pExpr->resBytes; -// } -// -// tSQLBinaryExprCalcTraverse(sas->pExpr->binExprInfo.pBinExpr, 1, pRes->buffer[i], sas, TSQL_SO_ASC, getArithemicInputSrc); -// pRes->tsrow[i] = pRes->buffer[i]; -// + if (pRes->pArithSup == NULL) { + SArithmeticSupport *sas = (SArithmeticSupport *) calloc(1, sizeof(SArithmeticSupport)); + sas->offset = 0; + sas->pArithExpr = pSup->pArithExprInfo; + sas->numOfCols = tscSqlExprNumOfExprs(pQueryInfo); + sas->exprList = pQueryInfo->exprList; + sas->data = calloc(sas->numOfCols, POINTER_BYTES); + + pRes->pArithSup = sas; + } + + if (pRes->buffer[i] == NULL) { + TAOS_FIELD* field = tscFieldInfoGetField(&pQueryInfo->fieldsInfo, i); + pRes->buffer[i] = malloc(field->bytes); + } + + for(int32_t k = 0; k < pRes->pArithSup->numOfCols; ++k) { + SSqlExpr* pExpr = tscSqlExprGet(pQueryInfo, k); + pRes->pArithSup->data[k] = (pRes->data + pRes->numOfRows* pExpr->offset) + pRes->row*pExpr->resBytes; + } + + tExprTreeCalcTraverse(pRes->pArithSup->pArithExpr->pExpr, 1, pRes->buffer[i], pRes->pArithSup, + TSDB_ORDER_ASC, getArithemicInputSrc); + pRes->tsrow[i] = pRes->buffer[i]; // free(sas); //todo optimization } } @@ -2010,7 +2032,7 @@ void **doSetResultRowData(SSqlObj *pSql, bool finalResult) { return pRes->tsrow; } -static bool tscHashRemainDataInSubqueryResultSet(SSqlObj *pSql) { +static UNUSED_FUNC bool tscHashRemainDataInSubqueryResultSet(SSqlObj *pSql) { bool hasData = true; SSqlCmd *pCmd = &pSql->cmd; diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index d49fff1583..727c7741f3 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -30,7 +30,10 @@ #include "ttokendef.h" #include "tscLog.h" -SCond* tsGetSTableQueryCond(STagCond* pTagCond, uint64_t uid) { +static void freeQueryInfoImpl(SQueryInfo* pQueryInfo); +static void clearAllTableMetaInfo(SQueryInfo* pQueryInfo, const char* address, bool removeFromCache); + + SCond* tsGetSTableQueryCond(STagCond* pTagCond, uint64_t uid) { if (pTagCond->pCond == NULL) { return NULL; } @@ -309,6 +312,7 @@ void tscDestroyResPointerInfo(SSqlRes* pRes) { for (int i = 0; i < pRes->numOfCols; i++) { tfree(pRes->buffer[i]); } + pRes->numOfCols = 0; } @@ -320,9 +324,32 @@ void tscDestroyResPointerInfo(SSqlRes* pRes) { tfree(pRes->pColumnIndex); tfree(pRes->buffer); + if (pRes->pArithSup != NULL) { + tfree(pRes->pArithSup->data); + tfree(pRes->pArithSup); + } + pRes->data = NULL; // pRes->data points to the buffer of pRsp, no need to free } +static void tscFreeQueryInfo(SSqlCmd* pCmd) { + if (pCmd == NULL || pCmd->numOfClause == 0) { + return; + } + + for (int32_t i = 0; i < pCmd->numOfClause; ++i) { + char* addr = (char*)pCmd - offsetof(SSqlObj, cmd); + SQueryInfo* pQueryInfo = tscGetQueryInfoDetail(pCmd, i); + + freeQueryInfoImpl(pQueryInfo); + clearAllTableMetaInfo(pQueryInfo, (const char*)addr, false); + tfree(pQueryInfo); + } + + pCmd->numOfClause = 0; + tfree(pCmd->pQueryInfo); +} + void tscResetSqlCmdObj(SSqlCmd* pCmd) { pCmd->command = 0; pCmd->numOfCols = 0; @@ -332,9 +359,10 @@ void tscResetSqlCmdObj(SSqlCmd* pCmd) { pCmd->parseFinished = 0; taosHashCleanup(pCmd->pTableList); - pCmd->pTableList= NULL; + pCmd->pTableList = NULL; pCmd->pDataBlocks = tscDestroyBlockArrayList(pCmd->pDataBlocks); + tscFreeQueryInfo(pCmd); } @@ -343,6 +371,7 @@ void tscFreeSqlResult(SSqlObj* pSql) { SSqlRes* pRes = &pSql->res; tscDestroyResPointerInfo(pRes); + memset(&pSql->res, 0, sizeof(SSqlRes)); } @@ -366,8 +395,8 @@ void tscPartiallyFreeSqlObj(SSqlObj* pSql) { pthread_mutex_unlock(&pObj->mutex); tscFreeSqlResult(pSql); - tfree(pSql->pSubs); + tfree(pSql->pSubs); pSql->freed = 0; pSql->numOfSubs = 0; @@ -913,6 +942,7 @@ void tscFieldInfoClear(SFieldInfo* pFieldInfo) { if (pInfo->pArithExprInfo != NULL) { tExprTreeDestroy(&pInfo->pArithExprInfo->pExpr, NULL); + tfree(pInfo->pArithExprInfo); } } @@ -947,7 +977,7 @@ static SSqlExpr* doBuildSqlExpr(SQueryInfo* pQueryInfo, int16_t functionId, SCol pExpr->colInfo.colIndex = pColIndex->columnIndex; pExpr->resType = type; pExpr->resBytes = size; - pExpr->interResBytes = interSize; + pExpr->interBytes = interSize; pExpr->uid = pTableMetaInfo->pTableMeta->uid; return pExpr; @@ -1422,20 +1452,6 @@ bool tscShouldFreeHeatBeat(SSqlObj* pHb) { return pQueryInfo->type == TSDB_QUERY_TYPE_FREE_RESOURCE; } -void tscCleanSqlCmd(SSqlCmd* pCmd) { - pCmd->pDataBlocks = tscDestroyBlockArrayList(pCmd->pDataBlocks); - tscFreeQueryInfo(pCmd); - - uint32_t allocSize = pCmd->allocSize; - char* allocPtr = pCmd->payload; - - memset(pCmd, 0, sizeof(SSqlCmd)); - - // restore values - pCmd->allocSize = allocSize; - pCmd->payload = allocPtr; -} - /* * the following three kinds of SqlObj should not be freed * 1. SqlObj for stream computing @@ -1630,24 +1646,6 @@ void clearAllTableMetaInfo(SQueryInfo* pQueryInfo, const char* address, bool rem tfree(pQueryInfo->pTableMetaInfo); } -void tscFreeQueryInfo(SSqlCmd* pCmd) { - if (pCmd == NULL || pCmd->numOfClause == 0) { - return; - } - - for (int32_t i = 0; i < pCmd->numOfClause; ++i) { - char* addr = (char*)pCmd - offsetof(SSqlObj, cmd); - SQueryInfo* pQueryInfo = tscGetQueryInfoDetail(pCmd, i); - - freeQueryInfoImpl(pQueryInfo); - clearAllTableMetaInfo(pQueryInfo, (const char*)addr, false); - tfree(pQueryInfo); - } - - pCmd->numOfClause = 0; - tfree(pCmd->pQueryInfo); -} - STableMetaInfo* tscAddTableMetaInfo(SQueryInfo* pQueryInfo, const char* name, STableMeta* pTableMeta, SVgroupsInfo* vgroupList, SArray* pTagCols) { void* pAlloc = realloc(pQueryInfo->pTableMetaInfo, (pQueryInfo->numOfTables + 1) * POINTER_BYTES); diff --git a/src/dnode/src/dnodeWrite.c b/src/dnode/src/dnodeWrite.c index 39757c690f..babbcf4ae8 100644 --- a/src/dnode/src/dnodeWrite.c +++ b/src/dnode/src/dnodeWrite.c @@ -228,7 +228,7 @@ static void dnodeHandleIdleWorker(SWriteWorker *pWorker) { int32_t num = taosGetQueueNumber(pWorker->qset); if (num > 0) { - usleep(30000); + usleep(30); sched_yield(); } else { taosFreeQall(pWorker->qall); diff --git a/src/inc/taosmsg.h b/src/inc/taosmsg.h index 68e72b0964..168c88d635 100644 --- a/src/inc/taosmsg.h +++ b/src/inc/taosmsg.h @@ -385,7 +385,7 @@ typedef struct SExprInfo { struct tExprNode* pExpr; int16_t bytes; int16_t type; - int16_t interResBytes; + int16_t interBytes; } SExprInfo; typedef struct SColumnFilterInfo { diff --git a/src/query/inc/tsqlfunction.h b/src/query/inc/tsqlfunction.h index b148410bfb..c409d4300c 100644 --- a/src/query/inc/tsqlfunction.h +++ b/src/query/inc/tsqlfunction.h @@ -119,6 +119,7 @@ typedef struct SArithmeticSupport { SExprInfo *pArithExpr; int32_t numOfCols; SColumnInfo *colList; + SArray* exprList; // client side used int32_t offset; char** data; } SArithmeticSupport; @@ -220,7 +221,7 @@ typedef struct SQLAggFuncElem { #define GET_RES_INFO(ctx) ((ctx)->resultInfo) int32_t getResultDataInfo(int32_t dataType, int32_t dataBytes, int32_t functionId, int32_t param, int16_t *type, - int16_t *len, int16_t *interResBytes, int16_t extLength, bool isSuperTable); + int16_t *len, int16_t *interBytes, int16_t extLength, bool isSuperTable); #define IS_STREAM_QUERY_VALID(x) (((x)&TSDB_FUNCSTATE_STREAM) != 0) #define IS_MULTIOUTPUT(x) (((x)&TSDB_FUNCSTATE_MO) != 0) diff --git a/src/query/src/qast.c b/src/query/src/qast.c index e78f36ed31..3336f90c83 100644 --- a/src/query/src/qast.c +++ b/src/query/src/qast.c @@ -979,7 +979,8 @@ void tExprTreeCalcTraverse(tExprNode *pExprs, int32_t numOfRows, char *pOutput, } else if (pRight->nodeType == TSQL_NODE_COL) { // 12 + columnRight // column data specified on right-hand-side - char * pRightInputData = getSourceDataBlock(param, pRight->pSchema->name, pRight->pSchema->colId); + char *pRightInputData = getSourceDataBlock(param, pRight->pSchema->name, pRight->pSchema->colId); + _bi_consumer_fn_t fp = tGetBiConsumerFn(pLeft->pVal->nType, pRight->pSchema->type, pExprs->_node.optr); fp(&pLeft->pVal->i64Key, pRightInputData, 1, numOfRows, pOutput, order); diff --git a/src/query/src/queryExecutor.c b/src/query/src/queryExecutor.c index e8abe9d819..267619e782 100644 --- a/src/query/src/queryExecutor.c +++ b/src/query/src/queryExecutor.c @@ -1402,7 +1402,7 @@ static void setCtxTagColumnInfo(SQuery *pQuery, SQLFunctionCtx *pCtx) { static void setWindowResultInfo(SResultInfo *pResultInfo, SQuery *pQuery, bool isStableQuery) { for (int32_t i = 0; i < pQuery->numOfOutput; ++i) { - setResultInfoBuf(&pResultInfo[i], pQuery->pSelectExpr[i].interResBytes, isStableQuery); + setResultInfoBuf(&pResultInfo[i], pQuery->pSelectExpr[i].interBytes, isStableQuery); } } @@ -5540,7 +5540,7 @@ static int32_t createSqlFunctionExprFromMsg(SQueryTableMsg *pQueryMsg, SExprInfo int32_t param = pExprs[i].base.arg[0].argValue.i64; if (getResultDataInfo(type, bytes, pExprs[i].base.functionId, param, &pExprs[i].type, &pExprs[i].bytes, - &pExprs[i].interResBytes, 0, isSuperTable) != TSDB_CODE_SUCCESS) { + &pExprs[i].interBytes, 0, isSuperTable) != TSDB_CODE_SUCCESS) { tfree(pExprs); return TSDB_CODE_INVALID_QUERY_MSG; } @@ -5566,7 +5566,7 @@ static int32_t createSqlFunctionExprFromMsg(SQueryTableMsg *pQueryMsg, SExprInfo int32_t ret = getResultDataInfo(pCol->type, pCol->bytes, functId, pExprs[i].base.arg[0].argValue.i64, - &pExprs[i].type, &pExprs[i].bytes, &pExprs[i].interResBytes, tagLen, isSuperTable); + &pExprs[i].type, &pExprs[i].bytes, &pExprs[i].interBytes, tagLen, isSuperTable); assert(ret == TSDB_CODE_SUCCESS); } } @@ -5780,10 +5780,10 @@ static SQInfo *createQInfoImpl(SQueryTableMsg *pQueryMsg, SSqlGroupbyExpr *pGrou pQuery->rec.threshold = 4000; for (int32_t col = 0; col < pQuery->numOfOutput; ++col) { - assert(pExprs[col].interResBytes >= pExprs[col].bytes); + assert(pExprs[col].interBytes >= pExprs[col].bytes); // allocate additional memory for interResults that are usually larger then final results - size_t size = (pQuery->rec.capacity + 1) * pExprs[col].bytes + pExprs[col].interResBytes + sizeof(SData); + size_t size = (pQuery->rec.capacity + 1) * pExprs[col].bytes + pExprs[col].interBytes + sizeof(SData); pQuery->sdata[col] = (SData *)calloc(1, size); if (pQuery->sdata[col] == NULL) { goto _cleanup; diff --git a/tests/script/general/parser/col_arithmetic_operation.sim b/tests/script/general/parser/col_arithmetic_operation.sim index b4ffeadc23..9803e77850 100644 --- a/tests/script/general/parser/col_arithmetic_operation.sim +++ b/tests/script/general/parser/col_arithmetic_operation.sim @@ -89,5 +89,4 @@ endi #### illegal operations sql_error select max(c2*2) from $tb -sql_error select 2*min(c1) from $tb sql_error select max(c1-c2) from $tb From 582176a4c1cedef4e7d7c00ed8dc5c4c8e2fba98 Mon Sep 17 00:00:00 2001 From: hzcheng Date: Thu, 7 May 2020 09:31:46 +0800 Subject: [PATCH 17/31] add encoding functions --- src/common/inc/tdataformat.h | 8 +-- src/common/src/tdataformat.c | 22 +++--- src/tsdb/inc/tsdbMain.h | 1 + src/tsdb/src/tsdbMeta.c | 2 +- src/util/inc/tcoding.h | 131 ++++++++++++++++++++++++----------- src/util/inc/tutil.h | 2 +- 6 files changed, 108 insertions(+), 58 deletions(-) diff --git a/src/common/inc/tdataformat.h b/src/common/inc/tdataformat.h index 10ca75f785..ba37db519e 100644 --- a/src/common/inc/tdataformat.h +++ b/src/common/inc/tdataformat.h @@ -114,10 +114,10 @@ static FORCE_INLINE void *tdGetRowDataOfCol(SDataRow row, int8_t type, int32_t o switch (type) { case TSDB_DATA_TYPE_BINARY: case TSDB_DATA_TYPE_NCHAR: - return POINTER_DRIFT(row, *(VarDataOffsetT *)POINTER_DRIFT(row, offset)); + return POINTER_SHIFT(row, *(VarDataOffsetT *)POINTER_SHIFT(row, offset)); break; default: - return POINTER_DRIFT(row, offset); + return POINTER_SHIFT(row, offset); break; } } @@ -149,11 +149,11 @@ static FORCE_INLINE void *tdGetColDataOfRow(SDataCol *pCol, int row) { switch (pCol->type) { case TSDB_DATA_TYPE_BINARY: case TSDB_DATA_TYPE_NCHAR: - return POINTER_DRIFT(pCol->pData, pCol->dataOff[row]); + return POINTER_SHIFT(pCol->pData, pCol->dataOff[row]); break; default: - return POINTER_DRIFT(pCol->pData, TYPE_BYTES[pCol->type] * row); + return POINTER_SHIFT(pCol->pData, TYPE_BYTES[pCol->type] * row); break; } } diff --git a/src/common/src/tdataformat.c b/src/common/src/tdataformat.c index 28f42f85a5..9d81cd07af 100644 --- a/src/common/src/tdataformat.c +++ b/src/common/src/tdataformat.c @@ -167,17 +167,17 @@ void tdFreeDataRow(SDataRow row) { int tdAppendColVal(SDataRow row, void *value, int8_t type, int32_t bytes, int32_t offset) { ASSERT(value != NULL); int32_t toffset = offset + TD_DATA_ROW_HEAD_SIZE; - char * ptr = POINTER_DRIFT(row, dataRowLen(row)); + char * ptr = POINTER_SHIFT(row, dataRowLen(row)); switch (type) { case TSDB_DATA_TYPE_BINARY: case TSDB_DATA_TYPE_NCHAR: - *(VarDataOffsetT *)POINTER_DRIFT(row, toffset) = dataRowLen(row); + *(VarDataOffsetT *)POINTER_SHIFT(row, toffset) = dataRowLen(row); memcpy(ptr, value, varDataTLen(value)); dataRowLen(row) += varDataTLen(value); break; default: - memcpy(POINTER_DRIFT(row, toffset), value, TYPE_BYTES[type]); + memcpy(POINTER_SHIFT(row, toffset), value, TYPE_BYTES[type]); break; } @@ -202,13 +202,13 @@ void dataColInit(SDataCol *pDataCol, STColumn *pCol, void **pBuf, int maxPoints) if (pDataCol->type == TSDB_DATA_TYPE_BINARY || pDataCol->type == TSDB_DATA_TYPE_NCHAR) { pDataCol->spaceSize = (sizeof(VarDataLenT) + pDataCol->bytes) * maxPoints; pDataCol->dataOff = (VarDataOffsetT *)(*pBuf); - pDataCol->pData = POINTER_DRIFT(*pBuf, TYPE_BYTES[pDataCol->type] * maxPoints); - *pBuf = POINTER_DRIFT(*pBuf, pDataCol->spaceSize + TYPE_BYTES[pDataCol->type] * maxPoints); + pDataCol->pData = POINTER_SHIFT(*pBuf, TYPE_BYTES[pDataCol->type] * maxPoints); + *pBuf = POINTER_SHIFT(*pBuf, pDataCol->spaceSize + TYPE_BYTES[pDataCol->type] * maxPoints); } else { pDataCol->spaceSize = pDataCol->bytes * maxPoints; pDataCol->dataOff = NULL; pDataCol->pData = *pBuf; - *pBuf = POINTER_DRIFT(*pBuf, pDataCol->spaceSize); + *pBuf = POINTER_SHIFT(*pBuf, pDataCol->spaceSize); } } @@ -222,13 +222,13 @@ void dataColAppendVal(SDataCol *pCol, void *value, int numOfPoints, int maxPoint // set offset pCol->dataOff[numOfPoints] = pCol->len; // Copy data - memcpy(POINTER_DRIFT(pCol->pData, pCol->len), value, varDataTLen(value)); + memcpy(POINTER_SHIFT(pCol->pData, pCol->len), value, varDataTLen(value)); // Update the length pCol->len += varDataTLen(value); break; default: ASSERT(pCol->len == TYPE_BYTES[pCol->type] * numOfPoints); - memcpy(POINTER_DRIFT(pCol->pData, pCol->len), value, pCol->bytes); + memcpy(POINTER_SHIFT(pCol->pData, pCol->len), value, pCol->bytes); pCol->len += pCol->bytes; break; } @@ -244,12 +244,12 @@ void dataColPopPoints(SDataCol *pCol, int pointsToPop, int numOfPoints) { VarDataOffsetT toffset = pCol->dataOff[pointsToPop]; pCol->len = pCol->len - toffset; ASSERT(pCol->len > 0); - memmove(pCol->pData, POINTER_DRIFT(pCol->pData, toffset), pCol->len); + memmove(pCol->pData, POINTER_SHIFT(pCol->pData, toffset), pCol->len); dataColSetOffset(pCol, pointsLeft); } else { ASSERT(pCol->len == TYPE_BYTES[pCol->type] * numOfPoints); pCol->len = TYPE_BYTES[pCol->type] * pointsLeft; - memmove(pCol->pData, POINTER_DRIFT(pCol->pData, TYPE_BYTES[pCol->type] * pointsToPop), pCol->len); + memmove(pCol->pData, POINTER_SHIFT(pCol->pData, TYPE_BYTES[pCol->type] * pointsToPop), pCol->len); } } @@ -301,7 +301,7 @@ void dataColSetOffset(SDataCol *pCol, int nEle) { for (int i = 0; i < nEle; i++) { pCol->dataOff[i] = offset; offset += varDataTLen(tptr); - tptr = POINTER_DRIFT(tptr, varDataTLen(tptr)); + tptr = POINTER_SHIFT(tptr, varDataTLen(tptr)); } } diff --git a/src/tsdb/inc/tsdbMain.h b/src/tsdb/inc/tsdbMain.h index e056a10bba..a681c865c9 100644 --- a/src/tsdb/inc/tsdbMain.h +++ b/src/tsdb/inc/tsdbMain.h @@ -21,6 +21,7 @@ #include "tskiplist.h" #include "tutil.h" #include "tlog.h" +#include "tcoding.h" #ifdef __cplusplus extern "C" { diff --git a/src/tsdb/src/tsdbMeta.c b/src/tsdb/src/tsdbMeta.c index ec4fb2a33f..63ccb538ed 100644 --- a/src/tsdb/src/tsdbMeta.c +++ b/src/tsdb/src/tsdbMeta.c @@ -535,5 +535,5 @@ static int tsdbEstimateTableEncodeSize(STable *pTable) { char *getTupleKey(const void * data) { SDataRow row = (SDataRow)data; - return POINTER_DRIFT(row, TD_DATA_ROW_HEAD_SIZE); + return POINTER_SHIFT(row, TD_DATA_ROW_HEAD_SIZE); } \ No newline at end of file diff --git a/src/util/inc/tcoding.h b/src/util/inc/tcoding.h index f3e7a52942..e74222cb9b 100644 --- a/src/util/inc/tcoding.h +++ b/src/util/inc/tcoding.h @@ -24,96 +24,145 @@ extern "C" { #include "tutil.h" -const int TNUMBER = 1; -#define IS_LITTLE_ENDIAN() (*(char *)(&TNUMBER) != 0) +const int32_t TNUMBER = 1; +const uint8_t ENCODE_LIMIT = (1 << 7); +#define IS_LITTLE_ENDIAN() (*(uint8_t *)(&TNUMBER) != 0) static FORCE_INLINE void *taosEncodeFixed16(void *buf, uint16_t value) { if (IS_LITTLE_ENDIAN()) { memcpy(buf, &value, sizeof(value)); } else { - ((char *)buf)[0] = value & 0xff; - ((char *)buf)[1] = (value >> 8) & 0xff; + ((uint8_t *)buf)[0] = value & 0xff; + ((uint8_t *)buf)[1] = (value >> 8) & 0xff; } - return POINTER_DRIFT(buf, sizeof(value)); + return POINTER_SHIFT(buf, sizeof(value)); } static FORCE_INLINE void *taosEncodeFixed32(void *buf, uint32_t value) { if (IS_LITTLE_ENDIAN()) { memcpy(buf, &value, sizeof(value)); } else { - ((char *)buf)[0] = value & 0xff; - ((char *)buf)[1] = (value >> 8) & 0xff; - ((char *)buf)[2] = (value >> 16) & 0xff; - ((char *)buf)[3] = (value >> 24) & 0xff; + ((uint8_t *)buf)[0] = value & 0xff; + ((uint8_t *)buf)[1] = (value >> 8) & 0xff; + ((uint8_t *)buf)[2] = (value >> 16) & 0xff; + ((uint8_t *)buf)[3] = (value >> 24) & 0xff; } - return POINTER_DRIFT(buf, sizeof(value)); + return POINTER_SHIFT(buf, sizeof(value)); } static FORCE_INLINE void *taosEncodeFixed64(void *buf, uint64_t value) { if (IS_LITTLE_ENDIAN()) { memcpy(buf, &value, sizeof(value)); } else { - ((char *)buf)[0] = value & 0xff; - ((char *)buf)[1] = (value >> 8) & 0xff; - ((char *)buf)[2] = (value >> 16) & 0xff; - ((char *)buf)[3] = (value >> 24) & 0xff; - ((char *)buf)[4] = (value >> 32) & 0xff; - ((char *)buf)[5] = (value >> 40) & 0xff; - ((char *)buf)[6] = (value >> 48) & 0xff; - ((char *)buf)[7] = (value >> 56) & 0xff; + ((uint8_t *)buf)[0] = value & 0xff; + ((uint8_t *)buf)[1] = (value >> 8) & 0xff; + ((uint8_t *)buf)[2] = (value >> 16) & 0xff; + ((uint8_t *)buf)[3] = (value >> 24) & 0xff; + ((uint8_t *)buf)[4] = (value >> 32) & 0xff; + ((uint8_t *)buf)[5] = (value >> 40) & 0xff; + ((uint8_t *)buf)[6] = (value >> 48) & 0xff; + ((uint8_t *)buf)[7] = (value >> 56) & 0xff; } - return POINTER_DRIFT(buf, sizeof(value)); + return POINTER_SHIFT(buf, sizeof(value)); } static FORCE_INLINE void *taosDecodeFixed16(void *buf, uint16_t *value) { if (IS_LITTLE_ENDIAN()) { memcpy(value, buf, sizeof(*value)); } else { - ((char *)value)[1] = ((char *)buf)[0]; - ((char *)value)[0] = ((char *)buf)[1]; + ((uint8_t *)value)[1] = ((uint8_t *)buf)[0]; + ((uint8_t *)value)[0] = ((uint8_t *)buf)[1]; } - return POINTER_DRIFT(buf, sizeof(*value)); + return POINTER_SHIFT(buf, sizeof(*value)); } static FORCE_INLINE void *taosDecodeFixed32(void *buf, uint32_t *value) { if (IS_LITTLE_ENDIAN()) { memcpy(value, buf, sizeof(*value)); } else { - ((char *)value)[3] = ((char *)buf)[0]; - ((char *)value)[2] = ((char *)buf)[1]; - ((char *)value)[1] = ((char *)buf)[2]; - ((char *)value)[0] = ((char *)buf)[3]; + ((uint8_t *)value)[3] = ((uint8_t *)buf)[0]; + ((uint8_t *)value)[2] = ((uint8_t *)buf)[1]; + ((uint8_t *)value)[1] = ((uint8_t *)buf)[2]; + ((uint8_t *)value)[0] = ((uint8_t *)buf)[3]; } - return POINTER_DRIFT(buf, sizeof(*value)); + return POINTER_SHIFT(buf, sizeof(*value)); } static FORCE_INLINE void *taosDecodeFixed64(void *buf, uint64_t *value) { if (IS_LITTLE_ENDIAN()) { memcpy(value, buf, sizeof(*value)); } else { - ((char *)value)[7] = ((char *)buf)[0]; - ((char *)value)[6] = ((char *)buf)[1]; - ((char *)value)[5] = ((char *)buf)[2]; - ((char *)value)[4] = ((char *)buf)[3]; - ((char *)value)[3] = ((char *)buf)[4]; - ((char *)value)[2] = ((char *)buf)[5]; - ((char *)value)[1] = ((char *)buf)[6]; - ((char *)value)[0] = ((char *)buf)[7]; + ((uint8_t *)value)[7] = ((uint8_t *)buf)[0]; + ((uint8_t *)value)[6] = ((uint8_t *)buf)[1]; + ((uint8_t *)value)[5] = ((uint8_t *)buf)[2]; + ((uint8_t *)value)[4] = ((uint8_t *)buf)[3]; + ((uint8_t *)value)[3] = ((uint8_t *)buf)[4]; + ((uint8_t *)value)[2] = ((uint8_t *)buf)[5]; + ((uint8_t *)value)[1] = ((uint8_t *)buf)[6]; + ((uint8_t *)value)[0] = ((uint8_t *)buf)[7]; } - return POINTER_DRIFT(buf, sizeof(*value)); + return POINTER_SHIFT(buf, sizeof(*value)); +} + +static FORCE_INLINE void *taosEncodeVariant16(void *buf, uint16_t value) { + int i = 0; + while (value >= ENCODE_LIMIT) { + ((uint8_t *)buf)[i] = (value | ENCODE_LIMIT); + value >>= 7; + i++; + ASSERT(i < 3); + } + + ((uint8_t *)buf)[i] = value; + + return POINTER_SHIFT(buf, i+1); +} + +static FORCE_INLINE void *taosEncodeVariant32(void *buf, uint32_t value) { + int i = 0; + while (value >= ENCODE_LIMIT) { + ((uint8_t *)buf)[i] = (value | ENCODE_LIMIT); + value >>= 7; + i++; + ASSERT(i < 5); + } + + ((uint8_t *)buf)[i] = value; + + return POINTER_SHIFT(buf, i + 1); +} + +static FORCE_INLINE void *taosEncodeVariant64(void *buf, uint64_t value) { + int i = 0; + while (value >= ENCODE_LIMIT) { + ((uint8_t *)buf)[i] = (value | ENCODE_LIMIT); + value >>= 7; + i++; + ASSERT(i < 10); + } + + ((uint8_t *)buf)[i] = value; + + return POINTER_SHIFT(buf, i + 1); +} + +static FORCE_INLINE void *taosDecodeVariant16(void *buf, uint16_t *value) { + int i = 0; + *value = 0; + while (i < 3 && ) { + (*value) |= (((uint8_t *)buf)[i] << (7 * i)); + i++; + } + + return NULL; // error happened } -// TODO -static FORCE_INLINE void *taosEncodeVariant16(void *buf, uint16_t value) {} -static FORCE_INLINE void *taosEncodeVariant32(void *buf, uint32_t value) {} -static FORCE_INLINE void *taosEncodeVariant64(void *buf, uint64_t value) {} -static FORCE_INLINE void *taosDecodeVariant16(void *buf, uint16_t *value) {} static FORCE_INLINE void *taosDecodeVariant32(void *buf, uint32_t *value) {} static FORCE_INLINE void *taosDecodeVariant64(void *buf, uint64_t *value) {} diff --git a/src/util/inc/tutil.h b/src/util/inc/tutil.h index b03e0a1c5b..9528904882 100644 --- a/src/util/inc/tutil.h +++ b/src/util/inc/tutil.h @@ -45,7 +45,7 @@ extern "C" { #define tclose(x) taosCloseSocket(x) // Pointer p drift right by b bytes -#define POINTER_DRIFT(p, b) ((void *)((char *)(p) + (b))) +#define POINTER_SHIFT(p, b) ((void *)((char *)(p) + (b))) #ifndef NDEBUG #define ASSERT(x) assert(x) From 63a256a444d57f0b6b6db1eafce932ce320508cb Mon Sep 17 00:00:00 2001 From: hjxilinx Date: Thu, 7 May 2020 10:21:53 +0800 Subject: [PATCH 18/31] [td-225] fix creating existed db tsdb does not response with error message --- src/query/src/qparserImpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/query/src/qparserImpl.c b/src/query/src/qparserImpl.c index d8e48de918..90ae62a361 100644 --- a/src/query/src/qparserImpl.c +++ b/src/query/src/qparserImpl.c @@ -818,7 +818,7 @@ void setCreateDBSQL(SSqlInfo *pInfo, int32_t type, SSQLToken *pToken, SCreateDBI pInfo->pDCLInfo->dbOpt = *pDB; pInfo->pDCLInfo->dbOpt.dbname = *pToken; - pInfo->pDCLInfo->dbOpt.ignoreExists = (pIgExists != NULL); + pInfo->pDCLInfo->dbOpt.ignoreExists = (pIgExists->z != NULL); } void setCreateAcctSQL(SSqlInfo *pInfo, int32_t type, SSQLToken *pName, SSQLToken *pPwd, SCreateAcctSQL *pAcctInfo) { From cdb233217f3d13d903af7f4b031c066ae2efc03b Mon Sep 17 00:00:00 2001 From: hjxilinx Date: Thu, 7 May 2020 10:24:37 +0800 Subject: [PATCH 19/31] [td-225] fix script error --- tests/script/general/parser/columnValue.sim | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/script/general/parser/columnValue.sim b/tests/script/general/parser/columnValue.sim index ead480cad8..22724d50e8 100644 --- a/tests/script/general/parser/columnValue.sim +++ b/tests/script/general/parser/columnValue.sim @@ -15,13 +15,13 @@ sql drop database if exists db sql create database db sql use db -run lite/parser/columnValue_bool.sim -run lite/parser/columnValue_tinyint.sim -run lite/parser/columnValue_smallint.sim -run lite/parser/columnValue_int.sim -run lite/parser/columnValue_bigint.sim -run lite/parser/columnValue_float.sim -run lite/parser/columnValue_double.sim +run general/parser/columnValue_bool.sim +run general/parser/columnValue_tinyint.sim +run general/parser/columnValue_smallint.sim +run general/parser/columnValue_int.sim +run general/parser/columnValue_bigint.sim +run general/parser/columnValue_float.sim +run general/parser/columnValue_double.sim From 5f132980e81b19ffb4c48049f000dc5dc87c01af Mon Sep 17 00:00:00 2001 From: slguan Date: Thu, 7 May 2020 10:46:42 +0800 Subject: [PATCH 20/31] if sched is not ready, will cause a deadlock --- src/mnode/src/mgmtDServer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mnode/src/mgmtDServer.c b/src/mnode/src/mgmtDServer.c index 726554e490..1e820be0e9 100644 --- a/src/mnode/src/mgmtDServer.c +++ b/src/mnode/src/mgmtDServer.c @@ -52,14 +52,14 @@ int32_t mgmtInitDServer() { rpcInit.idleTime = tsShellActivityTimer * 1000; rpcInit.afp = mgmtDServerRetrieveAuth; + tsMgmtDServerQhandle = taosInitScheduler(tsMaxShellConns, 1, "MS"); + tsMgmtDServerRpc = rpcOpen(&rpcInit); if (tsMgmtDServerRpc == NULL) { mError("failed to init server connection to dnode"); return -1; } - tsMgmtDServerQhandle = taosInitScheduler(tsMaxShellConns, 1, "MS"); - mPrint("server connection to dnode is opened"); return 0; } From 32d2570c80d5e44f3e8f372b7c178c628573162f Mon Sep 17 00:00:00 2001 From: liu0x54 Date: Thu, 7 May 2020 05:07:16 +0000 Subject: [PATCH 21/31] [TD-228] fix python connector to support binary interface change --- src/connector/python/linux/python3/taos/cinterface.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/connector/python/linux/python3/taos/cinterface.py b/src/connector/python/linux/python3/taos/cinterface.py index 77001609b6..6ef54f1ba5 100644 --- a/src/connector/python/linux/python3/taos/cinterface.py +++ b/src/connector/python/linux/python3/taos/cinterface.py @@ -146,6 +146,7 @@ class CTaosInterface(object): libtaos.taos_errstr.restype = ctypes.c_char_p libtaos.taos_subscribe.restype = ctypes.c_void_p libtaos.taos_consume.restype = ctypes.c_void_p + libtaos.taos_fetch_lengths.restype = ctypes.c_void_p def __init__(self, config=None): ''' @@ -314,6 +315,8 @@ class CTaosInterface(object): isMicro = (CTaosInterface.libtaos.taos_result_precision(result) == FieldType.C_TIMESTAMP_MICRO) blocks = [None] * len(fields) + fieldL = CTaosInterface.libtaos.taos_fetch_lengths(result) + fieldLen = [ele for ele in ctypes.cast(fieldL, ctypes.POINTER(ctypes.c_int))[:len(fields)]] for i in range(len(fields)): data = ctypes.cast(pblock, ctypes.POINTER(ctypes.c_void_p))[i] if data == None: @@ -323,7 +326,7 @@ class CTaosInterface(object): if fields[i]['type'] not in _CONVERT_FUNC: raise DatabaseError("Invalid data type returned from database") - blocks[i] = _CONVERT_FUNC[fields[i]['type']](data, num_of_rows, fields[i]['bytes'], isMicro) + blocks[i] = _CONVERT_FUNC[fields[i]['type']](data, num_of_rows, fieldLen[i], isMicro) return blocks, abs(num_of_rows) From 03f2ca28442f31a97321e02dac09fa7f0dd3923f Mon Sep 17 00:00:00 2001 From: hzcheng Date: Thu, 7 May 2020 05:45:05 +0000 Subject: [PATCH 22/31] add encoding functions --- src/common/inc/tdataformat.h | 2 +- src/util/inc/tcoding.h | 57 +++++++++++++--- src/util/tests/codingTests.cpp | 116 +++++++++++++++++++++++++++++++++ 3 files changed, 166 insertions(+), 9 deletions(-) create mode 100644 src/util/tests/codingTests.cpp diff --git a/src/common/inc/tdataformat.h b/src/common/inc/tdataformat.h index ba37db519e..794d45da6f 100644 --- a/src/common/inc/tdataformat.h +++ b/src/common/inc/tdataformat.h @@ -97,7 +97,7 @@ typedef void *SDataRow; #define TD_DATA_ROW_HEAD_SIZE sizeof(int32_t) #define dataRowLen(r) (*(int32_t *)(r)) -#define dataRowTuple(r) POINTER_DRIFT(r, TD_DATA_ROW_HEAD_SIZE) +#define dataRowTuple(r) POINTER_SHIFT(r, TD_DATA_ROW_HEAD_SIZE) #define dataRowKey(r) (*(TSKEY *)(dataRowTuple(r))) #define dataRowSetLen(r, l) (dataRowLen(r) = (l)) #define dataRowCpy(dst, r) memcpy((dst), (r), dataRowLen(r)) diff --git a/src/util/inc/tcoding.h b/src/util/inc/tcoding.h index e74222cb9b..9f64f127e1 100644 --- a/src/util/inc/tcoding.h +++ b/src/util/inc/tcoding.h @@ -24,8 +24,9 @@ extern "C" { #include "tutil.h" -const int32_t TNUMBER = 1; -const uint8_t ENCODE_LIMIT = (1 << 7); +// TODO: move this to a platform file +#define ENCODE_LIMIT (((uint8_t)1) << 7) +static const int32_t TNUMBER = 1; #define IS_LITTLE_ENDIAN() (*(uint8_t *)(&TNUMBER) != 0) static FORCE_INLINE void *taosEncodeFixed16(void *buf, uint16_t value) { @@ -154,17 +155,57 @@ static FORCE_INLINE void *taosEncodeVariant64(void *buf, uint64_t value) { static FORCE_INLINE void *taosDecodeVariant16(void *buf, uint16_t *value) { int i = 0; + uint16_t tval = 0; *value = 0; - while (i < 3 && ) { - (*value) |= (((uint8_t *)buf)[i] << (7 * i)); - i++; + while (i < 3) { + tval = (uint16_t)(((uint8_t *)buf)[i]); + if (tval < ENCODE_LIMIT) { + (*value) |= (tval << (7 * i)); + return POINTER_SHIFT(buf, i + 1); + } else { + (*value) |= ((tval & (ENCODE_LIMIT - 1)) << (7 * i)); + i++; + } } - return NULL; // error happened + return NULL; // error happened } -static FORCE_INLINE void *taosDecodeVariant32(void *buf, uint32_t *value) {} -static FORCE_INLINE void *taosDecodeVariant64(void *buf, uint64_t *value) {} +static FORCE_INLINE void *taosDecodeVariant32(void *buf, uint32_t *value) { + int i = 0; + uint32_t tval = 0; + *value = 0; + while (i < 5) { + tval = (uint32_t)(((uint8_t *)buf)[i]); + if (tval < ENCODE_LIMIT) { + (*value) |= (tval << (7 * i)); + return POINTER_SHIFT(buf, i + 1); + } else { + (*value) |= ((tval & (ENCODE_LIMIT - 1)) << (7 * i)); + i++; + } + } + + return NULL; // error happened +} + +static FORCE_INLINE void *taosDecodeVariant64(void *buf, uint64_t *value) { + int i = 0; + uint64_t tval = 0; + *value = 0; + while (i < 10) { + tval = (uint64_t)(((uint8_t *)buf)[i]); + if (tval < ENCODE_LIMIT) { + (*value) |= (tval << (7 * i)); + return POINTER_SHIFT(buf, i + 1); + } else { + (*value) |= ((tval & (ENCODE_LIMIT - 1)) << (7 * i)); + i++; + } + } + + return NULL; // error happened +} #ifdef __cplusplus } diff --git a/src/util/tests/codingTests.cpp b/src/util/tests/codingTests.cpp new file mode 100644 index 0000000000..a72c7ef291 --- /dev/null +++ b/src/util/tests/codingTests.cpp @@ -0,0 +1,116 @@ +#include +#include +#include +#include + +#include "tcoding.h" + +static bool test_fixed_uint16(uint16_t value) { + char buf[20] = "\0"; + uint16_t value_check = 0; + + void *ptr1 = taosEncodeFixed16(static_cast(buf), value); + void *ptr2 = taosDecodeFixed16(static_cast(buf), &value_check); + + return ((ptr2 != NULL) && (value == value_check) && (ptr1 == ptr2)); +} + +static bool test_fixed_uint32(uint32_t value) { + char buf[20] = "\0"; + uint32_t value_check = 0; + + void *ptr1 = taosEncodeFixed32(static_cast(buf), value); + void *ptr2 = taosDecodeFixed32(static_cast(buf), &value_check); + + return ((ptr2 != NULL) && (value == value_check) && (ptr1 == ptr2)); +} + +static bool test_fixed_uint64(uint64_t value) { + char buf[20] = "\0"; + uint64_t value_check = 0; + + void *ptr1 = taosEncodeFixed64(static_cast(buf), value); + void *ptr2 = taosDecodeFixed64(static_cast(buf), &value_check); + + return ((ptr2 != NULL) && (value == value_check) && (ptr1 == ptr2)); +} + +static bool test_variant_uint16(uint16_t value) { + char buf[20] = "\0"; + uint16_t value_check = 0; + + void *ptr1 = taosEncodeVariant16(static_cast(buf), value); + void *ptr2 = taosDecodeVariant16(static_cast(buf), &value_check); + + return ((ptr2 != NULL) && (value == value_check) && (ptr1 == ptr2)); +} + +static bool test_variant_uint32(uint32_t value) { + char buf[20] = "\0"; + uint32_t value_check = 0; + + void *ptr1 = taosEncodeVariant32(static_cast(buf), value); + void *ptr2 = taosDecodeVariant32(static_cast(buf), &value_check); + + return ((ptr2 != NULL) && (value == value_check) && (ptr1 == ptr2)); +} + +static bool test_variant_uint64(uint64_t value) { + char buf[20] = "\0"; + uint64_t value_check = 0; + + void *ptr1 = taosEncodeVariant64(static_cast(buf), value); + void *ptr2 = taosDecodeVariant64(static_cast(buf), &value_check); + + return ((ptr2 != NULL) && (value == value_check) && (ptr1 == ptr2)); +} + +TEST(codingTest, fixed_encode_decode) { + srand(time(0)); + + for (uint16_t value = 0; value <= UINT16_MAX; value++) { + ASSERT_TRUE(test_fixed_uint16(value)); + if (value == UINT16_MAX) break; + } + + ASSERT_TRUE(test_fixed_uint32(0)); + ASSERT_TRUE(test_fixed_uint32(UINT32_MAX)); + + for (int i = 0; i < 1000000; i++) { + ASSERT_TRUE(test_fixed_uint32(rand())); + } + + std::mt19937_64 gen (std::random_device{}()); + + ASSERT_TRUE(test_fixed_uint64(0)); + ASSERT_TRUE(test_fixed_uint64(UINT64_MAX)); + for (int i = 0; i < 1000000; i++) { + ASSERT_TRUE(test_fixed_uint64(gen())); + } +} + +TEST(codingTest, variant_encode_decode) { + srand(time(0)); + + for (uint16_t value = 0; value <= UINT16_MAX; value++) { + ASSERT_TRUE(test_variant_uint16(value)); + if (value == UINT16_MAX) break; + } + + ASSERT_TRUE(test_variant_uint32(0)); + ASSERT_TRUE(test_variant_uint32(UINT32_MAX)); + + for (int i = 0; i < 5000000; i++) { + ASSERT_TRUE(test_variant_uint32(rand())); + } + + std::mt19937_64 gen (std::random_device{}()); + + ASSERT_TRUE(test_variant_uint64(0)); + ASSERT_TRUE(test_variant_uint64(UINT64_MAX)); + for (int i = 0; i < 5000000; i++) { + uint64_t value = gen(); + // printf("%ull\n", value); + ASSERT_TRUE(test_variant_uint64(value)); + } +} \ No newline at end of file From 6d9caf0e5cf2f9c6c071f8737a4ca0c31328a61a Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 7 May 2020 13:52:16 +0800 Subject: [PATCH 23/31] add description regarding how to run and add test case. [TD-236] --- README.md | 245 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 245 insertions(+) diff --git a/README.md b/README.md index 280cf73ba0..158ae040fa 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,251 @@ TDengine provides abundant developing tools for users to develop on TDengine. Fo - [RESTful API](https://www.taosdata.com/en/documentation/connector/#RESTful-Connector) - [Node.js](https://www.taosdata.com/en/documentation/connector/#Node.js-Connector) +# How to run the test cases and how to add a new test case? + +### Prepare development environment + +1. sudo apt install + build-essential cmake net-tools python-pip python-setuptools python3-pip + python3-setuptools valgrind + +2. git clone ; cd TDengine + +3. mkdir debug; cd debug; cmake ..; make ; sudo make install + +4. pip install src/connector/python/linux/python2 ; pip3 install + src/connector/python/linux/python3 + +### How to run TSIM test suite + +1. cd \/tests/script + +2. sudo ./test.sh + +### How to run Python test suite + +1. cd \/tests/pytest + +2. ./smoketest.sh \# for smoke test + +3. ./smoketest.sh -g \# for memory leak detection test with valgrind + +4. ./fulltest.sh \# for full test + +> Note1: TDengine daemon's configuration and data files are stored in +> \/sim directory. As a historical design, it's same place with +> TSIM script. So after the TSIM script ran with sudo privilege, the directory +> has been used by TSIM then the python script cannot write it by a normal +> user. You need to remove the directory completely first before running the +> Python test case. We should consider using two different locations to store +> for TSIM and Python script. + +> Note2: if you need to debug crash problem with a core dump, you need +> manually edit smoketest.sh or fulltest.sh to add "ulimit -c unlimited" +> before the script line. Then you can look for the core file in +> \/tests/pytest after the program crash. + +### How to add a new test case + +**1. add a new TSIM test cases:** + +TSIM test cases are now included in the new development branch and can be +added to the TDengine/tests/script/test.sh script based on the manual test +methods necessary to add test cases as described above. + +**2. add a new Python test cases:** + +**2.1 Please refer to \/tests/pytest/insert/basic.py to add a new +test case.** The new test case must implement 3 functions, where self.init() +and self.stop() simply copy the contents of insert/basic.py and the test +logic is implemented in self.run(). You can refer to the code in the util +directory for more information. + +**2.2 Edit smoketest.sh to add the path and filename of the new test case** + +Note: The Python test framework may continue to be improved in the future, +hopefully, to provide more functionality and ease of writing test cases. The +method of writing the test case above does not exclude that it will also be +affected. + +**2.3 What test.py does in detail:** + +test.py is the entry program for test case execution and monitoring. + +test.py has the following functions. + +\-f --file, Specifies the test case file name to be executed +-p --path, Specifies deployment path + +\-m --master, Specifies the master server IP for cluster deployment +-c--cluster, test cluster function +-s--stop, terminates all running nodes + +\-g--valgrind, load valgrind for memory leak detection test + +\-h--help, display help + +**2.4 What util/log.py does in detail:** + +log.py is quite simple, the main thing is that you can print the output in +different colors as needed. The success() should be called for successful +test case execution and the success() will print green text. The exit() will +print red text and exit the program, exit() should be called for test +failure. + +**util/log.py** + +... + +    def info(self, info): + +        printf("%s %s" % (datetime.datetime.now(), info)) + +  + +    def sleep(self, sec): + +        printf("%s sleep %d seconds" % (datetime.datetime.now(), sec)) + +        time.sleep(sec) + +  + +    def debug(self, err): + +        printf("\\033[1;36m%s %s\\033[0m" % (datetime.datetime.now(), err)) + +  + +    def success(self, info): + +        printf("\\033[1;32m%s %s\\033[0m" % (datetime.datetime.now(), info)) + +  + +    def notice(self, err): + +        printf("\\033[1;33m%s %s\\033[0m" % (datetime.datetime.now(), err)) + +  + +    def exit(self, err): + +        printf("\\033[1;31m%s %s\\033[0m" % (datetime.datetime.now(), err)) + +        sys.exit(1) + +  + +    def printNoPrefix(self, info): + +        printf("\\033[1;36m%s\\033[0m" % (info) + +... + +**2.5 What util/sql.py does in detail:** + +SQL.py is mainly used to execute SQL statements to manipulate the database, +and the code is extracted and commented as follows: + +**util/sql.py** + +\# prepare() is mainly used to set up the environment for testing table and +data, and to set up the database db for testing. do not call prepare() if you +need to test the database operation command. + +def prepare(self): + +tdLog.info("prepare database:db") + +self.cursor.execute('reset query cache') + +self.cursor.execute('drop database if exists db') + +self.cursor.execute('create database db') + +self.cursor.execute('use db') + +... + +\# query() is mainly used to execute select statements for normal syntax input + +def query(self, sql): + +... + +\# error() is mainly used to execute the select statement with the wrong syntax +input, the error will be caught as a reasonable behavior, if not caught it will +prove that the test failed + +def error() + +... + +\# checkRows() is used to check the number of returned lines after calling +query(select ...) after calling the query(select ...) to check the number of +rows of returned results. + +def checkRows(self, expectRows): + +... + +\# checkData() is used to check the returned result data after calling +query(select ...) after the query(select ...) is called, failure to meet +expectation is + +def checkData(self, row, col, data): + +... + +\# getData() returns the result data after calling query(select ...) to return +the resulting data after calling query(select ...) + +def getData(self, row, col): + +... + +\# execute() used to execute sql and return the number of affected rows + +def execute(self, sql): + +... + +\# executeTimes() Multiple executions of the same sql statement + +def executeTimes(self, sql, times): + +... + +\# CheckAffectedRows() Check if the number of affected rows is as expected + +def checkAffectedRows(self, expectAffectedRows): + +... + +> Note: Both Python2 and Python3 are currently supported by the Python test +> case. Since Python2 is no longer officially supported by January 1, 2020, it +> is recommended that subsequent test case development be guaranteed to run +> correctly on Python3. For Python2, please consider being compatible if +> appropriate without additional +> burden.   + +### CI Covenant submission adoption principle. + +- Every commit / PR compilation must pass. Currently, the warning is treated + as an error, so the warning must also be resolved. + +- Test cases that already exist must pass. + +- Because CI is very important to support build and automatically test + procedure, it is necessary to manually test the test case before adding it + and do as many iterations as possible to ensure that the test case provides + stable and reliable test results when added. + +> Note: In the future, according to the requirements and test development +> progress will add stress testing, performance testing, code style, +> and other features based on functional testing. + ### 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. From 8a4d27127a2898b72a29ef2c9361eb6af1205c3d Mon Sep 17 00:00:00 2001 From: chang Date: Thu, 7 May 2020 14:01:12 +0800 Subject: [PATCH 24/31] docs: fix wrong wrod "ater" to "alter" --- src/mnode/src/mgmtUser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mnode/src/mgmtUser.c b/src/mnode/src/mgmtUser.c index b4dd58cb3b..ecd3c217ca 100644 --- a/src/mnode/src/mgmtUser.c +++ b/src/mnode/src/mgmtUser.c @@ -396,7 +396,7 @@ static void mgmtProcessAlterUserMsg(SQueuedMsg *pMsg) { code = mgmtUpdateUser(pUser); mLPrint("user:%s, password is altered by %s, result:%s", pUser->user, pOperUser->user, tstrerror(code)); } else { - mError("user:%s, no rights to ater user", pOperUser->user); + mError("user:%s, no rights to alter user", pOperUser->user); code = TSDB_CODE_NO_RIGHTS; } @@ -439,13 +439,13 @@ static void mgmtProcessAlterUserMsg(SQueuedMsg *pMsg) { code = mgmtUpdateUser(pUser); mLPrint("user:%s, privilege is altered by %s, result:%s", pUser->user, pOperUser->user, tstrerror(code)); } else { - mError("user:%s, no rights to ater user", pOperUser->user); + mError("user:%s, no rights to alter user", pOperUser->user); code = TSDB_CODE_NO_RIGHTS; } mgmtSendSimpleResp(pMsg->thandle, code); } else { - mError("user:%s, no rights to ater user", pOperUser->user); + mError("user:%s, no rights to alter user", pOperUser->user); mgmtSendSimpleResp(pMsg->thandle, TSDB_CODE_NO_RIGHTS); } From 31029ee27fe130c16754cecdebbcb7b90dc6fc1e Mon Sep 17 00:00:00 2001 From: hjxilinx Date: Thu, 7 May 2020 14:28:39 +0800 Subject: [PATCH 25/31] [td-183] --- packaging/cfg/taos.cfg | 70 +- src/client/src/tscSQLParser.c | 22 +- src/client/src/tscServer.c | 6 +- src/client/src/tscSystem.c | 2 +- src/common/inc/tglobal.h | 11 +- src/common/src/tglobal.c | 49 +- src/dnode/src/dnodeWrite.c | 2 +- src/inc/taosdef.h | 6 +- src/inc/taosmsg.h | 8 +- src/inc/ttokendef.h | 239 +- src/inc/twal.h | 2 +- src/kit/shell/src/shellEngine.c | 6 +- src/mnode/inc/mgmtDef.h | 2 +- src/mnode/src/mgmtDb.c | 43 +- src/mnode/src/mgmtSdb.c | 2 +- src/mnode/src/mgmtVgroup.c | 2 +- src/query/inc/qsqlparser.h | 10 +- src/query/inc/sql.y | 27 +- src/query/src/qparserImpl.c | 10 +- src/query/src/qtokenizer.c | 9 +- src/query/src/sql.c | 2192 +++++++++-------- src/vnode/src/vnodeMain.c | 12 +- src/wal/src/walMain.c | 2 +- src/wal/test/waltest.c | 2 +- tests/examples/c/demo.c | 5 +- tests/pytest/insert/date.py | 2 +- tests/pytest/table/column_name.py | 2 +- tests/pytest/table/column_num.py | 2 +- tests/script/general/agg/fill.sim | 2 +- tests/script/general/alter/metrics.sim | 2 +- tests/script/general/alter/table.sim | 2 +- tests/script/general/cache/cache_balance.sim | 4 +- tests/script/general/cache/new_metrics.sim | 2 +- tests/script/general/cache/new_stream.sim | 2 +- .../script/general/cache/restart_metrics.sim | 4 +- tests/script/general/cache/restart_stream.sim | 4 +- tests/script/general/cache/restart_table.sim | 4 +- tests/script/general/column/commit.sim | 2 +- tests/script/general/column/metrics.sim | 2 +- tests/script/general/column/table.sim | 2 +- tests/script/general/compress/commitlog.sim | 2 +- tests/script/general/compress/compress.sim | 2 +- tests/script/general/compress/compress2.sim | 2 +- tests/script/general/compress/uncompress.sim | 2 +- tests/script/general/compute/avg.sim | 2 +- tests/script/general/compute/bottom.sim | 2 +- tests/script/general/compute/count.sim | 2 +- tests/script/general/compute/diff.sim | 2 +- tests/script/general/compute/diff2.sim | 2 +- tests/script/general/compute/first.sim | 2 +- tests/script/general/compute/interval.sim | 2 +- tests/script/general/compute/last.sim | 2 +- tests/script/general/compute/leastsquare.sim | 2 +- tests/script/general/compute/max.sim | 2 +- tests/script/general/compute/min.sim | 2 +- tests/script/general/compute/null.sim | 2 +- tests/script/general/compute/percentile.sim | 2 +- tests/script/general/compute/stddev.sim | 2 +- tests/script/general/compute/sum.sim | 2 +- tests/script/general/compute/top.sim | 2 +- tests/script/general/db/backup/keep.sim | 6 +- tests/script/general/db/delete_reuse1.sim | 8 +- tests/script/general/db/delete_reuse2.sim | 8 +- tests/script/general/db/delete_writing1.sim | 8 +- tests/script/general/db/len.sim | 2 +- tests/script/general/db/tables.sim | 2 +- tests/script/general/field/2.sim | 2 +- tests/script/general/field/3.sim | 2 +- tests/script/general/field/4.sim | 2 +- tests/script/general/field/5.sim | 2 +- tests/script/general/field/6.sim | 2 +- tests/script/general/field/bigint.sim | 2 +- tests/script/general/field/binary.sim | 2 +- tests/script/general/field/bool.sim | 2 +- tests/script/general/field/double.sim | 2 +- tests/script/general/field/float.sim | 2 +- tests/script/general/field/int.sim | 2 +- tests/script/general/field/single.sim | 2 +- tests/script/general/field/smallint.sim | 2 +- tests/script/general/field/tinyint.sim | 2 +- tests/script/general/http/grafana.sim | 2 +- tests/script/general/http/grafana_bug.sim | 2 +- tests/script/general/http/prepare.sim | 2 +- tests/script/general/http/restful_insert.sim | 2 +- tests/script/general/http/restful_limit.sim | 2 +- tests/script/general/http/telegraf.sim | 2 +- tests/script/general/insert/basic.sim | 2 +- tests/script/general/insert/insert_drop.sim | 2 +- .../general/insert/query_block1_file.sim | 2 +- .../general/insert/query_block1_memory.sim | 2 +- .../general/insert/query_block2_file.sim | 2 +- .../general/insert/query_block2_memory.sim | 2 +- .../general/insert/query_file_memory.sim | 2 +- .../general/insert/query_multi_file.sim | 2 +- tests/script/general/insert/tcp.sim | 2 +- tests/script/general/metrics/disk.sim | 2 +- tests/script/general/metrics/metrics.sim | 2 +- tests/script/general/metrics/values.sim | 2 +- tests/script/general/metrics/vnode3.sim | 2 +- tests/script/general/parser/alter.sim | 2 +- tests/script/general/parser/alter1.sim | 2 +- tests/script/general/parser/alter_stable.sim | 2 +- .../script/general/parser/auto_create_tb.sim | 2 +- .../general/parser/auto_create_tb_drop_tb.sim | 2 +- .../general/parser/binary_escapeCharacter.sim | 2 +- tests/script/general/parser/bug.sim | 2 +- .../parser/col_arithmetic_operation.sim | 2 +- tests/script/general/parser/columnValue.sim | 2 +- .../general/parser/columnValue_bool.sim | 104 +- tests/script/general/parser/commit.sim | 2 +- tests/script/general/parser/create_db.sim | 2 +- tests/script/general/parser/create_mt.sim | 2 +- tests/script/general/parser/create_tb.sim | 2 +- .../general/parser/dbtbnameValidate.sim | 2 +- tests/script/general/parser/fill.sim | 2 +- tests/script/general/parser/fill_stb.sim | 2 +- tests/script/general/parser/first_last.sim | 2 +- tests/script/general/parser/groupby.sim | 2 +- tests/script/general/parser/import.sim | 2 +- .../script/general/parser/import_commit1.sim | 2 +- .../script/general/parser/import_commit2.sim | 2 +- .../script/general/parser/import_commit3.sim | 2 +- tests/script/general/parser/import_file.sim | 2 +- .../script/general/parser/insert_multiTbl.sim | 2 +- tests/script/general/parser/insert_tb.sim | 2 +- tests/script/general/parser/interp.sim | 2 +- tests/script/general/parser/join.sim | 2 +- .../script/general/parser/join_multivnode.sim | 2 +- tests/script/general/parser/lastrow.sim | 2 +- tests/script/general/parser/limit.sim | 2 +- tests/script/general/parser/limit1.sim | 2 +- .../general/parser/limit1_tblocks100.sim | 2 +- tests/script/general/parser/limit2.sim | 2 +- .../general/parser/limit2_tblocks100.sim | 2 +- tests/script/general/parser/mixed_blocks.sim | 2 +- tests/script/general/parser/nchar.sim | 2 +- tests/script/general/parser/null_char.sim | 2 +- .../parser/projection_limit_offset.sim | 2 +- tests/script/general/parser/selectResNum.sim | 2 +- .../general/parser/select_across_vnodes.sim | 2 +- .../general/parser/select_from_cache_disk.sim | 2 +- .../general/parser/select_with_tags.sim | 2 +- tests/script/general/parser/set_tag_vals.sim | 2 +- .../general/parser/single_row_in_tb.sim | 2 +- tests/script/general/parser/slimit.sim | 2 +- tests/script/general/parser/slimit1.sim | 2 +- .../general/parser/slimit_alter_tags.sim | 2 +- tests/script/general/parser/stream.sim | 2 +- tests/script/general/parser/stream_on_sys.sim | 2 +- .../parser/tags_dynamically_specifiy.sim | 2 +- tests/script/general/parser/tags_filter.sim | 2 +- tests/script/general/parser/tbnameIn.sim | 2 +- tests/script/general/parser/testSuite.sim | 18 +- tests/script/general/parser/timestamp.sim | 2 +- tests/script/general/parser/where.sim | 2 +- tests/script/general/stream/metrics_1.sim | 2 +- tests/script/general/stream/metrics_del.sim | 2 +- tests/script/general/stream/metrics_n.sim | 2 +- .../stream/metrics_replica1_vnoden.sim | 2 +- tests/script/general/stream/stream_1.sim | 2 +- tests/script/general/stream/stream_2.sim | 2 +- tests/script/general/stream/stream_3.sim | 4 +- .../script/general/stream/stream_restart.sim | 2 +- tests/script/general/stream/table_1.sim | 2 +- tests/script/general/stream/table_del.sim | 2 +- tests/script/general/stream/table_n.sim | 2 +- .../general/stream/table_replica1_vnoden.sim | 2 +- tests/script/general/table/bigint.sim | 2 +- tests/script/general/table/binary.sim | 2 +- tests/script/general/table/bool.sim | 2 +- tests/script/general/table/column2.sim | 2 +- tests/script/general/table/column_name.sim | 2 +- tests/script/general/table/column_num.sim | 2 +- tests/script/general/table/column_value.sim | 2 +- tests/script/general/table/date.sim | 2 +- tests/script/general/table/db.table.sim | 2 +- tests/script/general/table/delete_reuse1.sim | 8 +- tests/script/general/table/delete_reuse2.sim | 8 +- tests/script/general/table/delete_writing.sim | 8 +- tests/script/general/table/describe.sim | 2 +- tests/script/general/table/double.sim | 2 +- tests/script/general/table/float.sim | 2 +- tests/script/general/table/int.sim | 2 +- tests/script/general/table/limit.sim | 2 +- tests/script/general/table/smallint.sim | 2 +- tests/script/general/table/table.sim | 2 +- tests/script/general/table/table_len.sim | 2 +- tests/script/general/table/tinyint.sim | 2 +- tests/script/general/table/vgroup.sim | 2 +- tests/script/general/tag/3.sim | 2 +- tests/script/general/tag/4.sim | 2 +- tests/script/general/tag/5.sim | 2 +- tests/script/general/tag/6.sim | 2 +- tests/script/general/tag/add.sim | 2 +- tests/script/general/tag/bigint.sim | 2 +- tests/script/general/tag/binary.sim | 2 +- tests/script/general/tag/binary_binary.sim | 2 +- tests/script/general/tag/bool.sim | 2 +- tests/script/general/tag/bool_binary.sim | 2 +- tests/script/general/tag/bool_int.sim | 2 +- tests/script/general/tag/change.sim | 2 +- tests/script/general/tag/column.sim | 2 +- tests/script/general/tag/commit.sim | 2 +- tests/script/general/tag/create.sim | 2 +- tests/script/general/tag/delete.sim | 2 +- tests/script/general/tag/double.sim | 2 +- tests/script/general/tag/float.sim | 2 +- tests/script/general/tag/int.sim | 2 +- tests/script/general/tag/int_binary.sim | 2 +- tests/script/general/tag/int_float.sim | 2 +- tests/script/general/tag/set.sim | 2 +- tests/script/general/tag/smallint.sim | 2 +- tests/script/general/tag/tinyint.sim | 2 +- tests/script/general/vector/metrics_field.sim | 2 +- tests/script/general/vector/metrics_mix.sim | 2 +- tests/script/general/vector/metrics_query.sim | 2 +- tests/script/general/vector/metrics_tag.sim | 2 +- tests/script/general/vector/metrics_time.sim | 2 +- tests/script/general/vector/multi.sim | 2 +- tests/script/general/vector/single.sim | 2 +- tests/script/general/vector/table_field.sim | 2 +- tests/script/general/vector/table_mix.sim | 2 +- tests/script/general/vector/table_query.sim | 2 +- tests/script/general/vector/table_time.sim | 2 +- tests/script/tmp/prepare.sim | 8 +- tests/script/unique/big/tcp.sim | 2 +- tests/script/unique/db/commit.sim | 6 +- .../unique/metrics/balance_replica1.sim | 4 +- tests/script/unique/metrics/dnode2.sim | 4 +- tests/script/unique/metrics/dnode2_stop.sim | 4 +- tests/script/unique/metrics/dnode3.sim | 6 +- .../script/unique/metrics/replica2_dnode4.sim | 8 +- .../script/unique/metrics/replica2_vnode3.sim | 4 +- .../script/unique/metrics/replica3_dnode6.sim | 12 +- .../script/unique/metrics/replica3_vnode3.sim | 8 +- .../script/unique/stream/metrics_balance.sim | 4 +- .../unique/stream/metrics_replica1_dnode2.sim | 4 +- .../unique/stream/metrics_replica2_dnode2.sim | 4 +- .../stream/metrics_replica2_dnode2_vnoden.sim | 4 +- .../unique/stream/metrics_replica2_dnode3.sim | 6 +- .../unique/stream/metrics_replica3_dnode4.sim | 8 +- .../unique/stream/metrics_vnode_stop.sim | 8 +- tests/script/unique/stream/table_balance.sim | 4 +- .../unique/stream/table_replica1_dnode2.sim | 4 +- .../unique/stream/table_replica2_dnode2.sim | 4 +- .../stream/table_replica2_dnode2_vnoden.sim | 4 +- .../unique/stream/table_replica2_dnode3.sim | 6 +- .../unique/stream/table_replica3_dnode4.sim | 8 +- .../script/unique/stream/table_vnode_stop.sim | 8 +- tests/script/unique/table/delete_part.sim | 8 +- tests/script/unique/vnode/backup/replica4.sim | 8 +- tests/script/unique/vnode/backup/replica5.sim | 10 +- 252 files changed, 1730 insertions(+), 1745 deletions(-) diff --git a/packaging/cfg/taos.cfg b/packaging/cfg/taos.cfg index 588f0650bd..38e960eb06 100644 --- a/packaging/cfg/taos.cfg +++ b/packaging/cfg/taos.cfg @@ -5,29 +5,16 @@ # # ######################################################## -# master IP for TDengine system -# masterIp 127.0.0.1 +# first full-qualified domain name (FQDN) for TDengine system +# first 127.0.0.1 -# second IP for TDengine system, for cluster version only -# secondIp 127.0.0.1 - -# IP address of the server -# privateIp 127.0.0.1 - -# public IP of server, on which the tdengine are deployed -# this IP is assigned by cloud service provider, for cluster version only -# publicIp 127.0.0.1 - -# network is bound to 0.0.0.0 -# anyIp 1 +# second full-qualified domain name (FQDN) for TDengine system, for cluster edition only +# second 127.0.0.1 # set socket type ("udp" and "tcp") # the server and client should have the same socket type. Otherwise, connect will fail # sockettype udp -# client local IP -# localIp 127.0.0.1 - # for the cluster version, data file's directory is configured this way # option mount_path tier_level # dataDir /mnt/disk1/taos 0 @@ -46,23 +33,8 @@ # http service port, default tcp[6020] # httpPort 6020 -# port for MNode connect to Client, default udp[6030-6034] tcp[6030] -# mgmtShellPort 6030 - -# port for DNode connect to Client, default udp[6035-6039] tcp[6035] -# vnodeShellPort 6035 - -# port for MNode connect to VNode, default udp[6040-6044] tcp[6040], for cluster version only -# mgmtVnodePort 6040 - -# port for DNode connect to DNode, default tcp[6045], for cluster version only -# vnodeVnodePort 6045 - -# port for MNode connect to MNode, default udp[6050], for cluster version only -# mgmtMgmtPort 6050 - -# port sync file MNode and MNode, default tcp[6050], for cluster version only -# mgmtSyncPort 6050 +# port for MNode connect to Client, default udp[6030-6055] tcp[6030] +# serverPort 6030 # number of threads per CPU core # numOfThreadsPerCore 1 @@ -73,20 +45,18 @@ # number of total vnodes in DNode # numOfTotalVnodes 0 -# max number of sessions per vnode -# tables 1024 +# max number of tables per vnode +# maxtablesPerVnode 1000 # cache block size # cache 16384 -# row in file block -# rows 4096 +# row of records in file block +# minRows 100 +# maxRows 4096 -# average cache blocks per meter -# ablocks 4 - -# max number of cache blocks per Meter -# tblocks 512 +# number of cache blocks per vnode +# blocks 2 # interval of system monitor # monitorInterval 60 @@ -118,11 +88,8 @@ # interval of MNode send HB to MNode, unit is Second, for cluster version only # mgmtPeerHBTimer 1 -# time to keep MeterMeta in Cache, seconds -# meterMetaKeepTimer 7200 - -# time to keep MetricMeta in Cache, seconds -# metricMetaKeepTimer 600 +# duration of to keep tableMeta kept in Cache, seconds +# tableMetaKeepTimer 7200 # max number of users # maxUsers 1000 @@ -148,8 +115,8 @@ # system time zone # timezone Asia/Shanghai (CST, +0800) -# enable/disable commit log -# clog 1 +# set write ahead log (WAL) level +# walLevel 1 # enable/disable async log # asyncLog 1 @@ -268,6 +235,9 @@ # debug flag for TDengine client # cDebugFlag 131 +# debug flag for query +# qDebugflag 131 + # debug flag for http server # httpDebugFlag 131 diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 844eb2b1dc..6e7b902111 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -4743,7 +4743,7 @@ static int32_t setKeepOption(SSqlCmd* pCmd, SCMCreateDbMsg* pMsg, SCreateDBInfo* return TSDB_CODE_SUCCESS; } -static int32_t setTimePrecisionOption(SSqlCmd* pCmd, SCMCreateDbMsg* pMsg, SCreateDBInfo* pCreateDbInfo) { +static int32_t setTimePrecision(SSqlCmd* pCmd, SCMCreateDbMsg* pMsg, SCreateDBInfo* pCreateDbInfo) { const char* msg = "invalid time precision"; pMsg->precision = TSDB_TIME_PRECISION_MILLI; // millisecond by default @@ -4768,15 +4768,15 @@ static int32_t setTimePrecisionOption(SSqlCmd* pCmd, SCMCreateDbMsg* pMsg, SCrea } static void setCreateDBOption(SCMCreateDbMsg* pMsg, SCreateDBInfo* pCreateDb) { - pMsg->maxSessions = htonl(pCreateDb->tablesPerVnode); - pMsg->cacheBlockSize = htonl(-1); - pMsg->totalBlocks = htonl(-1); + pMsg->maxTables = htonl(pCreateDb->maxTablesPerVnode); + pMsg->cacheBlockSize = htonl(pCreateDb->cacheBlockSize); + pMsg->numOfBlocks = htonl(pCreateDb->numOfBlocks); pMsg->daysPerFile = htonl(pCreateDb->daysPerFile); pMsg->commitTime = htonl(pCreateDb->commitTime); - pMsg->minRowsPerFileBlock = htonl(-1); - pMsg->maxRowsPerFileBlock = htonl(-1); + pMsg->minRowsPerFileBlock = htonl(pCreateDb->minRowsPerBlock); + pMsg->maxRowsPerFileBlock = htonl(pCreateDb->maxRowsPerBlock); pMsg->compression = pCreateDb->compressionLevel; - pMsg->commitLog = (char)pCreateDb->commitLog; + pMsg->walLevel = (char)pCreateDb->walLevel; pMsg->replications = pCreateDb->replica; pMsg->ignoreExist = pCreateDb->ignoreExists; } @@ -4789,7 +4789,7 @@ int32_t parseCreateDBOptions(SSqlCmd* pCmd, SCreateDBInfo* pCreateDbSql) { return TSDB_CODE_INVALID_SQL; } - if (setTimePrecisionOption(pCmd, pMsg, pCreateDbSql) != TSDB_CODE_SUCCESS) { + if (setTimePrecision(pCmd, pMsg, pCreateDbSql) != TSDB_CODE_SUCCESS) { return TSDB_CODE_INVALID_SQL; } @@ -5309,8 +5309,8 @@ int32_t doLocalQueryProcess(SQueryInfo* pQueryInfo, SQuerySQL* pQuerySql) { int32_t tscCheckCreateDbParams(SSqlCmd* pCmd, SCMCreateDbMsg* pCreate) { char msg[512] = {0}; - if (pCreate->commitLog != -1 && (pCreate->commitLog < TSDB_MIN_CLOG_LEVEL || pCreate->commitLog > TSDB_MAX_CLOG_LEVEL)) { - snprintf(msg, tListLen(msg), "invalid db option commitLog: %d, only 0-2 allowed", pCreate->commitLog); + if (pCreate->walLevel != -1 && (pCreate->walLevel < TSDB_MIN_WAL_LEVEL || pCreate->walLevel > TSDB_MAX_WAL_LEVEL)) { + snprintf(msg, tListLen(msg), "invalid db option walLevel: %d, only 0-2 allowed", pCreate->walLevel); return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg); } @@ -5335,7 +5335,7 @@ int32_t tscCheckCreateDbParams(SSqlCmd* pCmd, SCMCreateDbMsg* pCreate) { return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg); } - val = htonl(pCreate->maxSessions); + val = htonl(pCreate->maxTables); if (val != -1 && (val < TSDB_MIN_TABLES || val > TSDB_MAX_TABLES)) { snprintf(msg, tListLen(msg), "invalid db option maxSessions: %d valid range: [%d, %d]", val, TSDB_MIN_TABLES, TSDB_MAX_TABLES); diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 5e873945aa..47c7d3e4af 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -1907,7 +1907,7 @@ int tscProcessTableMetaRsp(SSqlObj *pSql) { assert(pTableMetaInfo->pTableMeta == NULL); pTableMetaInfo->pTableMeta = - (STableMeta *) taosCachePut(tscCacheHandle, pTableMetaInfo->name, pTableMeta, size, tsMeterMetaKeepTimer); + (STableMeta *) taosCachePut(tscCacheHandle, pTableMetaInfo->name, pTableMeta, size, tsTableMetaKeepTimer); // todo handle out of memory case if (pTableMetaInfo->pTableMeta == NULL) { @@ -2016,7 +2016,7 @@ int tscProcessMultiMeterMetaRsp(SSqlObj *pSql) { // int32_t size = (int32_t)(rsp - ((char *)pMeta)); // Consistent with STableMeta in cache // // pMeta->index = 0; - // (void)taosCachePut(tscCacheHandle, pMeta->tableId, (char *)pMeta, size, tsMeterMetaKeepTimer); + // (void)taosCachePut(tscCacheHandle, pMeta->tableId, (char *)pMeta, size, tsTableMetaKeepTimer); // } } @@ -2215,7 +2215,7 @@ int tscProcessShowRsp(SSqlObj *pSql) { size_t size = 0; STableMeta* pTableMeta = tscCreateTableMetaFromMsg(pMetaMsg, &size); - pTableMetaInfo->pTableMeta = taosCachePut(tscCacheHandle, key, (char *)pTableMeta, size, tsMeterMetaKeepTimer); + pTableMetaInfo->pTableMeta = taosCachePut(tscCacheHandle, key, (char *)pTableMeta, size, tsTableMetaKeepTimer); SSchema *pTableSchema = tscGetTableSchema(pTableMetaInfo->pTableMeta); if (pQueryInfo->colList == NULL) { diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index c0ad91cd59..89c185f199 100644 --- a/src/client/src/tscSystem.c +++ b/src/client/src/tscSystem.c @@ -165,7 +165,7 @@ void taos_init_imp() { taosTmrReset(tscCheckDiskUsage, 10, NULL, tscTmr, &tscCheckDiskUsageTmr); } - int64_t refreshTime = tsMetricMetaKeepTimer < tsMeterMetaKeepTimer ? tsMetricMetaKeepTimer : tsMeterMetaKeepTimer; + int64_t refreshTime = tsTableMetaKeepTimer; refreshTime = refreshTime > 2 ? 2 : refreshTime; refreshTime = refreshTime < 1 ? 1 : refreshTime; diff --git a/src/common/inc/tglobal.h b/src/common/inc/tglobal.h index dd0dd230fd..40c4e049d2 100644 --- a/src/common/inc/tglobal.h +++ b/src/common/inc/tglobal.h @@ -65,8 +65,7 @@ extern int32_t tsStatusInterval; extern int32_t tsShellActivityTimer; extern int32_t tsVnodePeerHBTimer; extern int32_t tsMgmtPeerHBTimer; -extern int32_t tsMeterMetaKeepTimer; -extern int32_t tsMetricMetaKeepTimer; +extern int32_t tsTableMetaKeepTimer; extern float tsNumOfThreadsPerCore; extern float tsRatioOfQueryThreads; @@ -77,8 +76,8 @@ extern int16_t tsNumOfTotalVnodes; extern uint32_t tsPublicIpInt; extern int32_t tsCacheBlockSize; -extern int32_t tsTotalBlocks; -extern int32_t tsTablesPerVnode; +extern int32_t tsBlocksPerVnode; +extern int32_t tsMaxTablePerVnode; extern int16_t tsDaysPerFile; extern int32_t tsDaysToKeep; extern int32_t tsMinRowsInFileBlock; @@ -86,7 +85,7 @@ extern int32_t tsMaxRowsInFileBlock; extern int16_t tsCommitTime; // seconds extern int32_t tsTimePrecision; extern int16_t tsCompression; -extern int16_t tsCommitLog; +extern int16_t tsWAL; extern int32_t tsReplications; extern int16_t tsAffectedRowsMod; @@ -94,7 +93,6 @@ extern int32_t tsNumOfMPeers; extern int32_t tsMaxShellConns; extern int32_t tsMaxTables; -extern char tsLocalIp[]; extern char tsDefaultDB[]; extern char tsDefaultUser[]; extern char tsDefaultPass[]; @@ -136,7 +134,6 @@ extern int32_t tsHttpEnableRecordSql; extern int32_t tsTelegrafUseFieldNum; extern int32_t tsTscEnableRecordSql; -extern int32_t tsAnyIp; extern char tsMonitorDbName[]; extern char tsInternalPass[]; diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index 70b55b9d92..b50e7b97f1 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -74,8 +74,7 @@ uint16_t tsSyncPort = 6050; int32_t tsStatusInterval = 1; // second int32_t tsShellActivityTimer = 3; // second -int32_t tsMeterMetaKeepTimer = 7200; // second -int32_t tsMetricMetaKeepTimer = 600; // second +int32_t tsTableMetaKeepTimer = 7200; // second int32_t tsRpcTimer = 300; int32_t tsRpcMaxTime = 600; // seconds; @@ -85,22 +84,22 @@ int16_t tsNumOfVnodesPerCore = 8; int16_t tsNumOfTotalVnodes = TSDB_INVALID_VNODE_NUM; #ifdef _TD_ARM_32_ -int32_t tsTablesPerVnode = 100; +int32_t tsMaxTablePerVnode = 100; #else -int32_t tsTablesPerVnode = TSDB_DEFAULT_TABLES; +int32_t tsMaxTablePerVnode = TSDB_DEFAULT_TABLES; #endif int32_t tsCacheBlockSize = TSDB_DEFAULT_CACHE_BLOCK_SIZE; -int32_t tsTotalBlocks = TSDB_DEFAULT_TOTAL_BLOCKS; -int16_t tsDaysPerFile = TSDB_DEFAULT_DAYS_PER_FILE; -int32_t tsDaysToKeep = TSDB_DEFAULT_KEEP; +int32_t tsBlocksPerVnode = TSDB_DEFAULT_TOTAL_BLOCKS; +int16_t tsDaysPerFile = TSDB_DEFAULT_DAYS_PER_FILE; +int32_t tsDaysToKeep = TSDB_DEFAULT_KEEP; int32_t tsMinRowsInFileBlock = TSDB_DEFAULT_MIN_ROW_FBLOCK; int32_t tsMaxRowsInFileBlock = TSDB_DEFAULT_MAX_ROW_FBLOCK; -int16_t tsCommitTime = TSDB_DEFAULT_COMMIT_TIME; // seconds +int16_t tsCommitTime = TSDB_DEFAULT_COMMIT_TIME; // seconds int32_t tsTimePrecision = TSDB_DEFAULT_PRECISION; -int16_t tsCompression = TSDB_DEFAULT_COMP_LEVEL; -int16_t tsCommitLog = TSDB_DEFAULT_CLOG_LEVEL; -int32_t tsReplications = TSDB_DEFAULT_REPLICA_NUM; +int16_t tsCompression = TSDB_DEFAULT_COMP_LEVEL; +int16_t tsWAL = TSDB_DEFAULT_WAL_LEVEL; +int32_t tsReplications = TSDB_DEFAULT_REPLICA_NUM; /** * Change the meaning of affected rows: @@ -506,18 +505,8 @@ static void doInitGlobalConfig() { cfg.unitType = TAOS_CFG_UTYPE_SECOND; taosInitConfigOption(cfg); - cfg.option = "meterMetaKeepTimer"; - cfg.ptr = &tsMeterMetaKeepTimer; - cfg.valType = TAOS_CFG_VTYPE_INT32; - cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_CLIENT; - cfg.minValue = 1; - cfg.maxValue = 8640000; - cfg.ptrLength = 0; - cfg.unitType = TAOS_CFG_UTYPE_SECOND; - taosInitConfigOption(cfg); - - cfg.option = "metricMetaKeepTimer"; - cfg.ptr = &tsMetricMetaKeepTimer; + cfg.option = "tableMetaKeepTimer"; + cfg.ptr = &tsTableMetaKeepTimer; cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_CLIENT; cfg.minValue = 1; @@ -587,8 +576,8 @@ static void doInitGlobalConfig() { taosInitConfigOption(cfg); // database configs - cfg.option = "tables"; - cfg.ptr = &tsTablesPerVnode; + cfg.option = "maxtablesPerVnode"; + cfg.ptr = &tsMaxTablePerVnode; cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW; cfg.minValue = TSDB_MIN_TABLES; @@ -608,7 +597,7 @@ static void doInitGlobalConfig() { taosInitConfigOption(cfg); cfg.option = "blocks"; - cfg.ptr = &tsTotalBlocks; + cfg.ptr = &tsBlocksPerVnode; cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW; cfg.minValue = TSDB_MIN_TOTAL_BLOCKS; @@ -677,12 +666,12 @@ static void doInitGlobalConfig() { cfg.unitType = TAOS_CFG_UTYPE_NONE; taosInitConfigOption(cfg); - cfg.option = "clog"; - cfg.ptr = &tsCommitLog; + cfg.option = "wallevel"; + cfg.ptr = &tsWAL; cfg.valType = TAOS_CFG_VTYPE_INT16; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW; - cfg.minValue = TSDB_MIN_CLOG_LEVEL; - cfg.maxValue = TSDB_MAX_CLOG_LEVEL; + cfg.minValue = TSDB_MIN_WAL_LEVEL; + cfg.maxValue = TSDB_MAX_WAL_LEVEL; cfg.ptrLength = 0; cfg.unitType = TAOS_CFG_UTYPE_NONE; taosInitConfigOption(cfg); diff --git a/src/dnode/src/dnodeWrite.c b/src/dnode/src/dnodeWrite.c index babbcf4ae8..39757c690f 100644 --- a/src/dnode/src/dnodeWrite.c +++ b/src/dnode/src/dnodeWrite.c @@ -228,7 +228,7 @@ static void dnodeHandleIdleWorker(SWriteWorker *pWorker) { int32_t num = taosGetQueueNumber(pWorker->qset); if (num > 0) { - usleep(30); + usleep(30000); sched_yield(); } else { taosFreeQall(pWorker->qall); diff --git a/src/inc/taosdef.h b/src/inc/taosdef.h index e60124cf0a..5523f2e0f9 100644 --- a/src/inc/taosdef.h +++ b/src/inc/taosdef.h @@ -279,9 +279,9 @@ void tsDataSwap(void *pLeft, void *pRight, int32_t type, int32_t size); #define TSDB_MAX_COMP_LEVEL 2 #define TSDB_DEFAULT_COMP_LEVEL 2 -#define TSDB_MIN_CLOG_LEVEL 0 -#define TSDB_MAX_CLOG_LEVEL 2 -#define TSDB_DEFAULT_CLOG_LEVEL 2 +#define TSDB_MIN_WAL_LEVEL 0 +#define TSDB_MAX_WAL_LEVEL 2 +#define TSDB_DEFAULT_WAL_LEVEL 2 #define TSDB_MIN_REPLICA_NUM 1 #define TSDB_MAX_REPLICA_NUM 3 diff --git a/src/inc/taosmsg.h b/src/inc/taosmsg.h index 168c88d635..c7e2121726 100644 --- a/src/inc/taosmsg.h +++ b/src/inc/taosmsg.h @@ -502,9 +502,9 @@ typedef struct { typedef struct { char acct[TSDB_USER_LEN + 1]; char db[TSDB_DB_NAME_LEN + 1]; - int32_t maxSessions; + int32_t maxTables; int32_t cacheBlockSize; //MB - int32_t totalBlocks; + int32_t numOfBlocks; int32_t daysPerFile; int32_t daysToKeep1; int32_t daysToKeep2; @@ -513,7 +513,7 @@ typedef struct { int32_t minRowsPerFileBlock; int32_t maxRowsPerFileBlock; int8_t compression; - int8_t commitLog; + int8_t walLevel; int8_t replications; uint8_t precision; // time resolution int8_t ignoreExist; @@ -592,7 +592,7 @@ typedef struct { int32_t commitTime; int8_t precision; int8_t compression; - int8_t commitLog; + int8_t walLevel; int8_t replications; int8_t wals; int8_t quorum; diff --git a/src/inc/ttokendef.h b/src/inc/ttokendef.h index 182860e67c..fa5f75f95b 100644 --- a/src/inc/ttokendef.h +++ b/src/inc/ttokendef.h @@ -13,8 +13,8 @@ * along with this program. If not, see . */ -#ifndef TDENGINE_TSQLDEF_H -#define TDENGINE_TSQLDEF_H +#ifndef TDENGINE_TTOKENDEF_H +#define TDENGINE_TTOKENDEF_H #define TK_ID 1 #define TK_BOOL 2 @@ -101,123 +101,124 @@ #define TK_CONNS 83 #define TK_STATE 84 #define TK_KEEP 85 -#define TK_CACHE 86 -#define TK_REPLICA 87 -#define TK_DAYS 88 -#define TK_ROWS 89 -#define TK_ABLOCKS 90 -#define TK_TBLOCKS 91 -#define TK_CTIME 92 -#define TK_CLOG 93 -#define TK_COMP 94 -#define TK_PRECISION 95 -#define TK_LP 96 -#define TK_RP 97 -#define TK_TAGS 98 -#define TK_USING 99 -#define TK_AS 100 -#define TK_COMMA 101 -#define TK_NULL 102 -#define TK_SELECT 103 -#define TK_UNION 104 -#define TK_ALL 105 -#define TK_FROM 106 -#define TK_VARIABLE 107 -#define TK_INTERVAL 108 -#define TK_FILL 109 -#define TK_SLIDING 110 -#define TK_ORDER 111 -#define TK_BY 112 -#define TK_ASC 113 -#define TK_DESC 114 -#define TK_GROUP 115 -#define TK_HAVING 116 -#define TK_LIMIT 117 -#define TK_OFFSET 118 -#define TK_SLIMIT 119 -#define TK_SOFFSET 120 -#define TK_WHERE 121 -#define TK_NOW 122 -#define TK_RESET 123 -#define TK_QUERY 124 -#define TK_ADD 125 -#define TK_COLUMN 126 -#define TK_TAG 127 -#define TK_CHANGE 128 -#define TK_SET 129 -#define TK_KILL 130 -#define TK_CONNECTION 131 -#define TK_COLON 132 -#define TK_STREAM 133 -#define TK_ABORT 134 -#define TK_AFTER 135 -#define TK_ATTACH 136 -#define TK_BEFORE 137 -#define TK_BEGIN 138 -#define TK_CASCADE 139 -#define TK_CLUSTER 140 -#define TK_CONFLICT 141 -#define TK_COPY 142 -#define TK_DEFERRED 143 -#define TK_DELIMITERS 144 -#define TK_DETACH 145 -#define TK_EACH 146 -#define TK_END 147 -#define TK_EXPLAIN 148 -#define TK_FAIL 149 -#define TK_FOR 150 -#define TK_IGNORE 151 -#define TK_IMMEDIATE 152 -#define TK_INITIALLY 153 -#define TK_INSTEAD 154 -#define TK_MATCH 155 -#define TK_KEY 156 -#define TK_OF 157 -#define TK_RAISE 158 -#define TK_REPLACE 159 -#define TK_RESTRICT 160 -#define TK_ROW 161 -#define TK_STATEMENT 162 -#define TK_TRIGGER 163 -#define TK_VIEW 164 -#define TK_COUNT 165 -#define TK_SUM 166 -#define TK_AVG 167 -#define TK_MIN 168 -#define TK_MAX 169 -#define TK_FIRST 170 -#define TK_LAST 171 -#define TK_TOP 172 -#define TK_BOTTOM 173 -#define TK_STDDEV 174 -#define TK_PERCENTILE 175 -#define TK_APERCENTILE 176 -#define TK_LEASTSQUARES 177 -#define TK_HISTOGRAM 178 -#define TK_DIFF 179 -#define TK_SPREAD 180 -#define TK_TWA 181 -#define TK_INTERP 182 -#define TK_LAST_ROW 183 -#define TK_RATE 184 -#define TK_IRATE 185 -#define TK_SUM_RATE 186 -#define TK_SUM_IRATE 187 -#define TK_AVG_RATE 188 -#define TK_AVG_IRATE 189 -#define TK_SEMI 190 -#define TK_NONE 191 -#define TK_PREV 192 -#define TK_LINEAR 193 -#define TK_IMPORT 194 -#define TK_METRIC 195 -#define TK_TBNAME 196 -#define TK_JOIN 197 -#define TK_METRICS 198 -#define TK_STABLE 199 -#define TK_INSERT 200 -#define TK_INTO 201 -#define TK_VALUES 202 +#define TK_MAXTABLES 86 +#define TK_CACHE 87 +#define TK_REPLICA 88 +#define TK_DAYS 89 +#define TK_MINROWS 90 +#define TK_MAXROWS 91 +#define TK_BLOCKS 92 +#define TK_CTIME 93 +#define TK_WAL 94 +#define TK_COMP 95 +#define TK_PRECISION 96 +#define TK_LP 97 +#define TK_RP 98 +#define TK_TAGS 99 +#define TK_USING 100 +#define TK_AS 101 +#define TK_COMMA 102 +#define TK_NULL 103 +#define TK_SELECT 104 +#define TK_UNION 105 +#define TK_ALL 106 +#define TK_FROM 107 +#define TK_VARIABLE 108 +#define TK_INTERVAL 109 +#define TK_FILL 110 +#define TK_SLIDING 111 +#define TK_ORDER 112 +#define TK_BY 113 +#define TK_ASC 114 +#define TK_DESC 115 +#define TK_GROUP 116 +#define TK_HAVING 117 +#define TK_LIMIT 118 +#define TK_OFFSET 119 +#define TK_SLIMIT 120 +#define TK_SOFFSET 121 +#define TK_WHERE 122 +#define TK_NOW 123 +#define TK_RESET 124 +#define TK_QUERY 125 +#define TK_ADD 126 +#define TK_COLUMN 127 +#define TK_TAG 128 +#define TK_CHANGE 129 +#define TK_SET 130 +#define TK_KILL 131 +#define TK_CONNECTION 132 +#define TK_COLON 133 +#define TK_STREAM 134 +#define TK_ABORT 135 +#define TK_AFTER 136 +#define TK_ATTACH 137 +#define TK_BEFORE 138 +#define TK_BEGIN 139 +#define TK_CASCADE 140 +#define TK_CLUSTER 141 +#define TK_CONFLICT 142 +#define TK_COPY 143 +#define TK_DEFERRED 144 +#define TK_DELIMITERS 145 +#define TK_DETACH 146 +#define TK_EACH 147 +#define TK_END 148 +#define TK_EXPLAIN 149 +#define TK_FAIL 150 +#define TK_FOR 151 +#define TK_IGNORE 152 +#define TK_IMMEDIATE 153 +#define TK_INITIALLY 154 +#define TK_INSTEAD 155 +#define TK_MATCH 156 +#define TK_KEY 157 +#define TK_OF 158 +#define TK_RAISE 159 +#define TK_REPLACE 160 +#define TK_RESTRICT 161 +#define TK_ROW 162 +#define TK_STATEMENT 163 +#define TK_TRIGGER 164 +#define TK_VIEW 165 +#define TK_COUNT 166 +#define TK_SUM 167 +#define TK_AVG 168 +#define TK_MIN 169 +#define TK_MAX 170 +#define TK_FIRST 171 +#define TK_LAST 172 +#define TK_TOP 173 +#define TK_BOTTOM 174 +#define TK_STDDEV 175 +#define TK_PERCENTILE 176 +#define TK_APERCENTILE 177 +#define TK_LEASTSQUARES 178 +#define TK_HISTOGRAM 179 +#define TK_DIFF 180 +#define TK_SPREAD 181 +#define TK_TWA 182 +#define TK_INTERP 183 +#define TK_LAST_ROW 184 +#define TK_RATE 185 +#define TK_IRATE 186 +#define TK_SUM_RATE 187 +#define TK_SUM_IRATE 188 +#define TK_AVG_RATE 189 +#define TK_AVG_IRATE 190 +#define TK_SEMI 191 +#define TK_NONE 192 +#define TK_PREV 193 +#define TK_LINEAR 194 +#define TK_IMPORT 195 +#define TK_METRIC 196 +#define TK_TBNAME 197 +#define TK_JOIN 198 +#define TK_METRICS 199 +#define TK_STABLE 200 +#define TK_INSERT 201 +#define TK_INTO 202 +#define TK_VALUES 203 #endif diff --git a/src/inc/twal.h b/src/inc/twal.h index 06dc2e881b..8c2c3c69a1 100644 --- a/src/inc/twal.h +++ b/src/inc/twal.h @@ -34,7 +34,7 @@ typedef struct { } SWalHead; typedef struct { - int8_t commitLog; // commitLog + int8_t walLevel; // wal level int8_t wals; // number of WAL files; int8_t keep; // keep the wal file when closed } SWalCfg; diff --git a/src/kit/shell/src/shellEngine.c b/src/kit/shell/src/shellEngine.c index f9ea5f4777..553dbdb1b6 100644 --- a/src/kit/shell/src/shellEngine.c +++ b/src/kit/shell/src/shellEngine.c @@ -60,12 +60,10 @@ TAOS *shellInit(struct arguments *args) { taos_init(); /* - * set tsMetricMetaKeepTimer = 3000ms - * set tsMeterMetaKeepTimer = 3000ms + * set tsTableMetaKeepTimer = 3000ms * means not save cache in shell */ - tsMetricMetaKeepTimer = 3; - tsMeterMetaKeepTimer = 3000; + tsTableMetaKeepTimer = 3000; // Connect to the database. TAOS *con = taos_connect(args->host, args->user, args->password, args->database, tsMnodeShellPort); diff --git a/src/mnode/inc/mgmtDef.h b/src/mnode/inc/mgmtDef.h index 8e5240910d..ba71f9373b 100644 --- a/src/mnode/inc/mgmtDef.h +++ b/src/mnode/inc/mgmtDef.h @@ -151,7 +151,7 @@ typedef struct { int32_t commitTime; int8_t precision; int8_t compression; - int8_t commitLog; + int8_t walLevel; int8_t replications; int8_t reserved[16]; } SDbCfg; diff --git a/src/mnode/src/mgmtDb.c b/src/mnode/src/mgmtDb.c index 9eb8b8dce1..c6506a350a 100644 --- a/src/mnode/src/mgmtDb.c +++ b/src/mnode/src/mgmtDb.c @@ -251,8 +251,8 @@ static int32_t mgmtCheckDbCfg(SDbCfg *pCfg) { return TSDB_CODE_INVALID_OPTION; } - if (pCfg->commitLog < TSDB_MIN_CLOG_LEVEL || pCfg->commitLog > TSDB_MAX_CLOG_LEVEL) { - mError("invalid db option commitLog:%d, only 0-2 allowed", pCfg->commitLog); + if (pCfg->walLevel < TSDB_MIN_WAL_LEVEL || pCfg->walLevel > TSDB_MAX_WAL_LEVEL) { + mError("invalid db option walLevel:%d, only 0-2 allowed", pCfg->walLevel); return TSDB_CODE_INVALID_OPTION; } @@ -274,8 +274,8 @@ static int32_t mgmtCheckDbCfg(SDbCfg *pCfg) { static void mgmtSetDefaultDbCfg(SDbCfg *pCfg) { if (pCfg->cacheBlockSize < 0) pCfg->cacheBlockSize = tsCacheBlockSize; - if (pCfg->totalBlocks < 0) pCfg->totalBlocks = tsTotalBlocks; - if (pCfg->maxTables < 0) pCfg->maxTables = tsTablesPerVnode; + if (pCfg->totalBlocks < 0) pCfg->totalBlocks = tsBlocksPerVnode; + if (pCfg->maxTables < 0) pCfg->maxTables = tsMaxTablePerVnode; if (pCfg->daysPerFile < 0) pCfg->daysPerFile = tsDaysPerFile; if (pCfg->daysToKeep < 0) pCfg->daysToKeep = tsDaysToKeep; if (pCfg->daysToKeep1 < 0) pCfg->daysToKeep1 = pCfg->daysToKeep; @@ -285,7 +285,7 @@ static void mgmtSetDefaultDbCfg(SDbCfg *pCfg) { if (pCfg->commitTime < 0) pCfg->commitTime = tsCommitTime; if (pCfg->precision < 0) pCfg->precision = tsTimePrecision; if (pCfg->compression < 0) pCfg->compression = tsCompression; - if (pCfg->commitLog < 0) pCfg->commitLog = tsCommitLog; + if (pCfg->walLevel < 0) pCfg->walLevel = tsWAL; if (pCfg->replications < 0) pCfg->replications = tsReplications; } @@ -312,8 +312,8 @@ static int32_t mgmtCreateDb(SAcctObj *pAcct, SCMCreateDbMsg *pCreate) { pDb->createdTime = taosGetTimestampMs(); pDb->cfg = (SDbCfg) { .cacheBlockSize = pCreate->cacheBlockSize, - .totalBlocks = pCreate->totalBlocks, - .maxTables = pCreate->maxSessions, + .totalBlocks = pCreate->numOfBlocks, + .maxTables = pCreate->maxTables, .daysPerFile = pCreate->daysPerFile, .daysToKeep = pCreate->daysToKeep, .daysToKeep1 = pCreate->daysToKeep1, @@ -323,7 +323,7 @@ static int32_t mgmtCreateDb(SAcctObj *pAcct, SCMCreateDbMsg *pCreate) { .commitTime = pCreate->commitTime, .precision = pCreate->precision, .compression = pCreate->compression, - .commitLog = pCreate->commitLog, + .walLevel = pCreate->walLevel, .replications = pCreate->replications }; @@ -491,7 +491,7 @@ static int32_t mgmtGetDbMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *pConn) #endif pShow->bytes[cols] = 4; pSchema[cols].type = TSDB_DATA_TYPE_INT; - strcpy(pSchema[cols].name, "tables"); + strcpy(pSchema[cols].name, "maxtables"); pSchema[cols].bytes = htons(pShow->bytes[cols]); cols++; @@ -521,13 +521,13 @@ static int32_t mgmtGetDbMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *pConn) pShow->bytes[cols] = 4; pSchema[cols].type = TSDB_DATA_TYPE_INT; - strcpy(pSchema[cols].name, "ctime(s)"); + strcpy(pSchema[cols].name, "ctime(Sec.)"); pSchema[cols].bytes = htons(pShow->bytes[cols]); cols++; pShow->bytes[cols] = 1; pSchema[cols].type = TSDB_DATA_TYPE_TINYINT; - strcpy(pSchema[cols].name, "clog"); + strcpy(pSchema[cols].name, "wallevel"); pSchema[cols].bytes = htons(pShow->bytes[cols]); cols++; @@ -659,7 +659,7 @@ static int32_t mgmtRetrieveDbs(SShowObj *pShow, char *data, int32_t rows, void * cols++; pWrite = data + pShow->offset[cols] * rows + pShow->bytes[cols] * numOfRows; - *(int8_t *)pWrite = pDb->cfg.commitLog; + *(int8_t *)pWrite = pDb->cfg.walLevel; cols++; pWrite = data + pShow->offset[cols] * rows + pShow->bytes[cols] * numOfRows; @@ -728,9 +728,10 @@ static int32_t mgmtSetDbDropping(SDbObj *pDb) { static void mgmtProcessCreateDbMsg(SQueuedMsg *pMsg) { SCMCreateDbMsg *pCreate = pMsg->pCont; - pCreate->maxSessions = htonl(pCreate->maxSessions); + + pCreate->maxTables = htonl(pCreate->maxTables); pCreate->cacheBlockSize = htonl(pCreate->cacheBlockSize); - pCreate->totalBlocks = htonl(pCreate->totalBlocks); + pCreate->numOfBlocks = htonl(pCreate->numOfBlocks); pCreate->daysPerFile = htonl(pCreate->daysPerFile); pCreate->daysToKeep = htonl(pCreate->daysToKeep); pCreate->daysToKeep1 = htonl(pCreate->daysToKeep1); @@ -757,14 +758,15 @@ static void mgmtProcessCreateDbMsg(SQueuedMsg *pMsg) { static SDbCfg mgmtGetAlterDbOption(SDbObj *pDb, SCMAlterDbMsg *pAlter) { SDbCfg newCfg = pDb->cfg; int32_t cacheBlockSize = htonl(pAlter->daysToKeep); - int32_t totalBlocks = htonl(pAlter->totalBlocks); - int32_t maxTables = htonl(pAlter->maxSessions); - int32_t daysToKeep = htonl(pAlter->daysToKeep); + int32_t totalBlocks = htonl(pAlter->numOfBlocks); + int32_t maxTables = htonl(pAlter->maxTables); + int32_t daysToKeep = htonl(pAlter->daysToKeep); int32_t daysToKeep1 = htonl(pAlter->daysToKeep1); int32_t daysToKeep2 = htonl(pAlter->daysToKeep2); int8_t compression = pAlter->compression; int8_t replications = pAlter->replications; - + int8_t walLevel = pAlter->walLevel; + terrno = TSDB_CODE_SUCCESS; if (cacheBlockSize > 0 && cacheBlockSize != pDb->cfg.cacheBlockSize) { @@ -820,6 +822,11 @@ static SDbCfg mgmtGetAlterDbOption(SDbObj *pDb, SCMAlterDbMsg *pAlter) { mError("db:%s, replica number can't change from 3 to 1", pDb->name, replications); terrno = TSDB_CODE_INVALID_OPTION; } + + if (walLevel < TSDB_MIN_WAL_LEVEL || walLevel > TSDB_MAX_WAL_LEVEL) { + mError("db:%s, wal level should be between 0-2", pDb->name); + terrno = TSDB_CODE_INVALID_OPTION; + } return newCfg; } diff --git a/src/mnode/src/mgmtSdb.c b/src/mnode/src/mgmtSdb.c index 3717277992..91d1a7ca74 100644 --- a/src/mnode/src/mgmtSdb.c +++ b/src/mnode/src/mgmtSdb.c @@ -142,7 +142,7 @@ static void *sdbGetTableFromId(int32_t tableId) { } static int32_t sdbInitWal() { - SWalCfg walCfg = {.commitLog = 2, .wals = 2, .keep = 1}; + SWalCfg walCfg = {.walLevel = 2, .wals = 2, .keep = 1}; tsSdbObj.wal = walOpen(tsMnodeDir, &walCfg); if (tsSdbObj.wal == NULL) { sdbError("failed to open sdb wal in %s", tsMnodeDir); diff --git a/src/mnode/src/mgmtVgroup.c b/src/mnode/src/mgmtVgroup.c index 2162230606..f48bb37b86 100644 --- a/src/mnode/src/mgmtVgroup.c +++ b/src/mnode/src/mgmtVgroup.c @@ -563,7 +563,7 @@ SMDCreateVnodeMsg *mgmtBuildCreateVnodeMsg(SVgObj *pVgroup) { pCfg->commitTime = htonl(pDb->cfg.commitTime); pCfg->precision = pDb->cfg.precision; pCfg->compression = pDb->cfg.compression; - pCfg->commitLog = pDb->cfg.commitLog; + pCfg->walLevel = pDb->cfg.walLevel; pCfg->replications = (int8_t) pVgroup->numOfVnodes; pCfg->wals = 3; pCfg->quorum = 1; diff --git a/src/query/inc/qsqlparser.h b/src/query/inc/qsqlparser.h index 08d4186291..d2fad227e6 100644 --- a/src/query/inc/qsqlparser.h +++ b/src/query/inc/qsqlparser.h @@ -111,13 +111,13 @@ typedef struct SCreateDBInfo { SSQLToken dbname; int32_t replica; int32_t cacheBlockSize; - int32_t tablesPerVnode; + int32_t maxTablesPerVnode; + int32_t numOfBlocks; int32_t daysPerFile; - int32_t rowPerFileBlock; - float numOfAvgCacheBlocks; - int32_t numOfBlocksPerTable; + int32_t minRowsPerBlock; + int32_t maxRowsPerBlock; int64_t commitTime; - int32_t commitLog; + int32_t walLevel; int32_t compressionLevel; SSQLToken precision; bool ignoreExists; diff --git a/src/query/inc/sql.y b/src/query/inc/sql.y index be8d922a84..0a32947921 100644 --- a/src/query/inc/sql.y +++ b/src/query/inc/sql.y @@ -212,31 +212,30 @@ acct_optr(Y) ::= pps(C) tseries(D) storage(P) streams(F) qtime(Q) dbs(E) users(K %destructor keep {tVariantListDestroy($$);} keep(Y) ::= KEEP tagitemlist(X). { Y = X; } -tables(Y) ::= TABLES INTEGER(X). { Y = X; } +tables(Y) ::= MAXTABLES INTEGER(X). { Y = X; } cache(Y) ::= CACHE INTEGER(X). { Y = X; } replica(Y) ::= REPLICA INTEGER(X). { Y = X; } days(Y) ::= DAYS INTEGER(X). { Y = X; } -rows(Y) ::= ROWS INTEGER(X). { Y = X; } - -ablocks(Y) ::= ABLOCKS ID(X). { Y = X; } -tblocks(Y) ::= TBLOCKS INTEGER(X). { Y = X; } +minrows(Y) ::= MINROWS INTEGER(X). { Y = X; } +maxrows(Y) ::= MAXROWS INTEGER(X). { Y = X; } +blocks(Y) ::= BLOCKS INTEGER(X). { Y = X; } ctime(Y) ::= CTIME INTEGER(X). { Y = X; } -clog(Y) ::= CLOG INTEGER(X). { Y = X; } +wal(Y) ::= WAL INTEGER(X). { Y = X; } comp(Y) ::= COMP INTEGER(X). { Y = X; } prec(Y) ::= PRECISION STRING(X). { Y = X; } %type db_optr {SCreateDBInfo} db_optr(Y) ::= . {setDefaultCreateDbOption(&Y);} -db_optr(Y) ::= db_optr(Z) tables(X). { Y = Z; Y.tablesPerVnode = strtol(X.z, NULL, 10); } +db_optr(Y) ::= db_optr(Z) tables(X). { Y = Z; Y.maxTablesPerVnode = strtol(X.z, NULL, 10); } db_optr(Y) ::= db_optr(Z) cache(X). { Y = Z; Y.cacheBlockSize = strtol(X.z, NULL, 10); } db_optr(Y) ::= db_optr(Z) replica(X). { Y = Z; Y.replica = strtol(X.z, NULL, 10); } db_optr(Y) ::= db_optr(Z) days(X). { Y = Z; Y.daysPerFile = strtol(X.z, NULL, 10); } -db_optr(Y) ::= db_optr(Z) rows(X). { Y = Z; Y.rowPerFileBlock = strtol(X.z, NULL, 10); } -db_optr(Y) ::= db_optr(Z) ablocks(X). { Y = Z; Y.numOfAvgCacheBlocks = strtod(X.z, NULL); } -db_optr(Y) ::= db_optr(Z) tblocks(X). { Y = Z; Y.numOfBlocksPerTable = strtol(X.z, NULL, 10); } +db_optr(Y) ::= db_optr(Z) minrows(X). { Y = Z; Y.minRowsPerBlock = strtod(X.z, NULL); } +db_optr(Y) ::= db_optr(Z) maxrows(X). { Y = Z; Y.maxRowsPerBlock = strtod(X.z, NULL); } +db_optr(Y) ::= db_optr(Z) blocks(X). { Y = Z; Y.numOfBlocks = strtol(X.z, NULL, 10); } db_optr(Y) ::= db_optr(Z) ctime(X). { Y = Z; Y.commitTime = strtol(X.z, NULL, 10); } -db_optr(Y) ::= db_optr(Z) clog(X). { Y = Z; Y.commitLog = strtol(X.z, NULL, 10); } +db_optr(Y) ::= db_optr(Z) wal(X). { Y = Z; Y.walLevel = strtol(X.z, NULL, 10); } db_optr(Y) ::= db_optr(Z) comp(X). { Y = Z; Y.compressionLevel = strtol(X.z, NULL, 10); } db_optr(Y) ::= db_optr(Z) prec(X). { Y = Z; Y.precision = X; } db_optr(Y) ::= db_optr(Z) keep(X). { Y = Z; Y.keep = X; } @@ -245,7 +244,11 @@ db_optr(Y) ::= db_optr(Z) keep(X). { Y = Z; Y.keep = X; } alter_db_optr(Y) ::= . { setDefaultCreateDbOption(&Y);} alter_db_optr(Y) ::= alter_db_optr(Z) replica(X). { Y = Z; Y.replica = strtol(X.z, NULL, 10); } -alter_db_optr(Y) ::= alter_db_optr(Z) tables(X). { Y = Z; Y.tablesPerVnode = strtol(X.z, NULL, 10); } +alter_db_optr(Y) ::= alter_db_optr(Z) tables(X). { Y = Z; Y.maxTablesPerVnode = strtol(X.z, NULL, 10); } +alter_db_optr(Y) ::= alter_db_optr(Z) keep(X). { Y = Z; Y.keep = X; } +alter_db_optr(Y) ::= alter_db_optr(Z) blocks(X). { Y = Z; Y.numOfBlocks = strtol(X.z, NULL, 10); } +alter_db_optr(Y) ::= alter_db_optr(Z) comp(X). { Y = Z; Y.compressionLevel = strtol(X.z, NULL, 10); } +alter_db_optr(Y) ::= alter_db_optr(Z) wal(X). { Y = Z; Y.walLevel = strtol(X.z, NULL, 10); } %type typename {TAOS_FIELD} typename(A) ::= ids(X). { tSQLSetColumnType (&A, &X); } diff --git a/src/query/src/qparserImpl.c b/src/query/src/qparserImpl.c index 90ae62a361..5a93282017 100644 --- a/src/query/src/qparserImpl.c +++ b/src/query/src/qparserImpl.c @@ -886,16 +886,16 @@ void setKillSQL(SSqlInfo *pInfo, int32_t type, SSQLToken *ip) { } void setDefaultCreateDbOption(SCreateDBInfo *pDBInfo) { - pDBInfo->numOfBlocksPerTable = 50; pDBInfo->compressionLevel = -1; - pDBInfo->commitLog = -1; + pDBInfo->walLevel = -1; pDBInfo->commitTime = -1; - pDBInfo->tablesPerVnode = -1; - pDBInfo->numOfAvgCacheBlocks = -1; + pDBInfo->maxTablesPerVnode = -1; pDBInfo->cacheBlockSize = -1; - pDBInfo->rowPerFileBlock = -1; + pDBInfo->numOfBlocks = -1; + pDBInfo->maxRowsPerBlock = -1; + pDBInfo->minRowsPerBlock = -1; pDBInfo->daysPerFile = -1; pDBInfo->replica = -1; diff --git a/src/query/src/qtokenizer.c b/src/query/src/qtokenizer.c index 51b196a9da..d5b20e1edd 100644 --- a/src/query/src/qtokenizer.c +++ b/src/query/src/qtokenizer.c @@ -117,12 +117,13 @@ static SKeyword keywordTable[] = { {"KEEP", TK_KEEP}, {"REPLICA", TK_REPLICA}, {"DAYS", TK_DAYS}, - {"ROWS", TK_ROWS}, + {"MINROWS", TK_MINROWS}, + {"MAXROWS", TK_MAXROWS}, + {"BLOCKS", TK_BLOCKS}, + {"MAXTABLES", TK_MAXTABLES}, {"CACHE", TK_CACHE}, - {"ABLOCKS", TK_ABLOCKS}, - {"TBLOCKS", TK_TBLOCKS}, {"CTIME", TK_CTIME}, - {"CLOG", TK_CLOG}, + {"WAL", TK_WAL}, {"COMP", TK_COMP}, {"PRECISION", TK_PRECISION}, {"LP", TK_LP}, diff --git a/src/query/src/sql.c b/src/query/src/sql.c index 223068ef91..19bc05887c 100644 --- a/src/query/src/sql.c +++ b/src/query/src/sql.c @@ -97,26 +97,26 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 268 +#define YYNOCODE 269 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SSQLToken typedef union { int yyinit; ParseTOKENTYPE yy0; - tVariantList* yy30; - SLimitVal yy150; - SCreateTableSQL* yy212; - SCreateAcctSQL yy239; - int yy250; - SSubclauseInfo* yy309; - tFieldList* yy325; - tVariant yy380; - tSQLExpr* yy388; - SQuerySQL* yy444; - int64_t yy489; - TAOS_FIELD yy505; - tSQLExprList* yy506; - SCreateDBInfo yy532; + tSQLExpr* yy2; + tSQLExprList* yy10; + TAOS_FIELD yy47; + SCreateAcctSQL yy63; + SSubclauseInfo* yy145; + int yy196; + SLimitVal yy230; + int64_t yy373; + SQuerySQL* yy392; + tVariant yy442; + tVariantList* yy456; + SCreateDBInfo yy478; + SCreateTableSQL* yy494; + tFieldList* yy503; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -127,16 +127,16 @@ typedef union { #define ParseARG_STORE yypParser->pInfo = pInfo #define YYFALLBACK 1 #define YYNSTATE 247 -#define YYNRULE 216 -#define YYNTOKEN 203 +#define YYNRULE 220 +#define YYNTOKEN 204 #define YY_MAX_SHIFT 246 -#define YY_MIN_SHIFTREDUCE 399 -#define YY_MAX_SHIFTREDUCE 614 -#define YY_ERROR_ACTION 615 -#define YY_ACCEPT_ACTION 616 -#define YY_NO_ACTION 617 -#define YY_MIN_REDUCE 618 -#define YY_MAX_REDUCE 833 +#define YY_MIN_SHIFTREDUCE 403 +#define YY_MAX_SHIFTREDUCE 622 +#define YY_ERROR_ACTION 623 +#define YY_ACCEPT_ACTION 624 +#define YY_NO_ACTION 625 +#define YY_MIN_REDUCE 626 +#define YY_MAX_REDUCE 845 /************* End control #defines *******************************************/ /* Define the yytestcase() macro to be a no-op if is not already defined @@ -202,213 +202,217 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (529) +#define YY_ACTTAB_COUNT (547) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 752, 440, 135, 153, 244, 10, 616, 246, 135, 441, - /* 10 */ 135, 158, 821, 41, 43, 20, 35, 36, 820, 157, - /* 20 */ 821, 29, 741, 440, 203, 39, 37, 40, 38, 134, - /* 30 */ 499, 441, 99, 34, 33, 103, 154, 32, 31, 30, - /* 40 */ 41, 43, 741, 35, 36, 155, 139, 166, 29, 727, - /* 50 */ 749, 203, 39, 37, 40, 38, 188, 103, 227, 226, - /* 60 */ 34, 33, 165, 730, 32, 31, 30, 400, 401, 402, - /* 70 */ 403, 404, 405, 406, 407, 408, 409, 410, 411, 245, - /* 80 */ 730, 41, 43, 191, 35, 36, 218, 238, 200, 29, - /* 90 */ 58, 20, 203, 39, 37, 40, 38, 32, 31, 30, - /* 100 */ 56, 34, 33, 76, 730, 32, 31, 30, 43, 238, - /* 110 */ 35, 36, 776, 817, 198, 29, 20, 20, 203, 39, - /* 120 */ 37, 40, 38, 167, 570, 727, 229, 34, 33, 440, - /* 130 */ 170, 32, 31, 30, 240, 35, 36, 441, 7, 816, - /* 140 */ 29, 61, 113, 203, 39, 37, 40, 38, 225, 230, - /* 150 */ 727, 727, 34, 33, 50, 728, 32, 31, 30, 15, - /* 160 */ 217, 239, 216, 215, 214, 213, 212, 211, 210, 209, - /* 170 */ 712, 51, 701, 702, 703, 704, 705, 706, 707, 708, - /* 180 */ 709, 710, 711, 162, 583, 11, 815, 574, 103, 577, - /* 190 */ 103, 580, 171, 162, 583, 224, 223, 574, 16, 577, - /* 200 */ 20, 580, 34, 33, 148, 26, 32, 31, 30, 240, - /* 210 */ 88, 87, 142, 177, 657, 159, 160, 126, 147, 202, - /* 220 */ 185, 715, 182, 714, 151, 159, 160, 162, 583, 531, - /* 230 */ 60, 574, 152, 577, 726, 580, 239, 16, 39, 37, - /* 240 */ 40, 38, 27, 775, 26, 59, 34, 33, 551, 552, - /* 250 */ 32, 31, 30, 140, 116, 117, 68, 64, 67, 159, - /* 260 */ 160, 98, 515, 666, 187, 512, 126, 513, 26, 514, - /* 270 */ 523, 150, 130, 128, 91, 90, 89, 190, 42, 161, - /* 280 */ 74, 78, 83, 86, 77, 572, 528, 729, 42, 582, - /* 290 */ 80, 17, 658, 168, 169, 126, 243, 242, 95, 582, - /* 300 */ 47, 542, 543, 600, 581, 45, 13, 12, 584, 576, - /* 310 */ 141, 579, 12, 575, 581, 578, 2, 73, 72, 48, - /* 320 */ 505, 573, 42, 743, 45, 504, 207, 9, 8, 21, - /* 330 */ 21, 143, 519, 582, 520, 517, 144, 518, 85, 84, - /* 340 */ 145, 146, 137, 133, 138, 830, 136, 786, 581, 785, - /* 350 */ 163, 782, 781, 164, 751, 721, 768, 228, 100, 767, - /* 360 */ 114, 115, 516, 668, 208, 112, 131, 24, 221, 665, - /* 370 */ 222, 829, 26, 70, 828, 826, 189, 118, 686, 25, - /* 380 */ 93, 22, 132, 655, 79, 653, 81, 82, 651, 538, - /* 390 */ 650, 172, 192, 127, 648, 647, 646, 196, 52, 740, - /* 400 */ 645, 644, 636, 129, 642, 640, 49, 638, 44, 105, - /* 410 */ 755, 756, 201, 199, 195, 769, 197, 193, 28, 220, - /* 420 */ 75, 231, 232, 233, 234, 235, 236, 205, 237, 241, - /* 430 */ 53, 614, 173, 174, 175, 149, 62, 65, 176, 613, - /* 440 */ 179, 181, 649, 178, 180, 612, 92, 94, 183, 121, - /* 450 */ 184, 120, 687, 119, 122, 725, 123, 125, 124, 109, - /* 460 */ 106, 104, 643, 107, 110, 108, 111, 23, 1, 190, - /* 470 */ 605, 186, 525, 55, 539, 57, 156, 101, 194, 18, - /* 480 */ 19, 4, 544, 102, 204, 585, 3, 14, 5, 6, - /* 490 */ 63, 480, 206, 479, 478, 477, 476, 475, 474, 473, - /* 500 */ 471, 45, 219, 444, 66, 21, 501, 500, 46, 498, - /* 510 */ 54, 465, 463, 455, 461, 457, 69, 459, 453, 451, - /* 520 */ 472, 470, 71, 442, 96, 97, 415, 413, 618, + /* 0 */ 724, 444, 723, 11, 722, 134, 624, 246, 725, 445, + /* 10 */ 727, 726, 764, 41, 43, 21, 35, 36, 153, 244, + /* 20 */ 135, 29, 135, 444, 203, 39, 37, 40, 38, 158, + /* 30 */ 833, 445, 832, 34, 33, 139, 135, 32, 31, 30, + /* 40 */ 41, 43, 753, 35, 36, 157, 833, 166, 29, 739, + /* 50 */ 103, 203, 39, 37, 40, 38, 188, 21, 103, 99, + /* 60 */ 34, 33, 761, 155, 32, 31, 30, 404, 405, 406, + /* 70 */ 407, 408, 409, 410, 411, 412, 413, 414, 415, 245, + /* 80 */ 444, 742, 41, 43, 103, 35, 36, 103, 445, 168, + /* 90 */ 29, 738, 21, 203, 39, 37, 40, 38, 32, 31, + /* 100 */ 30, 56, 34, 33, 753, 787, 32, 31, 30, 43, + /* 110 */ 191, 35, 36, 788, 829, 198, 29, 21, 154, 203, + /* 120 */ 39, 37, 40, 38, 167, 578, 739, 8, 34, 33, + /* 130 */ 61, 113, 32, 31, 30, 665, 35, 36, 126, 59, + /* 140 */ 200, 29, 58, 17, 203, 39, 37, 40, 38, 221, + /* 150 */ 26, 739, 169, 34, 33, 220, 219, 32, 31, 30, + /* 160 */ 16, 239, 214, 238, 213, 212, 211, 237, 210, 236, + /* 170 */ 235, 209, 720, 828, 709, 710, 711, 712, 713, 714, + /* 180 */ 715, 716, 717, 718, 719, 162, 591, 225, 234, 582, + /* 190 */ 165, 585, 240, 588, 76, 162, 591, 98, 827, 582, + /* 200 */ 234, 585, 60, 588, 26, 162, 591, 12, 742, 582, + /* 210 */ 742, 585, 151, 588, 27, 21, 740, 159, 160, 34, + /* 220 */ 33, 202, 531, 32, 31, 30, 148, 159, 160, 190, + /* 230 */ 536, 539, 88, 87, 142, 18, 674, 159, 160, 126, + /* 240 */ 147, 177, 152, 39, 37, 40, 38, 226, 185, 739, + /* 250 */ 182, 34, 33, 559, 560, 32, 31, 30, 523, 666, + /* 260 */ 17, 520, 126, 521, 842, 522, 550, 26, 16, 239, + /* 270 */ 46, 238, 243, 242, 95, 237, 551, 236, 235, 608, + /* 280 */ 14, 42, 584, 13, 587, 140, 583, 187, 586, 170, + /* 290 */ 171, 42, 590, 50, 150, 47, 74, 78, 83, 86, + /* 300 */ 77, 42, 590, 580, 592, 507, 80, 589, 13, 161, + /* 310 */ 51, 527, 590, 528, 48, 513, 525, 589, 526, 46, + /* 320 */ 141, 116, 117, 68, 64, 67, 741, 589, 130, 128, + /* 330 */ 91, 90, 89, 223, 222, 143, 512, 207, 144, 581, + /* 340 */ 22, 22, 73, 72, 85, 84, 145, 3, 10, 9, + /* 350 */ 146, 137, 798, 133, 138, 136, 797, 163, 755, 524, + /* 360 */ 733, 794, 763, 793, 164, 224, 100, 780, 779, 114, + /* 370 */ 115, 26, 676, 208, 112, 131, 189, 24, 217, 673, + /* 380 */ 218, 841, 70, 840, 838, 118, 93, 694, 25, 52, + /* 390 */ 23, 546, 192, 132, 196, 663, 79, 661, 81, 752, + /* 400 */ 82, 104, 49, 659, 658, 172, 127, 656, 655, 654, + /* 410 */ 653, 652, 44, 644, 199, 129, 650, 648, 646, 201, + /* 420 */ 767, 197, 768, 781, 195, 193, 28, 216, 75, 227, + /* 430 */ 228, 229, 230, 231, 205, 232, 53, 233, 241, 622, + /* 440 */ 149, 173, 62, 65, 174, 175, 657, 176, 621, 179, + /* 450 */ 178, 180, 651, 121, 92, 120, 695, 119, 94, 123, + /* 460 */ 122, 124, 125, 1, 2, 737, 181, 620, 105, 108, + /* 470 */ 106, 109, 107, 110, 111, 183, 184, 613, 186, 190, + /* 480 */ 533, 55, 547, 101, 156, 57, 552, 19, 194, 102, + /* 490 */ 5, 6, 593, 4, 15, 20, 7, 204, 63, 206, + /* 500 */ 484, 481, 479, 478, 477, 475, 448, 215, 66, 45, + /* 510 */ 509, 22, 508, 506, 54, 69, 469, 467, 459, 465, + /* 520 */ 461, 463, 457, 71, 455, 483, 482, 480, 476, 474, + /* 530 */ 46, 446, 419, 417, 626, 625, 625, 625, 625, 96, + /* 540 */ 625, 625, 625, 625, 625, 625, 97, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 207, 1, 256, 206, 207, 256, 204, 205, 256, 9, - /* 10 */ 256, 265, 266, 13, 14, 207, 16, 17, 266, 265, - /* 20 */ 266, 21, 240, 1, 24, 25, 26, 27, 28, 256, - /* 30 */ 5, 9, 207, 33, 34, 207, 254, 37, 38, 39, - /* 40 */ 13, 14, 240, 16, 17, 224, 256, 239, 21, 241, - /* 50 */ 257, 24, 25, 26, 27, 28, 254, 207, 33, 34, - /* 60 */ 33, 34, 224, 242, 37, 38, 39, 45, 46, 47, + /* 0 */ 224, 1, 226, 257, 228, 257, 205, 206, 232, 9, + /* 10 */ 234, 235, 208, 13, 14, 208, 16, 17, 207, 208, + /* 20 */ 257, 21, 257, 1, 24, 25, 26, 27, 28, 266, + /* 30 */ 267, 9, 267, 33, 34, 257, 257, 37, 38, 39, + /* 40 */ 13, 14, 241, 16, 17, 266, 267, 240, 21, 242, + /* 50 */ 208, 24, 25, 26, 27, 28, 255, 208, 208, 208, + /* 60 */ 33, 34, 258, 225, 37, 38, 39, 45, 46, 47, /* 70 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - /* 80 */ 242, 13, 14, 258, 16, 17, 224, 78, 260, 21, - /* 90 */ 262, 207, 24, 25, 26, 27, 28, 37, 38, 39, - /* 100 */ 100, 33, 34, 72, 242, 37, 38, 39, 14, 78, - /* 110 */ 16, 17, 262, 256, 264, 21, 207, 207, 24, 25, - /* 120 */ 26, 27, 28, 239, 97, 241, 207, 33, 34, 1, - /* 130 */ 63, 37, 38, 39, 60, 16, 17, 9, 96, 256, - /* 140 */ 21, 99, 100, 24, 25, 26, 27, 28, 239, 239, - /* 150 */ 241, 241, 33, 34, 101, 236, 37, 38, 39, 85, - /* 160 */ 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - /* 170 */ 223, 118, 225, 226, 227, 228, 229, 230, 231, 232, - /* 180 */ 233, 234, 235, 1, 2, 44, 256, 5, 207, 7, - /* 190 */ 207, 9, 125, 1, 2, 128, 129, 5, 96, 7, - /* 200 */ 207, 9, 33, 34, 63, 103, 37, 38, 39, 60, - /* 210 */ 69, 70, 71, 124, 211, 33, 34, 214, 77, 37, - /* 220 */ 131, 225, 133, 227, 256, 33, 34, 1, 2, 37, - /* 230 */ 243, 5, 256, 7, 241, 9, 87, 96, 25, 26, - /* 240 */ 27, 28, 255, 262, 103, 262, 33, 34, 113, 114, - /* 250 */ 37, 38, 39, 256, 64, 65, 66, 67, 68, 33, - /* 260 */ 34, 96, 2, 211, 123, 5, 214, 7, 103, 9, - /* 270 */ 97, 130, 64, 65, 66, 67, 68, 104, 96, 59, - /* 280 */ 64, 65, 66, 67, 68, 1, 101, 242, 96, 107, - /* 290 */ 74, 106, 211, 33, 34, 214, 60, 61, 62, 107, - /* 300 */ 101, 97, 97, 97, 122, 101, 101, 101, 97, 5, - /* 310 */ 256, 7, 101, 5, 122, 7, 96, 126, 127, 120, - /* 320 */ 97, 37, 96, 240, 101, 97, 97, 126, 127, 101, - /* 330 */ 101, 256, 5, 107, 7, 5, 256, 7, 72, 73, - /* 340 */ 256, 256, 256, 256, 256, 242, 256, 237, 122, 237, - /* 350 */ 237, 237, 237, 237, 207, 238, 263, 237, 207, 263, - /* 360 */ 207, 207, 102, 207, 207, 244, 207, 207, 207, 207, - /* 370 */ 207, 207, 103, 207, 207, 207, 240, 207, 207, 207, - /* 380 */ 59, 207, 207, 207, 207, 207, 207, 207, 207, 107, - /* 390 */ 207, 207, 259, 207, 207, 207, 207, 259, 117, 253, - /* 400 */ 207, 207, 207, 207, 207, 207, 119, 207, 116, 251, - /* 410 */ 208, 208, 111, 115, 109, 208, 110, 108, 121, 75, - /* 420 */ 84, 83, 49, 80, 82, 53, 81, 208, 79, 75, - /* 430 */ 208, 5, 132, 5, 132, 208, 212, 212, 58, 5, - /* 440 */ 5, 58, 208, 132, 132, 5, 209, 209, 132, 216, - /* 450 */ 58, 220, 222, 221, 219, 240, 217, 215, 218, 247, - /* 460 */ 250, 252, 208, 249, 246, 248, 245, 210, 213, 104, - /* 470 */ 86, 124, 97, 105, 97, 101, 1, 96, 96, 101, - /* 480 */ 101, 112, 97, 96, 98, 97, 96, 96, 112, 96, - /* 490 */ 72, 9, 98, 5, 5, 5, 5, 1, 5, 5, - /* 500 */ 5, 101, 15, 76, 72, 101, 5, 5, 16, 97, - /* 510 */ 96, 5, 5, 5, 5, 5, 127, 5, 5, 5, - /* 520 */ 5, 5, 127, 76, 21, 21, 59, 58, 0, 267, - /* 530 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 540 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 550 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 560 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 570 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 580 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 590 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 600 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 610 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 620 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 630 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 640 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 650 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 660 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 670 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 680 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 690 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 700 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 710 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 720 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - /* 730 */ 267, 267, + /* 80 */ 1, 243, 13, 14, 208, 16, 17, 208, 9, 63, + /* 90 */ 21, 242, 208, 24, 25, 26, 27, 28, 37, 38, + /* 100 */ 39, 101, 33, 34, 241, 263, 37, 38, 39, 14, + /* 110 */ 259, 16, 17, 263, 257, 265, 21, 208, 255, 24, + /* 120 */ 25, 26, 27, 28, 240, 98, 242, 97, 33, 34, + /* 130 */ 100, 101, 37, 38, 39, 212, 16, 17, 215, 263, + /* 140 */ 261, 21, 263, 97, 24, 25, 26, 27, 28, 240, + /* 150 */ 104, 242, 126, 33, 34, 129, 130, 37, 38, 39, + /* 160 */ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + /* 170 */ 95, 96, 224, 257, 226, 227, 228, 229, 230, 231, + /* 180 */ 232, 233, 234, 235, 236, 1, 2, 208, 78, 5, + /* 190 */ 225, 7, 225, 9, 72, 1, 2, 97, 257, 5, + /* 200 */ 78, 7, 244, 9, 104, 1, 2, 44, 243, 5, + /* 210 */ 243, 7, 257, 9, 256, 208, 237, 33, 34, 33, + /* 220 */ 34, 37, 98, 37, 38, 39, 63, 33, 34, 105, + /* 230 */ 102, 37, 69, 70, 71, 107, 212, 33, 34, 215, + /* 240 */ 77, 125, 257, 25, 26, 27, 28, 240, 132, 242, + /* 250 */ 134, 33, 34, 114, 115, 37, 38, 39, 2, 212, + /* 260 */ 97, 5, 215, 7, 243, 9, 98, 104, 85, 86, + /* 270 */ 102, 88, 60, 61, 62, 92, 98, 94, 95, 98, + /* 280 */ 102, 97, 5, 102, 7, 257, 5, 124, 7, 33, + /* 290 */ 34, 97, 108, 102, 131, 102, 64, 65, 66, 67, + /* 300 */ 68, 97, 108, 1, 98, 5, 74, 123, 102, 59, + /* 310 */ 119, 5, 108, 7, 121, 98, 5, 123, 7, 102, + /* 320 */ 257, 64, 65, 66, 67, 68, 243, 123, 64, 65, + /* 330 */ 66, 67, 68, 33, 34, 257, 98, 98, 257, 37, + /* 340 */ 102, 102, 127, 128, 72, 73, 257, 97, 127, 128, + /* 350 */ 257, 257, 238, 257, 257, 257, 238, 238, 241, 103, + /* 360 */ 239, 238, 208, 238, 238, 238, 208, 264, 264, 208, + /* 370 */ 208, 104, 208, 208, 245, 208, 241, 208, 208, 208, + /* 380 */ 208, 208, 208, 208, 208, 208, 59, 208, 208, 118, + /* 390 */ 208, 108, 260, 208, 260, 208, 208, 208, 208, 254, + /* 400 */ 208, 253, 120, 208, 208, 208, 208, 208, 208, 208, + /* 410 */ 208, 208, 117, 208, 116, 208, 208, 208, 208, 112, + /* 420 */ 209, 111, 209, 209, 110, 109, 122, 75, 84, 83, + /* 430 */ 49, 80, 82, 53, 209, 81, 209, 79, 75, 5, + /* 440 */ 209, 133, 213, 213, 5, 133, 209, 58, 5, 5, + /* 450 */ 133, 133, 209, 217, 210, 221, 223, 222, 210, 218, + /* 460 */ 220, 219, 216, 214, 211, 241, 58, 5, 252, 249, + /* 470 */ 251, 248, 250, 247, 246, 133, 58, 87, 125, 105, + /* 480 */ 98, 106, 98, 97, 1, 102, 98, 102, 97, 97, + /* 490 */ 113, 113, 98, 97, 97, 102, 97, 99, 72, 99, + /* 500 */ 9, 5, 5, 5, 5, 5, 76, 15, 72, 16, + /* 510 */ 5, 102, 5, 98, 97, 128, 5, 5, 5, 5, + /* 520 */ 5, 5, 5, 128, 5, 5, 5, 5, 5, 5, + /* 530 */ 102, 76, 59, 58, 0, 268, 268, 268, 268, 21, + /* 540 */ 268, 268, 268, 268, 268, 268, 21, 268, 268, 268, + /* 550 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 560 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 570 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 580 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 590 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 600 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 610 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 620 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 630 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 640 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 650 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 660 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 670 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 680 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 690 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 700 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 710 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 720 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 730 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 740 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 750 */ 268, }; #define YY_SHIFT_COUNT (246) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (528) +#define YY_SHIFT_MAX (534) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 141, 74, 182, 226, 128, 128, 128, 128, 128, 128, - /* 10 */ 0, 22, 226, 260, 260, 260, 102, 128, 128, 128, - /* 20 */ 128, 128, 31, 149, 9, 9, 529, 192, 226, 226, - /* 30 */ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - /* 40 */ 226, 226, 226, 226, 226, 260, 260, 25, 25, 25, - /* 50 */ 25, 25, 25, 42, 25, 165, 128, 128, 135, 135, - /* 60 */ 185, 128, 128, 128, 128, 128, 128, 128, 128, 128, - /* 70 */ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - /* 80 */ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, - /* 90 */ 128, 128, 128, 128, 128, 128, 128, 128, 269, 321, - /* 100 */ 321, 282, 282, 321, 281, 287, 292, 301, 298, 306, - /* 110 */ 305, 309, 297, 269, 321, 321, 344, 344, 321, 336, - /* 120 */ 338, 373, 343, 342, 372, 345, 349, 321, 354, 321, - /* 130 */ 354, 529, 529, 27, 68, 68, 68, 94, 119, 213, - /* 140 */ 213, 213, 216, 169, 169, 169, 169, 190, 208, 67, - /* 150 */ 89, 60, 60, 236, 173, 204, 205, 206, 211, 304, - /* 160 */ 308, 284, 220, 199, 53, 223, 228, 229, 327, 330, - /* 170 */ 191, 201, 266, 426, 300, 428, 302, 380, 434, 311, - /* 180 */ 435, 312, 383, 440, 316, 392, 384, 347, 365, 375, - /* 190 */ 368, 374, 377, 381, 475, 382, 385, 387, 378, 369, - /* 200 */ 379, 376, 388, 390, 391, 386, 393, 394, 418, 482, - /* 210 */ 488, 489, 490, 491, 496, 493, 494, 495, 400, 427, - /* 220 */ 487, 432, 492, 389, 395, 404, 501, 502, 412, 414, - /* 230 */ 404, 506, 507, 508, 509, 510, 512, 513, 514, 515, - /* 240 */ 516, 447, 503, 504, 467, 469, 528, + /* 0 */ 163, 75, 183, 184, 204, 79, 79, 79, 79, 79, + /* 10 */ 79, 0, 22, 204, 256, 256, 256, 46, 79, 79, + /* 20 */ 79, 79, 79, 122, 110, 110, 547, 194, 204, 204, + /* 30 */ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, + /* 40 */ 204, 204, 204, 204, 204, 256, 256, 300, 300, 300, + /* 50 */ 300, 300, 300, 30, 300, 100, 79, 79, 139, 139, + /* 60 */ 128, 79, 79, 79, 79, 79, 79, 79, 79, 79, + /* 70 */ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, + /* 80 */ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, + /* 90 */ 79, 79, 79, 79, 79, 79, 79, 79, 267, 327, + /* 100 */ 327, 283, 283, 327, 271, 282, 295, 307, 298, 310, + /* 110 */ 314, 316, 304, 267, 327, 327, 352, 352, 327, 344, + /* 120 */ 346, 381, 351, 350, 380, 354, 358, 327, 363, 327, + /* 130 */ 363, 547, 547, 27, 69, 69, 69, 95, 120, 218, + /* 140 */ 218, 218, 232, 186, 186, 186, 186, 257, 264, 26, + /* 150 */ 116, 61, 61, 212, 124, 168, 178, 181, 206, 277, + /* 160 */ 281, 302, 250, 193, 191, 217, 238, 239, 215, 221, + /* 170 */ 306, 311, 272, 434, 308, 439, 312, 389, 443, 317, + /* 180 */ 444, 318, 408, 462, 342, 418, 390, 353, 374, 382, + /* 190 */ 375, 383, 384, 386, 483, 391, 388, 392, 385, 377, + /* 200 */ 393, 378, 394, 396, 397, 398, 399, 400, 426, 491, + /* 210 */ 496, 497, 498, 499, 500, 430, 492, 436, 493, 387, + /* 220 */ 395, 409, 505, 507, 415, 417, 409, 511, 512, 513, + /* 230 */ 514, 515, 516, 517, 519, 520, 521, 522, 523, 524, + /* 240 */ 428, 455, 518, 525, 473, 475, 534, }; #define YY_REDUCE_COUNT (132) #define YY_REDUCE_MIN (-254) -#define YY_REDUCE_MAX (257) +#define YY_REDUCE_MAX (253) static const short yy_reduce_ofst[] = { - /* 0 */ -198, -53, -254, -246, -150, -172, -192, -116, -91, -90, - /* 10 */ -207, -203, -248, -179, -162, -138, -218, -175, -19, -17, - /* 20 */ -81, -7, 3, -4, 52, 81, -13, -251, -227, -210, - /* 30 */ -143, -117, -70, -32, -24, -3, 54, 75, 80, 84, - /* 40 */ 85, 86, 87, 88, 90, 45, 103, 110, 112, 113, - /* 50 */ 114, 115, 116, 117, 120, 83, 147, 151, 93, 96, - /* 60 */ 121, 153, 154, 156, 157, 159, 160, 161, 162, 163, - /* 70 */ 164, 166, 167, 168, 170, 171, 172, 174, 175, 176, - /* 80 */ 177, 178, 179, 180, 181, 183, 184, 186, 187, 188, - /* 90 */ 189, 193, 194, 195, 196, 197, 198, 200, 136, 202, - /* 100 */ 203, 133, 138, 207, 146, 209, 158, 210, 214, 217, - /* 110 */ 212, 218, 221, 215, 219, 222, 224, 225, 227, 230, - /* 120 */ 232, 231, 233, 235, 239, 240, 242, 234, 237, 254, - /* 130 */ 238, 255, 257, + /* 0 */ -199, -52, -224, -237, -221, -150, -121, -193, -116, -91, + /* 10 */ 7, -196, -189, -235, -162, -35, -33, -137, -149, -158, + /* 20 */ -124, -21, -151, -77, 24, 47, -42, -254, -252, -222, + /* 30 */ -143, -84, -59, -45, -15, 28, 63, 78, 81, 89, + /* 40 */ 93, 94, 96, 97, 98, 21, 83, 114, 118, 119, + /* 50 */ 123, 125, 126, 121, 127, 117, 154, 158, 103, 104, + /* 60 */ 129, 161, 162, 164, 165, 167, 169, 170, 171, 172, + /* 70 */ 173, 174, 175, 176, 177, 179, 180, 182, 185, 187, + /* 80 */ 188, 189, 190, 192, 195, 196, 197, 198, 199, 200, + /* 90 */ 201, 202, 203, 205, 207, 208, 209, 210, 135, 211, + /* 100 */ 213, 132, 134, 214, 145, 148, 216, 219, 222, 220, + /* 110 */ 223, 226, 228, 224, 225, 227, 229, 230, 231, 233, + /* 120 */ 235, 234, 236, 240, 241, 242, 246, 237, 244, 243, + /* 130 */ 248, 249, 253, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 615, 667, 823, 823, 615, 615, 615, 615, 615, 615, - /* 10 */ 753, 633, 823, 615, 615, 615, 615, 615, 615, 615, - /* 20 */ 615, 615, 669, 656, 669, 669, 748, 615, 615, 615, - /* 30 */ 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, - /* 40 */ 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, - /* 50 */ 615, 615, 615, 615, 615, 615, 615, 615, 772, 772, - /* 60 */ 746, 615, 615, 615, 615, 615, 615, 615, 615, 615, - /* 70 */ 615, 615, 615, 615, 615, 615, 615, 615, 615, 654, - /* 80 */ 615, 652, 615, 615, 615, 615, 615, 615, 615, 615, - /* 90 */ 615, 615, 615, 615, 615, 641, 615, 615, 615, 635, - /* 100 */ 635, 615, 615, 635, 779, 783, 777, 765, 773, 764, - /* 110 */ 760, 759, 787, 615, 635, 635, 664, 664, 635, 685, - /* 120 */ 683, 681, 673, 679, 675, 677, 671, 635, 662, 635, - /* 130 */ 662, 700, 713, 615, 788, 822, 778, 806, 805, 818, - /* 140 */ 812, 811, 615, 810, 809, 808, 807, 615, 615, 615, - /* 150 */ 615, 814, 813, 615, 615, 615, 615, 615, 615, 615, - /* 160 */ 615, 615, 790, 784, 780, 615, 615, 615, 615, 615, - /* 170 */ 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, - /* 180 */ 615, 615, 615, 615, 615, 615, 615, 615, 745, 615, - /* 190 */ 615, 754, 615, 615, 615, 615, 615, 615, 774, 615, - /* 200 */ 766, 615, 615, 615, 615, 615, 615, 722, 615, 615, - /* 210 */ 615, 615, 615, 615, 615, 615, 615, 615, 688, 615, - /* 220 */ 615, 615, 615, 615, 615, 827, 615, 615, 615, 716, - /* 230 */ 825, 615, 615, 615, 615, 615, 615, 615, 615, 615, - /* 240 */ 615, 615, 639, 637, 615, 631, 615, + /* 0 */ 623, 675, 664, 835, 835, 623, 623, 623, 623, 623, + /* 10 */ 623, 765, 641, 835, 623, 623, 623, 623, 623, 623, + /* 20 */ 623, 623, 623, 677, 677, 677, 760, 623, 623, 623, + /* 30 */ 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, + /* 40 */ 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, + /* 50 */ 623, 623, 623, 623, 623, 623, 623, 623, 784, 784, + /* 60 */ 758, 623, 623, 623, 623, 623, 623, 623, 623, 623, + /* 70 */ 623, 623, 623, 623, 623, 623, 623, 623, 623, 662, + /* 80 */ 623, 660, 623, 623, 623, 623, 623, 623, 623, 623, + /* 90 */ 623, 623, 623, 623, 623, 649, 623, 623, 623, 643, + /* 100 */ 643, 623, 623, 643, 791, 795, 789, 777, 785, 776, + /* 110 */ 772, 771, 799, 623, 643, 643, 672, 672, 643, 693, + /* 120 */ 691, 689, 681, 687, 683, 685, 679, 643, 670, 643, + /* 130 */ 670, 708, 721, 623, 800, 834, 790, 818, 817, 830, + /* 140 */ 824, 823, 623, 822, 821, 820, 819, 623, 623, 623, + /* 150 */ 623, 826, 825, 623, 623, 623, 623, 623, 623, 623, + /* 160 */ 623, 623, 802, 796, 792, 623, 623, 623, 623, 623, + /* 170 */ 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, + /* 180 */ 623, 623, 623, 623, 623, 623, 623, 623, 757, 623, + /* 190 */ 623, 766, 623, 623, 623, 623, 623, 623, 786, 623, + /* 200 */ 778, 623, 623, 623, 623, 623, 623, 734, 623, 623, + /* 210 */ 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, + /* 220 */ 623, 839, 623, 623, 623, 728, 837, 623, 623, 623, + /* 230 */ 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, + /* 240 */ 696, 623, 647, 645, 623, 639, 623, }; /********** End of lemon-generated parsing tables *****************************/ @@ -514,14 +518,15 @@ static const YYCODETYPE yyFallback[] = { 0, /* CONNS => nothing */ 0, /* STATE => nothing */ 0, /* KEEP => nothing */ + 0, /* MAXTABLES => nothing */ 0, /* CACHE => nothing */ 0, /* REPLICA => nothing */ 0, /* DAYS => nothing */ - 0, /* ROWS => nothing */ - 0, /* ABLOCKS => nothing */ - 0, /* TBLOCKS => nothing */ + 0, /* MINROWS => nothing */ + 0, /* MAXROWS => nothing */ + 0, /* BLOCKS => nothing */ 0, /* CTIME => nothing */ - 0, /* CLOG => nothing */ + 0, /* WAL => nothing */ 0, /* COMP => nothing */ 0, /* PRECISION => nothing */ 0, /* LP => nothing */ @@ -803,187 +808,188 @@ static const char *const yyTokenName[] = { /* 83 */ "CONNS", /* 84 */ "STATE", /* 85 */ "KEEP", - /* 86 */ "CACHE", - /* 87 */ "REPLICA", - /* 88 */ "DAYS", - /* 89 */ "ROWS", - /* 90 */ "ABLOCKS", - /* 91 */ "TBLOCKS", - /* 92 */ "CTIME", - /* 93 */ "CLOG", - /* 94 */ "COMP", - /* 95 */ "PRECISION", - /* 96 */ "LP", - /* 97 */ "RP", - /* 98 */ "TAGS", - /* 99 */ "USING", - /* 100 */ "AS", - /* 101 */ "COMMA", - /* 102 */ "NULL", - /* 103 */ "SELECT", - /* 104 */ "UNION", - /* 105 */ "ALL", - /* 106 */ "FROM", - /* 107 */ "VARIABLE", - /* 108 */ "INTERVAL", - /* 109 */ "FILL", - /* 110 */ "SLIDING", - /* 111 */ "ORDER", - /* 112 */ "BY", - /* 113 */ "ASC", - /* 114 */ "DESC", - /* 115 */ "GROUP", - /* 116 */ "HAVING", - /* 117 */ "LIMIT", - /* 118 */ "OFFSET", - /* 119 */ "SLIMIT", - /* 120 */ "SOFFSET", - /* 121 */ "WHERE", - /* 122 */ "NOW", - /* 123 */ "RESET", - /* 124 */ "QUERY", - /* 125 */ "ADD", - /* 126 */ "COLUMN", - /* 127 */ "TAG", - /* 128 */ "CHANGE", - /* 129 */ "SET", - /* 130 */ "KILL", - /* 131 */ "CONNECTION", - /* 132 */ "COLON", - /* 133 */ "STREAM", - /* 134 */ "ABORT", - /* 135 */ "AFTER", - /* 136 */ "ATTACH", - /* 137 */ "BEFORE", - /* 138 */ "BEGIN", - /* 139 */ "CASCADE", - /* 140 */ "CLUSTER", - /* 141 */ "CONFLICT", - /* 142 */ "COPY", - /* 143 */ "DEFERRED", - /* 144 */ "DELIMITERS", - /* 145 */ "DETACH", - /* 146 */ "EACH", - /* 147 */ "END", - /* 148 */ "EXPLAIN", - /* 149 */ "FAIL", - /* 150 */ "FOR", - /* 151 */ "IGNORE", - /* 152 */ "IMMEDIATE", - /* 153 */ "INITIALLY", - /* 154 */ "INSTEAD", - /* 155 */ "MATCH", - /* 156 */ "KEY", - /* 157 */ "OF", - /* 158 */ "RAISE", - /* 159 */ "REPLACE", - /* 160 */ "RESTRICT", - /* 161 */ "ROW", - /* 162 */ "STATEMENT", - /* 163 */ "TRIGGER", - /* 164 */ "VIEW", - /* 165 */ "COUNT", - /* 166 */ "SUM", - /* 167 */ "AVG", - /* 168 */ "MIN", - /* 169 */ "MAX", - /* 170 */ "FIRST", - /* 171 */ "LAST", - /* 172 */ "TOP", - /* 173 */ "BOTTOM", - /* 174 */ "STDDEV", - /* 175 */ "PERCENTILE", - /* 176 */ "APERCENTILE", - /* 177 */ "LEASTSQUARES", - /* 178 */ "HISTOGRAM", - /* 179 */ "DIFF", - /* 180 */ "SPREAD", - /* 181 */ "TWA", - /* 182 */ "INTERP", - /* 183 */ "LAST_ROW", - /* 184 */ "RATE", - /* 185 */ "IRATE", - /* 186 */ "SUM_RATE", - /* 187 */ "SUM_IRATE", - /* 188 */ "AVG_RATE", - /* 189 */ "AVG_IRATE", - /* 190 */ "SEMI", - /* 191 */ "NONE", - /* 192 */ "PREV", - /* 193 */ "LINEAR", - /* 194 */ "IMPORT", - /* 195 */ "METRIC", - /* 196 */ "TBNAME", - /* 197 */ "JOIN", - /* 198 */ "METRICS", - /* 199 */ "STABLE", - /* 200 */ "INSERT", - /* 201 */ "INTO", - /* 202 */ "VALUES", - /* 203 */ "error", - /* 204 */ "program", - /* 205 */ "cmd", - /* 206 */ "dbPrefix", - /* 207 */ "ids", - /* 208 */ "cpxName", - /* 209 */ "ifexists", - /* 210 */ "alter_db_optr", - /* 211 */ "acct_optr", - /* 212 */ "ifnotexists", - /* 213 */ "db_optr", - /* 214 */ "pps", - /* 215 */ "tseries", - /* 216 */ "dbs", - /* 217 */ "streams", - /* 218 */ "storage", - /* 219 */ "qtime", - /* 220 */ "users", - /* 221 */ "conns", - /* 222 */ "state", - /* 223 */ "keep", - /* 224 */ "tagitemlist", - /* 225 */ "tables", - /* 226 */ "cache", - /* 227 */ "replica", - /* 228 */ "days", - /* 229 */ "rows", - /* 230 */ "ablocks", - /* 231 */ "tblocks", - /* 232 */ "ctime", - /* 233 */ "clog", - /* 234 */ "comp", - /* 235 */ "prec", - /* 236 */ "typename", - /* 237 */ "signed", - /* 238 */ "create_table_args", - /* 239 */ "columnlist", - /* 240 */ "select", - /* 241 */ "column", - /* 242 */ "tagitem", - /* 243 */ "selcollist", - /* 244 */ "from", - /* 245 */ "where_opt", - /* 246 */ "interval_opt", - /* 247 */ "fill_opt", - /* 248 */ "sliding_opt", - /* 249 */ "groupby_opt", - /* 250 */ "orderby_opt", - /* 251 */ "having_opt", - /* 252 */ "slimit_opt", - /* 253 */ "limit_opt", - /* 254 */ "union", - /* 255 */ "sclp", - /* 256 */ "expr", - /* 257 */ "as", - /* 258 */ "tablelist", - /* 259 */ "tmvar", - /* 260 */ "sortlist", - /* 261 */ "sortitem", - /* 262 */ "item", - /* 263 */ "sortorder", - /* 264 */ "grouplist", - /* 265 */ "exprlist", - /* 266 */ "expritem", + /* 86 */ "MAXTABLES", + /* 87 */ "CACHE", + /* 88 */ "REPLICA", + /* 89 */ "DAYS", + /* 90 */ "MINROWS", + /* 91 */ "MAXROWS", + /* 92 */ "BLOCKS", + /* 93 */ "CTIME", + /* 94 */ "WAL", + /* 95 */ "COMP", + /* 96 */ "PRECISION", + /* 97 */ "LP", + /* 98 */ "RP", + /* 99 */ "TAGS", + /* 100 */ "USING", + /* 101 */ "AS", + /* 102 */ "COMMA", + /* 103 */ "NULL", + /* 104 */ "SELECT", + /* 105 */ "UNION", + /* 106 */ "ALL", + /* 107 */ "FROM", + /* 108 */ "VARIABLE", + /* 109 */ "INTERVAL", + /* 110 */ "FILL", + /* 111 */ "SLIDING", + /* 112 */ "ORDER", + /* 113 */ "BY", + /* 114 */ "ASC", + /* 115 */ "DESC", + /* 116 */ "GROUP", + /* 117 */ "HAVING", + /* 118 */ "LIMIT", + /* 119 */ "OFFSET", + /* 120 */ "SLIMIT", + /* 121 */ "SOFFSET", + /* 122 */ "WHERE", + /* 123 */ "NOW", + /* 124 */ "RESET", + /* 125 */ "QUERY", + /* 126 */ "ADD", + /* 127 */ "COLUMN", + /* 128 */ "TAG", + /* 129 */ "CHANGE", + /* 130 */ "SET", + /* 131 */ "KILL", + /* 132 */ "CONNECTION", + /* 133 */ "COLON", + /* 134 */ "STREAM", + /* 135 */ "ABORT", + /* 136 */ "AFTER", + /* 137 */ "ATTACH", + /* 138 */ "BEFORE", + /* 139 */ "BEGIN", + /* 140 */ "CASCADE", + /* 141 */ "CLUSTER", + /* 142 */ "CONFLICT", + /* 143 */ "COPY", + /* 144 */ "DEFERRED", + /* 145 */ "DELIMITERS", + /* 146 */ "DETACH", + /* 147 */ "EACH", + /* 148 */ "END", + /* 149 */ "EXPLAIN", + /* 150 */ "FAIL", + /* 151 */ "FOR", + /* 152 */ "IGNORE", + /* 153 */ "IMMEDIATE", + /* 154 */ "INITIALLY", + /* 155 */ "INSTEAD", + /* 156 */ "MATCH", + /* 157 */ "KEY", + /* 158 */ "OF", + /* 159 */ "RAISE", + /* 160 */ "REPLACE", + /* 161 */ "RESTRICT", + /* 162 */ "ROW", + /* 163 */ "STATEMENT", + /* 164 */ "TRIGGER", + /* 165 */ "VIEW", + /* 166 */ "COUNT", + /* 167 */ "SUM", + /* 168 */ "AVG", + /* 169 */ "MIN", + /* 170 */ "MAX", + /* 171 */ "FIRST", + /* 172 */ "LAST", + /* 173 */ "TOP", + /* 174 */ "BOTTOM", + /* 175 */ "STDDEV", + /* 176 */ "PERCENTILE", + /* 177 */ "APERCENTILE", + /* 178 */ "LEASTSQUARES", + /* 179 */ "HISTOGRAM", + /* 180 */ "DIFF", + /* 181 */ "SPREAD", + /* 182 */ "TWA", + /* 183 */ "INTERP", + /* 184 */ "LAST_ROW", + /* 185 */ "RATE", + /* 186 */ "IRATE", + /* 187 */ "SUM_RATE", + /* 188 */ "SUM_IRATE", + /* 189 */ "AVG_RATE", + /* 190 */ "AVG_IRATE", + /* 191 */ "SEMI", + /* 192 */ "NONE", + /* 193 */ "PREV", + /* 194 */ "LINEAR", + /* 195 */ "IMPORT", + /* 196 */ "METRIC", + /* 197 */ "TBNAME", + /* 198 */ "JOIN", + /* 199 */ "METRICS", + /* 200 */ "STABLE", + /* 201 */ "INSERT", + /* 202 */ "INTO", + /* 203 */ "VALUES", + /* 204 */ "error", + /* 205 */ "program", + /* 206 */ "cmd", + /* 207 */ "dbPrefix", + /* 208 */ "ids", + /* 209 */ "cpxName", + /* 210 */ "ifexists", + /* 211 */ "alter_db_optr", + /* 212 */ "acct_optr", + /* 213 */ "ifnotexists", + /* 214 */ "db_optr", + /* 215 */ "pps", + /* 216 */ "tseries", + /* 217 */ "dbs", + /* 218 */ "streams", + /* 219 */ "storage", + /* 220 */ "qtime", + /* 221 */ "users", + /* 222 */ "conns", + /* 223 */ "state", + /* 224 */ "keep", + /* 225 */ "tagitemlist", + /* 226 */ "tables", + /* 227 */ "cache", + /* 228 */ "replica", + /* 229 */ "days", + /* 230 */ "minrows", + /* 231 */ "maxrows", + /* 232 */ "blocks", + /* 233 */ "ctime", + /* 234 */ "wal", + /* 235 */ "comp", + /* 236 */ "prec", + /* 237 */ "typename", + /* 238 */ "signed", + /* 239 */ "create_table_args", + /* 240 */ "columnlist", + /* 241 */ "select", + /* 242 */ "column", + /* 243 */ "tagitem", + /* 244 */ "selcollist", + /* 245 */ "from", + /* 246 */ "where_opt", + /* 247 */ "interval_opt", + /* 248 */ "fill_opt", + /* 249 */ "sliding_opt", + /* 250 */ "groupby_opt", + /* 251 */ "orderby_opt", + /* 252 */ "having_opt", + /* 253 */ "slimit_opt", + /* 254 */ "limit_opt", + /* 255 */ "union", + /* 256 */ "sclp", + /* 257 */ "expr", + /* 258 */ "as", + /* 259 */ "tablelist", + /* 260 */ "tmvar", + /* 261 */ "sortlist", + /* 262 */ "sortitem", + /* 263 */ "item", + /* 264 */ "sortorder", + /* 265 */ "grouplist", + /* 266 */ "exprlist", + /* 267 */ "expritem", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -1062,15 +1068,15 @@ static const char *const yyRuleName[] = { /* 68 */ "state ::= STATE ids", /* 69 */ "acct_optr ::= pps tseries storage streams qtime dbs users conns state", /* 70 */ "keep ::= KEEP tagitemlist", - /* 71 */ "tables ::= TABLES INTEGER", + /* 71 */ "tables ::= MAXTABLES INTEGER", /* 72 */ "cache ::= CACHE INTEGER", /* 73 */ "replica ::= REPLICA INTEGER", /* 74 */ "days ::= DAYS INTEGER", - /* 75 */ "rows ::= ROWS INTEGER", - /* 76 */ "ablocks ::= ABLOCKS ID", - /* 77 */ "tblocks ::= TBLOCKS INTEGER", + /* 75 */ "minrows ::= MINROWS INTEGER", + /* 76 */ "maxrows ::= MAXROWS INTEGER", + /* 77 */ "blocks ::= BLOCKS INTEGER", /* 78 */ "ctime ::= CTIME INTEGER", - /* 79 */ "clog ::= CLOG INTEGER", + /* 79 */ "wal ::= WAL INTEGER", /* 80 */ "comp ::= COMP INTEGER", /* 81 */ "prec ::= PRECISION STRING", /* 82 */ "db_optr ::=", @@ -1078,135 +1084,139 @@ static const char *const yyRuleName[] = { /* 84 */ "db_optr ::= db_optr cache", /* 85 */ "db_optr ::= db_optr replica", /* 86 */ "db_optr ::= db_optr days", - /* 87 */ "db_optr ::= db_optr rows", - /* 88 */ "db_optr ::= db_optr ablocks", - /* 89 */ "db_optr ::= db_optr tblocks", + /* 87 */ "db_optr ::= db_optr minrows", + /* 88 */ "db_optr ::= db_optr maxrows", + /* 89 */ "db_optr ::= db_optr blocks", /* 90 */ "db_optr ::= db_optr ctime", - /* 91 */ "db_optr ::= db_optr clog", + /* 91 */ "db_optr ::= db_optr wal", /* 92 */ "db_optr ::= db_optr comp", /* 93 */ "db_optr ::= db_optr prec", /* 94 */ "db_optr ::= db_optr keep", /* 95 */ "alter_db_optr ::=", /* 96 */ "alter_db_optr ::= alter_db_optr replica", /* 97 */ "alter_db_optr ::= alter_db_optr tables", - /* 98 */ "typename ::= ids", - /* 99 */ "typename ::= ids LP signed RP", - /* 100 */ "signed ::= INTEGER", - /* 101 */ "signed ::= PLUS INTEGER", - /* 102 */ "signed ::= MINUS INTEGER", - /* 103 */ "cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args", - /* 104 */ "create_table_args ::= LP columnlist RP", - /* 105 */ "create_table_args ::= LP columnlist RP TAGS LP columnlist RP", - /* 106 */ "create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP", - /* 107 */ "create_table_args ::= AS select", - /* 108 */ "columnlist ::= columnlist COMMA column", - /* 109 */ "columnlist ::= column", - /* 110 */ "column ::= ids typename", - /* 111 */ "tagitemlist ::= tagitemlist COMMA tagitem", - /* 112 */ "tagitemlist ::= tagitem", - /* 113 */ "tagitem ::= INTEGER", - /* 114 */ "tagitem ::= FLOAT", - /* 115 */ "tagitem ::= STRING", - /* 116 */ "tagitem ::= BOOL", - /* 117 */ "tagitem ::= NULL", - /* 118 */ "tagitem ::= MINUS INTEGER", - /* 119 */ "tagitem ::= MINUS FLOAT", - /* 120 */ "tagitem ::= PLUS INTEGER", - /* 121 */ "tagitem ::= PLUS FLOAT", - /* 122 */ "select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt", - /* 123 */ "union ::= select", - /* 124 */ "union ::= LP union RP", - /* 125 */ "union ::= union UNION ALL select", - /* 126 */ "union ::= union UNION ALL LP select RP", - /* 127 */ "cmd ::= union", - /* 128 */ "select ::= SELECT selcollist", - /* 129 */ "sclp ::= selcollist COMMA", - /* 130 */ "sclp ::=", - /* 131 */ "selcollist ::= sclp expr as", - /* 132 */ "selcollist ::= sclp STAR", - /* 133 */ "as ::= AS ids", - /* 134 */ "as ::= ids", - /* 135 */ "as ::=", - /* 136 */ "from ::= FROM tablelist", - /* 137 */ "tablelist ::= ids cpxName", - /* 138 */ "tablelist ::= tablelist COMMA ids cpxName", - /* 139 */ "tmvar ::= VARIABLE", - /* 140 */ "interval_opt ::= INTERVAL LP tmvar RP", - /* 141 */ "interval_opt ::=", - /* 142 */ "fill_opt ::=", - /* 143 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP", - /* 144 */ "fill_opt ::= FILL LP ID RP", - /* 145 */ "sliding_opt ::= SLIDING LP tmvar RP", - /* 146 */ "sliding_opt ::=", - /* 147 */ "orderby_opt ::=", - /* 148 */ "orderby_opt ::= ORDER BY sortlist", - /* 149 */ "sortlist ::= sortlist COMMA item sortorder", - /* 150 */ "sortlist ::= item sortorder", - /* 151 */ "item ::= ids cpxName", - /* 152 */ "sortorder ::= ASC", - /* 153 */ "sortorder ::= DESC", - /* 154 */ "sortorder ::=", - /* 155 */ "groupby_opt ::=", - /* 156 */ "groupby_opt ::= GROUP BY grouplist", - /* 157 */ "grouplist ::= grouplist COMMA item", - /* 158 */ "grouplist ::= item", - /* 159 */ "having_opt ::=", - /* 160 */ "having_opt ::= HAVING expr", - /* 161 */ "limit_opt ::=", - /* 162 */ "limit_opt ::= LIMIT signed", - /* 163 */ "limit_opt ::= LIMIT signed OFFSET signed", - /* 164 */ "limit_opt ::= LIMIT signed COMMA signed", - /* 165 */ "slimit_opt ::=", - /* 166 */ "slimit_opt ::= SLIMIT signed", - /* 167 */ "slimit_opt ::= SLIMIT signed SOFFSET signed", - /* 168 */ "slimit_opt ::= SLIMIT signed COMMA signed", - /* 169 */ "where_opt ::=", - /* 170 */ "where_opt ::= WHERE expr", - /* 171 */ "expr ::= LP expr RP", - /* 172 */ "expr ::= ID", - /* 173 */ "expr ::= ID DOT ID", - /* 174 */ "expr ::= ID DOT STAR", - /* 175 */ "expr ::= INTEGER", - /* 176 */ "expr ::= MINUS INTEGER", - /* 177 */ "expr ::= PLUS INTEGER", - /* 178 */ "expr ::= FLOAT", - /* 179 */ "expr ::= MINUS FLOAT", - /* 180 */ "expr ::= PLUS FLOAT", - /* 181 */ "expr ::= STRING", - /* 182 */ "expr ::= NOW", - /* 183 */ "expr ::= VARIABLE", - /* 184 */ "expr ::= BOOL", - /* 185 */ "expr ::= ID LP exprlist RP", - /* 186 */ "expr ::= ID LP STAR RP", - /* 187 */ "expr ::= expr AND expr", - /* 188 */ "expr ::= expr OR expr", - /* 189 */ "expr ::= expr LT expr", - /* 190 */ "expr ::= expr GT expr", - /* 191 */ "expr ::= expr LE expr", - /* 192 */ "expr ::= expr GE expr", - /* 193 */ "expr ::= expr NE expr", - /* 194 */ "expr ::= expr EQ expr", - /* 195 */ "expr ::= expr PLUS expr", - /* 196 */ "expr ::= expr MINUS expr", - /* 197 */ "expr ::= expr STAR expr", - /* 198 */ "expr ::= expr SLASH expr", - /* 199 */ "expr ::= expr REM expr", - /* 200 */ "expr ::= expr LIKE expr", - /* 201 */ "expr ::= expr IN LP exprlist RP", - /* 202 */ "exprlist ::= exprlist COMMA expritem", - /* 203 */ "exprlist ::= expritem", - /* 204 */ "expritem ::= expr", - /* 205 */ "expritem ::=", - /* 206 */ "cmd ::= RESET QUERY CACHE", - /* 207 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", - /* 208 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", - /* 209 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", - /* 210 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", - /* 211 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", - /* 212 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", - /* 213 */ "cmd ::= KILL CONNECTION IPTOKEN COLON INTEGER", - /* 214 */ "cmd ::= KILL STREAM IPTOKEN COLON INTEGER COLON INTEGER", - /* 215 */ "cmd ::= KILL QUERY IPTOKEN COLON INTEGER COLON INTEGER", + /* 98 */ "alter_db_optr ::= alter_db_optr keep", + /* 99 */ "alter_db_optr ::= alter_db_optr blocks", + /* 100 */ "alter_db_optr ::= alter_db_optr comp", + /* 101 */ "alter_db_optr ::= alter_db_optr wal", + /* 102 */ "typename ::= ids", + /* 103 */ "typename ::= ids LP signed RP", + /* 104 */ "signed ::= INTEGER", + /* 105 */ "signed ::= PLUS INTEGER", + /* 106 */ "signed ::= MINUS INTEGER", + /* 107 */ "cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args", + /* 108 */ "create_table_args ::= LP columnlist RP", + /* 109 */ "create_table_args ::= LP columnlist RP TAGS LP columnlist RP", + /* 110 */ "create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP", + /* 111 */ "create_table_args ::= AS select", + /* 112 */ "columnlist ::= columnlist COMMA column", + /* 113 */ "columnlist ::= column", + /* 114 */ "column ::= ids typename", + /* 115 */ "tagitemlist ::= tagitemlist COMMA tagitem", + /* 116 */ "tagitemlist ::= tagitem", + /* 117 */ "tagitem ::= INTEGER", + /* 118 */ "tagitem ::= FLOAT", + /* 119 */ "tagitem ::= STRING", + /* 120 */ "tagitem ::= BOOL", + /* 121 */ "tagitem ::= NULL", + /* 122 */ "tagitem ::= MINUS INTEGER", + /* 123 */ "tagitem ::= MINUS FLOAT", + /* 124 */ "tagitem ::= PLUS INTEGER", + /* 125 */ "tagitem ::= PLUS FLOAT", + /* 126 */ "select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt", + /* 127 */ "union ::= select", + /* 128 */ "union ::= LP union RP", + /* 129 */ "union ::= union UNION ALL select", + /* 130 */ "union ::= union UNION ALL LP select RP", + /* 131 */ "cmd ::= union", + /* 132 */ "select ::= SELECT selcollist", + /* 133 */ "sclp ::= selcollist COMMA", + /* 134 */ "sclp ::=", + /* 135 */ "selcollist ::= sclp expr as", + /* 136 */ "selcollist ::= sclp STAR", + /* 137 */ "as ::= AS ids", + /* 138 */ "as ::= ids", + /* 139 */ "as ::=", + /* 140 */ "from ::= FROM tablelist", + /* 141 */ "tablelist ::= ids cpxName", + /* 142 */ "tablelist ::= tablelist COMMA ids cpxName", + /* 143 */ "tmvar ::= VARIABLE", + /* 144 */ "interval_opt ::= INTERVAL LP tmvar RP", + /* 145 */ "interval_opt ::=", + /* 146 */ "fill_opt ::=", + /* 147 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP", + /* 148 */ "fill_opt ::= FILL LP ID RP", + /* 149 */ "sliding_opt ::= SLIDING LP tmvar RP", + /* 150 */ "sliding_opt ::=", + /* 151 */ "orderby_opt ::=", + /* 152 */ "orderby_opt ::= ORDER BY sortlist", + /* 153 */ "sortlist ::= sortlist COMMA item sortorder", + /* 154 */ "sortlist ::= item sortorder", + /* 155 */ "item ::= ids cpxName", + /* 156 */ "sortorder ::= ASC", + /* 157 */ "sortorder ::= DESC", + /* 158 */ "sortorder ::=", + /* 159 */ "groupby_opt ::=", + /* 160 */ "groupby_opt ::= GROUP BY grouplist", + /* 161 */ "grouplist ::= grouplist COMMA item", + /* 162 */ "grouplist ::= item", + /* 163 */ "having_opt ::=", + /* 164 */ "having_opt ::= HAVING expr", + /* 165 */ "limit_opt ::=", + /* 166 */ "limit_opt ::= LIMIT signed", + /* 167 */ "limit_opt ::= LIMIT signed OFFSET signed", + /* 168 */ "limit_opt ::= LIMIT signed COMMA signed", + /* 169 */ "slimit_opt ::=", + /* 170 */ "slimit_opt ::= SLIMIT signed", + /* 171 */ "slimit_opt ::= SLIMIT signed SOFFSET signed", + /* 172 */ "slimit_opt ::= SLIMIT signed COMMA signed", + /* 173 */ "where_opt ::=", + /* 174 */ "where_opt ::= WHERE expr", + /* 175 */ "expr ::= LP expr RP", + /* 176 */ "expr ::= ID", + /* 177 */ "expr ::= ID DOT ID", + /* 178 */ "expr ::= ID DOT STAR", + /* 179 */ "expr ::= INTEGER", + /* 180 */ "expr ::= MINUS INTEGER", + /* 181 */ "expr ::= PLUS INTEGER", + /* 182 */ "expr ::= FLOAT", + /* 183 */ "expr ::= MINUS FLOAT", + /* 184 */ "expr ::= PLUS FLOAT", + /* 185 */ "expr ::= STRING", + /* 186 */ "expr ::= NOW", + /* 187 */ "expr ::= VARIABLE", + /* 188 */ "expr ::= BOOL", + /* 189 */ "expr ::= ID LP exprlist RP", + /* 190 */ "expr ::= ID LP STAR RP", + /* 191 */ "expr ::= expr AND expr", + /* 192 */ "expr ::= expr OR expr", + /* 193 */ "expr ::= expr LT expr", + /* 194 */ "expr ::= expr GT expr", + /* 195 */ "expr ::= expr LE expr", + /* 196 */ "expr ::= expr GE expr", + /* 197 */ "expr ::= expr NE expr", + /* 198 */ "expr ::= expr EQ expr", + /* 199 */ "expr ::= expr PLUS expr", + /* 200 */ "expr ::= expr MINUS expr", + /* 201 */ "expr ::= expr STAR expr", + /* 202 */ "expr ::= expr SLASH expr", + /* 203 */ "expr ::= expr REM expr", + /* 204 */ "expr ::= expr LIKE expr", + /* 205 */ "expr ::= expr IN LP exprlist RP", + /* 206 */ "exprlist ::= exprlist COMMA expritem", + /* 207 */ "exprlist ::= expritem", + /* 208 */ "expritem ::= expr", + /* 209 */ "expritem ::=", + /* 210 */ "cmd ::= RESET QUERY CACHE", + /* 211 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", + /* 212 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", + /* 213 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", + /* 214 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", + /* 215 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", + /* 216 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", + /* 217 */ "cmd ::= KILL CONNECTION IPTOKEN COLON INTEGER", + /* 218 */ "cmd ::= KILL STREAM IPTOKEN COLON INTEGER COLON INTEGER", + /* 219 */ "cmd ::= KILL QUERY IPTOKEN COLON INTEGER COLON INTEGER", }; #endif /* NDEBUG */ @@ -1327,50 +1337,50 @@ static void yy_destructor( ** inside the C code. */ /********* Begin destructor definitions ***************************************/ - case 223: /* keep */ - case 224: /* tagitemlist */ - case 247: /* fill_opt */ - case 249: /* groupby_opt */ - case 250: /* orderby_opt */ - case 260: /* sortlist */ - case 264: /* grouplist */ + case 224: /* keep */ + case 225: /* tagitemlist */ + case 248: /* fill_opt */ + case 250: /* groupby_opt */ + case 251: /* orderby_opt */ + case 261: /* sortlist */ + case 265: /* grouplist */ { -tVariantListDestroy((yypminor->yy30)); +tVariantListDestroy((yypminor->yy456)); } break; - case 239: /* columnlist */ + case 240: /* columnlist */ { -tFieldListDestroy((yypminor->yy325)); +tFieldListDestroy((yypminor->yy503)); } break; - case 240: /* select */ + case 241: /* select */ { -doDestroyQuerySql((yypminor->yy444)); +doDestroyQuerySql((yypminor->yy392)); } break; - case 243: /* selcollist */ - case 255: /* sclp */ - case 265: /* exprlist */ + case 244: /* selcollist */ + case 256: /* sclp */ + case 266: /* exprlist */ { -tSQLExprListDestroy((yypminor->yy506)); +tSQLExprListDestroy((yypminor->yy10)); } break; - case 245: /* where_opt */ - case 251: /* having_opt */ - case 256: /* expr */ - case 266: /* expritem */ + case 246: /* where_opt */ + case 252: /* having_opt */ + case 257: /* expr */ + case 267: /* expritem */ { -tSQLExprDestroy((yypminor->yy388)); +tSQLExprDestroy((yypminor->yy2)); } break; - case 254: /* union */ + case 255: /* union */ { -destroyAllSelectClause((yypminor->yy309)); +destroyAllSelectClause((yypminor->yy145)); } break; - case 261: /* sortitem */ + case 262: /* sortitem */ { -tVariantDestroy(&(yypminor->yy380)); +tVariantDestroy(&(yypminor->yy442)); } break; /********* End destructor definitions *****************************************/ @@ -1664,222 +1674,226 @@ 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[] = { - { 204, -1 }, /* (0) program ::= cmd */ - { 205, -2 }, /* (1) cmd ::= SHOW DATABASES */ - { 205, -2 }, /* (2) cmd ::= SHOW MNODES */ - { 205, -2 }, /* (3) cmd ::= SHOW DNODES */ - { 205, -2 }, /* (4) cmd ::= SHOW ACCOUNTS */ - { 205, -2 }, /* (5) cmd ::= SHOW USERS */ - { 205, -2 }, /* (6) cmd ::= SHOW MODULES */ - { 205, -2 }, /* (7) cmd ::= SHOW QUERIES */ - { 205, -2 }, /* (8) cmd ::= SHOW CONNECTIONS */ - { 205, -2 }, /* (9) cmd ::= SHOW STREAMS */ - { 205, -2 }, /* (10) cmd ::= SHOW CONFIGS */ - { 205, -2 }, /* (11) cmd ::= SHOW SCORES */ - { 205, -2 }, /* (12) cmd ::= SHOW GRANTS */ - { 205, -2 }, /* (13) cmd ::= SHOW VNODES */ - { 205, -3 }, /* (14) cmd ::= SHOW VNODES IPTOKEN */ - { 206, 0 }, /* (15) dbPrefix ::= */ - { 206, -2 }, /* (16) dbPrefix ::= ids DOT */ - { 208, 0 }, /* (17) cpxName ::= */ - { 208, -2 }, /* (18) cpxName ::= DOT ids */ - { 205, -3 }, /* (19) cmd ::= SHOW dbPrefix TABLES */ - { 205, -5 }, /* (20) cmd ::= SHOW dbPrefix TABLES LIKE ids */ - { 205, -3 }, /* (21) cmd ::= SHOW dbPrefix STABLES */ - { 205, -5 }, /* (22) cmd ::= SHOW dbPrefix STABLES LIKE ids */ - { 205, -3 }, /* (23) cmd ::= SHOW dbPrefix VGROUPS */ - { 205, -4 }, /* (24) cmd ::= SHOW dbPrefix VGROUPS ids */ - { 205, -5 }, /* (25) cmd ::= DROP TABLE ifexists ids cpxName */ - { 205, -4 }, /* (26) cmd ::= DROP DATABASE ifexists ids */ - { 205, -3 }, /* (27) cmd ::= DROP DNODE ids */ - { 205, -3 }, /* (28) cmd ::= DROP USER ids */ - { 205, -3 }, /* (29) cmd ::= DROP ACCOUNT ids */ - { 205, -2 }, /* (30) cmd ::= USE ids */ - { 205, -3 }, /* (31) cmd ::= DESCRIBE ids cpxName */ - { 205, -5 }, /* (32) cmd ::= ALTER USER ids PASS ids */ - { 205, -5 }, /* (33) cmd ::= ALTER USER ids PRIVILEGE ids */ - { 205, -4 }, /* (34) cmd ::= ALTER DNODE ids ids */ - { 205, -5 }, /* (35) cmd ::= ALTER DNODE ids ids ids */ - { 205, -3 }, /* (36) cmd ::= ALTER LOCAL ids */ - { 205, -4 }, /* (37) cmd ::= ALTER LOCAL ids ids */ - { 205, -4 }, /* (38) cmd ::= ALTER DATABASE ids alter_db_optr */ - { 205, -4 }, /* (39) cmd ::= ALTER ACCOUNT ids acct_optr */ - { 205, -6 }, /* (40) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ - { 207, -1 }, /* (41) ids ::= ID */ - { 207, -1 }, /* (42) ids ::= STRING */ - { 209, -2 }, /* (43) ifexists ::= IF EXISTS */ - { 209, 0 }, /* (44) ifexists ::= */ - { 212, -3 }, /* (45) ifnotexists ::= IF NOT EXISTS */ - { 212, 0 }, /* (46) ifnotexists ::= */ - { 205, -3 }, /* (47) cmd ::= CREATE DNODE ids */ - { 205, -6 }, /* (48) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ - { 205, -5 }, /* (49) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ - { 205, -5 }, /* (50) cmd ::= CREATE USER ids PASS ids */ - { 214, 0 }, /* (51) pps ::= */ - { 214, -2 }, /* (52) pps ::= PPS INTEGER */ - { 215, 0 }, /* (53) tseries ::= */ - { 215, -2 }, /* (54) tseries ::= TSERIES INTEGER */ - { 216, 0 }, /* (55) dbs ::= */ - { 216, -2 }, /* (56) dbs ::= DBS INTEGER */ - { 217, 0 }, /* (57) streams ::= */ - { 217, -2 }, /* (58) streams ::= STREAMS INTEGER */ - { 218, 0 }, /* (59) storage ::= */ - { 218, -2 }, /* (60) storage ::= STORAGE INTEGER */ - { 219, 0 }, /* (61) qtime ::= */ - { 219, -2 }, /* (62) qtime ::= QTIME INTEGER */ - { 220, 0 }, /* (63) users ::= */ - { 220, -2 }, /* (64) users ::= USERS INTEGER */ - { 221, 0 }, /* (65) conns ::= */ - { 221, -2 }, /* (66) conns ::= CONNS INTEGER */ - { 222, 0 }, /* (67) state ::= */ - { 222, -2 }, /* (68) state ::= STATE ids */ - { 211, -9 }, /* (69) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ - { 223, -2 }, /* (70) keep ::= KEEP tagitemlist */ - { 225, -2 }, /* (71) tables ::= TABLES INTEGER */ - { 226, -2 }, /* (72) cache ::= CACHE INTEGER */ - { 227, -2 }, /* (73) replica ::= REPLICA INTEGER */ - { 228, -2 }, /* (74) days ::= DAYS INTEGER */ - { 229, -2 }, /* (75) rows ::= ROWS INTEGER */ - { 230, -2 }, /* (76) ablocks ::= ABLOCKS ID */ - { 231, -2 }, /* (77) tblocks ::= TBLOCKS INTEGER */ - { 232, -2 }, /* (78) ctime ::= CTIME INTEGER */ - { 233, -2 }, /* (79) clog ::= CLOG INTEGER */ - { 234, -2 }, /* (80) comp ::= COMP INTEGER */ - { 235, -2 }, /* (81) prec ::= PRECISION STRING */ - { 213, 0 }, /* (82) db_optr ::= */ - { 213, -2 }, /* (83) db_optr ::= db_optr tables */ - { 213, -2 }, /* (84) db_optr ::= db_optr cache */ - { 213, -2 }, /* (85) db_optr ::= db_optr replica */ - { 213, -2 }, /* (86) db_optr ::= db_optr days */ - { 213, -2 }, /* (87) db_optr ::= db_optr rows */ - { 213, -2 }, /* (88) db_optr ::= db_optr ablocks */ - { 213, -2 }, /* (89) db_optr ::= db_optr tblocks */ - { 213, -2 }, /* (90) db_optr ::= db_optr ctime */ - { 213, -2 }, /* (91) db_optr ::= db_optr clog */ - { 213, -2 }, /* (92) db_optr ::= db_optr comp */ - { 213, -2 }, /* (93) db_optr ::= db_optr prec */ - { 213, -2 }, /* (94) db_optr ::= db_optr keep */ - { 210, 0 }, /* (95) alter_db_optr ::= */ - { 210, -2 }, /* (96) alter_db_optr ::= alter_db_optr replica */ - { 210, -2 }, /* (97) alter_db_optr ::= alter_db_optr tables */ - { 236, -1 }, /* (98) typename ::= ids */ - { 236, -4 }, /* (99) typename ::= ids LP signed RP */ - { 237, -1 }, /* (100) signed ::= INTEGER */ - { 237, -2 }, /* (101) signed ::= PLUS INTEGER */ - { 237, -2 }, /* (102) signed ::= MINUS INTEGER */ - { 205, -6 }, /* (103) cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args */ - { 238, -3 }, /* (104) create_table_args ::= LP columnlist RP */ - { 238, -7 }, /* (105) create_table_args ::= LP columnlist RP TAGS LP columnlist RP */ - { 238, -7 }, /* (106) create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP */ - { 238, -2 }, /* (107) create_table_args ::= AS select */ - { 239, -3 }, /* (108) columnlist ::= columnlist COMMA column */ - { 239, -1 }, /* (109) columnlist ::= column */ - { 241, -2 }, /* (110) column ::= ids typename */ - { 224, -3 }, /* (111) tagitemlist ::= tagitemlist COMMA tagitem */ - { 224, -1 }, /* (112) tagitemlist ::= tagitem */ - { 242, -1 }, /* (113) tagitem ::= INTEGER */ - { 242, -1 }, /* (114) tagitem ::= FLOAT */ - { 242, -1 }, /* (115) tagitem ::= STRING */ - { 242, -1 }, /* (116) tagitem ::= BOOL */ - { 242, -1 }, /* (117) tagitem ::= NULL */ - { 242, -2 }, /* (118) tagitem ::= MINUS INTEGER */ - { 242, -2 }, /* (119) tagitem ::= MINUS FLOAT */ - { 242, -2 }, /* (120) tagitem ::= PLUS INTEGER */ - { 242, -2 }, /* (121) tagitem ::= PLUS FLOAT */ - { 240, -12 }, /* (122) select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */ - { 254, -1 }, /* (123) union ::= select */ - { 254, -3 }, /* (124) union ::= LP union RP */ - { 254, -4 }, /* (125) union ::= union UNION ALL select */ - { 254, -6 }, /* (126) union ::= union UNION ALL LP select RP */ - { 205, -1 }, /* (127) cmd ::= union */ - { 240, -2 }, /* (128) select ::= SELECT selcollist */ - { 255, -2 }, /* (129) sclp ::= selcollist COMMA */ - { 255, 0 }, /* (130) sclp ::= */ - { 243, -3 }, /* (131) selcollist ::= sclp expr as */ - { 243, -2 }, /* (132) selcollist ::= sclp STAR */ - { 257, -2 }, /* (133) as ::= AS ids */ - { 257, -1 }, /* (134) as ::= ids */ - { 257, 0 }, /* (135) as ::= */ - { 244, -2 }, /* (136) from ::= FROM tablelist */ - { 258, -2 }, /* (137) tablelist ::= ids cpxName */ - { 258, -4 }, /* (138) tablelist ::= tablelist COMMA ids cpxName */ - { 259, -1 }, /* (139) tmvar ::= VARIABLE */ - { 246, -4 }, /* (140) interval_opt ::= INTERVAL LP tmvar RP */ - { 246, 0 }, /* (141) interval_opt ::= */ - { 247, 0 }, /* (142) fill_opt ::= */ - { 247, -6 }, /* (143) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ - { 247, -4 }, /* (144) fill_opt ::= FILL LP ID RP */ - { 248, -4 }, /* (145) sliding_opt ::= SLIDING LP tmvar RP */ - { 248, 0 }, /* (146) sliding_opt ::= */ - { 250, 0 }, /* (147) orderby_opt ::= */ - { 250, -3 }, /* (148) orderby_opt ::= ORDER BY sortlist */ - { 260, -4 }, /* (149) sortlist ::= sortlist COMMA item sortorder */ - { 260, -2 }, /* (150) sortlist ::= item sortorder */ - { 262, -2 }, /* (151) item ::= ids cpxName */ - { 263, -1 }, /* (152) sortorder ::= ASC */ - { 263, -1 }, /* (153) sortorder ::= DESC */ - { 263, 0 }, /* (154) sortorder ::= */ - { 249, 0 }, /* (155) groupby_opt ::= */ - { 249, -3 }, /* (156) groupby_opt ::= GROUP BY grouplist */ - { 264, -3 }, /* (157) grouplist ::= grouplist COMMA item */ - { 264, -1 }, /* (158) grouplist ::= item */ - { 251, 0 }, /* (159) having_opt ::= */ - { 251, -2 }, /* (160) having_opt ::= HAVING expr */ - { 253, 0 }, /* (161) limit_opt ::= */ - { 253, -2 }, /* (162) limit_opt ::= LIMIT signed */ - { 253, -4 }, /* (163) limit_opt ::= LIMIT signed OFFSET signed */ - { 253, -4 }, /* (164) limit_opt ::= LIMIT signed COMMA signed */ - { 252, 0 }, /* (165) slimit_opt ::= */ - { 252, -2 }, /* (166) slimit_opt ::= SLIMIT signed */ - { 252, -4 }, /* (167) slimit_opt ::= SLIMIT signed SOFFSET signed */ - { 252, -4 }, /* (168) slimit_opt ::= SLIMIT signed COMMA signed */ - { 245, 0 }, /* (169) where_opt ::= */ - { 245, -2 }, /* (170) where_opt ::= WHERE expr */ - { 256, -3 }, /* (171) expr ::= LP expr RP */ - { 256, -1 }, /* (172) expr ::= ID */ - { 256, -3 }, /* (173) expr ::= ID DOT ID */ - { 256, -3 }, /* (174) expr ::= ID DOT STAR */ - { 256, -1 }, /* (175) expr ::= INTEGER */ - { 256, -2 }, /* (176) expr ::= MINUS INTEGER */ - { 256, -2 }, /* (177) expr ::= PLUS INTEGER */ - { 256, -1 }, /* (178) expr ::= FLOAT */ - { 256, -2 }, /* (179) expr ::= MINUS FLOAT */ - { 256, -2 }, /* (180) expr ::= PLUS FLOAT */ - { 256, -1 }, /* (181) expr ::= STRING */ - { 256, -1 }, /* (182) expr ::= NOW */ - { 256, -1 }, /* (183) expr ::= VARIABLE */ - { 256, -1 }, /* (184) expr ::= BOOL */ - { 256, -4 }, /* (185) expr ::= ID LP exprlist RP */ - { 256, -4 }, /* (186) expr ::= ID LP STAR RP */ - { 256, -3 }, /* (187) expr ::= expr AND expr */ - { 256, -3 }, /* (188) expr ::= expr OR expr */ - { 256, -3 }, /* (189) expr ::= expr LT expr */ - { 256, -3 }, /* (190) expr ::= expr GT expr */ - { 256, -3 }, /* (191) expr ::= expr LE expr */ - { 256, -3 }, /* (192) expr ::= expr GE expr */ - { 256, -3 }, /* (193) expr ::= expr NE expr */ - { 256, -3 }, /* (194) expr ::= expr EQ expr */ - { 256, -3 }, /* (195) expr ::= expr PLUS expr */ - { 256, -3 }, /* (196) expr ::= expr MINUS expr */ - { 256, -3 }, /* (197) expr ::= expr STAR expr */ - { 256, -3 }, /* (198) expr ::= expr SLASH expr */ - { 256, -3 }, /* (199) expr ::= expr REM expr */ - { 256, -3 }, /* (200) expr ::= expr LIKE expr */ - { 256, -5 }, /* (201) expr ::= expr IN LP exprlist RP */ - { 265, -3 }, /* (202) exprlist ::= exprlist COMMA expritem */ - { 265, -1 }, /* (203) exprlist ::= expritem */ - { 266, -1 }, /* (204) expritem ::= expr */ - { 266, 0 }, /* (205) expritem ::= */ - { 205, -3 }, /* (206) cmd ::= RESET QUERY CACHE */ - { 205, -7 }, /* (207) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - { 205, -7 }, /* (208) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - { 205, -7 }, /* (209) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - { 205, -7 }, /* (210) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - { 205, -8 }, /* (211) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - { 205, -9 }, /* (212) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - { 205, -5 }, /* (213) cmd ::= KILL CONNECTION IPTOKEN COLON INTEGER */ - { 205, -7 }, /* (214) cmd ::= KILL STREAM IPTOKEN COLON INTEGER COLON INTEGER */ - { 205, -7 }, /* (215) cmd ::= KILL QUERY IPTOKEN COLON INTEGER COLON INTEGER */ + { 205, -1 }, /* (0) program ::= cmd */ + { 206, -2 }, /* (1) cmd ::= SHOW DATABASES */ + { 206, -2 }, /* (2) cmd ::= SHOW MNODES */ + { 206, -2 }, /* (3) cmd ::= SHOW DNODES */ + { 206, -2 }, /* (4) cmd ::= SHOW ACCOUNTS */ + { 206, -2 }, /* (5) cmd ::= SHOW USERS */ + { 206, -2 }, /* (6) cmd ::= SHOW MODULES */ + { 206, -2 }, /* (7) cmd ::= SHOW QUERIES */ + { 206, -2 }, /* (8) cmd ::= SHOW CONNECTIONS */ + { 206, -2 }, /* (9) cmd ::= SHOW STREAMS */ + { 206, -2 }, /* (10) cmd ::= SHOW CONFIGS */ + { 206, -2 }, /* (11) cmd ::= SHOW SCORES */ + { 206, -2 }, /* (12) cmd ::= SHOW GRANTS */ + { 206, -2 }, /* (13) cmd ::= SHOW VNODES */ + { 206, -3 }, /* (14) cmd ::= SHOW VNODES IPTOKEN */ + { 207, 0 }, /* (15) dbPrefix ::= */ + { 207, -2 }, /* (16) dbPrefix ::= ids DOT */ + { 209, 0 }, /* (17) cpxName ::= */ + { 209, -2 }, /* (18) cpxName ::= DOT ids */ + { 206, -3 }, /* (19) cmd ::= SHOW dbPrefix TABLES */ + { 206, -5 }, /* (20) cmd ::= SHOW dbPrefix TABLES LIKE ids */ + { 206, -3 }, /* (21) cmd ::= SHOW dbPrefix STABLES */ + { 206, -5 }, /* (22) cmd ::= SHOW dbPrefix STABLES LIKE ids */ + { 206, -3 }, /* (23) cmd ::= SHOW dbPrefix VGROUPS */ + { 206, -4 }, /* (24) cmd ::= SHOW dbPrefix VGROUPS ids */ + { 206, -5 }, /* (25) cmd ::= DROP TABLE ifexists ids cpxName */ + { 206, -4 }, /* (26) cmd ::= DROP DATABASE ifexists ids */ + { 206, -3 }, /* (27) cmd ::= DROP DNODE ids */ + { 206, -3 }, /* (28) cmd ::= DROP USER ids */ + { 206, -3 }, /* (29) cmd ::= DROP ACCOUNT ids */ + { 206, -2 }, /* (30) cmd ::= USE ids */ + { 206, -3 }, /* (31) cmd ::= DESCRIBE ids cpxName */ + { 206, -5 }, /* (32) cmd ::= ALTER USER ids PASS ids */ + { 206, -5 }, /* (33) cmd ::= ALTER USER ids PRIVILEGE ids */ + { 206, -4 }, /* (34) cmd ::= ALTER DNODE ids ids */ + { 206, -5 }, /* (35) cmd ::= ALTER DNODE ids ids ids */ + { 206, -3 }, /* (36) cmd ::= ALTER LOCAL ids */ + { 206, -4 }, /* (37) cmd ::= ALTER LOCAL ids ids */ + { 206, -4 }, /* (38) cmd ::= ALTER DATABASE ids alter_db_optr */ + { 206, -4 }, /* (39) cmd ::= ALTER ACCOUNT ids acct_optr */ + { 206, -6 }, /* (40) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ + { 208, -1 }, /* (41) ids ::= ID */ + { 208, -1 }, /* (42) ids ::= STRING */ + { 210, -2 }, /* (43) ifexists ::= IF EXISTS */ + { 210, 0 }, /* (44) ifexists ::= */ + { 213, -3 }, /* (45) ifnotexists ::= IF NOT EXISTS */ + { 213, 0 }, /* (46) ifnotexists ::= */ + { 206, -3 }, /* (47) cmd ::= CREATE DNODE ids */ + { 206, -6 }, /* (48) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ + { 206, -5 }, /* (49) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ + { 206, -5 }, /* (50) cmd ::= CREATE USER ids PASS ids */ + { 215, 0 }, /* (51) pps ::= */ + { 215, -2 }, /* (52) pps ::= PPS INTEGER */ + { 216, 0 }, /* (53) tseries ::= */ + { 216, -2 }, /* (54) tseries ::= TSERIES INTEGER */ + { 217, 0 }, /* (55) dbs ::= */ + { 217, -2 }, /* (56) dbs ::= DBS INTEGER */ + { 218, 0 }, /* (57) streams ::= */ + { 218, -2 }, /* (58) streams ::= STREAMS INTEGER */ + { 219, 0 }, /* (59) storage ::= */ + { 219, -2 }, /* (60) storage ::= STORAGE INTEGER */ + { 220, 0 }, /* (61) qtime ::= */ + { 220, -2 }, /* (62) qtime ::= QTIME INTEGER */ + { 221, 0 }, /* (63) users ::= */ + { 221, -2 }, /* (64) users ::= USERS INTEGER */ + { 222, 0 }, /* (65) conns ::= */ + { 222, -2 }, /* (66) conns ::= CONNS INTEGER */ + { 223, 0 }, /* (67) state ::= */ + { 223, -2 }, /* (68) state ::= STATE ids */ + { 212, -9 }, /* (69) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ + { 224, -2 }, /* (70) keep ::= KEEP tagitemlist */ + { 226, -2 }, /* (71) tables ::= MAXTABLES INTEGER */ + { 227, -2 }, /* (72) cache ::= CACHE INTEGER */ + { 228, -2 }, /* (73) replica ::= REPLICA INTEGER */ + { 229, -2 }, /* (74) days ::= DAYS INTEGER */ + { 230, -2 }, /* (75) minrows ::= MINROWS INTEGER */ + { 231, -2 }, /* (76) maxrows ::= MAXROWS INTEGER */ + { 232, -2 }, /* (77) blocks ::= BLOCKS INTEGER */ + { 233, -2 }, /* (78) ctime ::= CTIME INTEGER */ + { 234, -2 }, /* (79) wal ::= WAL INTEGER */ + { 235, -2 }, /* (80) comp ::= COMP INTEGER */ + { 236, -2 }, /* (81) prec ::= PRECISION STRING */ + { 214, 0 }, /* (82) db_optr ::= */ + { 214, -2 }, /* (83) db_optr ::= db_optr tables */ + { 214, -2 }, /* (84) db_optr ::= db_optr cache */ + { 214, -2 }, /* (85) db_optr ::= db_optr replica */ + { 214, -2 }, /* (86) db_optr ::= db_optr days */ + { 214, -2 }, /* (87) db_optr ::= db_optr minrows */ + { 214, -2 }, /* (88) db_optr ::= db_optr maxrows */ + { 214, -2 }, /* (89) db_optr ::= db_optr blocks */ + { 214, -2 }, /* (90) db_optr ::= db_optr ctime */ + { 214, -2 }, /* (91) db_optr ::= db_optr wal */ + { 214, -2 }, /* (92) db_optr ::= db_optr comp */ + { 214, -2 }, /* (93) db_optr ::= db_optr prec */ + { 214, -2 }, /* (94) db_optr ::= db_optr keep */ + { 211, 0 }, /* (95) alter_db_optr ::= */ + { 211, -2 }, /* (96) alter_db_optr ::= alter_db_optr replica */ + { 211, -2 }, /* (97) alter_db_optr ::= alter_db_optr tables */ + { 211, -2 }, /* (98) alter_db_optr ::= alter_db_optr keep */ + { 211, -2 }, /* (99) alter_db_optr ::= alter_db_optr blocks */ + { 211, -2 }, /* (100) alter_db_optr ::= alter_db_optr comp */ + { 211, -2 }, /* (101) alter_db_optr ::= alter_db_optr wal */ + { 237, -1 }, /* (102) typename ::= ids */ + { 237, -4 }, /* (103) typename ::= ids LP signed RP */ + { 238, -1 }, /* (104) signed ::= INTEGER */ + { 238, -2 }, /* (105) signed ::= PLUS INTEGER */ + { 238, -2 }, /* (106) signed ::= MINUS INTEGER */ + { 206, -6 }, /* (107) cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args */ + { 239, -3 }, /* (108) create_table_args ::= LP columnlist RP */ + { 239, -7 }, /* (109) create_table_args ::= LP columnlist RP TAGS LP columnlist RP */ + { 239, -7 }, /* (110) create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP */ + { 239, -2 }, /* (111) create_table_args ::= AS select */ + { 240, -3 }, /* (112) columnlist ::= columnlist COMMA column */ + { 240, -1 }, /* (113) columnlist ::= column */ + { 242, -2 }, /* (114) column ::= ids typename */ + { 225, -3 }, /* (115) tagitemlist ::= tagitemlist COMMA tagitem */ + { 225, -1 }, /* (116) tagitemlist ::= tagitem */ + { 243, -1 }, /* (117) tagitem ::= INTEGER */ + { 243, -1 }, /* (118) tagitem ::= FLOAT */ + { 243, -1 }, /* (119) tagitem ::= STRING */ + { 243, -1 }, /* (120) tagitem ::= BOOL */ + { 243, -1 }, /* (121) tagitem ::= NULL */ + { 243, -2 }, /* (122) tagitem ::= MINUS INTEGER */ + { 243, -2 }, /* (123) tagitem ::= MINUS FLOAT */ + { 243, -2 }, /* (124) tagitem ::= PLUS INTEGER */ + { 243, -2 }, /* (125) tagitem ::= PLUS FLOAT */ + { 241, -12 }, /* (126) select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */ + { 255, -1 }, /* (127) union ::= select */ + { 255, -3 }, /* (128) union ::= LP union RP */ + { 255, -4 }, /* (129) union ::= union UNION ALL select */ + { 255, -6 }, /* (130) union ::= union UNION ALL LP select RP */ + { 206, -1 }, /* (131) cmd ::= union */ + { 241, -2 }, /* (132) select ::= SELECT selcollist */ + { 256, -2 }, /* (133) sclp ::= selcollist COMMA */ + { 256, 0 }, /* (134) sclp ::= */ + { 244, -3 }, /* (135) selcollist ::= sclp expr as */ + { 244, -2 }, /* (136) selcollist ::= sclp STAR */ + { 258, -2 }, /* (137) as ::= AS ids */ + { 258, -1 }, /* (138) as ::= ids */ + { 258, 0 }, /* (139) as ::= */ + { 245, -2 }, /* (140) from ::= FROM tablelist */ + { 259, -2 }, /* (141) tablelist ::= ids cpxName */ + { 259, -4 }, /* (142) tablelist ::= tablelist COMMA ids cpxName */ + { 260, -1 }, /* (143) tmvar ::= VARIABLE */ + { 247, -4 }, /* (144) interval_opt ::= INTERVAL LP tmvar RP */ + { 247, 0 }, /* (145) interval_opt ::= */ + { 248, 0 }, /* (146) fill_opt ::= */ + { 248, -6 }, /* (147) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + { 248, -4 }, /* (148) fill_opt ::= FILL LP ID RP */ + { 249, -4 }, /* (149) sliding_opt ::= SLIDING LP tmvar RP */ + { 249, 0 }, /* (150) sliding_opt ::= */ + { 251, 0 }, /* (151) orderby_opt ::= */ + { 251, -3 }, /* (152) orderby_opt ::= ORDER BY sortlist */ + { 261, -4 }, /* (153) sortlist ::= sortlist COMMA item sortorder */ + { 261, -2 }, /* (154) sortlist ::= item sortorder */ + { 263, -2 }, /* (155) item ::= ids cpxName */ + { 264, -1 }, /* (156) sortorder ::= ASC */ + { 264, -1 }, /* (157) sortorder ::= DESC */ + { 264, 0 }, /* (158) sortorder ::= */ + { 250, 0 }, /* (159) groupby_opt ::= */ + { 250, -3 }, /* (160) groupby_opt ::= GROUP BY grouplist */ + { 265, -3 }, /* (161) grouplist ::= grouplist COMMA item */ + { 265, -1 }, /* (162) grouplist ::= item */ + { 252, 0 }, /* (163) having_opt ::= */ + { 252, -2 }, /* (164) having_opt ::= HAVING expr */ + { 254, 0 }, /* (165) limit_opt ::= */ + { 254, -2 }, /* (166) limit_opt ::= LIMIT signed */ + { 254, -4 }, /* (167) limit_opt ::= LIMIT signed OFFSET signed */ + { 254, -4 }, /* (168) limit_opt ::= LIMIT signed COMMA signed */ + { 253, 0 }, /* (169) slimit_opt ::= */ + { 253, -2 }, /* (170) slimit_opt ::= SLIMIT signed */ + { 253, -4 }, /* (171) slimit_opt ::= SLIMIT signed SOFFSET signed */ + { 253, -4 }, /* (172) slimit_opt ::= SLIMIT signed COMMA signed */ + { 246, 0 }, /* (173) where_opt ::= */ + { 246, -2 }, /* (174) where_opt ::= WHERE expr */ + { 257, -3 }, /* (175) expr ::= LP expr RP */ + { 257, -1 }, /* (176) expr ::= ID */ + { 257, -3 }, /* (177) expr ::= ID DOT ID */ + { 257, -3 }, /* (178) expr ::= ID DOT STAR */ + { 257, -1 }, /* (179) expr ::= INTEGER */ + { 257, -2 }, /* (180) expr ::= MINUS INTEGER */ + { 257, -2 }, /* (181) expr ::= PLUS INTEGER */ + { 257, -1 }, /* (182) expr ::= FLOAT */ + { 257, -2 }, /* (183) expr ::= MINUS FLOAT */ + { 257, -2 }, /* (184) expr ::= PLUS FLOAT */ + { 257, -1 }, /* (185) expr ::= STRING */ + { 257, -1 }, /* (186) expr ::= NOW */ + { 257, -1 }, /* (187) expr ::= VARIABLE */ + { 257, -1 }, /* (188) expr ::= BOOL */ + { 257, -4 }, /* (189) expr ::= ID LP exprlist RP */ + { 257, -4 }, /* (190) expr ::= ID LP STAR RP */ + { 257, -3 }, /* (191) expr ::= expr AND expr */ + { 257, -3 }, /* (192) expr ::= expr OR expr */ + { 257, -3 }, /* (193) expr ::= expr LT expr */ + { 257, -3 }, /* (194) expr ::= expr GT expr */ + { 257, -3 }, /* (195) expr ::= expr LE expr */ + { 257, -3 }, /* (196) expr ::= expr GE expr */ + { 257, -3 }, /* (197) expr ::= expr NE expr */ + { 257, -3 }, /* (198) expr ::= expr EQ expr */ + { 257, -3 }, /* (199) expr ::= expr PLUS expr */ + { 257, -3 }, /* (200) expr ::= expr MINUS expr */ + { 257, -3 }, /* (201) expr ::= expr STAR expr */ + { 257, -3 }, /* (202) expr ::= expr SLASH expr */ + { 257, -3 }, /* (203) expr ::= expr REM expr */ + { 257, -3 }, /* (204) expr ::= expr LIKE expr */ + { 257, -5 }, /* (205) expr ::= expr IN LP exprlist RP */ + { 266, -3 }, /* (206) exprlist ::= exprlist COMMA expritem */ + { 266, -1 }, /* (207) exprlist ::= expritem */ + { 267, -1 }, /* (208) expritem ::= expr */ + { 267, 0 }, /* (209) expritem ::= */ + { 206, -3 }, /* (210) cmd ::= RESET QUERY CACHE */ + { 206, -7 }, /* (211) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + { 206, -7 }, /* (212) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + { 206, -7 }, /* (213) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + { 206, -7 }, /* (214) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + { 206, -8 }, /* (215) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + { 206, -9 }, /* (216) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + { 206, -5 }, /* (217) cmd ::= KILL CONNECTION IPTOKEN COLON INTEGER */ + { 206, -7 }, /* (218) cmd ::= KILL STREAM IPTOKEN COLON INTEGER COLON INTEGER */ + { 206, -7 }, /* (219) cmd ::= KILL QUERY IPTOKEN COLON INTEGER COLON INTEGER */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -2099,13 +2113,13 @@ static void yy_reduce( { setDCLSQLElems(pInfo, TSDB_SQL_CFG_LOCAL, 2, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; case 38: /* cmd ::= ALTER DATABASE ids alter_db_optr */ -{ SSQLToken t = {0}; setCreateDBSQL(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy532, &t);} +{ SSQLToken t = {0}; setCreateDBSQL(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy478, &t);} break; case 39: /* cmd ::= ALTER ACCOUNT ids acct_optr */ -{ setCreateAcctSQL(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy239);} +{ setCreateAcctSQL(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy63);} break; case 40: /* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ -{ setCreateAcctSQL(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy239);} +{ setCreateAcctSQL(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy63);} break; case 41: /* ids ::= ID */ case 42: /* ids ::= STRING */ yytestcase(yyruleno==42); @@ -2126,10 +2140,10 @@ static void yy_reduce( { setDCLSQLElems(pInfo, TSDB_SQL_CREATE_DNODE, 1, &yymsp[0].minor.yy0);} break; case 48: /* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ -{ setCreateAcctSQL(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy239);} +{ setCreateAcctSQL(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy63);} break; case 49: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */ -{ setCreateDBSQL(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy532, &yymsp[-2].minor.yy0);} +{ setCreateDBSQL(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy478, &yymsp[-2].minor.yy0);} break; case 50: /* cmd ::= CREATE USER ids PASS ids */ { setCreateUserSQL(pInfo, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);} @@ -2158,508 +2172,512 @@ static void yy_reduce( break; case 69: /* acct_optr ::= pps tseries storage streams qtime dbs users conns state */ { - yylhsminor.yy239.maxUsers = (yymsp[-2].minor.yy0.n>0)?atoi(yymsp[-2].minor.yy0.z):-1; - yylhsminor.yy239.maxDbs = (yymsp[-3].minor.yy0.n>0)?atoi(yymsp[-3].minor.yy0.z):-1; - yylhsminor.yy239.maxTimeSeries = (yymsp[-7].minor.yy0.n>0)?atoi(yymsp[-7].minor.yy0.z):-1; - yylhsminor.yy239.maxStreams = (yymsp[-5].minor.yy0.n>0)?atoi(yymsp[-5].minor.yy0.z):-1; - yylhsminor.yy239.maxPointsPerSecond = (yymsp[-8].minor.yy0.n>0)?atoi(yymsp[-8].minor.yy0.z):-1; - yylhsminor.yy239.maxStorage = (yymsp[-6].minor.yy0.n>0)?strtoll(yymsp[-6].minor.yy0.z, NULL, 10):-1; - yylhsminor.yy239.maxQueryTime = (yymsp[-4].minor.yy0.n>0)?strtoll(yymsp[-4].minor.yy0.z, NULL, 10):-1; - yylhsminor.yy239.maxConnections = (yymsp[-1].minor.yy0.n>0)?atoi(yymsp[-1].minor.yy0.z):-1; - yylhsminor.yy239.stat = yymsp[0].minor.yy0; + yylhsminor.yy63.maxUsers = (yymsp[-2].minor.yy0.n>0)?atoi(yymsp[-2].minor.yy0.z):-1; + yylhsminor.yy63.maxDbs = (yymsp[-3].minor.yy0.n>0)?atoi(yymsp[-3].minor.yy0.z):-1; + yylhsminor.yy63.maxTimeSeries = (yymsp[-7].minor.yy0.n>0)?atoi(yymsp[-7].minor.yy0.z):-1; + yylhsminor.yy63.maxStreams = (yymsp[-5].minor.yy0.n>0)?atoi(yymsp[-5].minor.yy0.z):-1; + yylhsminor.yy63.maxPointsPerSecond = (yymsp[-8].minor.yy0.n>0)?atoi(yymsp[-8].minor.yy0.z):-1; + yylhsminor.yy63.maxStorage = (yymsp[-6].minor.yy0.n>0)?strtoll(yymsp[-6].minor.yy0.z, NULL, 10):-1; + yylhsminor.yy63.maxQueryTime = (yymsp[-4].minor.yy0.n>0)?strtoll(yymsp[-4].minor.yy0.z, NULL, 10):-1; + yylhsminor.yy63.maxConnections = (yymsp[-1].minor.yy0.n>0)?atoi(yymsp[-1].minor.yy0.z):-1; + yylhsminor.yy63.stat = yymsp[0].minor.yy0; } - yymsp[-8].minor.yy239 = yylhsminor.yy239; + yymsp[-8].minor.yy63 = yylhsminor.yy63; break; case 70: /* keep ::= KEEP tagitemlist */ -{ yymsp[-1].minor.yy30 = yymsp[0].minor.yy30; } +{ yymsp[-1].minor.yy456 = yymsp[0].minor.yy456; } break; - case 71: /* tables ::= TABLES INTEGER */ + case 71: /* tables ::= MAXTABLES INTEGER */ case 72: /* cache ::= CACHE INTEGER */ yytestcase(yyruleno==72); case 73: /* replica ::= REPLICA INTEGER */ yytestcase(yyruleno==73); case 74: /* days ::= DAYS INTEGER */ yytestcase(yyruleno==74); - case 75: /* rows ::= ROWS INTEGER */ yytestcase(yyruleno==75); - case 76: /* ablocks ::= ABLOCKS ID */ yytestcase(yyruleno==76); - case 77: /* tblocks ::= TBLOCKS INTEGER */ yytestcase(yyruleno==77); + case 75: /* minrows ::= MINROWS INTEGER */ yytestcase(yyruleno==75); + case 76: /* maxrows ::= MAXROWS INTEGER */ yytestcase(yyruleno==76); + case 77: /* blocks ::= BLOCKS INTEGER */ yytestcase(yyruleno==77); case 78: /* ctime ::= CTIME INTEGER */ yytestcase(yyruleno==78); - case 79: /* clog ::= CLOG INTEGER */ yytestcase(yyruleno==79); + case 79: /* wal ::= WAL INTEGER */ yytestcase(yyruleno==79); case 80: /* comp ::= COMP INTEGER */ yytestcase(yyruleno==80); case 81: /* prec ::= PRECISION STRING */ yytestcase(yyruleno==81); { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } break; case 82: /* db_optr ::= */ -{setDefaultCreateDbOption(&yymsp[1].minor.yy532);} +{setDefaultCreateDbOption(&yymsp[1].minor.yy478);} break; case 83: /* db_optr ::= db_optr tables */ case 97: /* alter_db_optr ::= alter_db_optr tables */ yytestcase(yyruleno==97); -{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.tablesPerVnode = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy532 = yylhsminor.yy532; +{ yylhsminor.yy478 = yymsp[-1].minor.yy478; yylhsminor.yy478.maxTablesPerVnode = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy478 = yylhsminor.yy478; break; case 84: /* db_optr ::= db_optr cache */ -{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy532 = yylhsminor.yy532; +{ yylhsminor.yy478 = yymsp[-1].minor.yy478; yylhsminor.yy478.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy478 = yylhsminor.yy478; break; case 85: /* db_optr ::= db_optr replica */ case 96: /* alter_db_optr ::= alter_db_optr replica */ yytestcase(yyruleno==96); -{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy532 = yylhsminor.yy532; +{ yylhsminor.yy478 = yymsp[-1].minor.yy478; yylhsminor.yy478.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy478 = yylhsminor.yy478; break; case 86: /* db_optr ::= db_optr days */ -{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy532 = yylhsminor.yy532; +{ yylhsminor.yy478 = yymsp[-1].minor.yy478; yylhsminor.yy478.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy478 = yylhsminor.yy478; break; - case 87: /* db_optr ::= db_optr rows */ -{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.rowPerFileBlock = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy532 = yylhsminor.yy532; + case 87: /* db_optr ::= db_optr minrows */ +{ yylhsminor.yy478 = yymsp[-1].minor.yy478; yylhsminor.yy478.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } + yymsp[-1].minor.yy478 = yylhsminor.yy478; break; - case 88: /* db_optr ::= db_optr ablocks */ -{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.numOfAvgCacheBlocks = strtod(yymsp[0].minor.yy0.z, NULL); } - yymsp[-1].minor.yy532 = yylhsminor.yy532; + case 88: /* db_optr ::= db_optr maxrows */ +{ yylhsminor.yy478 = yymsp[-1].minor.yy478; yylhsminor.yy478.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } + yymsp[-1].minor.yy478 = yylhsminor.yy478; break; - case 89: /* db_optr ::= db_optr tblocks */ -{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.numOfBlocksPerTable = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy532 = yylhsminor.yy532; + case 89: /* db_optr ::= db_optr blocks */ + case 99: /* alter_db_optr ::= alter_db_optr blocks */ yytestcase(yyruleno==99); +{ yylhsminor.yy478 = yymsp[-1].minor.yy478; yylhsminor.yy478.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy478 = yylhsminor.yy478; break; case 90: /* db_optr ::= db_optr ctime */ -{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy532 = yylhsminor.yy532; +{ yylhsminor.yy478 = yymsp[-1].minor.yy478; yylhsminor.yy478.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy478 = yylhsminor.yy478; break; - case 91: /* db_optr ::= db_optr clog */ -{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.commitLog = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy532 = yylhsminor.yy532; + case 91: /* db_optr ::= db_optr wal */ + case 101: /* alter_db_optr ::= alter_db_optr wal */ yytestcase(yyruleno==101); +{ yylhsminor.yy478 = yymsp[-1].minor.yy478; yylhsminor.yy478.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy478 = yylhsminor.yy478; break; case 92: /* db_optr ::= db_optr comp */ -{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[-1].minor.yy532 = yylhsminor.yy532; + case 100: /* alter_db_optr ::= alter_db_optr comp */ yytestcase(yyruleno==100); +{ yylhsminor.yy478 = yymsp[-1].minor.yy478; yylhsminor.yy478.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy478 = yylhsminor.yy478; break; case 93: /* db_optr ::= db_optr prec */ -{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.precision = yymsp[0].minor.yy0; } - yymsp[-1].minor.yy532 = yylhsminor.yy532; +{ yylhsminor.yy478 = yymsp[-1].minor.yy478; yylhsminor.yy478.precision = yymsp[0].minor.yy0; } + yymsp[-1].minor.yy478 = yylhsminor.yy478; break; case 94: /* db_optr ::= db_optr keep */ -{ yylhsminor.yy532 = yymsp[-1].minor.yy532; yylhsminor.yy532.keep = yymsp[0].minor.yy30; } - yymsp[-1].minor.yy532 = yylhsminor.yy532; + case 98: /* alter_db_optr ::= alter_db_optr keep */ yytestcase(yyruleno==98); +{ yylhsminor.yy478 = yymsp[-1].minor.yy478; yylhsminor.yy478.keep = yymsp[0].minor.yy456; } + yymsp[-1].minor.yy478 = yylhsminor.yy478; break; case 95: /* alter_db_optr ::= */ -{ setDefaultCreateDbOption(&yymsp[1].minor.yy532);} +{ setDefaultCreateDbOption(&yymsp[1].minor.yy478);} break; - case 98: /* typename ::= ids */ -{ tSQLSetColumnType (&yylhsminor.yy505, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy505 = yylhsminor.yy505; + case 102: /* typename ::= ids */ +{ tSQLSetColumnType (&yylhsminor.yy47, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy47 = yylhsminor.yy47; break; - case 99: /* typename ::= ids LP signed RP */ + case 103: /* typename ::= ids LP signed RP */ { - yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy489; // negative value of name length - tSQLSetColumnType(&yylhsminor.yy505, &yymsp[-3].minor.yy0); + yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy373; // negative value of name length + tSQLSetColumnType(&yylhsminor.yy47, &yymsp[-3].minor.yy0); } - yymsp[-3].minor.yy505 = yylhsminor.yy505; + yymsp[-3].minor.yy47 = yylhsminor.yy47; break; - case 100: /* signed ::= INTEGER */ -{ yylhsminor.yy489 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[0].minor.yy489 = yylhsminor.yy489; + case 104: /* signed ::= INTEGER */ +{ yylhsminor.yy373 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[0].minor.yy373 = yylhsminor.yy373; break; - case 101: /* signed ::= PLUS INTEGER */ -{ yymsp[-1].minor.yy489 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + case 105: /* signed ::= PLUS INTEGER */ +{ yymsp[-1].minor.yy373 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } break; - case 102: /* signed ::= MINUS INTEGER */ -{ yymsp[-1].minor.yy489 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);} + case 106: /* signed ::= MINUS INTEGER */ +{ yymsp[-1].minor.yy373 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);} break; - case 103: /* cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args */ + case 107: /* cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args */ { yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; setCreatedTableName(pInfo, &yymsp[-2].minor.yy0, &yymsp[-3].minor.yy0); } break; - case 104: /* create_table_args ::= LP columnlist RP */ + case 108: /* create_table_args ::= LP columnlist RP */ { - yymsp[-2].minor.yy212 = tSetCreateSQLElems(yymsp[-1].minor.yy325, NULL, NULL, NULL, NULL, TSQL_CREATE_TABLE); - setSQLInfo(pInfo, yymsp[-2].minor.yy212, NULL, TSDB_SQL_CREATE_TABLE); + yymsp[-2].minor.yy494 = tSetCreateSQLElems(yymsp[-1].minor.yy503, NULL, NULL, NULL, NULL, TSQL_CREATE_TABLE); + setSQLInfo(pInfo, yymsp[-2].minor.yy494, NULL, TSDB_SQL_CREATE_TABLE); } break; - case 105: /* create_table_args ::= LP columnlist RP TAGS LP columnlist RP */ + case 109: /* create_table_args ::= LP columnlist RP TAGS LP columnlist RP */ { - yymsp[-6].minor.yy212 = tSetCreateSQLElems(yymsp[-5].minor.yy325, yymsp[-1].minor.yy325, NULL, NULL, NULL, TSQL_CREATE_STABLE); - setSQLInfo(pInfo, yymsp[-6].minor.yy212, NULL, TSDB_SQL_CREATE_TABLE); + yymsp[-6].minor.yy494 = tSetCreateSQLElems(yymsp[-5].minor.yy503, yymsp[-1].minor.yy503, NULL, NULL, NULL, TSQL_CREATE_STABLE); + setSQLInfo(pInfo, yymsp[-6].minor.yy494, NULL, TSDB_SQL_CREATE_TABLE); } break; - case 106: /* create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP */ + case 110: /* create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; - yymsp[-6].minor.yy212 = tSetCreateSQLElems(NULL, NULL, &yymsp[-5].minor.yy0, yymsp[-1].minor.yy30, NULL, TSQL_CREATE_TABLE_FROM_STABLE); - setSQLInfo(pInfo, yymsp[-6].minor.yy212, NULL, TSDB_SQL_CREATE_TABLE); + yymsp[-6].minor.yy494 = tSetCreateSQLElems(NULL, NULL, &yymsp[-5].minor.yy0, yymsp[-1].minor.yy456, NULL, TSQL_CREATE_TABLE_FROM_STABLE); + setSQLInfo(pInfo, yymsp[-6].minor.yy494, NULL, TSDB_SQL_CREATE_TABLE); } break; - case 107: /* create_table_args ::= AS select */ + case 111: /* create_table_args ::= AS select */ { - yymsp[-1].minor.yy212 = tSetCreateSQLElems(NULL, NULL, NULL, NULL, yymsp[0].minor.yy444, TSQL_CREATE_STREAM); - setSQLInfo(pInfo, yymsp[-1].minor.yy212, NULL, TSDB_SQL_CREATE_TABLE); + yymsp[-1].minor.yy494 = tSetCreateSQLElems(NULL, NULL, NULL, NULL, yymsp[0].minor.yy392, TSQL_CREATE_STREAM); + setSQLInfo(pInfo, yymsp[-1].minor.yy494, NULL, TSDB_SQL_CREATE_TABLE); } break; - case 108: /* columnlist ::= columnlist COMMA column */ -{yylhsminor.yy325 = tFieldListAppend(yymsp[-2].minor.yy325, &yymsp[0].minor.yy505); } - yymsp[-2].minor.yy325 = yylhsminor.yy325; + case 112: /* columnlist ::= columnlist COMMA column */ +{yylhsminor.yy503 = tFieldListAppend(yymsp[-2].minor.yy503, &yymsp[0].minor.yy47); } + yymsp[-2].minor.yy503 = yylhsminor.yy503; break; - case 109: /* columnlist ::= column */ -{yylhsminor.yy325 = tFieldListAppend(NULL, &yymsp[0].minor.yy505);} - yymsp[0].minor.yy325 = yylhsminor.yy325; + case 113: /* columnlist ::= column */ +{yylhsminor.yy503 = tFieldListAppend(NULL, &yymsp[0].minor.yy47);} + yymsp[0].minor.yy503 = yylhsminor.yy503; break; - case 110: /* column ::= ids typename */ + case 114: /* column ::= ids typename */ { - tSQLSetColumnInfo(&yylhsminor.yy505, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy505); + tSQLSetColumnInfo(&yylhsminor.yy47, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy47); } - yymsp[-1].minor.yy505 = yylhsminor.yy505; + yymsp[-1].minor.yy47 = yylhsminor.yy47; break; - case 111: /* tagitemlist ::= tagitemlist COMMA tagitem */ -{ yylhsminor.yy30 = tVariantListAppend(yymsp[-2].minor.yy30, &yymsp[0].minor.yy380, -1); } - yymsp[-2].minor.yy30 = yylhsminor.yy30; + case 115: /* tagitemlist ::= tagitemlist COMMA tagitem */ +{ yylhsminor.yy456 = tVariantListAppend(yymsp[-2].minor.yy456, &yymsp[0].minor.yy442, -1); } + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 112: /* tagitemlist ::= tagitem */ -{ yylhsminor.yy30 = tVariantListAppend(NULL, &yymsp[0].minor.yy380, -1); } - yymsp[0].minor.yy30 = yylhsminor.yy30; + case 116: /* tagitemlist ::= tagitem */ +{ yylhsminor.yy456 = tVariantListAppend(NULL, &yymsp[0].minor.yy442, -1); } + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 113: /* tagitem ::= INTEGER */ - case 114: /* tagitem ::= FLOAT */ yytestcase(yyruleno==114); - case 115: /* tagitem ::= STRING */ yytestcase(yyruleno==115); - case 116: /* tagitem ::= BOOL */ yytestcase(yyruleno==116); -{toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy380, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy380 = yylhsminor.yy380; + case 117: /* tagitem ::= INTEGER */ + case 118: /* tagitem ::= FLOAT */ yytestcase(yyruleno==118); + case 119: /* tagitem ::= STRING */ yytestcase(yyruleno==119); + case 120: /* tagitem ::= BOOL */ yytestcase(yyruleno==120); +{toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy442, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy442 = yylhsminor.yy442; break; - case 117: /* tagitem ::= NULL */ -{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy380, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy380 = yylhsminor.yy380; + case 121: /* tagitem ::= NULL */ +{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy442, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy442 = yylhsminor.yy442; break; - case 118: /* tagitem ::= MINUS INTEGER */ - case 119: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==119); - case 120: /* tagitem ::= PLUS INTEGER */ yytestcase(yyruleno==120); - case 121: /* tagitem ::= PLUS FLOAT */ yytestcase(yyruleno==121); + case 122: /* tagitem ::= MINUS INTEGER */ + case 123: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==123); + case 124: /* tagitem ::= PLUS INTEGER */ yytestcase(yyruleno==124); + case 125: /* tagitem ::= PLUS FLOAT */ yytestcase(yyruleno==125); { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = yymsp[0].minor.yy0.type; toTSDBType(yymsp[-1].minor.yy0.type); - tVariantCreate(&yylhsminor.yy380, &yymsp[-1].minor.yy0); + tVariantCreate(&yylhsminor.yy442, &yymsp[-1].minor.yy0); } - yymsp[-1].minor.yy380 = yylhsminor.yy380; + yymsp[-1].minor.yy442 = yylhsminor.yy442; break; - case 122: /* select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */ + case 126: /* select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */ { - yylhsminor.yy444 = tSetQuerySQLElems(&yymsp[-11].minor.yy0, yymsp[-10].minor.yy506, yymsp[-9].minor.yy30, yymsp[-8].minor.yy388, yymsp[-4].minor.yy30, yymsp[-3].minor.yy30, &yymsp[-7].minor.yy0, &yymsp[-5].minor.yy0, yymsp[-6].minor.yy30, &yymsp[0].minor.yy150, &yymsp[-1].minor.yy150); + yylhsminor.yy392 = tSetQuerySQLElems(&yymsp[-11].minor.yy0, yymsp[-10].minor.yy10, yymsp[-9].minor.yy456, yymsp[-8].minor.yy2, yymsp[-4].minor.yy456, yymsp[-3].minor.yy456, &yymsp[-7].minor.yy0, &yymsp[-5].minor.yy0, yymsp[-6].minor.yy456, &yymsp[0].minor.yy230, &yymsp[-1].minor.yy230); } - yymsp[-11].minor.yy444 = yylhsminor.yy444; + yymsp[-11].minor.yy392 = yylhsminor.yy392; break; - case 123: /* union ::= select */ -{ yylhsminor.yy309 = setSubclause(NULL, yymsp[0].minor.yy444); } - yymsp[0].minor.yy309 = yylhsminor.yy309; + case 127: /* union ::= select */ +{ yylhsminor.yy145 = setSubclause(NULL, yymsp[0].minor.yy392); } + yymsp[0].minor.yy145 = yylhsminor.yy145; break; - case 124: /* union ::= LP union RP */ -{ yymsp[-2].minor.yy309 = yymsp[-1].minor.yy309; } + case 128: /* union ::= LP union RP */ +{ yymsp[-2].minor.yy145 = yymsp[-1].minor.yy145; } break; - case 125: /* union ::= union UNION ALL select */ -{ yylhsminor.yy309 = appendSelectClause(yymsp[-3].minor.yy309, yymsp[0].minor.yy444); } - yymsp[-3].minor.yy309 = yylhsminor.yy309; + case 129: /* union ::= union UNION ALL select */ +{ yylhsminor.yy145 = appendSelectClause(yymsp[-3].minor.yy145, yymsp[0].minor.yy392); } + yymsp[-3].minor.yy145 = yylhsminor.yy145; break; - case 126: /* union ::= union UNION ALL LP select RP */ -{ yylhsminor.yy309 = appendSelectClause(yymsp[-5].minor.yy309, yymsp[-1].minor.yy444); } - yymsp[-5].minor.yy309 = yylhsminor.yy309; + case 130: /* union ::= union UNION ALL LP select RP */ +{ yylhsminor.yy145 = appendSelectClause(yymsp[-5].minor.yy145, yymsp[-1].minor.yy392); } + yymsp[-5].minor.yy145 = yylhsminor.yy145; break; - case 127: /* cmd ::= union */ -{ setSQLInfo(pInfo, yymsp[0].minor.yy309, NULL, TSDB_SQL_SELECT); } + case 131: /* cmd ::= union */ +{ setSQLInfo(pInfo, yymsp[0].minor.yy145, NULL, TSDB_SQL_SELECT); } break; - case 128: /* select ::= SELECT selcollist */ + case 132: /* select ::= SELECT selcollist */ { - yylhsminor.yy444 = tSetQuerySQLElems(&yymsp[-1].minor.yy0, yymsp[0].minor.yy506, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + yylhsminor.yy392 = tSetQuerySQLElems(&yymsp[-1].minor.yy0, yymsp[0].minor.yy10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); } - yymsp[-1].minor.yy444 = yylhsminor.yy444; + yymsp[-1].minor.yy392 = yylhsminor.yy392; break; - case 129: /* sclp ::= selcollist COMMA */ -{yylhsminor.yy506 = yymsp[-1].minor.yy506;} - yymsp[-1].minor.yy506 = yylhsminor.yy506; + case 133: /* sclp ::= selcollist COMMA */ +{yylhsminor.yy10 = yymsp[-1].minor.yy10;} + yymsp[-1].minor.yy10 = yylhsminor.yy10; break; - case 130: /* sclp ::= */ -{yymsp[1].minor.yy506 = 0;} + case 134: /* sclp ::= */ +{yymsp[1].minor.yy10 = 0;} break; - case 131: /* selcollist ::= sclp expr as */ + case 135: /* selcollist ::= sclp expr as */ { - yylhsminor.yy506 = tSQLExprListAppend(yymsp[-2].minor.yy506, yymsp[-1].minor.yy388, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0); + yylhsminor.yy10 = tSQLExprListAppend(yymsp[-2].minor.yy10, yymsp[-1].minor.yy2, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0); } - yymsp[-2].minor.yy506 = yylhsminor.yy506; + yymsp[-2].minor.yy10 = yylhsminor.yy10; break; - case 132: /* selcollist ::= sclp STAR */ + case 136: /* selcollist ::= sclp STAR */ { tSQLExpr *pNode = tSQLExprIdValueCreate(NULL, TK_ALL); - yylhsminor.yy506 = tSQLExprListAppend(yymsp[-1].minor.yy506, pNode, 0); + yylhsminor.yy10 = tSQLExprListAppend(yymsp[-1].minor.yy10, pNode, 0); } - yymsp[-1].minor.yy506 = yylhsminor.yy506; + yymsp[-1].minor.yy10 = yylhsminor.yy10; break; - case 133: /* as ::= AS ids */ + case 137: /* as ::= AS ids */ { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } break; - case 134: /* as ::= ids */ + case 138: /* as ::= ids */ { yylhsminor.yy0 = yymsp[0].minor.yy0; } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 135: /* as ::= */ + case 139: /* as ::= */ { yymsp[1].minor.yy0.n = 0; } break; - case 136: /* from ::= FROM tablelist */ -{yymsp[-1].minor.yy30 = yymsp[0].minor.yy30;} + case 140: /* from ::= FROM tablelist */ +{yymsp[-1].minor.yy456 = yymsp[0].minor.yy456;} break; - case 137: /* tablelist ::= ids cpxName */ -{ toTSDBType(yymsp[-1].minor.yy0.type); yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yylhsminor.yy30 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1);} - yymsp[-1].minor.yy30 = yylhsminor.yy30; + case 141: /* tablelist ::= ids cpxName */ +{ toTSDBType(yymsp[-1].minor.yy0.type); yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yylhsminor.yy456 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1);} + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; - case 138: /* tablelist ::= tablelist COMMA ids cpxName */ -{ toTSDBType(yymsp[-1].minor.yy0.type); yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yylhsminor.yy30 = tVariantListAppendToken(yymsp[-3].minor.yy30, &yymsp[-1].minor.yy0, -1); } - yymsp[-3].minor.yy30 = yylhsminor.yy30; + case 142: /* tablelist ::= tablelist COMMA ids cpxName */ +{ toTSDBType(yymsp[-1].minor.yy0.type); yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yylhsminor.yy456 = tVariantListAppendToken(yymsp[-3].minor.yy456, &yymsp[-1].minor.yy0, -1); } + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; - case 139: /* tmvar ::= VARIABLE */ + case 143: /* tmvar ::= VARIABLE */ {yylhsminor.yy0 = yymsp[0].minor.yy0;} yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 140: /* interval_opt ::= INTERVAL LP tmvar RP */ - case 145: /* sliding_opt ::= SLIDING LP tmvar RP */ yytestcase(yyruleno==145); + case 144: /* interval_opt ::= INTERVAL LP tmvar RP */ + case 149: /* sliding_opt ::= SLIDING LP tmvar RP */ yytestcase(yyruleno==149); {yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0; } break; - case 141: /* interval_opt ::= */ - case 146: /* sliding_opt ::= */ yytestcase(yyruleno==146); + case 145: /* interval_opt ::= */ + case 150: /* sliding_opt ::= */ yytestcase(yyruleno==150); {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = NULL; yymsp[1].minor.yy0.type = 0; } break; - case 142: /* fill_opt ::= */ -{yymsp[1].minor.yy30 = 0; } + case 146: /* fill_opt ::= */ +{yymsp[1].minor.yy456 = 0; } break; - case 143: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + case 147: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ { tVariant A = {0}; toTSDBType(yymsp[-3].minor.yy0.type); tVariantCreate(&A, &yymsp[-3].minor.yy0); - tVariantListInsert(yymsp[-1].minor.yy30, &A, -1, 0); - yymsp[-5].minor.yy30 = yymsp[-1].minor.yy30; + tVariantListInsert(yymsp[-1].minor.yy456, &A, -1, 0); + yymsp[-5].minor.yy456 = yymsp[-1].minor.yy456; } break; - case 144: /* fill_opt ::= FILL LP ID RP */ + case 148: /* fill_opt ::= FILL LP ID RP */ { toTSDBType(yymsp[-1].minor.yy0.type); - yymsp[-3].minor.yy30 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1); + yymsp[-3].minor.yy456 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1); } break; - case 147: /* orderby_opt ::= */ - case 155: /* groupby_opt ::= */ yytestcase(yyruleno==155); -{yymsp[1].minor.yy30 = 0;} + case 151: /* orderby_opt ::= */ + case 159: /* groupby_opt ::= */ yytestcase(yyruleno==159); +{yymsp[1].minor.yy456 = 0;} break; - case 148: /* orderby_opt ::= ORDER BY sortlist */ - case 156: /* groupby_opt ::= GROUP BY grouplist */ yytestcase(yyruleno==156); -{yymsp[-2].minor.yy30 = yymsp[0].minor.yy30;} + case 152: /* orderby_opt ::= ORDER BY sortlist */ + case 160: /* groupby_opt ::= GROUP BY grouplist */ yytestcase(yyruleno==160); +{yymsp[-2].minor.yy456 = yymsp[0].minor.yy456;} break; - case 149: /* sortlist ::= sortlist COMMA item sortorder */ + case 153: /* sortlist ::= sortlist COMMA item sortorder */ { - yylhsminor.yy30 = tVariantListAppend(yymsp[-3].minor.yy30, &yymsp[-1].minor.yy380, yymsp[0].minor.yy250); + yylhsminor.yy456 = tVariantListAppend(yymsp[-3].minor.yy456, &yymsp[-1].minor.yy442, yymsp[0].minor.yy196); } - yymsp[-3].minor.yy30 = yylhsminor.yy30; + yymsp[-3].minor.yy456 = yylhsminor.yy456; break; - case 150: /* sortlist ::= item sortorder */ + case 154: /* sortlist ::= item sortorder */ { - yylhsminor.yy30 = tVariantListAppend(NULL, &yymsp[-1].minor.yy380, yymsp[0].minor.yy250); + yylhsminor.yy456 = tVariantListAppend(NULL, &yymsp[-1].minor.yy442, yymsp[0].minor.yy196); } - yymsp[-1].minor.yy30 = yylhsminor.yy30; + yymsp[-1].minor.yy456 = yylhsminor.yy456; break; - case 151: /* item ::= ids cpxName */ + case 155: /* item ::= ids cpxName */ { toTSDBType(yymsp[-1].minor.yy0.type); yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - tVariantCreate(&yylhsminor.yy380, &yymsp[-1].minor.yy0); + tVariantCreate(&yylhsminor.yy442, &yymsp[-1].minor.yy0); } - yymsp[-1].minor.yy380 = yylhsminor.yy380; + yymsp[-1].minor.yy442 = yylhsminor.yy442; break; - case 152: /* sortorder ::= ASC */ -{yymsp[0].minor.yy250 = TSDB_ORDER_ASC; } + case 156: /* sortorder ::= ASC */ +{yymsp[0].minor.yy196 = TSDB_ORDER_ASC; } break; - case 153: /* sortorder ::= DESC */ -{yymsp[0].minor.yy250 = TSDB_ORDER_DESC;} + case 157: /* sortorder ::= DESC */ +{yymsp[0].minor.yy196 = TSDB_ORDER_DESC;} break; - case 154: /* sortorder ::= */ -{yymsp[1].minor.yy250 = TSDB_ORDER_ASC;} + case 158: /* sortorder ::= */ +{yymsp[1].minor.yy196 = TSDB_ORDER_ASC;} break; - case 157: /* grouplist ::= grouplist COMMA item */ + case 161: /* grouplist ::= grouplist COMMA item */ { - yylhsminor.yy30 = tVariantListAppend(yymsp[-2].minor.yy30, &yymsp[0].minor.yy380, -1); + yylhsminor.yy456 = tVariantListAppend(yymsp[-2].minor.yy456, &yymsp[0].minor.yy442, -1); } - yymsp[-2].minor.yy30 = yylhsminor.yy30; + yymsp[-2].minor.yy456 = yylhsminor.yy456; break; - case 158: /* grouplist ::= item */ + case 162: /* grouplist ::= item */ { - yylhsminor.yy30 = tVariantListAppend(NULL, &yymsp[0].minor.yy380, -1); + yylhsminor.yy456 = tVariantListAppend(NULL, &yymsp[0].minor.yy442, -1); } - yymsp[0].minor.yy30 = yylhsminor.yy30; + yymsp[0].minor.yy456 = yylhsminor.yy456; break; - case 159: /* having_opt ::= */ - case 169: /* where_opt ::= */ yytestcase(yyruleno==169); - case 205: /* expritem ::= */ yytestcase(yyruleno==205); -{yymsp[1].minor.yy388 = 0;} + case 163: /* having_opt ::= */ + case 173: /* where_opt ::= */ yytestcase(yyruleno==173); + case 209: /* expritem ::= */ yytestcase(yyruleno==209); +{yymsp[1].minor.yy2 = 0;} break; - case 160: /* having_opt ::= HAVING expr */ - case 170: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==170); -{yymsp[-1].minor.yy388 = yymsp[0].minor.yy388;} + case 164: /* having_opt ::= HAVING expr */ + case 174: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==174); +{yymsp[-1].minor.yy2 = yymsp[0].minor.yy2;} break; - case 161: /* limit_opt ::= */ - case 165: /* slimit_opt ::= */ yytestcase(yyruleno==165); -{yymsp[1].minor.yy150.limit = -1; yymsp[1].minor.yy150.offset = 0;} + case 165: /* limit_opt ::= */ + case 169: /* slimit_opt ::= */ yytestcase(yyruleno==169); +{yymsp[1].minor.yy230.limit = -1; yymsp[1].minor.yy230.offset = 0;} break; - case 162: /* limit_opt ::= LIMIT signed */ - case 166: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==166); -{yymsp[-1].minor.yy150.limit = yymsp[0].minor.yy489; yymsp[-1].minor.yy150.offset = 0;} + case 166: /* limit_opt ::= LIMIT signed */ + case 170: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==170); +{yymsp[-1].minor.yy230.limit = yymsp[0].minor.yy373; yymsp[-1].minor.yy230.offset = 0;} break; - case 163: /* limit_opt ::= LIMIT signed OFFSET signed */ - case 167: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ yytestcase(yyruleno==167); -{yymsp[-3].minor.yy150.limit = yymsp[-2].minor.yy489; yymsp[-3].minor.yy150.offset = yymsp[0].minor.yy489;} + case 167: /* limit_opt ::= LIMIT signed OFFSET signed */ + case 171: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ yytestcase(yyruleno==171); +{yymsp[-3].minor.yy230.limit = yymsp[-2].minor.yy373; yymsp[-3].minor.yy230.offset = yymsp[0].minor.yy373;} break; - case 164: /* limit_opt ::= LIMIT signed COMMA signed */ - case 168: /* slimit_opt ::= SLIMIT signed COMMA signed */ yytestcase(yyruleno==168); -{yymsp[-3].minor.yy150.limit = yymsp[0].minor.yy489; yymsp[-3].minor.yy150.offset = yymsp[-2].minor.yy489;} + case 168: /* limit_opt ::= LIMIT signed COMMA signed */ + case 172: /* slimit_opt ::= SLIMIT signed COMMA signed */ yytestcase(yyruleno==172); +{yymsp[-3].minor.yy230.limit = yymsp[0].minor.yy373; yymsp[-3].minor.yy230.offset = yymsp[-2].minor.yy373;} break; - case 171: /* expr ::= LP expr RP */ -{yymsp[-2].minor.yy388 = yymsp[-1].minor.yy388; } + case 175: /* expr ::= LP expr RP */ +{yymsp[-2].minor.yy2 = yymsp[-1].minor.yy2; } break; - case 172: /* expr ::= ID */ -{yylhsminor.yy388 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_ID);} - yymsp[0].minor.yy388 = yylhsminor.yy388; + case 176: /* expr ::= ID */ +{yylhsminor.yy2 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_ID);} + yymsp[0].minor.yy2 = yylhsminor.yy2; break; - case 173: /* expr ::= ID DOT ID */ -{yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy388 = tSQLExprIdValueCreate(&yymsp[-2].minor.yy0, TK_ID);} - yymsp[-2].minor.yy388 = yylhsminor.yy388; + case 177: /* expr ::= ID DOT ID */ +{yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy2 = tSQLExprIdValueCreate(&yymsp[-2].minor.yy0, TK_ID);} + yymsp[-2].minor.yy2 = yylhsminor.yy2; break; - case 174: /* expr ::= ID DOT STAR */ -{yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy388 = tSQLExprIdValueCreate(&yymsp[-2].minor.yy0, TK_ALL);} - yymsp[-2].minor.yy388 = yylhsminor.yy388; + case 178: /* expr ::= ID DOT STAR */ +{yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy2 = tSQLExprIdValueCreate(&yymsp[-2].minor.yy0, TK_ALL);} + yymsp[-2].minor.yy2 = yylhsminor.yy2; break; - case 175: /* expr ::= INTEGER */ -{yylhsminor.yy388 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_INTEGER);} - yymsp[0].minor.yy388 = yylhsminor.yy388; + case 179: /* expr ::= INTEGER */ +{yylhsminor.yy2 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_INTEGER);} + yymsp[0].minor.yy2 = yylhsminor.yy2; break; - case 176: /* expr ::= MINUS INTEGER */ - case 177: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==177); -{yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy388 = tSQLExprIdValueCreate(&yymsp[-1].minor.yy0, TK_INTEGER);} - yymsp[-1].minor.yy388 = yylhsminor.yy388; + case 180: /* expr ::= MINUS INTEGER */ + case 181: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==181); +{yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy2 = tSQLExprIdValueCreate(&yymsp[-1].minor.yy0, TK_INTEGER);} + yymsp[-1].minor.yy2 = yylhsminor.yy2; break; - case 178: /* expr ::= FLOAT */ -{yylhsminor.yy388 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_FLOAT);} - yymsp[0].minor.yy388 = yylhsminor.yy388; + case 182: /* expr ::= FLOAT */ +{yylhsminor.yy2 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_FLOAT);} + yymsp[0].minor.yy2 = yylhsminor.yy2; break; - case 179: /* expr ::= MINUS FLOAT */ - case 180: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==180); -{yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy388 = tSQLExprIdValueCreate(&yymsp[-1].minor.yy0, TK_FLOAT);} - yymsp[-1].minor.yy388 = yylhsminor.yy388; + case 183: /* expr ::= MINUS FLOAT */ + case 184: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==184); +{yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy2 = tSQLExprIdValueCreate(&yymsp[-1].minor.yy0, TK_FLOAT);} + yymsp[-1].minor.yy2 = yylhsminor.yy2; break; - case 181: /* expr ::= STRING */ -{yylhsminor.yy388 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_STRING);} - yymsp[0].minor.yy388 = yylhsminor.yy388; + case 185: /* expr ::= STRING */ +{yylhsminor.yy2 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_STRING);} + yymsp[0].minor.yy2 = yylhsminor.yy2; break; - case 182: /* expr ::= NOW */ -{yylhsminor.yy388 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_NOW); } - yymsp[0].minor.yy388 = yylhsminor.yy388; + case 186: /* expr ::= NOW */ +{yylhsminor.yy2 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_NOW); } + yymsp[0].minor.yy2 = yylhsminor.yy2; break; - case 183: /* expr ::= VARIABLE */ -{yylhsminor.yy388 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_VARIABLE);} - yymsp[0].minor.yy388 = yylhsminor.yy388; + case 187: /* expr ::= VARIABLE */ +{yylhsminor.yy2 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_VARIABLE);} + yymsp[0].minor.yy2 = yylhsminor.yy2; break; - case 184: /* expr ::= BOOL */ -{yylhsminor.yy388 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_BOOL);} - yymsp[0].minor.yy388 = yylhsminor.yy388; + case 188: /* expr ::= BOOL */ +{yylhsminor.yy2 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_BOOL);} + yymsp[0].minor.yy2 = yylhsminor.yy2; break; - case 185: /* expr ::= ID LP exprlist RP */ + case 189: /* expr ::= ID LP exprlist RP */ { - yylhsminor.yy388 = tSQLExprCreateFunction(yymsp[-1].minor.yy506, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); + yylhsminor.yy2 = tSQLExprCreateFunction(yymsp[-1].minor.yy10, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } - yymsp[-3].minor.yy388 = yylhsminor.yy388; + yymsp[-3].minor.yy2 = yylhsminor.yy2; break; - case 186: /* expr ::= ID LP STAR RP */ + case 190: /* expr ::= ID LP STAR RP */ { - yylhsminor.yy388 = tSQLExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); + yylhsminor.yy2 = tSQLExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } - yymsp[-3].minor.yy388 = yylhsminor.yy388; + yymsp[-3].minor.yy2 = yylhsminor.yy2; break; - case 187: /* expr ::= expr AND expr */ -{yylhsminor.yy388 = tSQLExprCreate(yymsp[-2].minor.yy388, yymsp[0].minor.yy388, TK_AND);} - yymsp[-2].minor.yy388 = yylhsminor.yy388; + case 191: /* expr ::= expr AND expr */ +{yylhsminor.yy2 = tSQLExprCreate(yymsp[-2].minor.yy2, yymsp[0].minor.yy2, TK_AND);} + yymsp[-2].minor.yy2 = yylhsminor.yy2; break; - case 188: /* expr ::= expr OR expr */ -{yylhsminor.yy388 = tSQLExprCreate(yymsp[-2].minor.yy388, yymsp[0].minor.yy388, TK_OR); } - yymsp[-2].minor.yy388 = yylhsminor.yy388; + case 192: /* expr ::= expr OR expr */ +{yylhsminor.yy2 = tSQLExprCreate(yymsp[-2].minor.yy2, yymsp[0].minor.yy2, TK_OR); } + yymsp[-2].minor.yy2 = yylhsminor.yy2; break; - case 189: /* expr ::= expr LT expr */ -{yylhsminor.yy388 = tSQLExprCreate(yymsp[-2].minor.yy388, yymsp[0].minor.yy388, TK_LT);} - yymsp[-2].minor.yy388 = yylhsminor.yy388; + case 193: /* expr ::= expr LT expr */ +{yylhsminor.yy2 = tSQLExprCreate(yymsp[-2].minor.yy2, yymsp[0].minor.yy2, TK_LT);} + yymsp[-2].minor.yy2 = yylhsminor.yy2; break; - case 190: /* expr ::= expr GT expr */ -{yylhsminor.yy388 = tSQLExprCreate(yymsp[-2].minor.yy388, yymsp[0].minor.yy388, TK_GT);} - yymsp[-2].minor.yy388 = yylhsminor.yy388; + case 194: /* expr ::= expr GT expr */ +{yylhsminor.yy2 = tSQLExprCreate(yymsp[-2].minor.yy2, yymsp[0].minor.yy2, TK_GT);} + yymsp[-2].minor.yy2 = yylhsminor.yy2; break; - case 191: /* expr ::= expr LE expr */ -{yylhsminor.yy388 = tSQLExprCreate(yymsp[-2].minor.yy388, yymsp[0].minor.yy388, TK_LE);} - yymsp[-2].minor.yy388 = yylhsminor.yy388; + case 195: /* expr ::= expr LE expr */ +{yylhsminor.yy2 = tSQLExprCreate(yymsp[-2].minor.yy2, yymsp[0].minor.yy2, TK_LE);} + yymsp[-2].minor.yy2 = yylhsminor.yy2; break; - case 192: /* expr ::= expr GE expr */ -{yylhsminor.yy388 = tSQLExprCreate(yymsp[-2].minor.yy388, yymsp[0].minor.yy388, TK_GE);} - yymsp[-2].minor.yy388 = yylhsminor.yy388; + case 196: /* expr ::= expr GE expr */ +{yylhsminor.yy2 = tSQLExprCreate(yymsp[-2].minor.yy2, yymsp[0].minor.yy2, TK_GE);} + yymsp[-2].minor.yy2 = yylhsminor.yy2; break; - case 193: /* expr ::= expr NE expr */ -{yylhsminor.yy388 = tSQLExprCreate(yymsp[-2].minor.yy388, yymsp[0].minor.yy388, TK_NE);} - yymsp[-2].minor.yy388 = yylhsminor.yy388; + case 197: /* expr ::= expr NE expr */ +{yylhsminor.yy2 = tSQLExprCreate(yymsp[-2].minor.yy2, yymsp[0].minor.yy2, TK_NE);} + yymsp[-2].minor.yy2 = yylhsminor.yy2; break; - case 194: /* expr ::= expr EQ expr */ -{yylhsminor.yy388 = tSQLExprCreate(yymsp[-2].minor.yy388, yymsp[0].minor.yy388, TK_EQ);} - yymsp[-2].minor.yy388 = yylhsminor.yy388; + case 198: /* expr ::= expr EQ expr */ +{yylhsminor.yy2 = tSQLExprCreate(yymsp[-2].minor.yy2, yymsp[0].minor.yy2, TK_EQ);} + yymsp[-2].minor.yy2 = yylhsminor.yy2; break; - case 195: /* expr ::= expr PLUS expr */ -{yylhsminor.yy388 = tSQLExprCreate(yymsp[-2].minor.yy388, yymsp[0].minor.yy388, TK_PLUS); } - yymsp[-2].minor.yy388 = yylhsminor.yy388; + case 199: /* expr ::= expr PLUS expr */ +{yylhsminor.yy2 = tSQLExprCreate(yymsp[-2].minor.yy2, yymsp[0].minor.yy2, TK_PLUS); } + yymsp[-2].minor.yy2 = yylhsminor.yy2; break; - case 196: /* expr ::= expr MINUS expr */ -{yylhsminor.yy388 = tSQLExprCreate(yymsp[-2].minor.yy388, yymsp[0].minor.yy388, TK_MINUS); } - yymsp[-2].minor.yy388 = yylhsminor.yy388; + case 200: /* expr ::= expr MINUS expr */ +{yylhsminor.yy2 = tSQLExprCreate(yymsp[-2].minor.yy2, yymsp[0].minor.yy2, TK_MINUS); } + yymsp[-2].minor.yy2 = yylhsminor.yy2; break; - case 197: /* expr ::= expr STAR expr */ -{yylhsminor.yy388 = tSQLExprCreate(yymsp[-2].minor.yy388, yymsp[0].minor.yy388, TK_STAR); } - yymsp[-2].minor.yy388 = yylhsminor.yy388; + case 201: /* expr ::= expr STAR expr */ +{yylhsminor.yy2 = tSQLExprCreate(yymsp[-2].minor.yy2, yymsp[0].minor.yy2, TK_STAR); } + yymsp[-2].minor.yy2 = yylhsminor.yy2; break; - case 198: /* expr ::= expr SLASH expr */ -{yylhsminor.yy388 = tSQLExprCreate(yymsp[-2].minor.yy388, yymsp[0].minor.yy388, TK_DIVIDE);} - yymsp[-2].minor.yy388 = yylhsminor.yy388; + case 202: /* expr ::= expr SLASH expr */ +{yylhsminor.yy2 = tSQLExprCreate(yymsp[-2].minor.yy2, yymsp[0].minor.yy2, TK_DIVIDE);} + yymsp[-2].minor.yy2 = yylhsminor.yy2; break; - case 199: /* expr ::= expr REM expr */ -{yylhsminor.yy388 = tSQLExprCreate(yymsp[-2].minor.yy388, yymsp[0].minor.yy388, TK_REM); } - yymsp[-2].minor.yy388 = yylhsminor.yy388; + case 203: /* expr ::= expr REM expr */ +{yylhsminor.yy2 = tSQLExprCreate(yymsp[-2].minor.yy2, yymsp[0].minor.yy2, TK_REM); } + yymsp[-2].minor.yy2 = yylhsminor.yy2; break; - case 200: /* expr ::= expr LIKE expr */ -{yylhsminor.yy388 = tSQLExprCreate(yymsp[-2].minor.yy388, yymsp[0].minor.yy388, TK_LIKE); } - yymsp[-2].minor.yy388 = yylhsminor.yy388; + case 204: /* expr ::= expr LIKE expr */ +{yylhsminor.yy2 = tSQLExprCreate(yymsp[-2].minor.yy2, yymsp[0].minor.yy2, TK_LIKE); } + yymsp[-2].minor.yy2 = yylhsminor.yy2; break; - case 201: /* expr ::= expr IN LP exprlist RP */ -{yylhsminor.yy388 = tSQLExprCreate(yymsp[-4].minor.yy388, (tSQLExpr*)yymsp[-1].minor.yy506, TK_IN); } - yymsp[-4].minor.yy388 = yylhsminor.yy388; + case 205: /* expr ::= expr IN LP exprlist RP */ +{yylhsminor.yy2 = tSQLExprCreate(yymsp[-4].minor.yy2, (tSQLExpr*)yymsp[-1].minor.yy10, TK_IN); } + yymsp[-4].minor.yy2 = yylhsminor.yy2; break; - case 202: /* exprlist ::= exprlist COMMA expritem */ -{yylhsminor.yy506 = tSQLExprListAppend(yymsp[-2].minor.yy506,yymsp[0].minor.yy388,0);} - yymsp[-2].minor.yy506 = yylhsminor.yy506; + case 206: /* exprlist ::= exprlist COMMA expritem */ +{yylhsminor.yy10 = tSQLExprListAppend(yymsp[-2].minor.yy10,yymsp[0].minor.yy2,0);} + yymsp[-2].minor.yy10 = yylhsminor.yy10; break; - case 203: /* exprlist ::= expritem */ -{yylhsminor.yy506 = tSQLExprListAppend(0,yymsp[0].minor.yy388,0);} - yymsp[0].minor.yy506 = yylhsminor.yy506; + case 207: /* exprlist ::= expritem */ +{yylhsminor.yy10 = tSQLExprListAppend(0,yymsp[0].minor.yy2,0);} + yymsp[0].minor.yy10 = yylhsminor.yy10; break; - case 204: /* expritem ::= expr */ -{yylhsminor.yy388 = yymsp[0].minor.yy388;} - yymsp[0].minor.yy388 = yylhsminor.yy388; + case 208: /* expritem ::= expr */ +{yylhsminor.yy2 = yymsp[0].minor.yy2;} + yymsp[0].minor.yy2 = yylhsminor.yy2; break; - case 206: /* cmd ::= RESET QUERY CACHE */ + case 210: /* cmd ::= RESET QUERY CACHE */ { setDCLSQLElems(pInfo, TSDB_SQL_RESET_CACHE, 0);} break; - case 207: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + case 211: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableSQL* pAlterTable = tAlterTableSQLElems(&yymsp[-4].minor.yy0, yymsp[0].minor.yy325, NULL, TSDB_ALTER_TABLE_ADD_COLUMN); + SAlterTableSQL* pAlterTable = tAlterTableSQLElems(&yymsp[-4].minor.yy0, yymsp[0].minor.yy503, NULL, TSDB_ALTER_TABLE_ADD_COLUMN); setSQLInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 208: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + case 212: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -2670,14 +2688,14 @@ static void yy_reduce( setSQLInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 209: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + case 213: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableSQL* pAlterTable = tAlterTableSQLElems(&yymsp[-4].minor.yy0, yymsp[0].minor.yy325, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN); + SAlterTableSQL* pAlterTable = tAlterTableSQLElems(&yymsp[-4].minor.yy0, yymsp[0].minor.yy503, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN); setSQLInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 210: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + case 214: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -2688,7 +2706,7 @@ static void yy_reduce( setSQLInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 211: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + case 215: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -2702,25 +2720,25 @@ static void yy_reduce( setSQLInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 212: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + case 216: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; toTSDBType(yymsp[-2].minor.yy0.type); tVariantList* A = tVariantListAppendToken(NULL, &yymsp[-2].minor.yy0, -1); - A = tVariantListAppend(A, &yymsp[0].minor.yy380, -1); + A = tVariantListAppend(A, &yymsp[0].minor.yy442, -1); SAlterTableSQL* pAlterTable = tAlterTableSQLElems(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL); setSQLInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 213: /* cmd ::= KILL CONNECTION IPTOKEN COLON INTEGER */ + case 217: /* cmd ::= KILL CONNECTION IPTOKEN COLON INTEGER */ {yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSQL(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[-2].minor.yy0);} break; - case 214: /* cmd ::= KILL STREAM IPTOKEN COLON INTEGER COLON INTEGER */ + case 218: /* cmd ::= KILL STREAM IPTOKEN COLON INTEGER COLON INTEGER */ {yymsp[-4].minor.yy0.n += (yymsp[-3].minor.yy0.n + yymsp[-2].minor.yy0.n + yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSQL(pInfo, TSDB_SQL_KILL_STREAM, &yymsp[-4].minor.yy0);} break; - case 215: /* cmd ::= KILL QUERY IPTOKEN COLON INTEGER COLON INTEGER */ + case 219: /* cmd ::= KILL QUERY IPTOKEN COLON INTEGER COLON INTEGER */ {yymsp[-4].minor.yy0.n += (yymsp[-3].minor.yy0.n + yymsp[-2].minor.yy0.n + yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSQL(pInfo, TSDB_SQL_KILL_QUERY, &yymsp[-4].minor.yy0);} break; default: diff --git a/src/vnode/src/vnodeMain.c b/src/vnode/src/vnodeMain.c index f9904f7fa8..c305ff0665 100644 --- a/src/vnode/src/vnodeMain.c +++ b/src/vnode/src/vnodeMain.c @@ -117,7 +117,7 @@ int32_t vnodeCreate(SMDCreateVnodeMsg *pVnodeCfg) { return TSDB_CODE_VG_INIT_FAILED; } - dPrint("vgId:%d, vnode is created, clog:%d", pVnodeCfg->cfg.vgId, pVnodeCfg->cfg.commitLog); + dPrint("vgId:%d, vnode is created, clog:%d", pVnodeCfg->cfg.vgId, pVnodeCfg->cfg.walLevel); code = vnodeOpen(pVnodeCfg->cfg.vgId, rootDir); return code; @@ -433,7 +433,7 @@ static int32_t vnodeSaveCfg(SMDCreateVnodeMsg *pVnodeCfg) { len += snprintf(content + len, maxLen - len, " \"commitTime\": %d,\n", pVnodeCfg->cfg.commitTime); len += snprintf(content + len, maxLen - len, " \"precision\": %d,\n", pVnodeCfg->cfg.precision); len += snprintf(content + len, maxLen - len, " \"compression\": %d,\n", pVnodeCfg->cfg.compression); - len += snprintf(content + len, maxLen - len, " \"commitLog\": %d,\n", pVnodeCfg->cfg.commitLog); + len += snprintf(content + len, maxLen - len, " \"walLevel\": %d,\n", pVnodeCfg->cfg.walLevel); len += snprintf(content + len, maxLen - len, " \"replica\": %d,\n", pVnodeCfg->cfg.replications); len += snprintf(content + len, maxLen - len, " \"wals\": %d,\n", pVnodeCfg->cfg.wals); len += snprintf(content + len, maxLen - len, " \"quorum\": %d,\n", pVnodeCfg->cfg.quorum); @@ -578,12 +578,12 @@ static int32_t vnodeReadCfg(SVnodeObj *pVnode) { } pVnode->tsdbCfg.compression = (int8_t)compression->valueint; - cJSON *commitLog = cJSON_GetObjectItem(root, "commitLog"); - if (!commitLog || commitLog->type != cJSON_Number) { - dError("pVnode:%p vgId:%d, failed to read vnode cfg, commitLog not found", pVnode, pVnode->vgId); + cJSON *walLevel = cJSON_GetObjectItem(root, "walLevel"); + if (!walLevel || walLevel->type != cJSON_Number) { + dError("pVnode:%p vgId:%d, failed to read vnode cfg, walLevel not found", pVnode, pVnode->vgId); goto PARSE_OVER; } - pVnode->walCfg.commitLog = (int8_t)commitLog->valueint; + pVnode->walCfg.walLevel = (int8_t) walLevel->valueint; cJSON *wals = cJSON_GetObjectItem(root, "wals"); if (!wals || wals->type != cJSON_Number) { diff --git a/src/wal/src/walMain.c b/src/wal/src/walMain.c index ad33391b98..5157d715bf 100644 --- a/src/wal/src/walMain.c +++ b/src/wal/src/walMain.c @@ -62,7 +62,7 @@ void *walOpen(const char *path, const SWalCfg *pCfg) { pWal->max = pCfg->wals; pWal->id = 0; pWal->num = 0; - pWal->level = pCfg->commitLog; + pWal->level = pCfg->walLevel; pWal->keep = pCfg->keep; strcpy(pWal->path, path); pthread_mutex_init(&pWal->mutex, NULL); diff --git a/src/wal/test/waltest.c b/src/wal/test/waltest.c index 6bab8e0b23..5293c85443 100644 --- a/src/wal/test/waltest.c +++ b/src/wal/test/waltest.c @@ -80,7 +80,7 @@ int main(int argc, char *argv[]) { taosInitLog("wal.log", 100000, 10); SWalCfg walCfg; - walCfg.commitLog = level; + walCfg.walLevel = level; walCfg.wals = max; walCfg.keep = keep; diff --git a/tests/examples/c/demo.c b/tests/examples/c/demo.c index a2073b09b3..70b1b2067f 100644 --- a/tests/examples/c/demo.c +++ b/tests/examples/c/demo.c @@ -74,8 +74,9 @@ int main(int argc, char *argv[]) { printf("success to connect to server\n"); doQuery(taos, "create database if not exists test"); - doQuery(taos, "use test"); - doQuery(taos, "select * from t1 order by ts desc"); + doQuery(taos, "create database if not exists test"); +// doQuery(taos, "use test"); +// doQuery(taos, "select sum(k)*max(k), sum(k), max(k) from tm99"); // doQuery(taos, "create table t1(ts timestamp, k binary(12), f nchar(2))"); // for(int32_t i = 0; i< 100000; ++i) { diff --git a/tests/pytest/insert/date.py b/tests/pytest/insert/date.py index 716d799cb0..fb7f1816c4 100644 --- a/tests/pytest/insert/date.py +++ b/tests/pytest/insert/date.py @@ -18,7 +18,7 @@ class TDTestCase: # TSIM: # TSIM: system sh/ip.sh -i 1 -s up # TSIM: system sh/deploy.sh -n dnode1 -m 192.168.0.1 -i 192.168.0.1 - # TSIM: system sh/cfg.sh -n dnode1 -c commitLog -v 0 + # TSIM: system sh/cfg.sh -n dnode1 -c walLevel -v 0 # TSIM: system sh/exec.sh -n dnode1 -s start # TSIM: # TSIM: sleep 3000 diff --git a/tests/pytest/table/column_name.py b/tests/pytest/table/column_name.py index 6c945646d5..bb1f587a65 100644 --- a/tests/pytest/table/column_name.py +++ b/tests/pytest/table/column_name.py @@ -18,7 +18,7 @@ class TDTestCase: # TSIM: # TSIM: system sh/ip.sh -i 1 -s up # TSIM: system sh/deploy.sh -n dnode1 -m 192.168.0.1 -i 192.168.0.1 - # TSIM: system sh/cfg.sh -n dnode1 -c commitLog -v 0 + # TSIM: system sh/cfg.sh -n dnode1 -c walLevel -v 0 # TSIM: system sh/exec.sh -n dnode1 -s start # TSIM: # TSIM: sleep 3000 diff --git a/tests/pytest/table/column_num.py b/tests/pytest/table/column_num.py index fca5b01ac2..87299827cc 100644 --- a/tests/pytest/table/column_num.py +++ b/tests/pytest/table/column_num.py @@ -18,7 +18,7 @@ class TDTestCase: # TSIM: # TSIM: system sh/ip.sh -i 1 -s up # TSIM: system sh/deploy.sh -n dnode1 -m 192.168.0.1 -i 192.168.0.1 - # TSIM: system sh/cfg.sh -n dnode1 -c commitLog -v 0 + # TSIM: system sh/cfg.sh -n dnode1 -c walLevel -v 0 # TSIM: system sh/exec.sh -n dnode1 -s start # TSIM: # TSIM: sleep 3000 diff --git a/tests/script/general/agg/fill.sim b/tests/script/general/agg/fill.sim index de579238b8..00048eb025 100644 --- a/tests/script/general/agg/fill.sim +++ b/tests/script/general/agg/fill.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/alter/metrics.sim b/tests/script/general/alter/metrics.sim index defe8d0fc1..be11ddc7f5 100644 --- a/tests/script/general/alter/metrics.sim +++ b/tests/script/general/alter/metrics.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/alter/table.sim b/tests/script/general/alter/table.sim index 34630f4805..8660d0d312 100644 --- a/tests/script/general/alter/table.sim +++ b/tests/script/general/alter/table.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/cache/cache_balance.sim b/tests/script/general/cache/cache_balance.sim index 27d048652c..41f9db69f3 100644 --- a/tests/script/general/cache/cache_balance.sim +++ b/tests/script/general/cache/cache_balance.sim @@ -4,8 +4,8 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c httpMaxThreads -v 2 system sh/cfg.sh -n dnode2 -c httpMaxThreads -v 2 system sh/cfg.sh -n dnode1 -c monitor -v 1 diff --git a/tests/script/general/cache/new_metrics.sim b/tests/script/general/cache/new_metrics.sim index 18335b6095..7248bc497d 100644 --- a/tests/script/general/cache/new_metrics.sim +++ b/tests/script/general/cache/new_metrics.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10 system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/cache/new_stream.sim b/tests/script/general/cache/new_stream.sim index 23904a0210..9ff41d1baf 100644 --- a/tests/script/general/cache/new_stream.sim +++ b/tests/script/general/cache/new_stream.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10 system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/cache/restart_metrics.sim b/tests/script/general/cache/restart_metrics.sim index 67d02722e2..9b30bbc600 100644 --- a/tests/script/general/cache/restart_metrics.sim +++ b/tests/script/general/cache/restart_metrics.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10 system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10 system sh/exec.sh -n dnode1 -s start @@ -48,7 +48,7 @@ endi print =============== step2 system sh/exec.sh -n dnode1 -s stop system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10 system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/cache/restart_stream.sim b/tests/script/general/cache/restart_stream.sim index b119dcf856..766930c229 100644 --- a/tests/script/general/cache/restart_stream.sim +++ b/tests/script/general/cache/restart_stream.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 1 system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 1 system sh/exec.sh -n dnode1 -s start @@ -98,7 +98,7 @@ endi print =============== step4 system sh/exec.sh -n dnode1 -s stop system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 1 system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 1 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/cache/restart_table.sim b/tests/script/general/cache/restart_table.sim index c973293fdc..34b9377247 100644 --- a/tests/script/general/cache/restart_table.sim +++ b/tests/script/general/cache/restart_table.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10 system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10 system sh/exec.sh -n dnode1 -s start @@ -36,7 +36,7 @@ endi print =============== step2 system sh/exec.sh -n dnode1 -s stop system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10 system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/column/commit.sim b/tests/script/general/column/commit.sim index 3a46cc73e8..f8fc85a109 100644 --- a/tests/script/general/column/commit.sim +++ b/tests/script/general/column/commit.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/column/metrics.sim b/tests/script/general/column/metrics.sim index 119ab0108c..23fbbfdbf5 100644 --- a/tests/script/general/column/metrics.sim +++ b/tests/script/general/column/metrics.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/column/table.sim b/tests/script/general/column/table.sim index e4f3bea466..af357eea86 100644 --- a/tests/script/general/column/table.sim +++ b/tests/script/general/column/table.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/compress/commitlog.sim b/tests/script/general/compress/commitlog.sim index fdadfdac73..072eefd10c 100644 --- a/tests/script/general/compress/commitlog.sim +++ b/tests/script/general/compress/commitlog.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 1 +system sh/cfg.sh -n dnode1 -c walLevel -v 1 system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024 system sh/cfg.sh -n dnode1 -c compression -v 1 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/compress/compress.sim b/tests/script/general/compress/compress.sim index 2d222ecbbe..54fcc9acde 100644 --- a/tests/script/general/compress/compress.sim +++ b/tests/script/general/compress/compress.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024 system sh/cfg.sh -n dnode1 -c compression -v 1 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/compress/compress2.sim b/tests/script/general/compress/compress2.sim index 096875176e..76e9e66312 100644 --- a/tests/script/general/compress/compress2.sim +++ b/tests/script/general/compress/compress2.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024 system sh/cfg.sh -n dnode1 -c compression -v 2 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/compress/uncompress.sim b/tests/script/general/compress/uncompress.sim index a26627d5e3..2ff0144600 100644 --- a/tests/script/general/compress/uncompress.sim +++ b/tests/script/general/compress/uncompress.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024 system sh/cfg.sh -n dnode1 -c compression -v 1 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/compute/avg.sim b/tests/script/general/compute/avg.sim index ccc996dccb..21dea70071 100644 --- a/tests/script/general/compute/avg.sim +++ b/tests/script/general/compute/avg.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/compute/bottom.sim b/tests/script/general/compute/bottom.sim index 988ce74a03..241f775f34 100644 --- a/tests/script/general/compute/bottom.sim +++ b/tests/script/general/compute/bottom.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/compute/count.sim b/tests/script/general/compute/count.sim index e2c352ffd4..bb087c0ffb 100644 --- a/tests/script/general/compute/count.sim +++ b/tests/script/general/compute/count.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/compute/diff.sim b/tests/script/general/compute/diff.sim index bc5799db18..00f1396319 100644 --- a/tests/script/general/compute/diff.sim +++ b/tests/script/general/compute/diff.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/compute/diff2.sim b/tests/script/general/compute/diff2.sim index ecd0666198..ec23b2481b 100644 --- a/tests/script/general/compute/diff2.sim +++ b/tests/script/general/compute/diff2.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/compute/first.sim b/tests/script/general/compute/first.sim index 947fcf5444..39acb444ab 100644 --- a/tests/script/general/compute/first.sim +++ b/tests/script/general/compute/first.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/compute/interval.sim b/tests/script/general/compute/interval.sim index d4052a47a1..f00d39bcef 100644 --- a/tests/script/general/compute/interval.sim +++ b/tests/script/general/compute/interval.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/compute/last.sim b/tests/script/general/compute/last.sim index ffd4368949..779d1f3691 100644 --- a/tests/script/general/compute/last.sim +++ b/tests/script/general/compute/last.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/compute/leastsquare.sim b/tests/script/general/compute/leastsquare.sim index ccd6be0109..ebafa2baf5 100644 --- a/tests/script/general/compute/leastsquare.sim +++ b/tests/script/general/compute/leastsquare.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/compute/max.sim b/tests/script/general/compute/max.sim index d7f80bfef0..5a90739838 100644 --- a/tests/script/general/compute/max.sim +++ b/tests/script/general/compute/max.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/compute/min.sim b/tests/script/general/compute/min.sim index 3c123ca967..d87ca1ae9b 100644 --- a/tests/script/general/compute/min.sim +++ b/tests/script/general/compute/min.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/compute/null.sim b/tests/script/general/compute/null.sim index 784f9ba094..9f2e9ecf40 100644 --- a/tests/script/general/compute/null.sim +++ b/tests/script/general/compute/null.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/compute/percentile.sim b/tests/script/general/compute/percentile.sim index 8a4086dd24..5d3f40a6de 100644 --- a/tests/script/general/compute/percentile.sim +++ b/tests/script/general/compute/percentile.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/compute/stddev.sim b/tests/script/general/compute/stddev.sim index 53a1b9bc01..4eaba14605 100644 --- a/tests/script/general/compute/stddev.sim +++ b/tests/script/general/compute/stddev.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/compute/sum.sim b/tests/script/general/compute/sum.sim index 4e4e75bfe4..79c7bc0762 100644 --- a/tests/script/general/compute/sum.sim +++ b/tests/script/general/compute/sum.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/compute/top.sim b/tests/script/general/compute/top.sim index 54d7699f27..8f3797b678 100644 --- a/tests/script/general/compute/top.sim +++ b/tests/script/general/compute/top.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/db/backup/keep.sim b/tests/script/general/db/backup/keep.sim index fed45ead92..4899acdd21 100644 --- a/tests/script/general/db/backup/keep.sim +++ b/tests/script/general/db/backup/keep.sim @@ -6,9 +6,9 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode3 -c numOfMPeers -v 1 diff --git a/tests/script/general/db/delete_reuse1.sim b/tests/script/general/db/delete_reuse1.sim index 6e21aabb3c..655dc5e365 100644 --- a/tests/script/general/db/delete_reuse1.sim +++ b/tests/script/general/db/delete_reuse1.sim @@ -9,10 +9,10 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 -system sh/cfg.sh -n dnode4 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 +system sh/cfg.sh -n dnode4 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 diff --git a/tests/script/general/db/delete_reuse2.sim b/tests/script/general/db/delete_reuse2.sim index 95aa3f9526..c424bee9ae 100644 --- a/tests/script/general/db/delete_reuse2.sim +++ b/tests/script/general/db/delete_reuse2.sim @@ -9,10 +9,10 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 -system sh/cfg.sh -n dnode4 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 +system sh/cfg.sh -n dnode4 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 diff --git a/tests/script/general/db/delete_writing1.sim b/tests/script/general/db/delete_writing1.sim index a4be57782e..8587925370 100644 --- a/tests/script/general/db/delete_writing1.sim +++ b/tests/script/general/db/delete_writing1.sim @@ -9,10 +9,10 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 -system sh/cfg.sh -n dnode4 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 +system sh/cfg.sh -n dnode4 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 diff --git a/tests/script/general/db/len.sim b/tests/script/general/db/len.sim index 1cee902c1a..4ec97c8368 100644 --- a/tests/script/general/db/len.sim +++ b/tests/script/general/db/len.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 2000 diff --git a/tests/script/general/db/tables.sim b/tests/script/general/db/tables.sim index afa11d6542..3be2eec729 100644 --- a/tests/script/general/db/tables.sim +++ b/tests/script/general/db/tables.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 2000 diff --git a/tests/script/general/field/2.sim b/tests/script/general/field/2.sim index d5a002932e..dff0e6250c 100644 --- a/tests/script/general/field/2.sim +++ b/tests/script/general/field/2.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/field/3.sim b/tests/script/general/field/3.sim index ed4df854ad..05fed07428 100644 --- a/tests/script/general/field/3.sim +++ b/tests/script/general/field/3.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/field/4.sim b/tests/script/general/field/4.sim index 465df43f04..ad84124b7d 100644 --- a/tests/script/general/field/4.sim +++ b/tests/script/general/field/4.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/field/5.sim b/tests/script/general/field/5.sim index e1e3d9a54a..63fec1f169 100644 --- a/tests/script/general/field/5.sim +++ b/tests/script/general/field/5.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/field/6.sim b/tests/script/general/field/6.sim index 72e4b5bf4c..409c2e53c3 100644 --- a/tests/script/general/field/6.sim +++ b/tests/script/general/field/6.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/field/bigint.sim b/tests/script/general/field/bigint.sim index 2adde6cd3d..e355cb3161 100644 --- a/tests/script/general/field/bigint.sim +++ b/tests/script/general/field/bigint.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/field/binary.sim b/tests/script/general/field/binary.sim index 1e1a3682b1..3ac4376097 100644 --- a/tests/script/general/field/binary.sim +++ b/tests/script/general/field/binary.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/field/bool.sim b/tests/script/general/field/bool.sim index 41770a399d..8a1a717225 100644 --- a/tests/script/general/field/bool.sim +++ b/tests/script/general/field/bool.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/field/double.sim b/tests/script/general/field/double.sim index bf3aa923fd..2de34ad5b6 100644 --- a/tests/script/general/field/double.sim +++ b/tests/script/general/field/double.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/field/float.sim b/tests/script/general/field/float.sim index 8e8c3740a8..443a721340 100644 --- a/tests/script/general/field/float.sim +++ b/tests/script/general/field/float.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/field/int.sim b/tests/script/general/field/int.sim index a4778279a1..4ab1005671 100644 --- a/tests/script/general/field/int.sim +++ b/tests/script/general/field/int.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/field/single.sim b/tests/script/general/field/single.sim index 17492123ed..6d710614f2 100644 --- a/tests/script/general/field/single.sim +++ b/tests/script/general/field/single.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/field/smallint.sim b/tests/script/general/field/smallint.sim index 7b6ea2ce79..37ddadb271 100644 --- a/tests/script/general/field/smallint.sim +++ b/tests/script/general/field/smallint.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/field/tinyint.sim b/tests/script/general/field/tinyint.sim index fe6e14f04a..65775c1145 100644 --- a/tests/script/general/field/tinyint.sim +++ b/tests/script/general/field/tinyint.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/http/grafana.sim b/tests/script/general/http/grafana.sim index 4f83accf2d..f2f84f7985 100644 --- a/tests/script/general/http/grafana.sim +++ b/tests/script/general/http/grafana.sim @@ -4,7 +4,7 @@ sleep 5000 system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 #system sh/cfg.sh -n dnode1 -c adminRowLimit -v 10 system sh/cfg.sh -n dnode1 -c httpDebugFlag -v 135 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/http/grafana_bug.sim b/tests/script/general/http/grafana_bug.sim index ac6de5cb31..41347d855f 100644 --- a/tests/script/general/http/grafana_bug.sim +++ b/tests/script/general/http/grafana_bug.sim @@ -4,7 +4,7 @@ sleep 2000 system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 #system sh/cfg.sh -n dnode1 -c adminRowLimit -v 10 system sh/cfg.sh -n dnode1 -c httpDebugFlag -v 135 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/http/prepare.sim b/tests/script/general/http/prepare.sim index 11834e1223..17b6823e00 100644 --- a/tests/script/general/http/prepare.sim +++ b/tests/script/general/http/prepare.sim @@ -4,7 +4,7 @@ sleep 5000 system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/http/restful_insert.sim b/tests/script/general/http/restful_insert.sim index 5a032b0dbe..66f47728ed 100644 --- a/tests/script/general/http/restful_insert.sim +++ b/tests/script/general/http/restful_insert.sim @@ -4,7 +4,7 @@ sleep 5000 system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c httpEnableRecordSql -v 1 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/http/restful_limit.sim b/tests/script/general/http/restful_limit.sim index 190d63f4db..1cbbb221e3 100644 --- a/tests/script/general/http/restful_limit.sim +++ b/tests/script/general/http/restful_limit.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/http/telegraf.sim b/tests/script/general/http/telegraf.sim index 16bea1ac4b..7d687ff460 100644 --- a/tests/script/general/http/telegraf.sim +++ b/tests/script/general/http/telegraf.sim @@ -4,7 +4,7 @@ sleep 5000 system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c httpEnableRecordSql -v 1 system sh/cfg.sh -n dnode1 -c telegrafUseFieldNum -v 0 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/insert/basic.sim b/tests/script/general/insert/basic.sim index 9136f1e66f..ef8d71fd25 100644 --- a/tests/script/general/insert/basic.sim +++ b/tests/script/general/insert/basic.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/insert/insert_drop.sim b/tests/script/general/insert/insert_drop.sim index 89aad81229..e59c1504c4 100644 --- a/tests/script/general/insert/insert_drop.sim +++ b/tests/script/general/insert/insert_drop.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 1 +system sh/cfg.sh -n dnode1 -c walLevel -v 1 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/insert/query_block1_file.sim b/tests/script/general/insert/query_block1_file.sim index d13fb9841d..5a1298bfdf 100644 --- a/tests/script/general/insert/query_block1_file.sim +++ b/tests/script/general/insert/query_block1_file.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/insert/query_block1_memory.sim b/tests/script/general/insert/query_block1_memory.sim index c20613e192..30af2579bc 100644 --- a/tests/script/general/insert/query_block1_memory.sim +++ b/tests/script/general/insert/query_block1_memory.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/insert/query_block2_file.sim b/tests/script/general/insert/query_block2_file.sim index 18a3f407bb..773602ceb6 100644 --- a/tests/script/general/insert/query_block2_file.sim +++ b/tests/script/general/insert/query_block2_file.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/insert/query_block2_memory.sim b/tests/script/general/insert/query_block2_memory.sim index 409e84269d..2c90fe5d12 100644 --- a/tests/script/general/insert/query_block2_memory.sim +++ b/tests/script/general/insert/query_block2_memory.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/insert/query_file_memory.sim b/tests/script/general/insert/query_file_memory.sim index b6e1bf4e55..f8de8f5fd6 100644 --- a/tests/script/general/insert/query_file_memory.sim +++ b/tests/script/general/insert/query_file_memory.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/insert/query_multi_file.sim b/tests/script/general/insert/query_multi_file.sim index 901b6409fc..81809b51b8 100644 --- a/tests/script/general/insert/query_multi_file.sim +++ b/tests/script/general/insert/query_multi_file.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/insert/tcp.sim b/tests/script/general/insert/tcp.sim index c2782ac1e1..9cea0d6866 100644 --- a/tests/script/general/insert/tcp.sim +++ b/tests/script/general/insert/tcp.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/metrics/disk.sim b/tests/script/general/metrics/disk.sim index 421b5f7c6a..fb5eedff8e 100644 --- a/tests/script/general/metrics/disk.sim +++ b/tests/script/general/metrics/disk.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/metrics/metrics.sim b/tests/script/general/metrics/metrics.sim index f0864034de..143e460dff 100644 --- a/tests/script/general/metrics/metrics.sim +++ b/tests/script/general/metrics/metrics.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/metrics/values.sim b/tests/script/general/metrics/values.sim index aa5aecd6ac..07a31a686b 100644 --- a/tests/script/general/metrics/values.sim +++ b/tests/script/general/metrics/values.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/metrics/vnode3.sim b/tests/script/general/metrics/vnode3.sim index a2642ac7e8..ebd1f24225 100644 --- a/tests/script/general/metrics/vnode3.sim +++ b/tests/script/general/metrics/vnode3.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/parser/alter.sim b/tests/script/general/parser/alter.sim index 07b7f71fa4..c1a5622028 100644 --- a/tests/script/general/parser/alter.sim +++ b/tests/script/general/parser/alter.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3 system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/parser/alter1.sim b/tests/script/general/parser/alter1.sim index 058977f784..c0221e1033 100644 --- a/tests/script/general/parser/alter1.sim +++ b/tests/script/general/parser/alter1.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/alter_stable.sim b/tests/script/general/parser/alter_stable.sim index c0614ec00a..3a4f05b036 100644 --- a/tests/script/general/parser/alter_stable.sim +++ b/tests/script/general/parser/alter_stable.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3 system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/parser/auto_create_tb.sim b/tests/script/general/parser/auto_create_tb.sim index f9db56d15c..3c8db5ea8f 100644 --- a/tests/script/general/parser/auto_create_tb.sim +++ b/tests/script/general/parser/auto_create_tb.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 2 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/parser/auto_create_tb_drop_tb.sim b/tests/script/general/parser/auto_create_tb_drop_tb.sim index bb27c3e440..8e691e4960 100644 --- a/tests/script/general/parser/auto_create_tb_drop_tb.sim +++ b/tests/script/general/parser/auto_create_tb_drop_tb.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 1 +system sh/cfg.sh -n dnode1 -c walLevel -v 1 system sh/cfg.sh -n dnode1 -c commitTime -v 30 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/parser/binary_escapeCharacter.sim b/tests/script/general/parser/binary_escapeCharacter.sim index 7342a96f4f..e31e957c20 100644 --- a/tests/script/general/parser/binary_escapeCharacter.sim +++ b/tests/script/general/parser/binary_escapeCharacter.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3 system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/parser/bug.sim b/tests/script/general/parser/bug.sim index 7e7d7e536e..0233b2ee04 100644 --- a/tests/script/general/parser/bug.sim +++ b/tests/script/general/parser/bug.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c dDebugFlag -v 135 system sh/cfg.sh -n dnode1 -c mDebugFlag -v 135 diff --git a/tests/script/general/parser/col_arithmetic_operation.sim b/tests/script/general/parser/col_arithmetic_operation.sim index 9803e77850..9ea8492907 100644 --- a/tests/script/general/parser/col_arithmetic_operation.sim +++ b/tests/script/general/parser/col_arithmetic_operation.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/columnValue.sim b/tests/script/general/parser/columnValue.sim index 22724d50e8..00b2005dcb 100644 --- a/tests/script/general/parser/columnValue.sim +++ b/tests/script/general/parser/columnValue.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3 system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/parser/columnValue_bool.sim b/tests/script/general/parser/columnValue_bool.sim index 2c896308fd..8af1b1883f 100644 --- a/tests/script/general/parser/columnValue_bool.sim +++ b/tests/script/general/parser/columnValue_bool.sim @@ -11,109 +11,109 @@ sql create table mt_bool (ts timestamp, c bool) tags (tagname bool) ## case 00: static create table for test tag values sql create table st_bool_0 using mt_bool tags (null) -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != NULL then print ==1== expect: NULL, actually: $data23 return -1 endi sql create table st_bool_1 using mt_bool tags (NULL) -sql describe st_bool_1 +sql select tagname from st_bool_1 if $data23 != NULL then print ==2== expect: NULL, actually: $data23 return -1 endi sql create table st_bool_2 using mt_bool tags ('null') -sql describe st_bool_2 +sql select tagname from st_bool_2 if $data23 != NULL then print ==3== expect: NULL, actually: $data23 return -1 endi sql create table st_bool_3 using mt_bool tags ('NULL') -sql describe st_bool_3 +sql select tagname from st_bool_3 if $data23 != NULL then print ==4== expect: NULL, actually: $data23 return -1 endi sql create table st_bool_4 using mt_bool tags ("null") -sql describe st_bool_4 +sql select tagname from st_bool_4 if $data23 != NULL then print ==5== expect: NULL, actually: $data23 return -1 endi sql create table st_bool_5 using mt_bool tags ("NULL") -sql describe st_bool_5 +sql select tagname from st_bool_5 if $data23 != NULL then print ==6== expect: NULL, actually: $data23 return -1 endi sql create table st_bool_6 using mt_bool tags ("true") -sql describe st_bool_6 +sql select tagname from st_bool_6 if $data23 != true then print ==7== expect: true, actually: $data23 return -1 endi sql create table st_bool_7 using mt_bool tags ('true') -sql describe st_bool_7 +sql select tagname from st_bool_7 if $data23 != true then print ==8== expect: true, actually: $data23 return -1 endi sql create table st_bool_8 using mt_bool tags (true) -sql describe st_bool_8 +sql select tagname from st_bool_8 if $data23 != true then print ==9== expect: true, actually: $data23 return -1 endi sql create table st_bool_9 using mt_bool tags ("false") -sql describe st_bool_9 +sql select tagname from st_bool_9 if $data23 != false then print ==10== expect: false, actually: $data23 return -1 endi sql create table st_bool_10 using mt_bool tags ('false') -sql describe st_bool_10 +sql select tagname from st_bool_10 if $data23 != false then print ==11== expect: false, actually: $data23 return -1 endi sql create table st_bool_11 using mt_bool tags (false) -sql describe st_bool_11 +sql select tagname from st_bool_11 if $data23 != false then print ==12== expect: false, actually: $data23 return -1 endi sql create table st_bool_12 using mt_bool tags (0) -sql describe st_bool_12 +sql select tagname from st_bool_12 if $data23 != false then print ==13== expect: false, actually: $data23 return -1 endi sql create table st_bool_13 using mt_bool tags (1) -sql describe st_bool_13 +sql select tagname from st_bool_13 if $data23 != true then print ==14== expect: true, actually: $data23 return -1 endi sql create table st_bool_14 using mt_bool tags (6.9) -sql describe st_bool_14 +sql select tagname from st_bool_14 if $data23 != true then print ==15== expect: true, actually: $data23 return -1 endi sql create table st_bool_15 using mt_bool tags (-3) -sql describe st_bool_15 +sql select tagname from st_bool_15 if $data23 != true then print ==16== expect: true, actually: $data23 return -1 endi sql create table st_bool_15_0 using mt_bool tags (+300) -sql describe st_bool_15_0 +sql select tagname from st_bool_15_0 if $data23 != true then print ==16== expect: true, actually: $data23 return -1 endi sql create table st_bool_15_1 using mt_bool tags (-8.03) -sql describe st_bool_15_1 +sql select tagname from st_bool_15_1 if $data23 != true then print ==16== expect: true, actually: $data23 return -1 @@ -285,7 +285,7 @@ endi ## case 02: dynamic create table for test tag values sql insert into st_bool_16 using mt_bool tags (null) values (now, null) -sql describe st_bool_16 +sql select tagname from st_bool_16 if $data23 != NULL then print ==33== expect: NULL, actually: $data23 return -1 @@ -297,7 +297,7 @@ if $data01 != null then endi sql insert into st_bool_17 using mt_bool tags (NULL) values (now, NULL) -sql describe st_bool_17 +sql select tagname from st_bool_17 if $data23 != NULL then print ==35== expect: NULL, actually: $data23 return -1 @@ -308,7 +308,7 @@ if $data01 != null then return -1 endi sql insert into st_bool_18 using mt_bool tags ('null') values (now, 'null') -sql describe st_bool_18 +sql select tagname from st_bool_18 if $data23 != NULL then print ==37== expect: NULL, actually: $data23 return -1 @@ -319,7 +319,7 @@ if $data01 != null then return -1 endi sql insert into st_bool_19 using mt_bool tags ('NULL') values (now, 'NULL') -sql describe st_bool_19 +sql select tagname from st_bool_19 if $data23 != NULL then print ==39== expect: NULL, actually: $data23 return -1 @@ -330,7 +330,7 @@ if $data01 != null then return -1 endi sql insert into st_bool_20 using mt_bool tags ("null") values (now, "null") -sql describe st_bool_20 +sql select tagname from st_bool_20 if $data23 != NULL then print ==41== expect: NULL, actually: $data23 return -1 @@ -341,7 +341,7 @@ if $data01 != null then return -1 endi sql insert into st_bool_21 using mt_bool tags ("NULL") values (now, "NULL") -sql describe st_bool_21 +sql select tagname from st_bool_21 if $data23 != NULL then print ==43== expect: NULL, actually: $data23 return -1 @@ -352,7 +352,7 @@ if $data01 != null then return -1 endi sql insert into st_bool_22 using mt_bool tags ("true") values (now, "true") -sql describe st_bool_22 +sql select tagname from st_bool_22 if $data23 != true then print ==45== expect: true, actually: $data23 return -1 @@ -363,7 +363,7 @@ if $data01 != 1 then return -1 endi sql insert into st_bool_23 using mt_bool tags ('true') values (now, 'true') -sql describe st_bool_23 +sql select tagname from st_bool_23 if $data23 != true then print ==47== expect: true, actually: $data23 return -1 @@ -374,7 +374,7 @@ if $data01 != 1 then return -1 endi sql insert into st_bool_24 using mt_bool tags (true) values (now, true) -sql describe st_bool_24 +sql select tagname from st_bool_24 if $data23 != true then print ==49== expect: true, actually: $data23 return -1 @@ -385,7 +385,7 @@ if $data01 != 1 then return -1 endi sql insert into st_bool_25 using mt_bool tags ("false") values (now, "false") -sql describe st_bool_25 +sql select tagname from st_bool_25 if $data23 != false then print ==51== expect: false, actually: $data23 return -1 @@ -396,7 +396,7 @@ if $data01 != 0 then return -1 endi sql insert into st_bool_26 using mt_bool tags ('false') values (now, 'false') -sql describe st_bool_26 +sql select tagname from st_bool_26 if $data23 != false then print ==53== expect: false, actually: $data23 return -1 @@ -407,7 +407,7 @@ if $data01 != 0 then return -1 endi sql insert into st_bool_27 using mt_bool tags (false) values (now, false) -sql describe st_bool_27 +sql select tagname from st_bool_27 if $data23 != false then print ==55== expect: false, actually: $data23 return -1 @@ -418,7 +418,7 @@ if $data01 != 0 then return -1 endi sql insert into st_bool_28 using mt_bool tags (0) values (now, 0) -sql describe st_bool_28 +sql select tagname from st_bool_28 if $data23 != false then print ==57== expect: false, actually: $data23 return -1 @@ -429,7 +429,7 @@ if $data01 != 0 then return -1 endi sql insert into st_bool_29 using mt_bool tags (1) values (now, 1) -sql describe st_bool_29 +sql select tagname from st_bool_29 if $data23 != true then print ==59== expect: true, actually: $data23 return -1 @@ -440,7 +440,7 @@ if $data01 != 1 then return -1 endi sql insert into st_bool_30 using mt_bool tags (6.9) values (now, 6.9) -sql describe st_bool_30 +sql select tagname from st_bool_30 if $data23 != true then print ==61== expect: true, actually: $data23 return -1 @@ -451,7 +451,7 @@ if $data01 != 1 then return -1 endi sql insert into st_bool_31 using mt_bool tags (-3) values (now, -3) -sql describe st_bool_31 +sql select tagname from st_bool_31 if $data23 != true then print ==63== expect: true, actually: $data23 return -1 @@ -462,7 +462,7 @@ if $data01 != 1 then return -1 endi sql insert into st_bool_32 using mt_bool tags (+300) values (now, +300) -sql describe st_bool_32 +sql select tagname from st_bool_32 if $data23 != true then print ==63== expect: true, actually: $data23 return -1 @@ -473,7 +473,7 @@ if $data01 != 1 then return -1 endi sql insert into st_bool_33 using mt_bool tags (+30.890) values (now, +30.890) -sql describe st_bool_33 +sql select tagname from st_bool_33 if $data23 != true then print ==63== expect: true, actually: $data23 return -1 @@ -491,82 +491,82 @@ endi ## case 03: alter tag values sql alter table st_bool_0 set tag tagname=true -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != true then return -1 endi sql alter table st_bool_0 set tag tagname=NULL -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != NULL then return -1 endi sql alter table st_bool_0 set tag tagname=false -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != false then return -1 endi sql alter table st_bool_0 set tag tagname=null -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != NULL then return -1 endi sql alter table st_bool_0 set tag tagname='true' -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != true then return -1 endi sql alter table st_bool_0 set tag tagname='null' -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != NULL then return -1 endi sql alter table st_bool_0 set tag tagname='false' -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != false then return -1 endi sql alter table st_bool_0 set tag tagname='NULL' -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != NULL then return -1 endi sql alter table st_bool_0 set tag tagname="true" -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != true then return -1 endi sql alter table st_bool_0 set tag tagname="null" -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != NULL then return -1 endi sql alter table st_bool_0 set tag tagname="false" -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != false then return -1 endi sql alter table st_bool_0 set tag tagname="NULL" -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != NULL then return -1 endi sql alter table st_bool_0 set tag tagname=1 -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != true then return -1 endi sql alter table st_bool_0 set tag tagname=0 -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != false then return -1 endi sql alter table st_bool_0 set tag tagname=6.9 -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != true then return -1 endi sql alter table st_bool_0 set tag tagname=-3 -sql describe st_bool_0 +sql select tagname from st_bool_0 if $data23 != true then return -1 endi diff --git a/tests/script/general/parser/commit.sim b/tests/script/general/parser/commit.sim index eab9497b0b..830c49b88c 100644 --- a/tests/script/general/parser/commit.sim +++ b/tests/script/general/parser/commit.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/create_db.sim b/tests/script/general/parser/create_db.sim index b272ef1ddb..48b17eed4f 100644 --- a/tests/script/general/parser/create_db.sim +++ b/tests/script/general/parser/create_db.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/parser/create_mt.sim b/tests/script/general/parser/create_mt.sim index 83dd09eb8f..275393f4ac 100644 --- a/tests/script/general/parser/create_mt.sim +++ b/tests/script/general/parser/create_mt.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/parser/create_tb.sim b/tests/script/general/parser/create_tb.sim index 5e3007824a..a3a18697a2 100644 --- a/tests/script/general/parser/create_tb.sim +++ b/tests/script/general/parser/create_tb.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/parser/dbtbnameValidate.sim b/tests/script/general/parser/dbtbnameValidate.sim index c4a789da79..5dea4a09c5 100644 --- a/tests/script/general/parser/dbtbnameValidate.sim +++ b/tests/script/general/parser/dbtbnameValidate.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 1000 sql connect diff --git a/tests/script/general/parser/fill.sim b/tests/script/general/parser/fill.sim index 33286ecfcb..c3966c47c1 100644 --- a/tests/script/general/parser/fill.sim +++ b/tests/script/general/parser/fill.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/fill_stb.sim b/tests/script/general/parser/fill_stb.sim index 8fecaeb4c4..a40e5d15a4 100644 --- a/tests/script/general/parser/fill_stb.sim +++ b/tests/script/general/parser/fill_stb.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/first_last.sim b/tests/script/general/parser/first_last.sim index b5133ed9a1..93b2bffeec 100644 --- a/tests/script/general/parser/first_last.sim +++ b/tests/script/general/parser/first_last.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/groupby.sim b/tests/script/general/parser/groupby.sim index 4d367999b2..fb129388a5 100644 --- a/tests/script/general/parser/groupby.sim +++ b/tests/script/general/parser/groupby.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 1000 sql connect diff --git a/tests/script/general/parser/import.sim b/tests/script/general/parser/import.sim index 465f077fec..7ab0437685 100644 --- a/tests/script/general/parser/import.sim +++ b/tests/script/general/parser/import.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/import_commit1.sim b/tests/script/general/parser/import_commit1.sim index a1bc057aef..743642f208 100644 --- a/tests/script/general/parser/import_commit1.sim +++ b/tests/script/general/parser/import_commit1.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 1 +system sh/cfg.sh -n dnode1 -c walLevel -v 1 system sh/cfg.sh -n dnode1 -c commitTime -v 30 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/parser/import_commit2.sim b/tests/script/general/parser/import_commit2.sim index c02905a2d5..9d5cfff672 100644 --- a/tests/script/general/parser/import_commit2.sim +++ b/tests/script/general/parser/import_commit2.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 1 +system sh/cfg.sh -n dnode1 -c walLevel -v 1 system sh/cfg.sh -n dnode1 -c commitTime -v 30 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/parser/import_commit3.sim b/tests/script/general/parser/import_commit3.sim index c37ecd9a17..7a1f1e902c 100644 --- a/tests/script/general/parser/import_commit3.sim +++ b/tests/script/general/parser/import_commit3.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 1 +system sh/cfg.sh -n dnode1 -c walLevel -v 1 system sh/cfg.sh -n dnode1 -c commitTime -v 30 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/parser/import_file.sim b/tests/script/general/parser/import_file.sim index f0fef295c4..cd63612a0e 100644 --- a/tests/script/general/parser/import_file.sim +++ b/tests/script/general/parser/import_file.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 2000 sql connect diff --git a/tests/script/general/parser/insert_multiTbl.sim b/tests/script/general/parser/insert_multiTbl.sim index 503ab7e1da..b24c1b629f 100644 --- a/tests/script/general/parser/insert_multiTbl.sim +++ b/tests/script/general/parser/insert_multiTbl.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 2000 sql connect diff --git a/tests/script/general/parser/insert_tb.sim b/tests/script/general/parser/insert_tb.sim index c69228d662..201bb28786 100644 --- a/tests/script/general/parser/insert_tb.sim +++ b/tests/script/general/parser/insert_tb.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/parser/interp.sim b/tests/script/general/parser/interp.sim index 78369ec84c..b923f61236 100644 --- a/tests/script/general/parser/interp.sim +++ b/tests/script/general/parser/interp.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/join.sim b/tests/script/general/parser/join.sim index b90579d8d8..85ddb29066 100644 --- a/tests/script/general/parser/join.sim +++ b/tests/script/general/parser/join.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c debugFlag -v 135 system sh/cfg.sh -n dnode1 -c rpcDebugFlag -v 135 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/parser/join_multivnode.sim b/tests/script/general/parser/join_multivnode.sim index 983b7fad45..91cac9fbdb 100644 --- a/tests/script/general/parser/join_multivnode.sim +++ b/tests/script/general/parser/join_multivnode.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sql connect sleep 1000 diff --git a/tests/script/general/parser/lastrow.sim b/tests/script/general/parser/lastrow.sim index 50317c7abc..83532cc10f 100644 --- a/tests/script/general/parser/lastrow.sim +++ b/tests/script/general/parser/lastrow.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/limit.sim b/tests/script/general/parser/limit.sim index 16b2a2878c..a20160363a 100644 --- a/tests/script/general/parser/limit.sim +++ b/tests/script/general/parser/limit.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/limit1.sim b/tests/script/general/parser/limit1.sim index 9856365f8e..fa8a938714 100644 --- a/tests/script/general/parser/limit1.sim +++ b/tests/script/general/parser/limit1.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/limit1_tblocks100.sim b/tests/script/general/parser/limit1_tblocks100.sim index b89b7892d4..c6d41cb6a5 100644 --- a/tests/script/general/parser/limit1_tblocks100.sim +++ b/tests/script/general/parser/limit1_tblocks100.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/limit2.sim b/tests/script/general/parser/limit2.sim index 71f1c6f2e8..5b1280d858 100644 --- a/tests/script/general/parser/limit2.sim +++ b/tests/script/general/parser/limit2.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c rowsInFileBlock -v 255 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/parser/limit2_tblocks100.sim b/tests/script/general/parser/limit2_tblocks100.sim index a91103270d..b69d24f6ca 100644 --- a/tests/script/general/parser/limit2_tblocks100.sim +++ b/tests/script/general/parser/limit2_tblocks100.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c rowsInFileBlock -v 255 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/parser/mixed_blocks.sim b/tests/script/general/parser/mixed_blocks.sim index 29f6d2a742..2c8bd0e117 100644 --- a/tests/script/general/parser/mixed_blocks.sim +++ b/tests/script/general/parser/mixed_blocks.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/parser/nchar.sim b/tests/script/general/parser/nchar.sim index 51853825c1..fbdc12446a 100644 --- a/tests/script/general/parser/nchar.sim +++ b/tests/script/general/parser/nchar.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/parser/null_char.sim b/tests/script/general/parser/null_char.sim index 225c7b6cb7..526a0bda26 100644 --- a/tests/script/general/parser/null_char.sim +++ b/tests/script/general/parser/null_char.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3 system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/parser/projection_limit_offset.sim b/tests/script/general/parser/projection_limit_offset.sim index 21c2151b77..5381ed7e83 100644 --- a/tests/script/general/parser/projection_limit_offset.sim +++ b/tests/script/general/parser/projection_limit_offset.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/selectResNum.sim b/tests/script/general/parser/selectResNum.sim index dd06d26521..0a4eafc8a0 100644 --- a/tests/script/general/parser/selectResNum.sim +++ b/tests/script/general/parser/selectResNum.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/select_across_vnodes.sim b/tests/script/general/parser/select_across_vnodes.sim index 67c727ef28..98dd7993ff 100644 --- a/tests/script/general/parser/select_across_vnodes.sim +++ b/tests/script/general/parser/select_across_vnodes.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 5 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/parser/select_from_cache_disk.sim b/tests/script/general/parser/select_from_cache_disk.sim index 9450d41720..84798cdd64 100644 --- a/tests/script/general/parser/select_from_cache_disk.sim +++ b/tests/script/general/parser/select_from_cache_disk.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 2 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/parser/select_with_tags.sim b/tests/script/general/parser/select_with_tags.sim index 92e30bc914..350cb7669a 100644 --- a/tests/script/general/parser/select_with_tags.sim +++ b/tests/script/general/parser/select_with_tags.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 1000 sql connect diff --git a/tests/script/general/parser/set_tag_vals.sim b/tests/script/general/parser/set_tag_vals.sim index 62fef45846..270b6ed065 100644 --- a/tests/script/general/parser/set_tag_vals.sim +++ b/tests/script/general/parser/set_tag_vals.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/single_row_in_tb.sim b/tests/script/general/parser/single_row_in_tb.sim index 1a159d97fd..07af4b9b27 100644 --- a/tests/script/general/parser/single_row_in_tb.sim +++ b/tests/script/general/parser/single_row_in_tb.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/slimit.sim b/tests/script/general/parser/slimit.sim index 61abf1eb2a..3581c3a993 100644 --- a/tests/script/general/parser/slimit.sim +++ b/tests/script/general/parser/slimit.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/parser/slimit1.sim b/tests/script/general/parser/slimit1.sim index d034d5bf17..ce5b278ca6 100644 --- a/tests/script/general/parser/slimit1.sim +++ b/tests/script/general/parser/slimit1.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 2 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/parser/slimit_alter_tags.sim b/tests/script/general/parser/slimit_alter_tags.sim index 6579549287..c507abcf0d 100644 --- a/tests/script/general/parser/slimit_alter_tags.sim +++ b/tests/script/general/parser/slimit_alter_tags.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 2 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/parser/stream.sim b/tests/script/general/parser/stream.sim index b3334d970e..cf06e66739 100644 --- a/tests/script/general/parser/stream.sim +++ b/tests/script/general/parser/stream.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 5 system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 5 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/parser/stream_on_sys.sim b/tests/script/general/parser/stream_on_sys.sim index aa3595eaf6..b7bf7a8900 100644 --- a/tests/script/general/parser/stream_on_sys.sim +++ b/tests/script/general/parser/stream_on_sys.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c monitor -v 1 system sh/cfg.sh -n dnode1 -c monitorInterval -v 1 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/parser/tags_dynamically_specifiy.sim b/tests/script/general/parser/tags_dynamically_specifiy.sim index ca8d335742..af514d1a07 100644 --- a/tests/script/general/parser/tags_dynamically_specifiy.sim +++ b/tests/script/general/parser/tags_dynamically_specifiy.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/tags_filter.sim b/tests/script/general/parser/tags_filter.sim index bc6c6c52f0..42e8c8f9f9 100644 --- a/tests/script/general/parser/tags_filter.sim +++ b/tests/script/general/parser/tags_filter.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/tbnameIn.sim b/tests/script/general/parser/tbnameIn.sim index 38551dd59e..59298cc9f5 100644 --- a/tests/script/general/parser/tbnameIn.sim +++ b/tests/script/general/parser/tbnameIn.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/testSuite.sim b/tests/script/general/parser/testSuite.sim index 402ed19918..dede8f227e 100644 --- a/tests/script/general/parser/testSuite.sim +++ b/tests/script/general/parser/testSuite.sim @@ -1,12 +1,12 @@ -run general/parser/alter.sim -sleep 2000 -run general/parser/alter1.sim -sleep 2000 -run general/parser/alter_stable.sim -sleep 2000 -run general/parser/auto_create_tb.sim -sleep 2000 -run general/parser/auto_create_tb_drop_tb.sim +#run general/parser/alter.sim +#sleep 2000 +#run general/parser/alter1.sim +#sleep 2000 +#run general/parser/alter_stable.sim +#sleep 2000 +#run general/parser/auto_create_tb.sim +#sleep 2000 +#run general/parser/auto_create_tb_drop_tb.sim sleep 2000 run general/parser/col_arithmetic_operation.sim sleep 2000 diff --git a/tests/script/general/parser/timestamp.sim b/tests/script/general/parser/timestamp.sim index 8d407dd5cc..112a1c8377 100644 --- a/tests/script/general/parser/timestamp.sim +++ b/tests/script/general/parser/timestamp.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/parser/where.sim b/tests/script/general/parser/where.sim index 05237c392b..c6671319b9 100644 --- a/tests/script/general/parser/where.sim +++ b/tests/script/general/parser/where.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/stream/metrics_1.sim b/tests/script/general/stream/metrics_1.sim index 2e8d02bf21..c60bde6b2f 100644 --- a/tests/script/general/stream/metrics_1.sim +++ b/tests/script/general/stream/metrics_1.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/stream/metrics_del.sim b/tests/script/general/stream/metrics_del.sim index 7ca74dc102..cf8a6df831 100644 --- a/tests/script/general/stream/metrics_del.sim +++ b/tests/script/general/stream/metrics_del.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfBlocksPerMeter -v 4 system sh/cfg.sh -n dnode1 -c pointsPerCompBlock -v 100 system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024 diff --git a/tests/script/general/stream/metrics_n.sim b/tests/script/general/stream/metrics_n.sim index 31f9fc64ff..47089403dd 100644 --- a/tests/script/general/stream/metrics_n.sim +++ b/tests/script/general/stream/metrics_n.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/stream/metrics_replica1_vnoden.sim b/tests/script/general/stream/metrics_replica1_vnoden.sim index 76ffd99d89..b4a22b4d6d 100644 --- a/tests/script/general/stream/metrics_replica1_vnoden.sim +++ b/tests/script/general/stream/metrics_replica1_vnoden.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/stream/stream_1.sim b/tests/script/general/stream/stream_1.sim index bb2d4a05a5..2309d341c1 100644 --- a/tests/script/general/stream/stream_1.sim +++ b/tests/script/general/stream/stream_1.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/stream/stream_2.sim b/tests/script/general/stream/stream_2.sim index d0fa60ff90..ed45784584 100644 --- a/tests/script/general/stream/stream_2.sim +++ b/tests/script/general/stream/stream_2.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/stream/stream_3.sim b/tests/script/general/stream/stream_3.sim index 3e7d574cd4..2a77991569 100644 --- a/tests/script/general/stream/stream_3.sim +++ b/tests/script/general/stream/stream_3.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 @@ -108,7 +108,7 @@ print =============== step7 system sh/exec.sh -n dnode1 -s stop system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfBlocksPerMeter -v 4 system sh/cfg.sh -n dnode1 -c pointsPerCompBlock -v 100 system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024 diff --git a/tests/script/general/stream/stream_restart.sim b/tests/script/general/stream/stream_restart.sim index f37fbf471d..d5fbef4908 100644 --- a/tests/script/general/stream/stream_restart.sim +++ b/tests/script/general/stream/stream_restart.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/stream/table_1.sim b/tests/script/general/stream/table_1.sim index be45a98f49..efc7c370ca 100644 --- a/tests/script/general/stream/table_1.sim +++ b/tests/script/general/stream/table_1.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/stream/table_del.sim b/tests/script/general/stream/table_del.sim index a2db5b250d..389a3959b0 100644 --- a/tests/script/general/stream/table_del.sim +++ b/tests/script/general/stream/table_del.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfBlocksPerMeter -v 4 system sh/cfg.sh -n dnode1 -c pointsPerCompBlock -v 100 system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024 diff --git a/tests/script/general/stream/table_n.sim b/tests/script/general/stream/table_n.sim index 49e8e723da..e6037c5292 100644 --- a/tests/script/general/stream/table_n.sim +++ b/tests/script/general/stream/table_n.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/stream/table_replica1_vnoden.sim b/tests/script/general/stream/table_replica1_vnoden.sim index 1ed649a3fb..8195c2c725 100644 --- a/tests/script/general/stream/table_replica1_vnoden.sim +++ b/tests/script/general/stream/table_replica1_vnoden.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/table/bigint.sim b/tests/script/general/table/bigint.sim index 4145968fbd..2b7da03366 100644 --- a/tests/script/general/table/bigint.sim +++ b/tests/script/general/table/bigint.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/binary.sim b/tests/script/general/table/binary.sim index b0c5166d20..28a09c5570 100644 --- a/tests/script/general/table/binary.sim +++ b/tests/script/general/table/binary.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/bool.sim b/tests/script/general/table/bool.sim index b55147b67e..4886159c26 100644 --- a/tests/script/general/table/bool.sim +++ b/tests/script/general/table/bool.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/column2.sim b/tests/script/general/table/column2.sim index 4c27ae68ad..d8a58cc78a 100644 --- a/tests/script/general/table/column2.sim +++ b/tests/script/general/table/column2.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/column_name.sim b/tests/script/general/table/column_name.sim index 41a4179a41..c029810be7 100644 --- a/tests/script/general/table/column_name.sim +++ b/tests/script/general/table/column_name.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/column_num.sim b/tests/script/general/table/column_num.sim index bf82b9fc05..0a497d0b0b 100644 --- a/tests/script/general/table/column_num.sim +++ b/tests/script/general/table/column_num.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/column_value.sim b/tests/script/general/table/column_value.sim index 2a1636e5ca..245d8935a3 100644 --- a/tests/script/general/table/column_value.sim +++ b/tests/script/general/table/column_value.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/date.sim b/tests/script/general/table/date.sim index f702a55750..ac97d22902 100644 --- a/tests/script/general/table/date.sim +++ b/tests/script/general/table/date.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/db.table.sim b/tests/script/general/table/db.table.sim index 653a73310f..aa309a4417 100644 --- a/tests/script/general/table/db.table.sim +++ b/tests/script/general/table/db.table.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/delete_reuse1.sim b/tests/script/general/table/delete_reuse1.sim index 1f42637088..3dc4b63bed 100644 --- a/tests/script/general/table/delete_reuse1.sim +++ b/tests/script/general/table/delete_reuse1.sim @@ -9,10 +9,10 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 -system sh/cfg.sh -n dnode4 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 +system sh/cfg.sh -n dnode4 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 diff --git a/tests/script/general/table/delete_reuse2.sim b/tests/script/general/table/delete_reuse2.sim index 238eac975d..d907bf4f7e 100644 --- a/tests/script/general/table/delete_reuse2.sim +++ b/tests/script/general/table/delete_reuse2.sim @@ -9,10 +9,10 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 -system sh/cfg.sh -n dnode4 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 +system sh/cfg.sh -n dnode4 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 diff --git a/tests/script/general/table/delete_writing.sim b/tests/script/general/table/delete_writing.sim index b697c7f841..bd4a316517 100644 --- a/tests/script/general/table/delete_writing.sim +++ b/tests/script/general/table/delete_writing.sim @@ -9,10 +9,10 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 -system sh/cfg.sh -n dnode4 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 +system sh/cfg.sh -n dnode4 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 diff --git a/tests/script/general/table/describe.sim b/tests/script/general/table/describe.sim index fd9a8eda18..822476ac11 100644 --- a/tests/script/general/table/describe.sim +++ b/tests/script/general/table/describe.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/double.sim b/tests/script/general/table/double.sim index 36013be51d..f730d09f01 100644 --- a/tests/script/general/table/double.sim +++ b/tests/script/general/table/double.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/float.sim b/tests/script/general/table/float.sim index 195a2268b7..f7cc7e690e 100644 --- a/tests/script/general/table/float.sim +++ b/tests/script/general/table/float.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/int.sim b/tests/script/general/table/int.sim index 0f8223896c..1b0d7eec2f 100644 --- a/tests/script/general/table/int.sim +++ b/tests/script/general/table/int.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/limit.sim b/tests/script/general/table/limit.sim index e01a209b61..e22f81271b 100644 --- a/tests/script/general/table/limit.sim +++ b/tests/script/general/table/limit.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 129 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/table/smallint.sim b/tests/script/general/table/smallint.sim index 6a0fbd7fb5..5f83c071e5 100644 --- a/tests/script/general/table/smallint.sim +++ b/tests/script/general/table/smallint.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/table.sim b/tests/script/general/table/table.sim index 468e60f1ba..3303527bdb 100644 --- a/tests/script/general/table/table.sim +++ b/tests/script/general/table/table.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/table_len.sim b/tests/script/general/table/table_len.sim index e1ed254fe1..5f675e792e 100644 --- a/tests/script/general/table/table_len.sim +++ b/tests/script/general/table/table_len.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/tinyint.sim b/tests/script/general/table/tinyint.sim index d22331c2a3..9c29d21d12 100644 --- a/tests/script/general/table/tinyint.sim +++ b/tests/script/general/table/tinyint.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/vgroup.sim b/tests/script/general/table/vgroup.sim index cd5c44fb60..81be2fe40a 100644 --- a/tests/script/general/table/vgroup.sim +++ b/tests/script/general/table/vgroup.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/tag/3.sim b/tests/script/general/tag/3.sim index 1cc2fa8cf7..e2a503ce8b 100644 --- a/tests/script/general/tag/3.sim +++ b/tests/script/general/tag/3.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/4.sim b/tests/script/general/tag/4.sim index 02bb910888..93c422bb31 100644 --- a/tests/script/general/tag/4.sim +++ b/tests/script/general/tag/4.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/5.sim b/tests/script/general/tag/5.sim index 3231f738a7..949c9c257b 100644 --- a/tests/script/general/tag/5.sim +++ b/tests/script/general/tag/5.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/6.sim b/tests/script/general/tag/6.sim index 9c106a189c..de5542c635 100644 --- a/tests/script/general/tag/6.sim +++ b/tests/script/general/tag/6.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/add.sim b/tests/script/general/tag/add.sim index 6c9456d57a..92fa800450 100644 --- a/tests/script/general/tag/add.sim +++ b/tests/script/general/tag/add.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/bigint.sim b/tests/script/general/tag/bigint.sim index 3522d91b93..736c30607f 100644 --- a/tests/script/general/tag/bigint.sim +++ b/tests/script/general/tag/bigint.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/binary.sim b/tests/script/general/tag/binary.sim index 45aedf6db8..f57f5cc996 100644 --- a/tests/script/general/tag/binary.sim +++ b/tests/script/general/tag/binary.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/binary_binary.sim b/tests/script/general/tag/binary_binary.sim index fdb10d5877..5f001e028e 100644 --- a/tests/script/general/tag/binary_binary.sim +++ b/tests/script/general/tag/binary_binary.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/bool.sim b/tests/script/general/tag/bool.sim index da3da99b19..82d6cd14bf 100644 --- a/tests/script/general/tag/bool.sim +++ b/tests/script/general/tag/bool.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/bool_binary.sim b/tests/script/general/tag/bool_binary.sim index ddd5b3df94..c836dd227b 100644 --- a/tests/script/general/tag/bool_binary.sim +++ b/tests/script/general/tag/bool_binary.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/bool_int.sim b/tests/script/general/tag/bool_int.sim index 6f1a637965..86a16fde9b 100644 --- a/tests/script/general/tag/bool_int.sim +++ b/tests/script/general/tag/bool_int.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/change.sim b/tests/script/general/tag/change.sim index f0f4efb9c6..74431458f9 100644 --- a/tests/script/general/tag/change.sim +++ b/tests/script/general/tag/change.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/column.sim b/tests/script/general/tag/column.sim index 4313f48e5f..e9b89b7b46 100644 --- a/tests/script/general/tag/column.sim +++ b/tests/script/general/tag/column.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/commit.sim b/tests/script/general/tag/commit.sim index 94ea85781a..1e78628b28 100644 --- a/tests/script/general/tag/commit.sim +++ b/tests/script/general/tag/commit.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/create.sim b/tests/script/general/tag/create.sim index 852eadfbcc..3d4ecf8bc3 100644 --- a/tests/script/general/tag/create.sim +++ b/tests/script/general/tag/create.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/delete.sim b/tests/script/general/tag/delete.sim index ae424ef58c..ef886d7644 100644 --- a/tests/script/general/tag/delete.sim +++ b/tests/script/general/tag/delete.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/double.sim b/tests/script/general/tag/double.sim index d811325b10..47c94d8ae6 100644 --- a/tests/script/general/tag/double.sim +++ b/tests/script/general/tag/double.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/float.sim b/tests/script/general/tag/float.sim index 537211fe1b..4f86eec338 100644 --- a/tests/script/general/tag/float.sim +++ b/tests/script/general/tag/float.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/int.sim b/tests/script/general/tag/int.sim index ea635d9db6..d0dea47cb1 100644 --- a/tests/script/general/tag/int.sim +++ b/tests/script/general/tag/int.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/int_binary.sim b/tests/script/general/tag/int_binary.sim index 166285f799..234780d6d5 100644 --- a/tests/script/general/tag/int_binary.sim +++ b/tests/script/general/tag/int_binary.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/int_float.sim b/tests/script/general/tag/int_float.sim index 4745ae704f..bfa3ed7f72 100644 --- a/tests/script/general/tag/int_float.sim +++ b/tests/script/general/tag/int_float.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/set.sim b/tests/script/general/tag/set.sim index fd9fdd2807..e48db5a7a8 100644 --- a/tests/script/general/tag/set.sim +++ b/tests/script/general/tag/set.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/smallint.sim b/tests/script/general/tag/smallint.sim index 701e605e38..4ca9459477 100644 --- a/tests/script/general/tag/smallint.sim +++ b/tests/script/general/tag/smallint.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/tag/tinyint.sim b/tests/script/general/tag/tinyint.sim index b65be72036..9e339a352c 100644 --- a/tests/script/general/tag/tinyint.sim +++ b/tests/script/general/tag/tinyint.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/vector/metrics_field.sim b/tests/script/general/vector/metrics_field.sim index a883c81e18..1b96b8c36d 100644 --- a/tests/script/general/vector/metrics_field.sim +++ b/tests/script/general/vector/metrics_field.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/vector/metrics_mix.sim b/tests/script/general/vector/metrics_mix.sim index 26ff0af063..992ce6e189 100644 --- a/tests/script/general/vector/metrics_mix.sim +++ b/tests/script/general/vector/metrics_mix.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/vector/metrics_query.sim b/tests/script/general/vector/metrics_query.sim index d797fa6467..8e3833f7a4 100644 --- a/tests/script/general/vector/metrics_query.sim +++ b/tests/script/general/vector/metrics_query.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/vector/metrics_tag.sim b/tests/script/general/vector/metrics_tag.sim index 29923d3d42..81f15a194f 100644 --- a/tests/script/general/vector/metrics_tag.sim +++ b/tests/script/general/vector/metrics_tag.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/vector/metrics_time.sim b/tests/script/general/vector/metrics_time.sim index 9400b2a76a..f7e78ae521 100644 --- a/tests/script/general/vector/metrics_time.sim +++ b/tests/script/general/vector/metrics_time.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/vector/multi.sim b/tests/script/general/vector/multi.sim index dfdc015edf..3a607b2410 100644 --- a/tests/script/general/vector/multi.sim +++ b/tests/script/general/vector/multi.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/vector/single.sim b/tests/script/general/vector/single.sim index cd892bfd87..8eff3e1fb1 100644 --- a/tests/script/general/vector/single.sim +++ b/tests/script/general/vector/single.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/vector/table_field.sim b/tests/script/general/vector/table_field.sim index 2894b04c6d..96adf54f1d 100644 --- a/tests/script/general/vector/table_field.sim +++ b/tests/script/general/vector/table_field.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/vector/table_mix.sim b/tests/script/general/vector/table_mix.sim index 9cd4085912..c994697ff2 100644 --- a/tests/script/general/vector/table_mix.sim +++ b/tests/script/general/vector/table_mix.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/vector/table_query.sim b/tests/script/general/vector/table_query.sim index 1e1784e726..ce3acc1d66 100644 --- a/tests/script/general/vector/table_query.sim +++ b/tests/script/general/vector/table_query.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/vector/table_time.sim b/tests/script/general/vector/table_time.sim index f0b0d525e6..3c2ff183ed 100644 --- a/tests/script/general/vector/table_time.sim +++ b/tests/script/general/vector/table_time.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/tmp/prepare.sim b/tests/script/tmp/prepare.sim index eda0452459..68a05a33e7 100644 --- a/tests/script/tmp/prepare.sim +++ b/tests/script/tmp/prepare.sim @@ -5,10 +5,10 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c commitLog -v 2 -system sh/cfg.sh -n dnode2 -c commitLog -v 2 -system sh/cfg.sh -n dnode3 -c commitLog -v 2 -system sh/cfg.sh -n dnode4 -c commitLog -v 2 +system sh/cfg.sh -n dnode1 -c walLevel -v 2 +system sh/cfg.sh -n dnode2 -c walLevel -v 2 +system sh/cfg.sh -n dnode3 -c walLevel -v 2 +system sh/cfg.sh -n dnode4 -c walLevel -v 2 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 diff --git a/tests/script/unique/big/tcp.sim b/tests/script/unique/big/tcp.sim index 9e98ddd349..a4ca80c75c 100644 --- a/tests/script/unique/big/tcp.sim +++ b/tests/script/unique/big/tcp.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c tables -v 30000 system sh/cfg.sh -n dnode1 -c dDebugFlag -v 131 diff --git a/tests/script/unique/db/commit.sim b/tests/script/unique/db/commit.sim index d9c507f5fb..0e58c6ed76 100644 --- a/tests/script/unique/db/commit.sim +++ b/tests/script/unique/db/commit.sim @@ -6,9 +6,9 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 -system sh/cfg.sh -n dnode1 -c commitLog -v 2 -system sh/cfg.sh -n dnode2 -c commitLog -v 2 -system sh/cfg.sh -n dnode3 -c commitLog -v 2 +system sh/cfg.sh -n dnode1 -c walLevel -v 2 +system sh/cfg.sh -n dnode2 -c walLevel -v 2 +system sh/cfg.sh -n dnode3 -c walLevel -v 2 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode3 -c numOfMPeers -v 1 diff --git a/tests/script/unique/metrics/balance_replica1.sim b/tests/script/unique/metrics/balance_replica1.sim index d32e647fbe..cab3c1a807 100644 --- a/tests/script/unique/metrics/balance_replica1.sim +++ b/tests/script/unique/metrics/balance_replica1.sim @@ -10,8 +10,8 @@ system sh/cfg.sh -n dnode1 -c statusInterval -v 1 system sh/cfg.sh -n dnode2 -c statusInterval -v 1 system sh/cfg.sh -n dnode1 -c balanceInterval -v 10 system sh/cfg.sh -n dnode2 -c balanceInterval -v 10 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0 system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 0 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 diff --git a/tests/script/unique/metrics/dnode2.sim b/tests/script/unique/metrics/dnode2.sim index c4556d0f0e..2156dc40d8 100644 --- a/tests/script/unique/metrics/dnode2.sim +++ b/tests/script/unique/metrics/dnode2.sim @@ -4,8 +4,8 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 diff --git a/tests/script/unique/metrics/dnode2_stop.sim b/tests/script/unique/metrics/dnode2_stop.sim index 93012e53ae..be6ec735a1 100644 --- a/tests/script/unique/metrics/dnode2_stop.sim +++ b/tests/script/unique/metrics/dnode2_stop.sim @@ -4,8 +4,8 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 diff --git a/tests/script/unique/metrics/dnode3.sim b/tests/script/unique/metrics/dnode3.sim index 9ca7dec33d..3fd54adfba 100644 --- a/tests/script/unique/metrics/dnode3.sim +++ b/tests/script/unique/metrics/dnode3.sim @@ -6,9 +6,9 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4 diff --git a/tests/script/unique/metrics/replica2_dnode4.sim b/tests/script/unique/metrics/replica2_dnode4.sim index 262f7f3a7c..c5096ca03c 100644 --- a/tests/script/unique/metrics/replica2_dnode4.sim +++ b/tests/script/unique/metrics/replica2_dnode4.sim @@ -8,10 +8,10 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 -system sh/cfg.sh -n dnode4 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 +system sh/cfg.sh -n dnode4 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4 diff --git a/tests/script/unique/metrics/replica2_vnode3.sim b/tests/script/unique/metrics/replica2_vnode3.sim index 0611af0b9e..937c78cb8b 100644 --- a/tests/script/unique/metrics/replica2_vnode3.sim +++ b/tests/script/unique/metrics/replica2_vnode3.sim @@ -4,8 +4,8 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 diff --git a/tests/script/unique/metrics/replica3_dnode6.sim b/tests/script/unique/metrics/replica3_dnode6.sim index 73c67e54c2..c3592a88f2 100644 --- a/tests/script/unique/metrics/replica3_dnode6.sim +++ b/tests/script/unique/metrics/replica3_dnode6.sim @@ -14,12 +14,12 @@ system sh/deploy.sh -n dnode4 -i 4 system sh/deploy.sh -n dnode5 -i 5 system sh/deploy.sh -n dnode6 -i 6 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 -system sh/cfg.sh -n dnode4 -c commitLog -v 0 -system sh/cfg.sh -n dnode5 -c commitLog -v 0 -system sh/cfg.sh -n dnode6 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 +system sh/cfg.sh -n dnode4 -c walLevel -v 0 +system sh/cfg.sh -n dnode5 -c walLevel -v 0 +system sh/cfg.sh -n dnode6 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 diff --git a/tests/script/unique/metrics/replica3_vnode3.sim b/tests/script/unique/metrics/replica3_vnode3.sim index 006b01bc74..4da34fc92a 100644 --- a/tests/script/unique/metrics/replica3_vnode3.sim +++ b/tests/script/unique/metrics/replica3_vnode3.sim @@ -8,10 +8,10 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 -system sh/cfg.sh -n dnode4 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 +system sh/cfg.sh -n dnode4 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4 diff --git a/tests/script/unique/stream/metrics_balance.sim b/tests/script/unique/stream/metrics_balance.sim index feac15f4db..fcdb7df206 100644 --- a/tests/script/unique/stream/metrics_balance.sim +++ b/tests/script/unique/stream/metrics_balance.sim @@ -10,8 +10,8 @@ system sh/cfg.sh -n dnode1 -c statusInterval -v 1 system sh/cfg.sh -n dnode2 -c statusInterval -v 1 system sh/cfg.sh -n dnode1 -c balanceInterval -v 10 system sh/cfg.sh -n dnode2 -c balanceInterval -v 10 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0 system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 0 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 diff --git a/tests/script/unique/stream/metrics_replica1_dnode2.sim b/tests/script/unique/stream/metrics_replica1_dnode2.sim index f932f601ff..45fb7d269d 100644 --- a/tests/script/unique/stream/metrics_replica1_dnode2.sim +++ b/tests/script/unique/stream/metrics_replica1_dnode2.sim @@ -4,8 +4,8 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 diff --git a/tests/script/unique/stream/metrics_replica2_dnode2.sim b/tests/script/unique/stream/metrics_replica2_dnode2.sim index ba90d8b833..e9944daf37 100644 --- a/tests/script/unique/stream/metrics_replica2_dnode2.sim +++ b/tests/script/unique/stream/metrics_replica2_dnode2.sim @@ -4,8 +4,8 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim b/tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim index d0ef82b6a0..1c89d18917 100644 --- a/tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim +++ b/tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim @@ -4,8 +4,8 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 diff --git a/tests/script/unique/stream/metrics_replica2_dnode3.sim b/tests/script/unique/stream/metrics_replica2_dnode3.sim index fc4b454059..d0ef994f29 100644 --- a/tests/script/unique/stream/metrics_replica2_dnode3.sim +++ b/tests/script/unique/stream/metrics_replica2_dnode3.sim @@ -6,9 +6,9 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 8 diff --git a/tests/script/unique/stream/metrics_replica3_dnode4.sim b/tests/script/unique/stream/metrics_replica3_dnode4.sim index 90f9ed16ed..e2b2c3d6cc 100644 --- a/tests/script/unique/stream/metrics_replica3_dnode4.sim +++ b/tests/script/unique/stream/metrics_replica3_dnode4.sim @@ -8,10 +8,10 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 -system sh/cfg.sh -n dnode4 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 +system sh/cfg.sh -n dnode4 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 8 diff --git a/tests/script/unique/stream/metrics_vnode_stop.sim b/tests/script/unique/stream/metrics_vnode_stop.sim index 71a085454b..4f85d75e7f 100644 --- a/tests/script/unique/stream/metrics_vnode_stop.sim +++ b/tests/script/unique/stream/metrics_vnode_stop.sim @@ -4,8 +4,8 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 2 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2 system sh/exec.sh -n dnode1 -s start @@ -99,8 +99,8 @@ system sh/exec.sh -n dnode1 -s stop system sh/exec.sh -n dnode2 -s stop system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/exec.sh -n dnode2 -s start sleep 2000 diff --git a/tests/script/unique/stream/table_balance.sim b/tests/script/unique/stream/table_balance.sim index 3eab029529..6d2e7de57a 100644 --- a/tests/script/unique/stream/table_balance.sim +++ b/tests/script/unique/stream/table_balance.sim @@ -10,8 +10,8 @@ system sh/cfg.sh -n dnode1 -c statusInterval -v 1 system sh/cfg.sh -n dnode2 -c statusInterval -v 1 system sh/cfg.sh -n dnode1 -c balanceInterval -v 10 system sh/cfg.sh -n dnode2 -c balanceInterval -v 10 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0 system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 0 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 diff --git a/tests/script/unique/stream/table_replica1_dnode2.sim b/tests/script/unique/stream/table_replica1_dnode2.sim index 0640de11b3..a36d9ec99d 100644 --- a/tests/script/unique/stream/table_replica1_dnode2.sim +++ b/tests/script/unique/stream/table_replica1_dnode2.sim @@ -4,8 +4,8 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 diff --git a/tests/script/unique/stream/table_replica2_dnode2.sim b/tests/script/unique/stream/table_replica2_dnode2.sim index 2b9d22d150..da24b5ab4e 100644 --- a/tests/script/unique/stream/table_replica2_dnode2.sim +++ b/tests/script/unique/stream/table_replica2_dnode2.sim @@ -4,8 +4,8 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/stream/table_replica2_dnode2_vnoden.sim b/tests/script/unique/stream/table_replica2_dnode2_vnoden.sim index 917d6935e8..c84d73933f 100644 --- a/tests/script/unique/stream/table_replica2_dnode2_vnoden.sim +++ b/tests/script/unique/stream/table_replica2_dnode2_vnoden.sim @@ -4,8 +4,8 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 diff --git a/tests/script/unique/stream/table_replica2_dnode3.sim b/tests/script/unique/stream/table_replica2_dnode3.sim index 28d40d237e..5e9ef14c01 100644 --- a/tests/script/unique/stream/table_replica2_dnode3.sim +++ b/tests/script/unique/stream/table_replica2_dnode3.sim @@ -6,9 +6,9 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 8 diff --git a/tests/script/unique/stream/table_replica3_dnode4.sim b/tests/script/unique/stream/table_replica3_dnode4.sim index b6d76c3719..7547f77963 100644 --- a/tests/script/unique/stream/table_replica3_dnode4.sim +++ b/tests/script/unique/stream/table_replica3_dnode4.sim @@ -8,10 +8,10 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 -system sh/cfg.sh -n dnode4 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 +system sh/cfg.sh -n dnode4 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 8 system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 8 diff --git a/tests/script/unique/stream/table_vnode_stop.sim b/tests/script/unique/stream/table_vnode_stop.sim index fe7165a166..8528ee6755 100644 --- a/tests/script/unique/stream/table_vnode_stop.sim +++ b/tests/script/unique/stream/table_vnode_stop.sim @@ -4,8 +4,8 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 2 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2 system sh/exec.sh -n dnode1 -s start @@ -100,8 +100,8 @@ system sh/exec.sh -n dnode1 -s stop system sh/exec.sh -n dnode2 -s stop system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 sleep 2000 system sh/exec.sh -n dnode2 -s start diff --git a/tests/script/unique/table/delete_part.sim b/tests/script/unique/table/delete_part.sim index 4766be5131..826df7f04c 100644 --- a/tests/script/unique/table/delete_part.sim +++ b/tests/script/unique/table/delete_part.sim @@ -9,10 +9,10 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 -system sh/cfg.sh -n dnode4 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 +system sh/cfg.sh -n dnode4 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 diff --git a/tests/script/unique/vnode/backup/replica4.sim b/tests/script/unique/vnode/backup/replica4.sim index afddf58b80..bccc17e682 100644 --- a/tests/script/unique/vnode/backup/replica4.sim +++ b/tests/script/unique/vnode/backup/replica4.sim @@ -10,10 +10,10 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 -system sh/cfg.sh -n dnode4 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 +system sh/cfg.sh -n dnode4 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start $x = 0 diff --git a/tests/script/unique/vnode/backup/replica5.sim b/tests/script/unique/vnode/backup/replica5.sim index 32d30c110c..d29d11fdaf 100644 --- a/tests/script/unique/vnode/backup/replica5.sim +++ b/tests/script/unique/vnode/backup/replica5.sim @@ -12,11 +12,11 @@ system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 system sh/deploy.sh -n dnode5 -i 5 -system sh/cfg.sh -n dnode1 -c commitLog -v 0 -system sh/cfg.sh -n dnode2 -c commitLog -v 0 -system sh/cfg.sh -n dnode3 -c commitLog -v 0 -system sh/cfg.sh -n dnode4 -c commitLog -v 0 -system sh/cfg.sh -n dnode5 -c commitLog -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode3 -c walLevel -v 0 +system sh/cfg.sh -n dnode4 -c walLevel -v 0 +system sh/cfg.sh -n dnode5 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start From 9b3844ea91b7f744d0d8caac1fb320575e6f9e0e Mon Sep 17 00:00:00 2001 From: slguan Date: Thu, 7 May 2020 14:29:06 +0800 Subject: [PATCH 26/31] a dead lock while tsdb commit --- src/tsdb/src/tsdbFile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tsdb/src/tsdbFile.c b/src/tsdb/src/tsdbFile.c index 0c1b9e314e..b1228b0230 100644 --- a/src/tsdb/src/tsdbFile.c +++ b/src/tsdb/src/tsdbFile.c @@ -180,7 +180,7 @@ void tsdbFitRetention(STsdbRepo *pRepo) { int mfid = tsdbGetKeyFileId(taosGetTimestamp(pRepo->config.precision), pRepo->config.daysPerFile, pRepo->config.precision); - while (pGroup[0].fileId < mfid) { + while (pFileH->numOfFGroups > 0 && pGroup[0].fileId < mfid) { tsdbRemoveFileGroup(pFileH, pGroup[0].fileId); } } From 6967d2640b8a15dd8ded92592c89e70a0baccfee Mon Sep 17 00:00:00 2001 From: hzcheng Date: Thu, 7 May 2020 14:49:45 +0800 Subject: [PATCH 27/31] fix retention error --- src/tsdb/src/tsdbFile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tsdb/src/tsdbFile.c b/src/tsdb/src/tsdbFile.c index b1228b0230..ad98bb7b20 100644 --- a/src/tsdb/src/tsdbFile.c +++ b/src/tsdb/src/tsdbFile.c @@ -178,7 +178,7 @@ void tsdbFitRetention(STsdbRepo *pRepo) { SFileGroup *pGroup = pFileH->fGroup; int mfid = - tsdbGetKeyFileId(taosGetTimestamp(pRepo->config.precision), pRepo->config.daysPerFile, pRepo->config.precision); + tsdbGetKeyFileId(taosGetTimestamp(pRepo->config.precision), pRepo->config.daysPerFile, pRepo->config.precision) - pFileH->maxFGroups + 3; while (pFileH->numOfFGroups > 0 && pGroup[0].fileId < mfid) { tsdbRemoveFileGroup(pFileH, pGroup[0].fileId); From c455c6987967064923bb42eab1e8bfa689cf7265 Mon Sep 17 00:00:00 2001 From: hjxilinx Date: Thu, 7 May 2020 14:52:18 +0800 Subject: [PATCH 28/31] [td-242] --- src/query/src/qparserImpl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/query/src/qparserImpl.c b/src/query/src/qparserImpl.c index 5a93282017..b8d1189129 100644 --- a/src/query/src/qparserImpl.c +++ b/src/query/src/qparserImpl.c @@ -52,6 +52,8 @@ int32_t tSQLParse(SSqlInfo *pSQLInfo, const char *pStr) { Parse(pParser, 0, t0, pSQLInfo); goto abort_parse; } + + case TK_QUESTION: case TK_ILLEGAL: { snprintf(pSQLInfo->pzErrMsg, tListLen(pSQLInfo->pzErrMsg), "unrecognized token: \"%s\"", t0.z); pSQLInfo->valid = false; From 9291b1688f7417cf88eae8831401feeb111d431b Mon Sep 17 00:00:00 2001 From: slguan Date: Thu, 7 May 2020 14:57:28 +0800 Subject: [PATCH 29/31] scripts --- tests/script/jenkins/basic.txt | 33 +++++ .../script/unique/account/account_create.sim | 2 +- .../script/unique/account/account_delete.sim | 4 +- tests/script/unique/account/account_len.sim | 2 + tests/script/unique/account/authority.sim | 2 + tests/script/unique/account/basic.sim | 2 +- tests/script/unique/account/paras.sim | 2 + tests/script/unique/account/pass_alter.sim | 2 + tests/script/unique/account/pass_len.sim | 2 +- tests/script/unique/account/usage.sim | 4 +- tests/script/unique/account/user_create.sim | 5 +- tests/script/unique/account/user_len.sim | 2 + tests/script/unique/cluster/balance1.sim | 17 +-- tests/script/unique/cluster/balance2.sim | 84 ++---------- tests/script/unique/cluster/balance3.sim | 128 ++++++------------ tests/script/unique/column/replica3.sim | 13 +- tests/script/unique/db/replica_add12.sim | 11 +- tests/script/unique/db/replica_add13.sim | 11 +- tests/script/unique/db/replica_add23.sim | 11 +- tests/script/unique/db/replica_part.sim | 9 ++ tests/script/unique/db/replica_reduce21.sim | 9 ++ tests/script/unique/db/replica_reduce31.sim | 9 ++ tests/script/unique/db/replica_reduce32.sim | 9 ++ tests/script/unique/dnode/balance1.sim | 9 ++ tests/script/unique/dnode/balance2.sim | 9 ++ tests/script/unique/dnode/balance3.sim | 8 ++ tests/script/unique/dnode/balancex.sim | 8 ++ tests/script/unique/dnode/offline1.sim | 8 ++ tests/script/unique/dnode/offline2.sim | 8 ++ tests/script/unique/http/admin.sim | 11 +- tests/script/unique/mnode/mgmt22.sim | 11 +- tests/script/unique/mnode/mgmt23.sim | 11 +- tests/script/unique/mnode/mgmt24.sim | 11 +- tests/script/unique/mnode/mgmt25.sim | 11 +- tests/script/unique/mnode/mgmt26.sim | 11 +- tests/script/unique/mnode/mgmt33.sim | 11 +- tests/script/unique/mnode/mgmt34.sim | 12 +- tests/script/unique/vnode/replica2_basic2.sim | 11 +- tests/script/unique/vnode/replica3_basic.sim | 13 +- 39 files changed, 324 insertions(+), 212 deletions(-) diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 81f6bc55f7..4c150b63bc 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -6,6 +6,39 @@ cd ../../../debug; cmake .. #cd ../../../debug; make clean cd ../../../debug; make + +#general + +./test.sh -f general/db/basic1.sim +./test.sh -f general/db/basic2.sim +./test.sh -f general/db/basic3.sim +./test.sh -f general/db/basic4.sim +./test.sh -f general/db/basic5.sim + +./test.sh -f general/table/autocreate.sim +./test.sh -f general/table/basic1.sim +./test.sh -f general/table/basic2.sim +./test.sh -f general/table/basic3.sim +./test.sh -f general/table/bigint.sim +./test.sh -f general/table/bool.sim +./test.sh -f general/table/column_name.sim +./test.sh -f general/table/column_num.sim +./test.sh -f general/table/db.table.sim +./test.sh -f general/table/double.sim +./test.sh -f general/table/float.sim +./test.sh -f general/table/int.sim +./test.sh -f general/table/smallint.sim +./test.sh -f general/table/tinyint.sim + +./test.sh -f general/user/basic1.sim +./test.sh -f general/user/pass_alter.sim +./test.sh -f general/user/pass_len.sim +./test.sh -f general/user/user_create.sim +./test.sh -f general/user/user_len.sim + + +# unique + ./test.sh -u -f unique/account/account_create.sim ./test.sh -u -f unique/account/account_delete.sim ./test.sh -u -f unique/account/account_len.sim diff --git a/tests/script/unique/account/account_create.sim b/tests/script/unique/account/account_create.sim index b6eb239052..6ada0b4910 100644 --- a/tests/script/unique/account/account_create.sim +++ b/tests/script/unique/account/account_create.sim @@ -76,4 +76,4 @@ if $rows != 1 then return -1 endi - +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/account/account_delete.sim b/tests/script/unique/account/account_delete.sim index 6d1c148698..039f381632 100644 --- a/tests/script/unique/account/account_delete.sim +++ b/tests/script/unique/account/account_delete.sim @@ -94,4 +94,6 @@ sql drop account oroot sql show accounts if $rows != 1 then return -1 -endi \ No newline at end of file +endi + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/account/account_len.sim b/tests/script/unique/account/account_len.sim index 06fb37bb5a..eaa5873a1f 100644 --- a/tests/script/unique/account/account_len.sim +++ b/tests/script/unique/account/account_len.sim @@ -88,3 +88,5 @@ sql show users if $rows != 3 then return -1 endi + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/account/authority.sim b/tests/script/unique/account/authority.sim index 4198f2c333..ca9c68f57d 100644 --- a/tests/script/unique/account/authority.sim +++ b/tests/script/unique/account/authority.sim @@ -343,3 +343,5 @@ sql drop database d1 sql drop database d2 sql drop database d3 sql drop database d4 + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/account/basic.sim b/tests/script/unique/account/basic.sim index b2d8904cc6..d06f7a15d9 100644 --- a/tests/script/unique/account/basic.sim +++ b/tests/script/unique/account/basic.sim @@ -42,4 +42,4 @@ endi print $data00 $data01 $data02 print $data10 $data11 $data22 - +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/account/paras.sim b/tests/script/unique/account/paras.sim index d1d573d334..b2e540400c 100644 --- a/tests/script/unique/account/paras.sim +++ b/tests/script/unique/account/paras.sim @@ -109,3 +109,5 @@ endi if $data16 != 0.000/10.000 then return -1 endi + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/account/pass_alter.sim b/tests/script/unique/account/pass_alter.sim index 54ab8fbda8..12a237c972 100644 --- a/tests/script/unique/account/pass_alter.sim +++ b/tests/script/unique/account/pass_alter.sim @@ -112,3 +112,5 @@ sql alter user oroot pass 'taosdata' sql drop account oroot sql drop user read sql drop user write + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/account/pass_len.sim b/tests/script/unique/account/pass_len.sim index acf4f50c69..b78c881c7f 100644 --- a/tests/script/unique/account/pass_len.sim +++ b/tests/script/unique/account/pass_len.sim @@ -78,4 +78,4 @@ if $rows != 3 then return -1 endi - +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/account/usage.sim b/tests/script/unique/account/usage.sim index af904815a0..f022380ac4 100644 --- a/tests/script/unique/account/usage.sim +++ b/tests/script/unique/account/usage.sim @@ -54,4 +54,6 @@ if $data05 != 0/10 then endi print =============== check grant -sql_error create database d6 \ No newline at end of file +sql_error create database d6 + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/account/user_create.sim b/tests/script/unique/account/user_create.sim index bc4a8f6e8e..ae15f8e02b 100644 --- a/tests/script/unique/account/user_create.sim +++ b/tests/script/unique/account/user_create.sim @@ -81,7 +81,4 @@ step42: sql drop user read - - - - +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/account/user_len.sim b/tests/script/unique/account/user_len.sim index 0e25f554e0..2122e7bd3f 100644 --- a/tests/script/unique/account/user_len.sim +++ b/tests/script/unique/account/user_len.sim @@ -89,3 +89,5 @@ sql show accounts if $rows != 1 then return -1 endi + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/cluster/balance1.sim b/tests/script/unique/cluster/balance1.sim index 50f56688f3..638febd3db 100644 --- a/tests/script/unique/cluster/balance1.sim +++ b/tests/script/unique/cluster/balance1.sim @@ -553,11 +553,12 @@ if $data41 != 85 then return -1 endi -print ============================================ over -system sh/exec_up.sh -n dnode2 -s stop -x SIGINT -system sh/exec_up.sh -n dnode3 -s stop -x SIGINT -system sh/exec_up.sh -n dnode4 -s stop -x SIGINT -system sh/exec_up.sh -n dnode5 -s stop -x SIGINT - - - +print ============================================ over= +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/cluster/balance2.sim b/tests/script/unique/cluster/balance2.sim index 04ab5f8fe4..10de862b7f 100644 --- a/tests/script/unique/cluster/balance2.sim +++ b/tests/script/unique/cluster/balance2.sim @@ -386,21 +386,21 @@ endi sql select * from c_b2_d2.c_b2_t2 order by t desc print $data01 $data11 $data21 $data31 $data41 -#if $data01 != 21 then -# return -1 -#endi -#if $data11 != 22 then -# return -1 -#endi -#if $data21 != 23 then -# return -1 -#endi -#if $data31 != 24 then -# return -1 -#endi -#if $data41 != 25 then -# return -1 -#endi +if $data01 != 21 then + return -1 +endi +if $data11 != 22 then + return -1 +endi +if $data21 != 23 then + return -1 +endi +if $data31 != 24 then + return -1 +endi +if $data41 != 25 then + return -1 +endi sql select * from c_b2_d3.c_b2_t3 order by t desc print $data01 $data11 $data21 $data31 $data41 @@ -420,60 +420,6 @@ if $data41 != 35 then return -1 endi -sql select * from c_b2_d4.c_b2_t4 order by t desc -print $data01 $data11 $data21 $data31 $data41 -if $data01 != 41 then - return -1 -endi -if $data11 != 42 then - return -1 -endi -if $data21 != 43 then - return -1 -endi -if $data31 != 44 then - return -1 -endi -if $data41 != 45 then - return -1 -endi - -sql select * from c_b2_d5.c_b2_t5 order by t desc -print $data01 $data11 $data21 $data31 $data41 -if $data01 != 51 then - return -1 -endi -if $data11 != 52 then - return -1 -endi -if $data21 != 53 then - return -1 -endi -if $data31 != 54 then - return -1 -endi -if $data41 != 55 then - return -1 -endi - -sql select * from c_b2_d6.c_b2_t6 order by t desc -print $data01 $data11 $data21 $data31 $data41 -if $data01 != 61 then - return -1 -endi -if $data11 != 62 then - return -1 -endi -if $data21 != 63 then - return -1 -endi -if $data31 != 64 then - return -1 -endi -if $data41 != 65 then - return -1 -endi - print ============================================ over system sh/exec_up.sh -n dnode1 -s stop -x SIGINT system sh/exec_up.sh -n dnode2 -s stop -x SIGINT diff --git a/tests/script/unique/cluster/balance3.sim b/tests/script/unique/cluster/balance3.sim index 1e66fcf253..cb453151e4 100644 --- a/tests/script/unique/cluster/balance3.sim +++ b/tests/script/unique/cluster/balance3.sim @@ -88,7 +88,7 @@ $x = 0 show1: $x = $x + 1 sleep 2000 - if $x == 30 then + if $x == 20 then return -1 endi sql show dnodes -x show1 @@ -101,13 +101,13 @@ print dnode3 $dnode3Vnodes $dnode4Vnodes = $data2_4 print dnode4 $dnode4Vnodes -if $dnode1Vnodes != 1 then +if $dnode1Vnodes != 3 then goto show1 endi -if $dnode2Vnodes != 1 then +if $dnode2Vnodes != 3 then goto show1 endi -if $dnode3Vnodes != 1 then +if $dnode3Vnodes != 3 then goto show1 endi if $dnode4Vnodes != null then @@ -124,7 +124,7 @@ $x = 0 show2: $x = $x + 1 sleep 2000 - if $x == 30 then + if $x == 20 then return -1 endi sql show dnodes -x show2 @@ -150,7 +150,7 @@ $x = 0 show3: $x = $x + 1 sleep 2000 - if $x == 30 then + if $x == 20 then return -1 endi sql show dnodes -x show3 @@ -163,16 +163,16 @@ print dnode3 $dnode3Vnodes $dnode4Vnodes = $data2_4 print dnode4 $dnode4Vnodes -if $dnode1Vnodes != 1 then +if $dnode1Vnodes != 3 then goto show3 endi if $dnode2Vnodes != null then goto show3 endi -if $dnode3Vnodes != 1 then +if $dnode3Vnodes != 3 then goto show3 endi -if $dnode4Vnodes != 1 then +if $dnode4Vnodes != 3 then goto show3 endi @@ -187,7 +187,7 @@ $x = 0 show4: $x = $x + 1 sleep 2000 - if $x == 30 then + if $x == 20 then return -1 endi sql show dnodes -x show4 @@ -213,7 +213,7 @@ $x = 0 show5: $x = $x + 1 sleep 2000 - if $x == 30 then + if $x == 20 then return -1 endi sql show dnodes -x show5 @@ -226,16 +226,16 @@ print dnode3 $dnode3Vnodes $dnode4Vnodes = $data2_4 print dnode4 $dnode4Vnodes -if $dnode1Vnodes != 1 then +if $dnode1Vnodes != 3 then goto show5 endi -if $dnode5Vnodes != 1 then +if $dnode5Vnodes != 3 then goto show5 endi if $dnode3Vnodes != null then goto show5 endi -if $dnode4Vnodes != 1 then +if $dnode4Vnodes != 3 then goto show5 endi @@ -250,7 +250,7 @@ $x = 0 show6: $x = $x + 1 sleep 2000 - if $x == 30 then + if $x == 20 then return -1 endi sql show dnodes -x show6 @@ -276,7 +276,7 @@ $x = 0 show7: $x = $x + 1 sleep 2000 - if $x == 30 then + if $x == 20 then return -1 endi sql show dnodes -x show7 @@ -289,13 +289,13 @@ print dnode5 $dnode5Vnodes $dnode6Vnodes = $data2_6 print dnode6 $dnode6Vnodes -if $dnode1Vnodes != 1 then +if $dnode1Vnodes != 3 then goto show7 endi -if $dnode5Vnodes != 1 then +if $dnode5Vnodes != 3 then goto show7 endi -if $dnode6Vnodes != 1 then +if $dnode6Vnodes != 3 then goto show7 endi if $dnode4Vnodes != null then @@ -313,7 +313,7 @@ $x = 0 show8: $x = $x + 1 sleep 2000 - if $x == 30 then + if $x == 20 then return -1 endi sql show dnodes -x show8 @@ -344,7 +344,7 @@ $x = 0 show9: $x = $x + 1 sleep 2000 - if $x == 30 then + if $x == 20 then return -1 endi sql show dnodes -x show9 @@ -355,42 +355,16 @@ print dnode6 $dnode6Vnodes $dnode7Vnodes = $data2_7 print dnode7 $dnode7Vnodes -if $dnode5Vnodes != 1 then +if $dnode5Vnodes != 3 then goto show9 endi -if $dnode6Vnodes != 1 then +if $dnode6Vnodes != 3 then goto show9 endi -if $dnode7Vnodes != 1 then +if $dnode7Vnodes != 3 then goto show9 endi -print ============================== step10 -sql create dnode $hostname8 -system sh/exec_up.sh -n dnode8 -s start -sleep 9000 - -$x = 0 -show10: - $x = $x + 1 - sleep 2000 - if $x == 30 then - return -1 - endi -sql show dnodes -x show10 -$dnode5Vnodes = $data2_5 -print dnode5 $dnode5Vnodes -$dnode6Vnodes = $data2_6 -print dnode6 $dnode6Vnodes -$dnode7Vnodes = $data2_7 -print dnode7 $dnode7Vnodes -$dnode8Vnodes = $data2_8 -print dnode8 $dnode8Vnodes - -if $dnode8Vnodes != 2 then - goto show10 -endi - print ============================== step11 print ========= add db4 @@ -400,7 +374,7 @@ $x = 0 create4: $x = $x + 1 sleep 2000 - if $x == 30 then + if $x == 20 then return -1 endi sql create table c_b3_t4 (t timestamp, i int) -x create4 @@ -409,37 +383,32 @@ sql insert into c_b3_t4 values(1520000021044, 44) sql insert into c_b3_t4 values(1520000022043, 43) sql insert into c_b3_t4 values(1520000023042, 42) sql insert into c_b3_t4 values(1520000024041, 41) -sleep 9000 + +sleep 3000 $x = 0 show11: $x = $x + 1 sleep 2000 - if $x == 30 then + if $x == 20 then return -1 endi -sql show dnodes -x show11 -$dnode1Vnodes = $data2_1 -print dnode1 $dnode1Vnodes -$dnode2Vnodes = $data2_2 -print dnode2 $dnode2Vnodes -$dnode3Vnodes = $data2_3 -print dnode3 $dnode3Vnodes -$dnode4Vnodes = $data2_4 -print dnode4 $dnode4Vnodes +$dnode5Vnodes = $data2_5 +print dnode5 $dnode5Vnodes +$dnode6Vnodes = $data2_6 +print dnode6 $dnode6Vnodes +$dnode7Vnodes = $data2_7 +print dnode7 $dnode7Vnodes -if $dnode1Vnodes != 1 then +if $dnode5Vnodes != 4 then goto show11 endi -if $dnode2Vnodes != 1 then +if $dnode6Vnodes != 4 then + goto show11 +endi +if $dnode7Vnodes != 4 then goto show11 endi -#if $dnode3Vnodes != 1 then -# goto show11 -#endi -#if $dnode4Vnodes != 1 then -# goto show11 -#endi system sh/exec_up.sh -n dnode1 -s stop -x SIGINT @@ -504,25 +473,6 @@ if $data41 != 35 then return -1 endi -sql select * from c_b3_d4.c_b3_t4 order by t desc -print $data01 $data11 $data21 $data31 $data41 -if $data01 != 41 then - return -1 -endi -if $data11 != 42 then - return -1 -endi -if $data21 != 43 then - return -1 -endi -if $data31 != 44 then - return -1 -endi -if $data41 != 45 then - return -1 -endi - - print ============================================ over system sh/exec_up.sh -n dnode1 -s stop -x SIGINT system sh/exec_up.sh -n dnode2 -s stop -x SIGINT diff --git a/tests/script/unique/column/replica3.sim b/tests/script/unique/column/replica3.sim index 1b4884cb90..6390578867 100644 --- a/tests/script/unique/column/replica3.sim +++ b/tests/script/unique/column/replica3.sim @@ -29,8 +29,11 @@ while $x < 1010 $x = $x + 1 endw -system sh/exec_up.sh -n dnode1 -s stop -system sh/exec_up.sh -n dnode2 -s stop -system sh/exec_up.sh -n dnode3 -s stop - - +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/db/replica_add12.sim b/tests/script/unique/db/replica_add12.sim index 6217a965c0..14956e56c2 100644 --- a/tests/script/unique/db/replica_add12.sim +++ b/tests/script/unique/db/replica_add12.sim @@ -281,4 +281,13 @@ endi sql select * from d4.t4 if $rows != 4 then return -1 -endi \ No newline at end of file +endi + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/db/replica_add13.sim b/tests/script/unique/db/replica_add13.sim index 193238f5c0..970545ae01 100644 --- a/tests/script/unique/db/replica_add13.sim +++ b/tests/script/unique/db/replica_add13.sim @@ -258,4 +258,13 @@ endi sql select * from d4.t4 if $rows != 6 then return -1 -endi \ No newline at end of file +endi + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/db/replica_add23.sim b/tests/script/unique/db/replica_add23.sim index 5cc0347ac7..d4aa85c05c 100644 --- a/tests/script/unique/db/replica_add23.sim +++ b/tests/script/unique/db/replica_add23.sim @@ -259,4 +259,13 @@ endi sql select * from d4.t4 if $rows != 6 then return -1 -endi \ No newline at end of file +endi + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/db/replica_part.sim b/tests/script/unique/db/replica_part.sim index 7fc81fbf5b..29b16c8018 100644 --- a/tests/script/unique/db/replica_part.sim +++ b/tests/script/unique/db/replica_part.sim @@ -145,3 +145,12 @@ sql select * from d1.t1 sql select * from d2.t2 sql select * from d3.t3 sql select * from d4.t4 + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/db/replica_reduce21.sim b/tests/script/unique/db/replica_reduce21.sim index eddcaf0e6c..e86ff9367f 100644 --- a/tests/script/unique/db/replica_reduce21.sim +++ b/tests/script/unique/db/replica_reduce21.sim @@ -144,3 +144,12 @@ sql select * from d4.t4 if $rows != 3 then return -1 endi + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/db/replica_reduce31.sim b/tests/script/unique/db/replica_reduce31.sim index 658110e83d..6b4264e9e1 100644 --- a/tests/script/unique/db/replica_reduce31.sim +++ b/tests/script/unique/db/replica_reduce31.sim @@ -182,3 +182,12 @@ sql select * from d1.t1 sql select * from d2.t2 sql select * from d3.t3 sql select * from d4.t4 + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/db/replica_reduce32.sim b/tests/script/unique/db/replica_reduce32.sim index 85f35f996c..d59fb1fc0a 100644 --- a/tests/script/unique/db/replica_reduce32.sim +++ b/tests/script/unique/db/replica_reduce32.sim @@ -155,3 +155,12 @@ print d3.t3 $rows sql select * from d4.t4 print d4.t4 $rows + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/dnode/balance1.sim b/tests/script/unique/dnode/balance1.sim index 72286aad90..5e5e9e097b 100644 --- a/tests/script/unique/dnode/balance1.sim +++ b/tests/script/unique/dnode/balance1.sim @@ -327,3 +327,12 @@ endi if $data41 != 45 then return -1 endi + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/dnode/balance2.sim b/tests/script/unique/dnode/balance2.sim index decec25683..e27262bf1d 100644 --- a/tests/script/unique/dnode/balance2.sim +++ b/tests/script/unique/dnode/balance2.sim @@ -268,3 +268,12 @@ endi if $data41 != 35 then return -1 endi + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/dnode/balance3.sim b/tests/script/unique/dnode/balance3.sim index 53fda28dc4..112afed6a1 100644 --- a/tests/script/unique/dnode/balance3.sim +++ b/tests/script/unique/dnode/balance3.sim @@ -298,3 +298,11 @@ if $data41 != 35 then return -1 endi +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/dnode/balancex.sim b/tests/script/unique/dnode/balancex.sim index 6c851b5559..af163ab5fa 100644 --- a/tests/script/unique/dnode/balancex.sim +++ b/tests/script/unique/dnode/balancex.sim @@ -199,3 +199,11 @@ if $data41 != 35 then return -1 endi +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/dnode/offline1.sim b/tests/script/unique/dnode/offline1.sim index c4751bb66b..64ba981d1f 100644 --- a/tests/script/unique/dnode/offline1.sim +++ b/tests/script/unique/dnode/offline1.sim @@ -67,3 +67,11 @@ if $data4_2 != null then return -1 endi +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/dnode/offline2.sim b/tests/script/unique/dnode/offline2.sim index b9a3464811..ae9b13079f 100644 --- a/tests/script/unique/dnode/offline2.sim +++ b/tests/script/unique/dnode/offline2.sim @@ -106,3 +106,11 @@ if $rows != 1 then return -1 endi +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/http/admin.sim b/tests/script/unique/http/admin.sim index 2b1c7e08c9..ca2adc29ab 100644 --- a/tests/script/unique/http/admin.sim +++ b/tests/script/unique/http/admin.sim @@ -177,4 +177,13 @@ print =============== step8 - monitor dbs #print 24-> $system_content #if $system_content != @[{"status":"succ","head":["IP","created time","open vnodes","free vnodes","status","balance state"],"data":[["127.0.0.1","2018-09-04 #11:16:13.985",1,3,"ready","balanced"]],"rows":1},{"status":"succ","head":["IP","created time","status","role"],"data":[["127.0.0.1","2018-09-04 11:16:13.371","serving","master"]],"rows":1}]@ then # return -1 -# endi \ No newline at end of file +# endi + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/mnode/mgmt22.sim b/tests/script/unique/mnode/mgmt22.sim index 05e636d0de..3275a233ad 100644 --- a/tests/script/unique/mnode/mgmt22.sim +++ b/tests/script/unique/mnode/mgmt22.sim @@ -104,6 +104,11 @@ if $data3_3 != null then goto show7 endi -system sh/exec_up.sh -n dnode1 -s stop -system sh/exec_up.sh -n dnode2 -s stop -system sh/exec_up.sh -n dnode3 -s stop \ No newline at end of file +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/mnode/mgmt23.sim b/tests/script/unique/mnode/mgmt23.sim index 07f8894769..8c144dd0c4 100644 --- a/tests/script/unique/mnode/mgmt23.sim +++ b/tests/script/unique/mnode/mgmt23.sim @@ -122,6 +122,11 @@ sql_error show mnodes print ============== step7 sql_error drop dnode $hostname1 -system sh/exec_up.sh -n dnode1 -s stop -system sh/exec_up.sh -n dnode2 -s stop -system sh/exec_up.sh -n dnode3 -s stop \ No newline at end of file +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/mnode/mgmt24.sim b/tests/script/unique/mnode/mgmt24.sim index 3598534504..4c61cbd7ae 100644 --- a/tests/script/unique/mnode/mgmt24.sim +++ b/tests/script/unique/mnode/mgmt24.sim @@ -73,6 +73,11 @@ if $data2_2 != slave then goto step5 endi -system sh/exec_up.sh -n dnode1 -s stop -system sh/exec_up.sh -n dnode2 -s stop -system sh/exec_up.sh -n dnode3 -s stop \ No newline at end of file +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/mnode/mgmt25.sim b/tests/script/unique/mnode/mgmt25.sim index cedfad4bd0..8c8eeba466 100644 --- a/tests/script/unique/mnode/mgmt25.sim +++ b/tests/script/unique/mnode/mgmt25.sim @@ -85,6 +85,11 @@ if $dnode3Role != slave then return -1 endi -system sh/exec_up.sh -n dnode1 -s stop -system sh/exec_up.sh -n dnode2 -s stop -system sh/exec_up.sh -n dnode3 -s stop \ No newline at end of file +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/mnode/mgmt26.sim b/tests/script/unique/mnode/mgmt26.sim index 105e753634..373a0abaed 100644 --- a/tests/script/unique/mnode/mgmt26.sim +++ b/tests/script/unique/mnode/mgmt26.sim @@ -113,6 +113,11 @@ if $dnode3Role != slave then return -1 endi -system sh/exec_up.sh -n dnode1 -s stop -system sh/exec_up.sh -n dnode2 -s stop -system sh/exec_up.sh -n dnode3 -s stop \ No newline at end of file +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/mnode/mgmt33.sim b/tests/script/unique/mnode/mgmt33.sim index ef9b0bbcc7..e3a62a2d22 100644 --- a/tests/script/unique/mnode/mgmt33.sim +++ b/tests/script/unique/mnode/mgmt33.sim @@ -166,6 +166,11 @@ endi # return -1 #endi -system sh/exec_up.sh -n dnode1 -s stop -system sh/exec_up.sh -n dnode2 -s stop -system sh/exec_up.sh -n dnode3 -s stop \ No newline at end of file +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/mnode/mgmt34.sim b/tests/script/unique/mnode/mgmt34.sim index af4353b563..4409c825c8 100644 --- a/tests/script/unique/mnode/mgmt34.sim +++ b/tests/script/unique/mnode/mgmt34.sim @@ -220,7 +220,11 @@ endi # return -1 #endi -system sh/exec_up.sh -n dnode1 -s stop -system sh/exec_up.sh -n dnode2 -s stop -system sh/exec_up.sh -n dnode3 -s stop -system sh/exec_up.sh -n dnode4 -s stop \ No newline at end of file +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/vnode/replica2_basic2.sim b/tests/script/unique/vnode/replica2_basic2.sim index 7a387d165e..dd0914549a 100644 --- a/tests/script/unique/vnode/replica2_basic2.sim +++ b/tests/script/unique/vnode/replica2_basic2.sim @@ -202,4 +202,13 @@ endi sql select * from d4.t4 if $rows != 3 then return -1 -endi \ No newline at end of file +endi + +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/unique/vnode/replica3_basic.sim b/tests/script/unique/vnode/replica3_basic.sim index 4da26a9349..542aa7803d 100644 --- a/tests/script/unique/vnode/replica3_basic.sim +++ b/tests/script/unique/vnode/replica3_basic.sim @@ -149,8 +149,11 @@ if $rows != $expect then return -1 endi -system sh/exec_up.sh -n dnode1 -s stop -system sh/exec_up.sh -n dnode2 -s stop -system sh/exec_up.sh -n dnode3 -s stop - - +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode4 -s stop -x SIGINT +system sh/exec_up.sh -n dnode5 -s stop -x SIGINT +system sh/exec_up.sh -n dnode6 -s stop -x SIGINT +system sh/exec_up.sh -n dnode7 -s stop -x SIGINT +system sh/exec_up.sh -n dnode8 -s stop -x SIGINT \ No newline at end of file From 27c481c8863a909006b003e5f89f27193780c8e2 Mon Sep 17 00:00:00 2001 From: hjxilinx Date: Thu, 7 May 2020 15:25:13 +0800 Subject: [PATCH 30/31] [td-225] --- src/client/inc/tsclient.h | 2 +- src/client/src/tscSQLParser.c | 22 +++++++++++----------- src/client/src/tscServer.c | 19 ------------------- src/client/src/tscSub.c | 2 +- src/query/src/queryExecutor.c | 10 ++++++---- 5 files changed, 19 insertions(+), 36 deletions(-) diff --git a/src/client/inc/tsclient.h b/src/client/inc/tsclient.h index 854a12629f..3a26d294a4 100644 --- a/src/client/inc/tsclient.h +++ b/src/client/inc/tsclient.h @@ -195,7 +195,7 @@ typedef struct SDataBlockList { // todo remove typedef struct SQueryInfo { int16_t command; // the command may be different for each subclause, so keep it seperately. - uint16_t type; // query/insert/import type + uint32_t type; // query/insert/import type char slidingTimeUnit; STimeWindow window; diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 6e7b902111..947384a992 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -1117,7 +1117,7 @@ int32_t parseSelectClause(SSqlCmd* pCmd, int32_t clauseIndex, tSQLExprList* pSel // if the name of column is quoted, remove it and set the right information for later process extractColumnNameFromString(pItem); - pQueryInfo->type |= TSDB_QUERY_TYPE_PROJECTION_QUERY; + TSDB_QUERY_SET_TYPE(pQueryInfo->type, TSDB_QUERY_TYPE_PROJECTION_QUERY); // select table_name1.field_name1, table_name2.field_name2 from table_name1, table_name2 if (addProjectionExprAndResultField(pQueryInfo, pItem) != TSDB_CODE_SUCCESS) { @@ -1238,7 +1238,6 @@ int32_t parseSelectClause(SSqlCmd* pCmd, int32_t clauseIndex, tSQLExprList* pSel } if (isSTable) { - pQueryInfo->type |= TSDB_QUERY_TYPE_STABLE_QUERY; /* * transfer sql functions that need secondary merge into another format * in dealing with metric queries such as: count/first/last @@ -1289,10 +1288,8 @@ SSqlExpr* doAddProjectCol(SQueryInfo* pQueryInfo, int32_t outputIndex, int32_t c index.columnIndex = colIndex - tscGetNumOfColumns(pTableMeta); tscColumnListInsert(pTableMetaInfo->tagColList, &index); - pQueryInfo->type = TSDB_QUERY_TYPE_STABLE_QUERY; } else { index.columnIndex = colIndex; - pQueryInfo->type |= TSDB_QUERY_TYPE_PROJECTION_QUERY; } return tscSqlExprAppend(pQueryInfo, functionId, &index, pSchema->type, pSchema->bytes, @@ -1377,7 +1374,7 @@ static int32_t doAddProjectionExprAndResultFields(SQueryInfo* pQueryInfo, SColum int32_t addProjectionExprAndResultField(SQueryInfo* pQueryInfo, tSQLExprItem* pItem) { const char* msg0 = "invalid column name"; - const char* msg1 = "tag for table query is not allowed"; + const char* msg1 = "tag for normal table query is not allowed"; int32_t startPos = tscSqlExprNumOfExprs(pQueryInfo); @@ -1414,7 +1411,7 @@ int32_t addProjectionExprAndResultField(SQueryInfo* pQueryInfo, tSQLExprItem* pI STableMetaInfo* pTableMetaInfo = tscGetMetaInfo(pQueryInfo, index.tableIndex); STableMeta* pTableMeta = pTableMetaInfo->pTableMeta; - if (index.columnIndex >= tscGetNumOfColumns(pTableMeta) && UTIL_TABLE_IS_NOMRAL_TABLE(pTableMetaInfo)) { + if (index.columnIndex >= tscGetNumOfColumns(pTableMeta) && !UTIL_TABLE_IS_CHILD_TABLE(pTableMetaInfo)) { return invalidSqlErrMsg(pQueryInfo->msg, msg1); } @@ -5716,12 +5713,16 @@ int32_t doCheckForQuery(SSqlObj* pSql, SQuerySQL* pQuerySql, int32_t index) { } assert(pQueryInfo->numOfTables == pQuerySql->from->nExpr); + bool isSTable = false; if (UTIL_TABLE_IS_SUPERTABLE(pTableMetaInfo)) { - code = tscGetSTableVgroupInfo(pSql, index); - if (code != TSDB_CODE_SUCCESS) { - return code; - } + isSTable = true; + code = tscGetSTableVgroupInfo(pSql, index); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + + TSDB_QUERY_SET_TYPE(pQueryInfo->type, TSDB_QUERY_TYPE_STABLE_QUERY); } else { TSDB_QUERY_SET_TYPE(pQueryInfo->type, TSDB_QUERY_TYPE_TABLE_QUERY); } @@ -5731,7 +5732,6 @@ int32_t doCheckForQuery(SSqlObj* pSql, SQuerySQL* pQuerySql, int32_t index) { return TSDB_CODE_INVALID_SQL; } - bool isSTable = UTIL_TABLE_IS_SUPERTABLE(pTableMetaInfo); if (parseSelectClause(pCmd, index, pQuerySql->pSelection, isSTable) != TSDB_CODE_SUCCESS) { return TSDB_CODE_INVALID_SQL; } diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 6fe76cedce..5a658f6693 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -439,25 +439,6 @@ int tscProcessSql(SSqlObj *pSql) { } else { // local handler return (*tscProcessMsgRsp[pCmd->command])(pSql); } - -// if (QUERY_IS_JOIN_QUERY(type)) { -// if ((pQueryInfo->type & TSDB_QUERY_TYPE_SUBQUERY) == 0) { -// return tscHandleMasterJoinQuery(pSql); -// } else { -// // for first stage sub query, iterate all vnodes to get all timestamp -// if ((pQueryInfo->type & TSDB_QUERY_TYPE_JOIN_SEC_STAGE) != TSDB_QUERY_TYPE_JOIN_SEC_STAGE) { -// return doProcessSql(pSql); -// } -// } -// } -// -// if (tscIsTwoStageSTableQuery(pQueryInfo, 0)) { // super table query -// tscHandleMasterSTableQuery(pSql); -// return pRes->code; -// } else if (pSql->fp == (void(*)())tscHandleMultivnodeInsert) { // multi-vnodes insertion -// tscHandleMultivnodeInsert(pSql); -// return pRes->code; -// } return doProcessSql(pSql); } diff --git a/src/client/src/tscSub.c b/src/client/src/tscSub.c index 7b40d69f1b..856b678391 100644 --- a/src/client/src/tscSub.c +++ b/src/client/src/tscSub.c @@ -374,7 +374,7 @@ TAOS_RES *taos_consume(TAOS_SUB *tsub) { } else { SQueryInfo* pQueryInfo = tscGetQueryInfoDetail(&pSql->cmd, 0); - uint16_t type = pQueryInfo->type; + uint32_t type = pQueryInfo->type; taos_free_result_imp(pSql, 1); pRes->numOfRows = 1; pRes->numOfTotal = 0; diff --git a/src/query/src/queryExecutor.c b/src/query/src/queryExecutor.c index 267619e782..b84df58383 100644 --- a/src/query/src/queryExecutor.c +++ b/src/query/src/queryExecutor.c @@ -4233,10 +4233,12 @@ int32_t doInitQInfo(SQInfo *pQInfo, void *param, void *tsdb, int32_t vgId, bool // normal query setup the queryhandle here - if (isFirstLastRowQuery(pQuery) && !isSTableQuery) { // in case of last_row query, invoke a different API. - pRuntimeEnv->pQueryHandle = tsdbQueryLastRow(tsdb, &cond, &pQInfo->tableIdGroupInfo); - } else if (!isSTableQuery || isIntervalQuery(pQuery) || isFixedOutputQuery(pQuery)) { - pRuntimeEnv->pQueryHandle = tsdbQueryTables(tsdb, &cond, &pQInfo->tableIdGroupInfo); + if (!onlyQueryTags(pQuery)) { + if (!isSTableQuery && isFirstLastRowQuery(pQuery)) { // in case of last_row query, invoke a different API. + pRuntimeEnv->pQueryHandle = tsdbQueryLastRow(tsdb, &cond, &pQInfo->tableIdGroupInfo); + } else if (!isSTableQuery || isIntervalQuery(pQuery) || isFixedOutputQuery(pQuery)) { + pRuntimeEnv->pQueryHandle = tsdbQueryTables(tsdb, &cond, &pQInfo->tableIdGroupInfo); + } } pQInfo->tsdb = tsdb; From 942f67e2915958fce055019aadcd3366310590c6 Mon Sep 17 00:00:00 2001 From: slguan Date: Thu, 7 May 2020 16:08:51 +0800 Subject: [PATCH 31/31] scripts --- tests/script/general/agg/stream.sim | 2 +- .../alter/cached_schema_after_alter.sim | 2 +- tests/script/general/alter/count.sim | 2 +- tests/script/general/alter/import.sim | 2 +- tests/script/general/alter/insert1.sim | 2 +- tests/script/general/alter/insert2.sim | 2 +- tests/script/general/column/stream.sim | 2 +- tests/script/general/db/basic.sim | 4 +-- tests/script/general/db/delete_reusevnode.sim | 2 +- .../script/general/db/delete_reusevnode2.sim | 2 +- tests/script/general/db/delete_writing2.sim | 2 +- tests/script/general/db/repeat.sim | 4 +-- tests/script/general/db/testSuite.sim | 17 ++++++---- tests/script/general/http/restful.sim | 2 +- tests/script/general/http/restful_full.sim | 2 +- tests/script/general/metrics/disk.sim | 2 +- tests/script/general/metrics/vnode3.sim | 2 +- .../general/parser/auto_create_tb_drop_tb.sim | 2 +- tests/script/general/parser/first_last.sim | 2 +- tests/script/general/parser/groupby.sim | 2 +- tests/script/general/parser/join.sim | 2 +- .../script/general/parser/join_multivnode.sim | 2 +- tests/script/general/parser/lastrow.sim | 2 +- tests/script/general/parser/mixed_blocks.sim | 2 +- .../parser/projection_limit_offset.sim | 2 +- .../general/parser/select_with_tags.sim | 2 +- .../general/parser/single_row_in_tb.sim | 2 +- tests/script/general/parser/slimit.sim | 2 +- tests/script/general/parser/timestamp.sim | 2 +- tests/script/general/parser/where.sim | 2 +- tests/script/general/table/vgroup.sim | 2 +- tests/script/general/user/pass_alter.sim | 2 +- tests/script/general/user/pass_len.sim | 2 +- tests/script/general/user/user_create.sim | 2 +- tests/script/general/user/user_len.sim | 2 +- .../script/unique/account/account_create.sim | 2 +- .../script/unique/account/account_delete.sim | 2 +- tests/script/unique/account/account_len.sim | 2 +- tests/script/unique/account/authority.sim | 2 +- tests/script/unique/account/pass_alter.sim | 2 +- tests/script/unique/account/pass_len.sim | 2 +- tests/script/unique/account/user_create.sim | 2 +- tests/script/unique/account/user_len.sim | 2 +- tests/script/unique/big/balance.sim | 10 +++--- tests/script/unique/cluster/balance1.sim | 32 +++++++++---------- tests/script/unique/cluster/balance2.sim | 22 ++++++------- tests/script/unique/cluster/balance3.sim | 31 +++++++++++++----- tests/script/unique/column/replica3.sim | 6 ++-- tests/script/unique/db/delete.sim | 6 ++-- tests/script/unique/db/delete_part.sim | 16 +++++----- tests/script/unique/db/replica_add12.sim | 8 ++--- tests/script/unique/db/replica_add13.sim | 8 ++--- tests/script/unique/db/replica_add23.sim | 8 ++--- tests/script/unique/db/replica_part.sim | 6 ++-- tests/script/unique/db/replica_reduce21.sim | 6 ++-- tests/script/unique/db/replica_reduce31.sim | 6 ++-- tests/script/unique/db/replica_reduce32.sim | 6 ++-- tests/script/unique/dnode/balance1.sim | 24 +++++++------- tests/script/unique/dnode/balance2.sim | 16 +++++----- tests/script/unique/dnode/balance3.sim | 18 +++++------ tests/script/unique/dnode/balancex.sim | 14 ++++---- tests/script/unique/dnode/monitor_bug.sim | 4 +-- tests/script/unique/dnode/offline1.sim | 6 ++-- tests/script/unique/dnode/offline2.sim | 8 ++--- tests/script/unique/dnode/remove1.sim | 14 ++++---- tests/script/unique/dnode/remove2.sim | 14 ++++---- tests/script/unique/dnode/vnode_clean.sim | 16 +++++----- tests/script/unique/http/admin.sim | 2 +- tests/script/unique/http/opentsdb.sim | 2 +- .../unique/metrics/balance_replica1.sim | 2 +- tests/script/unique/metrics/dnode2.sim | 2 +- tests/script/unique/metrics/dnode2_stop.sim | 2 +- tests/script/unique/metrics/dnode3.sim | 2 +- .../script/unique/metrics/replica2_dnode4.sim | 2 +- .../script/unique/metrics/replica2_vnode3.sim | 2 +- .../script/unique/metrics/replica3_dnode6.sim | 2 +- .../script/unique/metrics/replica3_vnode3.sim | 2 +- .../script/unique/stream/metrics_balance.sim | 2 +- tests/script/unique/stream/table_balance.sim | 2 +- tests/script/unique/stream/table_move.sim | 10 +++--- tests/script/unique/vnode/commit.sim | 4 +-- tests/script/unique/vnode/many.sim | 8 ++--- tests/script/unique/vnode/replica2_basic.sim | 4 +-- tests/script/unique/vnode/replica2_basic2.sim | 8 ++--- tests/script/unique/vnode/replica2_repeat.sim | 8 ++--- tests/script/unique/vnode/replica3_basic.sim | 6 ++-- tests/script/unique/vnode/replica3_repeat.sim | 8 ++--- tests/script/unique/vnode/replica3_vgroup.sim | 6 ++-- 88 files changed, 257 insertions(+), 239 deletions(-) diff --git a/tests/script/general/agg/stream.sim b/tests/script/general/agg/stream.sim index 2217c39430..814438ac74 100644 --- a/tests/script/general/agg/stream.sim +++ b/tests/script/general/agg/stream.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 print ========== step1 system sh/cfg.sh -n dnode1 -c monitor -v 1 diff --git a/tests/script/general/alter/cached_schema_after_alter.sim b/tests/script/general/alter/cached_schema_after_alter.sim index 52507b1992..d81720a1da 100644 --- a/tests/script/general/alter/cached_schema_after_alter.sim +++ b/tests/script/general/alter/cached_schema_after_alter.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/alter/count.sim b/tests/script/general/alter/count.sim index 1b77f997ac..a6a2a13ef7 100644 --- a/tests/script/general/alter/count.sim +++ b/tests/script/general/alter/count.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4 diff --git a/tests/script/general/alter/import.sim b/tests/script/general/alter/import.sim index 7348cc919e..1771d47298 100644 --- a/tests/script/general/alter/import.sim +++ b/tests/script/general/alter/import.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4 diff --git a/tests/script/general/alter/insert1.sim b/tests/script/general/alter/insert1.sim index 0daa9c6432..7095313a0d 100644 --- a/tests/script/general/alter/insert1.sim +++ b/tests/script/general/alter/insert1.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/alter/insert2.sim b/tests/script/general/alter/insert2.sim index 34f935a04b..a248c7cd2b 100644 --- a/tests/script/general/alter/insert2.sim +++ b/tests/script/general/alter/insert2.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/column/stream.sim b/tests/script/general/column/stream.sim index 6972e34197..cb94904ff2 100644 --- a/tests/script/general/column/stream.sim +++ b/tests/script/general/column/stream.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 print ========== step1 system sh/cfg.sh -n dnode1 -c monitor -v 1 diff --git a/tests/script/general/db/basic.sim b/tests/script/general/db/basic.sim index 9d56e1c5fb..dddc976ab3 100644 --- a/tests/script/general/db/basic.sim +++ b/tests/script/general/db/basic.sim @@ -2,9 +2,9 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode1 -c tables -v 1000 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 1000 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/db/delete_reusevnode.sim b/tests/script/general/db/delete_reusevnode.sim index 2204e7434f..b12a60b4a6 100644 --- a/tests/script/general/db/delete_reusevnode.sim +++ b/tests/script/general/db/delete_reusevnode.sim @@ -65,7 +65,7 @@ $tbPrefix = t $i = 0 while $i < 1000 $db = db . $i - sql create database $db tables 4 + sql create database $db maxTables 4 sql use $db sql create table st (ts timesetamp, i int) tags(j int); diff --git a/tests/script/general/db/delete_reusevnode2.sim b/tests/script/general/db/delete_reusevnode2.sim index dcf74a287d..949c4d4b27 100644 --- a/tests/script/general/db/delete_reusevnode2.sim +++ b/tests/script/general/db/delete_reusevnode2.sim @@ -17,7 +17,7 @@ sleep 3000 print ======== step1 -sql create database db tables 4; +sql create database db maxTables 4; sql use db diff --git a/tests/script/general/db/delete_writing2.sim b/tests/script/general/db/delete_writing2.sim index 75603dcdd8..a836a89881 100644 --- a/tests/script/general/db/delete_writing2.sim +++ b/tests/script/general/db/delete_writing2.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 print ========= start dnodes diff --git a/tests/script/general/db/repeat.sim b/tests/script/general/db/repeat.sim index 7afa42f0c4..a69e3fa019 100644 --- a/tests/script/general/db/repeat.sim +++ b/tests/script/general/db/repeat.sim @@ -2,9 +2,9 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode1 -c tables -v 4 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/db/testSuite.sim b/tests/script/general/db/testSuite.sim index 3c63864e6f..c5a4d1e530 100644 --- a/tests/script/general/db/testSuite.sim +++ b/tests/script/general/db/testSuite.sim @@ -1,12 +1,15 @@ +#run general//db/basic.sim run general/db/basic1.sim run general/db/basic2.sim run general/db/basic3.sim run general/db/basic4.sim run general/db/basic5.sim -#run general//db/tables.sim -#run general//db/basic.sim -#run general//db/len.sim -#run general//db/delete_reuse1.sim -#run general//db/delete_reuse2.sim -#run general//db/delete_writing1.sim -#run general//db/delete_writing2.sim + +#run general/db/delete_reuse1.sim +#run general/db/delete_reuse2.sim +#run general/db/delete_writing1.sim +#run general/db/delete_writing2.sim + +#run general/db/len.sim +#run general/db/repeat.sim +#run general/db/tables.sim diff --git a/tests/script/general/http/restful.sim b/tests/script/general/http/restful.sim index c50273107f..894033e8f0 100644 --- a/tests/script/general/http/restful.sim +++ b/tests/script/general/http/restful.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh sleep 5000 system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/cfg.sh -n dnode1 -c http -v 1 system sh/cfg.sh -n dnode1 -c httpEnableRecordSql -v 1 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/http/restful_full.sim b/tests/script/general/http/restful_full.sim index d125ccb56d..a4c1bd1851 100644 --- a/tests/script/general/http/restful_full.sim +++ b/tests/script/general/http/restful_full.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh sleep 5000 system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/cfg.sh -n dnode1 -c http -v 1 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/metrics/disk.sim b/tests/script/general/metrics/disk.sim index fb5eedff8e..1a14b5f00f 100644 --- a/tests/script/general/metrics/disk.sim +++ b/tests/script/general/metrics/disk.sim @@ -24,7 +24,7 @@ $i = 0 $db = $dbPrefix . $i $mt = $mtPrefix . $i -sql create database $db tables 4 +sql create database $db maxTables 4 sql use $db sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int) diff --git a/tests/script/general/metrics/vnode3.sim b/tests/script/general/metrics/vnode3.sim index ebd1f24225..b70253c5cd 100644 --- a/tests/script/general/metrics/vnode3.sim +++ b/tests/script/general/metrics/vnode3.sim @@ -24,7 +24,7 @@ $i = 0 $db = $dbPrefix . $i $mt = $mtPrefix . $i -sql create database $db tables 4 +sql create database $db maxTables 4 sql use $db sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int) diff --git a/tests/script/general/parser/auto_create_tb_drop_tb.sim b/tests/script/general/parser/auto_create_tb_drop_tb.sim index 8e691e4960..23cad7137e 100644 --- a/tests/script/general/parser/auto_create_tb_drop_tb.sim +++ b/tests/script/general/parser/auto_create_tb_drop_tb.sim @@ -22,7 +22,7 @@ $stb = $stbPrefix . $i sql drop database $db -x step1 step1: -sql create database $db rows 200 cache 2048 tables 4 +sql create database $db rows 200 cache 2048 maxTables 4 print ====== create tables sql use $db diff --git a/tests/script/general/parser/first_last.sim b/tests/script/general/parser/first_last.sim index 93b2bffeec..6c36f0645d 100644 --- a/tests/script/general/parser/first_last.sim +++ b/tests/script/general/parser/first_last.sim @@ -21,7 +21,7 @@ $stb = $stbPrefix . $i sql drop database $db -x step1 step1: -sql create database $db rows 400 cache 4096 tables 4 +sql create database $db rows 400 cache 4096 maxTables 4 sql use $db sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 smallint, c6 tinyint, c7 bool, c8 binary(10), c9 nchar(10)) tags(t1 int) diff --git a/tests/script/general/parser/groupby.sim b/tests/script/general/parser/groupby.sim index fb129388a5..5bf41772ed 100644 --- a/tests/script/general/parser/groupby.sim +++ b/tests/script/general/parser/groupby.sim @@ -28,7 +28,7 @@ $tstart = 100000 sql drop database if exits $db -x step1 step1: -sql create database if not exists $db tables 4 keep 36500 +sql create database if not exists $db maxTables 4 keep 36500 sql use $db sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int, t2 binary(12)) diff --git a/tests/script/general/parser/join.sim b/tests/script/general/parser/join.sim index 85ddb29066..6addcb1ac1 100644 --- a/tests/script/general/parser/join.sim +++ b/tests/script/general/parser/join.sim @@ -24,7 +24,7 @@ $tstart = 100000 sql drop database if exits $db -x step1 step1: -sql create database if not exists $db tables 4 keep 36500 +sql create database if not exists $db maxTables 4 keep 36500 sql use $db sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int, t2 binary(12)) diff --git a/tests/script/general/parser/join_multivnode.sim b/tests/script/general/parser/join_multivnode.sim index 91cac9fbdb..86488ea844 100644 --- a/tests/script/general/parser/join_multivnode.sim +++ b/tests/script/general/parser/join_multivnode.sim @@ -22,7 +22,7 @@ $tstart = 100000 sql drop database if exits $db -x step1 step1: -sql create database if not exists $db tables 4 keep 36500 +sql create database if not exists $db maxTables 4 keep 36500 sql use $db sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int, t2 binary(12)) diff --git a/tests/script/general/parser/lastrow.sim b/tests/script/general/parser/lastrow.sim index 83532cc10f..c3d0e05aea 100644 --- a/tests/script/general/parser/lastrow.sim +++ b/tests/script/general/parser/lastrow.sim @@ -21,7 +21,7 @@ $stb = $stbPrefix . $i sql drop database $db -x step1 step1: -sql create database $db tables 4 +sql create database $db maxTables 4 sql use $db sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 smallint, c6 tinyint, c7 bool, c8 binary(10), c9 nchar(10)) tags(t1 int) diff --git a/tests/script/general/parser/mixed_blocks.sim b/tests/script/general/parser/mixed_blocks.sim index 2c8bd0e117..37ba1a8900 100644 --- a/tests/script/general/parser/mixed_blocks.sim +++ b/tests/script/general/parser/mixed_blocks.sim @@ -22,7 +22,7 @@ sql drop database if exists $db $paramRows = 200 $rowNum = $paramRows * 4 $rowNum = $rowNum / 5 -sql create database $db rows $paramRows tables 4 +sql create database $db rows $paramRows maxTables 4 print ====== create tables sql use $db sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 bool, c6 binary(10), c7 nchar(10)) tags(t1 int) diff --git a/tests/script/general/parser/projection_limit_offset.sim b/tests/script/general/parser/projection_limit_offset.sim index 5381ed7e83..d990a79628 100644 --- a/tests/script/general/parser/projection_limit_offset.sim +++ b/tests/script/general/parser/projection_limit_offset.sim @@ -22,7 +22,7 @@ $tstart = 100000 sql drop database if exits $db -x step1 step1: -sql create database if not exists $db tables 4 keep 36500 +sql create database if not exists $db maxTables 4 keep 36500 sql use $db sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int, t2 binary(12)) diff --git a/tests/script/general/parser/select_with_tags.sim b/tests/script/general/parser/select_with_tags.sim index 350cb7669a..181d7f312a 100644 --- a/tests/script/general/parser/select_with_tags.sim +++ b/tests/script/general/parser/select_with_tags.sim @@ -23,7 +23,7 @@ $tstart = 100000 sql drop database if exists $db -x step1 step1: -sql create database if not exists $db tables 4 keep 36500 +sql create database if not exists $db maxTables 4 keep 36500 sql use $db sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int, t2 binary(12)) diff --git a/tests/script/general/parser/single_row_in_tb.sim b/tests/script/general/parser/single_row_in_tb.sim index 07af4b9b27..759599b7b1 100644 --- a/tests/script/general/parser/single_row_in_tb.sim +++ b/tests/script/general/parser/single_row_in_tb.sim @@ -15,7 +15,7 @@ $db = $dbPrefix $stb = $stbPrefix sql drop database if exists $db -sql create database $db rows 200 tables 4 +sql create database $db rows 200 maxTables 4 print ====== create tables sql use $db sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 bool, c6 binary(10), c7 nchar(10)) tags(t1 int) diff --git a/tests/script/general/parser/slimit.sim b/tests/script/general/parser/slimit.sim index 3581c3a993..18b8babf32 100644 --- a/tests/script/general/parser/slimit.sim +++ b/tests/script/general/parser/slimit.sim @@ -22,7 +22,7 @@ $db = $dbPrefix . $i $stb = $stbPrefix . $i sql drop database if exists $db -sql create database $db rows 200 cache 1024 tblocks 200 tables 4 +sql create database $db rows 200 cache 1024 tblocks 200 maxTables 4 print ====== create tables sql use $db sql create table $stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 smallint, c6 tinyint, c7 bool, c8 binary(10), c9 nchar(10)) tags(t1 binary(15), t2 int, t3 bigint, t4 nchar(10), t5 double, t6 bool) diff --git a/tests/script/general/parser/timestamp.sim b/tests/script/general/parser/timestamp.sim index 112a1c8377..efc69531ed 100644 --- a/tests/script/general/parser/timestamp.sim +++ b/tests/script/general/parser/timestamp.sim @@ -21,7 +21,7 @@ $db = $dbPrefix . $i $stb = $stbPrefix . $i sql drop database if exists $db -sql create database $db rows 200 cache 1024 tblocks 200 tables 4 +sql create database $db rows 200 cache 1024 tblocks 200 maxTables 4 print ====== create tables sql use $db sql create table $stb (ts timestamp, c1 timestamp, c2 int) tags(t1 binary(20)) diff --git a/tests/script/general/parser/where.sim b/tests/script/general/parser/where.sim index c6671319b9..c840bcf22e 100644 --- a/tests/script/general/parser/where.sim +++ b/tests/script/general/parser/where.sim @@ -21,7 +21,7 @@ $mt = $mtPrefix . $i sql drop database if exits $db -x step1 step1: -sql create database if not exists $db tables 4 +sql create database if not exists $db maxTables 4 sql use $db sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int) diff --git a/tests/script/general/table/vgroup.sim b/tests/script/general/table/vgroup.sim index 81be2fe40a..7dbab1eabb 100644 --- a/tests/script/general/table/vgroup.sim +++ b/tests/script/general/table/vgroup.sim @@ -17,7 +17,7 @@ $db = $dbPrefix . $i $tb = $tbPrefix . $i print =================== step 1 -sql create database $db tables 4 +sql create database $db maxTables 4 sql use $db sql show vgroups if $rows != 0 then diff --git a/tests/script/general/user/pass_alter.sim b/tests/script/general/user/pass_alter.sim index f7eee1359b..22c0333227 100644 --- a/tests/script/general/user/pass_alter.sim +++ b/tests/script/general/user/pass_alter.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/user/pass_len.sim b/tests/script/general/user/pass_len.sim index 583c2e73d3..2a4a007a1a 100644 --- a/tests/script/general/user/pass_len.sim +++ b/tests/script/general/user/pass_len.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/user/user_create.sim b/tests/script/general/user/user_create.sim index 4b81313695..cb75c2f5a6 100644 --- a/tests/script/general/user/user_create.sim +++ b/tests/script/general/user/user_create.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/general/user/user_len.sim b/tests/script/general/user/user_len.sim index 4d2658cec9..fa1fd5c4ea 100644 --- a/tests/script/general/user/user_len.sim +++ b/tests/script/general/user/user_len.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/unique/account/account_create.sim b/tests/script/unique/account/account_create.sim index 6ada0b4910..30dd96075c 100644 --- a/tests/script/unique/account/account_create.sim +++ b/tests/script/unique/account/account_create.sim @@ -1,6 +1,6 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec_up.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/account/account_delete.sim b/tests/script/unique/account/account_delete.sim index 039f381632..71a75a7b35 100644 --- a/tests/script/unique/account/account_delete.sim +++ b/tests/script/unique/account/account_delete.sim @@ -1,6 +1,6 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec_up.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/account/account_len.sim b/tests/script/unique/account/account_len.sim index eaa5873a1f..ae2db26d58 100644 --- a/tests/script/unique/account/account_len.sim +++ b/tests/script/unique/account/account_len.sim @@ -1,6 +1,6 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec_up.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/account/authority.sim b/tests/script/unique/account/authority.sim index ca9c68f57d..fe978a5827 100644 --- a/tests/script/unique/account/authority.sim +++ b/tests/script/unique/account/authority.sim @@ -1,6 +1,6 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/exec_up.sh -n dnode1 -s start diff --git a/tests/script/unique/account/pass_alter.sim b/tests/script/unique/account/pass_alter.sim index 12a237c972..936611833a 100644 --- a/tests/script/unique/account/pass_alter.sim +++ b/tests/script/unique/account/pass_alter.sim @@ -1,6 +1,6 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec_up.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/account/pass_len.sim b/tests/script/unique/account/pass_len.sim index b78c881c7f..f4f9c04964 100644 --- a/tests/script/unique/account/pass_len.sim +++ b/tests/script/unique/account/pass_len.sim @@ -1,6 +1,6 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec_up.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/account/user_create.sim b/tests/script/unique/account/user_create.sim index ae15f8e02b..075da848d6 100644 --- a/tests/script/unique/account/user_create.sim +++ b/tests/script/unique/account/user_create.sim @@ -1,6 +1,6 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec_up.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/account/user_len.sim b/tests/script/unique/account/user_len.sim index 2122e7bd3f..fcc344d115 100644 --- a/tests/script/unique/account/user_len.sim +++ b/tests/script/unique/account/user_len.sim @@ -1,6 +1,6 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec_up.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/big/balance.sim b/tests/script/unique/big/balance.sim index 270c3810a7..3d4d39af53 100644 --- a/tests/script/unique/big/balance.sim +++ b/tests/script/unique/big/balance.sim @@ -1,23 +1,23 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode1 -c tables -v 1000 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 1000 system sh/deploy.sh -n dnode2 -i 2 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode2 -c tables -v 1000 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 1000 system sh/deploy.sh -n dnode3 -i 3 system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode3 -c tables -v 1000 +system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 1000 system sh/deploy.sh -n dnode4 -i 4 system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode4 -c tables -v 1000 +system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 1000 system sh/deploy.sh -n dnode5 -i 5 system sh/cfg.sh -n dnode5 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode5 -c tables -v 1000 +system sh/cfg.sh -n dnode5 -c maxtablesPerVnode -v 1000 print =============== prepare data system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/unique/cluster/balance1.sim b/tests/script/unique/cluster/balance1.sim index 638febd3db..424a80d25a 100644 --- a/tests/script/unique/cluster/balance1.sim +++ b/tests/script/unique/cluster/balance1.sim @@ -35,21 +35,21 @@ system sh/cfg.sh -n dnode6 -c mgmtEqualVnodeNum -v 0 system sh/cfg.sh -n dnode7 -c mgmtEqualVnodeNum -v 0 system sh/cfg.sh -n dnode8 -c mgmtEqualVnodeNum -v 0 -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/cfg.sh -n dnode3 -c clog -v 1 -system sh/cfg.sh -n dnode4 -c clog -v 1 -system sh/cfg.sh -n dnode5 -c clog -v 1 -system sh/cfg.sh -n dnode6 -c clog -v 1 -system sh/cfg.sh -n dnode7 -c clog -v 1 -system sh/cfg.sh -n dnode8 -c clog -v 1 +system sh/cfg.sh -n dnode1 -c wallevel -v 1 +system sh/cfg.sh -n dnode2 -c wallevel -v 1 +system sh/cfg.sh -n dnode3 -c wallevel -v 1 +system sh/cfg.sh -n dnode4 -c wallevel -v 1 +system sh/cfg.sh -n dnode5 -c wallevel -v 1 +system sh/cfg.sh -n dnode6 -c wallevel -v 1 +system sh/cfg.sh -n dnode7 -c wallevel -v 1 +system sh/cfg.sh -n dnode8 -c wallevel -v 1 print ============== step1 print ========= start dnode1 system sh/exec_up.sh -n dnode1 -s start sql connect -sql create database c_b1_d1 tables 4 +sql create database c_b1_d1 maxTables 4 sql use c_b1_d1 sql create table c_b1_t1 (t timestamp, i int) @@ -59,7 +59,7 @@ sql insert into c_b1_t1 values(1520000022013, 13) sql insert into c_b1_t1 values(1520000023012, 12) sql insert into c_b1_t1 values(1520000024011, 11) -sql create database c_b1_d2 tables 4 +sql create database c_b1_d2 maxTables 4 sql use c_b1_d2 sql create table c_b1_t2 (t timestamp, i int) sql insert into c_b1_t2 values(1520000020025, 25) @@ -116,7 +116,7 @@ print dnode2 ==> $dnode2Role print ============================== step3 print ========= add db3 -sql create database c_b1_d3 tables 4 +sql create database c_b1_d3 maxTables 4 sql use c_b1_d3 sql create table c_b1_t3 (t timestamp, i int) sql insert into c_b1_t3 values(1520000020035, 35) @@ -289,7 +289,7 @@ if $dnode4Role != slave then endi print ============================== step10 -sql create database c_b1_d4 tables 4 +sql create database c_b1_d4 maxTables 4 sql use c_b1_d4 sql create table c_b1_t4 (t timestamp, i int) sql insert into c_b1_t4 values(1520000020045, 45) @@ -327,7 +327,7 @@ sql use c_b1_d2 sql insert into c_b1_t2 values(1520000025026, 26) print ============================== step12 -sql create database c_b1_d5 tables 4 +sql create database c_b1_d5 maxTables 4 sql use c_b1_d5 sql_error create table c_b1_t5 (t timestamp, i int) -x error3 @@ -352,7 +352,7 @@ sql insert into c_b1_t5 values(1520000022053, 53) sql insert into c_b1_t5 values(1520000023052, 52) sql insert into c_b1_t5 values(1520000024051, 51) -sql create database c_b1_d6 tables 4 +sql create database c_b1_d6 maxTables 4 sql use c_b1_d6 sql create table c_b1_t6 (t timestamp, i int) sql insert into c_b1_t6 values(1520000020065, 65) @@ -384,7 +384,7 @@ sql create dnode $hostname6 system sh/exec_up.sh -n dnode6 -s start sleep 15000 -sql create database c_b1_d7 tables 4 +sql create database c_b1_d7 maxTables 4 sql use c_b1_d7 sql create table c_b1_t7 (t timestamp, i int) sql insert into c_b1_t7 values(1520000020075, 75) @@ -393,7 +393,7 @@ sql insert into c_b1_t7 values(1520000022073, 73) sql insert into c_b1_t7 values(1520000023072, 72) sql insert into c_b1_t7 values(1520000024071, 71) -sql create database c_b1_d8 tables 4 +sql create database c_b1_d8 maxTables 4 sql use c_b1_d8 sql create table c_b1_t8 (t timestamp, i int) sql insert into c_b1_t8 values(1520000020085, 85) diff --git a/tests/script/unique/cluster/balance2.sim b/tests/script/unique/cluster/balance2.sim index 10de862b7f..08fdd233e0 100644 --- a/tests/script/unique/cluster/balance2.sim +++ b/tests/script/unique/cluster/balance2.sim @@ -26,14 +26,14 @@ system sh/cfg.sh -n dnode6 -c numOfMPeers -v 3 system sh/cfg.sh -n dnode7 -c numOfMPeers -v 3 system sh/cfg.sh -n dnode8 -c numOfMPeers -v 3 -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/cfg.sh -n dnode3 -c clog -v 1 -system sh/cfg.sh -n dnode4 -c clog -v 1 -system sh/cfg.sh -n dnode5 -c clog -v 1 -system sh/cfg.sh -n dnode6 -c clog -v 1 -system sh/cfg.sh -n dnode7 -c clog -v 1 -system sh/cfg.sh -n dnode8 -c clog -v 1 +system sh/cfg.sh -n dnode1 -c wallevel -v 1 +system sh/cfg.sh -n dnode2 -c wallevel -v 1 +system sh/cfg.sh -n dnode3 -c wallevel -v 1 +system sh/cfg.sh -n dnode4 -c wallevel -v 1 +system sh/cfg.sh -n dnode5 -c wallevel -v 1 +system sh/cfg.sh -n dnode6 -c wallevel -v 1 +system sh/cfg.sh -n dnode7 -c wallevel -v 1 +system sh/cfg.sh -n dnode8 -c wallevel -v 1 system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0 system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 0 @@ -56,7 +56,7 @@ system sh/exec_up.sh -n dnode2 -s start system sh/exec_up.sh -n dnode3 -s start sleep 4001 -sql create database c_b2_d1 replica 2 tables 4 +sql create database c_b2_d1 replica 2 maxTables 4 sql use c_b2_d1 sql create table c_b2_t1 (t timestamp, i int) sql insert into c_b2_t1 values(1520000020015, 15) @@ -65,7 +65,7 @@ sql insert into c_b2_t1 values(1520000022013, 13) sql insert into c_b2_t1 values(1520000023012, 12) sql insert into c_b2_t1 values(1520000024011, 11) -sql create database c_b2_d2 replica 2 tables 4 +sql create database c_b2_d2 replica 2 maxTables 4 sql use c_b2_d2 sql create table c_b2_t2 (t timestamp, i int) sql insert into c_b2_t2 values(1520000020025, 25) @@ -74,7 +74,7 @@ sql insert into c_b2_t2 values(1520000022023, 23) sql insert into c_b2_t2 values(1520000023022, 22) sql insert into c_b2_t2 values(1520000024021, 21) -sql create database c_b2_d3 replica 2 tables 4 +sql create database c_b2_d3 replica 2 maxTables 4 sql use c_b2_d3 sql create table c_b2_t3 (t timestamp, i int) sql insert into c_b2_t3 values(1520000020035, 35) diff --git a/tests/script/unique/cluster/balance3.sim b/tests/script/unique/cluster/balance3.sim index cb453151e4..52ef045b80 100644 --- a/tests/script/unique/cluster/balance3.sim +++ b/tests/script/unique/cluster/balance3.sim @@ -36,14 +36,14 @@ system sh/cfg.sh -n dnode6 -c mgmtEqualVnodeNum -v 0 system sh/cfg.sh -n dnode7 -c mgmtEqualVnodeNum -v 0 system sh/cfg.sh -n dnode8 -c mgmtEqualVnodeNum -v 0 -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/cfg.sh -n dnode3 -c clog -v 1 -system sh/cfg.sh -n dnode4 -c clog -v 1 -system sh/cfg.sh -n dnode5 -c clog -v 1 -system sh/cfg.sh -n dnode6 -c clog -v 1 -system sh/cfg.sh -n dnode7 -c clog -v 1 -system sh/cfg.sh -n dnode8 -c clog -v 1 +system sh/cfg.sh -n dnode1 -c wallevel -v 1 +system sh/cfg.sh -n dnode2 -c wallevel -v 1 +system sh/cfg.sh -n dnode3 -c wallevel -v 1 +system sh/cfg.sh -n dnode4 -c wallevel -v 1 +system sh/cfg.sh -n dnode5 -c wallevel -v 1 +system sh/cfg.sh -n dnode6 -c wallevel -v 1 +system sh/cfg.sh -n dnode7 -c wallevel -v 1 +system sh/cfg.sh -n dnode8 -c wallevel -v 1 print ============== step1 print ========= start dnode1 @@ -340,6 +340,21 @@ sql drop dnode $hostname1 print drop dnode1 and sleep 9000 sleep 9000 +sql show mnodes +$dnode1Role = $data2_1 +$dnode4Role = $data2_4 +$dnode5Role = $data2_5 +print dnode1 ==> $dnode1Role +print dnode4 ==> $dnode4Role +print dnode5 ==> $dnode5Role + +if $dnode1Role != offline then + return -1 +endi + +print ============================== step9.1 +system sh/exec_up.sh -n dnode1 -s start + $x = 0 show9: $x = $x + 1 diff --git a/tests/script/unique/column/replica3.sim b/tests/script/unique/column/replica3.sim index 6390578867..4b08b13e2f 100644 --- a/tests/script/unique/column/replica3.sim +++ b/tests/script/unique/column/replica3.sim @@ -3,9 +3,9 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numofMpeers -v 3 system sh/cfg.sh -n dnode2 -c numofMpeers -v 3 system sh/cfg.sh -n dnode3 -c numofMpeers -v 3 diff --git a/tests/script/unique/db/delete.sim b/tests/script/unique/db/delete.sim index ed41f1bb90..f499b71727 100644 --- a/tests/script/unique/db/delete.sim +++ b/tests/script/unique/db/delete.sim @@ -6,9 +6,9 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 3 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3 system sh/cfg.sh -n dnode3 -c numOfMPeers -v 3 diff --git a/tests/script/unique/db/delete_part.sim b/tests/script/unique/db/delete_part.sim index 7e4e1b0b96..3ed4f5d753 100644 --- a/tests/script/unique/db/delete_part.sim +++ b/tests/script/unique/db/delete_part.sim @@ -9,10 +9,10 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 -system sh/cfg.sh -n dnode4 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 +system sh/cfg.sh -n dnode4 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 @@ -29,10 +29,10 @@ system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode1 -c tables -v 4 -system sh/cfg.sh -n dnode2 -c tables -v 4 -system sh/cfg.sh -n dnode3 -c tables -v 4 -system sh/cfg.sh -n dnode4 -c tables -v 4 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4 +system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4 +system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 4 print ========= start dnodes system sh/exec_up.sh -n dnode1 -s start diff --git a/tests/script/unique/db/replica_add12.sim b/tests/script/unique/db/replica_add12.sim index 14956e56c2..5d1ec79450 100644 --- a/tests/script/unique/db/replica_add12.sim +++ b/tests/script/unique/db/replica_add12.sim @@ -5,10 +5,10 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 -system sh/cfg.sh -n dnode4 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 +system sh/cfg.sh -n dnode4 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 diff --git a/tests/script/unique/db/replica_add13.sim b/tests/script/unique/db/replica_add13.sim index 970545ae01..ac7e3f5c5c 100644 --- a/tests/script/unique/db/replica_add13.sim +++ b/tests/script/unique/db/replica_add13.sim @@ -5,10 +5,10 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 -system sh/cfg.sh -n dnode4 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 +system sh/cfg.sh -n dnode4 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 diff --git a/tests/script/unique/db/replica_add23.sim b/tests/script/unique/db/replica_add23.sim index d4aa85c05c..995cd4116c 100644 --- a/tests/script/unique/db/replica_add23.sim +++ b/tests/script/unique/db/replica_add23.sim @@ -5,10 +5,10 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 -system sh/cfg.sh -n dnode4 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 +system sh/cfg.sh -n dnode4 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 diff --git a/tests/script/unique/db/replica_part.sim b/tests/script/unique/db/replica_part.sim index 29b16c8018..f0ffb89015 100644 --- a/tests/script/unique/db/replica_part.sim +++ b/tests/script/unique/db/replica_part.sim @@ -4,9 +4,9 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 2 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2 system sh/cfg.sh -n dnode3 -c numOfMPeers -v 2 diff --git a/tests/script/unique/db/replica_reduce21.sim b/tests/script/unique/db/replica_reduce21.sim index e86ff9367f..3a324c604a 100644 --- a/tests/script/unique/db/replica_reduce21.sim +++ b/tests/script/unique/db/replica_reduce21.sim @@ -4,9 +4,9 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode3 -c numOfMPeers -v 1 diff --git a/tests/script/unique/db/replica_reduce31.sim b/tests/script/unique/db/replica_reduce31.sim index 6b4264e9e1..fdb5e3c1dc 100644 --- a/tests/script/unique/db/replica_reduce31.sim +++ b/tests/script/unique/db/replica_reduce31.sim @@ -4,9 +4,9 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode3 -c numOfMPeers -v 1 diff --git a/tests/script/unique/db/replica_reduce32.sim b/tests/script/unique/db/replica_reduce32.sim index d59fb1fc0a..83b5cb7a5b 100644 --- a/tests/script/unique/db/replica_reduce32.sim +++ b/tests/script/unique/db/replica_reduce32.sim @@ -4,9 +4,9 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode3 -c numOfMPeers -v 1 diff --git a/tests/script/unique/dnode/balance1.sim b/tests/script/unique/dnode/balance1.sim index 5e5e9e097b..79f22c42ff 100644 --- a/tests/script/unique/dnode/balance1.sim +++ b/tests/script/unique/dnode/balance1.sim @@ -15,22 +15,22 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 4 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 -system sh/cfg.sh -n dnode4 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 +system sh/cfg.sh -n dnode4 -c wallevel -v 2 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 -system sh/cfg.sh -n dnode4 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 +system sh/cfg.sh -n dnode4 -c wallevel -v 2 print ========== step1 system sh/exec_up.sh -n dnode1 -s start sql connect sleep 3000 -sql create database d1 tables 4 +sql create database d1 maxTables 4 sql create table d1.t1 (t timestamp, i int) sql insert into d1.t1 values(now+1s, 15) sql insert into d1.t1 values(now+2s, 14) @@ -68,7 +68,7 @@ if $data2_2 != 1 then endi print ========== step3 -sql create database d2 tables 4 +sql create database d2 maxTables 4 sql create table d2.t2 (t timestamp, i int) sql insert into d2.t2 values(now+1s, 25) sql insert into d2.t2 values(now+2s, 24) @@ -139,7 +139,7 @@ if $data2_3 != 2 then endi print ========== step6 -sql create database d3 tables 4 +sql create database d3 maxTables 4 sql create table d3.t3 (t timestamp, i int) sql insert into d3.t3 values(now+1s, 35) sql insert into d3.t3 values(now+2s, 34) @@ -193,7 +193,7 @@ if $data2_4 != 1 then endi print ========== step8 -sql create database d4 tables 4 +sql create database d4 maxTables 4 sql create table d4.t4 (t timestamp, i int) sql insert into d4.t4 values(now+1s, 45) sql insert into d4.t4 values(now+2s, 44) diff --git a/tests/script/unique/dnode/balance2.sim b/tests/script/unique/dnode/balance2.sim index e27262bf1d..4518c42622 100644 --- a/tests/script/unique/dnode/balance2.sim +++ b/tests/script/unique/dnode/balance2.sim @@ -12,11 +12,11 @@ system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode5 -c mgmtEqualVnodeNum -v 4 -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/cfg.sh -n dnode3 -c clog -v 1 -system sh/cfg.sh -n dnode4 -c clog -v 1 -system sh/cfg.sh -n dnode5 -c clog -v 1 +system sh/cfg.sh -n dnode1 -c wallevel -v 1 +system sh/cfg.sh -n dnode2 -c wallevel -v 1 +system sh/cfg.sh -n dnode3 -c wallevel -v 1 +system sh/cfg.sh -n dnode4 -c wallevel -v 1 +system sh/cfg.sh -n dnode5 -c wallevel -v 1 print ========== step1 system sh/exec_up.sh -n dnode1 -s start @@ -28,7 +28,7 @@ system sh/exec_up.sh -n dnode2 -s start system sh/exec_up.sh -n dnode3 -s start sleep 3000 -sql create database d1 replica 2 tables 4 +sql create database d1 replica 2 maxTables 4 sql create table d1.t1 (t timestamp, i int) sql insert into d1.t1 values(now+1s, 15) sql insert into d1.t1 values(now+2s, 14) @@ -36,7 +36,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 create database d2 replica 2 tables 4 +sql create database d2 replica 2 maxTables 4 sql create table d2.t2 (t timestamp, i int) sql insert into d2.t2 values(now+1s, 25) sql insert into d2.t2 values(now+2s, 24) @@ -116,7 +116,7 @@ if $data2_4 != 2 then endi print ========== step4 -sql create database d3 replica 2 tables 4 +sql create database d3 replica 2 maxTables 4 sql create table d3.t3 (t timestamp, i int) sql insert into d3.t3 values(now+1s, 35) sql insert into d3.t3 values(now+2s, 34) diff --git a/tests/script/unique/dnode/balance3.sim b/tests/script/unique/dnode/balance3.sim index 112afed6a1..acb0d033d4 100644 --- a/tests/script/unique/dnode/balance3.sim +++ b/tests/script/unique/dnode/balance3.sim @@ -14,12 +14,12 @@ system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode5 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode6 -c mgmtEqualVnodeNum -v 4 -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/cfg.sh -n dnode3 -c clog -v 1 -system sh/cfg.sh -n dnode4 -c clog -v 1 -system sh/cfg.sh -n dnode5 -c clog -v 1 -system sh/cfg.sh -n dnode6 -c clog -v 1 +system sh/cfg.sh -n dnode1 -c wallevel -v 1 +system sh/cfg.sh -n dnode2 -c wallevel -v 1 +system sh/cfg.sh -n dnode3 -c wallevel -v 1 +system sh/cfg.sh -n dnode4 -c wallevel -v 1 +system sh/cfg.sh -n dnode5 -c wallevel -v 1 +system sh/cfg.sh -n dnode6 -c wallevel -v 1 print ========== step1 system sh/exec_up.sh -n dnode1 -s start @@ -33,7 +33,7 @@ system sh/exec_up.sh -n dnode3 -s start system sh/exec_up.sh -n dnode4 -s start sleep 3000 -sql create database d1 replica 3 tables 4 +sql create database d1 replica 3 maxTables 4 sql create table d1.t1 (t timestamp, i int) sql insert into d1.t1 values(now+1s, 15) sql insert into d1.t1 values(now+2s, 14) @@ -41,7 +41,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 create database d2 replica 3 tables 4 +sql create database d2 replica 3 maxTables 4 sql create table d2.t2 (t timestamp, i int) sql insert into d2.t2 values(now+1s, 25) sql insert into d2.t2 values(now+2s, 24) @@ -136,7 +136,7 @@ if $data2_5 != 2 then endi print ========== step4 -sql create database d3 replica 3 tables 4 +sql create database d3 replica 3 maxTables 4 sql create table d3.t3 (t timestamp, i int) sql insert into d3.t3 values(now+1s, 35) sql insert into d3.t3 values(now+2s, 34) diff --git a/tests/script/unique/dnode/balancex.sim b/tests/script/unique/dnode/balancex.sim index af163ab5fa..d717250a79 100644 --- a/tests/script/unique/dnode/balancex.sim +++ b/tests/script/unique/dnode/balancex.sim @@ -10,17 +10,17 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 4 -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/cfg.sh -n dnode3 -c clog -v 1 -system sh/cfg.sh -n dnode4 -c clog -v 1 +system sh/cfg.sh -n dnode1 -c wallevel -v 1 +system sh/cfg.sh -n dnode2 -c wallevel -v 1 +system sh/cfg.sh -n dnode3 -c wallevel -v 1 +system sh/cfg.sh -n dnode4 -c wallevel -v 1 print ========== step1 system sh/exec_up.sh -n dnode1 -s start sql connect sleep 3000 -sql create database d1 tables 4 +sql create database d1 maxTables 4 sql create table d1.t1 (t timestamp, i int) sql insert into d1.t1 values(now+1s, 15) sql insert into d1.t1 values(now+2s, 14) @@ -28,7 +28,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 create database d2 tables 4 +sql create database d2 maxTables 4 sql create table d2.t2 (t timestamp, i int) sql insert into d2.t2 values(now+1s, 25) sql insert into d2.t2 values(now+2s, 24) @@ -65,7 +65,7 @@ if $data2_2 != 2 then endi print ========== step3 -sql create database d3 replica 2 tables 4 +sql create database d3 replica 2 maxTables 4 sql create table d3.t3 (t timestamp, i int) sql insert into d3.t3 values(now+1s, 35) sql insert into d3.t3 values(now+2s, 34) diff --git a/tests/script/unique/dnode/monitor_bug.sim b/tests/script/unique/dnode/monitor_bug.sim index fda7f4ad77..8726caf1db 100644 --- a/tests/script/unique/dnode/monitor_bug.sim +++ b/tests/script/unique/dnode/monitor_bug.sim @@ -6,8 +6,8 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4 -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c clog -v 1 +system sh/cfg.sh -n dnode1 -c wallevel -v 1 +system sh/cfg.sh -n dnode2 -c wallevel -v 1 system sh/cfg.sh -n dnode1 -c monitor -v 1 system sh/cfg.sh -n dnode2 -c monitor -v 0 diff --git a/tests/script/unique/dnode/offline1.sim b/tests/script/unique/dnode/offline1.sim index 64ba981d1f..5e4ab65be3 100644 --- a/tests/script/unique/dnode/offline1.sim +++ b/tests/script/unique/dnode/offline1.sim @@ -16,9 +16,9 @@ system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4 -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/cfg.sh -n dnode3 -c clog -v 1 +system sh/cfg.sh -n dnode1 -c wallevel -v 1 +system sh/cfg.sh -n dnode2 -c wallevel -v 1 +system sh/cfg.sh -n dnode3 -c wallevel -v 1 print ========== step1 system sh/exec_up.sh -n dnode1 -s start diff --git a/tests/script/unique/dnode/offline2.sim b/tests/script/unique/dnode/offline2.sim index ae9b13079f..2615746e05 100644 --- a/tests/script/unique/dnode/offline2.sim +++ b/tests/script/unique/dnode/offline2.sim @@ -16,9 +16,9 @@ system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4 -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/cfg.sh -n dnode3 -c clog -v 1 +system sh/cfg.sh -n dnode1 -c wallevel -v 1 +system sh/cfg.sh -n dnode2 -c wallevel -v 1 +system sh/cfg.sh -n dnode3 -c wallevel -v 1 print ========== step1 system sh/exec_up.sh -n dnode1 -s start @@ -27,7 +27,7 @@ sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start sleep 3000 -sql create database d1 replica 2 tables 4 +sql create database d1 replica 2 maxTables 4 sql create table d1.t1(ts timestamp, i int) sql insert into d1.t1 values(now, 1) diff --git a/tests/script/unique/dnode/remove1.sim b/tests/script/unique/dnode/remove1.sim index c345aa202b..c69c51fa96 100644 --- a/tests/script/unique/dnode/remove1.sim +++ b/tests/script/unique/dnode/remove1.sim @@ -10,17 +10,17 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 4 -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/cfg.sh -n dnode3 -c clog -v 1 -system sh/cfg.sh -n dnode4 -c clog -v 1 +system sh/cfg.sh -n dnode1 -c wallevel -v 1 +system sh/cfg.sh -n dnode2 -c wallevel -v 1 +system sh/cfg.sh -n dnode3 -c wallevel -v 1 +system sh/cfg.sh -n dnode4 -c wallevel -v 1 print ========== step1 system sh/exec_up.sh -n dnode1 -s start sql connect sleep 3000 -sql create database d1 tables 4 +sql create database d1 maxTables 4 sql create table d1.t1 (t timestamp, i int) sql insert into d1.t1 values(now+1s, 15) sql insert into d1.t1 values(now+2s, 14) @@ -28,7 +28,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 create database d2 tables 4 +sql create database d2 maxTables 4 sql create table d2.t2 (t timestamp, i int) sql insert into d2.t2 values(now+1s, 25) sql insert into d2.t2 values(now+2s, 24) @@ -47,7 +47,7 @@ sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start sleep 9000 -sql create database d3 replica 2 tables 4 +sql create database d3 replica 2 maxTables 4 sql create table d3.t3 (t timestamp, i int) sql insert into d3.t3 values(now+1s, 35) sql insert into d3.t3 values(now+2s, 34) diff --git a/tests/script/unique/dnode/remove2.sim b/tests/script/unique/dnode/remove2.sim index 909f82e61c..c9e48d9283 100644 --- a/tests/script/unique/dnode/remove2.sim +++ b/tests/script/unique/dnode/remove2.sim @@ -10,17 +10,17 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 4 -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/cfg.sh -n dnode3 -c clog -v 1 -system sh/cfg.sh -n dnode4 -c clog -v 1 +system sh/cfg.sh -n dnode1 -c wallevel -v 1 +system sh/cfg.sh -n dnode2 -c wallevel -v 1 +system sh/cfg.sh -n dnode3 -c wallevel -v 1 +system sh/cfg.sh -n dnode4 -c wallevel -v 1 print ========== step1 system sh/exec_up.sh -n dnode1 -s start sql connect sleep 3000 -sql create database d1 tables 4 +sql create database d1 maxTables 4 sql create table d1.t1 (t timestamp, i int) sql insert into d1.t1 values(now+1s, 15) sql insert into d1.t1 values(now+2s, 14) @@ -28,7 +28,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 create database d2 tables 4 +sql create database d2 maxTables 4 sql create table d2.t2 (t timestamp, i int) sql insert into d2.t2 values(now+1s, 25) sql insert into d2.t2 values(now+2s, 24) @@ -47,7 +47,7 @@ sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start sleep 9000 -sql create database d3 replica 2 tables 4 +sql create database d3 replica 2 maxTables 4 sql create table d3.t3 (t timestamp, i int) sql insert into d3.t3 values(now+1s, 35) sql insert into d3.t3 values(now+2s, 34) diff --git a/tests/script/unique/dnode/vnode_clean.sim b/tests/script/unique/dnode/vnode_clean.sim index 3693868497..6b3c8ebeb2 100644 --- a/tests/script/unique/dnode/vnode_clean.sim +++ b/tests/script/unique/dnode/vnode_clean.sim @@ -10,16 +10,16 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 4 -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/cfg.sh -n dnode3 -c clog -v 1 -system sh/cfg.sh -n dnode4 -c clog -v 1 +system sh/cfg.sh -n dnode1 -c wallevel -v 1 +system sh/cfg.sh -n dnode2 -c wallevel -v 1 +system sh/cfg.sh -n dnode3 -c wallevel -v 1 +system sh/cfg.sh -n dnode4 -c wallevel -v 1 print ========== step1 system sh/exec_up.sh -n dnode1 -s start sql connect -sql create database d1 tables 4 +sql create database d1 maxTables 4 sql create table d1.t1 (t timestamp, i int) sql insert into d1.t1 values(now+1s, 15) sql insert into d1.t1 values(now+2s, 14) @@ -55,7 +55,7 @@ if $data2_2 != 3 then endi print ========== step3 -sql create database d2 tables 4 +sql create database d2 maxTables 4 sql create table d2.t2 (t timestamp, i int) sql insert into d2.t2 values(now+1s, 25) @@ -107,7 +107,7 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c balanceInterval -v 10 system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4 -system sh/cfg.sh -n dnode2 -c clog -v 1 +system sh/cfg.sh -n dnode2 -c wallevel -v 1 system sh/exec_up.sh -n dnode2 -s start $x = 0 @@ -128,7 +128,7 @@ if $data2_2 != 2 then endi print ========== step6 -sql create database d3 tables 4 +sql create database d3 maxTables 4 sql create table d3.t3 (t timestamp, i int) sql insert into d3.t3 values(now+1s, 35) sql insert into d3.t3 values(now+2s, 34) diff --git a/tests/script/unique/http/admin.sim b/tests/script/unique/http/admin.sim index ca2adc29ab..51307af00e 100644 --- a/tests/script/unique/http/admin.sim +++ b/tests/script/unique/http/admin.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c http -v 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 #system sh/cfg.sh -n dnode1 -c adminRowLimit -v 10 system sh/cfg.sh -n dnode1 -c httpDebugFlag -v 135 system sh/exec_up.sh -n dnode1 -s start diff --git a/tests/script/unique/http/opentsdb.sim b/tests/script/unique/http/opentsdb.sim index 3c59a73454..d1b193173e 100644 --- a/tests/script/unique/http/opentsdb.sim +++ b/tests/script/unique/http/opentsdb.sim @@ -1,7 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 -system sh/cfg.sh -n dnode1 -c clog -v 0 +system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec_up.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/unique/metrics/balance_replica1.sim b/tests/script/unique/metrics/balance_replica1.sim index cab3c1a807..f819a87e8c 100644 --- a/tests/script/unique/metrics/balance_replica1.sim +++ b/tests/script/unique/metrics/balance_replica1.sim @@ -34,7 +34,7 @@ $db = $dbPrefix $mt = $mtPrefix $st = $stPrefix . $i -sql create database $db tables 4 +sql create database $db maxTables 4 sql use $db sql create table $mt (ts timestamp, tbcol int, tbcol2 float) TAGS(tgcol int) diff --git a/tests/script/unique/metrics/dnode2.sim b/tests/script/unique/metrics/dnode2.sim index 2156dc40d8..dfcead7dbe 100644 --- a/tests/script/unique/metrics/dnode2.sim +++ b/tests/script/unique/metrics/dnode2.sim @@ -43,7 +43,7 @@ $i = 0 $db = $dbPrefix . $i $mt = $mtPrefix . $i -sql create database $db tables 4 +sql create database $db maxTables 4 sql use $db sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int) diff --git a/tests/script/unique/metrics/dnode2_stop.sim b/tests/script/unique/metrics/dnode2_stop.sim index be6ec735a1..eaa73253ea 100644 --- a/tests/script/unique/metrics/dnode2_stop.sim +++ b/tests/script/unique/metrics/dnode2_stop.sim @@ -48,7 +48,7 @@ $i = 0 $db = $dbPrefix . $i $mt = $mtPrefix . $i -sql create database $db tables 4 +sql create database $db maxTables 4 sql use $db sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int) diff --git a/tests/script/unique/metrics/dnode3.sim b/tests/script/unique/metrics/dnode3.sim index 3fd54adfba..9b5bf4cba9 100644 --- a/tests/script/unique/metrics/dnode3.sim +++ b/tests/script/unique/metrics/dnode3.sim @@ -54,7 +54,7 @@ $i = 0 $db = $dbPrefix . $i $mt = $mtPrefix . $i -sql create database $db tables 4 +sql create database $db maxTables 4 sql use $db sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int) diff --git a/tests/script/unique/metrics/replica2_dnode4.sim b/tests/script/unique/metrics/replica2_dnode4.sim index c5096ca03c..7fbf89d767 100644 --- a/tests/script/unique/metrics/replica2_dnode4.sim +++ b/tests/script/unique/metrics/replica2_dnode4.sim @@ -63,7 +63,7 @@ $i = 0 $db = $dbPrefix . $i $mt = $mtPrefix . $i -sql create database $db replica 2 tables 4 +sql create database $db replica 2 maxTables 4 sql use $db sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int) diff --git a/tests/script/unique/metrics/replica2_vnode3.sim b/tests/script/unique/metrics/replica2_vnode3.sim index 937c78cb8b..37f0db05f9 100644 --- a/tests/script/unique/metrics/replica2_vnode3.sim +++ b/tests/script/unique/metrics/replica2_vnode3.sim @@ -42,7 +42,7 @@ $i = 0 $db = $dbPrefix . $i $mt = $mtPrefix . $i -sql create database $db replica 2 tables 4 +sql create database $db replica 2 maxTables 4 sql use $db sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int) diff --git a/tests/script/unique/metrics/replica3_dnode6.sim b/tests/script/unique/metrics/replica3_dnode6.sim index c3592a88f2..f023ab1c72 100644 --- a/tests/script/unique/metrics/replica3_dnode6.sim +++ b/tests/script/unique/metrics/replica3_dnode6.sim @@ -93,7 +93,7 @@ $i = 0 $db = $dbPrefix . $i $mt = $mtPrefix . $i -sql create database $db replica 3 tables 4 +sql create database $db replica 3 maxTables 4 sql use $db sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int) diff --git a/tests/script/unique/metrics/replica3_vnode3.sim b/tests/script/unique/metrics/replica3_vnode3.sim index 4da34fc92a..549500439b 100644 --- a/tests/script/unique/metrics/replica3_vnode3.sim +++ b/tests/script/unique/metrics/replica3_vnode3.sim @@ -62,7 +62,7 @@ $i = 0 $db = $dbPrefix . $i $mt = $mtPrefix . $i -sql create database $db replica 3 tables 4 +sql create database $db replica 3 maxTables 4 sql use $db sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int) diff --git a/tests/script/unique/stream/metrics_balance.sim b/tests/script/unique/stream/metrics_balance.sim index fcdb7df206..d3da7b43d1 100644 --- a/tests/script/unique/stream/metrics_balance.sim +++ b/tests/script/unique/stream/metrics_balance.sim @@ -36,7 +36,7 @@ sql connect print ============== step1 $db = $dbPrefix -sql create database $db tables 4 +sql create database $db maxTables 4 sql use $db $i = 0 diff --git a/tests/script/unique/stream/table_balance.sim b/tests/script/unique/stream/table_balance.sim index 6d2e7de57a..a0a83c7cef 100644 --- a/tests/script/unique/stream/table_balance.sim +++ b/tests/script/unique/stream/table_balance.sim @@ -38,7 +38,7 @@ $db = $dbPrefix $mt = $mtPrefix $st = $stPrefix . $i -sql create database $db tables 4 +sql create database $db maxTables 4 sql use $db sql create table $mt (ts timestamp, tbcol int, tbcol2 float) TAGS(tgcol int) diff --git a/tests/script/unique/stream/table_move.sim b/tests/script/unique/stream/table_move.sim index 3096bcc9f9..eb99b93932 100644 --- a/tests/script/unique/stream/table_move.sim +++ b/tests/script/unique/stream/table_move.sim @@ -25,10 +25,10 @@ system sh/cfg.sh -n dnode2 -c balanceInterval -v 10 system sh/cfg.sh -n dnode3 -c balanceInterval -v 10 system sh/cfg.sh -n dnode4 -c balanceInterval -v 10 -system sh/cfg.sh -n dnode1 -c clog -v 1 -system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/cfg.sh -n dnode3 -c clog -v 1 -system sh/cfg.sh -n dnode4 -c clog -v 1 +system sh/cfg.sh -n dnode1 -c wallevel -v 1 +system sh/cfg.sh -n dnode2 -c wallevel -v 1 +system sh/cfg.sh -n dnode3 -c wallevel -v 1 +system sh/cfg.sh -n dnode4 -c wallevel -v 1 system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0 system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 0 @@ -75,7 +75,7 @@ $db = $dbPrefix . $i $mt = $mtPrefix . $i $st = $stPrefix . $i -sql create database $db tables 4 +sql create database $db maxTables 4 sql use $db sql create table $mt (ts timestamp, tbcol int, tbcol2 float) TAGS(tgcol int) diff --git a/tests/script/unique/vnode/commit.sim b/tests/script/unique/vnode/commit.sim index 7383934aac..dae6571667 100644 --- a/tests/script/unique/vnode/commit.sim +++ b/tests/script/unique/vnode/commit.sim @@ -2,8 +2,8 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numofMpeers -v 3 system sh/cfg.sh -n dnode2 -c numofMpeers -v 3 system sh/exec_up.sh -n dnode1 -s start diff --git a/tests/script/unique/vnode/many.sim b/tests/script/unique/vnode/many.sim index 57e0d10b7e..544f7d5b55 100644 --- a/tests/script/unique/vnode/many.sim +++ b/tests/script/unique/vnode/many.sim @@ -4,10 +4,10 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 -system sh/cfg.sh -n dnode4 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 +system sh/cfg.sh -n dnode4 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numofMpeers -v 1 system sh/cfg.sh -n dnode2 -c numofMpeers -v 1 system sh/cfg.sh -n dnode3 -c numofMpeers -v 1 diff --git a/tests/script/unique/vnode/replica2_basic.sim b/tests/script/unique/vnode/replica2_basic.sim index c71692fa9f..8e18c3b9e7 100644 --- a/tests/script/unique/vnode/replica2_basic.sim +++ b/tests/script/unique/vnode/replica2_basic.sim @@ -2,8 +2,8 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numofMpeers -v 3 system sh/cfg.sh -n dnode2 -c numofMpeers -v 3 system sh/exec_up.sh -n dnode1 -s start diff --git a/tests/script/unique/vnode/replica2_basic2.sim b/tests/script/unique/vnode/replica2_basic2.sim index dd0914549a..a86071faaf 100644 --- a/tests/script/unique/vnode/replica2_basic2.sim +++ b/tests/script/unique/vnode/replica2_basic2.sim @@ -5,10 +5,10 @@ system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 -system sh/cfg.sh -n dnode4 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 +system sh/cfg.sh -n dnode4 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 diff --git a/tests/script/unique/vnode/replica2_repeat.sim b/tests/script/unique/vnode/replica2_repeat.sim index 46fe90cfde..cc1feecb07 100644 --- a/tests/script/unique/vnode/replica2_repeat.sim +++ b/tests/script/unique/vnode/replica2_repeat.sim @@ -4,10 +4,10 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 -system sh/cfg.sh -n dnode4 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 +system sh/cfg.sh -n dnode4 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numofMpeers -v 1 system sh/cfg.sh -n dnode2 -c numofMpeers -v 1 system sh/cfg.sh -n dnode3 -c numofMpeers -v 1 diff --git a/tests/script/unique/vnode/replica3_basic.sim b/tests/script/unique/vnode/replica3_basic.sim index 542aa7803d..62910b947a 100644 --- a/tests/script/unique/vnode/replica3_basic.sim +++ b/tests/script/unique/vnode/replica3_basic.sim @@ -3,9 +3,9 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numofMpeers -v 3 system sh/cfg.sh -n dnode2 -c numofMpeers -v 3 system sh/cfg.sh -n dnode3 -c numofMpeers -v 3 diff --git a/tests/script/unique/vnode/replica3_repeat.sim b/tests/script/unique/vnode/replica3_repeat.sim index 67ac673bfc..0ed16e0729 100644 --- a/tests/script/unique/vnode/replica3_repeat.sim +++ b/tests/script/unique/vnode/replica3_repeat.sim @@ -4,10 +4,10 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode4 -i 4 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 -system sh/cfg.sh -n dnode4 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 +system sh/cfg.sh -n dnode4 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numofMpeers -v 1 system sh/cfg.sh -n dnode2 -c numofMpeers -v 1 system sh/cfg.sh -n dnode3 -c numofMpeers -v 1 diff --git a/tests/script/unique/vnode/replica3_vgroup.sim b/tests/script/unique/vnode/replica3_vgroup.sim index 46003a14fa..077c1e2e49 100644 --- a/tests/script/unique/vnode/replica3_vgroup.sim +++ b/tests/script/unique/vnode/replica3_vgroup.sim @@ -3,9 +3,9 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 -system sh/cfg.sh -n dnode1 -c clog -v 2 -system sh/cfg.sh -n dnode2 -c clog -v 2 -system sh/cfg.sh -n dnode3 -c clog -v 2 +system sh/cfg.sh -n dnode1 -c wallevel -v 2 +system sh/cfg.sh -n dnode2 -c wallevel -v 2 +system sh/cfg.sh -n dnode3 -c wallevel -v 2 system sh/cfg.sh -n dnode1 -c numofMpeers -v 3 system sh/cfg.sh -n dnode2 -c numofMpeers -v 3 system sh/cfg.sh -n dnode3 -c numofMpeers -v 3