diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index ae235ebdda223ab5b05234a9a99d7947beb9fb0a..b0ffab12980c869fdbbc9922d225f529df11b7a2 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -5335,7 +5335,7 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { tscFieldInfoAppend(&pQueryInfo->fieldsInfo, &f); } else if (pAlterSQL->type == TSDB_ALTER_TABLE_CHANGE_COLUMN) { if (taosArrayGetSize(pAlterSQL->pAddColumns) != 2) { - return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), NULL); + return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), NULL); } tVariantListItem* pItem = taosArrayGet(pAlterSQL->pAddColumns, 0); @@ -5343,20 +5343,20 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { SColumnIndex columnIndex = COLUMN_INDEX_INITIALIZER; SStrToken name = {.type = TK_STRING, .z = pItem->pVar.pz, .n = pItem->pVar.nLen}; if (getColumnIndexByName(pCmd, &name, pQueryInfo, &columnIndex) != TSDB_CODE_SUCCESS) { - return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg17); + return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg17); } SSchema* pColSchema = tscGetTableColumnSchema(pTableMetaInfo->pTableMeta, columnIndex.columnIndex); if (pColSchema->type != TSDB_DATA_TYPE_BINARY && pColSchema->type != TSDB_DATA_TYPE_NCHAR) { - return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg21); + return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg21); } pItem = taosArrayGet(pAlterSQL->pAddColumns, 1); int64_t nlen = 0; if (tVariantDump(&pItem->pVar, (char *)&nlen, TSDB_DATA_TYPE_BIGINT, false) < 0 || nlen <= 0) { - return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg22); + return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg22); } TAOS_FIELD f = tscCreateField(pColSchema->type, name.z, nlen); diff --git a/src/inc/ttokendef.h b/src/inc/ttokendef.h index 795779a29762c29a18e1fde1354856cfcd30ea6e..e5f1472317efb72791896073df42aeb676b48f36 100644 --- a/src/inc/ttokendef.h +++ b/src/inc/ttokendef.h @@ -210,6 +210,7 @@ + #define TK_SPACE 300 #define TK_COMMENT 301 #define TK_ILLEGAL 302 diff --git a/src/query/inc/sql.y b/src/query/inc/sql.y index d1327c43c20451e3e599745c2ffdb8d79bd7dad5..3a6e1c0cc0c03497406e6c8b5784348165d6c958 100644 --- a/src/query/inc/sql.y +++ b/src/query/inc/sql.y @@ -824,6 +824,18 @@ cmd ::= ALTER STABLE ids(X) cpxName(F) DROP COLUMN ids(A). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } +cmd ::= ALTER STABLE ids(X) cpxName(F) ALTER COLUMN LENGTH ids(A) INTEGER(Z). { + X.n += F.n; + + toTSDBType(A.type); + SArray* K = tVariantListAppendToken(NULL, &A, -1); + toTSDBType(Z.type); + K = tVariantListAppendToken(K, &Z, -1); + + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, K, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE); + setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); +} + //////////////////////////////////ALTER TAGS statement///////////////////////////////////// cmd ::= ALTER STABLE ids(X) cpxName(Y) ADD TAG columnlist(A). { X.n += Y.n; diff --git a/src/query/src/sql.c b/src/query/src/sql.c index 79b919869de2f8733dd95a94d5a304b8b76386fc..560e499228773249acd476de189599e1d1b7d708 100644 --- a/src/query/src/sql.c +++ b/src/query/src/sql.c @@ -136,18 +136,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 327 -#define YYNRULE 274 -#define YYNRULE_WITH_ACTION 274 +#define YYNSTATE 331 +#define YYNRULE 275 +#define YYNRULE_WITH_ACTION 275 #define YYNTOKEN 188 -#define YY_MAX_SHIFT 326 -#define YY_MIN_SHIFTREDUCE 523 -#define YY_MAX_SHIFTREDUCE 796 -#define YY_ERROR_ACTION 797 -#define YY_ACCEPT_ACTION 798 -#define YY_NO_ACTION 799 -#define YY_MIN_REDUCE 800 -#define YY_MAX_REDUCE 1073 +#define YY_MAX_SHIFT 330 +#define YY_MIN_SHIFTREDUCE 528 +#define YY_MAX_SHIFTREDUCE 802 +#define YY_ERROR_ACTION 803 +#define YY_ACCEPT_ACTION 804 +#define YY_NO_ACTION 805 +#define YY_MIN_REDUCE 806 +#define YY_MAX_REDUCE 1080 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -214,78 +214,78 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (694) +#define YY_ACTTAB_COUNT (697) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 968, 571, 210, 324, 70, 18, 216, 959, 187, 572, - /* 10 */ 798, 326, 185, 48, 49, 145, 52, 53, 219, 1054, - /* 20 */ 222, 42, 213, 51, 271, 56, 54, 58, 55, 933, - /* 30 */ 650, 187, 947, 47, 46, 187, 932, 45, 44, 43, - /* 40 */ 48, 49, 1053, 52, 53, 218, 1054, 222, 42, 571, - /* 50 */ 51, 271, 56, 54, 58, 55, 959, 572, 300, 299, - /* 60 */ 47, 46, 965, 145, 45, 44, 43, 49, 31, 52, - /* 70 */ 53, 249, 138, 222, 42, 83, 51, 271, 56, 54, - /* 80 */ 58, 55, 287, 1003, 88, 266, 47, 46, 72, 231, - /* 90 */ 45, 44, 43, 524, 525, 526, 527, 528, 529, 530, - /* 100 */ 531, 532, 533, 534, 535, 536, 325, 234, 287, 211, - /* 110 */ 71, 571, 943, 48, 49, 31, 52, 53, 935, 572, - /* 120 */ 222, 42, 571, 51, 271, 56, 54, 58, 55, 268, - /* 130 */ 572, 81, 739, 47, 46, 256, 255, 45, 44, 43, - /* 140 */ 48, 50, 945, 52, 53, 145, 310, 222, 42, 77, - /* 150 */ 51, 271, 56, 54, 58, 55, 212, 37, 232, 944, - /* 160 */ 47, 46, 289, 191, 45, 44, 43, 24, 285, 319, - /* 170 */ 318, 284, 283, 282, 317, 281, 316, 315, 314, 280, - /* 180 */ 313, 312, 907, 31, 895, 896, 897, 898, 899, 900, - /* 190 */ 901, 902, 903, 904, 905, 906, 908, 909, 52, 53, - /* 200 */ 846, 1050, 222, 42, 171, 51, 271, 56, 54, 58, - /* 210 */ 55, 941, 19, 1002, 25, 47, 46, 1049, 959, 45, - /* 220 */ 44, 43, 221, 754, 225, 31, 743, 944, 746, 196, - /* 230 */ 749, 221, 754, 214, 13, 743, 197, 746, 87, 749, - /* 240 */ 84, 122, 121, 195, 45, 44, 43, 109, 56, 54, - /* 250 */ 58, 55, 310, 228, 206, 207, 47, 46, 270, 74, - /* 260 */ 45, 44, 43, 206, 207, 75, 226, 252, 24, 944, - /* 270 */ 319, 318, 77, 252, 745, 317, 748, 316, 315, 314, - /* 280 */ 37, 313, 312, 915, 1048, 674, 913, 914, 671, 204, - /* 290 */ 672, 916, 673, 918, 919, 917, 85, 920, 921, 107, - /* 300 */ 100, 112, 248, 686, 69, 31, 111, 117, 120, 110, - /* 310 */ 8, 203, 5, 34, 161, 114, 236, 237, 689, 160, - /* 320 */ 95, 90, 94, 31, 233, 57, 272, 930, 931, 30, - /* 330 */ 934, 297, 755, 31, 57, 179, 177, 175, 751, 31, - /* 340 */ 145, 755, 174, 125, 124, 123, 290, 751, 220, 944, - /* 350 */ 241, 47, 46, 205, 750, 45, 44, 43, 855, 245, - /* 360 */ 244, 189, 171, 750, 291, 227, 744, 944, 747, 229, - /* 370 */ 323, 322, 130, 320, 298, 847, 99, 944, 98, 171, - /* 380 */ 302, 1, 159, 944, 3, 172, 752, 136, 134, 133, - /* 390 */ 741, 947, 6, 235, 675, 947, 693, 294, 293, 947, - /* 400 */ 720, 721, 250, 705, 65, 711, 32, 140, 82, 61, - /* 410 */ 62, 712, 775, 756, 660, 21, 20, 20, 32, 274, - /* 420 */ 1065, 662, 758, 32, 66, 61, 742, 276, 678, 661, - /* 430 */ 679, 86, 63, 61, 29, 946, 68, 277, 649, 190, - /* 440 */ 15, 106, 14, 105, 676, 192, 677, 186, 17, 193, - /* 450 */ 16, 119, 118, 194, 200, 201, 199, 184, 198, 1013, - /* 460 */ 188, 1012, 223, 1009, 40, 246, 1008, 224, 301, 137, - /* 470 */ 967, 978, 995, 975, 994, 976, 960, 253, 753, 135, - /* 480 */ 980, 139, 143, 155, 156, 942, 251, 940, 704, 257, - /* 490 */ 157, 311, 911, 154, 146, 158, 957, 149, 147, 269, - /* 500 */ 215, 59, 259, 858, 279, 264, 38, 67, 182, 148, - /* 510 */ 35, 288, 854, 64, 1070, 265, 267, 96, 1069, 1067, - /* 520 */ 162, 263, 292, 261, 1064, 102, 295, 1063, 1060, 163, - /* 530 */ 876, 36, 33, 39, 183, 843, 113, 841, 115, 116, - /* 540 */ 839, 838, 238, 173, 836, 835, 834, 833, 832, 831, - /* 550 */ 176, 178, 258, 828, 826, 824, 822, 180, 819, 181, - /* 560 */ 41, 73, 78, 108, 260, 996, 303, 304, 305, 306, - /* 570 */ 307, 308, 309, 208, 321, 796, 230, 278, 239, 240, - /* 580 */ 795, 242, 243, 91, 92, 209, 794, 202, 781, 780, - /* 590 */ 247, 252, 9, 273, 681, 837, 76, 26, 165, 877, - /* 600 */ 166, 126, 167, 164, 169, 168, 170, 127, 830, 2, - /* 610 */ 128, 129, 829, 821, 820, 254, 79, 706, 4, 150, - /* 620 */ 151, 152, 153, 141, 923, 709, 80, 142, 217, 262, - /* 630 */ 27, 713, 144, 10, 11, 757, 28, 7, 12, 22, - /* 640 */ 759, 23, 89, 275, 613, 609, 87, 607, 606, 605, - /* 650 */ 602, 575, 286, 97, 93, 32, 784, 60, 652, 651, - /* 660 */ 648, 597, 595, 101, 103, 587, 593, 589, 591, 585, - /* 670 */ 104, 583, 616, 615, 614, 612, 611, 296, 610, 608, - /* 680 */ 604, 603, 61, 573, 540, 538, 131, 800, 799, 799, - /* 690 */ 799, 799, 799, 132, + /* 0 */ 974, 576, 211, 328, 70, 18, 217, 965, 188, 577, + /* 10 */ 804, 330, 186, 48, 49, 146, 52, 53, 220, 1060, + /* 20 */ 223, 42, 214, 51, 272, 56, 54, 58, 55, 939, + /* 30 */ 655, 188, 953, 47, 46, 188, 938, 45, 44, 43, + /* 40 */ 48, 49, 1059, 52, 53, 219, 1060, 223, 42, 576, + /* 50 */ 51, 272, 56, 54, 58, 55, 965, 577, 304, 303, + /* 60 */ 47, 46, 971, 146, 45, 44, 43, 49, 31, 52, + /* 70 */ 53, 250, 139, 223, 42, 83, 51, 272, 56, 54, + /* 80 */ 58, 55, 288, 1009, 88, 267, 47, 46, 72, 314, + /* 90 */ 45, 44, 43, 529, 530, 531, 532, 533, 534, 535, + /* 100 */ 536, 537, 538, 539, 540, 541, 329, 235, 288, 212, + /* 110 */ 71, 576, 949, 48, 49, 31, 52, 53, 941, 577, + /* 120 */ 223, 42, 576, 51, 272, 56, 54, 58, 55, 269, + /* 130 */ 577, 81, 744, 47, 46, 257, 256, 45, 44, 43, + /* 140 */ 48, 50, 951, 52, 53, 146, 192, 223, 42, 77, + /* 150 */ 51, 272, 56, 54, 58, 55, 213, 37, 947, 950, + /* 160 */ 47, 46, 1, 160, 45, 44, 43, 24, 286, 323, + /* 170 */ 322, 285, 284, 283, 321, 282, 320, 319, 318, 281, + /* 180 */ 317, 316, 913, 31, 901, 902, 903, 904, 905, 906, + /* 190 */ 907, 908, 909, 910, 911, 912, 914, 915, 52, 53, + /* 200 */ 229, 29, 223, 42, 278, 51, 272, 56, 54, 58, + /* 210 */ 55, 694, 19, 1008, 25, 47, 46, 746, 965, 45, + /* 220 */ 44, 43, 222, 759, 226, 31, 748, 950, 751, 197, + /* 230 */ 754, 222, 759, 215, 13, 748, 198, 751, 87, 754, + /* 240 */ 84, 123, 122, 196, 45, 44, 43, 110, 56, 54, + /* 250 */ 58, 55, 314, 747, 208, 209, 47, 46, 271, 74, + /* 260 */ 45, 44, 43, 208, 209, 75, 227, 253, 24, 950, + /* 270 */ 323, 322, 77, 253, 750, 321, 753, 320, 319, 318, + /* 280 */ 37, 317, 316, 921, 1056, 679, 919, 920, 676, 698, + /* 290 */ 677, 922, 678, 924, 925, 923, 85, 926, 927, 108, + /* 300 */ 101, 113, 249, 691, 69, 31, 112, 118, 121, 111, + /* 310 */ 8, 205, 5, 34, 162, 115, 237, 238, 273, 161, + /* 320 */ 95, 90, 94, 31, 234, 57, 232, 936, 937, 30, + /* 330 */ 940, 301, 760, 293, 57, 180, 178, 176, 756, 31, + /* 340 */ 31, 760, 175, 126, 125, 124, 294, 756, 146, 950, + /* 350 */ 242, 47, 46, 1055, 755, 45, 44, 43, 1054, 246, + /* 360 */ 245, 228, 230, 755, 295, 324, 749, 950, 752, 852, + /* 370 */ 327, 326, 131, 172, 137, 135, 134, 3, 173, 1071, + /* 380 */ 302, 306, 221, 950, 950, 861, 757, 953, 953, 172, + /* 390 */ 62, 953, 853, 236, 680, 233, 172, 298, 297, 290, + /* 400 */ 725, 726, 251, 710, 716, 717, 32, 141, 61, 21, + /* 410 */ 65, 780, 63, 761, 763, 20, 82, 20, 665, 275, + /* 420 */ 667, 277, 32, 32, 61, 86, 6, 100, 666, 99, + /* 430 */ 66, 15, 61, 14, 107, 68, 106, 654, 206, 683, + /* 440 */ 17, 684, 16, 681, 207, 682, 120, 119, 952, 190, + /* 450 */ 191, 193, 187, 194, 195, 201, 202, 200, 185, 1019, + /* 460 */ 199, 189, 1018, 224, 40, 1015, 1014, 225, 305, 247, + /* 470 */ 138, 973, 156, 984, 1001, 981, 982, 966, 758, 254, + /* 480 */ 1000, 986, 140, 144, 136, 948, 157, 258, 148, 216, + /* 490 */ 709, 917, 963, 147, 149, 946, 150, 151, 158, 266, + /* 500 */ 159, 864, 280, 260, 265, 67, 64, 59, 38, 270, + /* 510 */ 183, 35, 289, 264, 268, 860, 1077, 96, 291, 1076, + /* 520 */ 1073, 163, 262, 296, 1070, 103, 299, 1069, 1066, 164, + /* 530 */ 882, 36, 33, 39, 184, 849, 114, 847, 116, 117, + /* 540 */ 845, 844, 239, 174, 842, 841, 840, 839, 838, 837, + /* 550 */ 177, 179, 41, 834, 832, 830, 828, 181, 825, 182, + /* 560 */ 259, 252, 315, 73, 78, 109, 261, 1002, 307, 308, + /* 570 */ 309, 310, 311, 312, 210, 313, 231, 325, 279, 802, + /* 580 */ 241, 240, 801, 204, 203, 243, 91, 92, 244, 800, + /* 590 */ 843, 786, 785, 248, 127, 274, 253, 686, 836, 167, + /* 600 */ 128, 166, 883, 165, 168, 169, 171, 129, 170, 835, + /* 610 */ 2, 130, 9, 827, 826, 26, 76, 4, 255, 79, + /* 620 */ 711, 152, 153, 154, 155, 929, 142, 218, 714, 143, + /* 630 */ 80, 263, 764, 718, 145, 10, 11, 762, 27, 7, + /* 640 */ 28, 12, 22, 276, 23, 89, 618, 87, 614, 612, + /* 650 */ 611, 610, 607, 580, 287, 93, 97, 796, 32, 789, + /* 660 */ 657, 656, 653, 98, 60, 102, 602, 600, 592, 598, + /* 670 */ 594, 292, 596, 590, 104, 588, 621, 620, 619, 617, + /* 680 */ 105, 300, 616, 615, 613, 609, 608, 61, 578, 545, + /* 690 */ 132, 543, 806, 805, 805, 805, 133, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 191, 1, 190, 191, 197, 252, 210, 234, 252, 9, @@ -296,68 +296,68 @@ static const YYCODETYPE yy_lookahead[] = { /* 50 */ 23, 24, 25, 26, 27, 28, 234, 9, 33, 34, /* 60 */ 33, 34, 253, 191, 37, 38, 39, 14, 191, 16, /* 70 */ 17, 249, 191, 20, 21, 237, 23, 24, 25, 26, - /* 80 */ 27, 28, 79, 259, 197, 261, 33, 34, 250, 68, + /* 80 */ 27, 28, 79, 259, 197, 261, 33, 34, 250, 81, /* 90 */ 37, 38, 39, 45, 46, 47, 48, 49, 50, 51, /* 100 */ 52, 53, 54, 55, 56, 57, 58, 191, 79, 61, /* 110 */ 110, 1, 235, 13, 14, 191, 16, 17, 231, 9, /* 120 */ 20, 21, 1, 23, 24, 25, 26, 27, 28, 257, /* 130 */ 9, 259, 105, 33, 34, 254, 255, 37, 38, 39, - /* 140 */ 13, 14, 226, 16, 17, 191, 81, 20, 21, 104, - /* 150 */ 23, 24, 25, 26, 27, 28, 232, 112, 137, 235, - /* 160 */ 33, 34, 141, 252, 37, 38, 39, 88, 89, 90, + /* 140 */ 13, 14, 226, 16, 17, 191, 252, 20, 21, 104, + /* 150 */ 23, 24, 25, 26, 27, 28, 232, 112, 191, 235, + /* 160 */ 33, 34, 198, 199, 37, 38, 39, 88, 89, 90, /* 170 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, /* 180 */ 101, 102, 209, 191, 211, 212, 213, 214, 215, 216, /* 190 */ 217, 218, 219, 220, 221, 222, 223, 224, 16, 17, - /* 200 */ 196, 252, 20, 21, 200, 23, 24, 25, 26, 27, - /* 210 */ 28, 191, 44, 259, 104, 33, 34, 252, 234, 37, + /* 200 */ 233, 104, 20, 21, 107, 23, 24, 25, 26, 27, + /* 210 */ 28, 37, 44, 259, 104, 33, 34, 1, 234, 37, /* 220 */ 38, 39, 1, 2, 232, 191, 5, 235, 7, 61, /* 230 */ 9, 1, 2, 249, 104, 5, 68, 7, 108, 9, /* 240 */ 110, 73, 74, 75, 37, 38, 39, 76, 25, 26, - /* 250 */ 27, 28, 81, 233, 33, 34, 33, 34, 37, 105, + /* 250 */ 27, 28, 81, 37, 33, 34, 33, 34, 37, 105, /* 260 */ 37, 38, 39, 33, 34, 105, 232, 113, 88, 235, /* 270 */ 90, 91, 104, 113, 5, 95, 7, 97, 98, 99, - /* 280 */ 112, 101, 102, 209, 252, 2, 212, 213, 5, 252, + /* 280 */ 112, 101, 102, 209, 252, 2, 212, 213, 5, 115, /* 290 */ 7, 217, 9, 219, 220, 221, 197, 223, 224, 62, /* 300 */ 63, 64, 134, 109, 136, 191, 69, 70, 71, 72, - /* 310 */ 116, 143, 62, 63, 64, 78, 33, 34, 37, 69, - /* 320 */ 70, 71, 72, 191, 68, 104, 15, 228, 229, 230, - /* 330 */ 231, 75, 111, 191, 104, 62, 63, 64, 117, 191, - /* 340 */ 191, 111, 69, 70, 71, 72, 232, 117, 60, 235, - /* 350 */ 135, 33, 34, 252, 133, 37, 38, 39, 196, 144, - /* 360 */ 145, 252, 200, 133, 232, 210, 5, 235, 7, 210, - /* 370 */ 65, 66, 67, 210, 232, 196, 138, 235, 140, 200, - /* 380 */ 232, 198, 199, 235, 194, 195, 117, 62, 63, 64, - /* 390 */ 1, 236, 104, 137, 111, 236, 115, 141, 142, 236, - /* 400 */ 124, 125, 105, 105, 109, 105, 109, 109, 259, 109, - /* 410 */ 109, 105, 105, 105, 105, 109, 109, 109, 109, 105, - /* 420 */ 236, 105, 111, 109, 129, 109, 37, 105, 5, 105, - /* 430 */ 7, 109, 131, 109, 104, 236, 104, 107, 106, 252, - /* 440 */ 138, 138, 140, 140, 5, 252, 7, 252, 138, 252, - /* 450 */ 140, 76, 77, 252, 252, 252, 252, 252, 252, 227, - /* 460 */ 252, 227, 227, 227, 251, 191, 227, 227, 227, 191, - /* 470 */ 191, 191, 260, 191, 260, 191, 234, 234, 117, 60, - /* 480 */ 191, 191, 191, 238, 191, 234, 192, 191, 117, 256, - /* 490 */ 191, 103, 225, 239, 247, 191, 248, 244, 246, 122, - /* 500 */ 256, 127, 256, 191, 191, 256, 191, 128, 191, 245, - /* 510 */ 191, 191, 191, 130, 191, 121, 126, 191, 191, 191, - /* 520 */ 191, 120, 191, 119, 191, 191, 191, 191, 191, 191, + /* 310 */ 116, 143, 62, 63, 64, 78, 33, 34, 15, 69, + /* 320 */ 70, 71, 72, 191, 68, 104, 68, 228, 229, 230, + /* 330 */ 231, 75, 111, 75, 104, 62, 63, 64, 117, 191, + /* 340 */ 191, 111, 69, 70, 71, 72, 232, 117, 191, 235, + /* 350 */ 135, 33, 34, 252, 133, 37, 38, 39, 252, 144, + /* 360 */ 145, 210, 210, 133, 232, 210, 5, 235, 7, 196, + /* 370 */ 65, 66, 67, 200, 62, 63, 64, 194, 195, 236, + /* 380 */ 232, 232, 60, 235, 235, 196, 117, 236, 236, 200, + /* 390 */ 109, 236, 196, 137, 111, 137, 200, 141, 142, 141, + /* 400 */ 124, 125, 105, 105, 105, 105, 109, 109, 109, 109, + /* 410 */ 109, 105, 131, 105, 111, 109, 259, 109, 105, 105, + /* 420 */ 105, 105, 109, 109, 109, 109, 104, 138, 105, 140, + /* 430 */ 129, 138, 109, 140, 138, 104, 140, 106, 252, 5, + /* 440 */ 138, 7, 140, 5, 252, 7, 76, 77, 236, 252, + /* 450 */ 252, 252, 252, 252, 252, 252, 252, 252, 252, 227, + /* 460 */ 252, 252, 227, 227, 251, 227, 227, 227, 227, 191, + /* 470 */ 191, 191, 238, 191, 260, 191, 191, 234, 117, 234, + /* 480 */ 260, 191, 191, 191, 60, 234, 191, 256, 246, 256, + /* 490 */ 117, 225, 248, 247, 245, 191, 244, 243, 191, 121, + /* 500 */ 191, 191, 191, 256, 256, 128, 130, 127, 191, 122, + /* 510 */ 191, 191, 191, 120, 126, 191, 191, 191, 191, 191, + /* 520 */ 191, 191, 119, 191, 191, 191, 191, 191, 191, 191, /* 530 */ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, /* 540 */ 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, - /* 550 */ 191, 191, 118, 191, 191, 191, 191, 191, 191, 191, - /* 560 */ 132, 192, 192, 87, 192, 192, 86, 50, 83, 85, - /* 570 */ 54, 84, 82, 192, 79, 5, 192, 192, 146, 5, - /* 580 */ 5, 146, 5, 197, 197, 192, 5, 192, 90, 89, - /* 590 */ 135, 113, 104, 107, 105, 192, 114, 104, 206, 208, - /* 600 */ 202, 193, 205, 207, 204, 203, 201, 193, 192, 198, - /* 610 */ 193, 193, 192, 192, 192, 109, 109, 105, 194, 243, - /* 620 */ 242, 241, 240, 104, 225, 105, 104, 109, 1, 104, - /* 630 */ 109, 105, 104, 123, 123, 105, 109, 104, 104, 104, - /* 640 */ 111, 104, 76, 107, 9, 5, 108, 5, 5, 5, - /* 650 */ 5, 80, 15, 140, 76, 109, 5, 16, 5, 5, - /* 660 */ 105, 5, 5, 140, 140, 5, 5, 5, 5, 5, - /* 670 */ 139, 5, 5, 5, 5, 5, 5, 138, 5, 5, - /* 680 */ 5, 5, 109, 80, 60, 59, 21, 0, 264, 264, - /* 690 */ 264, 264, 264, 21, 264, 264, 264, 264, 264, 264, + /* 550 */ 191, 191, 132, 191, 191, 191, 191, 191, 191, 191, + /* 560 */ 118, 192, 103, 192, 192, 87, 192, 192, 86, 50, + /* 570 */ 83, 85, 54, 84, 192, 82, 192, 79, 192, 5, + /* 580 */ 5, 146, 5, 192, 192, 146, 197, 197, 5, 5, + /* 590 */ 192, 90, 89, 135, 193, 107, 113, 105, 192, 202, + /* 600 */ 193, 206, 208, 207, 205, 203, 201, 193, 204, 192, + /* 610 */ 198, 193, 104, 192, 192, 104, 114, 194, 109, 109, + /* 620 */ 105, 242, 241, 240, 239, 225, 104, 1, 105, 109, + /* 630 */ 104, 104, 111, 105, 104, 123, 123, 105, 109, 104, + /* 640 */ 109, 104, 104, 107, 104, 76, 9, 108, 5, 5, + /* 650 */ 5, 5, 5, 80, 15, 76, 140, 5, 109, 5, + /* 660 */ 5, 5, 105, 139, 16, 140, 5, 5, 5, 5, + /* 670 */ 5, 138, 5, 5, 140, 5, 5, 5, 5, 5, + /* 680 */ 139, 138, 5, 5, 5, 5, 5, 109, 80, 60, + /* 690 */ 21, 59, 0, 264, 264, 264, 21, 264, 264, 264, /* 700 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, /* 710 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, /* 720 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, @@ -376,104 +376,106 @@ static const YYCODETYPE yy_lookahead[] = { /* 850 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, /* 860 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, /* 870 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, - /* 880 */ 264, 264, + /* 880 */ 264, 264, 264, 264, 264, }; -#define YY_SHIFT_COUNT (326) +#define YY_SHIFT_COUNT (330) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (687) +#define YY_SHIFT_MAX (692) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 168, 79, 79, 180, 180, 3, 221, 230, 110, 121, /* 10 */ 121, 121, 121, 121, 121, 121, 121, 121, 0, 48, /* 20 */ 230, 283, 283, 283, 283, 45, 45, 121, 121, 121, - /* 30 */ 29, 121, 121, 171, 3, 65, 65, 694, 694, 694, + /* 30 */ 29, 121, 121, 171, 3, 8, 8, 697, 697, 697, /* 40 */ 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, /* 50 */ 230, 230, 230, 230, 230, 230, 230, 230, 230, 230, /* 60 */ 283, 283, 25, 25, 25, 25, 25, 25, 25, 121, - /* 70 */ 121, 121, 281, 121, 121, 121, 45, 45, 121, 121, + /* 70 */ 121, 121, 174, 121, 121, 121, 45, 45, 121, 121, /* 80 */ 121, 276, 276, 194, 45, 121, 121, 121, 121, 121, /* 90 */ 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, /* 100 */ 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, /* 110 */ 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, /* 120 */ 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, - /* 130 */ 121, 121, 121, 121, 121, 121, 121, 419, 419, 419, - /* 140 */ 371, 371, 371, 419, 371, 419, 379, 383, 374, 377, - /* 150 */ 390, 394, 401, 404, 434, 428, 419, 419, 419, 388, - /* 160 */ 3, 3, 419, 419, 476, 480, 517, 485, 484, 516, - /* 170 */ 487, 490, 388, 419, 495, 495, 419, 495, 419, 495, - /* 180 */ 419, 419, 694, 694, 27, 100, 127, 100, 100, 53, - /* 190 */ 182, 223, 223, 223, 223, 237, 250, 273, 318, 318, - /* 200 */ 318, 318, 256, 215, 207, 207, 269, 361, 130, 21, - /* 210 */ 305, 325, 297, 154, 160, 298, 300, 306, 307, 308, - /* 220 */ 389, 288, 311, 301, 295, 309, 314, 316, 322, 324, - /* 230 */ 330, 238, 302, 303, 332, 310, 423, 439, 375, 570, - /* 240 */ 432, 574, 575, 435, 577, 581, 498, 500, 455, 478, - /* 250 */ 486, 488, 482, 489, 493, 506, 507, 512, 519, 520, - /* 260 */ 518, 522, 627, 525, 526, 528, 521, 510, 527, 511, - /* 270 */ 530, 533, 529, 534, 486, 535, 536, 537, 538, 566, - /* 280 */ 635, 640, 642, 643, 644, 645, 571, 637, 578, 513, - /* 290 */ 546, 546, 641, 523, 524, 651, 531, 539, 546, 653, - /* 300 */ 654, 555, 546, 656, 657, 660, 661, 662, 663, 664, - /* 310 */ 666, 667, 668, 669, 670, 671, 673, 674, 675, 676, - /* 320 */ 573, 603, 665, 672, 624, 626, 687, + /* 130 */ 121, 121, 121, 121, 121, 121, 121, 121, 424, 424, + /* 140 */ 424, 373, 373, 373, 424, 373, 424, 377, 376, 380, + /* 150 */ 387, 388, 378, 393, 403, 442, 420, 424, 424, 424, + /* 160 */ 459, 3, 3, 424, 424, 478, 482, 519, 487, 486, + /* 170 */ 518, 489, 493, 459, 424, 498, 498, 424, 498, 424, + /* 180 */ 498, 424, 424, 697, 697, 27, 100, 127, 100, 100, + /* 190 */ 53, 182, 223, 223, 223, 223, 237, 250, 273, 318, + /* 200 */ 318, 318, 318, 256, 258, 215, 207, 207, 269, 361, + /* 210 */ 130, 305, 312, 297, 154, 160, 298, 299, 300, 306, + /* 220 */ 308, 216, 322, 303, 281, 301, 313, 314, 315, 316, + /* 230 */ 323, 97, 289, 293, 296, 331, 302, 434, 438, 370, + /* 240 */ 574, 435, 575, 577, 439, 583, 584, 501, 503, 458, + /* 250 */ 483, 488, 508, 502, 492, 511, 509, 510, 515, 522, + /* 260 */ 523, 520, 526, 626, 527, 528, 530, 529, 512, 531, + /* 270 */ 513, 532, 535, 521, 537, 488, 538, 536, 540, 539, + /* 280 */ 569, 637, 643, 644, 645, 646, 647, 573, 639, 579, + /* 290 */ 516, 652, 524, 533, 549, 549, 648, 525, 534, 654, + /* 300 */ 541, 543, 549, 655, 656, 557, 549, 661, 662, 663, + /* 310 */ 664, 665, 667, 668, 670, 671, 672, 673, 674, 677, + /* 320 */ 678, 679, 680, 681, 578, 608, 669, 675, 629, 632, + /* 330 */ 692, }; -#define YY_REDUCE_COUNT (183) +#define YY_REDUCE_COUNT (184) #define YY_REDUCE_MIN (-247) -#define YY_REDUCE_MAX (424) +#define YY_REDUCE_MAX (423) static const short yy_reduce_ofst[] = { /* 0 */ -178, -27, -27, 74, 74, 99, -244, -217, -119, -76, - /* 10 */ -176, -128, -8, 34, 114, 132, 142, 148, -191, -188, - /* 20 */ -221, -204, 155, 159, 163, -227, -16, -46, 149, 20, - /* 30 */ -113, -84, -123, 4, -193, 162, 179, -162, 183, 190, - /* 40 */ -247, -240, -89, -51, -35, 32, 37, 101, 109, 187, - /* 50 */ 193, 195, 197, 201, 202, 203, 204, 205, 206, 208, - /* 60 */ 184, 199, 232, 234, 235, 236, 239, 240, 241, 274, - /* 70 */ 278, 279, 213, 280, 282, 284, 242, 243, 289, 290, - /* 80 */ 291, 212, 214, 245, 251, 293, 296, 299, 304, 312, - /* 90 */ 313, 315, 317, 319, 320, 321, 323, 326, 327, 328, - /* 100 */ 329, 331, 333, 334, 335, 336, 337, 338, 339, 340, - /* 110 */ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, - /* 120 */ 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, - /* 130 */ 362, 363, 364, 365, 366, 367, 368, 294, 369, 370, - /* 140 */ 233, 244, 246, 372, 249, 373, 248, 247, 252, 264, - /* 150 */ 253, 376, 378, 380, 382, 254, 381, 384, 385, 267, - /* 160 */ 386, 387, 393, 395, 391, 396, 392, 398, 397, 402, - /* 170 */ 400, 405, 399, 403, 408, 414, 416, 417, 420, 418, - /* 180 */ 421, 422, 411, 424, + /* 10 */ -176, -128, -8, 34, 114, 132, 148, 149, -191, -188, + /* 20 */ -221, -204, 151, 152, 155, -227, -16, -46, 157, -33, + /* 30 */ -113, -84, -123, 173, -193, 189, 196, -162, -36, 183, + /* 40 */ -247, -240, -106, 32, 101, 106, 186, 192, 197, 198, + /* 50 */ 199, 200, 201, 202, 203, 204, 205, 206, 208, 209, + /* 60 */ 143, 212, 232, 235, 236, 238, 239, 240, 241, 278, + /* 70 */ 279, 280, 213, 282, 284, 285, 243, 245, 290, 291, + /* 80 */ 292, 214, 220, 234, 251, 295, 304, 307, 309, 310, + /* 90 */ 311, 317, 319, 320, 321, 324, 325, 326, 327, 328, + /* 100 */ 329, 330, 332, 333, 334, 335, 336, 337, 338, 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, 362, 363, 364, 365, 366, 367, 368, 369, 371, + /* 140 */ 372, 231, 233, 247, 374, 248, 375, 244, 246, 242, + /* 150 */ 249, 252, 254, 379, 381, 383, 385, 382, 384, 386, + /* 160 */ 266, 389, 390, 391, 392, 394, 396, 395, 397, 399, + /* 170 */ 402, 404, 405, 400, 398, 401, 407, 406, 414, 417, + /* 180 */ 418, 421, 422, 412, 423, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 797, 910, 856, 922, 844, 853, 1056, 1056, 797, 797, - /* 10 */ 797, 797, 797, 797, 797, 797, 797, 797, 969, 816, - /* 20 */ 1056, 797, 797, 797, 797, 797, 797, 797, 797, 797, - /* 30 */ 853, 797, 797, 859, 853, 859, 859, 964, 894, 912, - /* 40 */ 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, - /* 50 */ 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, - /* 60 */ 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, - /* 70 */ 797, 797, 971, 977, 974, 797, 797, 797, 979, 797, - /* 80 */ 797, 999, 999, 962, 797, 797, 797, 797, 797, 797, - /* 90 */ 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, - /* 100 */ 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, - /* 110 */ 797, 797, 797, 842, 797, 840, 797, 797, 797, 797, - /* 120 */ 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, - /* 130 */ 827, 797, 797, 797, 797, 797, 797, 818, 818, 818, - /* 140 */ 797, 797, 797, 818, 797, 818, 1006, 1010, 1004, 992, - /* 150 */ 1000, 991, 987, 985, 984, 1014, 818, 818, 818, 857, - /* 160 */ 853, 853, 818, 818, 875, 873, 871, 863, 869, 865, - /* 170 */ 867, 861, 845, 818, 851, 851, 818, 851, 818, 851, - /* 180 */ 818, 818, 894, 912, 797, 1015, 797, 1055, 1005, 1045, - /* 190 */ 1044, 1051, 1043, 1042, 1041, 797, 797, 797, 1037, 1038, - /* 200 */ 1040, 1039, 797, 797, 1047, 1046, 797, 797, 797, 797, - /* 210 */ 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, - /* 220 */ 797, 1017, 797, 1011, 1007, 797, 797, 797, 797, 797, - /* 230 */ 797, 797, 797, 797, 924, 797, 797, 797, 797, 797, - /* 240 */ 797, 797, 797, 797, 797, 797, 797, 797, 797, 961, - /* 250 */ 797, 797, 797, 797, 797, 973, 972, 797, 797, 797, - /* 260 */ 797, 797, 797, 797, 797, 797, 1001, 797, 993, 797, - /* 270 */ 797, 797, 797, 797, 936, 797, 797, 797, 797, 797, - /* 280 */ 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, - /* 290 */ 1068, 1066, 797, 797, 797, 797, 797, 797, 1062, 797, - /* 300 */ 797, 797, 1059, 797, 797, 797, 797, 797, 797, 797, - /* 310 */ 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, - /* 320 */ 878, 797, 825, 823, 797, 814, 797, + /* 0 */ 803, 916, 862, 928, 850, 859, 1062, 1062, 803, 803, + /* 10 */ 803, 803, 803, 803, 803, 803, 803, 803, 975, 822, + /* 20 */ 1062, 803, 803, 803, 803, 803, 803, 803, 803, 803, + /* 30 */ 859, 803, 803, 865, 859, 865, 865, 970, 900, 918, + /* 40 */ 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, + /* 50 */ 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, + /* 60 */ 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, + /* 70 */ 803, 803, 977, 983, 980, 803, 803, 803, 985, 803, + /* 80 */ 803, 1005, 1005, 968, 803, 803, 803, 803, 803, 803, + /* 90 */ 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, + /* 100 */ 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, + /* 110 */ 803, 803, 803, 803, 848, 803, 846, 803, 803, 803, + /* 120 */ 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, + /* 130 */ 803, 833, 803, 803, 803, 803, 803, 803, 824, 824, + /* 140 */ 824, 803, 803, 803, 824, 803, 824, 1012, 1016, 1010, + /* 150 */ 998, 1006, 997, 993, 991, 990, 1020, 824, 824, 824, + /* 160 */ 863, 859, 859, 824, 824, 881, 879, 877, 869, 875, + /* 170 */ 871, 873, 867, 851, 824, 857, 857, 824, 857, 824, + /* 180 */ 857, 824, 824, 900, 918, 803, 1021, 803, 1061, 1011, + /* 190 */ 1051, 1050, 1057, 1049, 1048, 1047, 803, 803, 803, 1043, + /* 200 */ 1044, 1046, 1045, 803, 803, 803, 1053, 1052, 803, 803, + /* 210 */ 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, + /* 220 */ 803, 803, 1023, 803, 1017, 1013, 803, 803, 803, 803, + /* 230 */ 803, 803, 803, 803, 803, 930, 803, 803, 803, 803, + /* 240 */ 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, + /* 250 */ 967, 803, 803, 803, 803, 803, 979, 978, 803, 803, + /* 260 */ 803, 803, 803, 803, 803, 803, 803, 1007, 803, 999, + /* 270 */ 803, 803, 803, 803, 803, 942, 803, 803, 803, 803, + /* 280 */ 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, + /* 290 */ 803, 803, 803, 803, 1075, 1072, 803, 803, 803, 803, + /* 300 */ 803, 803, 1068, 803, 803, 803, 1065, 803, 803, 803, + /* 310 */ 803, 803, 803, 803, 803, 803, 803, 803, 803, 803, + /* 320 */ 803, 803, 803, 803, 884, 803, 831, 829, 803, 820, + /* 330 */ 803, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1307,12 +1309,13 @@ static const char *const yyRuleName[] = { /* 265 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", /* 266 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", /* 267 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", - /* 268 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", - /* 269 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", - /* 270 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", - /* 271 */ "cmd ::= KILL CONNECTION INTEGER", - /* 272 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", - /* 273 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", + /* 268 */ "cmd ::= ALTER STABLE ids cpxName ALTER COLUMN LENGTH ids INTEGER", + /* 269 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", + /* 270 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", + /* 271 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", + /* 272 */ "cmd ::= KILL CONNECTION INTEGER", + /* 273 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", + /* 274 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", }; #endif /* NDEBUG */ @@ -2047,12 +2050,13 @@ static const YYCODETYPE yyRuleInfoLhs[] = { 189, /* (265) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ 189, /* (266) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ 189, /* (267) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - 189, /* (268) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - 189, /* (269) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - 189, /* (270) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - 189, /* (271) cmd ::= KILL CONNECTION INTEGER */ - 189, /* (272) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - 189, /* (273) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + 189, /* (268) cmd ::= ALTER STABLE ids cpxName ALTER COLUMN LENGTH ids INTEGER */ + 189, /* (269) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + 189, /* (270) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + 189, /* (271) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + 189, /* (272) cmd ::= KILL CONNECTION INTEGER */ + 189, /* (273) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + 189, /* (274) cmd ::= KILL QUERY INTEGER COLON INTEGER */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -2326,12 +2330,13 @@ static const signed char yyRuleInfoNRhs[] = { -9, /* (265) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ -7, /* (266) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ -7, /* (267) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - -7, /* (268) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - -7, /* (269) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - -8, /* (270) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - -3, /* (271) cmd ::= KILL CONNECTION INTEGER */ - -5, /* (272) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - -5, /* (273) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + -9, /* (268) cmd ::= ALTER STABLE ids cpxName ALTER COLUMN LENGTH ids INTEGER */ + -7, /* (269) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + -7, /* (270) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + -8, /* (271) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + -3, /* (272) cmd ::= KILL CONNECTION INTEGER */ + -5, /* (273) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + -5, /* (274) cmd ::= KILL QUERY INTEGER COLON INTEGER */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3410,14 +3415,27 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 268: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + case 268: /* cmd ::= ALTER STABLE ids cpxName ALTER COLUMN LENGTH ids INTEGER */ +{ + yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; + + toTSDBType(yymsp[-1].minor.yy0.type); + SArray* K = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1); + toTSDBType(yymsp[0].minor.yy0.type); + K = tVariantListAppendToken(K, &yymsp[0].minor.yy0, -1); + + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, K, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE); + setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); +} + break; + case 269: /* 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.yy285, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 269: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + case 270: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3428,7 +3446,7 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 270: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + case 271: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3442,13 +3460,13 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 271: /* cmd ::= KILL CONNECTION INTEGER */ + case 272: /* cmd ::= KILL CONNECTION INTEGER */ {setKillSql(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);} break; - case 272: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ + case 273: /* 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 273: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ + case 274: /* 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: diff --git a/tests/script/general/parser/alter_column.sim b/tests/script/general/parser/alter_column.sim index 12c117c09601a74f3e71959f133eb3914e280037..7f30498d06c1ce668cea00d36c1c9256d7ec528a 100644 --- a/tests/script/general/parser/alter_column.sim +++ b/tests/script/general/parser/alter_column.sim @@ -38,7 +38,7 @@ endi sql create stable stb (ts timestamp, c1 int, c2 binary(10), c3 nchar(10)) tags(id int) sql create table tb1 using stb tags(1) sql insert into tb1 values (now, 1, "1", "1") -sql alter table stb alter column length c2 20; +sql alter stable stb alter column length c2 20; if $rows != 0 then return -1 endi @@ -47,7 +47,9 @@ endi # try dropping columns that are defined in metric sql_error alter table tb alter column length c1 10; +sql_error alter stable tb alter column length c2 10; sql_error alter table tb1 alter column length c2 10; +sql_error alter stable tb1 alter column length c2 10; system sh/exec.sh -n dnode1 -s stop -x SIGINT