From c522f3b3f33125421f16466312081201ef3c3007 Mon Sep 17 00:00:00 2001 From: xywang Date: Sun, 8 May 2022 10:54:56 +0800 Subject: [PATCH] feat(query): fixed regex matching error --- src/kit/shell/src/shellEngine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kit/shell/src/shellEngine.c b/src/kit/shell/src/shellEngine.c index 0364d03974..bc9e576191 100644 --- a/src/kit/shell/src/shellEngine.c +++ b/src/kit/shell/src/shellEngine.c @@ -259,7 +259,7 @@ void shellRunCommandOnServer(TAOS *con, char command[]) { sptr = tmp; if (sptr != NULL) { - if (regex_match(sptr + 2, "^\\s*[\\>|\\<|\\<=|\\>=|=|!=]\\s*;\\s*$", REG_EXTENDED | REG_ICASE) == 0) { + if (regex_match(sptr + 2, "^\\s*[0-9]+\\s*[\\>|\\<|\\<=|\\>=|=|!=]\\s*.*;\\s*$", REG_EXTENDED | REG_ICASE) == 0) { cptr = tstrstr(command, ";", true); if (cptr != NULL) { *cptr = '\0'; -- GitLab