Merge pull request #22563 from taosdata/fix/update_db_attr

fix(parser): update the key words for disk io throttling.
This commit is contained in:
Haojun Liao 2023-08-24 19:01:07 +08:00 committed by GitHub
commit de9b852cee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 12 deletions

View File

@ -178,7 +178,7 @@ The following list shows all reserved keywords:
- MATCH - MATCH
- MAX_DELAY - MAX_DELAY
- MAX_SPEED - BWLIMIT
- MAXROWS - MAXROWS
- MERGE - MERGE
- META - META

View File

@ -178,7 +178,7 @@ description: TDengine 保留关键字的详细列表
- MATCH - MATCH
- MAX_DELAY - MAX_DELAY
- MAX_SPEED - BWLIMIT
- MAXROWS - MAXROWS
- MERGE - MERGE
- META - META

View File

@ -113,7 +113,7 @@
#define TK_TABLE_PREFIX 95 #define TK_TABLE_PREFIX 95
#define TK_TABLE_SUFFIX 96 #define TK_TABLE_SUFFIX 96
#define TK_NK_COLON 97 #define TK_NK_COLON 97
#define TK_MAX_SPEED 98 #define TK_BWLIMIT 98
#define TK_START 99 #define TK_START 99
#define TK_TIMESTAMP 100 #define TK_TIMESTAMP 100
#define TK_END 101 #define TK_END 101

View File

@ -286,7 +286,7 @@ retention(A) ::= NK_VARIABLE(B) NK_COLON NK_VARIABLE(C).
%type speed_opt { int32_t } %type speed_opt { int32_t }
%destructor speed_opt { } %destructor speed_opt { }
speed_opt(A) ::= . { A = 0; } speed_opt(A) ::= . { A = 0; }
speed_opt(A) ::= MAX_SPEED NK_INTEGER(B). { A = taosStr2Int32(B.z, NULL, 10); } speed_opt(A) ::= BWLIMIT NK_INTEGER(B). { A = taosStr2Int32(B.z, NULL, 10); }
start_opt(A) ::= . { A = NULL; } start_opt(A) ::= . { A = NULL; }
start_opt(A) ::= START WITH NK_INTEGER(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &B); } start_opt(A) ::= START WITH NK_INTEGER(B). { A = createValueNode(pCxt, TSDB_DATA_TYPE_BIGINT, &B); }

View File

@ -137,7 +137,7 @@ static SKeyword keywordTable[] = {
{"MATCH", TK_MATCH}, {"MATCH", TK_MATCH},
{"MAXROWS", TK_MAXROWS}, {"MAXROWS", TK_MAXROWS},
{"MAX_DELAY", TK_MAX_DELAY}, {"MAX_DELAY", TK_MAX_DELAY},
{"MAX_SPEED", TK_MAX_SPEED}, {"BWLIMIT", TK_BWLIMIT},
{"MERGE", TK_MERGE}, {"MERGE", TK_MERGE},
{"META", TK_META}, {"META", TK_META},
{"ONLY", TK_ONLY}, {"ONLY", TK_ONLY},

View File

@ -1150,7 +1150,7 @@ static const YYCODETYPE yyFallback[] = {
0, /* TABLE_PREFIX => nothing */ 0, /* TABLE_PREFIX => nothing */
0, /* TABLE_SUFFIX => nothing */ 0, /* TABLE_SUFFIX => nothing */
0, /* NK_COLON => nothing */ 0, /* NK_COLON => nothing */
0, /* MAX_SPEED => nothing */ 0, /* BWLIMIT => nothing */
0, /* START => nothing */ 0, /* START => nothing */
0, /* TIMESTAMP => nothing */ 0, /* TIMESTAMP => nothing */
287, /* END => ABORT */ 287, /* END => ABORT */
@ -1575,7 +1575,7 @@ static const char *const yyTokenName[] = {
/* 95 */ "TABLE_PREFIX", /* 95 */ "TABLE_PREFIX",
/* 96 */ "TABLE_SUFFIX", /* 96 */ "TABLE_SUFFIX",
/* 97 */ "NK_COLON", /* 97 */ "NK_COLON",
/* 98 */ "MAX_SPEED", /* 98 */ "BWLIMIT",
/* 99 */ "START", /* 99 */ "START",
/* 100 */ "TIMESTAMP", /* 100 */ "TIMESTAMP",
/* 101 */ "END", /* 101 */ "END",
@ -2114,7 +2114,7 @@ static const char *const yyRuleName[] = {
/* 140 */ "retention_list ::= retention_list NK_COMMA retention", /* 140 */ "retention_list ::= retention_list NK_COMMA retention",
/* 141 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE", /* 141 */ "retention ::= NK_VARIABLE NK_COLON NK_VARIABLE",
/* 142 */ "speed_opt ::=", /* 142 */ "speed_opt ::=",
/* 143 */ "speed_opt ::= MAX_SPEED NK_INTEGER", /* 143 */ "speed_opt ::= BWLIMIT NK_INTEGER",
/* 144 */ "start_opt ::=", /* 144 */ "start_opt ::=",
/* 145 */ "start_opt ::= START WITH NK_INTEGER", /* 145 */ "start_opt ::= START WITH NK_INTEGER",
/* 146 */ "start_opt ::= START WITH NK_STRING", /* 146 */ "start_opt ::= START WITH NK_STRING",
@ -3335,7 +3335,7 @@ static const YYCODETYPE yyRuleInfoLhs[] = {
366, /* (140) retention_list ::= retention_list NK_COMMA retention */ 366, /* (140) retention_list ::= retention_list NK_COMMA retention */
369, /* (141) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ 369, /* (141) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
361, /* (142) speed_opt ::= */ 361, /* (142) speed_opt ::= */
361, /* (143) speed_opt ::= MAX_SPEED NK_INTEGER */ 361, /* (143) speed_opt ::= BWLIMIT NK_INTEGER */
362, /* (144) start_opt ::= */ 362, /* (144) start_opt ::= */
362, /* (145) start_opt ::= START WITH NK_INTEGER */ 362, /* (145) start_opt ::= START WITH NK_INTEGER */
362, /* (146) start_opt ::= START WITH NK_STRING */ 362, /* (146) start_opt ::= START WITH NK_STRING */
@ -3940,7 +3940,7 @@ static const signed char yyRuleInfoNRhs[] = {
-3, /* (140) retention_list ::= retention_list NK_COMMA retention */ -3, /* (140) retention_list ::= retention_list NK_COMMA retention */
-3, /* (141) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */ -3, /* (141) retention ::= NK_VARIABLE NK_COLON NK_VARIABLE */
0, /* (142) speed_opt ::= */ 0, /* (142) speed_opt ::= */
-2, /* (143) speed_opt ::= MAX_SPEED NK_INTEGER */ -2, /* (143) speed_opt ::= BWLIMIT NK_INTEGER */
0, /* (144) start_opt ::= */ 0, /* (144) start_opt ::= */
-3, /* (145) start_opt ::= START WITH NK_INTEGER */ -3, /* (145) start_opt ::= START WITH NK_INTEGER */
-3, /* (146) start_opt ::= START WITH NK_STRING */ -3, /* (146) start_opt ::= START WITH NK_STRING */
@ -5016,7 +5016,7 @@ static YYACTIONTYPE yy_reduce(
case 330: /* bufsize_opt ::= */ yytestcase(yyruleno==330); case 330: /* bufsize_opt ::= */ yytestcase(yyruleno==330);
{ yymsp[1].minor.yy416 = 0; } { yymsp[1].minor.yy416 = 0; }
break; break;
case 143: /* speed_opt ::= MAX_SPEED NK_INTEGER */ case 143: /* speed_opt ::= BWLIMIT NK_INTEGER */
case 331: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==331); case 331: /* bufsize_opt ::= BUFSIZE NK_INTEGER */ yytestcase(yyruleno==331);
{ yymsp[-1].minor.yy416 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); } { yymsp[-1].minor.yy416 = taosStr2Int32(yymsp[0].minor.yy0.z, NULL, 10); }
break; break;

View File

@ -286,7 +286,7 @@ TEST_F(ParserShowToUseTest, trimDatabase) {
run("TRIM DATABASE wxy_db"); run("TRIM DATABASE wxy_db");
setTrimDbReq("wxy_db", 100); setTrimDbReq("wxy_db", 100);
run("TRIM DATABASE wxy_db MAX_SPEED 100"); run("TRIM DATABASE wxy_db BWLIMIT 100");
} }
TEST_F(ParserShowToUseTest, useDatabase) { TEST_F(ParserShowToUseTest, useDatabase) {