From fd408b63daa0b04dfb8501dd279550c06086b8ec Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Tue, 12 Mar 2024 16:40:36 +0800 Subject: [PATCH 01/12] feat: add showAD feature for community --- tools/shell/src/shellEngine.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index 995d3d04ec..cd9aa45c5e 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -56,7 +56,7 @@ static void shellWriteHistory(); static void shellPrintError(TAOS_RES *tres, int64_t st); static bool shellIsCommentLine(char *line); static void shellSourceFile(const char *file); -static void shellGetGrantInfo(); +static bool shellGetGrantInfo(); static void shellCleanup(void *arg); static void *shellCancelHandler(void *arg); @@ -1150,7 +1150,17 @@ void shellSourceFile(const char *file) { taosCloseFile(&pFile); } -void shellGetGrantInfo() { +// show enterprise AD +void showAD() { + fprintf(stdout, "You are using the TDengine Community Edition. \ + If you want to experience more advanced TDengine features and have professional service, \ + please try the TDengine Enterprise Edition.\r\n\ + https://www.taosdata.com/tdengine-enterprise + "); +} + +bool shellGetGrantInfo() { + bool community = true; char sinfo[1024] = {0}; tstrncpy(sinfo, taos_get_server_info(shell.conn), sizeof(sinfo)); strtok(sinfo, "\r\n"); @@ -1194,15 +1204,19 @@ void shellGetGrantInfo() { memcpy(expired, row[2], fields[2].bytes); if (strcmp(serverVersion, "community") == 0) { - fprintf(stdout, "Server is Community Edition.\r\n"); + community = true; + showAD() } else if (strcmp(expiretime, "unlimited") == 0) { + community = false; fprintf(stdout, "Server is Enterprise %s Edition, %s and will never expire.\r\n", serverVersion, sinfo); } else { + community = false; fprintf(stdout, "Server is Enterprise %s Edition, %s and will expire at %s.\r\n", serverVersion, sinfo, expiretime); } taos_free_result(tres); + return community; } fprintf(stdout, "\r\n"); @@ -1367,7 +1381,7 @@ int32_t shellExecute() { #ifndef WINDOWS printfIntroduction(); #endif - shellGetGrantInfo(); + bool community = shellGetGrantInfo(); #ifdef WEBSOCKET } #endif @@ -1380,6 +1394,12 @@ int32_t shellExecute() { break; } } + + // commnuity + if (community) { + showAD(); + } + taosThreadJoin(spid, NULL); shellCleanupHistory(); From 1e7cfefc5ec1abc7200e6d1f25dd70d3dc8a6e8a Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Tue, 12 Mar 2024 17:34:18 +0800 Subject: [PATCH 02/12] fix: build error --- tools/shell/src/shellEngine.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index cd9aa45c5e..4b1fc3ba2a 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -1152,11 +1152,11 @@ void shellSourceFile(const char *file) { // show enterprise AD void showAD() { - fprintf(stdout, "You are using the TDengine Community Edition. \ - If you want to experience more advanced TDengine features and have professional service, \ + fprintf(stdout, "\r\n\ + You are using the TDengine Community Edition. \r\n\ + If you want to experience more advanced TDengine features and have professional service,\r\n\ please try the TDengine Enterprise Edition.\r\n\ - https://www.taosdata.com/tdengine-enterprise - "); + https://www.taosdata.com/tdengine-enterprise\r\n\r\n"); } bool shellGetGrantInfo() { @@ -1175,7 +1175,7 @@ bool shellGetGrantInfo() { code != TSDB_CODE_PAR_PERMISSION_DENIED) { fprintf(stderr, "Failed to check Server Edition, Reason:0x%04x:%s\r\n\r\n", code, taos_errstr(tres)); } - return; + return community; } int32_t num_fields = taos_field_count(tres); @@ -1205,7 +1205,7 @@ bool shellGetGrantInfo() { if (strcmp(serverVersion, "community") == 0) { community = true; - showAD() + showAD(); } else if (strcmp(expiretime, "unlimited") == 0) { community = false; fprintf(stdout, "Server is Enterprise %s Edition, %s and will never expire.\r\n", serverVersion, sinfo); @@ -1216,10 +1216,10 @@ bool shellGetGrantInfo() { } taos_free_result(tres); - return community; } fprintf(stdout, "\r\n"); + return community; } #ifdef WINDOWS From 987e0b845fae8bdf4f80cc25e60c115ee28166b5 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Wed, 13 Mar 2024 17:16:42 +0800 Subject: [PATCH 03/12] feat: version2 modify tip msg --- tools/shell/inc/shellAuto.h | 3 +++ tools/shell/src/shellAuto.c | 17 ++++++++++++++++- tools/shell/src/shellEngine.c | 21 ++++++++------------- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/tools/shell/inc/shellAuto.h b/tools/shell/inc/shellAuto.h index 6a317fe5c9..a4fca51ee7 100644 --- a/tools/shell/inc/shellAuto.h +++ b/tools/shell/inc/shellAuto.h @@ -41,6 +41,9 @@ void callbackAutoTab(char* sqlstr, TAOS* pSql, bool usedb); // introduction void printfIntroduction(); +// show enterprise AD at start or end +void showAD(bool end); + // show all commands help void showHelp(); diff --git a/tools/shell/src/shellAuto.c b/tools/shell/src/shellAuto.c index 847bbcf4be..5fdbbe1be7 100644 --- a/tools/shell/src/shellAuto.c +++ b/tools/shell/src/shellAuto.c @@ -400,7 +400,7 @@ SMatch* lastMatch = NULL; // save last match result int cntDel = 0; // delete byte count after next press tab // show auto tab introduction -void printfIntroduction() { +void printfIntroduction(bool community) { printf(" ******************************** Tab Completion ************************************\n"); char secondLine[160] = "\0"; sprintf(secondLine, " * The %s CLI supports tab completion for a variety of items, ", shell.info.cusName); @@ -420,9 +420,24 @@ void printfIntroduction() { printf(" * [ Ctrl + L ] ...... clear the entire screen *\n"); printf(" * [ Ctrl + K ] ...... clear the screen after the cursor *\n"); printf(" * [ Ctrl + U ] ...... clear the screen before the cursor *\n"); + if(community) { + printf(" * ----------------------------------------------------------------------------- *\n"); + printf(" * You are using TDengine OSS. To experience more advanced TDengine features and *\n"); + printf(" * receive professional technical support, try TDengine Enterprise: *\n"); + printf(" * http://www.tdengine.com *\n"); + } printf(" **************************************************************************************\n\n"); } +// show enterprise AD +void showAD(bool end) { + printf("\n"); + printf(" You are using TDengine OSS. To experience more advanced TDengine features and \n"); + printf(" receive professional technical support, try TDengine Enterprise: \n"); + printf(" http://www.tdengine.com \n"); + printf("\n"); +} + void showHelp() { printf("\nThe %s CLI supports the following commands:", shell.info.cusName); printf( diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index 4b1fc3ba2a..512f188fba 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -1150,15 +1150,6 @@ void shellSourceFile(const char *file) { taosCloseFile(&pFile); } -// show enterprise AD -void showAD() { - fprintf(stdout, "\r\n\ - You are using the TDengine Community Edition. \r\n\ - If you want to experience more advanced TDengine features and have professional service,\r\n\ - please try the TDengine Enterprise Edition.\r\n\ - https://www.taosdata.com/tdengine-enterprise\r\n\r\n"); -} - bool shellGetGrantInfo() { bool community = true; char sinfo[1024] = {0}; @@ -1205,7 +1196,6 @@ bool shellGetGrantInfo() { if (strcmp(serverVersion, "community") == 0) { community = true; - showAD(); } else if (strcmp(expiretime, "unlimited") == 0) { community = false; fprintf(stdout, "Server is Enterprise %s Edition, %s and will never expire.\r\n", serverVersion, sinfo); @@ -1378,10 +1368,15 @@ int32_t shellExecute() { #ifdef WEBSOCKET if (!shell.args.restful && !shell.args.cloud) { #endif +bool community = shellGetGrantInfo(); #ifndef WINDOWS - printfIntroduction(); + printfIntroduction(community); +#else + if(community) { + showAD(false) + } #endif - bool community = shellGetGrantInfo(); + #ifdef WEBSOCKET } #endif @@ -1397,7 +1392,7 @@ int32_t shellExecute() { // commnuity if (community) { - showAD(); + showAD(true); } taosThreadJoin(spid, NULL); From cca0bf6af037c9dc863f3f672db234855e7fd6d8 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Wed, 13 Mar 2024 20:36:43 +0800 Subject: [PATCH 04/12] fix: last modify information --- tools/shell/inc/shellAuto.h | 2 +- tools/shell/src/shellAuto.c | 17 ++++++++--------- tools/shell/src/shellEngine.c | 13 +++++++++---- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/tools/shell/inc/shellAuto.h b/tools/shell/inc/shellAuto.h index a4fca51ee7..bcf500fefc 100644 --- a/tools/shell/inc/shellAuto.h +++ b/tools/shell/inc/shellAuto.h @@ -39,7 +39,7 @@ void shellAutoExit(); void callbackAutoTab(char* sqlstr, TAOS* pSql, bool usedb); // introduction -void printfIntroduction(); +void printfIntroduction(bool community); // show enterprise AD at start or end void showAD(bool end); diff --git a/tools/shell/src/shellAuto.c b/tools/shell/src/shellAuto.c index 5fdbbe1be7..c279b03b14 100644 --- a/tools/shell/src/shellAuto.c +++ b/tools/shell/src/shellAuto.c @@ -421,21 +421,20 @@ void printfIntroduction(bool community) { printf(" * [ Ctrl + K ] ...... clear the screen after the cursor *\n"); printf(" * [ Ctrl + U ] ...... clear the screen before the cursor *\n"); if(community) { - printf(" * ----------------------------------------------------------------------------- *\n"); - printf(" * You are using TDengine OSS. To experience more advanced TDengine features and *\n"); - printf(" * receive professional technical support, try TDengine Enterprise: *\n"); - printf(" * http://www.tdengine.com *\n"); + printf(" * ---------------------------------------------------------------------------------- *\n"); + printf(" * You are using TDengine OSS. To experience more advanced features and receive *\n"); + printf(" * professional technical support, try TDengine Enterprise or Cloud, *\n"); + printf(" * learn more at https://tdengine.com *\n"); } printf(" **************************************************************************************\n\n"); } // show enterprise AD void showAD(bool end) { - printf("\n"); - printf(" You are using TDengine OSS. To experience more advanced TDengine features and \n"); - printf(" receive professional technical support, try TDengine Enterprise: \n"); - printf(" http://www.tdengine.com \n"); - printf("\n"); + printf(" You are using TDengine OSS. To experience more advanced features and receive \n"); + printf(" professional technical support, try TDengine Enterprise or Cloud, \n"); + printf(" learn more at https://tdengine.com \n"); + printf(" \n"); } void showHelp() { diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index 512f188fba..69625fe01f 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -1150,7 +1150,7 @@ void shellSourceFile(const char *file) { taosCloseFile(&pFile); } -bool shellGetGrantInfo() { +bool shellGetGrantInfo(char* buf) { bool community = true; char sinfo[1024] = {0}; tstrncpy(sinfo, taos_get_server_info(shell.conn), sizeof(sinfo)); @@ -1198,10 +1198,10 @@ bool shellGetGrantInfo() { community = true; } else if (strcmp(expiretime, "unlimited") == 0) { community = false; - fprintf(stdout, "Server is Enterprise %s Edition, %s and will never expire.\r\n", serverVersion, sinfo); + fprintf(buf, "Server is Enterprise %s Edition, %s and will never expire.\r\n", serverVersion, sinfo); } else { community = false; - fprintf(stdout, "Server is Enterprise %s Edition, %s and will expire at %s.\r\n", serverVersion, sinfo, + fprintf(buf, "Server is Enterprise %s Edition, %s and will expire at %s.\r\n", serverVersion, sinfo, expiretime); } @@ -1368,7 +1368,8 @@ int32_t shellExecute() { #ifdef WEBSOCKET if (!shell.args.restful && !shell.args.cloud) { #endif -bool community = shellGetGrantInfo(); +char buf[512] = ""; +bool community = shellGetGrantInfo(buf); #ifndef WINDOWS printfIntroduction(community); #else @@ -1376,6 +1377,10 @@ bool community = shellGetGrantInfo(); showAD(false) } #endif +// printf version +if(!community) { + printf(buf); +} #ifdef WEBSOCKET } From ef553bf2104d0544b3674f7b5cd16715d0e6f20a Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Wed, 13 Mar 2024 20:40:01 +0800 Subject: [PATCH 05/12] fix:build error --- tools/shell/src/shellEngine.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index 69625fe01f..59013cb6ff 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -1198,10 +1198,10 @@ bool shellGetGrantInfo(char* buf) { community = true; } else if (strcmp(expiretime, "unlimited") == 0) { community = false; - fprintf(buf, "Server is Enterprise %s Edition, %s and will never expire.\r\n", serverVersion, sinfo); + sprintf(buf, "Server is Enterprise %s Edition, %s and will never expire.\r\n", serverVersion, sinfo); } else { community = false; - fprintf(buf, "Server is Enterprise %s Edition, %s and will expire at %s.\r\n", serverVersion, sinfo, + sprintf(buf, "Server is Enterprise %s Edition, %s and will expire at %s.\r\n", serverVersion, sinfo, expiretime); } @@ -1379,7 +1379,7 @@ bool community = shellGetGrantInfo(buf); #endif // printf version if(!community) { - printf(buf); + printf("%s", buf); } #ifdef WEBSOCKET From f90ba610af8b9f68c2f66ebed8c39b72d435271c Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Wed, 13 Mar 2024 20:43:03 +0800 Subject: [PATCH 06/12] fix:build error1 --- tools/shell/src/shellEngine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index 59013cb6ff..3b58d32d0a 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -1379,7 +1379,7 @@ bool community = shellGetGrantInfo(buf); #endif // printf version if(!community) { - printf("%s", buf); + printf("%s\n", buf); } #ifdef WEBSOCKET From 61ce6602d8e2d333aba53e56e7eaddbeb36beeaf Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Thu, 14 Mar 2024 10:09:23 +0800 Subject: [PATCH 07/12] fix: version3 information --- tools/shell/src/shellAuto.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/tools/shell/src/shellAuto.c b/tools/shell/src/shellAuto.c index c279b03b14..0038866669 100644 --- a/tools/shell/src/shellAuto.c +++ b/tools/shell/src/shellAuto.c @@ -410,30 +410,30 @@ void printfIntroduction(bool community) { printf(" "); } printf("*\n"); - printf(" * including database names, table names, function names and keywords. *\n"); - printf(" * The full list of shortcut keys is as follows: *\n"); - printf(" * [ TAB ] ...... complete the current word *\n"); - printf(" * ...... if used on a blank line, display all supported commands *\n"); - printf(" * [ Ctrl + A ] ...... move cursor to the st[A]rt of the line *\n"); - printf(" * [ Ctrl + E ] ...... move cursor to the [E]nd of the line *\n"); - printf(" * [ Ctrl + W ] ...... move cursor to the middle of the line *\n"); - printf(" * [ Ctrl + L ] ...... clear the entire screen *\n"); - printf(" * [ Ctrl + K ] ...... clear the screen after the cursor *\n"); - printf(" * [ Ctrl + U ] ...... clear the screen before the cursor *\n"); + printf(" * including database names, table names, function names and keywords. *\n"); + printf(" * The full list of shortcut keys is as follows: *\n"); + printf(" * [ TAB ] ...... complete the current word *\n"); + printf(" * ...... if used on a blank line, display all supported commands *\n"); + printf(" * [ Ctrl + A ] ...... move cursor to the st[A]rt of the line *\n"); + printf(" * [ Ctrl + E ] ...... move cursor to the [E]nd of the line *\n"); + printf(" * [ Ctrl + W ] ...... move cursor to the middle of the line *\n"); + printf(" * [ Ctrl + L ] ...... clear the entire screen *\n"); + printf(" * [ Ctrl + K ] ...... clear the screen after the cursor *\n"); + printf(" * [ Ctrl + U ] ...... clear the screen before the cursor *\n"); if(community) { - printf(" * ---------------------------------------------------------------------------------- *\n"); - printf(" * You are using TDengine OSS. To experience more advanced features and receive *\n"); - printf(" * professional technical support, try TDengine Enterprise or Cloud, *\n"); - printf(" * learn more at https://tdengine.com *\n"); + printf(" * ----------------------------------------------------------------------------------- *\n"); + printf(" * You are using TDengine OSS. To experience advanced features, like backup/restore, *\n"); + printf(" * privilege control and more, or receive 7x24 technical support, try TDengine *\n"); + printf(" * Enterprise or Free Cloud Trial. Learn more at https://tdengine.com *\n"); } printf(" **************************************************************************************\n\n"); } // show enterprise AD void showAD(bool end) { - printf(" You are using TDengine OSS. To experience more advanced features and receive \n"); - printf(" professional technical support, try TDengine Enterprise or Cloud, \n"); - printf(" learn more at https://tdengine.com \n"); + printf(" You are using TDengine OSS. To experience advanced features, like backup/restore, \n"); + printf(" privilege control and more, or receive 7x24 technical support, try TDengine \n"); + printf(" Enterprise or Free Cloud Trial. Learn more at https://tdengine.com \n"); printf(" \n"); } From 16c277b7ec2f166b88246b699522f433ad30aa5c Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Thu, 14 Mar 2024 10:13:51 +0800 Subject: [PATCH 08/12] fix: version4 information --- tools/shell/src/shellAuto.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/shell/src/shellAuto.c b/tools/shell/src/shellAuto.c index 0038866669..79a4124fb7 100644 --- a/tools/shell/src/shellAuto.c +++ b/tools/shell/src/shellAuto.c @@ -401,12 +401,12 @@ int cntDel = 0; // delete byte count after next press tab // show auto tab introduction void printfIntroduction(bool community) { - printf(" ******************************** Tab Completion ************************************\n"); + printf(" ********************************* Tab Completion *************************************\n"); char secondLine[160] = "\0"; sprintf(secondLine, " * The %s CLI supports tab completion for a variety of items, ", shell.info.cusName); printf("%s", secondLine); int secondLineLen = strlen(secondLine); - while (87 - (secondLineLen++) > 0) { + while (89 - (secondLineLen++) > 0) { printf(" "); } printf("*\n"); @@ -422,18 +422,18 @@ void printfIntroduction(bool community) { printf(" * [ Ctrl + U ] ...... clear the screen before the cursor *\n"); if(community) { printf(" * ----------------------------------------------------------------------------------- *\n"); - printf(" * You are using TDengine OSS. To experience advanced features, like backup/restore, *\n"); + printf(" * You are using TDengine OSS. To experience advanced features, like backup/restore *\n"); printf(" * privilege control and more, or receive 7x24 technical support, try TDengine *\n"); printf(" * Enterprise or Free Cloud Trial. Learn more at https://tdengine.com *\n"); } - printf(" **************************************************************************************\n\n"); + printf(" ****************************************************************************************\n\n"); } // show enterprise AD void showAD(bool end) { - printf(" You are using TDengine OSS. To experience advanced features, like backup/restore, \n"); - printf(" privilege control and more, or receive 7x24 technical support, try TDengine \n"); - printf(" Enterprise or Free Cloud Trial. Learn more at https://tdengine.com \n"); + printf(" You are using TDengine OSS. To experience advanced features, like backup/restore \n"); + printf(" privilege control and more, or receive 7x24 technical support, try TDengine Enterprise \n"); + printf(" or Free Cloud Trial. Learn more at https://tdengine.com \n"); printf(" \n"); } From e38ff4e7bf43b28ba753f31dc6651bbe9ee8e1b7 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Thu, 14 Mar 2024 10:15:56 +0800 Subject: [PATCH 09/12] fix: version4 information --- tools/shell/src/shellAuto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/shell/src/shellAuto.c b/tools/shell/src/shellAuto.c index 79a4124fb7..6ab94761f7 100644 --- a/tools/shell/src/shellAuto.c +++ b/tools/shell/src/shellAuto.c @@ -422,7 +422,7 @@ void printfIntroduction(bool community) { printf(" * [ Ctrl + U ] ...... clear the screen before the cursor *\n"); if(community) { printf(" * ----------------------------------------------------------------------------------- *\n"); - printf(" * You are using TDengine OSS. To experience advanced features, like backup/restore *\n"); + printf(" * You are using TDengine OSS. To experience advanced features, like backup/restore, *\n"); printf(" * privilege control and more, or receive 7x24 technical support, try TDengine *\n"); printf(" * Enterprise or Free Cloud Trial. Learn more at https://tdengine.com *\n"); } @@ -431,7 +431,7 @@ void printfIntroduction(bool community) { // show enterprise AD void showAD(bool end) { - printf(" You are using TDengine OSS. To experience advanced features, like backup/restore \n"); + printf(" You are using TDengine OSS. To experience advanced features, like backup/restore, \n"); printf(" privilege control and more, or receive 7x24 technical support, try TDengine Enterprise \n"); printf(" or Free Cloud Trial. Learn more at https://tdengine.com \n"); printf(" \n"); From 18a669219efa5d9b374f7a6be67b363b553076ce Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Thu, 14 Mar 2024 10:21:55 +0800 Subject: [PATCH 10/12] fix: version4 information --- tools/shell/src/shellAuto.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/shell/src/shellAuto.c b/tools/shell/src/shellAuto.c index 6ab94761f7..f39fbfbdf5 100644 --- a/tools/shell/src/shellAuto.c +++ b/tools/shell/src/shellAuto.c @@ -421,10 +421,10 @@ void printfIntroduction(bool community) { printf(" * [ Ctrl + K ] ...... clear the screen after the cursor *\n"); printf(" * [ Ctrl + U ] ...... clear the screen before the cursor *\n"); if(community) { - printf(" * ----------------------------------------------------------------------------------- *\n"); - printf(" * You are using TDengine OSS. To experience advanced features, like backup/restore, *\n"); - printf(" * privilege control and more, or receive 7x24 technical support, try TDengine *\n"); - printf(" * Enterprise or Free Cloud Trial. Learn more at https://tdengine.com *\n"); + printf(" * ------------------------------------------------------------------------------------ *\n"); + printf(" * You are using TDengine OSS. To experience advanced features, like backup/restore, *\n"); + printf(" * privilege control and more, or receive 7x24 technical support, try TDengine *\n"); + printf(" * Enterprise or Free Cloud Trial. Learn more at https://tdengine.com *\n"); } printf(" ****************************************************************************************\n\n"); } From 40c99f23553fcfd3d0eb433bcadd518ff4422c2f Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Thu, 14 Mar 2024 12:56:59 +0800 Subject: [PATCH 11/12] fix: websocket mode test --- tools/shell/src/shellEngine.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index 3b58d32d0a..7dc2d05352 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -1373,9 +1373,11 @@ bool community = shellGetGrantInfo(buf); #ifndef WINDOWS printfIntroduction(community); #else +#ifndef WEBSOCKET if(community) { showAD(false) } +#endif #endif // printf version if(!community) { @@ -1394,11 +1396,12 @@ if(!community) { break; } } - +#ifndef WEBSOCKET // commnuity if (community) { showAD(true); } +#endif taosThreadJoin(spid, NULL); From 5ff836db247c71c186ac3350b6808c5fe6451da3 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Thu, 14 Mar 2024 14:09:27 +0800 Subject: [PATCH 12/12] fix: windows build --- tools/shell/src/shellEngine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index 7dc2d05352..5c71396ea9 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -1375,7 +1375,7 @@ bool community = shellGetGrantInfo(buf); #else #ifndef WEBSOCKET if(community) { - showAD(false) + showAD(false); } #endif #endif