From cb5bdd29b57c16783cb38841fc11933b686af174 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 16 May 2024 17:30:03 +0800 Subject: [PATCH 1/9] feat(grant): support industry edition --- cmake/cmake.version | 4 ++++ include/common/tgrant.h | 4 ++-- include/util/cus_name.h | 1 + include/util/tdef.h | 8 ++++++++ source/dnode/mgmt/exe/dmMain.c | 7 +------ source/dnode/mnode/impl/src/mndGrant.c | 3 +-- tools/shell/src/shellEngine.c | 5 ++--- 7 files changed, 19 insertions(+), 13 deletions(-) diff --git a/cmake/cmake.version b/cmake/cmake.version index 5bb1c61ac2..4b944e5ad0 100644 --- a/cmake/cmake.version +++ b/cmake/cmake.version @@ -11,6 +11,10 @@ ELSE () SET(TD_VER_COMPATIBLE "3.0.0.0") ENDIF () +IF (TD_EDITION_NAME) + ADD_DEFINITIONS(-DTD_EDITION_NAME="${TD_EDITION_NAME}") +ENDIF () + find_program(HAVE_GIT NAMES git) IF (DEFINED GITINFO) diff --git a/include/common/tgrant.h b/include/common/tgrant.h index 7e7162204e..b707045bd1 100644 --- a/include/common/tgrant.h +++ b/include/common/tgrant.h @@ -73,7 +73,7 @@ char *tGetMachineId(); #ifdef TD_ENTERPRISE #define GRANTS_SCHEMA \ static const SSysDbTableSchema grantsSchema[] = { \ - {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \ + {.name = "version", .bytes = 32 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \ {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \ {.name = "service_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \ {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \ @@ -85,7 +85,7 @@ char *tGetMachineId(); #else #define GRANTS_SCHEMA \ static const SSysDbTableSchema grantsSchema[] = { \ - {.name = "version", .bytes = 9 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \ + {.name = "version", .bytes = 32 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \ {.name = "expire_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \ {.name = "service_time", .bytes = 19 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \ {.name = "expired", .bytes = 5 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR, .sysInfo = true}, \ diff --git a/include/util/cus_name.h b/include/util/cus_name.h index 16f677f855..76b09f3ea1 100644 --- a/include/util/cus_name.h +++ b/include/util/cus_name.h @@ -28,4 +28,5 @@ #define CUS_EMAIL "" #endif + #endif // _CUS_NAME_H_ diff --git a/include/util/tdef.h b/include/util/tdef.h index 6ded54dc00..3246e09a45 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -78,6 +78,14 @@ extern const int32_t TYPE_BYTES[21]; #define TSDB_DEFAULT_PASS "taosdata" #endif +#ifndef TD_EDITION_NAME +#ifdef TD_ENTERPRISE +#define TD_EDITION_NAME "TDengine Enterprise Edition" +#else +#define TD_EDITION_NAME "TDengine Community Edition" +#endif +#endif + #define TSDB_TRUE 1 #define TSDB_FALSE 0 #define TSDB_OK 0 diff --git a/source/dnode/mgmt/exe/dmMain.c b/source/dnode/mgmt/exe/dmMain.c index f7fcd7697f..6a68f580b2 100644 --- a/source/dnode/mgmt/exe/dmMain.c +++ b/source/dnode/mgmt/exe/dmMain.c @@ -258,12 +258,7 @@ static void dmPrintArgs(int32_t argc, char const *argv[]) { static void dmGenerateGrant() { mndGenerateMachineCode(); } static void dmPrintVersion() { -#ifdef TD_ENTERPRISE - char *releaseName = "enterprise"; -#else - char *releaseName = "community"; -#endif - printf("%s version: %s compatible_version: %s\n", releaseName, version, compatible_version); + printf("%s: %s compatible_version: %s\n", TD_EDITION_NAME, version, compatible_version); printf("gitinfo: %s\n", gitinfo); #ifdef TD_ENTERPRISE printf("gitinfoOfInternal: %s\n", gitinfoOfInternal); diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index 8dae4b3c11..32c2b50148 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -36,8 +36,7 @@ static int32_t mndRetrieveGrant(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl if (pShow->numOfRows < 1) { cols = 0; SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - const char *src = "community"; - STR_WITH_MAXSIZE_TO_VARSTR(tmp, src, 32); + STR_WITH_MAXSIZE_TO_VARSTR(tmp, TD_EDITION_NAME, 32); colDataSetVal(pColInfo, numOfRows, tmp, false); GRANT_ITEM_SHOW("unlimited"); diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index 1d1050c1ec..23765a8e67 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -1189,12 +1189,11 @@ bool shellGetGrantInfo(char* buf) { fprintf(stderr, "\r\nFailed to get grant information from server. Abort.\r\n"); exit(0); } - - char serverVersion[32] = {0}; + char serverVersion[64] = {0}; char expiretime[32] = {0}; char expired[32] = {0}; - memcpy(serverVersion, row[0], fields[0].bytes); + tstrncpy(serverVersion, row[0], 64); memcpy(expiretime, row[1], fields[1].bytes); memcpy(expired, row[2], fields[2].bytes); From 57cbf9674148bc3c348feb9aeb29585fee553b50 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 16 May 2024 17:36:39 +0800 Subject: [PATCH 2/9] chore: revert the code change --- include/util/cus_name.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/util/cus_name.h b/include/util/cus_name.h index 76b09f3ea1..16f677f855 100644 --- a/include/util/cus_name.h +++ b/include/util/cus_name.h @@ -28,5 +28,4 @@ #define CUS_EMAIL "" #endif - #endif // _CUS_NAME_H_ From cf6847edfdb7719296973902fdc9fdd4d8b83c8c Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Mon, 20 May 2024 13:29:44 +0800 Subject: [PATCH 3/9] feat: add industry edition in Taos-CLI --- tools/shell/src/shellArguments.c | 5 +---- tools/shell/src/shellEngine.c | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/shell/src/shellArguments.c b/tools/shell/src/shellArguments.c index 434b5e4b61..c45a440e19 100644 --- a/tools/shell/src/shellArguments.c +++ b/tools/shell/src/shellArguments.c @@ -434,10 +434,7 @@ int32_t shellParseArgs(int32_t argc, char *argv[]) { sprintf(shell.info.promptContinue, promptContinueFormat, " "); shell.info.promptSize = strlen(shell.info.promptHeader); #ifdef TD_ENTERPRISE - snprintf(shell.info.programVersion, sizeof(shell.info.programVersion), - "version: %s compatible_version: %s\ngitinfo: %s\ngitinfoOfInternal: %s\nbuildInfo: %s", version, - compatible_version, gitinfo, gitinfoOfInternal, buildinfo); -#else +git#else snprintf(shell.info.programVersion, sizeof(shell.info.programVersion), "version: %s compatible_version: %s\ngitinfo: %s\nbuildInfo: %s", version, compatible_version, gitinfo, buildinfo); diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index 23765a8e67..e04566aadb 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -1201,10 +1201,10 @@ bool shellGetGrantInfo(char* buf) { community = true; } else if (strcmp(expiretime, "unlimited") == 0) { community = false; - sprintf(buf, "Server is Enterprise %s Edition, %s and will never expire.\r\n", serverVersion, sinfo); + sprintf(buf, "Server is %s, %s and will never expire.\r\n", serverVersion, sinfo); } else { community = false; - sprintf(buf, "Server is Enterprise %s Edition, %s and will expire at %s.\r\n", serverVersion, sinfo, + sprintf(buf, "Server is %s, %s and will expire at %s.\r\n", serverVersion, sinfo, expiretime); } From 4f7b995701a9e8949e1a58166648c4c0689d2ffc Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Mon, 20 May 2024 13:33:20 +0800 Subject: [PATCH 4/9] feat: build error --- tools/shell/src/shellArguments.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/shell/src/shellArguments.c b/tools/shell/src/shellArguments.c index c45a440e19..fffe000b65 100644 --- a/tools/shell/src/shellArguments.c +++ b/tools/shell/src/shellArguments.c @@ -434,9 +434,9 @@ int32_t shellParseArgs(int32_t argc, char *argv[]) { sprintf(shell.info.promptContinue, promptContinueFormat, " "); shell.info.promptSize = strlen(shell.info.promptHeader); #ifdef TD_ENTERPRISE -git#else +#else snprintf(shell.info.programVersion, sizeof(shell.info.programVersion), - "version: %s compatible_version: %s\ngitinfo: %s\nbuildInfo: %s", version, compatible_version, gitinfo, + "%s: %s compatible_version: %s\ngitinfo: %s\ngitinfoOfInternal: %s\nbuildInfo: %s", TD_EDITION_NAME, buildinfo); #endif From 375b3b5f60279d651b4f82c0f292806c4e4eec65 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Mon, 20 May 2024 13:42:01 +0800 Subject: [PATCH 5/9] feat: TD_EDITION_NAME macro --- tools/shell/src/shellArguments.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/shell/src/shellArguments.c b/tools/shell/src/shellArguments.c index fffe000b65..5bd11189d9 100644 --- a/tools/shell/src/shellArguments.c +++ b/tools/shell/src/shellArguments.c @@ -434,10 +434,12 @@ int32_t shellParseArgs(int32_t argc, char *argv[]) { sprintf(shell.info.promptContinue, promptContinueFormat, " "); shell.info.promptSize = strlen(shell.info.promptHeader); #ifdef TD_ENTERPRISE + snprintf(shell.info.programVersion, sizeof(shell.info.programVersion), + "%s: %s compatible_version: %s\ngitinfo: %s\ngitinfoOfInternal: %s\nbuildInfo: %s", TD_EDITION_NAME, version, + compatible_version, gitinfo, gitinfoOfInternal, buildinfo); #else snprintf(shell.info.programVersion, sizeof(shell.info.programVersion), - "%s: %s compatible_version: %s\ngitinfo: %s\ngitinfoOfInternal: %s\nbuildInfo: %s", TD_EDITION_NAME, - buildinfo); + "%s: %s compatible_version: %s\ngitinfo: %s\nbuildInfo: %s", TD_EDITION_NAME, version, compatible_version, gitinfo, buildinfo); #endif #if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32) From 585ec14fea099c9d9297997598c3c80aa08a4cb8 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 23 May 2024 17:17:18 +0800 Subject: [PATCH 6/9] feat(grant): support industry edition --- cmake/cmake.version | 4 ++-- include/util/tdef.h | 6 +++--- source/dnode/mgmt/exe/dmMain.c | 8 ++++---- source/dnode/mnode/impl/src/mndGrant.c | 2 +- source/libs/function/src/udfd.c | 11 +++-------- source/util/src/version.c.in | 2 +- tools/shell/src/shellArguments.c | 5 +++-- 7 files changed, 17 insertions(+), 21 deletions(-) diff --git a/cmake/cmake.version b/cmake/cmake.version index 4b944e5ad0..156e99bd03 100644 --- a/cmake/cmake.version +++ b/cmake/cmake.version @@ -11,8 +11,8 @@ ELSE () SET(TD_VER_COMPATIBLE "3.0.0.0") ENDIF () -IF (TD_EDITION_NAME) - ADD_DEFINITIONS(-DTD_EDITION_NAME="${TD_EDITION_NAME}") +IF (TD_PRODUCT_NAME) + ADD_DEFINITIONS(-DTD_PRODUCT_NAME="${TD_PRODUCT_NAME}") ENDIF () find_program(HAVE_GIT NAMES git) diff --git a/include/util/tdef.h b/include/util/tdef.h index 3246e09a45..fecc1a332c 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -78,11 +78,11 @@ extern const int32_t TYPE_BYTES[21]; #define TSDB_DEFAULT_PASS "taosdata" #endif -#ifndef TD_EDITION_NAME +#ifndef TD_PRODUCT_NAME #ifdef TD_ENTERPRISE -#define TD_EDITION_NAME "TDengine Enterprise Edition" +#define TD_PRODUCT_NAME "TDengine Enterprise Edition" #else -#define TD_EDITION_NAME "TDengine Community Edition" +#define TD_PRODUCT_NAME "TDengine Community Edition" #endif #endif diff --git a/source/dnode/mgmt/exe/dmMain.c b/source/dnode/mgmt/exe/dmMain.c index cdae6a493c..a39eb5fae3 100644 --- a/source/dnode/mgmt/exe/dmMain.c +++ b/source/dnode/mgmt/exe/dmMain.c @@ -258,12 +258,12 @@ static void dmPrintArgs(int32_t argc, char const *argv[]) { static void dmGenerateGrant() { mndGenerateMachineCode(); } static void dmPrintVersion() { - printf("%s: %s compatible_version: %s\n", TD_EDITION_NAME, version, compatible_version); - printf("gitinfo: %s\n", gitinfo); + printf("%s\ntaosd version: %s compatible_version: %s\n", TD_PRODUCT_NAME, version, compatible_version); + printf("git: %s\n", gitinfo); #ifdef TD_ENTERPRISE - printf("gitinfoOfInternal: %s\n", gitinfoOfInternal); + printf("git: %s\n", gitinfoOfInternal); #endif - printf("buildInfo: %s\n", buildinfo); + printf("build: %s\n", buildinfo); } static void dmPrintHelp() { diff --git a/source/dnode/mnode/impl/src/mndGrant.c b/source/dnode/mnode/impl/src/mndGrant.c index 32c2b50148..1dae6ebc81 100644 --- a/source/dnode/mnode/impl/src/mndGrant.c +++ b/source/dnode/mnode/impl/src/mndGrant.c @@ -36,7 +36,7 @@ static int32_t mndRetrieveGrant(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pBl if (pShow->numOfRows < 1) { cols = 0; SColumnInfoData *pColInfo = taosArrayGet(pBlock->pDataBlock, cols); - STR_WITH_MAXSIZE_TO_VARSTR(tmp, TD_EDITION_NAME, 32); + STR_WITH_MAXSIZE_TO_VARSTR(tmp, TD_PRODUCT_NAME, 32); colDataSetVal(pColInfo, numOfRows, tmp, false); GRANT_ITEM_SHOW("unlimited"); diff --git a/source/libs/function/src/udfd.c b/source/libs/function/src/udfd.c index 2a5e594ba3..54745951cc 100644 --- a/source/libs/function/src/udfd.c +++ b/source/libs/function/src/udfd.c @@ -1242,14 +1242,9 @@ static int32_t udfdParseArgs(int32_t argc, char *argv[]) { } static void udfdPrintVersion() { -#ifdef TD_ENTERPRISE - char *releaseName = "enterprise"; -#else - char *releaseName = "community"; -#endif - printf("%s version: %s compatible_version: %s\n", releaseName, version, compatible_version); - printf("gitinfo: %s\n", gitinfo); - printf("buildInfo: %s\n", buildinfo); + printf("udfd version: %s compatible_version: %s\n", version, compatible_version); + printf("git: %s\n", gitinfo); + printf("build: %s\n", buildinfo); } static int32_t udfdInitLog() { diff --git a/source/util/src/version.c.in b/source/util/src/version.c.in index ec6449a02f..2446bf9278 100644 --- a/source/util/src/version.c.in +++ b/source/util/src/version.c.in @@ -2,6 +2,6 @@ char version[64] = "${TD_VER_NUMBER}"; char compatible_version[12] = "${TD_VER_COMPATIBLE}"; char gitinfo[48] = "${TD_VER_GIT}"; char gitinfoOfInternal[48] = "${TD_VER_GIT_INTERNAL}"; -char buildinfo[64] = "Built ${TD_VER_OSTYPE}-${TD_VER_CPUTYPE} at ${TD_VER_DATE}"; +char buildinfo[64] = "${TD_VER_OSTYPE}-${TD_VER_CPUTYPE} ${TD_VER_DATE}"; void libtaos_${TD_LIB_VER_NUMBER}_${TD_VER_OSTYPE}_${TD_VER_CPUTYPE}_${TD_VER_VERTYPE}() {}; diff --git a/tools/shell/src/shellArguments.c b/tools/shell/src/shellArguments.c index 5bd11189d9..f48b19a287 100644 --- a/tools/shell/src/shellArguments.c +++ b/tools/shell/src/shellArguments.c @@ -435,11 +435,12 @@ int32_t shellParseArgs(int32_t argc, char *argv[]) { shell.info.promptSize = strlen(shell.info.promptHeader); #ifdef TD_ENTERPRISE snprintf(shell.info.programVersion, sizeof(shell.info.programVersion), - "%s: %s compatible_version: %s\ngitinfo: %s\ngitinfoOfInternal: %s\nbuildInfo: %s", TD_EDITION_NAME, version, + "%s\ntaos version: %s compatible_version: %s\ngit: %s\ngit: %s\nbuild: %s", TD_PRODUCT_NAME, version, compatible_version, gitinfo, gitinfoOfInternal, buildinfo); #else snprintf(shell.info.programVersion, sizeof(shell.info.programVersion), - "%s: %s compatible_version: %s\ngitinfo: %s\nbuildInfo: %s", TD_EDITION_NAME, version, compatible_version, gitinfo, buildinfo); + "%s\ntaos version: %s compatible_version: %s\ngit: %s\nbuild: %s", TD_PRODUCT_NAME, version, + compatible_version, gitinfo, buildinfo); #endif #if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32) From 5eb4f664528fe58a8026d7fcc94f2c6b03c9ef54 Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 6 Jun 2024 13:01:03 +0800 Subject: [PATCH 7/9] test: adjust test case for taos/taosd version output --- tests/system-test/0-others/show.py | 6 +++--- tests/system-test/0-others/taosShell.py | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/system-test/0-others/show.py b/tests/system-test/0-others/show.py index a5db5d193a..7c7870e773 100644 --- a/tests/system-test/0-others/show.py +++ b/tests/system-test/0-others/show.py @@ -191,12 +191,12 @@ class TDTestCase: tdSql.query('show local variables') for i in tdSql.queryResult: if i[0].lower() == "gitinfo": - taos_gitinfo_sql = f"gitinfo: {i[1]}" + taos_gitinfo_sql = f"git: {i[1]}" taos_info = os.popen('taos -V').read() - taos_gitinfo = re.findall("^gitinfo.*",taos_info,re.M) + taos_gitinfo = re.findall("^git: .*",taos_info,re.M) tdSql.checkEqual(taos_gitinfo_sql,taos_gitinfo[0]) taosd_info = os.popen('taosd -V').read() - taosd_gitinfo = re.findall("^gitinfo.*",taosd_info,re.M) + taosd_gitinfo = re.findall("^git: .*",taosd_info,re.M) tdSql.checkEqual(taosd_gitinfo_sql,taosd_gitinfo[0]) def show_base(self): diff --git a/tests/system-test/0-others/taosShell.py b/tests/system-test/0-others/taosShell.py index 1227378799..3b6f6c6fab 100644 --- a/tests/system-test/0-others/taosShell.py +++ b/tests/system-test/0-others/taosShell.py @@ -5,6 +5,7 @@ import time import socket import os import platform +import re if platform.system().lower() == 'windows': import wexpect as taosExpect else: @@ -370,10 +371,11 @@ class TDTestCase: if retCode != "TAOS_OK": tdLog.exit("taos -V fail") - version = 'version: ' + version - retVal = retVal.replace("\n", "") - retVal = retVal.replace("\r", "") - if retVal.startswith(version) == False: + version = 'taos version: ' + version + # retVal = retVal.replace("\n", "") + # retVal = retVal.replace("\r", "") + taosVersion = re.findall((f'^%s'%(version)), retVal,re.M) + if len(taosVersion) == 0: print ("return version: [%s]"%retVal) print ("dict version: [%s]"%version) tdLog.exit("taos -V version not match") From cf6cbee568c4e2aa12050ecf9ca4f6d17321392c Mon Sep 17 00:00:00 2001 From: kailixu Date: Thu, 6 Jun 2024 14:10:33 +0800 Subject: [PATCH 8/9] test: adjust test case for taos/taosd version output --- tests/system-test/0-others/show.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system-test/0-others/show.py b/tests/system-test/0-others/show.py index 7c7870e773..64696c5e6d 100644 --- a/tests/system-test/0-others/show.py +++ b/tests/system-test/0-others/show.py @@ -186,7 +186,7 @@ class TDTestCase: tdSql.query('show dnode 1 variables') for i in tdSql.queryResult: if i[1].lower() == "gitinfo": - taosd_gitinfo_sql = f"gitinfo: {i[2]}" + taosd_gitinfo_sql = f"git: {i[2]}" taos_gitinfo_sql = '' tdSql.query('show local variables') for i in tdSql.queryResult: From 7abd569aad4fc5f01b2e25df91f13807ba1ff3bc Mon Sep 17 00:00:00 2001 From: kailixu Date: Fri, 7 Jun 2024 10:27:59 +0800 Subject: [PATCH 9/9] test: test case for show grants full --- tests/system-test/0-others/information_schema.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/system-test/0-others/information_schema.py b/tests/system-test/0-others/information_schema.py index e8ed3db1b9..0d9f43424d 100644 --- a/tests/system-test/0-others/information_schema.py +++ b/tests/system-test/0-others/information_schema.py @@ -269,6 +269,10 @@ class TDTestCase: def ins_grants_check(self): grant_name_dict = { + 'service':'Service Time', + 'timeseries':'Timeseries', + 'dnodes':'Dnodes', + 'cpu_cores':'CPU Cores', 'stream':'Stream', 'subscription':'Subscription', 'view':'View', @@ -293,6 +297,7 @@ class TDTestCase: 'mysql':'MySQL', 'postgres':'PostgreSQL', 'oracle':'Oracle', + 'mssql':'SqlServer' } tdSql.execute('drop database if exists db2') @@ -304,7 +309,7 @@ class TDTestCase: if result[i][0] in grant_name_dict: tdSql.checkEqual(result[i][1], grant_name_dict[result[i][0]]) index += 1 - tdSql.checkEqual(index, 24) + tdSql.checkEqual(index, len(grant_name_dict)) tdSql.query(f'select * from information_schema.ins_grants_logs') result = tdSql.queryResult tdSql.checkEqual(True, len(result) >= 0)