diff --git a/src/client/src/tscParseInsert.c b/src/client/src/tscParseInsert.c index 5cb13c446481791fa89fb5633973a8422ee25c57..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; diff --git a/src/mnode/src/mgmtSdb.c b/src/mnode/src/mgmtSdb.c index e288760bf06ed1f9dc94786180e4a25536c5ddc6..fe25699b5f43e5a76a5894c6e399f403ea92ffc8 100644 --- a/src/mnode/src/mgmtSdb.c +++ b/src/mnode/src/mgmtSdb.c @@ -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 c04f9bb2d1e46184f49c462e4f55f6b2fb0d0de9..7264c850274609969254800592907081c994c7d9 100644 --- a/src/mnode/src/mgmtShell.c +++ b/src/mnode/src/mgmtShell.c @@ -78,7 +78,6 @@ void mgmtCleanUpShell() { } if (tsQhandleCache) { - taosCacheEmpty(tsQhandleCache); taosCacheCleanup(tsQhandleCache); tsQhandleCache = NULL; } diff --git a/src/plugins/http/src/httpServer.c b/src/plugins/http/src/httpServer.c index 9b8affcde256065ef97709976afa7b4f5dc8ada5..a0d3b6314d3541f7b6205f4660d55517622f2eda 100644 --- a/src/plugins/http/src/httpServer.c +++ b/src/plugins/http/src/httpServer.c @@ -504,8 +504,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 +645,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..9a8841b8de2e3d152a363da2bffa117795342a15 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; } @@ -132,6 +132,8 @@ void httpCleanUpSystem() { } httpCleanUpConnect(httpServer); + +#if 0 httpRemoveAllSessions(httpServer); if (httpServer->pContextPool != NULL) { 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/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/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/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/cache/new_metrics.sim b/tests/script/general/cache/new_metrics.sim index 7248bc497d3e6bb787c738639b3932d273842914..2f7de7f1eb5facc97c488c5ff77df9548e3121fe 100644 --- a/tests/script/general/cache/new_metrics.sim +++ b/tests/script/general/cache/new_metrics.sim @@ -3,8 +3,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 -system sh/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 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 9ff41d1baf2e3d131752c4fda47efe599a3de8a9..8aa0a898705d67590212db7cec0e81ceecb3d8f2 100644 --- a/tests/script/general/cache/new_stream.sim +++ b/tests/script/general/cache/new_stream.sim @@ -3,8 +3,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 -system sh/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 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 9b30bbc600de67c9c0ac0e2da60c1ef30df695cb..70f53ac69ea184544533b5be11a1265d056a64fc 100644 --- a/tests/script/general/cache/restart_metrics.sim +++ b/tests/script/general/cache/restart_metrics.sim @@ -3,8 +3,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 -system sh/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 tableMetaKeepTimer -v 10 system sh/exec.sh -n dnode1 -s start sleep 3000 @@ -49,8 +48,7 @@ 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 walLevel -v 0 -system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10 +system sh/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 766930c22924a82f3a52515b76ee68896749dffc..aa16934f330c2cf7a1e8e67f1738f737ef846eb5 100644 --- a/tests/script/general/cache/restart_stream.sim +++ b/tests/script/general/cache/restart_stream.sim @@ -3,8 +3,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 -system sh/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 tableMetaKeepTimer -v 1 system sh/exec.sh -n dnode1 -s start sleep 3000 @@ -99,8 +98,7 @@ 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 walLevel -v 0 -system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 1 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 1 +system sh/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 34b9377247e2c00138c13b7f27d54a3d0203c568..7ea4c24b4d86d0fb152177d51e5343cadcbfed5b 100644 --- a/tests/script/general/cache/restart_table.sim +++ b/tests/script/general/cache/restart_table.sim @@ -3,8 +3,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 -system sh/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 tableMetaKeepTimer -v 10 system sh/exec.sh -n dnode1 -s start sleep 3000 @@ -37,8 +36,7 @@ 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 walLevel -v 0 -system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 10 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 10 +system sh/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/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 072eefd10cb0cb42a33bff57b2717b00e89c6dc6..e2c3964e1bd036cebcbdd643d6b82d0a09275135 100644 --- a/tests/script/general/compress/commitlog.sim +++ b/tests/script/general/compress/commitlog.sim @@ -3,7 +3,6 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 1 -system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024 system sh/cfg.sh -n dnode1 -c compression -v 1 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/compress/compress.sim b/tests/script/general/compress/compress.sim index 54fcc9acdec0af68d77ddc1a0b64ce30a3f8922e..276fba9f8c94747469cd5a9d370ee40658988b1e 100644 --- a/tests/script/general/compress/compress.sim +++ b/tests/script/general/compress/compress.sim @@ -3,7 +3,6 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 -system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024 system sh/cfg.sh -n dnode1 -c compression -v 1 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/compress/compress2.sim b/tests/script/general/compress/compress2.sim index 76e9e66312e0c655fd815f921a281c0264137385..29d14c2c75b2bb49cc26aa442dfe4437e72dfb9b 100644 --- a/tests/script/general/compress/compress2.sim +++ b/tests/script/general/compress/compress2.sim @@ -3,7 +3,6 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 -system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024 system sh/cfg.sh -n dnode1 -c compression -v 2 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/compress/uncompress.sim b/tests/script/general/compress/uncompress.sim index 2ff0144600ebb5544e4339d168629068b00ff065..a7b8a95d524086a04188b29e4111c1ecba5953e9 100644 --- a/tests/script/general/compress/uncompress.sim +++ b/tests/script/general/compress/uncompress.sim @@ -3,7 +3,6 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 -system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024 system sh/cfg.sh -n dnode1 -c compression -v 1 system sh/exec.sh -n dnode1 -s start diff --git a/tests/script/general/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/delete_reuse1.sim b/tests/script/general/db/delete_reuse1.sim index 655dc5e365bc83f89e1799adf747792b1666b015..8eb38ed1b108b34211386c621588cdea8cdc6ec5 100644 --- a/tests/script/general/db/delete_reuse1.sim +++ b/tests/script/general/db/delete_reuse1.sim @@ -1,9 +1,5 @@ system sh/stop_dnodes.sh - - - - system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 @@ -31,7 +27,6 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec.sh -n dnode1 -s start -sleep 3000 sql connect print ======== step1 @@ -78,6 +73,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 +94,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 diff --git a/tests/script/general/db/delete_reuse2.sim b/tests/script/general/db/delete_reuse2.sim index c424bee9ae548a93138559bfc090e5b6bb8881e1..d7483a1b589e61acea069e01053153ac5b636097 100644 --- a/tests/script/general/db/delete_reuse2.sim +++ b/tests/script/general/db/delete_reuse2.sim @@ -1,9 +1,5 @@ system sh/stop_dnodes.sh - - - - system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 @@ -31,7 +27,6 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec.sh -n dnode1 -s start -sleep 3000 sql connect print ======== step1 @@ -79,6 +74,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 +101,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) diff --git a/tests/script/general/db/delete_reusevnode.sim b/tests/script/general/db/delete_reusevnode.sim index b12a60b4a6416020ff30d657fba92a94ff637af8..1328ae1a9c5af53a3e614a4ddf03d540e72e6321 100644 --- a/tests/script/general/db/delete_reusevnode.sim +++ b/tests/script/general/db/delete_reusevnode.sim @@ -5,19 +5,16 @@ 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 +34,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 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,7 +105,6 @@ endw print ======== step2 sleep 1000 -sql drop database $db sql show databases if $rows != 0 then return -1 diff --git a/tests/script/general/db/delete_reusevnode2.sim b/tests/script/general/db/delete_reusevnode2.sim index 949c4d4b27e2d97108a9bc56ec099bff8152f8b8..b0032e137bf3e3dba249aa6e0eb815296a9bdca1 100644 --- a/tests/script/general/db/delete_reusevnode2.sim +++ b/tests/script/general/db/delete_reusevnode2.sim @@ -5,26 +5,19 @@ 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 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 diff --git a/tests/script/general/db/delete_writing1.sim b/tests/script/general/db/delete_writing1.sim index 85879253706ba691a7117ae6fa43a84a00fe0334..134a34bf955b19d996bfa91e2703e141f1eaddb3 100644 --- a/tests/script/general/db/delete_writing1.sim +++ b/tests/script/general/db/delete_writing1.sim @@ -1,9 +1,5 @@ system sh/stop_dnodes.sh - - - - system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode3 -i 3 @@ -31,7 +27,6 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec.sh -n dnode1 -s start -sleep 3000 sql connect sql create database db @@ -39,7 +34,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 diff --git a/tests/script/general/db/delete_writing2.sim b/tests/script/general/db/delete_writing2.sim index a836a8988128afaa5a81758448163e266213e713..819c16751a4d6d3257cb44bc5efb0e7293caaebf 100644 --- a/tests/script/general/db/delete_writing2.sim +++ b/tests/script/general/db/delete_writing2.sim @@ -1,13 +1,11 @@ system sh/stop_dnodes.sh - system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec.sh -n dnode1 -s start -sleep 3000 sql connect sql create database db @@ -27,7 +25,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 diff --git a/tests/script/general/db/len.sim b/tests/script/general/db/len.sim index 4ec97c8368f5e57ee6761ecfbb70dfd6fe6acee9..d8c0e9363ffb01d5991114593910cac777ef36c3 100644 --- a/tests/script/general/db/len.sim +++ b/tests/script/general/db/len.sim @@ -4,7 +4,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/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 diff --git a/tests/script/general/db/tables.sim b/tests/script/general/db/tables.sim index 3be2eec729647d295e6503d11fcaa5b3ff12e5e4..590c6fc4421d37daae61dd601ae68ca24e3cc585 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 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 diff --git a/tests/script/general/db/testSuite.sim b/tests/script/general/db/testSuite.sim index c5a4d1e530ed26eaafc3a6a7e9e63a7cf7be7d8f..893d2040a970942b074f08228661ae2c12266529 100644 --- a/tests/script/general/db/testSuite.sim +++ b/tests/script/general/db/testSuite.sim @@ -1,15 +1,15 @@ -#run general//db/basic.sim +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/delete_reuse1.sim -#run general/db/delete_reuse2.sim -#run general/db/delete_writing1.sim -#run general/db/delete_writing2.sim - -#run general/db/len.sim -#run general/db/repeat.sim -#run general/db/tables.sim +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/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/insert_drop.sim b/tests/script/general/insert/insert_drop.sim index e59c1504c4074489028903a0e1e214b6d7745141..04f9415e2fcb0790abea2ac5a795e25dbd18d469 100644 --- a/tests/script/general/insert/insert_drop.sim +++ b/tests/script/general/insert/insert_drop.sim @@ -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/metrics/disk.sim b/tests/script/general/metrics/disk.sim index 1a14b5f00fde7894356b46a1236fd5ceb611d855..a23a117ac20ead141b2c23b9202446593b35c744 100644 --- a/tests/script/general/metrics/disk.sim +++ b/tests/script/general/metrics/disk.sim @@ -4,7 +4,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/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/metrics.sim b/tests/script/general/metrics/metrics.sim index 143e460dff0731f5c58cec00e67d224e78cf5b98..52448a4002b1a544a55329e4b19af4d0a584abcf 100644 --- a/tests/script/general/metrics/metrics.sim +++ b/tests/script/general/metrics/metrics.sim @@ -4,7 +4,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/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 07a31a686b059cbe66187b1ff25642282cce73eb..efabc67722080f345ffb55117722ec2531637fc8 100644 --- a/tests/script/general/metrics/values.sim +++ b/tests/script/general/metrics/values.sim @@ -4,7 +4,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/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 b70253c5cd08bb6fbe97a08db09167348a492b7a..5d4a9f7f5be0bdf25415bff7eb3e3d51e50349a9 100644 --- a/tests/script/general/metrics/vnode3.sim +++ b/tests/script/general/metrics/vnode3.sim @@ -4,7 +4,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/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/parser/alter.sim b/tests/script/general/parser/alter.sim index c1a5622028df3c149efe9934a7923c3f30eb90af..1b19101bc01580cf53cee08514fe9a27e1f9d57e 100644 --- a/tests/script/general/parser/alter.sim +++ b/tests/script/general/parser/alter.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 walLevel -v 0 -system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3 +system sh/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/alter_stable.sim b/tests/script/general/parser/alter_stable.sim index 3a4f05b03645551cfefbd2b1bc6d4bdeca0a6635..6715c44b9634c6cc30085aa1a96449361c380bc0 100644 --- a/tests/script/general/parser/alter_stable.sim +++ b/tests/script/general/parser/alter_stable.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 walLevel -v 0 -system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3 +system sh/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 3c8db5ea8fddd754199de0cb15375bd290b05b06..8fb0ddae545855fd44df5ef1c602521a3e5c112a 100644 --- a/tests/script/general/parser/auto_create_tb.sim +++ b/tests/script/general/parser/auto_create_tb.sim @@ -3,7 +3,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 2 +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/binary_escapeCharacter.sim b/tests/script/general/parser/binary_escapeCharacter.sim index e31e957c20505a6e558e3853c9a76c66f48b4a57..5f7d98a75ad40f94ee34bf36ba089ba9c17fcd0a 100644 --- a/tests/script/general/parser/binary_escapeCharacter.sim +++ b/tests/script/general/parser/binary_escapeCharacter.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 walLevel -v 0 -system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 3 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 3 +system sh/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/columnValue.sim b/tests/script/general/parser/columnValue.sim index 00b2005dcbbf05a3162124069f147a205c8da2a5..aa5c5f72c8e762144729f69f5688104137427769 100644 --- a/tests/script/general/parser/columnValue.sim +++ b/tests/script/general/parser/columnValue.sim @@ -3,8 +3,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 -system sh/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 tableMetaKeepTimer -v 3 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect 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 8af1b1883f8e1ad33b8b7c6f785d6df6ccc181ac..84ee53670ed7809e2be9f394ece6b9db6e433c88 100644 --- a/tests/script/general/parser/columnValue_bool.sim +++ b/tests/script/general/parser/columnValue_bool.sim @@ -12,110 +12,110 @@ 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 select tagname from st_bool_0 -if $data23 != NULL then - print ==1== expect: NULL, actually: $data23 +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 select tagname from st_bool_1 -if $data23 != NULL then - print ==2== expect: NULL, actually: $data23 +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 select tagname from st_bool_2 -if $data23 != NULL then - print ==3== expect: NULL, actually: $data23 +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 select tagname from st_bool_3 -if $data23 != NULL then - print ==4== expect: NULL, actually: $data23 +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 select tagname from st_bool_4 -if $data23 != NULL then - print ==5== expect: NULL, actually: $data23 +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 select tagname from st_bool_5 -if $data23 != NULL then - print ==6== expect: NULL, actually: $data23 +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 select tagname from st_bool_6 -if $data23 != true then - print ==7== expect: true, actually: $data23 +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 select tagname from st_bool_7 -if $data23 != true then - print ==8== expect: true, actually: $data23 +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 select tagname from st_bool_8 -if $data23 != true then - print ==9== expect: true, actually: $data23 +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 select tagname from st_bool_9 -if $data23 != false then - print ==10== expect: false, actually: $data23 +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 select tagname from st_bool_10 -if $data23 != false then - print ==11== expect: false, actually: $data23 +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 select tagname from st_bool_11 -if $data23 != false then - print ==12== expect: false, actually: $data23 +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 select tagname from st_bool_12 -if $data23 != false then - print ==13== expect: false, actually: $data23 +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 select tagname from st_bool_13 -if $data23 != true then - print ==14== expect: true, actually: $data23 +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 select tagname from st_bool_14 -if $data23 != true then - print ==15== expect: true, actually: $data23 +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 select tagname from st_bool_15 -if $data23 != true then - print ==16== expect: true, actually: $data23 +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 select tagname from st_bool_15_0 -if $data23 != true then - print ==16== expect: true, actually: $data23 +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 select tagname from st_bool_15_1 -if $data23 != true then - print ==16== expect: true, actually: $data23 +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) @@ -286,201 +286,201 @@ 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 select tagname from st_bool_16 -if $data23 != NULL then - print ==33== expect: NULL, actually: $data23 +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 select tagname from st_bool_17 -if $data23 != NULL then - print ==35== expect: NULL, actually: $data23 +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 select tagname from st_bool_18 -if $data23 != NULL then - print ==37== expect: NULL, actually: $data23 +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 select tagname from st_bool_19 -if $data23 != NULL then - print ==39== expect: NULL, actually: $data23 +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 select tagname from st_bool_20 -if $data23 != NULL then - print ==41== expect: NULL, actually: $data23 +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 select tagname from st_bool_21 -if $data23 != NULL then - print ==43== expect: NULL, actually: $data23 +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 select tagname from st_bool_22 -if $data23 != true then - print ==45== expect: true, actually: $data23 +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 select tagname from st_bool_23 -if $data23 != true then - print ==47== expect: true, actually: $data23 +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 select tagname from st_bool_24 -if $data23 != true then - print ==49== expect: true, actually: $data23 +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 select tagname from st_bool_25 -if $data23 != false then - print ==51== expect: false, actually: $data23 +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 select tagname from st_bool_26 -if $data23 != false then - print ==53== expect: false, actually: $data23 +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 select tagname from st_bool_27 -if $data23 != false then - print ==55== expect: false, actually: $data23 +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 select tagname from st_bool_28 -if $data23 != false then - print ==57== expect: false, actually: $data23 +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 select tagname from st_bool_29 -if $data23 != true then - print ==59== expect: true, actually: $data23 +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 select tagname from st_bool_30 -if $data23 != true then - print ==61== expect: true, actually: $data23 +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 select tagname from st_bool_31 -if $data23 != true then - print ==63== expect: true, actually: $data23 +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 select tagname from st_bool_32 -if $data23 != true then - print ==63== expect: true, actually: $data23 +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 select tagname from st_bool_33 -if $data23 != true then - print ==63== expect: true, actually: $data23 +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 select tagname from st_bool_0 -if $data23 != true then - return -1 -endi -sql alter table st_bool_0 set tag tagname=NULL -sql select tagname from st_bool_0 -if $data23 != NULL then - return -1 -endi -sql alter table st_bool_0 set tag tagname=false -sql select tagname from st_bool_0 -if $data23 != false then - return -1 -endi -sql alter table st_bool_0 set tag tagname=null -sql select tagname from st_bool_0 -if $data23 != NULL then - return -1 -endi -sql alter table st_bool_0 set tag tagname='true' -sql select tagname from st_bool_0 -if $data23 != true then - return -1 -endi -sql alter table st_bool_0 set tag tagname='null' -sql select tagname from st_bool_0 -if $data23 != NULL then - return -1 -endi -sql alter table st_bool_0 set tag tagname='false' -sql select tagname from st_bool_0 -if $data23 != false then - return -1 -endi -sql alter table st_bool_0 set tag tagname='NULL' -sql select tagname from st_bool_0 -if $data23 != NULL then - return -1 -endi -sql alter table st_bool_0 set tag tagname="true" -sql select tagname from st_bool_0 -if $data23 != true then - return -1 -endi -sql alter table st_bool_0 set tag tagname="null" -sql select tagname from st_bool_0 -if $data23 != NULL then - return -1 -endi -sql alter table st_bool_0 set tag tagname="false" -sql select tagname from st_bool_0 -if $data23 != false then - return -1 -endi -sql alter table st_bool_0 set tag tagname="NULL" -sql select tagname from st_bool_0 -if $data23 != NULL then - return -1 -endi -sql alter table st_bool_0 set tag tagname=1 -sql select tagname from st_bool_0 -if $data23 != true then - return -1 -endi -sql alter table st_bool_0 set tag tagname=0 -sql select tagname from st_bool_0 -if $data23 != false then - return -1 -endi -sql alter table st_bool_0 set tag tagname=6.9 -sql select tagname from st_bool_0 -if $data23 != true then - return -1 -endi -sql alter table st_bool_0 set tag tagname=-3 -sql select tagname from 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 830c49b88c94a0a2af0c933fd8d8936f5aff7708..2b69b1ab8c69a487bcd3852811ca3f615251446f 100644 --- a/tests/script/general/parser/commit.sim +++ b/tests/script/general/parser/commit.sim @@ -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 48b17eed4fe233bc9851603765be77e6cc67a2fe..6e11f9d25b26a91fb37c6562afb67394c6230529 100644 --- a/tests/script/general/parser/create_db.sim +++ b/tests/script/general/parser/create_db.sim @@ -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/first_last.sim b/tests/script/general/parser/first_last.sim index 6c36f0645d16f55260f75031eb3fd4994ec381b0..8bede7573a95677f11faf1043feaf7a20b3c178e 100644 --- a/tests/script/general/parser/first_last.sim +++ b/tests/script/general/parser/first_last.sim @@ -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/interp.sim b/tests/script/general/parser/interp.sim index b923f61236cdc49dcf522ae0e95cf5e3e1051e18..c7c633d42266d364e0ae234ed632225f6806e0ef 100644 --- a/tests/script/general/parser/interp.sim +++ b/tests/script/general/parser/interp.sim @@ -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/lastrow.sim b/tests/script/general/parser/lastrow.sim index c3d0e05aea279489f146d6a305fe903a432966d6..5eb3b144a6f0fe405ffcacf3ed5571d9de820417 100644 --- a/tests/script/general/parser/lastrow.sim +++ b/tests/script/general/parser/lastrow.sim @@ -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 a20160363a3b0cbcb642d61e8d75800bbcb6396b..8f00912a59f40106468e2c67cbbd8b9b669540db 100644 --- a/tests/script/general/parser/limit.sim +++ b/tests/script/general/parser/limit.sim @@ -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 fa8a93871452693fe9332585e25c21e7ba69ef4f..040b6303de7eda3b997344f9cdde7055786f0eae 100644 --- a/tests/script/general/parser/limit1.sim +++ b/tests/script/general/parser/limit1.sim @@ -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 c6d41cb6a52db2d10913443d5859c27d78a042a5..a7764596400b3088f0d02e0bd8e0a36382a66f45 100644 --- a/tests/script/general/parser/limit1_tblocks100.sim +++ b/tests/script/general/parser/limit1_tblocks100.sim @@ -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 5b1280d85856faa4e8e2935abce582b680d8bc8f..cc9334db36bec8a0faa64fc16ba7d0de8a1f199f 100644 --- a/tests/script/general/parser/limit2.sim +++ b/tests/script/general/parser/limit2.sim @@ -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 b69d24f6cabb54db24161bc3d346c895f3e40a2a..64f86edd28092bc816b663719c0ab153ff1181e0 100644 --- a/tests/script/general/parser/limit2_tblocks100.sim +++ b/tests/script/general/parser/limit2_tblocks100.sim @@ -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/null_char.sim b/tests/script/general/parser/null_char.sim index 526a0bda2684b463c6c31acafc09ab0301a668eb..ae402a477de2e4053479a32079d2dc3f9b9494bc 100644 --- a/tests/script/general/parser/null_char.sim +++ b/tests/script/general/parser/null_char.sim @@ -3,8 +3,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 -system sh/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 tableMetaKeepTimer -v 3 system sh/exec.sh -n dnode1 -s start sleep 3000 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/select_across_vnodes.sim b/tests/script/general/parser/select_across_vnodes.sim index 98dd7993ff7bb5180dada3babf9b57a49d8ec7df..883d4d59cdfafd3f7f33d55ea340712a56d62ac0 100644 --- a/tests/script/general/parser/select_across_vnodes.sim +++ b/tests/script/general/parser/select_across_vnodes.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 walLevel -v 0 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 5 +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 84798cdd645c293edad0bfb1b59a03a0cb9a3bd5..04cc68c310951539c0b0dc5dab1e81ef69f67eb3 100644 --- a/tests/script/general/parser/select_from_cache_disk.sim +++ b/tests/script/general/parser/select_from_cache_disk.sim @@ -2,7 +2,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 2 +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/single_row_in_tb.sim b/tests/script/general/parser/single_row_in_tb.sim index 759599b7b12f09f3cd0d1c1e6bc2ff9cf2b60d44..5ee65e3b10c992681497606526afe064ab70237e 100644 --- a/tests/script/general/parser/single_row_in_tb.sim +++ b/tests/script/general/parser/single_row_in_tb.sim @@ -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 18b8babf326756cd2454d99a49c0629c7564a57b..7d2d3fc60b11e5b8d978030f430807fd6d598ba8 100644 --- a/tests/script/general/parser/slimit.sim +++ b/tests/script/general/parser/slimit.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 walLevel -v 0 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 4 +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 @@ -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 ce5b278ca6e268841dc00e1a83a267a5915c4a57..7020cc8bb75b93cfee15a7c1fdd081a031c161c1 100644 --- a/tests/script/general/parser/slimit1.sim +++ b/tests/script/general/parser/slimit1.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 walLevel -v 0 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 2 +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 c507abcf0d74bb9fa10498680ce0e0121002ce0f..630855260c87f96b933be1ae2390e5516092f5a3 100644 --- a/tests/script/general/parser/slimit_alter_tags.sim +++ b/tests/script/general/parser/slimit_alter_tags.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 walLevel -v 0 -system sh/cfg.sh -n dnode1 -c sessionsPerVnode -v 2 +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 cf06e66739104da54e32c745c705134cf29de268..c4be6efa1c6b81dbf2e2e554caf6eb621d0daf26 100644 --- a/tests/script/general/parser/stream.sim +++ b/tests/script/general/parser/stream.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 walLevel -v 0 -system sh/cfg.sh -n dnode1 -c meterMetaKeepTimer -v 5 -system sh/cfg.sh -n dnode1 -c metricMetaKeepTimer -v 5 +system sh/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/tbnameIn.sim b/tests/script/general/parser/tbnameIn.sim index 59298cc9f563f9f8c4875078f832235ef7716dce..548560e945efc8a47d2a54f3c2d17cc0574d8352 100644 --- a/tests/script/general/parser/tbnameIn.sim +++ b/tests/script/general/parser/tbnameIn.sim @@ -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 dede8f227e73ff0a540264d4535c8749b00deedb..d1228f582044e2c451c9f1a1e8671986fdb1278e 100644 --- a/tests/script/general/parser/testSuite.sim +++ b/tests/script/general/parser/testSuite.sim @@ -7,6 +7,7 @@ #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 efc69531ed40d73b3ed137a6a77729d58d04a5b3..ce2b62fcc9a1aad21b41d8013cd9388929fbcdb3 100644 --- a/tests/script/general/parser/timestamp.sim +++ b/tests/script/general/parser/timestamp.sim @@ -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/stream/metrics_del.sim b/tests/script/general/stream/metrics_del.sim index cf8a6df831de1c3c9d02931ca1a269741019fdba..025f4cbdc0568ff2c5a821b17ca7aaa200870473 100644 --- a/tests/script/general/stream/metrics_del.sim +++ b/tests/script/general/stream/metrics_del.sim @@ -2,9 +2,6 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 -system sh/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/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 b4a22b4d6d3852956db2a6e733d0fd6067dc57bb..13cd18adf312e01781482ed82918c47b7ce3e1cb 100644 --- a/tests/script/general/stream/metrics_replica1_vnoden.sim +++ b/tests/script/general/stream/metrics_replica1_vnoden.sim @@ -4,7 +4,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/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_3.sim b/tests/script/general/stream/stream_3.sim index 2a77991569b7a928fc7a8984bb0e504b1685eb6e..914ecd848492dd837024417c2341d135cad25c1d 100644 --- a/tests/script/general/stream/stream_3.sim +++ b/tests/script/general/stream/stream_3.sim @@ -109,9 +109,6 @@ 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 walLevel -v 0 -system sh/cfg.sh -n dnode1 -c numOfBlocksPerMeter -v 4 -system sh/cfg.sh -n dnode1 -c pointsPerCompBlock -v 100 -system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 1024 system sh/exec.sh -n dnode1 -s start sleep 4000 diff --git a/tests/script/general/stream/table_del.sim b/tests/script/general/stream/table_del.sim index 389a3959b022a377215b24e237f053ec15e5510f..16dc8c2bb12caf1dd5e4c31523fe03667b8335dd 100644 --- a/tests/script/general/stream/table_del.sim +++ b/tests/script/general/stream/table_del.sim @@ -2,9 +2,6 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 -system sh/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/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 8195c2c7251dc5662443610b92fab0f74e5b4eba..44d4008dbd36594575472477b4a36887bc5f25ba 100644 --- a/tests/script/general/stream/table_replica1_vnoden.sim +++ b/tests/script/general/stream/table_replica1_vnoden.sim @@ -4,7 +4,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/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/delete_writing.sim b/tests/script/general/table/delete_writing.sim index bd4a316517faaefcecdffba674b29771768c7083..049b3037aa804f6c879e450b8f0f248c5a1ae884 100644 --- a/tests/script/general/table/delete_writing.sim +++ b/tests/script/general/table/delete_writing.sim @@ -40,7 +40,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 diff --git a/tests/script/general/table/limit.sim b/tests/script/general/table/limit.sim index e22f81271b99b9fc8f5f14a9ae1c5c0c4a568177..97541580a837ec11079f16cff6c24a490c3131a9 100644 --- a/tests/script/general/table/limit.sim +++ b/tests/script/general/table/limit.sim @@ -4,7 +4,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c walLevel -v 0 system sh/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 +19,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 diff --git a/tests/script/general/user/monitor.sim b/tests/script/general/user/monitor.sim index 987cb84357ec09314d50f1964a1cf496b4b6a447..3c578ec73c17c98b7f4ae84c614f0e3bcf45c6fb 100644 --- a/tests/script/general/user/monitor.sim +++ b/tests/script/general/user/monitor.sim @@ -4,7 +4,7 @@ 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 diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 4c150b63bcada5404f707561eb1577d08f7ef722..e0590b50ef4b26e593f93e2572007cec52256fe5 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -9,11 +9,21 @@ cd ../../../debug; make #general +./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 ./test.sh -f general/table/autocreate.sim ./test.sh -f general/table/basic1.sim 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 a4ca80c75c9c8072f2cd5819b72a980df2d92dbd..795744961730cfa61a32df9a4fb9650d8212f494 100644 --- a/tests/script/unique/big/tcp.sim +++ b/tests/script/unique/big/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 walLevel -v 0 -system sh/cfg.sh -n dnode1 -c tables -v 30000 +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/balance3.sim b/tests/script/unique/cluster/balance3.sim index 52ef045b8018111bd6051cc101cac591f0833e1e..407adc7f3b61301d6a5d08047160ae0b4d3fac27 100644 --- a/tests/script/unique/cluster/balance3.sim +++ b/tests/script/unique/cluster/balance3.sim @@ -380,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 @@ -408,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/db/delete.sim b/tests/script/unique/db/delete.sim index f499b7172746c7fea126d70ac37139ad7a0389f4..5100b93dcdde560eadb868b166e77750e88314d2 100644 --- a/tests/script/unique/db/delete.sim +++ b/tests/script/unique/db/delete.sim @@ -15,9 +15,6 @@ 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/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 f819a87e8c4ce8c3ed4c95665343d4d290a75dbe..eb502762608cc911517505fed6c1455d4d3c7645 100644 --- a/tests/script/unique/metrics/balance_replica1.sim +++ b/tests/script/unique/metrics/balance_replica1.sim @@ -14,8 +14,8 @@ 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 diff --git a/tests/script/unique/metrics/dnode2.sim b/tests/script/unique/metrics/dnode2.sim index dfcead7dbeb499f219ff153e98c2a7d558b10a5c..03a881ea49722bf93082a7c2910918d8f701fb95 100644 --- a/tests/script/unique/metrics/dnode2.sim +++ b/tests/script/unique/metrics/dnode2.sim @@ -8,8 +8,8 @@ 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 diff --git a/tests/script/unique/metrics/dnode2_stop.sim b/tests/script/unique/metrics/dnode2_stop.sim index eaa73253ea6de0e679c6d464855a2d5d4649663b..58a46f9be9ab5b29155a4b0ffaedf0acbc3ae670 100644 --- a/tests/script/unique/metrics/dnode2_stop.sim +++ b/tests/script/unique/metrics/dnode2_stop.sim @@ -8,8 +8,8 @@ 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 diff --git a/tests/script/unique/metrics/dnode3.sim b/tests/script/unique/metrics/dnode3.sim index 9b5bf4cba94ccc100ecbcc343a22618d906dd4d0..503ce6c47af5f40b432f15d7355394547c7c7d4d 100644 --- a/tests/script/unique/metrics/dnode3.sim +++ b/tests/script/unique/metrics/dnode3.sim @@ -12,9 +12,9 @@ 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 diff --git a/tests/script/unique/metrics/replica2_dnode4.sim b/tests/script/unique/metrics/replica2_dnode4.sim index 7fbf89d767762a94d26dd774333c58aa8be13110..7672b19ad9a5ebc7752d968e4d65a355ae399fb6 100644 --- a/tests/script/unique/metrics/replica2_dnode4.sim +++ b/tests/script/unique/metrics/replica2_dnode4.sim @@ -16,10 +16,10 @@ 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 diff --git a/tests/script/unique/metrics/replica2_vnode3.sim b/tests/script/unique/metrics/replica2_vnode3.sim index 37f0db05f90dc5c9e4fa21e18329b0bfe0ec8b3d..e7163e826decf5a3caab7e9d25cf5abd9d0f9d82 100644 --- a/tests/script/unique/metrics/replica2_vnode3.sim +++ b/tests/script/unique/metrics/replica2_vnode3.sim @@ -8,8 +8,8 @@ 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 diff --git a/tests/script/unique/metrics/replica3_dnode6.sim b/tests/script/unique/metrics/replica3_dnode6.sim index f023ab1c724357319d4a8937d7ac881c99a13b8c..ef70bf5cc35ab91323a17b7891dc176226c2ec04 100644 --- a/tests/script/unique/metrics/replica3_dnode6.sim +++ b/tests/script/unique/metrics/replica3_dnode6.sim @@ -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 diff --git a/tests/script/unique/metrics/replica3_vnode3.sim b/tests/script/unique/metrics/replica3_vnode3.sim index 549500439b547fb55b6f248a3cd354783e5ac5d9..50ad6d7584b1c2aec2e64b68da6d1a7b8b7c9189 100644 --- a/tests/script/unique/metrics/replica3_vnode3.sim +++ b/tests/script/unique/metrics/replica3_vnode3.sim @@ -16,10 +16,10 @@ 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 diff --git a/tests/script/unique/stream/metrics_balance.sim b/tests/script/unique/stream/metrics_balance.sim index d3da7b43d14c649cc8119935d0832e0c8b5164f9..ff6ca9d1f0b64cac4ed17e1ecc5f1ac8ddd5859d 100644 --- a/tests/script/unique/stream/metrics_balance.sim +++ b/tests/script/unique/stream/metrics_balance.sim @@ -14,12 +14,10 @@ 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 diff --git a/tests/script/unique/stream/metrics_replica1_dnode2.sim b/tests/script/unique/stream/metrics_replica1_dnode2.sim index 45fb7d269d1b6b45e749824888df11a7985300f4..78b9165681ba07a11477301971a5208f62999720 100644 --- a/tests/script/unique/stream/metrics_replica1_dnode2.sim +++ b/tests/script/unique/stream/metrics_replica1_dnode2.sim @@ -8,8 +8,8 @@ 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_vnoden.sim b/tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim index 1c89d18917b497d12abacf8141c5e256e9c448e5..47454501c67e04ecaa74ea67a5b4c8b89ea44ec4 100644 --- a/tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim +++ b/tests/script/unique/stream/metrics_replica2_dnode2_vnoden.sim @@ -8,8 +8,8 @@ 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 d0ef994f299da18dc59516822deb3356e8b3753d..a8c986cce936288cc31ec48eac97d77be695dfd2 100644 --- a/tests/script/unique/stream/metrics_replica2_dnode3.sim +++ b/tests/script/unique/stream/metrics_replica2_dnode3.sim @@ -12,9 +12,9 @@ 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 e2b2c3d6cc8b3e3479a81c2f727219f8e863c7f5..8ff7a3738ec6b592abf75e9331fa3d03c39b4a07 100644 --- a/tests/script/unique/stream/metrics_replica3_dnode4.sim +++ b/tests/script/unique/stream/metrics_replica3_dnode4.sim @@ -16,10 +16,10 @@ 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_balance.sim b/tests/script/unique/stream/table_balance.sim index a0a83c7cef7a7fbbc1faeb99b3faad0d28696dd2..015f9f1f17485724618dd72cd0b304774e0809f6 100644 --- a/tests/script/unique/stream/table_balance.sim +++ b/tests/script/unique/stream/table_balance.sim @@ -14,8 +14,8 @@ 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 diff --git a/tests/script/unique/stream/table_move.sim b/tests/script/unique/stream/table_move.sim index eb99b93932246e86ce61973beb9fae607c3eda80..6589ed941e74c17a0d39b03a058b198fb969e356 100644 --- a/tests/script/unique/stream/table_move.sim +++ b/tests/script/unique/stream/table_move.sim @@ -35,10 +35,10 @@ 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 diff --git a/tests/script/unique/stream/table_replica1_dnode2.sim b/tests/script/unique/stream/table_replica1_dnode2.sim index a36d9ec99d51fef66727fa40b7deba787ce851c9..3d88493f403e8030560a51d2bb9dbd31ac06bf3b 100644 --- a/tests/script/unique/stream/table_replica1_dnode2.sim +++ b/tests/script/unique/stream/table_replica1_dnode2.sim @@ -8,8 +8,8 @@ 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_vnoden.sim b/tests/script/unique/stream/table_replica2_dnode2_vnoden.sim index c84d73933f5d092f312e8c3f1062257306d06f4f..809627432b1380a9d9a7b8784573173944e53b75 100644 --- a/tests/script/unique/stream/table_replica2_dnode2_vnoden.sim +++ b/tests/script/unique/stream/table_replica2_dnode2_vnoden.sim @@ -8,8 +8,8 @@ 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 5e9ef14c01728a1cff16859bc85b272741f86b6e..abee70d0483ca3ee982f57dd503837019f1dd5fd 100644 --- a/tests/script/unique/stream/table_replica2_dnode3.sim +++ b/tests/script/unique/stream/table_replica2_dnode3.sim @@ -12,9 +12,9 @@ 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 7547f77963678028fba4d3cd241bc740833da019..effdd38c2e05a7729d61af325fe861d7a7c368c9 100644 --- a/tests/script/unique/stream/table_replica3_dnode4.sim +++ b/tests/script/unique/stream/table_replica3_dnode4.sim @@ -16,10 +16,10 @@ 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/table/delete_part.sim b/tests/script/unique/table/delete_part.sim index 826df7f04cad0c28cf4daeda219d2f0d2a960cbe..f4a7b6fce443568bcd6b86ca0a0ca7de7bf8f79b 100644 --- a/tests/script/unique/table/delete_part.sim +++ b/tests/script/unique/table/delete_part.sim @@ -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/replica3_vgroup.sim b/tests/script/unique/vnode/replica3_vgroup.sim index 077c1e2e49efde127dc72117ea700f3ec5676679..2763ed7c67c47496c3976cd9467b814d3f1e58f2 100644 --- a/tests/script/unique/vnode/replica3_vgroup.sim +++ b/tests/script/unique/vnode/replica3_vgroup.sim @@ -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 f395d0d62b32bfa05defad255bcffe991f950191..bd07918ddc85c019c7be891a68dea3a5afa92ace 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; }