diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 16523571c6e5658e8391415a133faef0bc81d104..2bfa2189d617627594e993bcf7d8c1b29ad072d6 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -3922,6 +3922,10 @@ int32_t getQueryCondExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tSqlExpr** pExpr const char* msg1 = "query condition between different columns must use 'AND'"; + if ((*pExpr)->flags & (1 << EXPR_FLAG_TS_ERROR)) { + return TSDB_CODE_TSC_INVALID_SQL; + } + tSqlExpr* pLeft = (*pExpr)->pLeft; tSqlExpr* pRight = (*pExpr)->pRight; @@ -3959,6 +3963,14 @@ int32_t getQueryCondExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tSqlExpr** pExpr exchangeExpr(*pExpr); + if (pLeft->tokenId == TK_ID && pRight->tokenId == TK_TIMESTAMP && (pRight->flags & (1 << EXPR_FLAG_TIMESTAMP_VAR))) { + return TSDB_CODE_TSC_INVALID_SQL; + } + + if ((pLeft->flags & (1 << EXPR_FLAG_TS_ERROR)) || (pRight->flags & (1 << EXPR_FLAG_TS_ERROR))) { + return TSDB_CODE_TSC_INVALID_SQL; + } + return handleExprInQueryCond(pCmd, pQueryInfo, pExpr, pCondExpr, type, parentOptr); } diff --git a/src/inc/ttokendef.h b/src/inc/ttokendef.h index 5f47d9896fa50042ac6b090f4ba53103bb620648..c7c4b5968b51579f4bbe57f4f36da03ccbecb6ee 100644 --- a/src/inc/ttokendef.h +++ b/src/inc/ttokendef.h @@ -210,6 +210,8 @@ + + #define TK_SPACE 300 #define TK_COMMENT 301 #define TK_ILLEGAL 302 diff --git a/src/query/inc/qSqlparser.h b/src/query/inc/qSqlparser.h index 1d62b10c37155c5015d8851846358cd4f950e580..0a0587f701d1844c2bc7af6c0975c2a017060eb4 100644 --- a/src/query/inc/qSqlparser.h +++ b/src/query/inc/qSqlparser.h @@ -45,7 +45,9 @@ enum SQL_NODE_FROM_TYPE { }; enum SQL_EXPR_FLAG { - EXPR_FLAG_US_TIMESTAMP = 1 + EXPR_FLAG_TS_ERROR = 1, + EXPR_FLAG_US_TIMESTAMP = 2, + EXPR_FLAG_TIMESTAMP_VAR = 3, }; extern char tTokenTypeSwitcher[13]; diff --git a/src/query/inc/sql.y b/src/query/inc/sql.y index f9a4f1b51d34b17fddeb07946361f328d4702a1d..5a42b3a631cbf3950efc17f6eda245b934de27b3 100644 --- a/src/query/inc/sql.y +++ b/src/query/inc/sql.y @@ -674,6 +674,8 @@ expr(A) ::= PLUS(X) FLOAT(Y). { X.n += Y.n; X.type = TK_FLOAT; A = tSqlExprCr expr(A) ::= STRING(X). { A = tSqlExprCreateIdValue(&X, TK_STRING);} expr(A) ::= NOW(X). { A = tSqlExprCreateIdValue(&X, TK_NOW); } expr(A) ::= VARIABLE(X). { A = tSqlExprCreateIdValue(&X, TK_VARIABLE);} +expr(A) ::= PLUS(X) VARIABLE(Y). { X.n += Y.n; X.type = TK_VARIABLE; A = tSqlExprCreateIdValue(&X, TK_VARIABLE);} +expr(A) ::= MINUS(X) VARIABLE(Y). { X.n += Y.n; X.type = TK_VARIABLE; A = tSqlExprCreateIdValue(&X, TK_VARIABLE);} expr(A) ::= BOOL(X). { A = tSqlExprCreateIdValue(&X, TK_BOOL);} expr(A) ::= NULL(X). { A = tSqlExprCreateIdValue(&X, TK_NULL);} diff --git a/src/query/src/qSqlParser.c b/src/query/src/qSqlParser.c index 45b0fb0ec2b3a0148d1ce24f57c86cb0f66285ca..6b38536b150d2144cdcae4d2bc303f36bdcca9d9 100644 --- a/src/query/src/qSqlParser.c +++ b/src/query/src/qSqlParser.c @@ -152,6 +152,7 @@ tSqlExpr *tSqlExprCreateIdValue(SStrToken *pToken, int32_t optrType) { } pSqlExpr->flags |= 1 << EXPR_FLAG_US_TIMESTAMP; + pSqlExpr->flags |= 1 << EXPR_FLAG_TIMESTAMP_VAR; pSqlExpr->value.nType = TSDB_DATA_TYPE_BIGINT; pSqlExpr->tokenId = TK_TIMESTAMP; pSqlExpr->type = SQL_NODE_VALUE; @@ -221,6 +222,14 @@ tSqlExpr *tSqlExprCreate(tSqlExpr *pLeft, tSqlExpr *pRight, int32_t optrType) { pExpr->type = SQL_NODE_VALUE; pExpr->flags = pLeft->flags | pRight->flags; + if ((pLeft->flags & (1 << EXPR_FLAG_TIMESTAMP_VAR)) && (pRight->flags & (1 << EXPR_FLAG_TIMESTAMP_VAR))) { + pExpr->flags |= 1 << EXPR_FLAG_TS_ERROR; + } else { + pExpr->flags &= ~(1 << EXPR_FLAG_TIMESTAMP_VAR); + pExpr->flags &= ~(1 << EXPR_FLAG_TS_ERROR); + } + + switch (optrType) { case TK_PLUS: { pExpr->value.i64 = pLeft->value.i64 + pRight->value.i64; @@ -248,7 +257,6 @@ tSqlExpr *tSqlExprCreate(tSqlExpr *pLeft, tSqlExpr *pRight, int32_t optrType) { tSqlExprDestroy(pLeft); tSqlExprDestroy(pRight); - } else if ((pLeft->tokenId == TK_FLOAT && pRight->tokenId == TK_INTEGER) || (pLeft->tokenId == TK_INTEGER && pRight->tokenId == TK_FLOAT) || (pLeft->tokenId == TK_FLOAT && pRight->tokenId == TK_FLOAT)) { diff --git a/src/query/src/sql.c b/src/query/src/sql.c index 3c22bd85cc31b8bb6f8f39585b41f0fed1300b16..96d33a8ed67f5901a3e1303b0e4163106765370f 100644 --- a/src/query/src/sql.c +++ b/src/query/src/sql.c @@ -138,17 +138,17 @@ typedef union { #define ParseCTX_STORE #define YYFALLBACK 1 #define YYNSTATE 315 -#define YYNRULE 267 -#define YYNRULE_WITH_ACTION 267 +#define YYNRULE 269 +#define YYNRULE_WITH_ACTION 269 #define YYNTOKEN 187 #define YY_MAX_SHIFT 314 -#define YY_MIN_SHIFTREDUCE 506 -#define YY_MAX_SHIFTREDUCE 772 -#define YY_ERROR_ACTION 773 -#define YY_ACCEPT_ACTION 774 -#define YY_NO_ACTION 775 -#define YY_MIN_REDUCE 776 -#define YY_MAX_REDUCE 1042 +#define YY_MIN_SHIFTREDUCE 508 +#define YY_MAX_SHIFTREDUCE 776 +#define YY_ERROR_ACTION 777 +#define YY_ACCEPT_ACTION 778 +#define YY_NO_ACTION 779 +#define YY_MIN_REDUCE 780 +#define YY_MAX_REDUCE 1048 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -215,77 +215,76 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (681) +#define YY_ACTTAB_COUNT (672) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 133, 553, 202, 312, 206, 140, 943, 17, 85, 554, - /* 10 */ 774, 314, 179, 47, 48, 140, 51, 52, 30, 181, - /* 20 */ 214, 41, 181, 50, 262, 55, 53, 57, 54, 1023, - /* 30 */ 922, 209, 1024, 46, 45, 185, 181, 44, 43, 42, - /* 40 */ 47, 48, 910, 51, 52, 208, 1024, 214, 41, 553, - /* 50 */ 50, 262, 55, 53, 57, 54, 934, 554, 1020, 203, - /* 60 */ 46, 45, 919, 247, 44, 43, 42, 48, 940, 51, - /* 70 */ 52, 242, 974, 214, 41, 553, 50, 262, 55, 53, - /* 80 */ 57, 54, 975, 554, 257, 278, 46, 45, 298, 225, - /* 90 */ 44, 43, 42, 507, 508, 509, 510, 511, 512, 513, - /* 100 */ 514, 515, 516, 517, 518, 519, 313, 632, 1019, 231, - /* 110 */ 70, 553, 30, 47, 48, 1018, 51, 52, 821, 554, + /* 0 */ 133, 555, 204, 312, 208, 140, 947, 17, 85, 556, + /* 10 */ 778, 314, 179, 47, 48, 140, 51, 52, 30, 181, + /* 20 */ 214, 41, 181, 50, 262, 55, 53, 57, 54, 1029, + /* 30 */ 926, 211, 1030, 46, 45, 185, 181, 44, 43, 42, + /* 40 */ 47, 48, 914, 51, 52, 210, 1030, 214, 41, 555, + /* 50 */ 50, 262, 55, 53, 57, 54, 938, 556, 1026, 205, + /* 60 */ 46, 45, 923, 247, 44, 43, 42, 48, 944, 51, + /* 70 */ 52, 242, 978, 214, 41, 555, 50, 262, 55, 53, + /* 80 */ 57, 54, 979, 556, 257, 278, 46, 45, 298, 225, + /* 90 */ 44, 43, 42, 509, 510, 511, 512, 513, 514, 515, + /* 100 */ 516, 517, 518, 519, 520, 521, 313, 634, 1025, 231, + /* 110 */ 70, 555, 30, 47, 48, 1024, 51, 52, 825, 556, /* 120 */ 214, 41, 166, 50, 262, 55, 53, 57, 54, 44, - /* 130 */ 43, 42, 718, 46, 45, 288, 287, 44, 43, 42, - /* 140 */ 47, 49, 830, 51, 52, 198, 166, 214, 41, 234, - /* 150 */ 50, 262, 55, 53, 57, 54, 918, 238, 237, 227, + /* 130 */ 43, 42, 720, 46, 45, 288, 287, 44, 43, 42, + /* 140 */ 47, 49, 834, 51, 52, 198, 166, 214, 41, 234, + /* 150 */ 50, 262, 55, 53, 57, 54, 922, 238, 237, 227, /* 160 */ 46, 45, 285, 284, 44, 43, 42, 23, 276, 307, /* 170 */ 306, 275, 274, 273, 305, 272, 304, 303, 302, 271, - /* 180 */ 301, 300, 882, 140, 870, 871, 872, 873, 874, 875, - /* 190 */ 876, 877, 878, 879, 880, 881, 883, 884, 51, 52, - /* 200 */ 822, 219, 214, 41, 166, 50, 262, 55, 53, 57, - /* 210 */ 54, 223, 18, 82, 25, 46, 45, 199, 226, 44, - /* 220 */ 43, 42, 213, 731, 934, 221, 722, 922, 725, 190, - /* 230 */ 728, 183, 213, 731, 140, 191, 722, 908, 725, 204, - /* 240 */ 728, 118, 117, 189, 905, 906, 29, 909, 259, 74, - /* 250 */ 78, 922, 30, 920, 210, 211, 308, 36, 261, 69, - /* 260 */ 23, 916, 307, 306, 210, 211, 61, 305, 30, 304, - /* 270 */ 303, 302, 74, 301, 300, 890, 3, 167, 888, 889, - /* 280 */ 36, 224, 922, 891, 280, 893, 894, 892, 62, 895, - /* 290 */ 896, 907, 656, 217, 12, 653, 919, 654, 84, 655, - /* 300 */ 81, 79, 241, 220, 68, 55, 53, 57, 54, 218, - /* 310 */ 197, 184, 919, 46, 45, 30, 278, 44, 43, 42, - /* 320 */ 80, 103, 108, 228, 229, 56, 263, 97, 107, 113, - /* 330 */ 116, 106, 732, 71, 671, 56, 186, 110, 730, 30, - /* 340 */ 180, 30, 732, 5, 156, 30, 699, 700, 730, 33, - /* 350 */ 155, 92, 87, 91, 729, 668, 281, 678, 105, 919, - /* 360 */ 174, 170, 24, 298, 729, 245, 172, 169, 121, 120, - /* 370 */ 119, 46, 45, 1, 154, 44, 43, 42, 720, 724, - /* 380 */ 282, 727, 286, 919, 243, 919, 290, 187, 31, 919, - /* 390 */ 311, 310, 126, 684, 212, 64, 690, 135, 691, 752, - /* 400 */ 60, 657, 20, 19, 733, 723, 642, 726, 19, 265, - /* 410 */ 31, 188, 675, 31, 721, 65, 96, 95, 194, 644, - /* 420 */ 267, 643, 735, 60, 83, 60, 28, 14, 13, 268, - /* 430 */ 102, 101, 67, 660, 631, 661, 195, 658, 6, 659, - /* 440 */ 16, 15, 115, 114, 131, 129, 193, 178, 192, 182, - /* 450 */ 1034, 921, 985, 984, 215, 981, 980, 239, 216, 289, - /* 460 */ 132, 942, 39, 950, 952, 134, 138, 935, 246, 967, - /* 470 */ 130, 966, 917, 150, 151, 915, 299, 152, 683, 248, - /* 480 */ 886, 104, 291, 149, 147, 153, 833, 142, 932, 141, - /* 490 */ 270, 66, 205, 37, 250, 176, 34, 279, 829, 1039, - /* 500 */ 93, 255, 1038, 1036, 143, 63, 58, 157, 283, 1033, - /* 510 */ 99, 1032, 260, 1030, 158, 851, 256, 35, 258, 32, - /* 520 */ 38, 177, 818, 109, 254, 816, 111, 112, 252, 814, - /* 530 */ 813, 230, 168, 811, 810, 809, 808, 807, 806, 171, - /* 540 */ 173, 803, 801, 799, 797, 795, 175, 249, 244, 72, - /* 550 */ 75, 251, 40, 968, 292, 293, 294, 295, 296, 200, - /* 560 */ 297, 222, 269, 309, 772, 233, 232, 771, 88, 201, - /* 570 */ 235, 196, 89, 236, 770, 758, 757, 240, 245, 8, - /* 580 */ 264, 73, 663, 136, 812, 161, 165, 685, 852, 159, - /* 590 */ 160, 162, 164, 163, 122, 123, 805, 76, 124, 804, - /* 600 */ 4, 688, 137, 125, 796, 77, 146, 144, 148, 145, - /* 610 */ 207, 2, 898, 253, 26, 692, 139, 9, 10, 734, - /* 620 */ 27, 7, 11, 21, 736, 22, 86, 266, 595, 591, - /* 630 */ 84, 589, 588, 587, 584, 557, 277, 90, 94, 31, - /* 640 */ 634, 59, 633, 630, 579, 98, 100, 577, 569, 575, - /* 650 */ 571, 573, 567, 565, 598, 597, 596, 594, 593, 592, - /* 660 */ 590, 586, 585, 60, 555, 523, 521, 776, 775, 775, - /* 670 */ 775, 775, 775, 775, 775, 775, 775, 775, 775, 127, - /* 680 */ 128, + /* 180 */ 301, 300, 886, 140, 874, 875, 876, 877, 878, 879, + /* 190 */ 880, 881, 882, 883, 884, 885, 887, 888, 51, 52, + /* 200 */ 826, 219, 214, 41, 166, 50, 262, 55, 53, 57, + /* 210 */ 54, 223, 18, 82, 25, 46, 45, 1, 154, 44, + /* 220 */ 43, 42, 213, 735, 938, 722, 724, 926, 727, 190, + /* 230 */ 730, 226, 213, 735, 140, 191, 724, 912, 727, 206, + /* 240 */ 730, 118, 117, 189, 909, 910, 29, 913, 259, 74, + /* 250 */ 78, 726, 30, 729, 200, 201, 221, 36, 261, 199, + /* 260 */ 23, 723, 307, 306, 200, 201, 924, 305, 30, 304, + /* 270 */ 303, 302, 74, 301, 300, 894, 183, 308, 892, 893, + /* 280 */ 36, 224, 926, 895, 280, 897, 898, 896, 184, 899, + /* 290 */ 900, 920, 658, 217, 69, 655, 923, 656, 725, 657, + /* 300 */ 728, 79, 241, 926, 68, 55, 53, 57, 54, 218, + /* 310 */ 197, 212, 923, 46, 45, 30, 278, 44, 43, 42, + /* 320 */ 673, 103, 108, 228, 229, 56, 911, 97, 107, 113, + /* 330 */ 116, 106, 736, 220, 263, 56, 186, 110, 732, 30, + /* 340 */ 180, 30, 736, 5, 156, 30, 3, 167, 732, 33, + /* 350 */ 155, 92, 87, 91, 731, 6, 281, 701, 702, 923, + /* 360 */ 174, 170, 28, 733, 731, 268, 172, 169, 121, 120, + /* 370 */ 119, 46, 45, 105, 80, 44, 43, 42, 298, 662, + /* 380 */ 282, 663, 286, 923, 670, 923, 290, 71, 12, 923, + /* 390 */ 187, 24, 84, 188, 81, 311, 310, 126, 677, 243, + /* 400 */ 680, 659, 660, 31, 661, 686, 1040, 692, 245, 135, + /* 410 */ 734, 60, 693, 756, 737, 61, 20, 19, 19, 64, + /* 420 */ 644, 265, 646, 267, 31, 31, 60, 83, 645, 67, + /* 430 */ 739, 633, 60, 925, 96, 95, 194, 62, 195, 65, + /* 440 */ 193, 14, 13, 102, 101, 115, 114, 131, 129, 16, + /* 450 */ 15, 178, 192, 182, 989, 988, 215, 239, 985, 132, + /* 460 */ 984, 216, 289, 946, 39, 971, 954, 956, 134, 138, + /* 470 */ 970, 939, 246, 130, 921, 151, 919, 150, 152, 153, + /* 480 */ 248, 837, 270, 685, 890, 299, 104, 291, 148, 37, + /* 490 */ 145, 176, 936, 141, 34, 58, 207, 250, 255, 66, + /* 500 */ 63, 142, 279, 833, 1045, 260, 143, 258, 144, 256, + /* 510 */ 93, 1044, 1042, 254, 157, 146, 283, 1039, 99, 1038, + /* 520 */ 1036, 252, 158, 855, 35, 32, 38, 177, 249, 822, + /* 530 */ 109, 820, 111, 112, 818, 817, 230, 168, 815, 814, + /* 540 */ 813, 812, 811, 810, 171, 173, 807, 805, 803, 801, + /* 550 */ 799, 175, 40, 244, 72, 75, 251, 292, 972, 293, + /* 560 */ 294, 296, 295, 297, 309, 776, 202, 222, 269, 232, + /* 570 */ 233, 203, 775, 235, 88, 89, 236, 196, 774, 762, + /* 580 */ 761, 240, 245, 8, 73, 264, 209, 665, 687, 816, + /* 590 */ 165, 856, 161, 159, 160, 122, 162, 163, 123, 164, + /* 600 */ 809, 2, 76, 124, 125, 808, 800, 136, 137, 4, + /* 610 */ 690, 149, 147, 77, 253, 26, 694, 139, 902, 9, + /* 620 */ 10, 27, 738, 7, 11, 740, 21, 22, 266, 86, + /* 630 */ 597, 593, 84, 591, 590, 589, 586, 559, 277, 90, + /* 640 */ 94, 31, 636, 59, 635, 632, 581, 579, 571, 577, + /* 650 */ 573, 575, 569, 567, 98, 100, 600, 599, 598, 596, + /* 660 */ 595, 594, 592, 588, 587, 60, 557, 525, 523, 780, + /* 670 */ 127, 128, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 190, 1, 189, 190, 209, 190, 190, 251, 196, 9, @@ -309,54 +308,54 @@ static const YYCODETYPE yy_lookahead[] = { /* 180 */ 101, 102, 208, 190, 210, 211, 212, 213, 214, 215, /* 190 */ 216, 217, 218, 219, 220, 221, 222, 223, 16, 17, /* 200 */ 195, 209, 20, 21, 199, 23, 24, 25, 26, 27, - /* 210 */ 28, 67, 44, 196, 104, 33, 34, 251, 190, 37, - /* 220 */ 38, 39, 1, 2, 233, 209, 5, 235, 7, 61, - /* 230 */ 9, 251, 1, 2, 190, 67, 5, 0, 7, 248, + /* 210 */ 28, 67, 44, 196, 104, 33, 34, 197, 198, 37, + /* 220 */ 38, 39, 1, 2, 233, 1, 5, 235, 7, 61, + /* 230 */ 9, 190, 1, 2, 190, 67, 5, 0, 7, 248, /* 240 */ 9, 73, 74, 75, 227, 228, 229, 230, 255, 104, - /* 250 */ 257, 235, 190, 225, 33, 34, 209, 112, 37, 196, - /* 260 */ 88, 190, 90, 91, 33, 34, 109, 95, 190, 97, - /* 270 */ 98, 99, 104, 101, 102, 208, 193, 194, 211, 212, - /* 280 */ 112, 137, 235, 216, 140, 218, 219, 220, 131, 222, - /* 290 */ 223, 228, 2, 231, 104, 5, 234, 7, 108, 9, - /* 300 */ 110, 257, 134, 232, 136, 25, 26, 27, 28, 231, - /* 310 */ 142, 251, 234, 33, 34, 190, 79, 37, 38, 39, - /* 320 */ 236, 62, 63, 33, 34, 104, 15, 68, 69, 70, - /* 330 */ 71, 72, 111, 249, 37, 104, 251, 78, 117, 190, - /* 340 */ 251, 190, 111, 62, 63, 190, 124, 125, 117, 68, - /* 350 */ 69, 70, 71, 72, 133, 109, 231, 105, 76, 234, - /* 360 */ 62, 63, 116, 81, 133, 113, 68, 69, 70, 71, - /* 370 */ 72, 33, 34, 197, 198, 37, 38, 39, 1, 5, - /* 380 */ 231, 7, 231, 234, 105, 234, 231, 251, 109, 234, - /* 390 */ 64, 65, 66, 105, 60, 109, 105, 109, 105, 105, - /* 400 */ 109, 111, 109, 109, 105, 5, 105, 7, 109, 105, - /* 410 */ 109, 251, 115, 109, 37, 129, 138, 139, 251, 105, - /* 420 */ 105, 105, 111, 109, 109, 109, 104, 138, 139, 107, - /* 430 */ 138, 139, 104, 5, 106, 7, 251, 5, 104, 7, - /* 440 */ 138, 139, 76, 77, 62, 63, 251, 251, 251, 251, - /* 450 */ 235, 235, 226, 226, 226, 226, 226, 190, 226, 226, - /* 460 */ 190, 190, 250, 190, 190, 190, 190, 233, 233, 258, - /* 470 */ 60, 258, 233, 237, 190, 190, 103, 190, 117, 254, - /* 480 */ 224, 87, 86, 238, 240, 190, 190, 245, 247, 246, - /* 490 */ 190, 128, 254, 190, 254, 190, 190, 190, 190, 190, - /* 500 */ 190, 254, 190, 190, 244, 130, 127, 190, 190, 190, - /* 510 */ 190, 190, 122, 190, 190, 190, 121, 190, 126, 190, - /* 520 */ 190, 190, 190, 190, 120, 190, 190, 190, 119, 190, + /* 250 */ 257, 5, 190, 7, 33, 34, 209, 112, 37, 251, + /* 260 */ 88, 37, 90, 91, 33, 34, 225, 95, 190, 97, + /* 270 */ 98, 99, 104, 101, 102, 208, 251, 209, 211, 212, + /* 280 */ 112, 137, 235, 216, 140, 218, 219, 220, 251, 222, + /* 290 */ 223, 190, 2, 231, 196, 5, 234, 7, 5, 9, + /* 300 */ 7, 257, 134, 235, 136, 25, 26, 27, 28, 231, + /* 310 */ 142, 60, 234, 33, 34, 190, 79, 37, 38, 39, + /* 320 */ 37, 62, 63, 33, 34, 104, 228, 68, 69, 70, + /* 330 */ 71, 72, 111, 232, 15, 104, 251, 78, 117, 190, + /* 340 */ 251, 190, 111, 62, 63, 190, 193, 194, 117, 68, + /* 350 */ 69, 70, 71, 72, 133, 104, 231, 124, 125, 234, + /* 360 */ 62, 63, 104, 117, 133, 107, 68, 69, 70, 71, + /* 370 */ 72, 33, 34, 76, 236, 37, 38, 39, 81, 5, + /* 380 */ 231, 7, 231, 234, 109, 234, 231, 249, 104, 234, + /* 390 */ 251, 116, 108, 251, 110, 64, 65, 66, 115, 105, + /* 400 */ 105, 111, 5, 109, 7, 105, 235, 105, 113, 109, + /* 410 */ 117, 109, 105, 105, 105, 109, 109, 109, 109, 109, + /* 420 */ 105, 105, 105, 105, 109, 109, 109, 109, 105, 104, + /* 430 */ 111, 106, 109, 235, 138, 139, 251, 131, 251, 129, + /* 440 */ 251, 138, 139, 138, 139, 76, 77, 62, 63, 138, + /* 450 */ 139, 251, 251, 251, 226, 226, 226, 190, 226, 190, + /* 460 */ 226, 226, 226, 190, 250, 258, 190, 190, 190, 190, + /* 470 */ 258, 233, 233, 60, 233, 190, 190, 237, 190, 190, + /* 480 */ 254, 190, 190, 117, 224, 103, 87, 86, 239, 190, + /* 490 */ 242, 190, 247, 246, 190, 127, 254, 254, 254, 128, + /* 500 */ 130, 245, 190, 190, 190, 122, 244, 126, 243, 121, + /* 510 */ 190, 190, 190, 120, 190, 241, 190, 190, 190, 190, + /* 520 */ 190, 119, 190, 190, 190, 190, 190, 190, 118, 190, /* 530 */ 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - /* 540 */ 190, 190, 190, 190, 190, 190, 190, 118, 191, 191, - /* 550 */ 191, 191, 132, 191, 50, 83, 85, 54, 84, 191, - /* 560 */ 82, 191, 191, 79, 5, 5, 145, 5, 196, 191, - /* 570 */ 145, 191, 196, 5, 5, 90, 89, 135, 113, 104, - /* 580 */ 107, 114, 105, 104, 191, 201, 200, 105, 207, 206, - /* 590 */ 205, 204, 203, 202, 192, 192, 191, 109, 192, 191, - /* 600 */ 193, 105, 109, 192, 191, 104, 241, 243, 239, 242, - /* 610 */ 1, 197, 224, 104, 109, 105, 104, 123, 123, 105, - /* 620 */ 109, 104, 104, 104, 111, 104, 76, 107, 9, 5, - /* 630 */ 108, 5, 5, 5, 5, 80, 15, 76, 139, 109, - /* 640 */ 5, 16, 5, 105, 5, 139, 139, 5, 5, 5, - /* 650 */ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - /* 660 */ 5, 5, 5, 109, 80, 60, 59, 0, 262, 262, - /* 670 */ 262, 262, 262, 262, 262, 262, 262, 262, 262, 21, - /* 680 */ 21, 262, 262, 262, 262, 262, 262, 262, 262, 262, + /* 540 */ 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, + /* 550 */ 190, 190, 132, 191, 191, 191, 191, 50, 191, 83, + /* 560 */ 85, 84, 54, 82, 79, 5, 191, 191, 191, 145, + /* 570 */ 5, 191, 5, 145, 196, 196, 5, 191, 5, 90, + /* 580 */ 89, 135, 113, 104, 114, 107, 1, 105, 105, 191, + /* 590 */ 200, 207, 201, 206, 205, 192, 204, 202, 192, 203, + /* 600 */ 191, 197, 109, 192, 192, 191, 191, 104, 109, 193, + /* 610 */ 105, 238, 240, 104, 104, 109, 105, 104, 224, 123, + /* 620 */ 123, 109, 105, 104, 104, 111, 104, 104, 107, 76, + /* 630 */ 9, 5, 108, 5, 5, 5, 5, 80, 15, 76, + /* 640 */ 139, 109, 5, 16, 5, 105, 5, 5, 5, 5, + /* 650 */ 5, 5, 5, 5, 139, 139, 5, 5, 5, 5, + /* 660 */ 5, 5, 5, 5, 5, 109, 80, 60, 59, 0, + /* 670 */ 21, 21, 262, 262, 262, 262, 262, 262, 262, 262, + /* 680 */ 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, /* 690 */ 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, /* 700 */ 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, /* 710 */ 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, @@ -373,102 +372,101 @@ static const YYCODETYPE yy_lookahead[] = { /* 820 */ 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, /* 830 */ 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, /* 840 */ 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - /* 850 */ 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, - /* 860 */ 262, 262, 262, 262, 262, 262, 262, 262, + /* 850 */ 262, 262, 262, 262, 262, 262, 262, 262, 262, }; #define YY_SHIFT_COUNT (314) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (667) +#define YY_SHIFT_MAX (669) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 168, 79, 79, 172, 172, 6, 221, 231, 74, 74, /* 10 */ 74, 74, 74, 74, 74, 74, 74, 0, 48, 231, /* 20 */ 290, 290, 290, 290, 110, 145, 74, 74, 74, 237, - /* 30 */ 74, 74, 282, 6, 7, 7, 681, 681, 681, 231, + /* 30 */ 74, 74, 297, 6, 7, 7, 672, 672, 672, 231, /* 40 */ 231, 231, 231, 231, 231, 231, 231, 231, 231, 231, /* 50 */ 231, 231, 231, 231, 231, 231, 231, 231, 231, 290, /* 60 */ 290, 102, 102, 102, 102, 102, 102, 102, 74, 74, - /* 70 */ 74, 297, 74, 145, 145, 74, 74, 74, 222, 222, - /* 80 */ 246, 145, 74, 74, 74, 74, 74, 74, 74, 74, + /* 70 */ 74, 283, 74, 145, 145, 74, 74, 74, 233, 233, + /* 80 */ 275, 145, 74, 74, 74, 74, 74, 74, 74, 74, /* 90 */ 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, /* 100 */ 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, /* 110 */ 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, /* 120 */ 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, - /* 130 */ 74, 74, 410, 410, 410, 361, 361, 361, 410, 361, - /* 140 */ 410, 363, 375, 379, 390, 392, 395, 404, 409, 429, - /* 150 */ 420, 410, 410, 410, 373, 6, 6, 410, 410, 394, - /* 160 */ 396, 504, 472, 471, 503, 474, 478, 373, 410, 484, - /* 170 */ 484, 410, 484, 410, 484, 410, 681, 681, 27, 100, + /* 130 */ 74, 74, 413, 413, 413, 366, 366, 366, 413, 366, + /* 140 */ 413, 371, 370, 368, 383, 381, 388, 393, 402, 410, + /* 150 */ 420, 413, 413, 413, 382, 6, 6, 413, 413, 399, + /* 160 */ 401, 507, 476, 475, 508, 477, 481, 382, 413, 485, + /* 170 */ 485, 413, 485, 413, 485, 413, 672, 672, 27, 100, /* 180 */ 127, 100, 100, 53, 182, 280, 280, 280, 280, 259, /* 190 */ 281, 298, 338, 338, 338, 338, 22, 14, 92, 92, - /* 200 */ 190, 144, 326, 279, 252, 288, 291, 293, 294, 299, - /* 210 */ 374, 400, 377, 334, 311, 157, 286, 301, 304, 314, - /* 220 */ 315, 316, 322, 278, 289, 292, 328, 302, 428, 432, - /* 230 */ 366, 382, 559, 421, 560, 562, 425, 568, 569, 485, - /* 240 */ 487, 442, 465, 473, 475, 467, 477, 488, 482, 479, - /* 250 */ 496, 493, 501, 609, 509, 510, 512, 505, 494, 511, - /* 260 */ 495, 514, 517, 513, 518, 473, 519, 520, 521, 522, - /* 270 */ 550, 619, 624, 626, 627, 628, 629, 555, 621, 561, - /* 280 */ 499, 530, 530, 625, 506, 507, 530, 635, 637, 538, - /* 290 */ 530, 639, 642, 643, 644, 645, 646, 647, 648, 649, - /* 300 */ 650, 651, 652, 653, 654, 655, 656, 657, 554, 584, - /* 310 */ 658, 659, 605, 607, 667, + /* 200 */ 246, 293, 284, 144, 331, 294, 295, 300, 302, 307, + /* 210 */ 308, 309, 224, 251, 319, 306, 310, 315, 316, 317, + /* 220 */ 318, 323, 258, 296, 303, 305, 325, 311, 374, 397, + /* 230 */ 369, 385, 560, 424, 565, 567, 428, 571, 573, 489, + /* 240 */ 491, 446, 469, 478, 479, 470, 482, 493, 483, 503, + /* 250 */ 505, 499, 509, 585, 510, 511, 513, 506, 496, 512, + /* 260 */ 497, 517, 519, 514, 520, 478, 522, 521, 523, 524, + /* 270 */ 553, 621, 626, 628, 629, 630, 631, 557, 623, 563, + /* 280 */ 501, 532, 532, 627, 515, 516, 532, 637, 639, 540, + /* 290 */ 532, 641, 642, 643, 644, 645, 646, 647, 648, 651, + /* 300 */ 652, 653, 654, 655, 656, 657, 658, 659, 556, 586, + /* 310 */ 649, 650, 607, 609, 669, }; #define YY_REDUCE_COUNT (177) #define YY_REDUCE_MIN (-244) -#define YY_REDUCE_MAX (414) +#define YY_REDUCE_MAX (416) static const short yy_reduce_ofst[] = { /* 0 */ -177, -26, -26, 67, 67, 17, -229, -215, -172, -175, /* 10 */ -7, 62, 78, 125, 149, 151, 155, -184, -187, -232, - /* 20 */ -205, -8, 16, 47, -190, -9, -185, 44, 71, -188, - /* 30 */ 28, -78, -77, 63, -53, 5, 84, 176, 83, -244, - /* 40 */ -239, -216, -193, -143, -136, -106, -34, -20, 60, 85, - /* 50 */ 89, 136, 160, 167, 185, 195, 196, 197, 198, 215, - /* 60 */ 216, 226, 227, 228, 229, 230, 232, 233, 267, 270, - /* 70 */ 271, 212, 273, 234, 235, 274, 275, 276, 211, 213, - /* 80 */ 236, 239, 284, 285, 287, 295, 296, 300, 303, 305, - /* 90 */ 306, 307, 308, 309, 310, 312, 313, 317, 318, 319, - /* 100 */ 320, 321, 323, 324, 325, 327, 329, 330, 331, 332, - /* 110 */ 333, 335, 336, 337, 339, 340, 341, 342, 343, 344, - /* 120 */ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - /* 130 */ 355, 356, 357, 358, 359, 225, 238, 240, 360, 247, - /* 140 */ 362, 241, 243, 242, 260, 364, 367, 365, 244, 369, - /* 150 */ 245, 368, 370, 371, 256, 372, 376, 378, 380, 381, - /* 160 */ 383, 385, 384, 387, 391, 389, 386, 388, 393, 402, - /* 170 */ 403, 405, 406, 408, 411, 413, 414, 407, + /* 20 */ -205, -8, 47, 68, -190, -9, -185, 44, 101, -188, + /* 30 */ 41, -78, -77, 98, -53, 5, 138, 20, 153, -244, + /* 40 */ -239, -216, -193, -143, -136, -106, 8, 25, 37, 85, + /* 50 */ 89, 139, 142, 185, 187, 189, 200, 201, 202, 171, + /* 60 */ 198, 228, 229, 230, 232, 234, 235, 236, 267, 269, + /* 70 */ 273, 214, 276, 238, 239, 277, 278, 279, 207, 212, + /* 80 */ 240, 241, 285, 286, 288, 289, 291, 292, 299, 301, + /* 90 */ 304, 312, 313, 314, 320, 321, 322, 324, 326, 327, + /* 100 */ 328, 329, 330, 332, 333, 334, 335, 336, 337, 339, + /* 110 */ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, + /* 120 */ 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, + /* 130 */ 360, 361, 362, 363, 364, 226, 242, 243, 365, 244, + /* 140 */ 367, 245, 247, 256, 262, 265, 248, 274, 372, 249, + /* 150 */ 373, 375, 376, 377, 260, 378, 379, 380, 386, 384, + /* 160 */ 387, 389, 391, 392, 395, 396, 390, 394, 398, 403, + /* 170 */ 406, 409, 411, 414, 412, 415, 404, 416, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 773, 885, 831, 897, 819, 828, 1026, 1026, 773, 773, - /* 10 */ 773, 773, 773, 773, 773, 773, 773, 944, 792, 1026, - /* 20 */ 773, 773, 773, 773, 773, 773, 773, 773, 773, 828, - /* 30 */ 773, 773, 834, 828, 834, 834, 939, 869, 887, 773, - /* 40 */ 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, - /* 50 */ 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, - /* 60 */ 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, - /* 70 */ 773, 946, 949, 773, 773, 951, 773, 773, 971, 971, - /* 80 */ 937, 773, 773, 773, 773, 773, 773, 773, 773, 773, - /* 90 */ 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, - /* 100 */ 773, 773, 773, 773, 773, 773, 773, 773, 773, 817, - /* 110 */ 773, 815, 773, 773, 773, 773, 773, 773, 773, 773, - /* 120 */ 773, 773, 773, 773, 773, 773, 802, 773, 773, 773, - /* 130 */ 773, 773, 794, 794, 794, 773, 773, 773, 794, 773, - /* 140 */ 794, 978, 982, 976, 964, 972, 963, 959, 957, 956, - /* 150 */ 986, 794, 794, 794, 832, 828, 828, 794, 794, 850, - /* 160 */ 848, 846, 838, 844, 840, 842, 836, 820, 794, 826, - /* 170 */ 826, 794, 826, 794, 826, 794, 869, 887, 773, 987, - /* 180 */ 773, 1025, 977, 1015, 1014, 1021, 1013, 1012, 1011, 773, - /* 190 */ 773, 773, 1007, 1008, 1010, 1009, 773, 773, 1017, 1016, - /* 200 */ 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, - /* 210 */ 773, 773, 773, 989, 773, 983, 979, 773, 773, 773, - /* 220 */ 773, 773, 773, 773, 773, 773, 899, 773, 773, 773, - /* 230 */ 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, - /* 240 */ 773, 773, 936, 773, 773, 773, 773, 947, 773, 773, - /* 250 */ 773, 773, 773, 773, 773, 773, 773, 973, 773, 965, - /* 260 */ 773, 773, 773, 773, 773, 911, 773, 773, 773, 773, - /* 270 */ 773, 773, 773, 773, 773, 773, 773, 773, 773, 773, - /* 280 */ 773, 1037, 1035, 773, 773, 773, 1031, 773, 773, 773, - /* 290 */ 1029, 773, 773, 773, 773, 773, 773, 773, 773, 773, - /* 300 */ 773, 773, 773, 773, 773, 773, 773, 773, 853, 773, - /* 310 */ 800, 798, 773, 790, 773, + /* 0 */ 777, 889, 835, 901, 823, 832, 1032, 1032, 777, 777, + /* 10 */ 777, 777, 777, 777, 777, 777, 777, 948, 796, 1032, + /* 20 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 832, + /* 30 */ 777, 777, 838, 832, 838, 838, 943, 873, 891, 777, + /* 40 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + /* 50 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + /* 60 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + /* 70 */ 777, 950, 953, 777, 777, 955, 777, 777, 975, 975, + /* 80 */ 941, 777, 777, 777, 777, 777, 777, 777, 777, 777, + /* 90 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + /* 100 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 821, + /* 110 */ 777, 819, 777, 777, 777, 777, 777, 777, 777, 777, + /* 120 */ 777, 777, 777, 777, 777, 777, 806, 777, 777, 777, + /* 130 */ 777, 777, 798, 798, 798, 777, 777, 777, 798, 777, + /* 140 */ 798, 982, 986, 980, 968, 976, 967, 963, 961, 960, + /* 150 */ 990, 798, 798, 798, 836, 832, 832, 798, 798, 854, + /* 160 */ 852, 850, 842, 848, 844, 846, 840, 824, 798, 830, + /* 170 */ 830, 798, 830, 798, 830, 798, 873, 891, 777, 991, + /* 180 */ 777, 1031, 981, 1021, 1020, 1027, 1019, 1018, 1017, 777, + /* 190 */ 777, 777, 1013, 1014, 1016, 1015, 777, 777, 1023, 1022, + /* 200 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + /* 210 */ 777, 777, 777, 993, 777, 987, 983, 777, 777, 777, + /* 220 */ 777, 777, 777, 777, 777, 777, 903, 777, 777, 777, + /* 230 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + /* 240 */ 777, 777, 940, 777, 777, 777, 777, 951, 777, 777, + /* 250 */ 777, 777, 777, 777, 777, 777, 777, 977, 777, 969, + /* 260 */ 777, 777, 777, 777, 777, 915, 777, 777, 777, 777, + /* 270 */ 777, 777, 777, 777, 777, 777, 777, 777, 777, 777, + /* 280 */ 777, 1043, 1041, 777, 777, 777, 1037, 777, 777, 777, + /* 290 */ 1035, 777, 777, 777, 777, 777, 777, 777, 777, 777, + /* 300 */ 777, 777, 777, 777, 777, 777, 777, 777, 857, 777, + /* 310 */ 804, 802, 777, 794, 777, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1256,48 +1254,50 @@ static const char *const yyRuleName[] = { /* 222 */ "expr ::= STRING", /* 223 */ "expr ::= NOW", /* 224 */ "expr ::= VARIABLE", - /* 225 */ "expr ::= BOOL", - /* 226 */ "expr ::= NULL", - /* 227 */ "expr ::= ID LP exprlist RP", - /* 228 */ "expr ::= ID LP STAR RP", - /* 229 */ "expr ::= expr IS NULL", - /* 230 */ "expr ::= expr IS NOT NULL", - /* 231 */ "expr ::= expr LT expr", - /* 232 */ "expr ::= expr GT expr", - /* 233 */ "expr ::= expr LE expr", - /* 234 */ "expr ::= expr GE expr", - /* 235 */ "expr ::= expr NE expr", - /* 236 */ "expr ::= expr EQ expr", - /* 237 */ "expr ::= expr BETWEEN expr AND expr", - /* 238 */ "expr ::= expr AND expr", - /* 239 */ "expr ::= expr OR expr", - /* 240 */ "expr ::= expr PLUS expr", - /* 241 */ "expr ::= expr MINUS expr", - /* 242 */ "expr ::= expr STAR expr", - /* 243 */ "expr ::= expr SLASH expr", - /* 244 */ "expr ::= expr REM expr", - /* 245 */ "expr ::= expr LIKE expr", - /* 246 */ "expr ::= expr IN LP exprlist RP", - /* 247 */ "exprlist ::= exprlist COMMA expritem", - /* 248 */ "exprlist ::= expritem", - /* 249 */ "expritem ::= expr", - /* 250 */ "expritem ::=", - /* 251 */ "cmd ::= RESET QUERY CACHE", - /* 252 */ "cmd ::= SYNCDB ids REPLICA", - /* 253 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", - /* 254 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", - /* 255 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", - /* 256 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", - /* 257 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", - /* 258 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", - /* 259 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", - /* 260 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", - /* 261 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", - /* 262 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", - /* 263 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", - /* 264 */ "cmd ::= KILL CONNECTION INTEGER", - /* 265 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", - /* 266 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", + /* 225 */ "expr ::= PLUS VARIABLE", + /* 226 */ "expr ::= MINUS VARIABLE", + /* 227 */ "expr ::= BOOL", + /* 228 */ "expr ::= NULL", + /* 229 */ "expr ::= ID LP exprlist RP", + /* 230 */ "expr ::= ID LP STAR RP", + /* 231 */ "expr ::= expr IS NULL", + /* 232 */ "expr ::= expr IS NOT NULL", + /* 233 */ "expr ::= expr LT expr", + /* 234 */ "expr ::= expr GT expr", + /* 235 */ "expr ::= expr LE expr", + /* 236 */ "expr ::= expr GE expr", + /* 237 */ "expr ::= expr NE expr", + /* 238 */ "expr ::= expr EQ expr", + /* 239 */ "expr ::= expr BETWEEN expr AND expr", + /* 240 */ "expr ::= expr AND expr", + /* 241 */ "expr ::= expr OR expr", + /* 242 */ "expr ::= expr PLUS expr", + /* 243 */ "expr ::= expr MINUS expr", + /* 244 */ "expr ::= expr STAR expr", + /* 245 */ "expr ::= expr SLASH expr", + /* 246 */ "expr ::= expr REM expr", + /* 247 */ "expr ::= expr LIKE expr", + /* 248 */ "expr ::= expr IN LP exprlist RP", + /* 249 */ "exprlist ::= exprlist COMMA expritem", + /* 250 */ "exprlist ::= expritem", + /* 251 */ "expritem ::= expr", + /* 252 */ "expritem ::=", + /* 253 */ "cmd ::= RESET QUERY CACHE", + /* 254 */ "cmd ::= SYNCDB ids REPLICA", + /* 255 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", + /* 256 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", + /* 257 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", + /* 258 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", + /* 259 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", + /* 260 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", + /* 261 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", + /* 262 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", + /* 263 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", + /* 264 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", + /* 265 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", + /* 266 */ "cmd ::= KILL CONNECTION INTEGER", + /* 267 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", + /* 268 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", }; #endif /* NDEBUG */ @@ -1982,48 +1982,50 @@ static const YYCODETYPE yyRuleInfoLhs[] = { 251, /* (222) expr ::= STRING */ 251, /* (223) expr ::= NOW */ 251, /* (224) expr ::= VARIABLE */ - 251, /* (225) expr ::= BOOL */ - 251, /* (226) expr ::= NULL */ - 251, /* (227) expr ::= ID LP exprlist RP */ - 251, /* (228) expr ::= ID LP STAR RP */ - 251, /* (229) expr ::= expr IS NULL */ - 251, /* (230) expr ::= expr IS NOT NULL */ - 251, /* (231) expr ::= expr LT expr */ - 251, /* (232) expr ::= expr GT expr */ - 251, /* (233) expr ::= expr LE expr */ - 251, /* (234) expr ::= expr GE expr */ - 251, /* (235) expr ::= expr NE expr */ - 251, /* (236) expr ::= expr EQ expr */ - 251, /* (237) expr ::= expr BETWEEN expr AND expr */ - 251, /* (238) expr ::= expr AND expr */ - 251, /* (239) expr ::= expr OR expr */ - 251, /* (240) expr ::= expr PLUS expr */ - 251, /* (241) expr ::= expr MINUS expr */ - 251, /* (242) expr ::= expr STAR expr */ - 251, /* (243) expr ::= expr SLASH expr */ - 251, /* (244) expr ::= expr REM expr */ - 251, /* (245) expr ::= expr LIKE expr */ - 251, /* (246) expr ::= expr IN LP exprlist RP */ - 260, /* (247) exprlist ::= exprlist COMMA expritem */ - 260, /* (248) exprlist ::= expritem */ - 261, /* (249) expritem ::= expr */ - 261, /* (250) expritem ::= */ - 188, /* (251) cmd ::= RESET QUERY CACHE */ - 188, /* (252) cmd ::= SYNCDB ids REPLICA */ - 188, /* (253) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - 188, /* (254) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - 188, /* (255) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - 188, /* (256) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - 188, /* (257) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - 188, /* (258) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - 188, /* (259) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - 188, /* (260) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - 188, /* (261) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - 188, /* (262) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - 188, /* (263) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - 188, /* (264) cmd ::= KILL CONNECTION INTEGER */ - 188, /* (265) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - 188, /* (266) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + 251, /* (225) expr ::= PLUS VARIABLE */ + 251, /* (226) expr ::= MINUS VARIABLE */ + 251, /* (227) expr ::= BOOL */ + 251, /* (228) expr ::= NULL */ + 251, /* (229) expr ::= ID LP exprlist RP */ + 251, /* (230) expr ::= ID LP STAR RP */ + 251, /* (231) expr ::= expr IS NULL */ + 251, /* (232) expr ::= expr IS NOT NULL */ + 251, /* (233) expr ::= expr LT expr */ + 251, /* (234) expr ::= expr GT expr */ + 251, /* (235) expr ::= expr LE expr */ + 251, /* (236) expr ::= expr GE expr */ + 251, /* (237) expr ::= expr NE expr */ + 251, /* (238) expr ::= expr EQ expr */ + 251, /* (239) expr ::= expr BETWEEN expr AND expr */ + 251, /* (240) expr ::= expr AND expr */ + 251, /* (241) expr ::= expr OR expr */ + 251, /* (242) expr ::= expr PLUS expr */ + 251, /* (243) expr ::= expr MINUS expr */ + 251, /* (244) expr ::= expr STAR expr */ + 251, /* (245) expr ::= expr SLASH expr */ + 251, /* (246) expr ::= expr REM expr */ + 251, /* (247) expr ::= expr LIKE expr */ + 251, /* (248) expr ::= expr IN LP exprlist RP */ + 260, /* (249) exprlist ::= exprlist COMMA expritem */ + 260, /* (250) exprlist ::= expritem */ + 261, /* (251) expritem ::= expr */ + 261, /* (252) expritem ::= */ + 188, /* (253) cmd ::= RESET QUERY CACHE */ + 188, /* (254) cmd ::= SYNCDB ids REPLICA */ + 188, /* (255) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + 188, /* (256) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + 188, /* (257) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + 188, /* (258) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + 188, /* (259) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + 188, /* (260) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + 188, /* (261) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + 188, /* (262) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + 188, /* (263) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + 188, /* (264) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + 188, /* (265) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + 188, /* (266) cmd ::= KILL CONNECTION INTEGER */ + 188, /* (267) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + 188, /* (268) cmd ::= KILL QUERY INTEGER COLON INTEGER */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -2254,48 +2256,50 @@ static const signed char yyRuleInfoNRhs[] = { -1, /* (222) expr ::= STRING */ -1, /* (223) expr ::= NOW */ -1, /* (224) expr ::= VARIABLE */ - -1, /* (225) expr ::= BOOL */ - -1, /* (226) expr ::= NULL */ - -4, /* (227) expr ::= ID LP exprlist RP */ - -4, /* (228) expr ::= ID LP STAR RP */ - -3, /* (229) expr ::= expr IS NULL */ - -4, /* (230) expr ::= expr IS NOT NULL */ - -3, /* (231) expr ::= expr LT expr */ - -3, /* (232) expr ::= expr GT expr */ - -3, /* (233) expr ::= expr LE expr */ - -3, /* (234) expr ::= expr GE expr */ - -3, /* (235) expr ::= expr NE expr */ - -3, /* (236) expr ::= expr EQ expr */ - -5, /* (237) expr ::= expr BETWEEN expr AND expr */ - -3, /* (238) expr ::= expr AND expr */ - -3, /* (239) expr ::= expr OR expr */ - -3, /* (240) expr ::= expr PLUS expr */ - -3, /* (241) expr ::= expr MINUS expr */ - -3, /* (242) expr ::= expr STAR expr */ - -3, /* (243) expr ::= expr SLASH expr */ - -3, /* (244) expr ::= expr REM expr */ - -3, /* (245) expr ::= expr LIKE expr */ - -5, /* (246) expr ::= expr IN LP exprlist RP */ - -3, /* (247) exprlist ::= exprlist COMMA expritem */ - -1, /* (248) exprlist ::= expritem */ - -1, /* (249) expritem ::= expr */ - 0, /* (250) expritem ::= */ - -3, /* (251) cmd ::= RESET QUERY CACHE */ - -3, /* (252) cmd ::= SYNCDB ids REPLICA */ - -7, /* (253) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - -7, /* (254) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - -7, /* (255) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - -7, /* (256) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - -8, /* (257) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - -9, /* (258) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - -7, /* (259) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - -7, /* (260) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - -7, /* (261) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - -7, /* (262) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - -8, /* (263) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - -3, /* (264) cmd ::= KILL CONNECTION INTEGER */ - -5, /* (265) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - -5, /* (266) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + -2, /* (225) expr ::= PLUS VARIABLE */ + -2, /* (226) expr ::= MINUS VARIABLE */ + -1, /* (227) expr ::= BOOL */ + -1, /* (228) expr ::= NULL */ + -4, /* (229) expr ::= ID LP exprlist RP */ + -4, /* (230) expr ::= ID LP STAR RP */ + -3, /* (231) expr ::= expr IS NULL */ + -4, /* (232) expr ::= expr IS NOT NULL */ + -3, /* (233) expr ::= expr LT expr */ + -3, /* (234) expr ::= expr GT expr */ + -3, /* (235) expr ::= expr LE expr */ + -3, /* (236) expr ::= expr GE expr */ + -3, /* (237) expr ::= expr NE expr */ + -3, /* (238) expr ::= expr EQ expr */ + -5, /* (239) expr ::= expr BETWEEN expr AND expr */ + -3, /* (240) expr ::= expr AND expr */ + -3, /* (241) expr ::= expr OR expr */ + -3, /* (242) expr ::= expr PLUS expr */ + -3, /* (243) expr ::= expr MINUS expr */ + -3, /* (244) expr ::= expr STAR expr */ + -3, /* (245) expr ::= expr SLASH expr */ + -3, /* (246) expr ::= expr REM expr */ + -3, /* (247) expr ::= expr LIKE expr */ + -5, /* (248) expr ::= expr IN LP exprlist RP */ + -3, /* (249) exprlist ::= exprlist COMMA expritem */ + -1, /* (250) exprlist ::= expritem */ + -1, /* (251) expritem ::= expr */ + 0, /* (252) expritem ::= */ + -3, /* (253) cmd ::= RESET QUERY CACHE */ + -3, /* (254) cmd ::= SYNCDB ids REPLICA */ + -7, /* (255) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + -7, /* (256) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + -7, /* (257) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + -7, /* (258) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + -8, /* (259) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + -9, /* (260) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + -7, /* (261) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + -7, /* (262) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + -7, /* (263) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + -7, /* (264) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + -8, /* (265) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + -3, /* (266) cmd ::= KILL CONNECTION INTEGER */ + -5, /* (267) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + -5, /* (268) cmd ::= KILL QUERY INTEGER COLON INTEGER */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3090,7 +3094,7 @@ static YYACTIONTYPE yy_reduce( break; case 200: /* having_opt ::= */ case 210: /* where_opt ::= */ yytestcase(yyruleno==210); - case 250: /* expritem ::= */ yytestcase(yyruleno==250); + case 252: /* expritem ::= */ yytestcase(yyruleno==252); {yymsp[1].minor.yy170 = 0;} break; case 201: /* having_opt ::= HAVING expr */ @@ -3163,120 +3167,125 @@ static YYACTIONTYPE yy_reduce( { yylhsminor.yy170 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);} yymsp[0].minor.yy170 = yylhsminor.yy170; break; - case 225: /* expr ::= BOOL */ + case 225: /* expr ::= PLUS VARIABLE */ + case 226: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==226); +{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy170 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_VARIABLE);} + yymsp[-1].minor.yy170 = yylhsminor.yy170; + break; + case 227: /* expr ::= BOOL */ { yylhsminor.yy170 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);} yymsp[0].minor.yy170 = yylhsminor.yy170; break; - case 226: /* expr ::= NULL */ + case 228: /* expr ::= NULL */ { yylhsminor.yy170 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);} yymsp[0].minor.yy170 = yylhsminor.yy170; break; - case 227: /* expr ::= ID LP exprlist RP */ + case 229: /* expr ::= ID LP exprlist RP */ { yylhsminor.yy170 = tSqlExprCreateFunction(yymsp[-1].minor.yy429, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } yymsp[-3].minor.yy170 = yylhsminor.yy170; break; - case 228: /* expr ::= ID LP STAR RP */ + case 230: /* expr ::= ID LP STAR RP */ { yylhsminor.yy170 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } yymsp[-3].minor.yy170 = yylhsminor.yy170; break; - case 229: /* expr ::= expr IS NULL */ + case 231: /* expr ::= expr IS NULL */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-2].minor.yy170, NULL, TK_ISNULL);} yymsp[-2].minor.yy170 = yylhsminor.yy170; break; - case 230: /* expr ::= expr IS NOT NULL */ + case 232: /* expr ::= expr IS NOT NULL */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-3].minor.yy170, NULL, TK_NOTNULL);} yymsp[-3].minor.yy170 = yylhsminor.yy170; break; - case 231: /* expr ::= expr LT expr */ + case 233: /* expr ::= expr LT expr */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-2].minor.yy170, yymsp[0].minor.yy170, TK_LT);} yymsp[-2].minor.yy170 = yylhsminor.yy170; break; - case 232: /* expr ::= expr GT expr */ + case 234: /* expr ::= expr GT expr */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-2].minor.yy170, yymsp[0].minor.yy170, TK_GT);} yymsp[-2].minor.yy170 = yylhsminor.yy170; break; - case 233: /* expr ::= expr LE expr */ + case 235: /* expr ::= expr LE expr */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-2].minor.yy170, yymsp[0].minor.yy170, TK_LE);} yymsp[-2].minor.yy170 = yylhsminor.yy170; break; - case 234: /* expr ::= expr GE expr */ + case 236: /* expr ::= expr GE expr */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-2].minor.yy170, yymsp[0].minor.yy170, TK_GE);} yymsp[-2].minor.yy170 = yylhsminor.yy170; break; - case 235: /* expr ::= expr NE expr */ + case 237: /* expr ::= expr NE expr */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-2].minor.yy170, yymsp[0].minor.yy170, TK_NE);} yymsp[-2].minor.yy170 = yylhsminor.yy170; break; - case 236: /* expr ::= expr EQ expr */ + case 238: /* expr ::= expr EQ expr */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-2].minor.yy170, yymsp[0].minor.yy170, TK_EQ);} yymsp[-2].minor.yy170 = yylhsminor.yy170; break; - case 237: /* expr ::= expr BETWEEN expr AND expr */ + case 239: /* expr ::= expr BETWEEN expr AND expr */ { tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy170); yylhsminor.yy170 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy170, yymsp[-2].minor.yy170, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy170, TK_LE), TK_AND);} yymsp[-4].minor.yy170 = yylhsminor.yy170; break; - case 238: /* expr ::= expr AND expr */ + case 240: /* expr ::= expr AND expr */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-2].minor.yy170, yymsp[0].minor.yy170, TK_AND);} yymsp[-2].minor.yy170 = yylhsminor.yy170; break; - case 239: /* expr ::= expr OR expr */ + case 241: /* expr ::= expr OR expr */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-2].minor.yy170, yymsp[0].minor.yy170, TK_OR); } yymsp[-2].minor.yy170 = yylhsminor.yy170; break; - case 240: /* expr ::= expr PLUS expr */ + case 242: /* expr ::= expr PLUS expr */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-2].minor.yy170, yymsp[0].minor.yy170, TK_PLUS); } yymsp[-2].minor.yy170 = yylhsminor.yy170; break; - case 241: /* expr ::= expr MINUS expr */ + case 243: /* expr ::= expr MINUS expr */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-2].minor.yy170, yymsp[0].minor.yy170, TK_MINUS); } yymsp[-2].minor.yy170 = yylhsminor.yy170; break; - case 242: /* expr ::= expr STAR expr */ + case 244: /* expr ::= expr STAR expr */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-2].minor.yy170, yymsp[0].minor.yy170, TK_STAR); } yymsp[-2].minor.yy170 = yylhsminor.yy170; break; - case 243: /* expr ::= expr SLASH expr */ + case 245: /* expr ::= expr SLASH expr */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-2].minor.yy170, yymsp[0].minor.yy170, TK_DIVIDE);} yymsp[-2].minor.yy170 = yylhsminor.yy170; break; - case 244: /* expr ::= expr REM expr */ + case 246: /* expr ::= expr REM expr */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-2].minor.yy170, yymsp[0].minor.yy170, TK_REM); } yymsp[-2].minor.yy170 = yylhsminor.yy170; break; - case 245: /* expr ::= expr LIKE expr */ + case 247: /* expr ::= expr LIKE expr */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-2].minor.yy170, yymsp[0].minor.yy170, TK_LIKE); } yymsp[-2].minor.yy170 = yylhsminor.yy170; break; - case 246: /* expr ::= expr IN LP exprlist RP */ + case 248: /* expr ::= expr IN LP exprlist RP */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-4].minor.yy170, (tSqlExpr*)yymsp[-1].minor.yy429, TK_IN); } yymsp[-4].minor.yy170 = yylhsminor.yy170; break; - case 247: /* exprlist ::= exprlist COMMA expritem */ + case 249: /* exprlist ::= exprlist COMMA expritem */ {yylhsminor.yy429 = tSqlExprListAppend(yymsp[-2].minor.yy429,yymsp[0].minor.yy170,0, 0);} yymsp[-2].minor.yy429 = yylhsminor.yy429; break; - case 248: /* exprlist ::= expritem */ + case 250: /* exprlist ::= expritem */ {yylhsminor.yy429 = tSqlExprListAppend(0,yymsp[0].minor.yy170,0, 0);} yymsp[0].minor.yy429 = yylhsminor.yy429; break; - case 249: /* expritem ::= expr */ + case 251: /* expritem ::= expr */ {yylhsminor.yy170 = yymsp[0].minor.yy170;} yymsp[0].minor.yy170 = yylhsminor.yy170; break; - case 251: /* cmd ::= RESET QUERY CACHE */ + case 253: /* cmd ::= RESET QUERY CACHE */ { setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);} break; - case 252: /* cmd ::= SYNCDB ids REPLICA */ + case 254: /* cmd ::= SYNCDB ids REPLICA */ { setDCLSqlElems(pInfo, TSDB_SQL_SYNC_DB_REPLICA, 1, &yymsp[-1].minor.yy0);} break; - case 253: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + case 255: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy429, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 254: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + case 256: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3287,14 +3296,14 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 255: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + case 257: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy429, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 256: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + case 258: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3305,7 +3314,7 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 257: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + case 259: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3319,7 +3328,7 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 258: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + case 260: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; @@ -3331,14 +3340,14 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 259: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + case 261: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy429, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 260: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + case 262: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3349,14 +3358,14 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 261: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + case 263: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy429, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 262: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + case 264: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3367,7 +3376,7 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 263: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + case 265: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3381,13 +3390,13 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 264: /* cmd ::= KILL CONNECTION INTEGER */ + case 266: /* cmd ::= KILL CONNECTION INTEGER */ {setKillSql(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);} break; - case 265: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ + case 267: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ {yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_STREAM, &yymsp[-2].minor.yy0);} break; - case 266: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ + case 268: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ {yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_QUERY, &yymsp[-2].minor.yy0);} break; default: