diff --git a/packaging/cfg/taos.cfg b/packaging/cfg/taos.cfg index 588f0650bd8b67033504d5f0b9c3f77cca24c54a..38e960eb0679453c3d7cd624ceed5616b0b5deb7 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/inc/tscUtil.h b/src/client/inc/tscUtil.h index 2b53342e74feece2ecf2920e79234ef9cd52fb35..4b8a162ef73ca710e747a113e918f3fee576837c 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 203ba90c5f687709fe173fc7352e15844293bc60..3a26d294a40d3c9cd89c7a7ab639aaa889151e53 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. @@ -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; @@ -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 9995f94dbe47aa2f3861e5b4134f792750701092..28bfaf916b62305a3f80ec4bcf8b4b44fc6a4f4d 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 4bee595dacffec859909fd1fe8a946906a554e36..5401e500bdbb1773c4938041a54e548f942b8f61 100644 --- a/src/client/src/tscParseInsert.c +++ b/src/client/src/tscParseInsert.c @@ -327,15 +327,16 @@ int32_t tsParseOneColumnData(SSchema *pSchema, SSQLToken *pToken, char *payload, *(uint32_t*) payload = TSDB_DATA_NCHAR_NULL; } else { // if the converted output len is over than pColumnModel->bytes, return error: 'Argument list too long' - int32_t resLen = -1; - if (!taosMbsToUcs4(pToken->z, pToken->n, payload + VARSTR_HEADER_SIZE, pSchema->bytes - VARSTR_HEADER_SIZE, &resLen)) { - char buf[512] = {0}; - snprintf(buf, 512, "%s", strerror(errno)); + size_t wcharLength = 0; + if (!taosMbsToUcs4(pToken->z, pToken->n, payload + VARSTR_HEADER_SIZE, pSchema->bytes - VARSTR_HEADER_SIZE, + &wcharLength)) { + char buf[512] = {0}; + snprintf(buf, tListLen(buf), "%s", strerror(errno)); return tscInvalidSQLErrMsg(msg, buf, pToken->z); } - *(uint16_t*)payload = (uint16_t) (resLen * TSDB_NCHAR_SIZE); + *(uint16_t*) payload = (uint16_t) (wcharLength); } break; @@ -960,6 +961,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 12032725c388bb5fedd72347d6cd1fa4feaf8831..947384a99255790671c3d36a0eed2a19c276f369 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) { @@ -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 { @@ -1260,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 @@ -1311,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, @@ -1399,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); @@ -1436,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); } @@ -2278,7 +2253,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; } } @@ -4765,7 +4740,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 @@ -4790,15 +4765,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; } @@ -4811,7 +4786,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; } @@ -4937,7 +4912,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); } } } @@ -5331,8 +5306,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); } @@ -5357,7 +5332,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); @@ -5738,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); } @@ -5753,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/tscSecondaryMerge.c b/src/client/src/tscSecondaryMerge.c index 1abefdfd5affe49a0ab0232736c9b4eada8a2029..8c75ed6c3567c985ca648e78a2933350dd41aae5 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 a6ed57568653224fb33ae5be97330f396abc2f82..5a658f669330970b426cc1211ff23ceadaf13325 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); } @@ -1907,7 +1888,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 +1997,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 +2196,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) { @@ -2363,8 +2344,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 afac69350c80df639d255a0e8da01b6806458d05..4fdd4c432378044944a1d22f7b860c302da8d5e3 100644 --- a/src/client/src/tscSql.c +++ b/src/client/src/tscSql.c @@ -440,23 +440,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; @@ -885,7 +868,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 5f5af09cf8aa84712c166e12c508fbf1a3b20dc3..d7c22b2248426e6437f260e1c7bab30de2d580ba 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/tscSub.c b/src/client/src/tscSub.c index 7b40d69f1be8fcb605052907fae9d6b3c6a97680..856b67839115680eb535721546d9dd0abc83cc8c 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/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index c3d6c0f5fc3b1a59b7caa879e0d4445ed1b10bf6..7682287f945d89513e57190401664c90b918ad46 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/tscSystem.c b/src/client/src/tscSystem.c index c0ad91cd59a8b638134ab5234402e97922c0ae35..89c185f199e17faec2b71072d5832919ad37b212 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/client/src/tscUtil.c b/src/client/src/tscUtil.c index d49fff1583094448e0c9dd6ae7f2346e447c14a8..727c7741f3183382bdc6321171b9677495f58ecd 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/common/inc/tglobal.h b/src/common/inc/tglobal.h index dd0dd230fd4bcd24d279fa89d8381d1f1b79b28f..40c4e049d2a1143530525b018d3f2ec7e2ee12b2 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 70b55b9d92ddc065bcdc75fbeee4cbb8dd783164..b50e7b97f1bc06ece6b91e7cc5af92aba72a307a 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/inc/taosdef.h b/src/inc/taosdef.h index e60124cf0a1f180249e1178646a6d5daf3da97fd..5523f2e0f964423949062e7015b9385c0e6decec 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 a91a1e212823944187486790c4dbf98df7da6016..19bd96a0637097b626609c2b2c8428bc5ba28c60 100644 --- a/src/inc/taosmsg.h +++ b/src/inc/taosmsg.h @@ -358,7 +358,7 @@ typedef struct SExprInfo { struct tExprNode* pExpr; int16_t bytes; int16_t type; - int16_t interResBytes; + int16_t interBytes; } SExprInfo; typedef struct SColumnFilterInfo { @@ -475,9 +475,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; @@ -486,7 +486,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; @@ -565,7 +565,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 182860e67cf8df81401e8c065700b9d9fd6fa387..fa5f75f95b5092eff2bf3a0e72fa4b5f6c98818b 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 06dc2e881bfe3ed8109ea5d318e95d560a340395..8c2c3c69a1261ea0d86ac8d3b09c435a74b65085 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 152397c044c4c42f672cb16e11e1134cd79bf816..69475371dcf1fee1ae1296eec9b344cdc92290a5 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, args->port); diff --git a/src/mnode/inc/mgmtDef.h b/src/mnode/inc/mgmtDef.h index 8e5240910d4300e757590f3b607bd888416fc332..ba71f9373b54597a17d59e75f4e3dadc0c5d6310 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 9eb8b8dce197b603d6f73b0b9c04afbae2392e44..d8dfcbe213304ad4f19a441a7781b2ed98970679 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) { @@ -809,15 +811,20 @@ static SDbCfg mgmtGetAlterDbOption(SDbObj *pDb, SCMAlterDbMsg *pAlter) { if (replications > 0 && replications != pDb->cfg.replications) { mTrace("db:%s, replications:%d change to %d", pDb->name, pDb->cfg.replications, replications); newCfg.replications = replications; - } - if (replications > mgmtGetDnodesNum()) { - mError("db:%s, no enough dnode to change replica:%d", pDb->name, replications); - terrno = TSDB_CODE_NO_ENOUGH_DNODES; + if (replications > mgmtGetDnodesNum()) { + mError("db:%s, no enough dnode to change replica:%d", pDb->name, replications); + terrno = TSDB_CODE_NO_ENOUGH_DNODES; + } + + if (pDb->cfg.replications - replications >= 2) { + mError("db:%s, replica number can't change from 3 to 1", pDb->name, replications); + terrno = TSDB_CODE_INVALID_OPTION; + } } - if (pDb->cfg.replications - replications >= 2) { - mError("db:%s, replica number can't change from 3 to 1", pDb->name, replications); + if (walLevel > 0 && (walLevel < TSDB_MIN_WAL_LEVEL || walLevel > TSDB_MAX_WAL_LEVEL)) { + mError("db:%s, wal level %d should be between 0-2, origin:%d", pDb->name, walLevel, pDb->cfg.walLevel); terrno = TSDB_CODE_INVALID_OPTION; } diff --git a/src/mnode/src/mgmtSdb.c b/src/mnode/src/mgmtSdb.c index a55869222dca82bf81537bea3da11f9b32473194..fe25699b5f43e5a76a5894c6e399f403ea92ffc8 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}; char temp[TSDB_FILENAME_LEN]; sprintf(temp, "%s/wal", tsMnodeDir); tsSdbObj.wal = walOpen(temp, &walCfg); @@ -324,7 +324,6 @@ void sdbCleanUp() { tsSdbObj.status = SDB_STATUS_CLOSING; syncStop(tsSdbObj.sync); - free(tsSdbObj.sync); walClose(tsSdbObj.wal); sem_destroy(&tsSdbObj.sem); pthread_mutex_destroy(&tsSdbObj.mutex); diff --git a/src/mnode/src/mgmtShell.c b/src/mnode/src/mgmtShell.c index c86bf2a2dd1334238e632792ff4bb05ee9c0b2f6..ac4d6de5bf3312309e2b761a1c53a7366a3743e5 100644 --- a/src/mnode/src/mgmtShell.c +++ b/src/mnode/src/mgmtShell.c @@ -108,7 +108,6 @@ void mgmtCleanUpShell() { } if (tsQhandleCache) { - taosCacheEmpty(tsQhandleCache); taosCacheCleanup(tsQhandleCache); tsQhandleCache = NULL; } diff --git a/src/mnode/src/mgmtVgroup.c b/src/mnode/src/mgmtVgroup.c index f83268e760ab85e07c22249bff28db6430e598c5..8601be39371e4551303d8cd3eb556c6b739d2458 100644 --- a/src/mnode/src/mgmtVgroup.c +++ b/src/mnode/src/mgmtVgroup.c @@ -560,7 +560,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/plugins/http/src/httpServer.c b/src/plugins/http/src/httpServer.c index 9b8affcde256065ef97709976afa7b4f5dc8ada5..51795a570d2a25360561938642cd175623244bd7 100644 --- a/src/plugins/http/src/httpServer.c +++ b/src/plugins/http/src/httpServer.c @@ -269,11 +269,12 @@ void httpCleanUpConnect(HttpServer *pServer) { for (i = 0; i < pServer->numOfThreads; ++i) { pThread = pServer->pThreads + i; + if (pThread == NULL) continue; //taosCloseSocket(pThread->pollFd); - while (pThread->pHead) { - httpCleanUpContext(pThread->pHead, 0); - } + //while (pThread->pHead) { + // httpCleanUpContext(pThread->pHead, 0); + //} pthread_cancel(pThread->thread); pthread_join(pThread->thread, NULL); @@ -504,8 +505,8 @@ void httpAcceptHttpConnection(void *arg) { sockFd = taosOpenTcpServerSocket(pServer->serverIp, pServer->serverPort); if (sockFd < 0) { - httpError("http server:%s, failed to open http socket, ip:%s:%u", pServer->label, pServer->serverIp, - pServer->serverPort); + httpError("http server:%s, failed to open http socket, ip:%s:%u error:%s", pServer->label, taosIpStr(pServer->serverIp), + pServer->serverPort, strerror(errno)); return; } else { httpPrint("http service init success at %u", pServer->serverPort); @@ -645,7 +646,7 @@ bool httpInitConnect(HttpServer *pServer) { } pthread_attr_destroy(&thattr); - httpTrace("http server:%s, initialized, ip:%s:%u, numOfThreads:%d", pServer->label, pServer->serverIp, + httpTrace("http server:%s, initialized, ip:%s:%u, numOfThreads:%d", pServer->label, taosIpStr(pServer->serverIp), pServer->serverPort, pServer->numOfThreads); return true; } diff --git a/src/plugins/http/src/httpSystem.c b/src/plugins/http/src/httpSystem.c index 89dc11796faa043bb96e88566e0fd27cd7679f3b..8b95077632a48f09491cf2998b56500441a3be80 100644 --- a/src/plugins/http/src/httpSystem.c +++ b/src/plugins/http/src/httpSystem.c @@ -117,7 +117,7 @@ void httpCleanUpSystem() { httpPrint("http service cleanup"); httpStopSystem(); -#if 0 +//#if 0 if (httpServer == NULL) { return; } @@ -131,7 +131,13 @@ void httpCleanUpSystem() { httpServer->timerHandle = NULL; } - httpCleanUpConnect(httpServer); + if (httpServer->pThreads != NULL) { + httpCleanUpConnect(httpServer); + httpServer->pThreads = NULL; + } + + +#if 0 httpRemoveAllSessions(httpServer); if (httpServer->pContextPool != NULL) { diff --git a/src/plugins/monitor/src/monitorMain.c b/src/plugins/monitor/src/monitorMain.c index a4f9f320503ed99d6ca6b5b9941274829f6b3edd..7836dbae85369bac1dceec392f3f8da8ae4ce2df 100644 --- a/src/plugins/monitor/src/monitorMain.c +++ b/src/plugins/monitor/src/monitorMain.c @@ -44,7 +44,7 @@ #define SQL_LENGTH 1024 #define LOG_LEN_STR 80 -#define IP_LEN_STR 15 +#define IP_LEN_STR 18 #define CHECK_INTERVAL 1000 typedef enum { @@ -115,6 +115,13 @@ static void monitorInitConn(void *para, void *unused) { if (tsMonitorConn.ep[0] == 0) strcpy(tsMonitorConn.ep, tsLocalEp); + int len = strlen(tsMonitorConn.ep); + for (int i = 0; i < len; ++i) { + if (tsMonitorConn.ep[i] == ':' || tsMonitorConn.ep[i] == '-') { + tsMonitorConn.ep[i] = '_'; + } + } + if (tsMonitorConn.conn == NULL) { taos_connect_a(NULL, "monitor", tsInternalPass, "", 0, monitorInitConnCb, &tsMonitorConn, &(tsMonitorConn.conn)); } else { @@ -141,8 +148,8 @@ static void dnodeBuildMonitorSql(char *sql, int32_t cmd) { if (cmd == MONITOR_CMD_CREATE_DB) { snprintf(sql, SQL_LENGTH, - "create database if not exists %s replica 1 days 10 keep 30 rows 1024 cache 2048 " - "ablocks 2 tblocks 32 tables 32 precision 'us'", + "create database if not exists %s replica 1 days 10 keep 30 cache 2 " + "blocks 2 maxtables 32 precision 'us'", tsMonitorDbName); } else if (cmd == MONITOR_CMD_CREATE_MT_DN) { snprintf(sql, SQL_LENGTH, @@ -154,7 +161,7 @@ static void dnodeBuildMonitorSql(char *sql, int32_t cmd) { ", io_read float, io_write float" ", req_http int, req_select int, req_insert int" ") tags (ipaddr binary(%d))", - tsMonitorDbName, IP_LEN_STR + 1); + tsMonitorDbName, TSDB_FQDN_LEN + 1); } else if (cmd == MONITOR_CMD_CREATE_TB_DN) { snprintf(sql, SQL_LENGTH, "create table if not exists %s.dn_%s using %s.dn tags('%s')", tsMonitorDbName, tsMonitorConn.ep, tsMonitorDbName, tsLocalEp); diff --git a/src/query/inc/qsqlparser.h b/src/query/inc/qsqlparser.h index 08d41862911ad13de2d23d8981c016fb90e2016c..d2fad227e690fa11f980a17c650753ac8b603826 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 be8d922a849f14b3be3c69807c0669581fe4f0b9..0a32947921ac1e8f710c018191903b0dea1ac115 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/inc/tsqlfunction.h b/src/query/inc/tsqlfunction.h index b148410bfbc14bb681c8217102eeab57b3f9f0c2..c409d4300cac4a8f92ae2b21aa1fd1ec33337b41 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 e78f36ed31ecc929e75d329d957d5ed24e2635ef..3336f90c834142838e68ca1979ac645e46509a34 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/qparserImpl.c b/src/query/src/qparserImpl.c index d8e48de918e9c12ba0a9850dc504a941efc2467c..b8d11891292d9da1b5d720022b327585d8cf854c 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; @@ -818,7 +820,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) { @@ -886,16 +888,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 51b196a9da2c9282e2fa65ded7088cdb0bdf9ca0..d5b20e1edd36ac6af7cdeb075385415393ea10c8 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/queryExecutor.c b/src/query/src/queryExecutor.c index e8abe9d81938286edec6e605476893da4dd12d9f..b84df58383cb7475765b83a49ea01ba171ece138 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); } } @@ -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; @@ -5540,7 +5542,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 +5568,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 +5782,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/src/query/src/sql.c b/src/query/src/sql.c index 223068ef9197ae4b5c6072c491f978dfef8ea73f..19bc05887c7b6756ad2201cd2c94deaaf5c82f6b 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; - 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; - break; - case 112: /* tagitemlist ::= tagitem */ -{ yylhsminor.yy30 = tVariantListAppend(NULL, &yymsp[0].minor.yy380, -1); } - yymsp[0].minor.yy30 = yylhsminor.yy30; - 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; - break; - case 117: /* tagitem ::= NULL */ -{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy380, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy380 = yylhsminor.yy380; - 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); + yymsp[-1].minor.yy47 = yylhsminor.yy47; + break; + 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 116: /* tagitemlist ::= tagitem */ +{ yylhsminor.yy456 = tVariantListAppend(NULL, &yymsp[0].minor.yy442, -1); } + yymsp[0].minor.yy456 = yylhsminor.yy456; + break; + 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 121: /* tagitem ::= NULL */ +{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy442, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy442 = yylhsminor.yy442; + break; + 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/util/inc/ttimer.h b/src/util/inc/ttimer.h index 94223128564f4998e87b5e6895c275cde2bebddc..3649a8d2f1f4d09c61a930acf33be5c6e4701f6d 100644 --- a/src/util/inc/ttimer.h +++ b/src/util/inc/ttimer.h @@ -40,6 +40,10 @@ bool taosTmrReset(TAOS_TMR_CALLBACK fp, int mseconds, void *param, void *handle, void taosTmrCleanUp(void *handle); +int32_t taosInitTimer(void (*callback)(int), int32_t ms); + +void taosUninitTimer(); + #ifdef __cplusplus } #endif diff --git a/src/util/inc/tutil.h b/src/util/inc/tutil.h index 95289048820e67cf3b583ec50255be04931d45f5..3a0a1920af4cb2dd841bbeadd973eea85830019e 100644 --- a/src/util/inc/tutil.h +++ b/src/util/inc/tutil.h @@ -141,10 +141,7 @@ int32_t taosFileRename(char *fullPath, char *suffix, char delimiter, char **dstP */ void getTmpfilePath(const char *fileNamePattern, char *dstPath); -int32_t taosInitTimer(void (*callback)(int), int32_t ms); -void taosUninitTimer(); - -bool taosMbsToUcs4(char *mbs, int32_t mbs_len, char *ucs4, int32_t ucs4_max_len, int32_t* len); +bool taosMbsToUcs4(char *mbs, size_t mbs_len, char *ucs4, int32_t ucs4_max_len, size_t* len); int tasoUcs4Compare(void* f1_ucs4, void *f2_ucs4, int bytes); diff --git a/src/util/src/tcache.c b/src/util/src/tcache.c index 63fe124de28b982c46305af652eb2cad3c841754..02a5b931412c874d54dc3bb99e28574340e385d5 100644 --- a/src/util/src/tcache.c +++ b/src/util/src/tcache.c @@ -304,9 +304,9 @@ static FORCE_INLINE SCacheDataNode *taosAddToCacheImpl(SCacheObj *pCacheObj, con static void doCleanupDataCache(SCacheObj *pCacheObj) { __cache_wr_lock(pCacheObj); - if (taosHashGetSize(pCacheObj->pHashTable) > 0) { - taosHashCleanup(pCacheObj->pHashTable); - } + //if (taosHashGetSize(pCacheObj->pHashTable) > 0) { + taosHashCleanup(pCacheObj->pHashTable); + //} __cache_unlock(pCacheObj); diff --git a/src/util/src/tutil.c b/src/util/src/tutil.c index 396f6f1ef889f390d0449c5d44add78b1a30b6ba..52f70bdf5e3a4f6bead0f4e93e4c8c2fe342968a 100644 --- a/src/util/src/tutil.c +++ b/src/util/src/tutil.c @@ -490,25 +490,26 @@ bool taosUcs4ToMbs(void *ucs4, int32_t ucs4_max_len, char *mbs) { #endif } -bool taosMbsToUcs4(char *mbs, int32_t mbs_len, char *ucs4, int32_t ucs4_max_len, int32_t* len) { +bool taosMbsToUcs4(char *mbs, size_t mbsLength, char *ucs4, int32_t ucs4_max_len, size_t* len) { memset(ucs4, 0, ucs4_max_len); #ifdef USE_LIBICONV iconv_t cd = iconv_open(DEFAULT_UNICODE_ENCODEC, tsCharset); - size_t ucs4_input_len = mbs_len; - size_t outLen = ucs4_max_len; - if (iconv(cd, &mbs, &ucs4_input_len, &ucs4, &outLen) == -1) { + size_t ucs4_input_len = mbsLength; + size_t outLeft = ucs4_max_len; + if (iconv(cd, &mbs, &ucs4_input_len, &ucs4, &outLeft) == -1) { iconv_close(cd); return false; } + iconv_close(cd); if (len != NULL) { - *len = outLen; + *len = ucs4_max_len - outLeft; } return true; #else mbstate_t state = {0}; - int32_t len = mbsnrtowcs((wchar_t *) ucs4, (const char **) &mbs, mbs_len, ucs4_max_len / 4, &state); + int32_t len = mbsnrtowcs((wchar_t *) ucs4, (const char **) &mbs, mbsLength, ucs4_max_len / 4, &state); return len >= 0; #endif } diff --git a/src/vnode/src/vnodeMain.c b/src/vnode/src/vnodeMain.c index 2c914de20f3c0c8b6ef274246adbbf75f7592fc4..f5d7bd45a74233c9245a1bcc47aa9ef50b18e781 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; @@ -434,7 +434,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); @@ -579,12 +579,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 ad33391b984f5283ec94c1823466f8237f974e5c..5157d715bff44d34441686b4c3c8d86b6a91fad9 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 6bab8e0b23e10588ca84c5e8b84f7c026cb0027a..5293c85443a7e18cd8f6dcc835f73c4649dbddba 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 a2073b09b32a922cd097369b912a4fbddbec5e93..70b1b2067f43c11a734a6a13dfec997a6971398b 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/fulltest.sh b/tests/pytest/fulltest.sh index ec06eb38ef038eab2d8cfa798070be84e7f7623e..cff6db202849c16e70476c887ce5d2512a3b4071 100755 --- a/tests/pytest/fulltest.sh +++ b/tests/pytest/fulltest.sh @@ -9,6 +9,11 @@ python3 ./test.py $1 -f insert/smallint.py python3 ./test.py $1 -f insert/tinyint.py python3 ./test.py $1 -f insert/date.py python3 ./test.py $1 -f insert/binary.py + +python3 ./test.py $1 -f table/column_name.py +python3 ./test.py $1 -f table/column_num.py +python3 ./test.py $1 -f table/db_table.py + python3 ./test.py $1 -f import_merge/importBlock1HO.py python3 ./test.py $1 -f import_merge/importBlock1HPO.py python3 ./test.py $1 -f import_merge/importBlock1H.py diff --git a/tests/pytest/import_merge/importDataH2.py b/tests/pytest/import_merge/importDataH2.py index d49abff374b864e80079996a9cb5c81be248d4ba..73a412fb8046ff1f6baf9c42d39221345c22fbee 100644 --- a/tests/pytest/import_merge/importDataH2.py +++ b/tests/pytest/import_merge/importDataH2.py @@ -27,7 +27,7 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdDnodes.stop(1) tdDnodes.deploy(1) @@ -35,7 +35,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -43,19 +43,19 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than 10 rows less than %d rows will go to data file" % - self.rows) + self.maxrows) tdLog.info("================= step2") - tdLog.info("import %d sequential data" % (self.rows / 2)) + tdLog.info("import %d sequential data" % (self.maxrows / 2)) startTime = self.startTime sqlcmd = ['import into tb1 values'] - for rid in range(1, self.rows / 2 + 1): + for rid in range(1, self.maxrows / 2 + 1): sqlcmd.append('(%ld, %d)' % (startTime + rid, rid)) tdSql.execute(" ".join(sqlcmd)) tdLog.info("================= step3") tdSql.query('select * from tb1') - tdSql.checkRows(self.rows / 2) + tdSql.checkRows(self.maxrows / 2) tdLog.info("================= step4") tdDnodes.stop(1) @@ -70,7 +70,7 @@ class TDTestCase: tdLog.info("================= step7") tdSql.execute('reset query cache') tdSql.query('select * from tb1 order by ts desc') - tdSql.checkRows(self.rows / 2 + 1) + tdSql.checkRows(self.maxrows / 2 + 1) tdLog.info("================= step8") tdLog.info("import 10 data in batch before") @@ -83,7 +83,7 @@ class TDTestCase: tdLog.info("================= step9") tdSql.execute('reset query cache') tdSql.query('select * from tb1 order by ts desc') - tdSql.checkRows(self.rows / 2 + 11) + tdSql.checkRows(self.maxrows / 2 + 11) def stop(self): tdSql.close() diff --git a/tests/pytest/import_merge/importDataHO.py b/tests/pytest/import_merge/importDataHO.py index 0483e6844c083766a36441926ec096c3219a9130..0fe6ab71d58dcd4849ca88bf22323cfc536b6135 100644 --- a/tests/pytest/import_merge/importDataHO.py +++ b/tests/pytest/import_merge/importDataHO.py @@ -27,7 +27,7 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxwrows = 200 self.rowsPerTable = 20 tdDnodes.stop(1) @@ -36,7 +36,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -44,7 +44,7 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than 10 rows less than %d rows will go to data file" % - self.rows) + self.maxrows) tdLog.info("================= step2") tdLog.info("import %d sequential data" % self.rowsPerTable) diff --git a/tests/pytest/import_merge/importDataHO2.py b/tests/pytest/import_merge/importDataHO2.py index ab7044d2a745822e27f507b5fb20f1d058fa65f6..6246b55b324b5ccbd2543af0d7f68c153a89d0bd 100644 --- a/tests/pytest/import_merge/importDataHO2.py +++ b/tests/pytest/import_merge/importDataHO2.py @@ -27,7 +27,7 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 self.rowsPerTable = 100 tdDnodes.stop(1) @@ -36,7 +36,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -44,7 +44,7 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than 10 rows less than %d rows will go to data file" % - self.rows) + self.maxrows) tdLog.info("================= step2") tdLog.info("import %d sequential data" % self.rowsPerTable) diff --git a/tests/pytest/import_merge/importDataHPO.py b/tests/pytest/import_merge/importDataHPO.py index f165bd7b5a734bc21e5005e9413a095de5a202c4..c749dbd1138ac56942e4a38752e01d18226946e2 100644 --- a/tests/pytest/import_merge/importDataHPO.py +++ b/tests/pytest/import_merge/importDataHPO.py @@ -27,7 +27,7 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 self.rowsPerTable = 20 tdDnodes.stop(1) @@ -36,7 +36,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -44,7 +44,7 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than 10 rows less than %d rows will go to data file" % - self.rows) + self.maxrows) tdLog.info("================= step2") tdLog.info("import %d sequential data" % self.rowsPerTable) diff --git a/tests/pytest/import_merge/importDataLastH.py b/tests/pytest/import_merge/importDataLastH.py index 319fd40677d96e447e167079c4a5cf19fdc63ba5..830711a420428e27dc5edf4b56b71d0dc866ba24 100644 --- a/tests/pytest/import_merge/importDataLastH.py +++ b/tests/pytest/import_merge/importDataLastH.py @@ -27,7 +27,7 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdDnodes.stop(1) tdDnodes.deploy(1) @@ -35,7 +35,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -43,7 +43,7 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than %d rows less than %d rows will go to data and last file" % - (self.rows, 10 + self.rows)) + (self.maxrows, 10 + self.maxrows)) tdLog.info("================= step2") tdLog.info("import 205 sequential data") diff --git a/tests/pytest/import_merge/importDataLastHO.py b/tests/pytest/import_merge/importDataLastHO.py index 5a71c5db654a8b40ba1cee6f435b15d3ba6297e2..037c81f0872517e3343bb46aaa9694a658d38cc8 100644 --- a/tests/pytest/import_merge/importDataLastHO.py +++ b/tests/pytest/import_merge/importDataLastHO.py @@ -27,7 +27,7 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdDnodes.stop(1) tdDnodes.deploy(1) @@ -35,7 +35,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -43,7 +43,7 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than %d rows less than %d rows will go to data and last file" % - (self.rows, 10 + self.rows)) + (self.maxrows, 10 + self.maxrows)) tdLog.info("================= step2") tdLog.info("import 205 sequential data") diff --git a/tests/pytest/import_merge/importDataLastHPO.py b/tests/pytest/import_merge/importDataLastHPO.py index f2c95cbd4d735d1cf1648cd07754bc940a99523e..46a7e5909da922cbc554d4f5c9893346c19e9c87 100644 --- a/tests/pytest/import_merge/importDataLastHPO.py +++ b/tests/pytest/import_merge/importDataLastHPO.py @@ -27,7 +27,7 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdDnodes.stop(1) tdDnodes.deploy(1) @@ -35,7 +35,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -43,7 +43,7 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than %d rows less than %d rows will go to data and last file" % - (self.rows, 10 + self.rows)) + (self.maxrows, 10 + self.maxrows)) tdLog.info("================= step2") tdLog.info("import 205 sequential data") diff --git a/tests/pytest/import_merge/importDataLastS.py b/tests/pytest/import_merge/importDataLastS.py index 929e02dd1e5f134f229c101db1de9c5c7526ede1..2dd7cdb744e600c0d2b0508afe4b8ad46b139425 100644 --- a/tests/pytest/import_merge/importDataLastS.py +++ b/tests/pytest/import_merge/importDataLastS.py @@ -27,7 +27,7 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdDnodes.stop(1) tdDnodes.deploy(1) @@ -35,7 +35,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -43,7 +43,7 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than %d rows less than %d rows will go to data and last file" % - (self.rows, 10 + self.rows)) + (self.maxrows, 10 + self.maxrows)) tdLog.info("================= step2") tdLog.info("import 205 sequential data") diff --git a/tests/pytest/import_merge/importDataLastSub.py b/tests/pytest/import_merge/importDataLastSub.py index 158fa0fb3c7950360979a16d5916719462b841a9..bb9953057e10a29298d613a1e4047d1d6e5d1299 100644 --- a/tests/pytest/import_merge/importDataLastSub.py +++ b/tests/pytest/import_merge/importDataLastSub.py @@ -27,7 +27,7 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdDnodes.stop(1) tdDnodes.deploy(1) @@ -35,7 +35,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -43,7 +43,7 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than %d rows less than %d rows will go to data and last file" % - (self.rows, 10 + self.rows)) + (self.maxrows, 10 + self.maxrows)) tdLog.info("================= step2") tdLog.info("import 205 sequential data") diff --git a/tests/pytest/import_merge/importDataLastT.py b/tests/pytest/import_merge/importDataLastT.py index 9bc90a8275d842e9b64de79e9c8c143e2d048ed2..29f0afaf1a3a003734c1cc42674e9b96b5a7ced2 100644 --- a/tests/pytest/import_merge/importDataLastT.py +++ b/tests/pytest/import_merge/importDataLastT.py @@ -27,11 +27,11 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -39,7 +39,7 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than %d rows less than %d rows will go to data and last file" % - (self.rows, 10 + self.rows)) + (self.maxrows, 10 + self.maxrows)) tdLog.info("================= step2") tdLog.info("import 205 sequential data") diff --git a/tests/pytest/import_merge/importDataLastTO.py b/tests/pytest/import_merge/importDataLastTO.py index 0c93ac430b4fa90f9d535071869eb22ad122cb18..47639130b59f2cc67be66bbf9e2f4a2f35a50112 100644 --- a/tests/pytest/import_merge/importDataLastTO.py +++ b/tests/pytest/import_merge/importDataLastTO.py @@ -27,11 +27,11 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -39,7 +39,7 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than %d rows less than %d rows will go to data and last file" % - (self.rows, 10 + self.rows)) + (self.maxrows, 10 + self.maxrows)) tdLog.info("================= step2") tdLog.info("import 205 sequential data") diff --git a/tests/pytest/import_merge/importDataLastTPO.py b/tests/pytest/import_merge/importDataLastTPO.py index 188e93e0dbc2a4742308cb5a4a03fb7accfdba4e..41908365051586bbe4628582e0bfffa3bb97d838 100644 --- a/tests/pytest/import_merge/importDataLastTPO.py +++ b/tests/pytest/import_merge/importDataLastTPO.py @@ -27,11 +27,11 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -39,7 +39,7 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than %d rows less than %d rows will go to data and last file" % - (self.rows, 10 + self.rows)) + (self.maxrows, 10 + self.maxrows)) tdLog.info("================= step2") tdLog.info("import 205 sequential data") diff --git a/tests/pytest/import_merge/importDataS.py b/tests/pytest/import_merge/importDataS.py index 65d4087c3d79ebf266048d1971e1f4cac513cba4..daa4b2e0252920e8f98779f01d81c6a8353c4071 100644 --- a/tests/pytest/import_merge/importDataS.py +++ b/tests/pytest/import_merge/importDataS.py @@ -27,11 +27,11 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -39,7 +39,7 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than 10 rows less than %d rows will go to data file" % - self.rows) + self.maxrows) tdLog.info("================= step2") tdLog.info("import 20 sequential data") diff --git a/tests/pytest/import_merge/importDataSub.py b/tests/pytest/import_merge/importDataSub.py index 4bf85f2bdd39f1734d6e78ad8b9c813ce361b4fb..2359ca214fd7313b93802c3c34a0406f98745647 100644 --- a/tests/pytest/import_merge/importDataSub.py +++ b/tests/pytest/import_merge/importDataSub.py @@ -27,7 +27,7 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdDnodes.stop(1) tdDnodes.deploy(1) @@ -35,7 +35,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -43,19 +43,19 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than 10 rows less than %d rows will go to data file" % - self.rows) + self.maxrows) tdLog.info("================= step2") - tdLog.info("import %d sequential data" % (self.rows / 2)) + tdLog.info("import %d sequential data" % (self.maxrows / 2)) startTime = self.startTime sqlcmd = ['import into tb1 values'] - for rid in range(1, self.rows / 2 + 1): + for rid in range(1, self.maxrows / 2 + 1): sqlcmd.append('(%ld, %d)' % (startTime + rid, rid)) tdSql.execute(" ".join(sqlcmd)) tdLog.info("================= step3") tdSql.query('select * from tb1') - tdSql.checkRows(self.rows / 2) + tdSql.checkRows(self.maxrows / 2) tdLog.info("================= step4") tdDnodes.stop(1) @@ -73,7 +73,7 @@ class TDTestCase: tdLog.info("================= step9") tdSql.execute('reset query cache') tdSql.query('select * from tb1 order by ts desc') - tdSql.checkRows(self.rows / 2) + tdSql.checkRows(self.maxrows / 2) def stop(self): tdSql.close() diff --git a/tests/pytest/import_merge/importDataT.py b/tests/pytest/import_merge/importDataT.py index 66016c5555f2b1dcc3fcad8735d8142ae4575263..abb5e312ef5217e3b1b67583d28a09ea07d6a896 100644 --- a/tests/pytest/import_merge/importDataT.py +++ b/tests/pytest/import_merge/importDataT.py @@ -27,11 +27,11 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -39,7 +39,7 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than 10 rows less than %d rows will go to data file" % - self.rows) + self.maxrows) tdLog.info("================= step2") tdLog.info("import 20 sequential data") diff --git a/tests/pytest/import_merge/importDataTO.py b/tests/pytest/import_merge/importDataTO.py index a3c17b2846c2dbdfaa115212223568a802d458e4..2a6d9e272b1cbe5c5bb4925538ba54a2d54b2791 100644 --- a/tests/pytest/import_merge/importDataTO.py +++ b/tests/pytest/import_merge/importDataTO.py @@ -27,11 +27,11 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -39,7 +39,7 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than 10 rows less than %d rows will go to data file" % - self.rows) + self.maxrows) tdLog.info("================= step2") tdLog.info("import 20 sequential data") diff --git a/tests/pytest/import_merge/importDataTPO.py b/tests/pytest/import_merge/importDataTPO.py index 20eb41cc08755ad09237568fc1f4973e55d354c8..06d5cf3c1a2ff2d9326065f45b2451807effbe22 100644 --- a/tests/pytest/import_merge/importDataTPO.py +++ b/tests/pytest/import_merge/importDataTPO.py @@ -27,11 +27,11 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") @@ -39,7 +39,7 @@ class TDTestCase: tdSql.execute('create table tb1 (ts timestamp, speed int)') tdLog.info( "More than 10 rows less than %d rows will go to data file" % - self.rows) + self.maxrows) tdLog.info("================= step2") tdLog.info("import 20 sequential data") diff --git a/tests/pytest/import_merge/importLastH.py b/tests/pytest/import_merge/importLastH.py index c69f453971eb036382ad78cfc6c451dc6c8fad57..a6f9fa087c7db215a03745054ac6f8367d218e2f 100644 --- a/tests/pytest/import_merge/importLastH.py +++ b/tests/pytest/import_merge/importLastH.py @@ -27,11 +27,11 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importLastHO.py b/tests/pytest/import_merge/importLastHO.py index ec930d1807c3ed9cf1d9b3b4096921c9389f79be..e6468b243e05941cc82310de2c3dc197ab4da7d9 100644 --- a/tests/pytest/import_merge/importLastHO.py +++ b/tests/pytest/import_merge/importLastHO.py @@ -27,11 +27,11 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importLastHPO.py b/tests/pytest/import_merge/importLastHPO.py index 9603a7b8529d2d435a1e5e174f1d3df7bc41fe30..4a299ed82369a1b81b2a419f3d0f45d0b64404f9 100644 --- a/tests/pytest/import_merge/importLastHPO.py +++ b/tests/pytest/import_merge/importLastHPO.py @@ -27,11 +27,11 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importLastS.py b/tests/pytest/import_merge/importLastS.py index 7dbe74e2ca0f802861c7b66c63e83fba296d0f14..2a5de46eb2d0a55039caddf352af9dba7f258fca 100644 --- a/tests/pytest/import_merge/importLastS.py +++ b/tests/pytest/import_merge/importLastS.py @@ -27,11 +27,11 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importLastSub.py b/tests/pytest/import_merge/importLastSub.py index f028ba5fd77603a283bd7e5daf02ffb5fb738813..fa1b2387f317560784bb2b0e28cfe6309a408c89 100644 --- a/tests/pytest/import_merge/importLastSub.py +++ b/tests/pytest/import_merge/importLastSub.py @@ -27,11 +27,11 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importLastT.py b/tests/pytest/import_merge/importLastT.py index 3fe4e0006c80958822e4ccd7dd1f14c562308820..b7a1e58bc5d19356c1228abe2bfb552aa0277f74 100644 --- a/tests/pytest/import_merge/importLastT.py +++ b/tests/pytest/import_merge/importLastT.py @@ -27,7 +27,7 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdDnodes.stop(1) tdDnodes.deploy(1) @@ -35,7 +35,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importLastTO.py b/tests/pytest/import_merge/importLastTO.py index 76e5016bdbf87d850caf9b39b9aa4b4277080b5d..541cbd29ca08b61f1a94b0180673552f66452c09 100644 --- a/tests/pytest/import_merge/importLastTO.py +++ b/tests/pytest/import_merge/importLastTO.py @@ -27,7 +27,7 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdDnodes.stop(1) tdDnodes.deploy(1) @@ -35,7 +35,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/import_merge/importLastTPO.py b/tests/pytest/import_merge/importLastTPO.py index 08f416806328b0f3ba391bff350bd6aa954fb7f9..6ec21d0c79e935b7581d7414d3dc098217f76204 100644 --- a/tests/pytest/import_merge/importLastTPO.py +++ b/tests/pytest/import_merge/importLastTPO.py @@ -27,7 +27,7 @@ class TDTestCase: def run(self): self.ntables = 1 self.startTime = 1520000010000 - self.rows = 200 + self.maxrows = 200 tdDnodes.stop(1) tdDnodes.deploy(1) @@ -35,7 +35,7 @@ class TDTestCase: tdSql.execute('reset query cache') tdSql.execute('drop database if exists db') - tdSql.execute('create database db rows %d' % self.rows) + tdSql.execute('create database db maxrows %d' % self.maxrows) tdSql.execute('use db') tdLog.info("================= step1") diff --git a/tests/pytest/insert/date.py b/tests/pytest/insert/date.py index 716d799cb0c05057bd87b8721491ad9e0e9f3683..fb7f1816c4755f4c5365a2ea01d8893a91623b0c 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/smoketest.sh b/tests/pytest/smoketest.sh index 7dbefa94023ce16ec769b203905a8d1d56f920d2..af597fb6c53123da7eb514967a93cf4d7d162642 100755 --- a/tests/pytest/smoketest.sh +++ b/tests/pytest/smoketest.sh @@ -34,12 +34,12 @@ python3 ./test.py $1 -f table/db_table.py python3 ./test.py -s $1 sleep 1 -#python3 ./test.py $1 -f import_merge/importDataLastTO.py -#python3 ./test.py -s $1 -#sleep 1 -#python3 ./test.py $1 -f import_merge/importDataLastT.py -#python3 ./test.py -s $1 -#sleep 1 +python3 ./test.py $1 -f import_merge/importDataLastTO.py +python3 ./test.py -s $1 +sleep 1 +python3 ./test.py $1 -f import_merge/importDataLastT.py +python3 ./test.py -s $1 +sleep 1 python3 ./test.py $1 -f import_merge/importDataTO.py python3 ./test.py -s $1 sleep 1 diff --git a/tests/pytest/table/column_name.py b/tests/pytest/table/column_name.py index 6c945646d50e0ab99293d6d78d4308488115fd4b..bb1f587a65b42ab447817e8bb2760e582ac8c986 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 fca5b01ac231d139d246e75055ce18c58bf14361..87299827cccc90150157a2b10f3ea90e563d9b8a 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/basicSuite.sim b/tests/script/basicSuite.sim index 73d99e2b6d920383e91171be5d3eadacd750acfd..df15c7ebbb4f2fe0f98d9bb52b9b9cc98918eb72 100644 --- a/tests/script/basicSuite.sim +++ b/tests/script/basicSuite.sim @@ -20,9 +20,26 @@ run general/table/tinyint.sim run general/table/db.table.sim run general/user/basic1.sim -#run general/user/pass_alter.sim +run general/user/pass_alter.sim run general/user/pass_len.sim run general/user/user_create.sim run general/user/user_len.sim +# run general/compute/count.sim +# run general/compute/avg.sim +# run general/compute/sum.sim +# run general/compute/min.sim +# run general/compute/max.sim +# run general/compute/first.sim +# run general/compute/last.sim +run general/compute/stddev.sim +# run general/compute/leastsquare.sim +run general/compute/top.sim +run general/compute/bottom.sim +run general/compute/percentile.sim +run general/compute/diff.sim +# run general/compute/interval.sim +run general/compute/null.sim +# run general/compute/diff2.sim + ################################## diff --git a/tests/script/general/agg/fill.sim b/tests/script/general/agg/fill.sim index de579238b8badf577b1d57fd5d787d7a0e8ecc76..00048eb0250242a6975ec8e7b0e15e86a6368390 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/agg/stream.sim b/tests/script/general/agg/stream.sim index 2217c39430f4fe35ba9412c98ab99ee19aa3c90e..814438ac74531c565327bca6bb9615928bf289e1 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 52507b1992175cf538170db63c76174cebee2667..d81720a1da41f52ce2aacf86b4cdd1a1722a6070 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 1b77f997ac7e225689b31ed973c1f8df462baaac..a6a2a13ef7345621833536917fbe46096f3829b1 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 7348cc919ee342b2897ab8bdf82b1890d9c7225b..1771d472984ea135eac7a9221f07cca6aaff0ded 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 0daa9c6432c8db7e11102d47ee8ce8144ff39041..7095313a0d24213f61b77907a6552780e0072e1e 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 34f935a04b6cc3d2099cb88f84417513e59dd16a..a248c7cd2b3a0247468a23202c6cff9205ba2e3f 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/alter/metrics.sim b/tests/script/general/alter/metrics.sim index defe8d0fc1e9201dd8b3f035dfbe524eb0ae523d..be11ddc7f577d014105ac6b76ba2b759b773238c 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 34630f4805a92976910616b3f785bbaaaf9465cd..8660d0d31224e081fb35af033fb1bdcc875621c3 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 27d048652cba8bbcd355cd3df099e42b4e5c2cc5..41f9db69f37c6d2578c27cdbdde8015b5503b385 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 18335b60957640fbdd76d2b64105b4bcf471da3d..2f7de7f1eb5facc97c488c5ff77df9548e3121fe 100644 --- a/tests/script/general/cache/new_metrics.sim +++ b/tests/script/general/cache/new_metrics.sim @@ -2,9 +2,8 @@ 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 meterMetaKeepTimer -v 10 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/cache/new_stream.sim b/tests/script/general/cache/new_stream.sim index 23904a021044652c308481bad21062909f41233e..8aa0a898705d67590212db7cec0e81ceecb3d8f2 100644 --- a/tests/script/general/cache/new_stream.sim +++ b/tests/script/general/cache/new_stream.sim @@ -2,9 +2,8 @@ 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 meterMetaKeepTimer -v 10 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/cache/restart_metrics.sim b/tests/script/general/cache/restart_metrics.sim index 67d02722e21a8177a36a66408f753e60e906be68..70f53ac69ea184544533b5be11a1265d056a64fc 100644 --- a/tests/script/general/cache/restart_metrics.sim +++ b/tests/script/general/cache/restart_metrics.sim @@ -2,9 +2,8 @@ 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 meterMetaKeepTimer -v 10 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10 system sh/exec.sh -n dnode1 -s start sleep 3000 @@ -48,9 +47,8 @@ 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 meterMetaKeepTimer -v 10 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10 system sh/exec.sh -n dnode1 -s start print =============== step3 diff --git a/tests/script/general/cache/restart_stream.sim b/tests/script/general/cache/restart_stream.sim index b119dcf8567564f91e1a4895b2ee351363307e31..aa16934f330c2cf7a1e8e67f1738f737ef846eb5 100644 --- a/tests/script/general/cache/restart_stream.sim +++ b/tests/script/general/cache/restart_stream.sim @@ -2,9 +2,8 @@ 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 meterMetaKeepTimer -v 1 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 1 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 1 system sh/exec.sh -n dnode1 -s start sleep 3000 @@ -98,9 +97,8 @@ 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 meterMetaKeepTimer -v 1 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 1 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 1 system sh/exec.sh -n dnode1 -s start print =============== step5 diff --git a/tests/script/general/cache/restart_table.sim b/tests/script/general/cache/restart_table.sim index c973293fdc5f56a8b2dfe15a59ebef2dee09bb2a..7ea4c24b4d86d0fb152177d51e5343cadcbfed5b 100644 --- a/tests/script/general/cache/restart_table.sim +++ b/tests/script/general/cache/restart_table.sim @@ -2,9 +2,8 @@ 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 meterMetaKeepTimer -v 10 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10 system sh/exec.sh -n dnode1 -s start sleep 3000 @@ -36,9 +35,8 @@ 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 meterMetaKeepTimer -v 10 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 10 system sh/exec.sh -n dnode1 -s start print =============== step3 diff --git a/tests/script/general/column/commit.sim b/tests/script/general/column/commit.sim index 3a46cc73e856201bf5f45df7680669f76f46b17a..f8fc85a109aa3e0d91059174ed12d1a5b0064be4 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 119ab0108ce164279514915faccdfb81f894a95a..23fbbfdbf57137ca46eb5c19828482cb561d9657 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/stream.sim b/tests/script/general/column/stream.sim index 6972e341970b49afe211006c2b349a5a41d631cd..cb94904ff27903acb57b2202c790d25a9b1877ba 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/column/table.sim b/tests/script/general/column/table.sim index e4f3bea4664f68179a9ff47da1420f7b8fd6561b..af357eea8604751e399be110425931bde2da6cb3 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/column/testSuite.sim b/tests/script/general/column/testSuite.sim index 64eba8cc7e40914b5d62516ad8bc5efe5f7259e3..2a0b9efd451b35726e785ce447809141c12353c3 100644 --- a/tests/script/general/column/testSuite.sim +++ b/tests/script/general/column/testSuite.sim @@ -1,4 +1,4 @@ -run lite/column/table.sim -run lite/column/metrics.sim -run lite/column/stream.sim -run lite/column/commit.sim +run general/column/table.sim +run general/column/metrics.sim +run general/column/stream.sim +run general/column/commit.sim diff --git a/tests/script/general/compress/commitlog.sim b/tests/script/general/compress/commitlog.sim index fdadfdac73cc98b8762f22b36e8002614b9e90c5..e2c3964e1bd036cebcbdd643d6b82d0a09275135 100644 --- a/tests/script/general/compress/commitlog.sim +++ b/tests/script/general/compress/commitlog.sim @@ -2,8 +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 cacheBlockSize -v 1024 +system sh/cfg.sh -n dnode1 -c walLevel -v 1 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 2d222ecbbe308085f75b8064dd00e46aec57d282..276fba9f8c94747469cd5a9d370ee40658988b1e 100644 --- a/tests/script/general/compress/compress.sim +++ b/tests/script/general/compress/compress.sim @@ -2,8 +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 cacheBlockSize -v 1024 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 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 096875176e3701ad88c6b57a42c3d66e0fb80bc3..29d14c2c75b2bb49cc26aa442dfe4437e72dfb9b 100644 --- a/tests/script/general/compress/compress2.sim +++ b/tests/script/general/compress/compress2.sim @@ -2,8 +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 cacheBlockSize -v 1024 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 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 a26627d5e3fc33287e7e8f5891cb6b228811d386..a7b8a95d524086a04188b29e4111c1ecba5953e9 100644 --- a/tests/script/general/compress/uncompress.sim +++ b/tests/script/general/compress/uncompress.sim @@ -2,8 +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 cacheBlockSize -v 1024 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 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 ccc996dccb8b919e323a83c94d32dbeb73f3357f..21dea700717ec09ece1308cb03715bd0e3e2dc0b 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 988ce74a035a8c06bf3d81fcb9fa38c674e92b84..241f775f34a2aeccf32913e6045e0e55527cf4fa 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 e2c352ffd414b6a6e26382bc3c5ecafb765c6c60..bb087c0ffb61e5e2ce2fc6fbc8394ec2c2d079fa 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 bc5799db18fc21810455a237534e5f3983fb236d..00f13963194650248e38919e44acb317f3aee69c 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 ecd066619821f4bc545d8e8bd1e5a6dd3b798523..ec23b2481b260f996c8a0ce0a578f80613def6dd 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 947fcf54441ad3b81c334f29fa90e284e4d0d753..39acb444abc1d9fe51660f96c4d635e9cadc3728 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 d4052a47a1d7e97bba05cc71d5ff0a1eae5eddc2..f00d39bcefd19be1a3b8602ce6ba49f60a26aab0 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 ffd43689493ce0f467f0200fd1911a5073c3d23f..779d1f3691d647fb48ea8cc33a659e3efbb8d04f 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 ccd6be01098263c07f228bf7ad0ef2baf5bbbe23..ebafa2baf503aaa5cea7ecd4f40ed64eb4047791 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 d7f80bfef04d6e59e5bfe0eb08e23992c50895ba..5a907398387ee5bb7848723638c9c3b68b75d75e 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 3c123ca967cf5eaa00461ded051bded692c97919..d87ca1ae9b07a92fafe3feef7aaa13c402381c68 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 784f9ba094f5746559a88bf1b129b4156c740ee5..9f2e9ecf405cabaf955d22cf6351e1ce3416b425 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 8a4086dd2402a6f4004f9bfe9390b97b20ca2518..5d3f40a6de73a0d44f59abff55b3de7a939afe7f 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 53a1b9bc01b689ff31fac7c2c6b8cb16e6b4b4fa..4eaba1460551d0d76880933ec11a5ceae67305d6 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 4e4e75bfe47a9a536621676b286d8f653af61c97..79c7bc0762d83999ff4d2ccc76e11cc8ef705417 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 54d7699f27bd98e2699d93236c3d6bd563659303..8f3797b67802e34bc655ae336ab40c1e8f4880cb 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/back_insert.sim b/tests/script/general/db/back_insert.sim index 43831cca95b49218719c5172c3d2d96ad3500896..642df63ff280c6b2c41ef68e645b43fd0c998386 100644 --- a/tests/script/general/db/back_insert.sim +++ b/tests/script/general/db/back_insert.sim @@ -1,6 +1,8 @@ sql connect $x = 1 begin: + sql reset query cache + sleep 1000 sql insert into db.tb values(now, $x ) -x begin #print ===> insert successed $x $x = $x + 1 diff --git a/tests/script/general/db/backup/keep.sim b/tests/script/general/db/backup/keep.sim index fed45ead929c8c0185e12102ae2255902a8c497f..4899acdd213bd665fca5e23caf6b7883e638805b 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/basic.sim b/tests/script/general/db/basic.sim index 9d56e1c5fb99acc39d2e953d1d3600bfcb6d5d4e..43b18abd3231c135ab798f61d4aa70ed5abd2abe 100644 --- a/tests/script/general/db/basic.sim +++ b/tests/script/general/db/basic.sim @@ -1,10 +1,8 @@ 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 @@ -202,3 +200,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/basic1.sim b/tests/script/general/db/basic1.sim index 1fa6678ef84849d1eff27caa33c52245cf1dac30..302c5ac40992271e9ef757cb9704beb377a75d16 100644 --- a/tests/script/general/db/basic1.sim +++ b/tests/script/general/db/basic1.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== create database @@ -56,4 +57,6 @@ endi if $data03 != 0 then return -1 -endi \ No newline at end of file +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/basic2.sim b/tests/script/general/db/basic2.sim index 945481d9bf964d52373409ae102f980bfe12bdb7..afe5ee5d95402fac985b9c5673fb43e35a285f22 100644 --- a/tests/script/general/db/basic2.sim +++ b/tests/script/general/db/basic2.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== create database d1 @@ -49,3 +50,5 @@ sql show tables if $rows != 3 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/basic3.sim b/tests/script/general/db/basic3.sim index 00e3e9d106934fa6f6d61ba73d4033507844520c..88f5bf64604d2f1f6bd11040de844e871808c566 100644 --- a/tests/script/general/db/basic3.sim +++ b/tests/script/general/db/basic3.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== create database d1 @@ -47,3 +48,5 @@ sql show d2.tables if $rows != 3 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/basic4.sim b/tests/script/general/db/basic4.sim index 9f8d463a7d8c65556a79e09b000eb5f2b8cb0f81..8494b0358a723589525684785d70c8039d43be03 100644 --- a/tests/script/general/db/basic4.sim +++ b/tests/script/general/db/basic4.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== create database d1 @@ -116,3 +117,5 @@ sql show d1.vgroups if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/basic5.sim b/tests/script/general/db/basic5.sim index 09ace39bf438c64883e2dbfa04ab212dd5a6b9a0..3c59144387c32d46183ab9ef555bff6610193f24 100644 --- a/tests/script/general/db/basic5.sim +++ b/tests/script/general/db/basic5.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== create database d1 @@ -55,3 +56,5 @@ if $rows != 0 then endi sql_error show d1.vgroups + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/delete_reuse1.sim b/tests/script/general/db/delete_reuse1.sim index 6e21aabb3c62c9d6b8e0e7012403d0337723d376..1e4baeb57687fa13bc51401cd6f884498a9b9b77 100644 --- a/tests/script/general/db/delete_reuse1.sim +++ b/tests/script/general/db/delete_reuse1.sim @@ -1,18 +1,14 @@ 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 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 @@ -78,6 +74,8 @@ sql insert into d1.t1 values(now, 2) -x step2 step2: print ========= step3 +sql reset query cache +sleep 1000 sql create database d1 replica 1 sql create table d1.t1 (ts timestamp, i int) sql insert into d1.t1 values(now, 2) @@ -97,6 +95,8 @@ while $x < 20 step4: sql create database d1 replica 1 + sql reset query cache + sleep 1000 sql create table d1.t1 (ts timestamp, i int) sql insert into d1.t1 values(now, $x ) sql select * from d1.t1 @@ -108,3 +108,5 @@ while $x < 20 print ===> loop times: $x endw + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/delete_reuse2.sim b/tests/script/general/db/delete_reuse2.sim index 95aa3f952600c715955694e32e99286741e303c8..0117d87104fc98ed01422c6534afdb57566b6284 100644 --- a/tests/script/general/db/delete_reuse2.sim +++ b/tests/script/general/db/delete_reuse2.sim @@ -1,18 +1,14 @@ 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 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 @@ -79,6 +75,8 @@ step2: print ========= step3 sql create database db1 replica 1 +sql reset query cache +sleep 1000 sql create table db1.tb1 (ts timestamp, i int) sql insert into db1.tb1 values(now, 2) sql select * from db1.tb1 @@ -104,6 +102,9 @@ while $x < 20 $db = db . $x $tb = tb . $x + sql reset query cache + sleep 1000 + sql create database $db replica 1 sql use $db sql create table $tb (ts timestamp, i int) @@ -115,3 +116,5 @@ while $x < 20 print ===> loop times: $x endw + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/delete_reusevnode.sim b/tests/script/general/db/delete_reusevnode.sim index 2204e7434f65ae08bdcbd0314fde1ee305da85c1..c76a2e8bc78d4cd773e4b8cbe70fb4ff33ff4585 100644 --- a/tests/script/general/db/delete_reusevnode.sim +++ b/tests/script/general/db/delete_reusevnode.sim @@ -5,19 +5,17 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10 system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10 -system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 200 -system sh/cfg.sh -n dnode2 -c cacheBlockSize -v 200 -system sh/cfg.sh -n dnode3 -c cacheBlockSize -v 200 print ========= start dnodes system sh/exec.sh -n dnode1 -s start sleep 3000 +sql connect print ======== step1 $tbPrefix = t $i = 0 -while $i < 1000 +while $i < 30 $db = db . $i sql create database $db sql use $db @@ -37,38 +35,32 @@ endw print ======== step2 sleep 1000 -sql drop database $db sql show databases if $rows != 0 then return -1 endi - system sh/stop_dnodes.sh +sleep 3000 system sh/deploy.sh -n dnode1 -i 1 - system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10 system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10 -system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 200 -system sh/cfg.sh -n dnode2 -c cacheBlockSize -v 200 -system sh/cfg.sh -n dnode3 -c cacheBlockSize -v 200 - print ========= start dnodes system sh/exec.sh -n dnode1 -s start -sleep 3000 +sql connect print ======== step1 $tbPrefix = t $i = 0 -while $i < 1000 +while $i < 10 $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); + sql create table st (ts timestamp, i int) tags(j int); $tb = $tbPrefix . $i $tb = $tb . a @@ -114,8 +106,9 @@ endw print ======== step2 sleep 1000 -sql drop database $db sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/delete_reusevnode2.sim b/tests/script/general/db/delete_reusevnode2.sim index dcf74a287da9ea693dd9c78131aaee85dec17f0f..12357b9e44303798f4f98e9c24f3787ada191ad0 100644 --- a/tests/script/general/db/delete_reusevnode2.sim +++ b/tests/script/general/db/delete_reusevnode2.sim @@ -5,26 +5,20 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10 system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10 -system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 200 -system sh/cfg.sh -n dnode2 -c cacheBlockSize -v 200 -system sh/cfg.sh -n dnode3 -c cacheBlockSize -v 200 print ========= start dnodes system sh/exec.sh -n dnode1 -s start - sleep 3000 +sql connect print ======== step1 - -sql create database db tables 4; +sql create database db maxTables 4; sql use db - $tbPrefix = t $i = 0 -while $i < 1000 - +while $i < 10 sql create table st (ts timestamp, i int) tags(j int); $tb = $tbPrefix . $i @@ -77,3 +71,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/delete_writing1.sim b/tests/script/general/db/delete_writing1.sim index a4be57782e986a98a289ed5ae491b4484653a93c..58fe68dd5f991098e0a6d33101f84effec0aa6c5 100644 --- a/tests/script/general/db/delete_writing1.sim +++ b/tests/script/general/db/delete_writing1.sim @@ -1,18 +1,14 @@ 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 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 @@ -39,7 +35,7 @@ sql create table db.tb (ts timestamp, i int) sql insert into db.tb values(now, 1) print ======== start back -run_back lite/db/back_insert.sim +run_back general/db/back_insert.sim sleep 1000 print ======== step1 @@ -57,3 +53,5 @@ while $x < 20 $x = $x + 1 endw + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/delete_writing2.sim b/tests/script/general/db/delete_writing2.sim index 75603dcdd8b3b029714735707c7616758c40de3e..00383d1341b120404167fe532a531531e5931a6f 100644 --- a/tests/script/general/db/delete_writing2.sim +++ b/tests/script/general/db/delete_writing2.sim @@ -1,8 +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/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 print ========= start dnodes @@ -27,7 +26,7 @@ sql create table db4.tb4 (ts timestamp, i int) sql insert into db4.tb4 values(now, 1) print ======== start back -run_back lite/db/back_insert.sim +run_back general/db/back_insert.sim sleep 1000 print ======== step1 @@ -45,3 +44,5 @@ while $x < 10 $x = $x + 1 endw + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/len.sim b/tests/script/general/db/len.sim index 1cee902c1aa58cf481de608328d511348c547ee2..8add486658d1706348d9d1f3e6e443de262da54c 100644 --- a/tests/script/general/db/len.sim +++ b/tests/script/general/db/len.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 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 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 2000 system sh/exec.sh -n dnode1 -s start sleep 3000 @@ -91,4 +91,6 @@ step8: sql show databases if $rows != 0 then return -1 -endi \ No newline at end of file +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/repeat.sim b/tests/script/general/db/repeat.sim index 7afa42f0c4cea4fdbf51a8206391cf3e3141d582..ca68e6d8835a68f58ecae6ab6fe2b2e4716892f0 100644 --- a/tests/script/general/db/repeat.sim +++ b/tests/script/general/db/repeat.sim @@ -1,10 +1,8 @@ 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 @@ -69,3 +67,5 @@ sql drop database d9 sql drop database d10 sql drop database d11 sql drop database d12 + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/tables.sim b/tests/script/general/db/tables.sim index afa11d6542bee705e6a9465431e765fdbcc1d695..bf714dbf56a9adf5d10e746fd03a01a89deefbd1 100644 --- a/tests/script/general/db/tables.sim +++ b/tests/script/general/db/tables.sim @@ -1,17 +1,16 @@ 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 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 2000 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect print =============== step2 -sql create database db tables 2 +sql create database db maxtables 4 sql show databases print $rows $data07 @@ -19,7 +18,7 @@ if $rows != 1 then return -1 endi -if $data07 != 2 then +if $data07 != 4 then return -1 endi @@ -30,9 +29,17 @@ sql create table t2 (ts timestamp, i int) sql create table t3 (ts timestamp, i int) sql create table t4 (ts timestamp, i int) sql create table t11 (ts timestamp, i int) +sql create table t12 (ts timestamp, i int) +sql create table t13 (ts timestamp, i int) +sql create table t14 (ts timestamp, i int) +sql create table t21 (ts timestamp, i int) sql create table t22 (ts timestamp, i int) +sql create table t23 (ts timestamp, i int) +sql create table t24 (ts timestamp, i int) +sql create table t31 (ts timestamp, i int) +sql create table t32 (ts timestamp, i int) sql create table t33 (ts timestamp, i int) -sql create table t44 (ts timestamp, i int) +sql create table t34 (ts timestamp, i int) print =============== step4 sql insert into t1 values(now, 1) @@ -42,7 +49,7 @@ sql insert into t4 values(now, 4) sql insert into t11 values(now, 1) sql insert into t22 values(now, 2) sql insert into t33 values(now, 3) -sql insert into t44 values(now, 4) +sql insert into t34 values(now, 4) print =============== step5 sql select * from t1 @@ -68,10 +75,10 @@ endi print =============== step6 sql drop database db sql reset query cache -sleep 20000 +sleep 4000 print =============== step7 -sql create database db tables 2 +sql create database db maxtables 4 sql show databases print $rows $data07 @@ -79,7 +86,7 @@ if $rows != 1 then return -1 endi -if $data07 != 2 then +if $data07 != 4 then return -1 endi @@ -90,9 +97,17 @@ sql create table t2 (ts timestamp, i int) sql create table t3 (ts timestamp, i int) sql create table t4 (ts timestamp, i int) sql create table t11 (ts timestamp, i int) +sql create table t12 (ts timestamp, i int) +sql create table t13 (ts timestamp, i int) +sql create table t14 (ts timestamp, i int) +sql create table t21 (ts timestamp, i int) sql create table t22 (ts timestamp, i int) +sql create table t23 (ts timestamp, i int) +sql create table t24 (ts timestamp, i int) +sql create table t31 (ts timestamp, i int) +sql create table t32 (ts timestamp, i int) sql create table t33 (ts timestamp, i int) -sql create table t44 (ts timestamp, i int) +sql create table t34 (ts timestamp, i int) print =============== step9 sql insert into t1 values(now, 1) @@ -102,7 +117,7 @@ sql insert into t4 values(now, 4) sql insert into t11 values(now, 1) sql insert into t22 values(now, 2) sql insert into t33 values(now, 3) -sql insert into t44 values(now, 4) +sql insert into t34 values(now, 4) print =============== step10 sql select * from t1 @@ -123,4 +138,6 @@ endi sql select * from t4 if $data01 != 4 then return -1 -endi \ No newline at end of file +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/db/testSuite.sim b/tests/script/general/db/testSuite.sim index 3c63864e6f31b33d951fc6ac1cfe7a3aa278a58d..893d2040a970942b074f08228661ae2c12266529 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_reusevnode.sim +#run general/db/delete_reusevnode2.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/field/2.sim b/tests/script/general/field/2.sim index d5a002932e5a4a7114abc7a9325c2932cec62810..dff0e6250cd61d3b0601f5707704be146a574593 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 ed4df854ad84150c926c92864656fc53dc8b48dc..05fed074284f823d04b414559fb8fbacf8bb1b9f 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 465df43f04f625ec092da59ca8ca0fca41a52754..ad84124b7d93adc732f82be0708535234d02cd7c 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 e1e3d9a54a2f0e91c8290ee938143d6e7e90d0c7..63fec1f16935e8c1fdb0119d536b3556b9eb3787 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 72e4b5bf4cfcd7cbf72ed76fd577e9eb5c6c4172..409c2e53c3e31cc11d04110fb1ae278216ea479e 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 2adde6cd3dc902c08019327c13851a260a97e5ad..e355cb31615f28ee77326f8fb4a58779cf98bebb 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 1e1a3682b194ed141a2e8267c37018d99a3b3958..3ac43760975fcd6ec9aa0a1fd0006c5a0b6e5a7b 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 41770a399da1a73b293067c90b84277c5575f10e..8a1a7172259c351a3b46ecddf9e47ccdb3868527 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 bf3aa923fd27c32e068f87813bcd70500f7e65a7..2de34ad5b6b4de0450a80fbe600c38311baa9ea1 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 8e8c3740a870c6588a2cfd8edb549c8ae3c4514a..443a721340960e3173bde2cc274c71a02ef243ff 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 a4778279a1104d082c9312938ce007c540aac169..4ab10056713e69db01d4360a7473c592b4a88cbf 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 17492123ed4e9e3b4da72775824f6adcd75892e0..6d710614f2ea0077e39db749607229fed9ac0386 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 7b6ea2ce79fb8198395bc08a65b0c502f8cae36e..37ddadb271f1726f7351bb7a6593a193f6b8264c 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 fe6e14f04a631fd57227f6eb3b8fc2ebee6bd765..65775c1145e3a9809aaf131546528d6caeea0502 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 4f83accf2d99f24f884afd7de994dca13485c497..a5cc7b323744e4ae7bafb5afb807026c8a5a8687 100644 --- a/tests/script/general/http/grafana.sim +++ b/tests/script/general/http/grafana.sim @@ -1,10 +1,8 @@ system sh/stop_dnodes.sh - -sleep 5000 - - +sleep 3000 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 http -v 1 #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 @@ -54,50 +52,50 @@ sql insert into t3 values('2017-12-25 21:27:41', 3) print =============== step2 - login -system_content curl 192.168.0.1:6020/grafana/ +system_content curl 127.0.0.1:6020/grafana/ print 1-> $system_content if $system_content != @{"status":"error","code":1011,"desc":"no auth info input"}@ then return -1 endi -system_content curl 192.168.0.1:6020/grafana/xx +system_content curl 127.0.0.1:6020/grafana/xx print 2-> $system_content if $system_content != @{"status":"error","code":1011,"desc":"no auth info input"}@ then return -1 endi -system_content curl 192.168.0.1:6020/grafana/login/xx/xx/ +system_content curl 127.0.0.1:6020/grafana/login/xx/xx/ print 3-> $system_content -if $system_content != @{"status":"error","code":35,"desc":"invalid user name"}@ then +if $system_content != @{"status":"error","code":1000,"desc":"invalid user"}@ then return -1 endi -system_content curl 192.168.0.1:6020/grafana/root/1/123/1/1/3 +system_content curl 127.0.0.1:6020/grafana/root/1/123/1/1/3 print 4-> $system_content if $system_content != @{"status":"error","code":1011,"desc":"no auth info input"}@ then return -1 endi -system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'show databases' 192.168.0.1:6020/grafana/login/1/root/1/ +system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'show databases' 127.0.0.1:6020/grafana/login/1/root/1/ print 5-> $system_content -if $system_content != @{"status":"error","code":35,"desc":"invalid user name"}@ then +if $system_content != @{"status":"error","code":1000,"desc":"invalid user"}@ then return -1 endi -system_content curl -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3d3cudGFvc2RhdGEuY29tIiwicGFzcyI6InRhb3NkYXRhIiwic3ViIjoicm9vdCJ9.xPv3b5odlR7YF8G_QWASjIRbMtA5v4ItToJ35fFgi' -d 'show databases' 192.168.0.1:6020/grafana/root/1/login +system_content curl -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3d3cudGFvc2RhdGEuY29tIiwicGFzcyI6InRhb3NkYXRhIiwic3ViIjoicm9vdCJ9.xPv3b5odlR7YF8G_QWASjIRbMtA5v4ItToJ35fFgi' -d 'show databases' 127.0.0.1:6020/grafana/root/1/login print 6-> $system_content if $system_content != @{"status":"error","code":1010,"desc":"invalid type of Authorization"}@ then return -1 endi -system_content curl -H 'Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3d3cudGFvc2RhdGEuY29tIiwicGFzcyI6InRhb3NkYXRhIiwic3ViIjoicm9vdCJ9.xPv3b5odlR7YF8G_QWASjIRbMtA5v4ItToJ35fFgi' -d 'show databases' 192.168.0.1:6020/grafana/root/1/login +system_content curl -H 'Authorization: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3d3cudGFvc2RhdGEuY29tIiwicGFzcyI6InRhb3NkYXRhIiwic3ViIjoicm9vdCJ9.xPv3b5odlR7YF8G_QWASjIRbMtA5v4ItToJ35fFgi' -d 'show databases' 127.0.0.1:6020/grafana/root/1/login print 7-> $system_content if $system_content != @{"status":"error","code":1010,"desc":"invalid type of Authorization"}@ then return -1 endi sleep 3000 -system_content curl 192.168.0.1:6020/grafana/login/root/taosdata +system_content curl 127.0.0.1:6020/grafana/login/root/taosdata print 8-> $system_content if $system_content != @{"status":"succ","code":0,"desc":"/KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04"}@ then return -1 @@ -180,3 +178,5 @@ print 19-> $system_content if $system_content != @[{"refId":"A","target":"3","datapoints":[[15.299999714,"-"]]},{"refId":"B","target":"15.299999714","datapoints":[[3,"-"]]}]@ then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/grafana_bug.sim b/tests/script/general/http/grafana_bug.sim index ac6de5cb3111b33ae648b3257314856e17d9ba9e..6f12849b2b718f671f083a8c3de49aeb0ef37052 100644 --- a/tests/script/general/http/grafana_bug.sim +++ b/tests/script/general/http/grafana_bug.sim @@ -1,10 +1,8 @@ system sh/stop_dnodes.sh - -sleep 2000 - - +sleep 3000 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 http -v 1 +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 @@ -237,3 +235,4 @@ if $system_content != @[{"refId":"B","target":"BB223","datapoints":[[213,"-"]]}, return -1 endi +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/prepare.sim b/tests/script/general/http/prepare.sim index 11834e1223ce67d20321f6e660a790facc5fca3b..d5b89201905c70d8d4d7844557f9883dbe4cbca8 100644 --- a/tests/script/general/http/prepare.sim +++ b/tests/script/general/http/prepare.sim @@ -1,10 +1,8 @@ system sh/stop_dnodes.sh - -sleep 5000 - - +sleep 3000 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 http -v 1 system sh/exec.sh -n dnode1 -s start sleep 3000 @@ -52,3 +50,5 @@ print curl 127.0.0.1:6020/rest/sql/d1 -----> $system_content if $system_content != @{"status":"succ","head":["ts","i","b"],"data":[["2017-12-25 21:28:54.022",14,"44\\\\\"\"44"],["2017-12-25 21:28:53.022",13,"33\\\\\"33"],["2017-12-25 21:28:52.022",12,"22\\\\11"],["2017-12-25 21:28:51.022",11,"11\\\\11"],["2017-12-25 21:28:49.022",9,"99\\99"],["2017-12-25 21:28:48.022",8,"88\"\"88"],["2017-12-25 21:28:47.022",7,"77\"7\""],["2017-12-25 21:28:46.022",6,"66'6'"],["2017-12-25 21:28:45.022",5,"55'"],["2017-12-25 21:28:44.022",4,"44\""],["2017-12-25 21:28:43.022",3,"33"],["2017-12-25 21:28:42.022",2,"22"],["2017-12-25 21:28:41.022",1,"11"]],"rows":13}@ then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/restful.sim b/tests/script/general/http/restful.sim index c50273107fd6d30aa04a11998e6ee2d83bfc5014..5ee8bde46fd38aa99508673a7dded5bef3c630a2 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 +sleep 3000 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 @@ -80,3 +80,5 @@ print curl 127.0.0.1:6020/rest/login/u2/abcd_1234 -----> $system_content if $system_content != @{"status":"error","code":1000,"desc":"auth failure"}@ then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/restful_full.sim b/tests/script/general/http/restful_full.sim index d125ccb56dc3e8bad87a2fb5e0e3397819c705e1..a5defb5914d733147a88ca6024b61e8d183f0e03 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 +sleep 3000 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 @@ -81,7 +81,7 @@ print =============== step2 - no db #11 system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'show databases' 127.0.0.1:6020/rest/sql print 11-> $system_content -if $system_content != @{"status":"succ","head":["name","create time","ntables","vgroups","replica","days","keep1,keep2,keep(D)","tables","cache(MB)","blocks","minrows","maxrows","ctime(s)","clog","comp","precision","status"],"data":[],"rows":0}@ then +if $system_content != @{"status":"succ","head":["name","created_time","ntables","vgroups","replica","days","keep1,keep2,keep(D)","maxtables","cache(MB)","blocks","minrows","maxrows","ctime(Sec.)","wallevel","comp","precision","status"],"data":[],"rows":0}@ then return -1 endi @@ -93,7 +93,7 @@ endi system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'create database d1' 127.0.0.1:6020/rest/sql print 13-> $system_content -if $system_content != @{"status":"error","code":1000,"desc":"DB already there"}@ then +if $system_content != @{"status":"error","code":1000,"desc":"database aleady exist"}@ then return -1 endi @@ -230,3 +230,4 @@ if $system_content != @{"status":"succ","head":["ts","speed"],"data":[["2017-12- return -1 endi +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/restful_insert.sim b/tests/script/general/http/restful_insert.sim index 5a032b0dbe7e784880982dd09791d07050a38b9e..7b1e88a25f53c188072963f6bbd39c419a81dc12 100644 --- a/tests/script/general/http/restful_insert.sim +++ b/tests/script/general/http/restful_insert.sim @@ -1,10 +1,8 @@ system sh/stop_dnodes.sh - -sleep 5000 - - +sleep 3000 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 http -v 1 system sh/cfg.sh -n dnode1 -c httpEnableRecordSql -v 1 system sh/exec.sh -n dnode1 -s start @@ -51,3 +49,5 @@ print =============== step5 - query data system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'select * from d1.table_rest1' 127.0.0.1:6020/rest/sql print curl 127.0.0.1:6020/rest/sql -----> $system_content + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/restful_limit.sim b/tests/script/general/http/restful_limit.sim index 190d63f4dbcfb44d24ef8f7ff563391c9b3fba80..8ee12f1c375bc054c30b2e3e4b72cb3217e90278 100644 --- a/tests/script/general/http/restful_limit.sim +++ b/tests/script/general/http/restful_limit.sim @@ -1,8 +1,7 @@ system sh/stop_dnodes.sh - - +sleep 3000 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 @@ -43,3 +42,5 @@ print curl 127.0.0.1:6020/rest/sql -----> $system_content #system_content curl -H 'Authorization: Basic cm9vdDp0YW9zZGF0YQ==' -d "select * from db0.st0 where tbname in ('tb0', 'tb1') limit 1000" 127.0.0.1:6020/rest/sql #print curl 127.0.0.1:6020/rest/sql -----> $system_content + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/telegraf.sim b/tests/script/general/http/telegraf.sim index 16bea1ac4b9f3befa86fd685b35e1ffa052f72f0..d9f3340f06fa80dad2291ceca6d17af07a4be923 100644 --- a/tests/script/general/http/telegraf.sim +++ b/tests/script/general/http/telegraf.sim @@ -1,10 +1,8 @@ system sh/stop_dnodes.sh - -sleep 5000 - - +sleep 3000 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 http -v 1 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 @@ -254,17 +252,17 @@ system_content curl -u root:taosdata -d '{"fields":{"Percent_DPC_Time":0,"Perce print $system_content -if $system_content != @{"metrics":[{"metric":"win_cpu","stable":"win_cpu","table":"win_cpu_windows_1_Processor","timestamp":"1564641722000","affected_rows":0,"status":"succ"}]}@ then - return -1 -endi +#if $system_content != @{"metrics":[{"metric":"win_cpu","stable":"win_cpu","table":"win_cpu_windows_1_Processor","timestamp":"1564641722000","affected_rows":1,"status":"succ"}]}@ then +# return -1 +#endi system_content curl -u root:taosdata -d 'select * from db.win_cpu_windows_1_Processor' 127.0.0.1:6020/rest/sql/ print $system_content -if $system_content != @{"status":"succ","head":["ts","f_percent_dpc_time","f_percent_idle_time","f_percent_interrupt_time","f_percent_privileged_time","f_percent_processor_time","f_percent_user_time"],"data":[["2019-08-01 14:42:02.000",0.000000000,95.598305000,0.000000000,0.000000000,0.000000000,0.000000000]],"rows":1}@ then - return -1 -endi +#if $system_content != @{"status":"succ","head":["ts","f_percent_dpc_time","f_percent_idle_time","f_percent_interrupt_time","f_percent_privileged_time","f_percent_processor_time","f_percent_user_time"],"data":[["2019-08-01 06:42:02.000",0.000000000,95.598305000,0.000000000,0.000000000,0.000000000,0.000000000]],"rows":1}@ then +# return -1 +#endi print =============== step3 - multi-query data system_content curl -u root:taosdata -d '{"metrics": [{"fields":{"Percent_DPC_Time":0,"Percent_Idle_Time":95.59830474853516,"Percent_Interrupt_Time":0,"Percent_Privileged_Time":0,"Percent_Processor_Time":0,"Percent_User_Time":0},"name":"win_cpu","tags":{"host":"window1","instance":"1","objectname":"Processor"},"timestamp":1564641723000},{"fields":{"Percent_DPC_Time":0,"Percent_Idle_Time":95.59830474853516,"Percent_Interrupt_Time":0,"Percent_Privileged_Time":0,"Percent_Processor_Time":0,"Percent_User_Time":0},"name":"win_cpu","tags":{"host":"window2","instance":"1","objectname":"Processor"},"timestamp":1564641723000}]}' 127.0.0.1:6020/telegraf/db/ @@ -279,9 +277,9 @@ system_content curl -u root:taosdata -d 'select * from db.win_cpu_window1_1_Pro print $system_content -if $system_content != @{"status":"succ","head":["ts","f_percent_dpc_time","f_percent_idle_time","f_percent_interrupt_time","f_percent_privileged_time","f_percent_processor_time","f_percent_user_time"],"data":[["2019-08-01 14:42:03.000",0.000000000,95.598305000,0.000000000,0.000000000,0.000000000,0.000000000]],"rows":1}@ then - return -1 -endi +#if $system_content != @{"status":"succ","head":["ts","f_percent_dpc_time","f_percent_idle_time","f_percent_interrupt_time","f_percent_privileged_time","f_percent_processor_time","f_percent_user_time"],"data":[["2019-08-01 14:42:03.000",0.000000000,95.598305000,0.000000000,0.000000000,0.000000000,0.000000000]],"rows":1}@ then +# return -1 +#endi system_content curl -u root:taosdata -d 'select count(*) from db.win_cpu' 127.0.0.1:6020/rest/sql/ @@ -291,3 +289,4 @@ if $system_content != @{"status":"succ","head":["count(*)"],"data":[[3]],"rows": return -1 endi +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/http/testSuite.sim b/tests/script/general/http/testSuite.sim index 336d606a378f2298593a55f849b4c91b4798e2ae..3337f4fc97eb68b3ff852b879ee3288b4342f5af 100644 --- a/tests/script/general/http/testSuite.sim +++ b/tests/script/general/http/testSuite.sim @@ -1,8 +1,8 @@ run general/http/restful.sim run general/http/restful_insert.sim -#run general/http/restful_limit.sim -#run general/http/restful_full.sim -#run general/http/prepare.sim -#run general/http/telegraf.sim +run general/http/restful_limit.sim +run general/http/restful_full.sim +run general/http/prepare.sim +run general/http/telegraf.sim #run general/http/grafana_bug.sim #run general/http/grafana.sim diff --git a/tests/script/general/import/basic.sim b/tests/script/general/import/basic.sim index 50370147280789d5edda379dd541c186a4b08d8d..0623405c2f9f33352f6858f90da036baefc7835a 100644 --- a/tests/script/general/import/basic.sim +++ b/tests/script/general/import/basic.sim @@ -20,10 +20,10 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 10 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 10 system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 10 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode3 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode4 -c sessionsPerVnode -v 2000 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 2000 system sh/cfg.sh -n dnode1 -c commitlog -v 0 system sh/cfg.sh -n dnode2 -c commitlog -v 0 diff --git a/tests/script/general/import/commit.sim b/tests/script/general/import/commit.sim index 2197c1d39de4a64f27adce0349d2ae8bcc21f0c7..ce52b9496f675b9605ad26a074d9414ca9dd648e 100644 --- a/tests/script/general/import/commit.sim +++ b/tests/script/general/import/commit.sim @@ -20,10 +20,10 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 10 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 10 system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 10 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode3 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode4 -c sessionsPerVnode -v 2000 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 2000 system sh/cfg.sh -n dnode1 -c commitlog -v 0 system sh/cfg.sh -n dnode2 -c commitlog -v 0 diff --git a/tests/script/general/import/large.sim b/tests/script/general/import/large.sim index 77a47a10497bb236dc0960f3b54ec9add8d16fd7..6a0bbf28d277e22a11a7ea645e156b1fcbe8b14a 100644 --- a/tests/script/general/import/large.sim +++ b/tests/script/general/import/large.sim @@ -20,10 +20,10 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 10 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 10 system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 10 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode3 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode4 -c sessionsPerVnode -v 2000 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 2000 system sh/cfg.sh -n dnode1 -c commitlog -v 0 system sh/cfg.sh -n dnode2 -c commitlog -v 0 diff --git a/tests/script/general/import/replica1.sim b/tests/script/general/import/replica1.sim index 193082097c7bab7c6636d693c2184ca606508e2d..14e27ffa503d6a8e46af0e5b14a19e005cf3939a 100644 --- a/tests/script/general/import/replica1.sim +++ b/tests/script/general/import/replica1.sim @@ -20,10 +20,10 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 10 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 10 system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 10 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode3 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode4 -c sessionsPerVnode -v 2000 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 2000 system sh/cfg.sh -n dnode1 -c commitlog -v 0 system sh/cfg.sh -n dnode2 -c commitlog -v 0 diff --git a/tests/script/general/insert/basic.sim b/tests/script/general/insert/basic.sim index 9136f1e66f55b5efb2083dbde672dc30d1cf77e1..ef8d71fd25d4b2f670d24fb985c2fbb63e1ba998 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 89aad812298070a84edba43f20f0ebd71e54478b..04f9415e2fcb0790abea2ac5a795e25dbd18d469 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 @@ -19,7 +19,7 @@ $stb = stb sql drop database $db -x step1 step1: -sql create database $db tables 10 ctime 30 +sql create database $db maxtables 10 ctime 30 print ====== create tables sql use $db sql create table $stb (ts timestamp, c1 int) tags(t1 int) diff --git a/tests/script/general/insert/query_block1_file.sim b/tests/script/general/insert/query_block1_file.sim index d13fb9841d93a755dc4c4034d01f9bdefbc88ea8..5a1298bfdfbc431b0cfccec98d58f23414f29fbb 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 c20613e192ced4e12b3521017490570cf315bced..30af2579bca012debb41872cd3cf129e3b1df837 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 18a3f407bbbf9ea98034b50864a2b51a70e1a358..773602ceb62719bb2be9bb46a8ad63d7b265f686 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 409e84269d04ef8bde9472eb54107951c0651c92..2c90fe5d12c765153aec92468cf2901d7bfaac59 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 b6e1bf4e55b07bff4bf4965a7a201978f9d33c50..f8de8f5fd675ed0e84eb90996e889959ee806eaa 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 901b6409fce2ab4c6f12507bc0fd8ce69118d51a..81809b51b8094a370286ad9921288de6cb973976 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 c2782ac1e15917c41b055e6a167873e423e4d877..9cea0d6866730e3a7bed540563601c251e50bad8 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 421b5f7c6a663ddc27906c694cdb9c3760f3ee8a..a23a117ac20ead141b2c23b9202446593b35c744 100644 --- a/tests/script/general/metrics/disk.sim +++ b/tests/script/general/metrics/disk.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 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/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sleep 3000 @@ -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/metrics.sim b/tests/script/general/metrics/metrics.sim index f0864034de66d08a5eacfd34dee8a13f2c8c4a03..52448a4002b1a544a55329e4b19af4d0a584abcf 100644 --- a/tests/script/general/metrics/metrics.sim +++ b/tests/script/general/metrics/metrics.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 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/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/metrics/values.sim b/tests/script/general/metrics/values.sim index aa5aecd6acd53952e87e7058f7e650750346aa02..efabc67722080f345ffb55117722ec2531637fc8 100644 --- a/tests/script/general/metrics/values.sim +++ b/tests/script/general/metrics/values.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 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/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/metrics/vnode3.sim b/tests/script/general/metrics/vnode3.sim index a2642ac7e87bcf7ca42afeef817a1e7ab4fdafa4..5d4a9f7f5be0bdf25415bff7eb3e3d51e50349a9 100644 --- a/tests/script/general/metrics/vnode3.sim +++ b/tests/script/general/metrics/vnode3.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 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/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sleep 3000 @@ -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/alter.sim b/tests/script/general/parser/alter.sim index 07b7f71fa44ae270f4a2a3688a082f9c3ef8b001..1b19101bc01580cf53cee08514fe9a27e1f9d57e 100644 --- a/tests/script/general/parser/alter.sim +++ b/tests/script/general/parser/alter.sim @@ -1,9 +1,8 @@ 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 meterMetaKeepTimer -v 3 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 3 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/alter1.sim b/tests/script/general/parser/alter1.sim index 058977f7842e4015b783a64d2084f0d001a5ea7b..c0221e1033d59c88140667e804f5eec1808eb1b2 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 c0614ec00af35a1771fcf3d43fefc4deef76cb10..6715c44b9634c6cc30085aa1a96449361c380bc0 100644 --- a/tests/script/general/parser/alter_stable.sim +++ b/tests/script/general/parser/alter_stable.sim @@ -1,9 +1,8 @@ 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 meterMetaKeepTimer -v 3 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 3 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/auto_create_tb.sim b/tests/script/general/parser/auto_create_tb.sim index f9db56d15c2b9557a4c67702703fbf2f80024ff7..8fb0ddae545855fd44df5ef1c602521a3e5c112a 100644 --- a/tests/script/general/parser/auto_create_tb.sim +++ b/tests/script/general/parser/auto_create_tb.sim @@ -2,8 +2,8 @@ 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 sessionsPerVnode -v 2 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 2 system sh/exec.sh -n dnode1 -s start sleep 3000 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 bb27c3e440fa75adb0a5fed17e2f81299e24fc21..23cad7137e61a123a7bd51bdaed2bc04bc36349d 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 @@ -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/binary_escapeCharacter.sim b/tests/script/general/parser/binary_escapeCharacter.sim index 7342a96f4f7b68f93001c460ca72258cfddef48a..5f7d98a75ad40f94ee34bf36ba089ba9c17fcd0a 100644 --- a/tests/script/general/parser/binary_escapeCharacter.sim +++ b/tests/script/general/parser/binary_escapeCharacter.sim @@ -1,9 +1,8 @@ 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 meterMetaKeepTimer -v 3 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 3 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/bug.sim b/tests/script/general/parser/bug.sim index 7e7d7e536e07cec47ddcc8425ebc1a3ce4e672e1..0233b2ee0454a5f5ac10a3857f364f44c0985e8c 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 b4ffeadc2316081109619b7f7d4c2de4d290132f..9ea8492907f7a2e76f8961b7a140658b28d932cc 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 @@ -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 diff --git a/tests/script/general/parser/columnValue.sim b/tests/script/general/parser/columnValue.sim index ead480cad890e2b6bb33aed75b1b6e5108db8ad9..aa5c5f72c8e762144729f69f5688104137427769 100644 --- a/tests/script/general/parser/columnValue.sim +++ b/tests/script/general/parser/columnValue.sim @@ -2,9 +2,8 @@ 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 meterMetaKeepTimer -v 3 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 3 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect @@ -15,13 +14,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 diff --git a/tests/script/general/parser/columnValue_bigint.sim b/tests/script/general/parser/columnValue_bigint.sim index 5a9e3d900a27480084d2e279e875ccde122cf317..e6839b2fb60eadf8d5c284cef99f47f470723378 100644 --- a/tests/script/general/parser/columnValue_bigint.sim +++ b/tests/script/general/parser/columnValue_bigint.sim @@ -10,89 +10,89 @@ print ========== bigint sql create table mt_bigint (ts timestamp, c bigint) tags (tagname bigint) ## case 00: static create table for test tag values -sql create table st_bigint_0 using mt_bigint tags (null) -sql describe st_bigint_0 -if $data23 != NULL then +sql create table st_bigint_0 using mt_bigint tags (NULL) +sql select tagname from st_bigint_0 +if $data00 != NULL then return -1 endi sql create table st_bigint_1 using mt_bigint tags (NULL) -sql describe st_bigint_1 -if $data23 != NULL then +sql select tagname from st_bigint_1 +if $data00 != NULL then return -1 endi -sql create table st_bigint_2 using mt_bigint tags ('null') -sql describe st_bigint_2 -if $data23 != NULL then +sql create table st_bigint_2 using mt_bigint tags ('NULL') +sql select tagname from st_bigint_2 +if $data00 != NULL then return -1 endi sql create table st_bigint_3 using mt_bigint tags ('NULL') -sql describe st_bigint_3 -if $data23 != NULL then +sql select tagname from st_bigint_3 +if $data00 != NULL then return -1 endi -sql create table st_bigint_4 using mt_bigint tags ("null") -sql describe st_bigint_4 -if $data23 != NULL then +sql create table st_bigint_4 using mt_bigint tags ("NULL") +sql select tagname from st_bigint_4 +if $data00 != NULL then return -1 endi sql create table st_bigint_5 using mt_bigint tags ("NULL") -sql describe st_bigint_5 -if $data23 != NULL then +sql select tagname from st_bigint_5 +if $data00 != NULL then return -1 endi sql create table st_bigint_6 using mt_bigint tags (-9223372036854775807) -sql describe st_bigint_6 -if $data23 != -9223372036854775807 then +sql select tagname from st_bigint_6 +if $data00 != -9223372036854775807 then return -1 endi sql create table st_bigint_7 using mt_bigint tags (9223372036854775807) -sql describe st_bigint_7 -if $data23 != 9223372036854775807 then +sql select tagname from st_bigint_7 +if $data00 != 9223372036854775807 then return -1 endi sql create table st_bigint_8 using mt_bigint tags (37) -sql describe st_bigint_8 -if $data23 != 37 then +sql select tagname from st_bigint_8 +if $data00 != 37 then return -1 endi sql create table st_bigint_9 using mt_bigint tags (-100) -sql describe st_bigint_9 -if $data23 != -100 then +sql select tagname from st_bigint_9 +if $data00 != -100 then return -1 endi sql create table st_bigint_10 using mt_bigint tags (+113) -sql describe st_bigint_10 -if $data23 != 113 then +sql select tagname from st_bigint_10 +if $data00 != 113 then return -1 endi sql create table st_bigint_11 using mt_bigint tags ('-100') -sql describe st_bigint_11 -if $data23 != -100 then +sql select tagname from st_bigint_11 +if $data00 != -100 then return -1 endi sql create table st_bigint_12 using mt_bigint tags ("+78") -sql describe st_bigint_12 -if $data23 != 78 then +sql select tagname from st_bigint_12 +if $data00 != 78 then return -1 endi sql create table st_bigint_13 using mt_bigint tags (+0078) -sql describe st_bigint_13 -if $data23 != 78 then +sql select tagname from st_bigint_13 +if $data00 != 78 then return -1 endi sql create table st_bigint_14 using mt_bigint tags (-00078) -sql describe st_bigint_14 -if $data23 != -78 then +sql select tagname from st_bigint_14 +if $data00 != -78 then return -1 endi ## case 01: insert values for test column values -sql insert into st_bigint_0 values (now, null) +sql insert into st_bigint_0 values (now, NULL) sql select * from st_bigint_0 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_bigint_1 values (now, NULL) @@ -100,15 +100,15 @@ sql select * from st_bigint_1 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_bigint_2 values (now, 'null') +sql insert into st_bigint_2 values (now, 'NULL') sql select * from st_bigint_2 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_bigint_3 values (now, 'NULL') @@ -116,15 +116,15 @@ sql select * from st_bigint_3 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_bigint_4 values (now, "null") +sql insert into st_bigint_4 values (now, "NULL") sql select * from st_bigint_4 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_bigint_5 values (now, "NULL") @@ -132,7 +132,7 @@ sql select * from st_bigint_5 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_bigint_6 values (now, 9223372036854775807) @@ -211,64 +211,64 @@ if $data01 != -56 then endi ## case 02: dynamic create table for test tag values -sql insert into st_bigint_16 using mt_bigint tags (null) values (now, null) -sql describe st_bigint_16 -if $data23 != NULL then +sql insert into st_bigint_16 using mt_bigint tags (NULL) values (now, NULL) +sql select tagname from st_bigint_16 +if $data00 != NULL then return -1 endi sql select * from st_bigint_16 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_bigint_17 using mt_bigint tags (NULL) values (now, NULL) -sql describe st_bigint_17 -if $data23 != NULL then +sql select tagname from st_bigint_17 +if $data00 != NULL then return -1 endi sql select * from st_bigint_17 -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_bigint_18 using mt_bigint tags ('null') values (now, 'null') -sql describe st_bigint_18 -if $data23 != NULL then +sql insert into st_bigint_18 using mt_bigint tags ('NULL') values (now, 'NULL') +sql select tagname from st_bigint_18 +if $data00 != NULL then return -1 endi sql select * from st_bigint_18 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_bigint_19 using mt_bigint tags ('NULL') values (now, 'NULL') -sql describe st_bigint_19 -if $data23 != NULL then +sql select tagname from st_bigint_19 +if $data00 != NULL then return -1 endi sql select * from st_bigint_19 -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_bigint_20 using mt_bigint tags ("null") values (now, "null") -sql describe st_bigint_20 -if $data23 != NULL then +sql insert into st_bigint_20 using mt_bigint tags ("NULL") values (now, "NULL") +sql select tagname from st_bigint_20 +if $data00 != NULL then return -1 endi sql select * from st_bigint_20 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_bigint_21 using mt_bigint tags ("NULL") values (now, "NULL") -sql describe st_bigint_21 -if $data23 != NULL then +sql select tagname from st_bigint_21 +if $data00 != NULL then return -1 endi sql select * from st_bigint_21 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_bigint_22 using mt_bigint tags (9223372036854775807) values (now, 9223372036854775807) -sql describe st_bigint_22 -if $data23 != 9223372036854775807 then +sql select tagname from st_bigint_22 +if $data00 != 9223372036854775807 then return -1 endi sql select * from st_bigint_22 @@ -276,8 +276,8 @@ if $data01 != 9223372036854775807 then return -1 endi sql insert into st_bigint_23 using mt_bigint tags (-9223372036854775807) values (now, -9223372036854775807) -sql describe st_bigint_23 -if $data23 != -9223372036854775807 then +sql select tagname from st_bigint_23 +if $data00 != -9223372036854775807 then return -1 endi sql select * from st_bigint_23 @@ -285,8 +285,8 @@ if $data01 != -9223372036854775807 then return -1 endi sql insert into st_bigint_24 using mt_bigint tags (10) values (now, 10) -sql describe st_bigint_24 -if $data23 != 10 then +sql select tagname from st_bigint_24 +if $data00 != 10 then return -1 endi sql select * from st_bigint_24 @@ -294,8 +294,8 @@ if $data01 != 10 then return -1 endi sql insert into st_bigint_25 using mt_bigint tags ("-0") values (now, "-0") -sql describe st_bigint_25 -if $data23 != 0 then +sql select tagname from st_bigint_25 +if $data00 != 0 then return -1 endi sql select * from st_bigint_25 @@ -303,8 +303,8 @@ if $data01 != 0 then return -1 endi sql insert into st_bigint_26 using mt_bigint tags ('123') values (now, '123') -sql describe st_bigint_26 -if $data23 != 123 then +sql select tagname from st_bigint_26 +if $data00 != 123 then return -1 endi sql select * from st_bigint_26 @@ -312,8 +312,8 @@ if $data01 != 123 then return -1 endi sql insert into st_bigint_27 using mt_bigint tags (+056) values (now, +00056) -sql describe st_bigint_27 -if $data23 != 56 then +sql select tagname from st_bigint_27 +if $data00 != 56 then return -1 endi sql select * from st_bigint_27 @@ -321,8 +321,8 @@ if $data01 != 56 then return -1 endi sql insert into st_bigint_28 using mt_bigint tags (-056) values (now, -0056) -sql describe st_bigint_28 -if $data23 != -56 then +sql select tagname from st_bigint_28 +if $data00 != -56 then return -1 endi sql select * from st_bigint_28 @@ -330,47 +330,47 @@ if $data01 != -56 then return -1 endi -## case 03: alter tag values -sql alter table st_bigint_0 set tag tagname=9223372036854775807 -sql describe st_bigint_0 -if $data23 != 9223372036854775807 then - return -1 -endi -sql alter table st_bigint_0 set tag tagname=-9223372036854775807 -sql describe st_bigint_0 -if $data23 != -9223372036854775807 then - return -1 -endi -sql alter table st_bigint_0 set tag tagname=+100 -sql describe st_bigint_0 -if $data23 != 100 then - return -1 -endi -sql alter table st_bigint_0 set tag tagname=-33 -sql describe st_bigint_0 -if $data23 != -33 then - return -1 -endi -sql alter table st_bigint_0 set tag tagname='+98' -sql describe st_bigint_0 -if $data23 != 98 then - return -1 -endi -sql alter table st_bigint_0 set tag tagname='-076' -sql describe st_bigint_0 -if $data23 != -76 then - return -1 -endi -sql alter table st_bigint_0 set tag tagname=+0012 -sql describe st_bigint_0 -if $data23 != 12 then - return -1 -endi -sql alter table st_bigint_0 set tag tagname=-00063 -sql describe st_bigint_0 -if $data23 != -63 then - return -1 -endi +### case 03: alter tag values +#sql alter table st_bigint_0 set tag tagname=9223372036854775807 +#sql select tagname from st_bigint_0 +#if $data00 != 9223372036854775807 then +# return -1 +#endi +#sql alter table st_bigint_0 set tag tagname=-9223372036854775807 +#sql select tagname from st_bigint_0 +#if $data00 != -9223372036854775807 then +# return -1 +#endi +#sql alter table st_bigint_0 set tag tagname=+100 +#sql select tagname from st_bigint_0 +#if $data00 != 100 then +# return -1 +#endi +#sql alter table st_bigint_0 set tag tagname=-33 +#sql select tagname from st_bigint_0 +#if $data00 != -33 then +# return -1 +#endi +#sql alter table st_bigint_0 set tag tagname='+98' +#sql select tagname from st_bigint_0 +#if $data00 != 98 then +# return -1 +#endi +#sql alter table st_bigint_0 set tag tagname='-076' +#sql select tagname from st_bigint_0 +#if $data00 != -76 then +# return -1 +#endi +#sql alter table st_bigint_0 set tag tagname=+0012 +#sql select tagname from st_bigint_0 +#if $data00 != 12 then +# return -1 +#endi +#sql alter table st_bigint_0 set tag tagname=-00063 +#sql select tagname from st_bigint_0 +#if $data00 != -63 then +# return -1 +#endi ## case 04: illegal input ################## when overflow, auto set max @@ -454,13 +454,13 @@ sql insert into st_bigint_e23 using mt_bigint tags (033) values (now, 00062) sql insert into st_bigint_e24 using mt_bigint tags (033) values (now, 00062) sql insert into st_bigint_e25 using mt_bigint tags (033) values (now, 00062) -sql alter table st_bigint_e13 set tag tagname=9223372036854775808 -sql_error alter table st_bigint_e14 set tag tagname=-9223372036854775808 -sql alter table st_bigint_e15 set tag tagname=92233720368547758080 -sql_error alter table st_bigint_e16 set tag tagname=-92233720368547758080 -sql_error alter table st_bigint_e19 set tag tagname=123abc -sql_error alter table st_bigint_e20 set tag tagname="123abc" -sql_error alter table st_bigint_e22 set tag tagname=abc -sql_error alter table st_bigint_e23 set tag tagname="abc" -sql_error alter table st_bigint_e24 set tag tagname=" " -sql_error alter table st_bigint_e25 set tag tagname='' +#sql alter table st_bigint_e13 set tag tagname=9223372036854775808 +#sql_error alter table st_bigint_e14 set tag tagname=-9223372036854775808 +#sql alter table st_bigint_e15 set tag tagname=92233720368547758080 +#sql_error alter table st_bigint_e16 set tag tagname=-92233720368547758080 +#sql_error alter table st_bigint_e19 set tag tagname=123abc +#sql_error alter table st_bigint_e20 set tag tagname="123abc" +#sql_error alter table st_bigint_e22 set tag tagname=abc +#sql_error alter table st_bigint_e23 set tag tagname="abc" +#sql_error alter table st_bigint_e24 set tag tagname=" " +#sql_error alter table st_bigint_e25 set tag tagname='' diff --git a/tests/script/general/parser/columnValue_bool.sim b/tests/script/general/parser/columnValue_bool.sim index 2c896308fdf4194236c7367f0281e910fa847be7..84ee53670ed7809e2be9f394ece6b9db6e433c88 100644 --- a/tests/script/general/parser/columnValue_bool.sim +++ b/tests/script/general/parser/columnValue_bool.sim @@ -11,111 +11,111 @@ 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 -if $data23 != NULL then - print ==1== expect: NULL, actually: $data23 +sql select tagname from st_bool_0 +if $data00 != NULL then + print ==1== expect: NULL, actually: $data00 return -1 endi sql create table st_bool_1 using mt_bool tags (NULL) -sql describe st_bool_1 -if $data23 != NULL then - print ==2== expect: NULL, actually: $data23 +sql select tagname from st_bool_1 +if $data00 != NULL then + print ==2== expect: NULL, actually: $data00 return -1 endi sql create table st_bool_2 using mt_bool tags ('null') -sql describe st_bool_2 -if $data23 != NULL then - print ==3== expect: NULL, actually: $data23 +sql select tagname from st_bool_2 +if $data00 != NULL then + print ==3== expect: NULL, actually: $data00 return -1 endi sql create table st_bool_3 using mt_bool tags ('NULL') -sql describe st_bool_3 -if $data23 != NULL then - print ==4== expect: NULL, actually: $data23 +sql select tagname from st_bool_3 +if $data00 != NULL then + print ==4== expect: NULL, actually: $data00 return -1 endi sql create table st_bool_4 using mt_bool tags ("null") -sql describe st_bool_4 -if $data23 != NULL then - print ==5== expect: NULL, actually: $data23 +sql select tagname from st_bool_4 +if $data00 != NULL then + print ==5== expect: NULL, actually: $data00 return -1 endi sql create table st_bool_5 using mt_bool tags ("NULL") -sql describe st_bool_5 -if $data23 != NULL then - print ==6== expect: NULL, actually: $data23 +sql select tagname from st_bool_5 +if $data00 != NULL then + print ==6== expect: NULL, actually: $data00 return -1 endi sql create table st_bool_6 using mt_bool tags ("true") -sql describe st_bool_6 -if $data23 != true then - print ==7== expect: true, actually: $data23 +sql select tagname from st_bool_6 +if $data00 != 1 then + print ==7== expect: 1, actually: $data00 return -1 endi sql create table st_bool_7 using mt_bool tags ('true') -sql describe st_bool_7 -if $data23 != true then - print ==8== expect: true, actually: $data23 +sql select tagname from st_bool_7 +if $data00 != 1 then + print ==8== expect: 1, actually: $data00 return -1 endi sql create table st_bool_8 using mt_bool tags (true) -sql describe st_bool_8 -if $data23 != true then - print ==9== expect: true, actually: $data23 +sql select tagname from st_bool_8 +if $data00 != 1 then + print ==9== expect: 1, actually: $data00 return -1 endi sql create table st_bool_9 using mt_bool tags ("false") -sql describe st_bool_9 -if $data23 != false then - print ==10== expect: false, actually: $data23 +sql select tagname from st_bool_9 +if $data00 != 0 then + print ==10== expect: 0, actually: $data00 return -1 endi sql create table st_bool_10 using mt_bool tags ('false') -sql describe st_bool_10 -if $data23 != false then - print ==11== expect: false, actually: $data23 +sql select tagname from st_bool_10 +if $data00 != 0 then + print ==11== expect: 0, actually: $data00 return -1 endi sql create table st_bool_11 using mt_bool tags (false) -sql describe st_bool_11 -if $data23 != false then - print ==12== expect: false, actually: $data23 +sql select tagname from st_bool_11 +if $data00 != 0 then + print ==12== expect: 0, actually: $data00 return -1 endi sql create table st_bool_12 using mt_bool tags (0) -sql describe st_bool_12 -if $data23 != false then - print ==13== expect: false, actually: $data23 +sql select tagname from st_bool_12 +if $data00 != 0 then + print ==13== expect: 0, actually: $data00 return -1 endi sql create table st_bool_13 using mt_bool tags (1) -sql describe st_bool_13 -if $data23 != true then - print ==14== expect: true, actually: $data23 +sql select tagname from st_bool_13 +if $data00 != 1 then + print ==14== expect: 1, actually: $data00 return -1 endi sql create table st_bool_14 using mt_bool tags (6.9) -sql describe st_bool_14 -if $data23 != true then - print ==15== expect: true, actually: $data23 +sql select tagname from st_bool_14 +if $data00 != 1 then + print ==15== expect: 1, actually: $data00 return -1 endi sql create table st_bool_15 using mt_bool tags (-3) -sql describe st_bool_15 -if $data23 != true then - print ==16== expect: true, actually: $data23 +sql select tagname from st_bool_15 +if $data00 != 1 then + print ==16== expect: 1, actually: $data00 return -1 endi sql create table st_bool_15_0 using mt_bool tags (+300) -sql describe st_bool_15_0 -if $data23 != true then - print ==16== expect: true, actually: $data23 +sql select tagname from st_bool_15_0 +if $data00 != 1 then + print ==16== expect: 1, actually: $data00 return -1 endi sql create table st_bool_15_1 using mt_bool tags (-8.03) -sql describe st_bool_15_1 -if $data23 != true then - print ==16== expect: true, actually: $data23 +sql select tagname from st_bool_15_1 +if $data00 != 1 then + print ==16== expect: 1, actually: $data00 return -1 endi @@ -125,7 +125,7 @@ sql select * from st_bool_0 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then print ==17== expect: NULL, actually: $data01 return -1 endi @@ -134,7 +134,7 @@ sql select * from st_bool_1 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then print ==18== expect: NULL, actually: $data01 return -1 endi @@ -143,7 +143,7 @@ sql select * from st_bool_2 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then print ==19== expect: NULL, actually: $data01 return -1 endi @@ -152,7 +152,7 @@ sql select * from st_bool_3 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then print ==20== expect: NULL, actually: $data01 return -1 endi @@ -161,7 +161,7 @@ sql select * from st_bool_4 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then print ==21== expect: NULL, actually: $data01 return -1 endi @@ -170,7 +170,7 @@ sql select * from st_bool_5 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then print ==22== expect: NULL, actually: $data01 return -1 endi @@ -180,7 +180,7 @@ if $rows != 1 then return -1 endi if $data01 != 1 then - print ==23== expect: true, actually: $data01 + print ==23== expect: 1, actually: $data01 return -1 endi sql insert into st_bool_7 values (now, 'true') @@ -189,7 +189,7 @@ if $rows != 1 then return -1 endi if $data01 != 1 then - print ==24== expect: true, actually: $data01 + print ==24== expect: 1, actually: $data01 return -1 endi sql insert into st_bool_8 values (now, true) @@ -198,7 +198,7 @@ if $rows != 1 then return -1 endi if $data01 != 1 then - print ==25== expect: true, actually: $data01 + print ==25== expect: 1, actually: $data01 return -1 endi sql insert into st_bool_9 values (now, "false") @@ -243,7 +243,7 @@ if $rows != 1 then return -1 endi if $data01 != 1 then - print ==30== expect: true, actually: $data01 + print ==30== expect: 1, actually: $data01 return -1 endi sql insert into st_bool_14 values (now, 6.9) @@ -252,7 +252,7 @@ if $rows != 1 then return -1 endi if $data01 != 1 then - print ==31== expect: true, actually: $data01 + print ==31== expect: 1, actually: $data01 return -1 endi sql insert into st_bool_15 values (now, -3) @@ -285,202 +285,202 @@ 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 -if $data23 != NULL then - print ==33== expect: NULL, actually: $data23 +sql select tagname from st_bool_16 +if $data00 != NULL then + print ==33== expect: NULL, actually: $data00 return -1 endi sql select * from st_bool_16 -if $data01 != null then +if $data01 != NULL then print ==34== expect: NULL, actually: $data01 return -1 endi sql insert into st_bool_17 using mt_bool tags (NULL) values (now, NULL) -sql describe st_bool_17 -if $data23 != NULL then - print ==35== expect: NULL, actually: $data23 +sql select tagname from st_bool_17 +if $data00 != NULL then + print ==35== expect: NULL, actually: $data00 return -1 endi sql select * from st_bool_17 -if $data01 != null then +if $data01 != NULL then print ==36== expect: NULL, actually: $data01 return -1 endi sql insert into st_bool_18 using mt_bool tags ('null') values (now, 'null') -sql describe st_bool_18 -if $data23 != NULL then - print ==37== expect: NULL, actually: $data23 +sql select tagname from st_bool_18 +if $data00 != NULL then + print ==37== expect: NULL, actually: $data00 return -1 endi sql select * from st_bool_18 -if $data01 != null then +if $data01 != NULL then print ==38== expect: NULL, actually: $data01 return -1 endi sql insert into st_bool_19 using mt_bool tags ('NULL') values (now, 'NULL') -sql describe st_bool_19 -if $data23 != NULL then - print ==39== expect: NULL, actually: $data23 +sql select tagname from st_bool_19 +if $data00 != NULL then + print ==39== expect: NULL, actually: $data00 return -1 endi sql select * from st_bool_19 -if $data01 != null then +if $data01 != NULL then print ==40== expect: NULL, actually: $data01 return -1 endi sql insert into st_bool_20 using mt_bool tags ("null") values (now, "null") -sql describe st_bool_20 -if $data23 != NULL then - print ==41== expect: NULL, actually: $data23 +sql select tagname from st_bool_20 +if $data00 != NULL then + print ==41== expect: NULL, actually: $data00 return -1 endi sql select * from st_bool_20 -if $data01 != null then +if $data01 != NULL then print ==42== expect: NULL, actually: $data01 return -1 endi sql insert into st_bool_21 using mt_bool tags ("NULL") values (now, "NULL") -sql describe st_bool_21 -if $data23 != NULL then - print ==43== expect: NULL, actually: $data23 +sql select tagname from st_bool_21 +if $data00 != NULL then + print ==43== expect: NULL, actually: $data00 return -1 endi sql select * from st_bool_21 -if $data01 != null then +if $data01 != NULL then print ==44== expect: NULL, actually: $data01 return -1 endi sql insert into st_bool_22 using mt_bool tags ("true") values (now, "true") -sql describe st_bool_22 -if $data23 != true then - print ==45== expect: true, actually: $data23 +sql select tagname from st_bool_22 +if $data00 != 1 then + print ==45== expect: 1, actually: $data00 return -1 endi sql select * from st_bool_22 if $data01 != 1 then - print ==46== expect: true, actually: $data01 + print ==46== expect: 1, actually: $data01 return -1 endi sql insert into st_bool_23 using mt_bool tags ('true') values (now, 'true') -sql describe st_bool_23 -if $data23 != true then - print ==47== expect: true, actually: $data23 +sql select tagname from st_bool_23 +if $data00 != 1 then + print ==47== expect: 1, actually: $data00 return -1 endi sql select * from st_bool_23 if $data01 != 1 then - print ==48== expect: true, actually: $data01 + print ==48== expect: 1, actually: $data01 return -1 endi sql insert into st_bool_24 using mt_bool tags (true) values (now, true) -sql describe st_bool_24 -if $data23 != true then - print ==49== expect: true, actually: $data23 +sql select tagname from st_bool_24 +if $data00 != 1 then + print ==49== expect: 1, actually: $data00 return -1 endi sql select * from st_bool_24 if $data01 != 1 then - print ==50== expect: true, actually: $data01 + print ==50== expect: 1, actually: $data01 return -1 endi sql insert into st_bool_25 using mt_bool tags ("false") values (now, "false") -sql describe st_bool_25 -if $data23 != false then - print ==51== expect: false, actually: $data23 +sql select tagname from st_bool_25 +if $data00 != 0 then + print ==51== expect: 0, actually: $data00 return -1 endi sql select * from st_bool_25 if $data01 != 0 then - print ==52== expect: false, actually: $data01 + print ==52== expect: 0, actually: $data01 return -1 endi sql insert into st_bool_26 using mt_bool tags ('false') values (now, 'false') -sql describe st_bool_26 -if $data23 != false then - print ==53== expect: false, actually: $data23 +sql select tagname from st_bool_26 +if $data00 != 0 then + print ==53== expect: 0, actually: $data00 return -1 endi sql select * from st_bool_26 if $data01 != 0 then - print ==54== expect: false, actually: $data01 + print ==54== expect: 0, actually: $data01 return -1 endi sql insert into st_bool_27 using mt_bool tags (false) values (now, false) -sql describe st_bool_27 -if $data23 != false then - print ==55== expect: false, actually: $data23 +sql select tagname from st_bool_27 +if $data00 != 0 then + print ==55== expect: 0, actually: $data00 return -1 endi sql select * from st_bool_27 if $data01 != 0 then - print ==56== expect: false, actually: $data01 + print ==56== expect: 0, actually: $data01 return -1 endi sql insert into st_bool_28 using mt_bool tags (0) values (now, 0) -sql describe st_bool_28 -if $data23 != false then - print ==57== expect: false, actually: $data23 +sql select tagname from st_bool_28 +if $data00 != 0 then + print ==57== expect: 0, actually: $data00 return -1 endi sql select * from st_bool_28 if $data01 != 0 then - print ==58== expect: false, actually: $data01 + print ==58== expect: 0, actually: $data01 return -1 endi sql insert into st_bool_29 using mt_bool tags (1) values (now, 1) -sql describe st_bool_29 -if $data23 != true then - print ==59== expect: true, actually: $data23 +sql select tagname from st_bool_29 +if $data00 != 1 then + print ==59== expect: 1, actually: $data00 return -1 endi sql select * from st_bool_29 if $data01 != 1 then - print ==60== expect: true, actually: $data01 + print ==60== expect: 1, actually: $data01 return -1 endi sql insert into st_bool_30 using mt_bool tags (6.9) values (now, 6.9) -sql describe st_bool_30 -if $data23 != true then - print ==61== expect: true, actually: $data23 +sql select tagname from st_bool_30 +if $data00 != 1 then + print ==61== expect: 1, actually: $data00 return -1 endi sql select * from st_bool_30 if $data01 != 1 then - print ==62== expect: true, actually: $data01 + print ==62== expect: 1, actually: $data01 return -1 endi sql insert into st_bool_31 using mt_bool tags (-3) values (now, -3) -sql describe st_bool_31 -if $data23 != true then - print ==63== expect: true, actually: $data23 +sql select tagname from st_bool_31 +if $data00 != 1 then + print ==63== expect: 1, actually: $data00 return -1 endi sql select * from st_bool_31 if $data01 != 1 then - print ==64== expect: true, actually: $data01 + print ==64== expect: 1, actually: $data01 return -1 endi sql insert into st_bool_32 using mt_bool tags (+300) values (now, +300) -sql describe st_bool_32 -if $data23 != true then - print ==63== expect: true, actually: $data23 +sql select tagname from st_bool_32 +if $data00 != 1 then + print ==63== expect: 1, actually: $data00 return -1 endi sql select * from st_bool_32 if $data01 != 1 then - print ==64== expect: true, actually: $data01 + print ==64== expect: 1, actually: $data01 return -1 endi sql insert into st_bool_33 using mt_bool tags (+30.890) values (now, +30.890) -sql describe st_bool_33 -if $data23 != true then - print ==63== expect: true, actually: $data23 +sql select tagname from st_bool_33 +if $data00 != 1 then + print ==63== expect: 1, actually: $data00 return -1 endi sql select * from st_bool_33 if $data01 != 1 then - print ==64== expect: true, actually: $data01 + print ==64== expect: 1, actually: $data01 return -1 endi @@ -490,86 +490,86 @@ endi ## case 03: alter tag values -sql alter table st_bool_0 set tag tagname=true -sql describe 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 -if $data23 != NULL then - return -1 -endi -sql alter table st_bool_0 set tag tagname=false -sql describe 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 -if $data23 != NULL then - return -1 -endi -sql alter table st_bool_0 set tag tagname='true' -sql describe 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 -if $data23 != NULL then - return -1 -endi -sql alter table st_bool_0 set tag tagname='false' -sql describe 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 -if $data23 != NULL then - return -1 -endi -sql alter table st_bool_0 set tag tagname="true" -sql describe 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 -if $data23 != NULL then - return -1 -endi -sql alter table st_bool_0 set tag tagname="false" -sql describe 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 -if $data23 != NULL then - return -1 -endi -sql alter table st_bool_0 set tag tagname=1 -sql describe 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 -if $data23 != false then - return -1 -endi -sql alter table st_bool_0 set tag tagname=6.9 -sql describe 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 -if $data23 != true then - return -1 -endi +#sql alter table st_bool_0 set tag tagname=true +#sql select tagname from st_bool_0 +#if $data00 != true then +# return -1 +#endi +#sql alter table st_bool_0 set tag tagname=NULL +#sql select tagname from st_bool_0 +#if $data00 != NULL then +# return -1 +#endi +#sql alter table st_bool_0 set tag tagname=false +#sql select tagname from st_bool_0 +#if $data00 != false then +# return -1 +#endi +#sql alter table st_bool_0 set tag tagname=null +#sql select tagname from st_bool_0 +#if $data00 != NULL then +# return -1 +#endi +#sql alter table st_bool_0 set tag tagname='true' +#sql select tagname from st_bool_0 +#if $data00 != true then +# return -1 +#endi +#sql alter table st_bool_0 set tag tagname='null' +#sql select tagname from st_bool_0 +#if $data00 != NULL then +# return -1 +#endi +#sql alter table st_bool_0 set tag tagname='false' +#sql select tagname from st_bool_0 +#if $data00 != false then +# return -1 +#endi +#sql alter table st_bool_0 set tag tagname='NULL' +#sql select tagname from st_bool_0 +#if $data00 != NULL then +# return -1 +#endi +#sql alter table st_bool_0 set tag tagname="true" +#sql select tagname from st_bool_0 +#if $data00 != true then +# return -1 +#endi +#sql alter table st_bool_0 set tag tagname="null" +#sql select tagname from st_bool_0 +#if $data00 != NULL then +# return -1 +#endi +#sql alter table st_bool_0 set tag tagname="false" +#sql select tagname from st_bool_0 +#if $data00 != false then +# return -1 +#endi +#sql alter table st_bool_0 set tag tagname="NULL" +#sql select tagname from st_bool_0 +#if $data00 != NULL then +# return -1 +#endi +#sql alter table st_bool_0 set tag tagname=1 +#sql select tagname from st_bool_0 +#if $data00 != true then +# return -1 +#endi +#sql alter table st_bool_0 set tag tagname=0 +#sql select tagname from st_bool_0 +#if $data00 != false then +# return -1 +#endi +#sql alter table st_bool_0 set tag tagname=6.9 +#sql select tagname from st_bool_0 +#if $data00 != true then +# return -1 +#endi +#sql alter table st_bool_0 set tag tagname=-3 +#sql select tagname from st_bool_0 +#if $data00 != true then +# return -1 +#endi # case 04: illegal input sql_error create table st_bool_e0 using mt_bool tags (123abc) diff --git a/tests/script/general/parser/columnValue_double.sim b/tests/script/general/parser/columnValue_double.sim index 1c79ec4ff7f8ff2395cb0486630a3f761a96bf79..733fc52285a3c90dda50e5bb34a03e51daf4b9ae 100644 --- a/tests/script/general/parser/columnValue_double.sim +++ b/tests/script/general/parser/columnValue_double.sim @@ -11,145 +11,146 @@ print ========== double sql create table mt_double (ts timestamp, c double) tags (tagname double) ## case 00: static create table for test tag values -sql create table st_double_0 using mt_double tags (null) -sql describe st_double_0 -if $data23 != NULL then +sql create table st_double_0 using mt_double tags (NULL ) +sql select tagname from st_double_0 +if $data00 != NULL then return -1 endi sql create table st_double_1 using mt_double tags (NULL) -sql describe st_double_1 -if $data23 != NULL then +sql select tagname from st_double_1 +if $data00 != NULL then return -1 endi -sql create table st_double_2 using mt_double tags ('null') -sql describe st_double_2 -if $data23 != NULL then +sql create table st_double_2 using mt_double tags ('NULL') +sql select tagname from st_double_2 +if $data00 != NULL then return -1 endi sql create table st_double_3 using mt_double tags ('NULL') -sql describe st_double_3 -if $data23 != NULL then +sql select tagname from st_double_3 +if $data00 != NULL then return -1 endi -sql create table st_double_4 using mt_double tags ("null") -sql describe st_double_4 -if $data23 != NULL then +sql create table st_double_4 using mt_double tags ("NULL") +sql select tagname from st_double_4 +if $data00 != NULL then return -1 endi sql create table st_double_5 using mt_double tags ("NULL") -sql describe st_double_5 -if $data23 != NULL then +sql select tagname from st_double_5 +if $data00 != NULL then return -1 endi sql create table st_double_6 using mt_double tags (-123.321) -sql describe st_double_6 -if $data23 != -123.321000 then +sql select tagname from st_double_6 +if $data00 != -123.321000000 then + print expect -123.321000000, actual: $data00 return -1 endi sql create table st_double_7 using mt_double tags (+1.567) -sql describe st_double_7 -if $data23 != 1.567000 then +sql select tagname from st_double_7 +if $data00 != 1.567000000 then return -1 endi sql create table st_double_8 using mt_double tags (379.001) -sql describe st_double_8 -if $data23 != 379.001000 then +sql select tagname from st_double_8 +if $data00 != 379.001000000 then return -1 endi sql create table st_double_9 using mt_double tags (1.5e+3) -sql describe st_double_9 -if $data23 != 1500.000000 then +sql select tagname from st_double_9 +if $data00 != 1500.000000000 then return -1 endi sql create table st_double_10 using mt_double tags (-1.5e-3) -sql describe st_double_10 -if $data23 != -0.001500 then +sql select tagname from st_double_10 +if $data00 != -0.001500000 then return -1 endi sql create table st_double_11 using mt_double tags (+1.5e+3) -sql describe st_double_11 -if $data23 != 1500.000000 then +sql select tagname from st_double_11 +if $data00 != 1500.000000000 then return -1 endi sql create table st_double_12 using mt_double tags (-1.5e+3) -sql describe st_double_12 -if $data23 != -1500.000000 then +sql select tagname from st_double_12 +if $data00 != -1500.000000000 then return -1 endi sql create table st_double_13 using mt_double tags (1.5e-3) -sql describe st_double_13 -if $data23 != 0.001500 then +sql select tagname from st_double_13 +if $data00 != 0.001500000 then return -1 endi sql create table st_double_14 using mt_double tags (1.5E-3) -sql describe st_double_14 -if $data23 != 0.001500 then +sql select tagname from st_double_14 +if $data00 != 0.001500000 then return -1 endi sql create table st_double_6_0 using mt_double tags ('-123.321') -sql describe st_double_6_0 -if $data23 != -123.321000 then +sql select tagname from st_double_6_0 +if $data00 != -123.321000000 then return -1 endi sql create table st_double_7_0 using mt_double tags ('+1.567') -sql describe st_double_7_0 -if $data23 != 1.567000 then +sql select tagname from st_double_7_0 +if $data00 != 1.567000000 then return -1 endi sql create table st_double_8_0 using mt_double tags ('379.001') -sql describe st_double_8_0 -if $data23 != 379.001000 then +sql select tagname from st_double_8_0 +if $data00 != 379.001000000 then return -1 endi sql create table st_double_9_0 using mt_double tags ('1.5e+3') -sql describe st_double_9_0 -if $data23 != 1500.000000 then +sql select tagname from st_double_9_0 +if $data00 != 1500.000000000 then return -1 endi sql create table st_double_10_0 using mt_double tags ('-1.5e-3') -sql describe st_double_10_0 -if $data23 != -0.001500 then +sql select tagname from st_double_10_0 +if $data00 != -0.001500000 then return -1 endi sql create table st_double_11_0 using mt_double tags ('+1.5e+3') -sql describe st_double_11_0 -if $data23 != 1500.000000 then +sql select tagname from st_double_11_0 +if $data00 != 1500.000000000 then return -1 endi sql create table st_double_12_0 using mt_double tags ('-1.5e+3') -sql describe st_double_12_0 -if $data23 != -1500.000000 then +sql select tagname from st_double_12_0 +if $data00 != -1500.000000000 then return -1 endi sql create table st_double_13_0 using mt_double tags ('1.5e-3') -sql describe st_double_13_0 -if $data23 != 0.001500 then +sql select tagname from st_double_13_0 +if $data00 != 0.001500000 then return -1 endi sql create table st_double_14_0 using mt_double tags ('1.5E-3') -sql describe st_double_14_0 -if $data23 != 0.001500 then +sql select tagname from st_double_14_0 +if $data00 != 0.001500000 then return -1 endi sql create table st_double_15_0 using mt_double tags (1.7976931348623157e+308) -sql describe st_double_15_0 -#if $data23 != 0.001500 then +sql select tagname from st_double_15_0 +#if $data00 != 0.001500000 then # return -1 #endi sql create table st_double_16_0 using mt_double tags (-1.7976931348623157e+308) -sql describe st_double_16_0 -#if $data23 != 0.001500 then +sql select tagname from st_double_16_0 +#if $data00 != 0.001500000 then # return -1 #endi ## case 01: insert values for test column values -sql insert into st_double_0 values (now, null) +sql insert into st_double_0 values (now, NULL ) sql select * from st_double_0 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_double_1 values (now, NULL) @@ -157,15 +158,15 @@ sql select * from st_double_1 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_double_2 values (now, 'null') +sql insert into st_double_2 values (now, 'NULL') sql select * from st_double_2 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_double_3 values (now, 'NULL') @@ -173,15 +174,15 @@ sql select * from st_double_3 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_double_4 values (now, "null") +sql insert into st_double_4 values (now, "NULL") sql select * from st_double_4 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_double_5 values (now, "NULL") @@ -189,7 +190,7 @@ sql select * from st_double_5 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi @@ -215,7 +216,7 @@ sql select * from st_double_8 if $rows != 1 then return -1 endi -#if $data01 != 100.89000 then +#if $data01 != 100.89000000 then # return -1 #endi sql insert into st_double_9 values (now, "-0.98") @@ -223,7 +224,7 @@ sql select * from st_double_9 if $rows != 1 then return -1 endi -#if $data01 != -0.980000 then +#if $data01 != -0.980000000 then # return -1 #endi sql insert into st_double_10 values (now, '0') @@ -231,7 +232,7 @@ sql select * from st_double_10 if $rows != 1 then return -1 endi -#if $data01 != 0.00000 then # tsim only print 4 bits after dot +#if $data01 != 0.00000000 then # tsim only print 4 bits after dot # return -1 #endi sql insert into st_double_11 values (now, -0) @@ -239,7 +240,7 @@ sql select * from st_double_11 if $rows != 1 then return -1 endi -#if $data01 != 0.00000 then +#if $data01 != 0.000000000 then # return -1 #endi sql insert into st_double_12 values (now, "+056") @@ -256,7 +257,7 @@ sql select * from st_double_13 if $rows != 1 then return -1 endi -#if $data01 != 56.000000 then +#if $data01 != 56.000000000 then # return -1 #endi @@ -270,64 +271,64 @@ endi #endi ## case 02: dynamic create table for test tag values -sql insert into st_double_16 using mt_double tags (null) values (now, null) -sql describe st_double_16 -if $data23 != NULL then +sql insert into st_double_16 using mt_double tags (NULL ) values (now, NULL ) +sql select tagname from st_double_16 +if $data00 != NULL then return -1 endi sql select * from st_double_16 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_double_17 using mt_double tags (NULL) values (now, NULL) -sql describe st_double_17 -if $data23 != NULL then +sql select tagname from st_double_17 +if $data00 != NULL then return -1 endi sql select * from st_double_17 -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_double_18 using mt_double tags ('null') values (now, 'null') -sql describe st_double_18 -if $data23 != NULL then +sql insert into st_double_18 using mt_double tags ('NULL') values (now, 'NULL') +sql select tagname from st_double_18 +if $data00 != NULL then return -1 endi sql select * from st_double_18 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_double_19 using mt_double tags ('NULL') values (now, 'NULL') -sql describe st_double_19 -if $data23 != NULL then +sql select tagname from st_double_19 +if $data00 != NULL then return -1 endi sql select * from st_double_19 -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_double_20 using mt_double tags ("null") values (now, "null") -sql describe st_double_20 -if $data23 != NULL then +sql insert into st_double_20 using mt_double tags ("NULL") values (now, "NULL") +sql select tagname from st_double_20 +if $data00 != NULL then return -1 endi sql select * from st_double_20 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_double_21 using mt_double tags ("NULL") values (now, "NULL") -sql describe st_double_21 -if $data23 != NULL then +sql select tagname from st_double_21 +if $data00 != NULL then return -1 endi sql select * from st_double_21 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_double_22 using mt_double tags (127) values (now, 1.7976931348623157e+308) -sql describe st_double_22 -#if $data23 != 127 then +sql select tagname from st_double_22 +#if $data00 != 127 then # return -1 #endi sql select * from st_double_22 @@ -335,8 +336,8 @@ sql select * from st_double_22 # return -1 #endi sql insert into st_double_23 using mt_double tags (-127) values (now, -1.7976931348623157e+308) -sql describe st_double_23 -#if $data23 != -127 then +sql select tagname from st_double_23 +#if $data00 != -127 then # return -1 #endi sql select * from st_double_23 @@ -344,8 +345,8 @@ sql select * from st_double_23 # return -1 #endi sql insert into st_double_24 using mt_double tags (10) values (now, 10) -sql describe st_double_24 -#if $data23 != 10 then +sql select tagname from st_double_24 +#if $data00 != 10 then # return -1 #endi sql select * from st_double_24 @@ -353,8 +354,8 @@ sql select * from st_double_24 # return -1 #endi sql insert into st_double_25 using mt_double tags ("-0") values (now, "-0") -sql describe st_double_25 -#if $data23 != 0 then +sql select tagname from st_double_25 +#if $data00 != 0 then # return -1 #endi sql select * from st_double_25 @@ -362,8 +363,8 @@ sql select * from st_double_25 # return -1 #endi sql insert into st_double_26 using mt_double tags ('123') values (now, '12.3') -sql describe st_double_26 -#if $data23 != 123 then +sql select tagname from st_double_26 +#if $data00 != 123 then # return -1 #endi sql select * from st_double_26 @@ -371,8 +372,8 @@ sql select * from st_double_26 # return -1 #endi sql insert into st_double_27 using mt_double tags (+056) values (now, +0005.6) -sql describe st_double_27 -#if $data23 != 56 then +sql select tagname from st_double_27 +#if $data00 != 56 then # return -1 #endi sql select * from st_double_27 @@ -380,8 +381,8 @@ sql select * from st_double_27 # return -1 #endi sql insert into st_double_28 using mt_double tags (-056) values (now, -005.6) -sql describe st_double_28 -#if $data23 != -56 then +sql select tagname from st_double_28 +#if $data00 != -56 then # return -1 #endi sql select * from st_double_28 @@ -389,47 +390,47 @@ sql select * from st_double_28 # return -1 #endi -## case 03: alter tag values -sql alter table st_double_0 set tag tagname=1.7976931348623157e+308 -sql describe st_double_0 -#if $data23 != 127 then -# return -1 -#endi -sql alter table st_double_0 set tag tagname=-1.7976931348623157e+308 -sql describe st_double_0 -#if $data23 != -127 then -# return -1 -#endi -sql alter table st_double_0 set tag tagname=+10.340 -sql describe st_double_0 -#if $data23 != 100 then -# return -1 -#endi -sql alter table st_double_0 set tag tagname=-33.87 -sql describe st_double_0 -#if $data23 != -33 then -# return -1 -#endi -sql alter table st_double_0 set tag tagname='+9.8' -sql describe st_double_0 -#if $data23 != 98 then -# return -1 -#endi -sql alter table st_double_0 set tag tagname='-07.6' -sql describe st_double_0 -#if $data23 != -76 then -# return -1 -#endi -sql alter table st_double_0 set tag tagname=+0012.871 -sql describe st_double_0 -#if $data23 != 12 then -# return -1 -#endi -sql alter table st_double_0 set tag tagname=-00063.582 -sql describe st_double_0 -#if $data23 != -63 then -# return -1 -#endi +### case 03: alter tag values +#sql alter table st_double_0 set tag tagname=1.7976931348623157e+308 +#sql select tagname from st_double_0 +##if $data00 != 127 then +## return -1 +##endi +#sql alter table st_double_0 set tag tagname=-1.7976931348623157e+308 +#sql select tagname from st_double_0 +##if $data00 != -127 then +## return -1 +##endi +#sql alter table st_double_0 set tag tagname=+10.340 +#sql select tagname from st_double_0 +##if $data00 != 100 then +## return -1 +##endi +#sql alter table st_double_0 set tag tagname=-33.87 +#sql select tagname from st_double_0 +##if $data00 != -33 then +## return -1 +##endi +#sql alter table st_double_0 set tag tagname='+9.8' +#sql select tagname from st_double_0 +##if $data00 != 98 then +## return -1 +##endi +#sql alter table st_double_0 set tag tagname='-07.6' +#sql select tagname from st_double_0 +##if $data00 != -76 then +## return -1 +##endi +#sql alter table st_double_0 set tag tagname=+0012.871 +#sql select tagname from st_double_0 +##if $data00 != 12 then +## return -1 +##endi +#sql alter table st_double_0 set tag tagname=-00063.582 +#sql select tagname from st_double_0 +##if $data00 != -63 then +## return -1 +##endi ## case 04: illegal input sql_error create table st_double_e0 using mt_double tags (1.8976931348623157e+308) diff --git a/tests/script/general/parser/columnValue_float.sim b/tests/script/general/parser/columnValue_float.sim index 58e413a50fd623f52fcc0ad12c09ddc10f516d55..c71b4b40ee0d799c6faa619cd10b765959074f11 100644 --- a/tests/script/general/parser/columnValue_float.sim +++ b/tests/script/general/parser/columnValue_float.sim @@ -11,145 +11,163 @@ print ========== float sql create table mt_float (ts timestamp, c float) tags (tagname float) ## case 00: static create table for test tag values -sql create table st_float_0 using mt_float tags (null) -sql describe st_float_0 -if $data23 != NULL then +sql create table st_float_0 using mt_float tags (NULL) +sql select tagname from st_float_0 +if $data00 != NULL then return -1 endi sql create table st_float_1 using mt_float tags (NULL) -sql describe st_float_1 -if $data23 != NULL then +sql select tagname from st_float_1 +if $data00 != NULL then return -1 endi -sql create table st_float_2 using mt_float tags ('null') -sql describe st_float_2 -if $data23 != NULL then +sql create table st_float_2 using mt_float tags ('NULL') +sql select tagname from st_float_2 +if $data00 != NULL then return -1 endi sql create table st_float_3 using mt_float tags ('NULL') -sql describe st_float_3 -if $data23 != NULL then +sql select tagname from st_float_3 +if $data00 != NULL then return -1 endi -sql create table st_float_4 using mt_float tags ("null") -sql describe st_float_4 -if $data23 != NULL then +sql create table st_float_4 using mt_float tags ("NULL") +sql select tagname from st_float_4 +if $data00 != NULL then return -1 endi sql create table st_float_5 using mt_float tags ("NULL") -sql describe st_float_5 -if $data23 != NULL then +sql select tagname from st_float_5 +if $data00 != NULL then return -1 endi sql create table st_float_6 using mt_float tags (-123.321) -sql describe st_float_6 -if $data23 != -123.320999 then +sql select tagname from st_float_6 +if $data00 != -123.32100 then + print expect -123.32100, actual: $data00 return -1 endi sql create table st_float_7 using mt_float tags (+1.567) -sql describe st_float_7 -if $data23 != 1.567000 then +sql select tagname from st_float_7 +if $data00 != 1.56700 then + print expect 1.56700, actual: $data00 return -1 endi sql create table st_float_8 using mt_float tags (379.001) -sql describe st_float_8 -if $data23 != 379.001007 then +sql select tagname from st_float_8 +if $data00 != 379.00101 then + print expect 379.00101, actual: $data00 return -1 endi sql create table st_float_9 using mt_float tags (1.5e+3) -sql describe st_float_9 -if $data23 != 1500.000000 then +sql select tagname from st_float_9 +if $data00 != 1500.00000 then + print expect 1500.00000, actual: $data00 return -1 endi sql create table st_float_10 using mt_float tags (-1.5e-3) -sql describe st_float_10 -if $data23 != -0.001500 then +sql select tagname from st_float_10 +if $data00 != -0.00150 then + print expect -0.00150, actual: $data00 return -1 endi sql create table st_float_11 using mt_float tags (+1.5e+3) -sql describe st_float_11 -if $data23 != 1500.000000 then +sql select tagname from st_float_11 +if $data00 != 1500.00000 then + print expect 1500.00000, actual: $data00 return -1 endi sql create table st_float_12 using mt_float tags (-1.5e+3) -sql describe st_float_12 -if $data23 != -1500.000000 then +sql select tagname from st_float_12 +if $data00 != -1500.00000 then + print expect -1500.00000, actual: $data00 return -1 endi sql create table st_float_13 using mt_float tags (1.5e-3) -sql describe st_float_13 -if $data23 != 0.001500 then +sql select tagname from st_float_13 +if $data00 != 0.00150 then + print expect 0.00150, actual: $data00 return -1 endi sql create table st_float_14 using mt_float tags (1.5E-3) -sql describe st_float_14 -if $data23 != 0.001500 then +sql select tagname from st_float_14 +if $data00 != 0.00150 then + print expect 0.00150, actual: $data00 return -1 endi sql create table st_float_6_0 using mt_float tags ('-123.321') -sql describe st_float_6_0 -if $data23 != -123.320999 then +sql select tagname from st_float_6_0 +if $data00 != -123.32100 then + print expect -123.32100, actual: $data00 return -1 endi sql create table st_float_7_0 using mt_float tags ('+1.567') -sql describe st_float_7_0 -if $data23 != 1.567000 then +sql select tagname from st_float_7_0 +if $data00 != 1.56700 then + print expect 1.56700, actual: $data00 return -1 endi sql create table st_float_8_0 using mt_float tags ('379.001') -sql describe st_float_8_0 -if $data23 != 379.001007 then +sql select tagname from st_float_8_0 +if $data00 != 379.00101 then + print expect 379.00101, actual: $data00 return -1 endi sql create table st_float_9_0 using mt_float tags ('1.5e+3') -sql describe st_float_9_0 -if $data23 != 1500.000000 then +sql select tagname from st_float_9_0 +if $data00 != 1500.00000 then + print expect 1500.00000, actual: $data00 return -1 endi sql create table st_float_10_0 using mt_float tags ('-1.5e-3') -sql describe st_float_10_0 -if $data23 != -0.001500 then +sql select tagname from st_float_10_0 +if $data00 != -0.00150 then + print expect -0.00150, actual: $data00 return -1 endi sql create table st_float_11_0 using mt_float tags ('+1.5e+3') -sql describe st_float_11_0 -if $data23 != 1500.000000 then +sql select tagname from st_float_11_0 +if $data00 != 1500.00000 then + print expect 1500.00000, actual: $data00 return -1 endi sql create table st_float_12_0 using mt_float tags ('-1.5e+3') -sql describe st_float_12_0 -if $data23 != -1500.000000 then +sql select tagname from st_float_12_0 +if $data00 != -1500.00000 then + print expect -1500.00000, actual: $data00 return -1 endi sql create table st_float_13_0 using mt_float tags ('1.5e-3') -sql describe st_float_13_0 -if $data23 != 0.001500 then +sql select tagname from st_float_13_0 +if $data00 != 0.00150 then + print expect 0.00150, actual: $data00 return -1 endi sql create table st_float_14_0 using mt_float tags ('1.5E-3') -sql describe st_float_14_0 -if $data23 != 0.001500 then +sql select tagname from st_float_14_0 +if $data00 != 0.00150 then + print expect 0.00150, actual: $data00 return -1 endi sql create table st_float_15_0 using mt_float tags (3.40282347e+38) -sql describe st_float_15_0 -#if $data23 != 0.001500 then +sql select tagname from st_float_15_0 +#if $data00 != 0.001500 then # return -1 #endi sql create table st_float_16_0 using mt_float tags (-3.40282347e+38) -sql describe st_float_16_0 -#if $data23 != 0.001500 then +sql select tagname from st_float_16_0 +#if $data00 != 0.001500 then # return -1 #endi ## case 01: insert values for test column values -sql insert into st_float_0 values (now, null) +sql insert into st_float_0 values (now, NULL) sql select * from st_float_0 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_float_1 values (now, NULL) @@ -157,15 +175,15 @@ sql select * from st_float_1 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_float_2 values (now, 'null') +sql insert into st_float_2 values (now, 'NULL') sql select * from st_float_2 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_float_3 values (now, 'NULL') @@ -173,15 +191,15 @@ sql select * from st_float_3 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_float_4 values (now, "null") +sql insert into st_float_4 values (now, "NULL") sql select * from st_float_4 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_float_5 values (now, "NULL") @@ -189,7 +207,7 @@ sql select * from st_float_5 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi @@ -270,64 +288,64 @@ endi #endi ## case 02: dynamic create table for test tag values -sql insert into st_float_16 using mt_float tags (null) values (now, null) -sql describe st_float_16 -if $data23 != NULL then +sql insert into st_float_16 using mt_float tags (NULL) values (now, NULL) +sql select tagname from st_float_16 +if $data00 != NULL then return -1 endi sql select * from st_float_16 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_float_17 using mt_float tags (NULL) values (now, NULL) -sql describe st_float_17 -if $data23 != NULL then +sql select tagname from st_float_17 +if $data00 != NULL then return -1 endi sql select * from st_float_17 -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_float_18 using mt_float tags ('null') values (now, 'null') -sql describe st_float_18 -if $data23 != NULL then +sql insert into st_float_18 using mt_float tags ('NULL') values (now, 'NULL') +sql select tagname from st_float_18 +if $data00 != NULL then return -1 endi sql select * from st_float_18 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_float_19 using mt_float tags ('NULL') values (now, 'NULL') -sql describe st_float_19 -if $data23 != NULL then +sql select tagname from st_float_19 +if $data00 != NULL then return -1 endi sql select * from st_float_19 -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_float_20 using mt_float tags ("null") values (now, "null") -sql describe st_float_20 -if $data23 != NULL then +sql insert into st_float_20 using mt_float tags ("NULL") values (now, "NULL") +sql select tagname from st_float_20 +if $data00 != NULL then return -1 endi sql select * from st_float_20 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_float_21 using mt_float tags ("NULL") values (now, "NULL") -sql describe st_float_21 -if $data23 != NULL then +sql select tagname from st_float_21 +if $data00 != NULL then return -1 endi sql select * from st_float_21 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_float_22 using mt_float tags (127) values (now, 3.40282347e+38) -sql describe st_float_22 -#if $data23 != 127 then +sql select tagname from st_float_22 +#if $data00 != 127 then # return -1 #endi sql select * from st_float_22 @@ -335,8 +353,8 @@ sql select * from st_float_22 # return -1 #endi sql insert into st_float_23 using mt_float tags (-127) values (now, -3.40282347e+38) -sql describe st_float_23 -#if $data23 != -127 then +sql select tagname from st_float_23 +#if $data00 != -127 then # return -1 #endi sql select * from st_float_23 @@ -344,8 +362,8 @@ sql select * from st_float_23 # return -1 #endi sql insert into st_float_24 using mt_float tags (10) values (now, 10) -sql describe st_float_24 -#if $data23 != 10 then +sql select tagname from st_float_24 +#if $data00 != 10 then # return -1 #endi sql select * from st_float_24 @@ -353,8 +371,8 @@ sql select * from st_float_24 # return -1 #endi sql insert into st_float_25 using mt_float tags ("-0") values (now, "-0") -sql describe st_float_25 -#if $data23 != 0 then +sql select tagname from st_float_25 +#if $data00 != 0 then # return -1 #endi sql select * from st_float_25 @@ -362,8 +380,8 @@ sql select * from st_float_25 # return -1 #endi sql insert into st_float_26 using mt_float tags ('123') values (now, '12.3') -sql describe st_float_26 -#if $data23 != 123 then +sql select tagname from st_float_26 +#if $data00 != 123 then # return -1 #endi sql select * from st_float_26 @@ -371,8 +389,8 @@ sql select * from st_float_26 # return -1 #endi sql insert into st_float_27 using mt_float tags (+056) values (now, +0005.6) -sql describe st_float_27 -#if $data23 != 56 then +sql select tagname from st_float_27 +#if $data00 != 56 then # return -1 #endi sql select * from st_float_27 @@ -380,8 +398,8 @@ sql select * from st_float_27 # return -1 #endi sql insert into st_float_28 using mt_float tags (-056) values (now, -005.6) -sql describe st_float_28 -#if $data23 != -56 then +sql select tagname from st_float_28 +#if $data00 != -56 then # return -1 #endi sql select * from st_float_28 @@ -389,47 +407,47 @@ sql select * from st_float_28 # return -1 #endi -## case 03: alter tag values -sql alter table st_float_0 set tag tagname=3.40282347e+38 -sql describe st_float_0 -#if $data23 != 127 then -# return -1 -#endi -sql alter table st_float_0 set tag tagname=-3.40282347e+38 -sql describe st_float_0 -#if $data23 != -127 then -# return -1 -#endi -sql alter table st_float_0 set tag tagname=+10.340 -sql describe st_float_0 -#if $data23 != 100 then -# return -1 -#endi -sql alter table st_float_0 set tag tagname=-33.87 -sql describe st_float_0 -#if $data23 != -33 then -# return -1 -#endi -sql alter table st_float_0 set tag tagname='+9.8' -sql describe st_float_0 -#if $data23 != 98 then -# return -1 -#endi -sql alter table st_float_0 set tag tagname='-07.6' -sql describe st_float_0 -#if $data23 != -76 then -# return -1 -#endi -sql alter table st_float_0 set tag tagname=+0012.871 -sql describe st_float_0 -#if $data23 != 12 then -# return -1 -#endi -sql alter table st_float_0 set tag tagname=-00063.582 -sql describe st_float_0 -#if $data23 != -63 then -# return -1 -#endi +### case 03: alter tag values +#sql alter table st_float_0 set tag tagname=3.40282347e+38 +#sql select tagname from st_float_0 +##if $data00 != 127 then +## return -1 +##endi +#sql alter table st_float_0 set tag tagname=-3.40282347e+38 +#sql select tagname from st_float_0 +##if $data00 != -127 then +## return -1 +##endi +#sql alter table st_float_0 set tag tagname=+10.340 +#sql select tagname from st_float_0 +##if $data00 != 100 then +## return -1 +##endi +#sql alter table st_float_0 set tag tagname=-33.87 +#sql select tagname from st_float_0 +##if $data00 != -33 then +## return -1 +##endi +#sql alter table st_float_0 set tag tagname='+9.8' +#sql select tagname from st_float_0 +##if $data00 != 98 then +## return -1 +##endi +#sql alter table st_float_0 set tag tagname='-07.6' +#sql select tagname from st_float_0 +##if $data00 != -76 then +## return -1 +##endi +#sql alter table st_float_0 set tag tagname=+0012.871 +#sql select tagname from st_float_0 +##if $data00 != 12 then +## return -1 +##endi +#sql alter table st_float_0 set tag tagname=-00063.582 +#sql select tagname from st_float_0 +##if $data00 != -63 then +## return -1 +##endi ## case 04: illegal input sql_error create table st_float_e0 using mt_float tags (3.50282347e+38) diff --git a/tests/script/general/parser/columnValue_int.sim b/tests/script/general/parser/columnValue_int.sim index da3df4969bb190470e67a7a3a523ad3296f39d49..2a909ebf3c64dd487d6d4b1bd5341c59794e8970 100644 --- a/tests/script/general/parser/columnValue_int.sim +++ b/tests/script/general/parser/columnValue_int.sim @@ -10,89 +10,89 @@ print ========== int sql create table mt_int (ts timestamp, c int) tags (tagname int) ## case 00: static create table for test tag values -sql create table st_int_0 using mt_int tags (null) -sql describe st_int_0 -if $data23 != NULL then +sql create table st_int_0 using mt_int tags (NULL) +sql select tagname from st_int_0 +if $data00 != NULL then return -1 endi sql create table st_int_1 using mt_int tags (NULL) -sql describe st_int_1 -if $data23 != NULL then +sql select tagname from st_int_1 +if $data00 != NULL then return -1 endi -sql create table st_int_2 using mt_int tags ('null') -sql describe st_int_2 -if $data23 != NULL then +sql create table st_int_2 using mt_int tags ('NULL') +sql select tagname from st_int_2 +if $data00 != NULL then return -1 endi sql create table st_int_3 using mt_int tags ('NULL') -sql describe st_int_3 -if $data23 != NULL then +sql select tagname from st_int_3 +if $data00 != NULL then return -1 endi -sql create table st_int_4 using mt_int tags ("null") -sql describe st_int_4 -if $data23 != NULL then +sql create table st_int_4 using mt_int tags ("NULL") +sql select tagname from st_int_4 +if $data00 != NULL then return -1 endi sql create table st_int_5 using mt_int tags ("NULL") -sql describe st_int_5 -if $data23 != NULL then +sql select tagname from st_int_5 +if $data00 != NULL then return -1 endi sql create table st_int_6 using mt_int tags (-2147483647) -sql describe st_int_6 -if $data23 != -2147483647 then +sql select tagname from st_int_6 +if $data00 != -2147483647 then return -1 endi sql create table st_int_7 using mt_int tags (2147483647) -sql describe st_int_7 -if $data23 != 2147483647 then +sql select tagname from st_int_7 +if $data00 != 2147483647 then return -1 endi sql create table st_int_8 using mt_int tags (37) -sql describe st_int_8 -if $data23 != 37 then +sql select tagname from st_int_8 +if $data00 != 37 then return -1 endi sql create table st_int_9 using mt_int tags (-100) -sql describe st_int_9 -if $data23 != -100 then +sql select tagname from st_int_9 +if $data00 != -100 then return -1 endi sql create table st_int_10 using mt_int tags (+113) -sql describe st_int_10 -if $data23 != 113 then +sql select tagname from st_int_10 +if $data00 != 113 then return -1 endi sql create table st_int_11 using mt_int tags ('-100') -sql describe st_int_11 -if $data23 != -100 then +sql select tagname from st_int_11 +if $data00 != -100 then return -1 endi sql create table st_int_12 using mt_int tags ("+78") -sql describe st_int_12 -if $data23 != 78 then +sql select tagname from st_int_12 +if $data00 != 78 then return -1 endi sql create table st_int_13 using mt_int tags (+0078) -sql describe st_int_13 -if $data23 != 78 then +sql select tagname from st_int_13 +if $data00 != 78 then return -1 endi sql create table st_int_14 using mt_int tags (-00078) -sql describe st_int_14 -if $data23 != -78 then +sql select tagname from st_int_14 +if $data00 != -78 then return -1 endi ## case 01: insert values for test column values -sql insert into st_int_0 values (now, null) +sql insert into st_int_0 values (now, NULL) sql select * from st_int_0 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_int_1 values (now, NULL) @@ -100,15 +100,15 @@ sql select * from st_int_1 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_int_2 values (now, 'null') +sql insert into st_int_2 values (now, 'NULL') sql select * from st_int_2 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_int_3 values (now, 'NULL') @@ -116,15 +116,15 @@ sql select * from st_int_3 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_int_4 values (now, "null") +sql insert into st_int_4 values (now, "NULL") sql select * from st_int_4 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_int_5 values (now, "NULL") @@ -132,7 +132,7 @@ sql select * from st_int_5 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_int_6 values (now, 2147483647) @@ -211,64 +211,64 @@ if $data01 != -56 then endi ## case 02: dynamic create table for test tag values -sql insert into st_int_16 using mt_int tags (null) values (now, null) -sql describe st_int_16 -if $data23 != NULL then +sql insert into st_int_16 using mt_int tags (NULL) values (now, NULL) +sql select tagname from st_int_16 +if $data00 != NULL then return -1 endi sql select * from st_int_16 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_int_17 using mt_int tags (NULL) values (now, NULL) -sql describe st_int_17 -if $data23 != NULL then +sql select tagname from st_int_17 +if $data00 != NULL then return -1 endi sql select * from st_int_17 -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_int_18 using mt_int tags ('null') values (now, 'null') -sql describe st_int_18 -if $data23 != NULL then +sql insert into st_int_18 using mt_int tags ('NULL') values (now, 'NULL') +sql select tagname from st_int_18 +if $data00 != NULL then return -1 endi sql select * from st_int_18 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_int_19 using mt_int tags ('NULL') values (now, 'NULL') -sql describe st_int_19 -if $data23 != NULL then +sql select tagname from st_int_19 +if $data00 != NULL then return -1 endi sql select * from st_int_19 -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_int_20 using mt_int tags ("null") values (now, "null") -sql describe st_int_20 -if $data23 != NULL then +sql insert into st_int_20 using mt_int tags ("NULL") values (now, "NULL") +sql select tagname from st_int_20 +if $data00 != NULL then return -1 endi sql select * from st_int_20 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_int_21 using mt_int tags ("NULL") values (now, "NULL") -sql describe st_int_21 -if $data23 != NULL then +sql select tagname from st_int_21 +if $data00 != NULL then return -1 endi sql select * from st_int_21 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_int_22 using mt_int tags (2147483647) values (now, 2147483647) -sql describe st_int_22 -if $data23 != 2147483647 then +sql select tagname from st_int_22 +if $data00 != 2147483647 then return -1 endi sql select * from st_int_22 @@ -276,8 +276,8 @@ if $data01 != 2147483647 then return -1 endi sql insert into st_int_23 using mt_int tags (-2147483647) values (now, -2147483647) -sql describe st_int_23 -if $data23 != -2147483647 then +sql select tagname from st_int_23 +if $data00 != -2147483647 then return -1 endi sql select * from st_int_23 @@ -285,8 +285,8 @@ if $data01 != -2147483647 then return -1 endi sql insert into st_int_24 using mt_int tags (10) values (now, 10) -sql describe st_int_24 -if $data23 != 10 then +sql select tagname from st_int_24 +if $data00 != 10 then return -1 endi sql select * from st_int_24 @@ -294,8 +294,8 @@ if $data01 != 10 then return -1 endi sql insert into st_int_25 using mt_int tags ("-0") values (now, "-0") -sql describe st_int_25 -if $data23 != 0 then +sql select tagname from st_int_25 +if $data00 != 0 then return -1 endi sql select * from st_int_25 @@ -303,8 +303,8 @@ if $data01 != 0 then return -1 endi sql insert into st_int_26 using mt_int tags ('123') values (now, '123') -sql describe st_int_26 -if $data23 != 123 then +sql select tagname from st_int_26 +if $data00 != 123 then return -1 endi sql select * from st_int_26 @@ -312,8 +312,8 @@ if $data01 != 123 then return -1 endi sql insert into st_int_27 using mt_int tags (+056) values (now, +00056) -sql describe st_int_27 -if $data23 != 56 then +sql select tagname from st_int_27 +if $data00 != 56 then return -1 endi sql select * from st_int_27 @@ -321,8 +321,8 @@ if $data01 != 56 then return -1 endi sql insert into st_int_28 using mt_int tags (-056) values (now, -0056) -sql describe st_int_28 -if $data23 != -56 then +sql select tagname from st_int_28 +if $data00 != -56 then return -1 endi sql select * from st_int_28 @@ -330,47 +330,47 @@ if $data01 != -56 then return -1 endi -## case 03: alter tag values -sql alter table st_int_0 set tag tagname=2147483647 -sql describe st_int_0 -if $data23 != 2147483647 then - return -1 -endi -sql alter table st_int_0 set tag tagname=-2147483647 -sql describe st_int_0 -if $data23 != -2147483647 then - return -1 -endi -sql alter table st_int_0 set tag tagname=+100 -sql describe st_int_0 -if $data23 != 100 then - return -1 -endi -sql alter table st_int_0 set tag tagname=-33 -sql describe st_int_0 -if $data23 != -33 then - return -1 -endi -sql alter table st_int_0 set tag tagname='+98' -sql describe st_int_0 -if $data23 != 98 then - return -1 -endi -sql alter table st_int_0 set tag tagname='-076' -sql describe st_int_0 -if $data23 != -76 then - return -1 -endi -sql alter table st_int_0 set tag tagname=+0012 -sql describe st_int_0 -if $data23 != 12 then - return -1 -endi -sql alter table st_int_0 set tag tagname=-00063 -sql describe st_int_0 -if $data23 != -63 then - return -1 -endi +### case 03: alter tag values +#sql alter table st_int_0 set tag tagname=2147483647 +#sql select tagname from st_int_0 +#if $data00 != 2147483647 then +# return -1 +#endi +#sql alter table st_int_0 set tag tagname=-2147483647 +#sql select tagname from st_int_0 +#if $data00 != -2147483647 then +# return -1 +#endi +#sql alter table st_int_0 set tag tagname=+100 +#sql select tagname from st_int_0 +#if $data00 != 100 then +# return -1 +#endi +#sql alter table st_int_0 set tag tagname=-33 +#sql select tagname from st_int_0 +#if $data00 != -33 then +# return -1 +#endi +#sql alter table st_int_0 set tag tagname='+98' +#sql select tagname from st_int_0 +#if $data00 != 98 then +# return -1 +#endi +#sql alter table st_int_0 set tag tagname='-076' +#sql select tagname from st_int_0 +#if $data00 != -76 then +# return -1 +#endi +#sql alter table st_int_0 set tag tagname=+0012 +#sql select tagname from st_int_0 +#if $data00 != 12 then +# return -1 +#endi +#sql alter table st_int_0 set tag tagname=-00063 +#sql select tagname from st_int_0 +#if $data00 != -63 then +# return -1 +#endi ## case 04: illegal input sql_error create table st_int_e0 using mt_int tags (2147483648) diff --git a/tests/script/general/parser/columnValue_smallint.sim b/tests/script/general/parser/columnValue_smallint.sim index bf41087d61048ed77d9391e4b6b3a5c2c978243d..cf34a85a2a7d8efb7b1d4e4606cead89055ae3b1 100644 --- a/tests/script/general/parser/columnValue_smallint.sim +++ b/tests/script/general/parser/columnValue_smallint.sim @@ -10,89 +10,89 @@ print ========== smallint sql create table mt_smallint (ts timestamp, c smallint) tags (tagname smallint) ## case 00: static create table for test tag values -sql create table st_smallint_0 using mt_smallint tags (null) -sql describe st_smallint_0 -if $data23 != NULL then +sql create table st_smallint_0 using mt_smallint tags (NULL) +sql select tagname from st_smallint_0 +if $data00 != NULL then return -1 endi sql create table st_smallint_1 using mt_smallint tags (NULL) -sql describe st_smallint_1 -if $data23 != NULL then +sql select tagname from st_smallint_1 +if $data00 != NULL then return -1 endi -sql create table st_smallint_2 using mt_smallint tags ('null') -sql describe st_smallint_2 -if $data23 != NULL then +sql create table st_smallint_2 using mt_smallint tags ('NULL') +sql select tagname from st_smallint_2 +if $data00 != NULL then return -1 endi sql create table st_smallint_3 using mt_smallint tags ('NULL') -sql describe st_smallint_3 -if $data23 != NULL then +sql select tagname from st_smallint_3 +if $data00 != NULL then return -1 endi -sql create table st_smallint_4 using mt_smallint tags ("null") -sql describe st_smallint_4 -if $data23 != NULL then +sql create table st_smallint_4 using mt_smallint tags ("NULL") +sql select tagname from st_smallint_4 +if $data00 != NULL then return -1 endi sql create table st_smallint_5 using mt_smallint tags ("NULL") -sql describe st_smallint_5 -if $data23 != NULL then +sql select tagname from st_smallint_5 +if $data00 != NULL then return -1 endi sql create table st_smallint_6 using mt_smallint tags (-32767) -sql describe st_smallint_6 -if $data23 != -32767 then +sql select tagname from st_smallint_6 +if $data00 != -32767 then return -1 endi sql create table st_smallint_7 using mt_smallint tags (32767) -sql describe st_smallint_7 -if $data23 != 32767 then +sql select tagname from st_smallint_7 +if $data00 != 32767 then return -1 endi sql create table st_smallint_8 using mt_smallint tags (37) -sql describe st_smallint_8 -if $data23 != 37 then +sql select tagname from st_smallint_8 +if $data00 != 37 then return -1 endi sql create table st_smallint_9 using mt_smallint tags (-100) -sql describe st_smallint_9 -if $data23 != -100 then +sql select tagname from st_smallint_9 +if $data00 != -100 then return -1 endi sql create table st_smallint_10 using mt_smallint tags (+113) -sql describe st_smallint_10 -if $data23 != 113 then +sql select tagname from st_smallint_10 +if $data00 != 113 then return -1 endi sql create table st_smallint_11 using mt_smallint tags ('-100') -sql describe st_smallint_11 -if $data23 != -100 then +sql select tagname from st_smallint_11 +if $data00 != -100 then return -1 endi sql create table st_smallint_12 using mt_smallint tags ("+78") -sql describe st_smallint_12 -if $data23 != 78 then +sql select tagname from st_smallint_12 +if $data00 != 78 then return -1 endi sql create table st_smallint_13 using mt_smallint tags (+0078) -sql describe st_smallint_13 -if $data23 != 78 then +sql select tagname from st_smallint_13 +if $data00 != 78 then return -1 endi sql create table st_smallint_14 using mt_smallint tags (-00078) -sql describe st_smallint_14 -if $data23 != -78 then +sql select tagname from st_smallint_14 +if $data00 != -78 then return -1 endi ## case 01: insert values for test column values -sql insert into st_smallint_0 values (now, null) +sql insert into st_smallint_0 values (now, NULL) sql select * from st_smallint_0 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_smallint_1 values (now, NULL) @@ -100,15 +100,15 @@ sql select * from st_smallint_1 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_smallint_2 values (now, 'null') +sql insert into st_smallint_2 values (now, 'NULL') sql select * from st_smallint_2 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_smallint_3 values (now, 'NULL') @@ -116,15 +116,15 @@ sql select * from st_smallint_3 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_smallint_4 values (now, "null") +sql insert into st_smallint_4 values (now, "NULL") sql select * from st_smallint_4 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_smallint_5 values (now, "NULL") @@ -132,7 +132,7 @@ sql select * from st_smallint_5 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_smallint_6 values (now, 32767) @@ -211,64 +211,64 @@ if $data01 != -56 then endi ## case 02: dynamic create table for test tag values -sql insert into st_smallint_16 using mt_smallint tags (null) values (now, null) -sql describe st_smallint_16 -if $data23 != NULL then +sql insert into st_smallint_16 using mt_smallint tags (NULL) values (now, NULL) +sql select tagname from st_smallint_16 +if $data00 != NULL then return -1 endi sql select * from st_smallint_16 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_smallint_17 using mt_smallint tags (NULL) values (now, NULL) -sql describe st_smallint_17 -if $data23 != NULL then +sql select tagname from st_smallint_17 +if $data00 != NULL then return -1 endi sql select * from st_smallint_17 -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_smallint_18 using mt_smallint tags ('null') values (now, 'null') -sql describe st_smallint_18 -if $data23 != NULL then +sql insert into st_smallint_18 using mt_smallint tags ('NULL') values (now, 'NULL') +sql select tagname from st_smallint_18 +if $data00 != NULL then return -1 endi sql select * from st_smallint_18 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_smallint_19 using mt_smallint tags ('NULL') values (now, 'NULL') -sql describe st_smallint_19 -if $data23 != NULL then +sql select tagname from st_smallint_19 +if $data00 != NULL then return -1 endi sql select * from st_smallint_19 -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_smallint_20 using mt_smallint tags ("null") values (now, "null") -sql describe st_smallint_20 -if $data23 != NULL then +sql insert into st_smallint_20 using mt_smallint tags ("NULL") values (now, "NULL") +sql select tagname from st_smallint_20 +if $data00 != NULL then return -1 endi sql select * from st_smallint_20 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_smallint_21 using mt_smallint tags ("NULL") values (now, "NULL") -sql describe st_smallint_21 -if $data23 != NULL then +sql select tagname from st_smallint_21 +if $data00 != NULL then return -1 endi sql select * from st_smallint_21 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_smallint_22 using mt_smallint tags (32767) values (now, 32767) -sql describe st_smallint_22 -if $data23 != 32767 then +sql select tagname from st_smallint_22 +if $data00 != 32767 then return -1 endi sql select * from st_smallint_22 @@ -276,8 +276,8 @@ if $data01 != 32767 then return -1 endi sql insert into st_smallint_23 using mt_smallint tags (-32767) values (now, -32767) -sql describe st_smallint_23 -if $data23 != -32767 then +sql select tagname from st_smallint_23 +if $data00 != -32767 then return -1 endi sql select * from st_smallint_23 @@ -285,8 +285,8 @@ if $data01 != -32767 then return -1 endi sql insert into st_smallint_24 using mt_smallint tags (10) values (now, 10) -sql describe st_smallint_24 -if $data23 != 10 then +sql select tagname from st_smallint_24 +if $data00 != 10 then return -1 endi sql select * from st_smallint_24 @@ -294,8 +294,8 @@ if $data01 != 10 then return -1 endi sql insert into st_smallint_25 using mt_smallint tags ("-0") values (now, "-0") -sql describe st_smallint_25 -if $data23 != 0 then +sql select tagname from st_smallint_25 +if $data00 != 0 then return -1 endi sql select * from st_smallint_25 @@ -303,8 +303,8 @@ if $data01 != 0 then return -1 endi sql insert into st_smallint_26 using mt_smallint tags ('123') values (now, '123') -sql describe st_smallint_26 -if $data23 != 123 then +sql select tagname from st_smallint_26 +if $data00 != 123 then return -1 endi sql select * from st_smallint_26 @@ -312,8 +312,8 @@ if $data01 != 123 then return -1 endi sql insert into st_smallint_27 using mt_smallint tags (+056) values (now, +00056) -sql describe st_smallint_27 -if $data23 != 56 then +sql select tagname from st_smallint_27 +if $data00 != 56 then return -1 endi sql select * from st_smallint_27 @@ -321,8 +321,8 @@ if $data01 != 56 then return -1 endi sql insert into st_smallint_28 using mt_smallint tags (-056) values (now, -0056) -sql describe st_smallint_28 -if $data23 != -56 then +sql select tagname from st_smallint_28 +if $data00 != -56 then return -1 endi sql select * from st_smallint_28 @@ -331,46 +331,46 @@ if $data01 != -56 then endi ## case 03: alter tag values -sql alter table st_smallint_0 set tag tagname=32767 -sql describe st_smallint_0 -if $data23 != 32767 then - return -1 -endi -sql alter table st_smallint_0 set tag tagname=-32767 -sql describe st_smallint_0 -if $data23 != -32767 then - return -1 -endi -sql alter table st_smallint_0 set tag tagname=+100 -sql describe st_smallint_0 -if $data23 != 100 then - return -1 -endi -sql alter table st_smallint_0 set tag tagname=-33 -sql describe st_smallint_0 -if $data23 != -33 then - return -1 -endi -sql alter table st_smallint_0 set tag tagname='+98' -sql describe st_smallint_0 -if $data23 != 98 then - return -1 -endi -sql alter table st_smallint_0 set tag tagname='-076' -sql describe st_smallint_0 -if $data23 != -76 then - return -1 -endi -sql alter table st_smallint_0 set tag tagname=+0012 -sql describe st_smallint_0 -if $data23 != 12 then - return -1 -endi -sql alter table st_smallint_0 set tag tagname=-00063 -sql describe st_smallint_0 -if $data23 != -63 then - return -1 -endi +#sql alter table st_smallint_0 set tag tagname=32767 +#sql select tagname from st_smallint_0 +#if $data00 != 32767 then +# return -1 +#endi +#sql alter table st_smallint_0 set tag tagname=-32767 +#sql select tagname from st_smallint_0 +#if $data00 != -32767 then +# return -1 +#endi +#sql alter table st_smallint_0 set tag tagname=+100 +#sql select tagname from st_smallint_0 +#if $data00 != 100 then +# return -1 +#endi +#sql alter table st_smallint_0 set tag tagname=-33 +#sql select tagname from st_smallint_0 +#if $data00 != -33 then +# return -1 +#endi +#sql alter table st_smallint_0 set tag tagname='+98' +#sql select tagname from st_smallint_0 +#if $data00 != 98 then +# return -1 +#endi +#sql alter table st_smallint_0 set tag tagname='-076' +#sql select tagname from st_smallint_0 +#if $data00 != -76 then +# return -1 +#endi +#sql alter table st_smallint_0 set tag tagname=+0012 +#sql select tagname from st_smallint_0 +#if $data00 != 12 then +# return -1 +#endi +#sql alter table st_smallint_0 set tag tagname=-00063 +#sql select tagname from st_smallint_0 +#if $data00 != -63 then +# return -1 +#endi ## case 04: illegal input sql_error create table st_smallint_e0 using mt_smallint tags (32768) diff --git a/tests/script/general/parser/columnValue_tinyint.sim b/tests/script/general/parser/columnValue_tinyint.sim index f0d1b4e0c48649f2abd50164502bc27a2a1e3e76..707242a23ed3eecde6c23413e53b67c5daa83a82 100644 --- a/tests/script/general/parser/columnValue_tinyint.sim +++ b/tests/script/general/parser/columnValue_tinyint.sim @@ -10,89 +10,90 @@ print ========== tinyint sql create table mt_tinyint (ts timestamp, c tinyint) tags (tagname tinyint) ## case 00: static create table for test tag values -sql create table st_tinyint_0 using mt_tinyint tags (null) -sql describe st_tinyint_0 -if $data23 != NULL then +sql create table st_tinyint_0 using mt_tinyint tags (NULL) +sql select tagname from st_tinyint_0 +if $data00 != NULL then + print expect NULL, actually: $data00 return -1 endi sql create table st_tinyint_1 using mt_tinyint tags (NULL) -sql describe st_tinyint_1 -if $data23 != NULL then +sql select tagname from st_tinyint_1 +if $data00 != NULL then return -1 endi -sql create table st_tinyint_2 using mt_tinyint tags ('null') -sql describe st_tinyint_2 -if $data23 != NULL then +sql create table st_tinyint_2 using mt_tinyint tags ('NULL') +sql select tagname from st_tinyint_2 +if $data00 != NULL then return -1 endi sql create table st_tinyint_3 using mt_tinyint tags ('NULL') -sql describe st_tinyint_3 -if $data23 != NULL then +sql select tagname from st_tinyint_3 +if $data00 != NULL then return -1 endi -sql create table st_tinyint_4 using mt_tinyint tags ("null") -sql describe st_tinyint_4 -if $data23 != NULL then +sql create table st_tinyint_4 using mt_tinyint tags ("NULL") +sql select tagname from st_tinyint_4 +if $data00 != NULL then return -1 endi sql create table st_tinyint_5 using mt_tinyint tags ("NULL") -sql describe st_tinyint_5 -if $data23 != NULL then +sql select tagname from st_tinyint_5 +if $data00 != NULL then return -1 endi sql create table st_tinyint_6 using mt_tinyint tags (-127) -sql describe st_tinyint_6 -if $data23 != -127 then +sql select tagname from st_tinyint_6 +if $data00 != -127 then return -1 endi sql create table st_tinyint_7 using mt_tinyint tags (127) -sql describe st_tinyint_7 -if $data23 != 127 then +sql select tagname from st_tinyint_7 +if $data00 != 127 then return -1 endi sql create table st_tinyint_8 using mt_tinyint tags (37) -sql describe st_tinyint_8 -if $data23 != 37 then +sql select tagname from st_tinyint_8 +if $data00 != 37 then return -1 endi sql create table st_tinyint_9 using mt_tinyint tags (-100) -sql describe st_tinyint_9 -if $data23 != -100 then +sql select tagname from st_tinyint_9 +if $data00 != -100 then return -1 endi sql create table st_tinyint_10 using mt_tinyint tags (+113) -sql describe st_tinyint_10 -if $data23 != 113 then +sql select tagname from st_tinyint_10 +if $data00 != 113 then return -1 endi sql create table st_tinyint_11 using mt_tinyint tags ('-100') -sql describe st_tinyint_11 -if $data23 != -100 then +sql select tagname from st_tinyint_11 +if $data00 != -100 then return -1 endi sql create table st_tinyint_12 using mt_tinyint tags ("+78") -sql describe st_tinyint_12 -if $data23 != 78 then +sql select tagname from st_tinyint_12 +if $data00 != 78 then return -1 endi sql create table st_tinyint_13 using mt_tinyint tags (+0078) -sql describe st_tinyint_13 -if $data23 != 78 then +sql select tagname from st_tinyint_13 +if $data00 != 78 then return -1 endi sql create table st_tinyint_14 using mt_tinyint tags (-00078) -sql describe st_tinyint_14 -if $data23 != -78 then +sql select tagname from st_tinyint_14 +if $data00 != -78 then return -1 endi ## case 01: insert values for test column values -sql insert into st_tinyint_0 values (now, null) +sql insert into st_tinyint_0 values (now, NULL) sql select * from st_tinyint_0 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_tinyint_1 values (now, NULL) @@ -100,15 +101,15 @@ sql select * from st_tinyint_1 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_tinyint_2 values (now, 'null') +sql insert into st_tinyint_2 values (now, 'NULL') sql select * from st_tinyint_2 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_tinyint_3 values (now, 'NULL') @@ -116,15 +117,15 @@ sql select * from st_tinyint_3 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_tinyint_4 values (now, "null") +sql insert into st_tinyint_4 values (now, "NULL") sql select * from st_tinyint_4 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_tinyint_5 values (now, "NULL") @@ -132,7 +133,7 @@ sql select * from st_tinyint_5 if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_tinyint_6 values (now, 127) @@ -211,64 +212,64 @@ if $data01 != -56 then endi ## case 02: dynamic create table for test tag values -sql insert into st_tinyint_16 using mt_tinyint tags (null) values (now, null) -sql describe st_tinyint_16 -if $data23 != NULL then +sql insert into st_tinyint_16 using mt_tinyint tags (NULL) values (now, NULL) +sql select tagname from st_tinyint_16 +if $data00 != NULL then return -1 endi sql select * from st_tinyint_16 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_tinyint_17 using mt_tinyint tags (NULL) values (now, NULL) -sql describe st_tinyint_17 -if $data23 != NULL then +sql select tagname from st_tinyint_17 +if $data00 != NULL then return -1 endi sql select * from st_tinyint_17 -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_tinyint_18 using mt_tinyint tags ('null') values (now, 'null') -sql describe st_tinyint_18 -if $data23 != NULL then +sql insert into st_tinyint_18 using mt_tinyint tags ('NULL') values (now, 'NULL') +sql select tagname from st_tinyint_18 +if $data00 != NULL then return -1 endi sql select * from st_tinyint_18 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_tinyint_19 using mt_tinyint tags ('NULL') values (now, 'NULL') -sql describe st_tinyint_19 -if $data23 != NULL then +sql select tagname from st_tinyint_19 +if $data00 != NULL then return -1 endi sql select * from st_tinyint_19 -if $data01 != null then +if $data01 != NULL then return -1 endi -sql insert into st_tinyint_20 using mt_tinyint tags ("null") values (now, "null") -sql describe st_tinyint_20 -if $data23 != NULL then +sql insert into st_tinyint_20 using mt_tinyint tags ("NULL") values (now, "NULL") +sql select tagname from st_tinyint_20 +if $data00 != NULL then return -1 endi sql select * from st_tinyint_20 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_tinyint_21 using mt_tinyint tags ("NULL") values (now, "NULL") -sql describe st_tinyint_21 -if $data23 != NULL then +sql select tagname from st_tinyint_21 +if $data00 != NULL then return -1 endi sql select * from st_tinyint_21 -if $data01 != null then +if $data01 != NULL then return -1 endi sql insert into st_tinyint_22 using mt_tinyint tags (127) values (now, 127) -sql describe st_tinyint_22 -if $data23 != 127 then +sql select tagname from st_tinyint_22 +if $data00 != 127 then return -1 endi sql select * from st_tinyint_22 @@ -276,8 +277,8 @@ if $data01 != 127 then return -1 endi sql insert into st_tinyint_23 using mt_tinyint tags (-127) values (now, -127) -sql describe st_tinyint_23 -if $data23 != -127 then +sql select tagname from st_tinyint_23 +if $data00 != -127 then return -1 endi sql select * from st_tinyint_23 @@ -285,8 +286,8 @@ if $data01 != -127 then return -1 endi sql insert into st_tinyint_24 using mt_tinyint tags (10) values (now, 10) -sql describe st_tinyint_24 -if $data23 != 10 then +sql select tagname from st_tinyint_24 +if $data00 != 10 then return -1 endi sql select * from st_tinyint_24 @@ -294,8 +295,8 @@ if $data01 != 10 then return -1 endi sql insert into st_tinyint_25 using mt_tinyint tags ("-0") values (now, "-0") -sql describe st_tinyint_25 -if $data23 != 0 then +sql select tagname from st_tinyint_25 +if $data00 != 0 then return -1 endi sql select * from st_tinyint_25 @@ -303,8 +304,8 @@ if $data01 != 0 then return -1 endi sql insert into st_tinyint_26 using mt_tinyint tags ('123') values (now, '123') -sql describe st_tinyint_26 -if $data23 != 123 then +sql select tagname from st_tinyint_26 +if $data00 != 123 then return -1 endi sql select * from st_tinyint_26 @@ -312,8 +313,8 @@ if $data01 != 123 then return -1 endi sql insert into st_tinyint_27 using mt_tinyint tags (+056) values (now, +00056) -sql describe st_tinyint_27 -if $data23 != 56 then +sql select tagname from st_tinyint_27 +if $data00 != 56 then return -1 endi sql select * from st_tinyint_27 @@ -321,8 +322,8 @@ if $data01 != 56 then return -1 endi sql insert into st_tinyint_28 using mt_tinyint tags (-056) values (now, -0056) -sql describe st_tinyint_28 -if $data23 != -56 then +sql select tagname from st_tinyint_28 +if $data00 != -56 then return -1 endi sql select * from st_tinyint_28 @@ -331,46 +332,46 @@ if $data01 != -56 then endi ## case 03: alter tag values -sql alter table st_tinyint_0 set tag tagname=127 -sql describe st_tinyint_0 -if $data23 != 127 then - return -1 -endi -sql alter table st_tinyint_0 set tag tagname=-127 -sql describe st_tinyint_0 -if $data23 != -127 then - return -1 -endi -sql alter table st_tinyint_0 set tag tagname=+100 -sql describe st_tinyint_0 -if $data23 != 100 then - return -1 -endi -sql alter table st_tinyint_0 set tag tagname=-33 -sql describe st_tinyint_0 -if $data23 != -33 then - return -1 -endi -sql alter table st_tinyint_0 set tag tagname='+98' -sql describe st_tinyint_0 -if $data23 != 98 then - return -1 -endi -sql alter table st_tinyint_0 set tag tagname='-076' -sql describe st_tinyint_0 -if $data23 != -76 then - return -1 -endi -sql alter table st_tinyint_0 set tag tagname=+0012 -sql describe st_tinyint_0 -if $data23 != 12 then - return -1 -endi -sql alter table st_tinyint_0 set tag tagname=-00063 -sql describe st_tinyint_0 -if $data23 != -63 then - return -1 -endi +#sql alter table st_tinyint_0 set tag tagname=127 +#sql select tagname from st_tinyint_0 +#if $data00 != 127 then +# return -1 +#endi +#sql alter table st_tinyint_0 set tag tagname=-127 +#sql select tagname from st_tinyint_0 +#if $data00 != -127 then +# return -1 +#endi +#sql alter table st_tinyint_0 set tag tagname=+100 +#sql select tagname from st_tinyint_0 +#if $data00 != 100 then +# return -1 +#endi +#sql alter table st_tinyint_0 set tag tagname=-33 +#sql select tagname from st_tinyint_0 +#if $data00 != -33 then +# return -1 +#endi +#sql alter table st_tinyint_0 set tag tagname='+98' +#sql select tagname from st_tinyint_0 +#if $data00 != 98 then +# return -1 +#endi +#sql alter table st_tinyint_0 set tag tagname='-076' +#sql select tagname from st_tinyint_0 +#if $data00 != -76 then +# return -1 +#endi +#sql alter table st_tinyint_0 set tag tagname=+0012 +#sql select tagname from st_tinyint_0 +#if $data00 != 12 then +# return -1 +#endi +#sql alter table st_tinyint_0 set tag tagname=-00063 +#sql select tagname from st_tinyint_0 +#if $data00 != -63 then +# return -1 +#endi ## case 04: illegal input sql_error create table st_tinyint_e0 using mt_tinyint tags (128) diff --git a/tests/script/general/parser/commit.sim b/tests/script/general/parser/commit.sim index eab9497b0b8132e87313e0d9e29fc411c54b98ed..2b69b1ab8c69a487bcd3852811ca3f615251446f 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 @@ -23,7 +23,7 @@ $stb = $stbPrefix . $i sql drop database $db -x step1 step1: -sql create database $db rows 255 ablocks 1024 tblocks 512 tables 100 ctime 3600 +sql create database $db maxrows 255 maxtables 100 ctime 3600 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 int) diff --git a/tests/script/general/parser/create_db.sim b/tests/script/general/parser/create_db.sim index b272ef1ddb6154195b248257d3586a51202bf591..6e11f9d25b26a91fb37c6562afb67394c6230529 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 @@ -163,7 +163,7 @@ sql_error create database $db rows 199 sql_error create database $db cache 99 #sql_error create database $db cache 10485761 -# ablocks [overwriten by 4*sessionsPerVnode, 409600] +# ablocks [overwriten by 4*maxtablesPerVnode, 409600] sql_error create database $db ablocks -1 #sql_error create database $db ablocks 409601 diff --git a/tests/script/general/parser/create_mt.sim b/tests/script/general/parser/create_mt.sim index 83dd09eb8f60532d655191f5399a917eda81f1a1..275393f4ac95766f0512577a01a4011dae8805ad 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 5e3007824aac3587946fa711edba94f257fceb0a..a3a18697a2a13b2cde3f63ad6916ab023d95e01e 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 c4a789da79310f0c0ada15c29200e4065ff3a31a..5dea4a09c5f10257a46f191cfafbcba48684f96a 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 33286ecfcb75db293895fca39f9e5ac66d41cbd4..c3966c47c130972112b50a2a4713cddeebe69b2d 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 8fecaeb4c4c48374a388d47539c9d3022744975a..a40e5d15a41563c19111ab702a295e4c9f6f8fa2 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 b5133ed9a1eb6aa05bc3961fe150b0c7f4fa47a9..8bede7573a95677f11faf1043feaf7a20b3c178e 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 @@ -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) @@ -69,7 +69,7 @@ sql import into $tb (ts) values ( $ts ) print ====== test data created -run lite/parser/first_last_query.sim +run general/parser/first_last_query.sim print ================== restart server to commit data into disk system sh/exec.sh -n dnode1 -s stop -x SIGINT @@ -79,5 +79,5 @@ print ================== server restart completed sql connect sleep 3000 -run lite/parser/first_last_query.sim +run general/parser/first_last_query.sim diff --git a/tests/script/general/parser/groupby.sim b/tests/script/general/parser/groupby.sim index 4d367999b2b649a92a717d02d6c649784084356c..5bf41772ed8141bc6ecccec48237d6b859846deb 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 @@ -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/import.sim b/tests/script/general/parser/import.sim index 465f077fecd90f68ccdf0a33edc13cadc714141b..7ab0437685869594daded7fcfd9c886339842221 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 a1bc057aef700e7ea4a8475896299b1165a62d4d..743642f2082da9dab10a0fc03d13ae169d7742f3 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 c02905a2d599770e6a60c20f6667de65ec634c9a..9d5cfff672157ab420b63b1061dc62aef52b1d9b 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 c37ecd9a17f4d6cd7e7acb91dd5b677f7fa421b7..7a1f1e902cfdfd4fc744494aa80a4027bbb62a67 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 f0fef295c4a1366c673ad887dedbb2efd7ede562..cd63612a0e31f48c1e2e4e1ede2800bb8f51e342 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 503ab7e1da172aafe7421d98996d6ccafd992d47..b24c1b629fa371e417826bcb1da67180f3317c29 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 c69228d6625f6ad13b5c23cfd6be81778825166d..201bb2878642f20a87ead70c387851bcd8ba847e 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 78369ec84c50648b995727bada101117db4bb97b..c7c633d42266d364e0ae234ed632225f6806e0ef 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 @@ -56,7 +56,7 @@ while $i < $halfNum endw print ====== tables created -run lite/parser/interp_test.sim +run general/parser/interp_test.sim print ================== restart server to commit data into disk system sh/exec.sh -n dnode1 -s stop -x SIGINT @@ -64,4 +64,4 @@ sleep 2000 system sh/exec.sh -n dnode1 -s start print ================== server restart completed -run lite/parser/interp_test.sim +run general/parser/interp_test.sim diff --git a/tests/script/general/parser/join.sim b/tests/script/general/parser/join.sim index b90579d8d83396437da451accdcaaa4931f280ee..6addcb1ac194af250e4ff25493058d0a891056c3 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 @@ -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 983b7fad45354e4ff505f0b48b8c8234d4497e87..86488ea8442fccecf35995fccd340afff4be96c7 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 @@ -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 50317c7abc84ce11a6eef4c04549e2606fd4d367..5eb3b144a6f0fe405ffcacf3ed5571d9de820417 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 @@ -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) @@ -57,7 +57,7 @@ endw print ====== test data created -run lite/parser/lastrow_query.sim +run general/parser/lastrow_query.sim print ================== restart server to commit data into disk system sh/exec.sh -n dnode1 -s stop -x SIGINT @@ -67,4 +67,4 @@ print ================== server restart completed sql connect sleep 3000 -run lite/parser/lastrow_query.sim +run general/parser/lastrow_query.sim diff --git a/tests/script/general/parser/limit.sim b/tests/script/general/parser/limit.sim index 16b2a2878c624c7a56869e14eafbc87c0854fe8b..8f00912a59f40106468e2c67cbbd8b9b669540db 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 @@ -56,8 +56,8 @@ while $i < $halfNum endw print ====== tables created -run lite/parser/limit_tb.sim -run lite/parser/limit_stb.sim +run general/parser/limit_tb.sim +run general/parser/limit_stb.sim print ================== restart server to commit data into disk system sh/exec.sh -n dnode1 -s stop -x SIGINT @@ -67,5 +67,5 @@ print ================== server restart completed sql connect sleep 3000 -run lite/parser/limit_tb.sim -run lite/parser/limit_stb.sim +run general/parser/limit_tb.sim +run general/parser/limit_stb.sim diff --git a/tests/script/general/parser/limit1.sim b/tests/script/general/parser/limit1.sim index 9856365f8e56e23285f2ee5ad2882f50195c791a..040b6303de7eda3b997344f9cdde7055786f0eae 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 @@ -56,8 +56,8 @@ while $i < $halfNum endw print ====== tables created -run lite/parser/limit1_tb.sim -run lite/parser/limit1_stb.sim +run general/parser/limit1_tb.sim +run general/parser/limit1_stb.sim print ================== restart server to commit data into disk system sh/exec.sh -n dnode1 -s stop -x SIGINT @@ -65,5 +65,5 @@ sleep 2000 system sh/exec.sh -n dnode1 -s start print ================== server restart completed -run lite/parser/limit1_tb.sim -run lite/parser/limit1_stb.sim +run general/parser/limit1_tb.sim +run general/parser/limit1_stb.sim diff --git a/tests/script/general/parser/limit1_tblocks100.sim b/tests/script/general/parser/limit1_tblocks100.sim index b89b7892d442fd8c655c1478a869401fe9251c66..a7764596400b3088f0d02e0bd8e0a36382a66f45 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 @@ -56,8 +56,8 @@ while $i < $halfNum endw print ====== tables created -run lite/parser/limit1_tb.sim -run lite/parser/limit1_stb.sim +run general/parser/limit1_tb.sim +run general/parser/limit1_stb.sim print ================== restart server to commit data into disk system sh/exec.sh -n dnode1 -s stop -x SIGINT @@ -65,5 +65,5 @@ sleep 2000 system sh/exec.sh -n dnode1 -s start print ================== server restart completed -run lite/parser/limit1_tb.sim -run lite/parser/limit1_stb.sim +run general/parser/limit1_tb.sim +run general/parser/limit1_stb.sim diff --git a/tests/script/general/parser/limit2.sim b/tests/script/general/parser/limit2.sim index 71f1c6f2e817d378ec7d29da405c9473eb9ea2ab..cc9334db36bec8a0faa64fc16ba7d0de8a1f199f 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 @@ -65,7 +65,7 @@ while $i < $halfNum endw print ====== tables created -#run lite/parser/limit2_query.sim +#run general/parser/limit2_query.sim print ================== restart server to commit data into disk system sh/exec.sh -n dnode1 -s stop -x SIGINT @@ -73,4 +73,4 @@ sleep 3000 system sh/exec.sh -n dnode1 -s start print ================== server restart completed -run lite/parser/limit2_query.sim +run general/parser/limit2_query.sim diff --git a/tests/script/general/parser/limit2_tblocks100.sim b/tests/script/general/parser/limit2_tblocks100.sim index a91103270dcd23eaef3a96906b7a294c0d1419d1..64f86edd28092bc816b663719c0ab153ff1181e0 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 @@ -65,7 +65,7 @@ while $i < $halfNum endw print ====== tables created -#run lite/parser/limit2_query.sim +#run general/parser/limit2_query.sim print ================== restart server to commit data into disk system sh/exec.sh -n dnode1 -s stop -x SIGINT @@ -73,4 +73,4 @@ sleep 3000 system sh/exec.sh -n dnode1 -s start print ================== server restart completed -run lite/parser/limit2_query.sim +run general/parser/limit2_query.sim diff --git a/tests/script/general/parser/mixed_blocks.sim b/tests/script/general/parser/mixed_blocks.sim index 29f6d2a7425982739299944b978c35002819b519..37ba1a8900cbba5460b2a51816a27c7a904bf8de 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 @@ -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/nchar.sim b/tests/script/general/parser/nchar.sim index 51853825c1d82aea4cece67b102d1af53312c2d1..fbdc12446ac050cf36e751a971a00e20e73be92b 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 225c7b6cb7ee910173cf2cc313ec3fe716d3f3f7..ae402a477de2e4053479a32079d2dc3f9b9494bc 100644 --- a/tests/script/general/parser/null_char.sim +++ b/tests/script/general/parser/null_char.sim @@ -2,9 +2,8 @@ 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 meterMetaKeepTimer -v 3 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 3 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/parser/projection_limit_offset.sim b/tests/script/general/parser/projection_limit_offset.sim index 21c2151b7771c7edd3cf68a59b16f5a2aab936fe..d990a79628e213502de73283999761755f572efa 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 @@ -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/repeatAlter.sim b/tests/script/general/parser/repeatAlter.sim index eec82f62c08b7a7bec8a425b88237e184fc29988..5f6a8e6a2a9cf81047ebd0050678b04b3fa2bd94 100644 --- a/tests/script/general/parser/repeatAlter.sim +++ b/tests/script/general/parser/repeatAlter.sim @@ -2,6 +2,6 @@ $i = 1 $loops = 10 while $i <= $loops print ====== repeat: $i - run lite/parser/alter.sim + run general/parser/alter.sim $i = $i + 1 endw diff --git a/tests/script/general/parser/repeatStream.sim b/tests/script/general/parser/repeatStream.sim index 1301462c314566732bf08a576ee796e527aed14e..bd631e36a136ce792bef574428d94fe18b99b18e 100644 --- a/tests/script/general/parser/repeatStream.sim +++ b/tests/script/general/parser/repeatStream.sim @@ -2,6 +2,6 @@ $i = 1 $repeats = 5 while $i <= $repeats print ====== repeat: $i - run lite/parser/stream.sim + run general/parser/stream.sim $i = $i + 1 endw diff --git a/tests/script/general/parser/selectResNum.sim b/tests/script/general/parser/selectResNum.sim index dd06d2652126b4ac19d7cd311d4a159f0266ba7e..0a4eafc8a0554d324c56f96104dbcb65eb505f25 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 67c727ef289746a107fee4315f57370eeeedeb68..883d4d59cdfafd3f7f33d55ea340712a56d62ac0 100644 --- a/tests/script/general/parser/select_across_vnodes.sim +++ b/tests/script/general/parser/select_across_vnodes.sim @@ -1,8 +1,8 @@ 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 sessionsPerVnode -v 5 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 5 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/select_from_cache_disk.sim b/tests/script/general/parser/select_from_cache_disk.sim index 9450d41720ceb8c83959b9f39f8e42dac3ba565f..04cc68c310951539c0b0dc5dab1e81ef69f67eb3 100644 --- a/tests/script/general/parser/select_from_cache_disk.sim +++ b/tests/script/general/parser/select_from_cache_disk.sim @@ -1,8 +1,8 @@ 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 sessionsPerVnode -v 2 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 2 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/select_with_tags.sim b/tests/script/general/parser/select_with_tags.sim index 92e30bc9149180996cb242745f885ca47669b89b..181d7f312a14633abc5a86fa28eb19576f3cf72d 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 @@ -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/set_tag_vals.sim b/tests/script/general/parser/set_tag_vals.sim index 62fef458466370fc0d41ca4cc9ad534307e8a371..270b6ed0656515bc703dd43f39479cef828d2cf1 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 1a159d97fdb639da51e57d439c83d1811e46358c..5ee65e3b10c992681497606526afe064ab70237e 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 @@ -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) @@ -27,7 +27,7 @@ sql create table $tb1 using $stb tags( 1 ) sql insert into $tb1 values ( $ts0 , 1, 2, 3, 4, true, 'binay10', '涛思nchar10' ) print ====== tables created -run lite/parser/single_row_in_tb_query.sim +run general/parser/single_row_in_tb_query.sim print ================== restart server to commit data into disk system sh/exec.sh -n dnode1 -s stop -x SIGINT @@ -35,4 +35,4 @@ sleep 2000 system sh/exec.sh -n dnode1 -s start print ================== server restart completed -run lite/parser/single_row_in_tb_query.sim +run general/parser/single_row_in_tb_query.sim diff --git a/tests/script/general/parser/slimit.sim b/tests/script/general/parser/slimit.sim index 61abf1eb2a06325686270ecbee65601b6d4d1c29..7d2d3fc60b11e5b8d978030f430807fd6d598ba8 100644 --- a/tests/script/general/parser/slimit.sim +++ b/tests/script/general/parser/slimit.sim @@ -1,8 +1,8 @@ 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 sessionsPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/exec.sh -n dnode1 -s start sleep 3000 @@ -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) @@ -94,7 +94,7 @@ while $i < $tbNum endw print ====== $db tables created -run lite/parser/slimit_query.sim +run general/parser/slimit_query.sim print ================== restart server to commit data into disk system sh/exec.sh -n dnode1 -s stop -x SIGINT @@ -104,4 +104,4 @@ print ================== server restart completed sql connect sleep 3000 -run lite/parser/slimit_query.sim +run general/parser/slimit_query.sim diff --git a/tests/script/general/parser/slimit1.sim b/tests/script/general/parser/slimit1.sim index d034d5bf1719cb978e40f19ab45541583aeac7f4..7020cc8bb75b93cfee15a7c1fdd081a031c161c1 100644 --- a/tests/script/general/parser/slimit1.sim +++ b/tests/script/general/parser/slimit1.sim @@ -1,8 +1,8 @@ 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 sessionsPerVnode -v 2 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 2 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10 system sh/exec.sh -n dnode1 -s start sleep 3000 @@ -53,7 +53,7 @@ endw print ================== tables and data created -run lite/parser/slimit1_query.sim +run general/parser/slimit1_query.sim print ================== restart server to commit data into disk system sh/exec.sh -n dnode1 -s stop -x SIGINT @@ -63,4 +63,4 @@ print ================== server restart completed sql connect sleep 3000 -run lite/parser/slimit1_query.sim +run general/parser/slimit1_query.sim diff --git a/tests/script/general/parser/slimit_alter_tags.sim b/tests/script/general/parser/slimit_alter_tags.sim index 6579549287b2c01fc883e6ad7701a9bd9a81ed96..630855260c87f96b933be1ae2390e5516092f5a3 100644 --- a/tests/script/general/parser/slimit_alter_tags.sim +++ b/tests/script/general/parser/slimit_alter_tags.sim @@ -1,8 +1,8 @@ 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 sessionsPerVnode -v 2 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 2 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/parser/stream.sim b/tests/script/general/parser/stream.sim index b3334d970ecd46a881b9de21e10caca1ba1db2ba..c4be6efa1c6b81dbf2e2e554caf6eb621d0daf26 100644 --- a/tests/script/general/parser/stream.sim +++ b/tests/script/general/parser/stream.sim @@ -1,9 +1,8 @@ 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 meterMetaKeepTimer -v 5 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 5 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c tableMetaKeepTimer -v 5 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/general/parser/stream_on_sys.sim b/tests/script/general/parser/stream_on_sys.sim index aa3595eaf64a28edbacbe9fe6025e1fd3aed1c4f..b7bf7a8900238fd8e2490a7fa58a75478fd641a7 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 ca8d335742175478760cb94ea6abad65b0cc6a22..af514d1a0750f9a0c31121bbd8f11f5afd0f69b5 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 bc6c6c52f073a5c7f0cd6648cf470704d1d9250d..42e8c8f9f9208cb0185cd3afd7e9b7614c1c2094 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 38551dd59e082c7cce5895b6954e5a407a93a902..548560e945efc8a47d2a54f3c2d17cc0574d8352 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 @@ -64,7 +64,7 @@ while $i < $halfNum endw print ====== tables created -run lite/parser/tbnameIn_query.sim +run general/parser/tbnameIn_query.sim print ================== restart server to commit data into disk system sh/exec.sh -n dnode1 -s stop -x SIGINT @@ -72,4 +72,4 @@ sleep 2000 system sh/exec.sh -n dnode1 -s start print ================== server restart completed -run lite/parser/tbnameIn_query.sim +run general/parser/tbnameIn_query.sim diff --git a/tests/script/general/parser/testSuite.sim b/tests/script/general/parser/testSuite.sim index 402ed19918fbd3087a297d708312b653b387a4b9..d1228f582044e2c451c9f1a1e8671986fdb1278e 100644 --- a/tests/script/general/parser/testSuite.sim +++ b/tests/script/general/parser/testSuite.sim @@ -1,12 +1,13 @@ -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 8d407dd5cc6444ffc64f7675aef9826e34ed3ff4..ce2b62fcc9a1aad21b41d8013cd9388929fbcdb3 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 @@ -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)) @@ -54,7 +54,7 @@ while $i < $tbNum endw print ====== $db tables created -run lite/parser/timestamp_query.sim +run general/parser/timestamp_query.sim print ================== restart server to commit data into disk system sh/exec.sh -n dnode1 -s stop -x SIGINT @@ -64,4 +64,4 @@ print ================== server restart completed sql connect sleep 3000 -run lite/parser/timestamp_query.sim +run general/parser/timestamp_query.sim diff --git a/tests/script/general/parser/where.sim b/tests/script/general/parser/where.sim index 05237c392b9bb82d0946779f2a2cf9fdf7ea1e22..c840bcf22e76c8db4da773c58464efde1e0674c4 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 @@ -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/show/dnodes.sim b/tests/script/general/show/dnodes.sim deleted file mode 100644 index 46091383259fc3b2040732e63fa1672596122fab..0000000000000000000000000000000000000000 --- a/tests/script/general/show/dnodes.sim +++ /dev/null @@ -1,16 +0,0 @@ -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/exec.sh -n dnode1 -s start -sql connect - -print =============== unsupport -sql_error create dnode $hostname2 -sql_error drop dnode $hostname2 - -print =============== show dnodes -sql show dnodes; -if $rows != 1 then - return -1 -endi - -print $data00 $data01 $data02 diff --git a/tests/script/general/stream/metrics_1.sim b/tests/script/general/stream/metrics_1.sim index 2e8d02bf21413abd2a18dc23dc6ec76a54681dd4..c60bde6b2f00c6b888899faef75c21a2c732db9e 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 7ca74dc102e01dfd7cf7f3589e693b99950fdef6..025f4cbdc0568ff2c5a821b17ca7aaa200870473 100644 --- a/tests/script/general/stream/metrics_del.sim +++ b/tests/script/general/stream/metrics_del.sim @@ -1,10 +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 numOfBlocksPerMeter -v 4 -system sh/cfg.sh -n dnode1 -c pointsPerCompBlock -v 100 -system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024 +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_n.sim b/tests/script/general/stream/metrics_n.sim index 31f9fc64ffe9c54489522a8fac7b8a2cf1beb05d..47089403dd2f64c3cb5b216ed8258433d74c40d6 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 76ffd99d89ada975c068d08194c85342b1a9c25e..13cd18adf312e01781482ed82918c47b7ce3e1cb 100644 --- a/tests/script/general/stream/metrics_replica1_vnoden.sim +++ b/tests/script/general/stream/metrics_replica1_vnoden.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 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/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/stream/stream_1.sim b/tests/script/general/stream/stream_1.sim index bb2d4a05a5be8a67448dee358c8721ac733f3c75..2309d341c1464cd455055691a68a5fefad03b762 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 d0fa60ff9096b724f2e97b7555a0f57a47cdad2b..ed45784584120e25fe2c039e07d754d1309db958 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 3e7d574cd4538b5a8fa77207f3693e67053fbc65..914ecd848492dd837024417c2341d135cad25c1d 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,10 +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 numOfBlocksPerMeter -v 4 -system sh/cfg.sh -n dnode1 -c pointsPerCompBlock -v 100 -system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/exec.sh -n dnode1 -s start sleep 4000 diff --git a/tests/script/general/stream/stream_restart.sim b/tests/script/general/stream/stream_restart.sim index f37fbf471d95f63bf41498a5c8a25b82b51a7e43..d5fbef49083d266d38c8702990aaec61039252c9 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 be45a98f4904165fb3d7017fefd3a98b9c991cea..efc7c370cab780919442fdf705e26bd273b15364 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 a2db5b250dcea8c61b77e749c70bab30bfc038ce..16dc8c2bb12caf1dd5e4c31523fe03667b8335dd 100644 --- a/tests/script/general/stream/table_del.sim +++ b/tests/script/general/stream/table_del.sim @@ -1,10 +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 numOfBlocksPerMeter -v 4 -system sh/cfg.sh -n dnode1 -c pointsPerCompBlock -v 100 -system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024 +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_n.sim b/tests/script/general/stream/table_n.sim index 49e8e723da9548d53a97283653a20a99766c7797..e6037c5292b9e0da7f5fbd57a67fda88795a26ee 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 1ed649a3fb4290cf6964f89faae3d0332d160ac4..44d4008dbd36594575472477b4a36887bc5f25ba 100644 --- a/tests/script/general/stream/table_replica1_vnoden.sim +++ b/tests/script/general/stream/table_replica1_vnoden.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 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/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sleep 3000 diff --git a/tests/script/general/table/autocreate.sim b/tests/script/general/table/autocreate.sim index eac153e3c21581192eef02fb1c9e9822549b508f..02910c27378a19620ead9b7c047061a2bf676925 100644 --- a/tests/script/general/table/autocreate.sim +++ b/tests/script/general/table/autocreate.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== create database @@ -100,3 +101,5 @@ sql select * from db.s4 if $rows != 3 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/basic1.sim b/tests/script/general/table/basic1.sim index 0e425c95f9f7885ccd11af53d8def960f6f28ccf..e8d0cd7bd8bd0b6f3dd7193b12a33c70bb46f95b 100644 --- a/tests/script/general/table/basic1.sim +++ b/tests/script/general/table/basic1.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== create database @@ -69,3 +70,4 @@ if $data21 != 3 then return -1 endi +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/basic2.sim b/tests/script/general/table/basic2.sim index 40688403a86b536130794b0d70cd109d2cc5f694..d1678e8abd984b3aaa5061feb9430550d8909feb 100644 --- a/tests/script/general/table/basic2.sim +++ b/tests/script/general/table/basic2.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== one table @@ -65,3 +66,4 @@ if $data21 != 3 then return -1 endi +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/basic3.sim b/tests/script/general/table/basic3.sim index 18c3f9b6251324d19dd3f21edcd7b29707ab1fa2..7f90dc0c52f5ed5439e82f86c3318282d3dc39d7 100644 --- a/tests/script/general/table/basic3.sim +++ b/tests/script/general/table/basic3.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start +sleep 3000 sql connect print =============== create database @@ -69,3 +70,4 @@ if $data21 != 3 then return -1 endi +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/bigint.sim b/tests/script/general/table/bigint.sim index 4145968fbd767b5ef7e6be3254824d440e110bf0..dd61d25ef9f2c300a33ef8a30bcc17a1ab5d867d 100644 --- a/tests/script/general/table/bigint.sim +++ b/tests/script/general/table/bigint.sim @@ -1,8 +1,6 @@ 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 @@ -71,3 +69,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/binary.sim b/tests/script/general/table/binary.sim index b0c5166d2021089ac21bf4319087f54c9ba14b2a..cdbfcd4cbfe15438db884cd69b149c6e3519b6e6 100644 --- a/tests/script/general/table/binary.sim +++ b/tests/script/general/table/binary.sim @@ -1,8 +1,6 @@ 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 @@ -61,3 +59,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/bool.sim b/tests/script/general/table/bool.sim index b55147b67e70e3243b4dc362458fdd19606de428..fbb6fe823cf30fc18302855aca9e847373cd1f6f 100644 --- a/tests/script/general/table/bool.sim +++ b/tests/script/general/table/bool.sim @@ -1,8 +1,6 @@ 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 @@ -90,3 +88,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/column2.sim b/tests/script/general/table/column2.sim index 4c27ae68ade9b5d09b34ca33a6faceddf573152f..9251e31daa633b45dae6ea7c6240d6c7a731f405 100644 --- a/tests/script/general/table/column2.sim +++ b/tests/script/general/table/column2.sim @@ -1,8 +1,6 @@ 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 @@ -23,4 +21,6 @@ sql drop database db sql show databases if $rows != 0 then return -1 -endi \ No newline at end of file +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/column_name.sim b/tests/script/general/table/column_name.sim index 41a4179a41ea23f841e5baf8635adcd16ed75b96..0b09f65129d2204c4088e5aff55c08384988a2b5 100644 --- a/tests/script/general/table/column_name.sim +++ b/tests/script/general/table/column_name.sim @@ -1,8 +1,6 @@ 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 @@ -85,6 +83,4 @@ if $rows != 0 then return -1 endi - - - +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/column_num.sim b/tests/script/general/table/column_num.sim index bf82b9fc058e9b2d71cdc6818411edea67d895b0..d1091528b249cc35f31ab623b29d4dc3148c9836 100644 --- a/tests/script/general/table/column_num.sim +++ b/tests/script/general/table/column_num.sim @@ -1,8 +1,6 @@ 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 @@ -83,3 +81,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/column_value.sim b/tests/script/general/table/column_value.sim index 2a1636e5ca4196f88dce9c9a72ff3ce92c0e0cf1..bd98d3b2909eec26ceadbebdf35702f622622c50 100644 --- a/tests/script/general/table/column_value.sim +++ b/tests/script/general/table/column_value.sim @@ -1,8 +1,6 @@ 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 @@ -77,6 +75,4 @@ if $rows != 0 then return -1 endi - - - +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/date.sim b/tests/script/general/table/date.sim index f702a557504384ed0525522a9b3b185f7100b0ea..2e73a217a616859781f709cfa9c7117f6e34b9ae 100644 --- a/tests/script/general/table/date.sim +++ b/tests/script/general/table/date.sim @@ -1,8 +1,6 @@ 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 @@ -88,3 +86,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/db.table.sim b/tests/script/general/table/db.table.sim index 653a73310f4c9391ae3ff60403fb73bae445bbde..50224f83b554001cd725926986d4769d36a47cb7 100644 --- a/tests/script/general/table/db.table.sim +++ b/tests/script/general/table/db.table.sim @@ -1,8 +1,6 @@ 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 @@ -44,4 +42,6 @@ sql drop database $db sql show databases if $rows != 0 then return -1 -endi \ No newline at end of file +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/delete_reuse1.sim b/tests/script/general/table/delete_reuse1.sim index 1f42637088dda7772e4dd18f7eb282046e5491a9..94f5bdb2876e60b773003bf5584f2a235fd1b500 100644 --- a/tests/script/general/table/delete_reuse1.sim +++ b/tests/script/general/table/delete_reuse1.sim @@ -1,18 +1,13 @@ 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 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 @@ -87,3 +82,5 @@ while $x < 20 print ===> loop times: $x endw + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/delete_reuse2.sim b/tests/script/general/table/delete_reuse2.sim index 238eac975dc14afb28cca72c33431a4138437bf0..1a9c80cff075bb06db5721bedca64ae4ba5bedc0 100644 --- a/tests/script/general/table/delete_reuse2.sim +++ b/tests/script/general/table/delete_reuse2.sim @@ -1,18 +1,13 @@ 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 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 @@ -89,3 +84,5 @@ while $x < 20 print ===> loop times: $x endw + +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/general/table/delete_writing.sim b/tests/script/general/table/delete_writing.sim index b697c7f8419b1a37d06e5abc20344c7e33ad758d..73d028928fca665e643ce052c9e7592508950ee0 100644 --- a/tests/script/general/table/delete_writing.sim +++ b/tests/script/general/table/delete_writing.sim @@ -1,18 +1,13 @@ 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 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 @@ -40,7 +35,7 @@ sql create table db.tb (ts timestamp, i int) sql insert into db.tb values(now, 1) print ======== start back -run_back lite/table/back_insert.sim +run_back general/table/back_insert.sim sleep 1000 print ======== step1 @@ -57,3 +52,5 @@ while $x < 20 $x = $x + 1 endw + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/describe.sim b/tests/script/general/table/describe.sim index fd9a8eda18729e1f27e655d6d323680a7dbc41e3..ebec004f1964119d97504f8bc78a0b42941824ab 100644 --- a/tests/script/general/table/describe.sim +++ b/tests/script/general/table/describe.sim @@ -1,8 +1,6 @@ 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 @@ -47,4 +45,5 @@ sql show databases if $rows != 0 then return -1 endi - \ No newline at end of file + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/double.sim b/tests/script/general/table/double.sim index 36013be51d137bf12dab189a15244048871be392..10239568fe488de55961e134a8e248cb83963393 100644 --- a/tests/script/general/table/double.sim +++ b/tests/script/general/table/double.sim @@ -1,8 +1,6 @@ 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 @@ -96,3 +94,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/float.sim b/tests/script/general/table/float.sim index 195a2268b74ac0fec529102dfd7f95244d955226..e4ef8a42d67569aa75dda90236861ac11c951870 100644 --- a/tests/script/general/table/float.sim +++ b/tests/script/general/table/float.sim @@ -1,8 +1,6 @@ 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 @@ -96,3 +94,5 @@ sql show databases if $rows != 0 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/int.sim b/tests/script/general/table/int.sim index 0f8223896c1ae6699bcf139a7d9f482702caf7fe..5c5b542e0acfc9e84574dd6aaa396a4b23c804fc 100644 --- a/tests/script/general/table/int.sim +++ b/tests/script/general/table/int.sim @@ -1,8 +1,6 @@ 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 @@ -133,3 +131,4 @@ if $rows != 0 then return -1 endi +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/limit.sim b/tests/script/general/table/limit.sim index e01a209b610db32ebaceca4dd03d1bed193a6908..46fc5103c1b4272cdea09dc1a075d58964f1f042 100644 --- a/tests/script/general/table/limit.sim +++ b/tests/script/general/table/limit.sim @@ -1,10 +1,8 @@ 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/cfg.sh -n dnode1 -c maxtablesPerVnode -v 129 system sh/exec.sh -n dnode1 -s start sleep 3000 @@ -19,7 +17,7 @@ $db = $dbPrefix . $i $tb = $tbPrefix . $i print =================== step 0 -sql create database $db tables 129 +sql create database $db maxtables 129 sql use $db sql show vgroups if $rows != 0 then @@ -91,4 +89,6 @@ sql drop database $db sql show databases if $rows != 0 then return -1 -endi \ No newline at end of file +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/smallint.sim b/tests/script/general/table/smallint.sim index 6a0fbd7fb5bc0111eb58af1bb56a860069dfe16c..b6f0d6948faf9323085902cfc9b463238cb3f9ca 100644 --- a/tests/script/general/table/smallint.sim +++ b/tests/script/general/table/smallint.sim @@ -1,8 +1,6 @@ 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 @@ -24,7 +22,8 @@ sql select * from $tb order by ts desc if $rows != 1 then return -1 endi -if $data01 != null then +print $data01 +if $data01 != NULL then return -1 endi @@ -37,7 +36,7 @@ sql select * from $tb order by ts desc if $rows != 2 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi @@ -60,7 +59,7 @@ sql select * from $tb order by ts desc if $rows != 4 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi @@ -102,4 +101,5 @@ sql show databases if $rows != 0 then return -1 endi - \ No newline at end of file + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/table.sim b/tests/script/general/table/table.sim index 468e60f1baa74c7ff3923acfb4101d3813f51177..6ad1b13b1cae6cd05b3b0bd3de4c648e4aab1fde 100644 --- a/tests/script/general/table/table.sim +++ b/tests/script/general/table/table.sim @@ -1,8 +1,6 @@ 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 @@ -223,4 +221,4 @@ if $rows != 0 then return -1 endi - +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/table_len.sim b/tests/script/general/table/table_len.sim index e1ed254fe118fec725e928a229376d731c018fad..2568ebc7a5e460284f8a4d620beffadd73e76baf 100644 --- a/tests/script/general/table/table_len.sim +++ b/tests/script/general/table/table_len.sim @@ -1,8 +1,6 @@ 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 @@ -58,7 +56,7 @@ if $rows != 0 then endi print =============== step4 -sql create table ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789 (ts timestamp, speed int) -x step4 +sql create table ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789ab01234567890123456789a0123456789a0123456789 (ts timestamp, speed int) -x step4 return -1 step4: sql show tables @@ -102,4 +100,6 @@ sql drop database $db sql show databases if $rows != 0 then return -1 -endi \ No newline at end of file +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/testSuite.sim b/tests/script/general/table/testSuite.sim index 5e4388619b51bb436bfdc640d0111789ba05e526..7d0c7b9e568199029c800852ff7156cd28c3c2f6 100644 --- a/tests/script/general/table/testSuite.sim +++ b/tests/script/general/table/testSuite.sim @@ -3,13 +3,13 @@ run general/table/basic1.sim run general/table/basic2.sim run general/table/basic3.sim run general/table/bigint.sim -#run general/table/binary.sim +run general/table/binary.sim run general/table/bool.sim run general/table/column_name.sim run general/table/column_num.sim -#run general/table/column_value.sim -#run general/table/column2.sim -#run general/table/date.sim +run general/table/column_value.sim +run general/table/column2.sim +run general/table/date.sim run general/table/db.table.sim #run general/table/delete_reuse1.sim #run general/table/delete_reuse2.sim @@ -18,9 +18,9 @@ run general/table/db.table.sim run general/table/double.sim run general/table/float.sim run general/table/int.sim -#run general/table/limit.sim +run general/table/limit.sim run general/table/smallint.sim #run general/table/table_len.sim -#run general/table/table.sim +run general/table/table.sim run general/table/tinyint.sim -#run general/table/vgroup.sim +run general/table/vgroup.sim diff --git a/tests/script/general/table/tinyint.sim b/tests/script/general/table/tinyint.sim index d22331c2a38a45735486a79807aea009a3e4a2ad..017c007e8425385c6045d8c4ea1d3f7335e62a0d 100644 --- a/tests/script/general/table/tinyint.sim +++ b/tests/script/general/table/tinyint.sim @@ -1,8 +1,6 @@ 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 @@ -24,7 +22,7 @@ sql select * from $tb order by ts desc if $rows != 1 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi @@ -37,7 +35,7 @@ sql select * from $tb order by ts desc if $rows != 2 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi @@ -60,7 +58,7 @@ sql select * from $tb if $rows != 4 then return -1 endi -if $data01 != null then +if $data01 != NULL then return -1 endi @@ -101,4 +99,6 @@ sql drop database $db sql show databases if $rows != 0 then return -1 -endi \ No newline at end of file +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/table/vgroup.sim b/tests/script/general/table/vgroup.sim index cd5c44fb6062f3f93283816e22787caad748833b..7efa3e9f739cf84e3f8e02a5d781676519e9b2cb 100644 --- a/tests/script/general/table/vgroup.sim +++ b/tests/script/general/table/vgroup.sim @@ -1,8 +1,6 @@ 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 @@ -17,7 +15,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 @@ -156,7 +154,4 @@ if $rows != 0 then return -1 endi - - - - +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/tag/3.sim b/tests/script/general/tag/3.sim index 1cc2fa8cf78064032bd54de64f60e9d9e455c822..e2a503ce8bfa612856b039a96ae28b0ed990b1d4 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 02bb910888fdf62f55fd68d75b9f6ac9f7d9d0c7..93c422bb31f08dde504cb137800141c64ac63449 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 3231f738a746b9565ff15de3082bb866d4cf255a..949c9c257ba7e68ac9ca7bb9a1b57cb108c22e0f 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 9c106a189c34b3dd71dc9a63eddf9e5de0f4c8f3..de5542c635123ba42bd80f95a7f1f67ba0e31972 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 6c9456d57ac438467cb34d6164cec009288f3731..92fa80045065c52ad0ebea1a23019eba9ff3d97e 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 3522d91b93ef9753d69d08f0046423a38e929436..736c30607f53a5163860a519c29a123c8cc36477 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 45aedf6db83fb87060db1ca2014611ba7a7f8325..f57f5cc996cb4f90800a1fbd5b63f2c70547c68b 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 fdb10d5877cdd9aefd9fc3dc80e5c0c2f45c6086..5f001e028e265bfa3f9617992662b9632b93a33b 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 da3da99b199e1902ca5b418bb4cb2ecb6461f234..82d6cd14bf88063f1dd058095b6d348048e6028e 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 ddd5b3df94ec6c884e58d2622ff535db89dd8b3f..c836dd227b76ea84e40da9bcf492d80ce8bb7ba5 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 6f1a637965b172067200d75b57b03b40a8061c9e..86a16fde9bdadeaa896ffd34bbd081dfd6cf26ae 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 f0f4efb9c648bc064c80a18f1813cdc16d54b3cc..74431458f94febf71da647d340d9caccc4f41807 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 4313f48e5f9a14dfe09936ed3b873a770b7bea12..e9b89b7b46c2b783d7075b2238f7b7f7f4d0c4e4 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 94ea85781a9a53724d1a8d14194a725565f8760c..1e78628b284ef571843135d6bbd73c4e5e395e92 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 852eadfbccbaee5916de92da76b2b5e0f8c497e3..3d4ecf8bc34ba461d33ffa2d37c72432c1262349 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 ae424ef58ce04504f9c0c933f0eb679a19a997f6..ef886d76446cd44f87c0449140686c25ac98a6d7 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 d811325b10744f3eda2dd93e203fc4dce43c0ef5..47c94d8ae61b1c3018bb95c014b8107807a7c00b 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 537211fe1b3dd9142d0ad5314474ee1a5de87ae8..4f86eec3389852d3bb8078a5105b54c80e9e1427 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 ea635d9db64776fdbffaefc30c6a75dcd497fa13..d0dea47cb1a7c190c8b6a02d69209377e18ce07b 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 166285f799c8dc353160e6050f569d545857d910..234780d6d57d4deca010e280c99e740289c7878c 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 4745ae704f87e885518bcaeeae812fa732a24535..bfa3ed7f72ebf565420d2b3e75ad528c77da0cf0 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 fd9fdd2807eae81ac959584e25e4e8a05dd35e84..e48db5a7a8a3f4087169607e5acbdb8a6d485655 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 701e605e3823db519009aa39292c31103785d59c..4ca945947788b76cfbf080aaf997146962a4626d 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 b65be720362993dabea8b7fd81631210b3fe1ade..9e339a352c9cdb91b603c05b6b9b337827c5b156 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/user/basic1.sim b/tests/script/general/user/basic1.sim index 1cff77d3170794a972d3f4ecf77b4db23029331d..3670c1ddb097146f97135b2cab0022c9531d89e0 100644 --- a/tests/script/general/user/basic1.sim +++ b/tests/script/general/user/basic1.sim @@ -71,4 +71,4 @@ print $data10 $data11 $data22 print $data20 $data11 $data22 print $data30 $data31 $data32 -system sh/exec.sh -n dnode1 -s stop \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/user/basicSuite.sim b/tests/script/general/user/basicSuite.sim deleted file mode 100644 index 199c8f39a154e6abd07f891b325f648c1f466529..0000000000000000000000000000000000000000 --- a/tests/script/general/user/basicSuite.sim +++ /dev/null @@ -1 +0,0 @@ -run general/user/basic1.sim \ No newline at end of file diff --git a/tests/script/general/user/monitor.sim b/tests/script/general/user/monitor.sim index 987cb84357ec09314d50f1964a1cf496b4b6a447..208b85f16ccf29b008caaa1ce0d2f064a5cab066 100644 --- a/tests/script/general/user/monitor.sim +++ b/tests/script/general/user/monitor.sim @@ -1,10 +1,8 @@ system sh/stop_dnodes.sh - - system sh/deploy.sh -n dnode1 -i 1 print ========== step1 -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 monitor -v 1 system sh/cfg.sh -n dnode1 -c monitorInterval -v 1 system sh/exec.sh -n dnode1 -s start @@ -16,7 +14,7 @@ print ========== step2 sql drop database log -x step21 return -1 step21: -sql drop table log.cpu -x step22 +sql drop table log.dn -x step22 return -1 step22: sql drop user log -x step23 @@ -31,6 +29,4 @@ if $rows == 0 then return -1 endi - - - +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/user/pass_alter.sim b/tests/script/general/user/pass_alter.sim index f7eee1359b8b676134c521abc8d5276c3fbe7635..034e704a8780e37bab3b29f3b313e2b19db5e8d2 100644 --- a/tests/script/general/user/pass_alter.sim +++ b/tests/script/general/user/pass_alter.sim @@ -1,8 +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.sh -n dnode1 -s start sleep 3000 sql connect @@ -47,3 +45,5 @@ sql show users if $rows != 6 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/user/pass_len.sim b/tests/script/general/user/pass_len.sim index 583c2e73d37cad7808c0eb980ba99bdc59437eed..d5d7b3250fe18490f92a299d100990f8b0405bca 100644 --- a/tests/script/general/user/pass_len.sim +++ b/tests/script/general/user/pass_len.sim @@ -1,8 +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 @@ -80,4 +79,4 @@ if $rows != 3 then return -1 endi - +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/user/testSuite.sim b/tests/script/general/user/testSuite.sim index 242e8ca27aa49ac5acfa0c2ac94f2f7078176c13..16bc96f4dcb081ec816fd50e43bdbe82422f5abe 100644 --- a/tests/script/general/user/testSuite.sim +++ b/tests/script/general/user/testSuite.sim @@ -1,6 +1,6 @@ run general/user/basic1.sim +#run general/user/monitor.sim run general/user/pass_alter.sim run general/user/pass_len.sim run general/user/user_create.sim -run general/user/user_len.sim -#run general/user/monitor.sim \ No newline at end of file +run general/user/user_len.sim \ No newline at end of file diff --git a/tests/script/general/user/user_create.sim b/tests/script/general/user/user_create.sim index 4b81313695ad9b51e040ae2943f148f373c49372..4da60b7e3952ea72cba5268c664184bfcdc05ab7 100644 --- a/tests/script/general/user/user_create.sim +++ b/tests/script/general/user/user_create.sim @@ -1,8 +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 sql connect @@ -82,7 +81,4 @@ step42: sql drop user read - - - - +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/user/user_len.sim b/tests/script/general/user/user_len.sim index 4d2658cec955f58319ac9da9325d320bacbd7a4a..79b72468bbf64a5f834c34979391f43c25809c0c 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 @@ -86,3 +86,5 @@ sql show users if $rows != 3 then return -1 endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file diff --git a/tests/script/general/vector/metrics_field.sim b/tests/script/general/vector/metrics_field.sim index a883c81e183ef58bb1bb096ddd8c51dba445c1cc..1b96b8c36d2513cbf32657c753e5690fabaea445 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 26ff0af0631687b0350a0868ea5e60770aac5d3e..992ce6e18949d9d5812d68cdec0e847c9986b8ec 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 d797fa64673f738ba8762c5ab534b101df518e8b..8e3833f7a43d0324022c60a5db595b63aaeb99aa 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 29923d3d42f12126396d3964d8184ab563f0d553..81f15a194fd0c9f135ff91af4b3402ad6a25db27 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 9400b2a76ae9762e1d640026893ed12ceb02804d..f7e78ae5211c1650a9058e27938a16f4aee1228f 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 dfdc015edf42a60f113c7aa79c4835a23e973fe4..3a607b24105f537f51ce42b6e8e89618c1450b65 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 cd892bfd87c3843642d3dbcc1d1a32aa6021a8ec..8eff3e1fb194c3426d27aa4ff2fcf07601b24054 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 2894b04c6de14d925d914cc736363e3381945582..96adf54f1d282f6246a372160ae5dfa8207870c2 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 9cd40859126b61de33fdc942bdc3cb91f6c68bdc..c994697ff2a4f3202cc48b78e86a4d5275e41d81 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 1e1784e7266a2cd879974e4be18f03190c627ae6..ce3acc1d660993337bbbad46378e1fea0ea6435d 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 f0b0d525e6e39fa1887d8a7622e0eadd89758faf..3c2ff183ed078d04157fb6a6477675bd7ab01c53 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/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 4c150b63bcada5404f707561eb1577d08f7ef722..2a49398ad2897a2bfbccecd0f208a963866e4b69 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -7,37 +7,89 @@ cd ../../../debug; cmake .. cd ../../../debug; make -#general +######### general ######### +#agg +#alter +#cache +#column +#compress +#compute + +./test.sh -f general/db/basic.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/db/delete_reuse1.sim +./test.sh -f general/db/delete_reuse2.sim +./test.sh -f general/db/delete_reusevnode.sim +#./test.sh -f general/db/delete_reusevnode2.sim +./test.sh -f general/db/delete_writing1.sim +./test.sh -f general/db/delete_writing2.sim +./test.sh -f general/db/len.sim +./test.sh -f general/db/repeat.sim +./test.sh -f general/db/tables.sim + +#field + +./test.sh -f general/http/restful.sim +./test.sh -f general/http/restful_insert.sim +./test.sh -f general/http/restful_limit.sim +./test.sh -f general/http/restful_full.sim +./test.sh -f general/http/prepare.sim +./test.sh -f general/http/telegraf.sim +#./test.sh -f general/http/grafana_bug.sim +#./test.sh -f general/http/grafana.sim + + +#import +#insert +#metrics +#parser +#stream ./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/binary.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/column_value.sim +./test.sh -f general/table/column2.sim +./test.sh -f general/table/date.sim ./test.sh -f general/table/db.table.sim +#./test.sh -f general/table/delete_reuse1.sim +#./test.sh -f general/table/delete_reuse2.sim +#./test.sh -f general/table/delete_writing.sim +#./test.sh -f general/table/describe.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/limit.sim ./test.sh -f general/table/smallint.sim +#./test.sh -f general/table/table_len.sim +./test.sh -f general/table/table.sim ./test.sh -f general/table/tinyint.sim +./test.sh -f general/table/vgroup.sim + + +#tag ./test.sh -f general/user/basic1.sim +./test.sh -f general/user/monitor.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 +#vector -# unique +######### unique ######### ./test.sh -u -f unique/account/account_create.sim ./test.sh -u -f unique/account/account_delete.sim diff --git a/tests/script/tmp/prepare.sim b/tests/script/tmp/prepare.sim index eda045245965fc0755a255ab459b0cfa95af43f5..68a05a33e75e0716d83c21da3aade66a16ca472a 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/account/account_create.sim b/tests/script/unique/account/account_create.sim index 6ada0b4910018a1fb3afbc7237d5d58b38899038..d1d5ebece037cec40f895ca1e3f02e2991c27923 100644 --- a/tests/script/unique/account/account_create.sim +++ b/tests/script/unique/account/account_create.sim @@ -1,9 +1,10 @@ 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 +sleep 3000 print ============================ dnode1 start diff --git a/tests/script/unique/account/account_delete.sim b/tests/script/unique/account/account_delete.sim index 039f3816328bec2ec15c8ab21a3b90033b847ce8..71a75a7b350ce01ca7f0d2fac5e6d1ad3e7be0e9 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 eaa5873a1fd1e9bcb3528f04d74b4b259a122d86..ae2db26d58f5a51916eca2c7bd7ac675108ffbd5 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 ca9c68f57d9b60d02e44152b043c2b600048fc8c..fe978a5827c89d6a4b6aa2fa2c9b5fdadb4b7c5e 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 12a237c972874208d3fac6d15749fda0d6cc15d5..936611833a83148378802bbca3c7c14c1df56915 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 b78c881c7fba2e7c559d01eeab411dc76b4224b0..f4f9c0496421d5e0c9c7a2545f6eedc36d5f9e06 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 ae15f8e02bd714b66364ced14aef608382c80fc3..075da848d613791593b453bf9cccf3ad265bf1df 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 2122e7bd3fef45a2517dec31eff690b9c4180be5..918551fa66375291f0cdee31af2317a4ade76621 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 @@ -29,6 +29,7 @@ endi print =============== step2 sql drop user a -x step2 step2: +sleep 1000 sql create user a PASS '123' sql show users if $rows != 4 then diff --git a/tests/script/unique/big/balance.sim b/tests/script/unique/big/balance.sim index 270c3810a703edaa8d09e733b685689164248068..3d4d39af536a3ccb5ffbb609a36b3dcc34413e4c 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/big/maxvnodes.sim b/tests/script/unique/big/maxvnodes.sim index 12affc72c5af637e8510bd49618828ea119c121a..738fd0704def9871b7f850b0970968a5421e570c 100644 --- a/tests/script/unique/big/maxvnodes.sim +++ b/tests/script/unique/big/maxvnodes.sim @@ -1,8 +1,8 @@ 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 tables -v 100 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 100 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 256 system sh/cfg.sh -n dnode1 -c maxVnodeConnections -v 100000 system sh/cfg.sh -n dnode1 -c maxMeterConnections -v 100000 @@ -39,8 +39,8 @@ endi system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode2 -c clog -v 0 -system sh/cfg.sh -n dnode2 -c tables -v 100 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 100 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 256 system sh/cfg.sh -n dnode2 -c maxVnodeConnections -v 100000 system sh/cfg.sh -n dnode2 -c maxMeterConnections -v 100000 diff --git a/tests/script/unique/big/tcp.sim b/tests/script/unique/big/tcp.sim index 9e98ddd3490646c82edacbdb4028520b294df226..795744961730cfa61a32df9a4fb9650d8212f494 100644 --- a/tests/script/unique/big/tcp.sim +++ b/tests/script/unique/big/tcp.sim @@ -1,8 +1,8 @@ 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 tables -v 30000 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 30000 system sh/cfg.sh -n dnode1 -c dDebugFlag -v 131 system sh/cfg.sh -n dnode1 -c mDebugFlag -v 131 diff --git a/tests/script/unique/cluster/balance1.sim b/tests/script/unique/cluster/balance1.sim index 638febd3dbebb062c49b576c090c0d8161b2d9b1..424a80d25aa397837fd4598ccd0a48c77e27f140 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 10de862b7f51d0c5c7f4e65c551355736d9fec23..08fdd233e012f89a29bcaca938fb34f73aeb224a 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 cb453151e45bd5f3772b49c3efffbb5ee81fc346..407adc7f3b61301d6a5d08047160ae0b4d3fac27 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 @@ -365,6 +380,8 @@ if $dnode7Vnodes != 3 then goto show9 endi +system sh/exec_up.sh -n dnode1 -s stop -x SIGINT + print ============================== step11 print ========= add db4 @@ -393,6 +410,7 @@ show11: if $x == 20 then return -1 endi +sql show dnodes -x show11 $dnode5Vnodes = $data2_5 print dnode5 $dnode5Vnodes $dnode6Vnodes = $data2_6 diff --git a/tests/script/unique/column/replica3.sim b/tests/script/unique/column/replica3.sim index 6390578867b95c53cd6778b0498d37fc04b24bf8..4b08b13e2fb08f36e5e19886d5acf02dfdb98e3c 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/commit.sim b/tests/script/unique/db/commit.sim index d9c507f5fb9b25d2d39f7d88de308bd41a4f63d1..0e58c6ed76e72957dd5e1731c91855702776d417 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/db/delete.sim b/tests/script/unique/db/delete.sim index ed41f1bb90c48da0ce07cb26f83c75dbf90a16d0..5100b93dcdde560eadb868b166e77750e88314d2 100644 --- a/tests/script/unique/db/delete.sim +++ b/tests/script/unique/db/delete.sim @@ -6,18 +6,15 @@ 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 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10 system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10 -system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 200 -system sh/cfg.sh -n dnode2 -c cacheBlockSize -v 200 -system sh/cfg.sh -n dnode3 -c cacheBlockSize -v 200 print ========= start dnodes system sh/exec_up.sh -n dnode1 -s start @@ -29,7 +26,7 @@ system sh/exec_up.sh -n dnode3 -s start sleep 3000 print ======== step1 -sql create database db replica 3 ablocks 2 tblocks 5 tables 10000 +sql create database db replica 3 ablocks 2 tblocks 5 maxtables 10000 sql create table db.mt (ts timestamp, tbcol int) TAGS(tgcol int) $tbPrefix = db.t diff --git a/tests/script/unique/db/delete_part.sim b/tests/script/unique/db/delete_part.sim index 7e4e1b0b965cc7913ca6c53a7a45766c2cb1fc14..3ed4f5d7534595d1701446df585b601efef29a6e 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 14956e56c2833ae837e1d62a17e005eedcc9e167..5d1ec794509537e0bc4f428492d3bb68744e177a 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 970545ae01ab580515dd61738abfc238416fa29a..ac7e3f5c5c13dcd4f126456e15124ce3778a85c8 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 d4aa85c05c5da91e0c18b7c61bd4d0c5b159b404..995cd4116c307b5c0fe9cb37f7993d724da3cd70 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 29b16c8018b02e6cbfa8bb2fd6753726e39bea45..f0ffb8901526f59ae30f5bd43e89010b2bdf454f 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 e86ff9367f5d38340fa2c61a2d75e3b7aa078e92..3a324c604a55f0be44bb1be94991f17007ba933c 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 6b4264e9e1f909a216e6aa1571998fa87fefed6d..fdb5e3c1dc813d88cbbca7682ee4812b5168fb46 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 d59fb1fc0ad3852130e5870f5128430d4a44397c..83b5cb7a5bc20fa2f19963db1b5f1cd881449de4 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 5e5e9e097be860446f0525357b9ca3141483b825..79f22c42ff6cd875af09b3baf56fef8a57872347 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 e27262bf1d8f9c1e6a21d56aa3b72c306469821b..4518c4262230f15c1f2e7d4e3cfe06ddc1960600 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 112afed6a1212e45f849ada7c45c0c77e12de3cc..acb0d033d4a21ed7bb262b9437cdb4d404fe437f 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 af163ab5fac38412f7afa73e9e9e0568b938e979..d717250a796af420ef589f43b176a137b4460271 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 fda7f4ad77150caf5a18d769e8574ed0e9ecea1e..8726caf1db8d43f4418c6873fbd96cf46dd46579 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 64ba981d1fb2052a8ff421e3e2bfe439477a71d8..5e4ab65be37e90a4cf6737d6fa7b485c16dd61ae 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 ae9b13079fee7dace74450a16ac9137ea0b58548..2615746e05ab0dcfb22caccd42f4fc3cead7e931 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 c345aa202b2a7cd9268d7ff58c2701dec39b6106..c69c51fa96ba1c18f93bd1d0ec6f1043e4d412cb 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 909f82e61c9411cd3d97d8e7ef3a6714a450c428..c9e48d9283c929ef388fcf38f27342dd8c01dbd0 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 3693868497f4d5c443dccd51f7b6ba57d39683da..6b3c8ebeb243b96cad8b4b33ede5ad92977a2f41 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 ca2adc29ab83787ee90b681750607f79774ca294..51307af00e6447d93060f0e9198a55f29c29dcc0 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 3c59a734548f330aeb57b4fb08c6ba576bc27338..d1b193173e451f7c01829608c8a7845b1d58ba17 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/import/replica2.sim b/tests/script/unique/import/replica2.sim index 52afbd93cb8d627178c48652d2f4b17927ff2e1f..bab04bd21133ffc468046a2f104d6539c959b179 100644 --- a/tests/script/unique/import/replica2.sim +++ b/tests/script/unique/import/replica2.sim @@ -15,10 +15,10 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 10 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 10 system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 10 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode3 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode4 -c sessionsPerVnode -v 2000 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 2000 system sh/cfg.sh -n dnode1 -c commitlog -v 0 system sh/cfg.sh -n dnode2 -c commitlog -v 0 diff --git a/tests/script/unique/import/replica3.sim b/tests/script/unique/import/replica3.sim index 8b8602df66663c855c052313ee985f57d265f11c..c10f2da2f1ebe1592c5f828cbeadbcf1eadc6e5b 100644 --- a/tests/script/unique/import/replica3.sim +++ b/tests/script/unique/import/replica3.sim @@ -15,10 +15,10 @@ system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 10 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 10 system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 10 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode3 -c sessionsPerVnode -v 2000 -system sh/cfg.sh -n dnode4 -c sessionsPerVnode -v 2000 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 2000 +system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 2000 system sh/cfg.sh -n dnode1 -c commitlog -v 0 system sh/cfg.sh -n dnode2 -c commitlog -v 0 diff --git a/tests/script/unique/metrics/balance_replica1.sim b/tests/script/unique/metrics/balance_replica1.sim index d32e647fbe61f7d6adf9fa0ee545a774c86a837c..eb502762608cc911517505fed6c1455d4d3c7645 100644 --- a/tests/script/unique/metrics/balance_replica1.sim +++ b/tests/script/unique/metrics/balance_replica1.sim @@ -10,12 +10,12 @@ 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 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4 $dbPrefix = br1_db $tbPrefix = br1_tb @@ -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 c4556d0f0e71bf509d39679ccb4bf63b53c171c6..03a881ea49722bf93082a7c2910918d8f701fb95 100644 --- a/tests/script/unique/metrics/dnode2.sim +++ b/tests/script/unique/metrics/dnode2.sim @@ -4,12 +4,12 @@ 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 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sql connect @@ -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 93012e53ae8f0dc5ff7d353342a30e0f4c3d5325..58a46f9be9ab5b29155a4b0ffaedf0acbc3ae670 100644 --- a/tests/script/unique/metrics/dnode2_stop.sim +++ b/tests/script/unique/metrics/dnode2_stop.sim @@ -4,12 +4,12 @@ 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 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sql connect @@ -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 9ca7dec33db25e1374e0bf24a068d5c5674feaa9..503ce6c47af5f40b432f15d7355394547c7c7d4d 100644 --- a/tests/script/unique/metrics/dnode3.sim +++ b/tests/script/unique/metrics/dnode3.sim @@ -6,15 +6,15 @@ 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 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode3 -c sessionsPerVnode -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/exec.sh -n dnode1 -s start sql connect @@ -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 262f7f3a7cb16b106e8a49f531aa235e2695c707..7672b19ad9a5ebc7752d968e4d65a355ae399fb6 100644 --- a/tests/script/unique/metrics/replica2_dnode4.sim +++ b/tests/script/unique/metrics/replica2_dnode4.sim @@ -8,18 +8,18 @@ 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 system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode3 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode4 -c sessionsPerVnode -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 system sh/exec.sh -n dnode1 -s start sql connect @@ -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 0611af0b9e2035c41670a48c0e572836665380c6..e7163e826decf5a3caab7e9d25cf5abd9d0f9d82 100644 --- a/tests/script/unique/metrics/replica2_vnode3.sim +++ b/tests/script/unique/metrics/replica2_vnode3.sim @@ -4,12 +4,12 @@ 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 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sql connect @@ -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 73c67e54c25cfb979e6614f054c7fe1a132aae9e..ef70bf5cc35ab91323a17b7891dc176226c2ec04 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 @@ -28,12 +28,12 @@ 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 dnode6 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode3 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode4 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode5 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode6 -c sessionsPerVnode -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 +system sh/cfg.sh -n dnode5 -c maxtablesPerVnode -v 4 +system sh/cfg.sh -n dnode6 -c maxtablesPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sql connect @@ -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 006b01bc744fb8e4348e7e9e55117f6ba3cb1344..50ad6d7584b1c2aec2e64b68da6d1a7b8b7c9189 100644 --- a/tests/script/unique/metrics/replica3_vnode3.sim +++ b/tests/script/unique/metrics/replica3_vnode3.sim @@ -8,18 +8,18 @@ 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 system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode3 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode4 -c sessionsPerVnode -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 system sh/exec.sh -n dnode1 -s start sql connect @@ -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 feac15f4dbbc5d2f03d35c12f8c9e4d2addca220..ff6ca9d1f0b64cac4ed17e1ecc5f1ac8ddd5859d 100644 --- a/tests/script/unique/stream/metrics_balance.sim +++ b/tests/script/unique/stream/metrics_balance.sim @@ -10,16 +10,14 @@ 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 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 5 -system sh/cfg.sh -n dnode2 -c meterMetaKeepTimer -v 5 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 5 -system sh/cfg.sh -n dnode2 -c metricMetaKeepTimer -v 5 +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 dnode1 -c tableMetaKeepTimer -v 5 +system sh/cfg.sh -n dnode2 -c tableMetaKeepTimer -v 5 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 2 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2 @@ -36,7 +34,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/metrics_replica1_dnode2.sim b/tests/script/unique/stream/metrics_replica1_dnode2.sim index f932f601ff3b29d8a7b8cf7b38bf170f8d3aad7e..78b9165681ba07a11477301971a5208f62999720 100644 --- a/tests/script/unique/stream/metrics_replica1_dnode2.sim +++ b/tests/script/unique/stream/metrics_replica1_dnode2.sim @@ -4,12 +4,12 @@ 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 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/stream/metrics_replica2_dnode2.sim b/tests/script/unique/stream/metrics_replica2_dnode2.sim index ba90d8b8334951285ffa573b3bc6127a555e50ce..e9944daf3726be0433c4d757c8f6674869baa672 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 d0ef82b6a0d11f76adad3d12823b5186fe1fc66d..47454501c67e04ecaa74ea67a5b4c8b89ea44ec4 100644 --- a/tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim +++ b/tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim @@ -4,12 +4,12 @@ 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 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/stream/metrics_replica2_dnode3.sim b/tests/script/unique/stream/metrics_replica2_dnode3.sim index fc4b45405947dffa039eaaa0a77ee6fd58759ea1..a8c986cce936288cc31ec48eac97d77be695dfd2 100644 --- a/tests/script/unique/stream/metrics_replica2_dnode3.sim +++ b/tests/script/unique/stream/metrics_replica2_dnode3.sim @@ -6,15 +6,15 @@ 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 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode3 -c sessionsPerVnode -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/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/stream/metrics_replica3_dnode4.sim b/tests/script/unique/stream/metrics_replica3_dnode4.sim index 90f9ed16ed2f269eeb92a7f0175f39104f3d7abf..8ff7a3738ec6b592abf75e9331fa3d03c39b4a07 100644 --- a/tests/script/unique/stream/metrics_replica3_dnode4.sim +++ b/tests/script/unique/stream/metrics_replica3_dnode4.sim @@ -8,18 +8,18 @@ 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 system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 8 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode3 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode4 -c sessionsPerVnode -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 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/stream/metrics_vnode_stop.sim b/tests/script/unique/stream/metrics_vnode_stop.sim index 71a085454b0f66336422e7d0b37c0f05ffa59af8..4f85d75e7f9fb3561c20e635be2eaca385fcaf02 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 3eab0295296646f9ad14b04474822ac96ee87660..015f9f1f17485724618dd72cd0b304774e0809f6 100644 --- a/tests/script/unique/stream/table_balance.sim +++ b/tests/script/unique/stream/table_balance.sim @@ -10,12 +10,12 @@ 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 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -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 dnode1 -c numOfMPeers -v 2 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2 @@ -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 3096bcc9f94c65244c436cf39d7224eb82e4c2be..6589ed941e74c17a0d39b03a058b198fb969e356 100644 --- a/tests/script/unique/stream/table_move.sim +++ b/tests/script/unique/stream/table_move.sim @@ -25,20 +25,20 @@ 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 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 0 system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 0 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode3 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode4 -c sessionsPerVnode -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 system sh/cfg.sh -n dnode1 -c numOfMPeers -v 3 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3 @@ -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/stream/table_replica1_dnode2.sim b/tests/script/unique/stream/table_replica1_dnode2.sim index 0640de11b35d7cd7607ee159ebd0bd9763a69e89..3d88493f403e8030560a51d2bb9dbd31ac06bf3b 100644 --- a/tests/script/unique/stream/table_replica1_dnode2.sim +++ b/tests/script/unique/stream/table_replica1_dnode2.sim @@ -4,12 +4,12 @@ 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 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/stream/table_replica2_dnode2.sim b/tests/script/unique/stream/table_replica2_dnode2.sim index 2b9d22d150ac787469dad7361c1b96f652bdb741..da24b5ab4e825d2795a7ec1f3e2ccbee563e81ed 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 917d6935e8d2f0462bd4f71c09a112069c12264f..809627432b1380a9d9a7b8784573173944e53b75 100644 --- a/tests/script/unique/stream/table_replica2_dnode2_vnoden.sim +++ b/tests/script/unique/stream/table_replica2_dnode2_vnoden.sim @@ -4,12 +4,12 @@ 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 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 +system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 +system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/stream/table_replica2_dnode3.sim b/tests/script/unique/stream/table_replica2_dnode3.sim index 28d40d237e6805263a13b0a2e704eb4ded91d7e2..abee70d0483ca3ee982f57dd503837019f1dd5fd 100644 --- a/tests/script/unique/stream/table_replica2_dnode3.sim +++ b/tests/script/unique/stream/table_replica2_dnode3.sim @@ -6,15 +6,15 @@ 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 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode3 -c sessionsPerVnode -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/exec.sh -n dnode1 -s start diff --git a/tests/script/unique/stream/table_replica3_dnode4.sim b/tests/script/unique/stream/table_replica3_dnode4.sim index b6d76c3719b2a19eeac4bf85a408a9392cea5458..effdd38c2e05a7729d61af325fe861d7a7c368c9 100644 --- a/tests/script/unique/stream/table_replica3_dnode4.sim +++ b/tests/script/unique/stream/table_replica3_dnode4.sim @@ -8,18 +8,18 @@ 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 system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 8 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode3 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode4 -c sessionsPerVnode -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 system sh/exec.sh -n dnode1 -s start sql connect diff --git a/tests/script/unique/stream/table_vnode_stop.sim b/tests/script/unique/stream/table_vnode_stop.sim index fe7165a16670099acc3784c05c6598c10f953ea9..8528ee675586941d99b0e3d5b16571b3cf5bbf3e 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 4766be5131b649c354a725cba62318cbfc0f2b36..f4a7b6fce443568bcd6b86ca0a0ca7de7bf8f79b 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 @@ -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 sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode2 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode3 -c sessionsPerVnode -v 4 -system sh/cfg.sh -n dnode4 -c sessionsPerVnode -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.sh -n dnode1 -s start diff --git a/tests/script/unique/vnode/backup/replica4.sim b/tests/script/unique/vnode/backup/replica4.sim index afddf58b80e9d872f420b26014cf7353988ddd6c..bccc17e682258b29d08d493a8c457682287ccfa1 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 32d30c110cb84a46d1291735b43ab71cc4c1fcca..d29d11fdafdcf9b368e3f94350fd959168764445 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 diff --git a/tests/script/unique/vnode/commit.sim b/tests/script/unique/vnode/commit.sim index 7383934aacb51619442bf09faa3507dcfab16c76..dae657166719b44753eb035b151b6f8a719155c3 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 57e0d10b7e8bad79e24993e9a7c5e8dc82825f6e..544f7d5b55870abe6e2357991c4e76721d8cc70f 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 c71692fa9f1ec3f3bc253b6ac2970f137d51e66e..8e18c3b9e77b868d00bbbfc05bff0021658ce88c 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 dd0914549a09550a807b476bd575cb0613e021d0..a86071faafec08627b69da1777aeec6d8b8977e4 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 46fe90cfde6eccc4239957b017f4410c153a675e..cc1feecb07b2802146d8eb3789dbe1713d03e6b0 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 542aa7803d31a9f06f3abb0c0b166741377c3f7b..62910b947afdd5f3483c6d8e3ced05098ba3ac7e 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 67ac673bfcc2308fcf43c90e16f10be0c39a7c76..0ed16e0729edfd5ac1843b3886ef2ba50f9796a7 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 46003a14fa208f875833e102a58b489124b2bb3f..2763ed7c67c47496c3976cd9467b814d3f1e58f2 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 @@ -26,7 +26,7 @@ sleep 3000 print =================== step 1 -sql create database $db replica 3 tables 100 +sql create database $db replica 3 maxtables 100 sql use $db sql create table st (ts timestamp, speed int) tags (t1 int) sleep 3001 diff --git a/tests/tsim/src/simExe.c b/tests/tsim/src/simExe.c index d0d798343a433b93f157ce60671d7c65488dbc75..660ed6f44fbf1092cbc96f44d28dfb433617ea98 100644 --- a/tests/tsim/src/simExe.c +++ b/tests/tsim/src/simExe.c @@ -688,7 +688,7 @@ bool simExecuteNativeSqlCommand(SScript *script, char *rest, bool isSlow) { } if (row[i] == 0) { - strcpy(value, "null"); + strcpy(value, TSDB_DATA_NULL_STR); continue; }