diff --git a/src/client/src/tscAsync.c b/src/client/src/tscAsync.c index 3249529b34580b519ef1c6dbe9bfe7e76e0cb7cc..0cfcff3a9869cecb318ca293fbb9e165924a1c07 100644 --- a/src/client/src/tscAsync.c +++ b/src/client/src/tscAsync.c @@ -301,7 +301,7 @@ static void tscAsyncResultCallback(SSchedMsg *pMsg) { taosReleaseRef(tscObjRef, pSql->self); } -void tscAsyncResultOnError(SSqlObj* pSql) { +void tscAsyncResultOnError(SSqlObj* pSql) { SSchedMsg schedMsg = {0}; schedMsg.fp = tscAsyncResultCallback; schedMsg.ahandle = (void *)pSql->self; @@ -505,10 +505,7 @@ void tscTableMetaCallBack(void *param, TAOS_RES *res, int code) { return; _error: - if (code != TSDB_CODE_SUCCESS) { - pSql->res.code = code; - tscAsyncResultOnError(pSql); - } - + pRes->code = code; + tscAsyncResultOnError(pSql); taosReleaseRef(tscObjRef, pSql->self); } diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 0d3f9e1984a6c60f9496e834e571d41bc2ea4a6f..4448f0379b9308453d76a5396f78c3e779946b17 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -3280,7 +3280,8 @@ static int32_t extractColumnFilterInfo(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SC } if (pSchema->type == TSDB_DATA_TYPE_BOOL) { - if (pExpr->tokenId != TK_EQ && pExpr->tokenId != TK_NE) { + int32_t t = pExpr->tokenId; + if (t != TK_EQ && t != TK_NE && t != TK_NOTNULL && t != TK_ISNULL) { return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg3); } } @@ -3483,7 +3484,8 @@ static int32_t validateSQLExpr(SSqlCmd* pCmd, tSqlExpr* pExpr, SQueryInfo* pQuer } pList->ids[pList->num++] = index; - } else if (pExpr->tokenId == TK_FLOAT && (isnan(pExpr->value.dKey) || isinf(pExpr->value.dKey))) { + } else if ((pExpr->tokenId == TK_FLOAT && (isnan(pExpr->value.dKey) || isinf(pExpr->value.dKey))) || + pExpr->tokenId == TK_NULL) { return TSDB_CODE_TSC_INVALID_SQL; } else if (pExpr->type == SQL_NODE_SQLFUNCTION) { if (*type == NON_ARITHMEIC_EXPR) { @@ -3717,6 +3719,39 @@ static int32_t setExprToCond(tSqlExpr** parent, tSqlExpr* pExpr, const char* msg return TSDB_CODE_SUCCESS; } +static int32_t validateNullExpr(tSqlExpr* pExpr, char* msgBuf) { + const char* msg = "only support is [not] null"; + + tSqlExpr* pRight = pExpr->pRight; + if (pRight->tokenId == TK_NULL && (!(pExpr->tokenId == TK_ISNULL || pExpr->tokenId == TK_NOTNULL))) { + return invalidSqlErrMsg(msgBuf, msg); + } + + return TSDB_CODE_SUCCESS; +} + +// check for like expression +static int32_t validateLikeExpr(tSqlExpr* pExpr, STableMeta* pTableMeta, int32_t index, char* msgBuf) { + const char* msg1 = "wildcard string should be less than 20 characters"; + const char* msg2 = "illegal column name"; + + tSqlExpr* pLeft = pExpr->pLeft; + tSqlExpr* pRight = pExpr->pRight; + + if (pExpr->tokenId == TK_LIKE) { + if (pRight->value.nLen > TSDB_PATTERN_STRING_MAX_LEN) { + return invalidSqlErrMsg(msgBuf, msg1); + } + + SSchema* pSchema = tscGetTableSchema(pTableMeta); + if ((!isTablenameToken(&pLeft->colInfo)) && !IS_VAR_DATA_TYPE(pSchema[index].type)) { + return invalidSqlErrMsg(msgBuf, msg2); + } + } + + return TSDB_CODE_SUCCESS; +} + static int32_t handleExprInQueryCond(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tSqlExpr** pExpr, SCondExpr* pCondExpr, int32_t* type, int32_t parentOptr) { const char* msg1 = "table query cannot use tags filter"; @@ -3726,8 +3761,7 @@ static int32_t handleExprInQueryCond(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tSql const char* msg5 = "not support ordinary column join"; const char* msg6 = "only one query condition on tbname allowed"; const char* msg7 = "only in/like allowed in filter table name"; - const char* msg8 = "wildcard string should be less than 20 characters"; - + tSqlExpr* pLeft = (*pExpr)->pLeft; tSqlExpr* pRight = (*pExpr)->pRight; @@ -3743,6 +3777,18 @@ static int32_t handleExprInQueryCond(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tSql STableMetaInfo* pTableMetaInfo = tscGetMetaInfo(pQueryInfo, index.tableIndex); STableMeta* pTableMeta = pTableMetaInfo->pTableMeta; + // validate the null expression + int32_t code = validateNullExpr(*pExpr, tscGetErrorMsgPayload(pCmd)); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + + // validate the like expression + code = validateLikeExpr(*pExpr, pTableMeta, index.columnIndex, tscGetErrorMsgPayload(pCmd)); + if (code != TSDB_CODE_SUCCESS) { + return code; + } + if (index.columnIndex == PRIMARYKEY_TIMESTAMP_COL_INDEX) { // query on time range if (!validateJoinExprNode(pCmd, pQueryInfo, *pExpr, &index)) { return TSDB_CODE_TSC_INVALID_SQL; @@ -3764,7 +3810,6 @@ static int32_t handleExprInQueryCond(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tSql int16_t leftIdx = index.tableIndex; - SColumnIndex index = COLUMN_INDEX_INITIALIZER; if (getColumnIndexByName(pCmd, &pRight->colInfo, pQueryInfo, &index) != TSDB_CODE_SUCCESS) { return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg2); } @@ -3811,20 +3856,6 @@ static int32_t handleExprInQueryCond(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tSql return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg1); } - // check for like expression - if ((*pExpr)->tokenId == TK_LIKE) { - if (pRight->value.nLen > TSDB_PATTERN_STRING_MAX_LEN) { - return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg8); - } - - SSchema* pSchema = tscGetTableSchema(pTableMetaInfo->pTableMeta); - - if ((!isTablenameToken(&pLeft->colInfo)) && pSchema[index.columnIndex].type != TSDB_DATA_TYPE_BINARY && - pSchema[index.columnIndex].type != TSDB_DATA_TYPE_NCHAR) { - return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg2); - } - } - // in case of in operator, keep it in a seprate attribute if (index.columnIndex == TSDB_TBNAME_COLUMN_INDEX) { if (!validTableNameOptr(*pExpr)) { diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 560356c5e819cd3933cba1f24cc6f22f12b4ebcf..8e917f571f203e9990a5a193b0ad75f940f09b3a 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -309,7 +309,7 @@ void tscSetResRawPtr(SSqlRes* pRes, SQueryInfo* pQueryInfo) { int32_t offset = 0; - for (int32_t i = 0; i < pRes->numOfCols; ++i) { + for (int32_t i = 0; i < pQueryInfo->fieldsInfo.numOfOutput; ++i) { SInternalField* pInfo = (SInternalField*)TARRAY_GET_ELEM(pQueryInfo->fieldsInfo.internalField, i); pRes->urow[i] = pRes->data + offset * pRes->numOfRows; diff --git a/src/dnode/src/dnodeMain.c b/src/dnode/src/dnodeMain.c index ea0ef4655d4cc98949012f125d9805ac20642d1a..410e6bb1888a11858e5d091f3f82c54df4dc2022 100644 --- a/src/dnode/src/dnodeMain.c +++ b/src/dnode/src/dnodeMain.c @@ -238,9 +238,11 @@ static int32_t dnodeInitStorage() { } TDIR *tdir = tfsOpendir("vnode_bak/.staging"); - if (tfsReaddir(tdir) != NULL) { + bool stagingNotEmpty = tfsReaddir(tdir) != NULL; + tfsClosedir(tdir); + + if (stagingNotEmpty) { dError("vnode_bak/.staging dir not empty, fix it first."); - tfsClosedir(tdir); return -1; } diff --git a/src/dnode/src/dnodeVWrite.c b/src/dnode/src/dnodeVWrite.c index 87b31e4604882d750e4a43fde4a6d818cc862e98..84fd260d91420ea19a796f10fa96d1fbbb1ac648 100644 --- a/src/dnode/src/dnodeVWrite.c +++ b/src/dnode/src/dnodeVWrite.c @@ -205,7 +205,7 @@ static void *dnodeProcessVWriteQueue(void *wparam) { pWrite->rpcMsg.ahandle, taosMsg[pWrite->pHead.msgType], qtypeStr[qtype], pWrite->pHead.version); pWrite->code = vnodeProcessWrite(pVnode, &pWrite->pHead, qtype, pWrite); - if (pWrite->code <= 0) pWrite->processedCount = 1; + if (pWrite->code <= 0) atomic_add_fetch_32(&pWrite->processedCount, 1); if (pWrite->code > 0) pWrite->code = 0; if (pWrite->code == 0 && pWrite->pHead.msgType != TSDB_MSG_TYPE_SUBMIT) forceFsync = true; diff --git a/src/inc/ttokendef.h b/src/inc/ttokendef.h index 7acfb569f31d0488b0643b2a34c1543ae44bf8c5..5f47d9896fa50042ac6b090f4ba53103bb620648 100644 --- a/src/inc/ttokendef.h +++ b/src/inc/ttokendef.h @@ -209,6 +209,7 @@ + #define TK_SPACE 300 #define TK_COMMENT 301 #define TK_ILLEGAL 302 diff --git a/src/kit/taosdemo/taosdemo.c b/src/kit/taosdemo/taosdemo.c index d76185ca43c233c9ac0d4b6e46dc34f74a267670..df1c7bee269a0e663e7a07ebb417f4a1d254859d 100644 --- a/src/kit/taosdemo/taosdemo.c +++ b/src/kit/taosdemo/taosdemo.c @@ -4455,7 +4455,7 @@ static int generateDataTail(char *tableName, int32_t tableSeq, break; } - buffer += sprintf(buffer, " %s", data); + buffer += snprintf(buffer, retLen + 1, "%s", data); k++; len += retLen; remainderBufLen -= retLen; diff --git a/src/query/inc/sql.y b/src/query/inc/sql.y index f76c534da1fc4eba9e1e0e69d113b143fd7a2774..f9a4f1b51d34b17fddeb07946361f328d4702a1d 100644 --- a/src/query/inc/sql.y +++ b/src/query/inc/sql.y @@ -675,6 +675,7 @@ 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) ::= BOOL(X). { A = tSqlExprCreateIdValue(&X, TK_BOOL);} +expr(A) ::= NULL(X). { A = tSqlExprCreateIdValue(&X, TK_NULL);} // ordinary functions: min(x), max(x), top(k, 20) expr(A) ::= ID(X) LP exprlist(Y) RP(E). { A = tSqlExprCreateFunction(Y, &X, &E, X.type); } diff --git a/src/query/src/qSqlParser.c b/src/query/src/qSqlParser.c index 25fa8465b1cd62590a6034fe94d4abb1fa9d108b..b75032967abde595bccea6d6577465b0870791c2 100644 --- a/src/query/src/qSqlParser.c +++ b/src/query/src/qSqlParser.c @@ -127,7 +127,12 @@ tSqlExpr *tSqlExprCreateIdValue(SStrToken *pToken, int32_t optrType) { pSqlExpr->token = *pToken; } - if (optrType == TK_INTEGER || optrType == TK_STRING || optrType == TK_FLOAT || optrType == TK_BOOL) { + if (optrType == TK_NULL) { + pToken->type = TSDB_DATA_TYPE_NULL; + tVariantCreate(&pSqlExpr->value, pToken); + pSqlExpr->tokenId = optrType; + pSqlExpr->type = SQL_NODE_VALUE; + } else if (optrType == TK_INTEGER || optrType == TK_STRING || optrType == TK_FLOAT || optrType == TK_BOOL) { toTSDBType(pToken->type); tVariantCreate(&pSqlExpr->value, pToken); @@ -427,7 +432,11 @@ void tSqlExprCompact(tSqlExpr** pExpr) { bool tSqlExprIsLeaf(tSqlExpr* pExpr) { return (pExpr->pRight == NULL && pExpr->pLeft == NULL) && - (pExpr->tokenId == 0 || pExpr->tokenId == TK_ID || (pExpr->tokenId >= TK_BOOL && pExpr->tokenId <= TK_NCHAR) || pExpr->tokenId == TK_SET); + (pExpr->tokenId == 0 || + (pExpr->tokenId == TK_ID) || + (pExpr->tokenId >= TK_BOOL && pExpr->tokenId <= TK_NCHAR) || + (pExpr->tokenId == TK_NULL) || + (pExpr->tokenId == TK_SET)); } bool tSqlExprIsParentOfLeaf(tSqlExpr* pExpr) { diff --git a/src/query/src/queryMain.c b/src/query/src/queryMain.c index 9d2fb70d9620f5f219b4b7206af18fe1ed9466dc..2ff0c9676e72074874c977899599c6666715c2ec 100644 --- a/src/query/src/queryMain.c +++ b/src/query/src/queryMain.c @@ -372,6 +372,7 @@ int32_t qKillQuery(qinfo_t qinfo) { return TSDB_CODE_QRY_INVALID_QHANDLE; } + qDebug("QInfo:%"PRIu64" query killed", pQInfo->qId); setQueryKilled(pQInfo); // Wait for the query executing thread being stopped/ diff --git a/src/query/src/sql.c b/src/query/src/sql.c index 0e1916bc8bba148f63e96831fd0aa9f854aa9170..3c22bd85cc31b8bb6f8f39585b41f0fed1300b16 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 266 -#define YYNRULE_WITH_ACTION 266 +#define YYNRULE 267 +#define YYNRULE_WITH_ACTION 267 #define YYNTOKEN 187 #define YY_MAX_SHIFT 314 -#define YY_MIN_SHIFTREDUCE 505 -#define YY_MAX_SHIFTREDUCE 770 -#define YY_ERROR_ACTION 771 -#define YY_ACCEPT_ACTION 772 -#define YY_NO_ACTION 773 -#define YY_MIN_REDUCE 774 -#define YY_MAX_REDUCE 1039 +#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 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -215,147 +215,148 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (679) +#define YY_ACTTAB_COUNT (681) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 133, 552, 202, 312, 206, 140, 941, 226, 140, 553, - /* 10 */ 772, 314, 17, 47, 48, 140, 51, 52, 30, 181, - /* 20 */ 214, 41, 181, 50, 262, 55, 53, 57, 54, 1020, - /* 30 */ 920, 209, 1021, 46, 45, 179, 181, 44, 43, 42, - /* 40 */ 47, 48, 918, 51, 52, 208, 1021, 214, 41, 552, - /* 50 */ 50, 262, 55, 53, 57, 54, 932, 553, 185, 203, - /* 60 */ 46, 45, 917, 247, 44, 43, 42, 48, 938, 51, - /* 70 */ 52, 242, 972, 214, 41, 79, 50, 262, 55, 53, - /* 80 */ 57, 54, 973, 631, 257, 30, 46, 45, 278, 225, - /* 90 */ 44, 43, 42, 506, 507, 508, 509, 510, 511, 512, - /* 100 */ 513, 514, 515, 516, 517, 518, 313, 552, 85, 231, - /* 110 */ 70, 288, 287, 47, 48, 553, 51, 52, 298, 219, - /* 120 */ 214, 41, 552, 50, 262, 55, 53, 57, 54, 916, - /* 130 */ 553, 105, 717, 46, 45, 1017, 298, 44, 43, 42, - /* 140 */ 47, 49, 908, 51, 52, 920, 140, 214, 41, 234, - /* 150 */ 50, 262, 55, 53, 57, 54, 1016, 238, 237, 227, + /* 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, + /* 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, /* 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, 880, 30, 868, 869, 870, 871, 872, 873, - /* 190 */ 874, 875, 876, 877, 878, 879, 881, 882, 51, 52, - /* 200 */ 18, 670, 214, 41, 906, 50, 262, 55, 53, 57, - /* 210 */ 54, 259, 221, 78, 30, 46, 45, 190, 30, 44, - /* 220 */ 43, 42, 12, 191, 217, 25, 84, 917, 81, 118, - /* 230 */ 117, 189, 74, 213, 730, 308, 1015, 721, 920, 724, - /* 240 */ 36, 727, 888, 213, 730, 886, 887, 721, 932, 724, - /* 250 */ 889, 727, 891, 892, 890, 218, 893, 894, 917, 281, - /* 260 */ 74, 920, 917, 204, 677, 210, 211, 69, 36, 261, - /* 270 */ 30, 23, 245, 307, 306, 210, 211, 719, 305, 674, - /* 280 */ 304, 303, 302, 278, 301, 300, 30, 44, 43, 42, - /* 290 */ 241, 198, 68, 30, 55, 53, 57, 54, 197, 905, - /* 300 */ 819, 223, 46, 45, 166, 914, 44, 43, 42, 103, - /* 310 */ 108, 282, 263, 720, 917, 97, 107, 113, 116, 106, - /* 320 */ 28, 655, 80, 268, 652, 110, 653, 286, 654, 67, - /* 330 */ 917, 630, 5, 156, 290, 71, 56, 917, 33, 155, - /* 340 */ 92, 87, 91, 1, 154, 82, 56, 220, 199, 729, - /* 350 */ 46, 45, 228, 229, 44, 43, 42, 1031, 828, 729, - /* 360 */ 174, 170, 166, 3, 167, 728, 172, 169, 121, 120, - /* 370 */ 119, 224, 698, 699, 280, 728, 903, 904, 29, 907, - /* 380 */ 311, 310, 126, 820, 667, 243, 683, 166, 689, 31, - /* 390 */ 135, 24, 60, 690, 750, 731, 212, 20, 19, 19, - /* 400 */ 723, 722, 726, 725, 61, 64, 641, 265, 733, 643, - /* 410 */ 31, 31, 267, 60, 642, 659, 83, 660, 60, 183, - /* 420 */ 96, 95, 14, 13, 184, 65, 62, 657, 186, 658, - /* 430 */ 656, 102, 101, 115, 114, 131, 129, 16, 15, 983, - /* 440 */ 6, 180, 187, 188, 194, 195, 193, 178, 192, 182, - /* 450 */ 919, 239, 982, 215, 979, 978, 216, 289, 132, 39, - /* 460 */ 965, 940, 948, 950, 134, 964, 933, 138, 246, 151, - /* 470 */ 915, 130, 682, 150, 248, 913, 152, 153, 205, 149, - /* 480 */ 254, 831, 270, 256, 37, 260, 930, 66, 143, 141, - /* 490 */ 176, 63, 250, 34, 255, 279, 827, 58, 1036, 142, - /* 500 */ 93, 1035, 1033, 157, 283, 1030, 258, 144, 99, 145, - /* 510 */ 1029, 1027, 158, 849, 35, 32, 38, 177, 816, 109, - /* 520 */ 814, 111, 112, 812, 811, 230, 252, 168, 809, 808, - /* 530 */ 807, 806, 805, 804, 171, 173, 801, 799, 797, 795, - /* 540 */ 793, 175, 249, 244, 72, 75, 40, 251, 299, 966, - /* 550 */ 104, 291, 292, 293, 294, 295, 296, 297, 200, 222, - /* 560 */ 269, 309, 770, 232, 233, 769, 201, 196, 88, 236, - /* 570 */ 89, 235, 768, 756, 755, 810, 240, 245, 264, 122, - /* 580 */ 8, 123, 161, 160, 850, 159, 162, 163, 165, 164, - /* 590 */ 803, 2, 124, 802, 794, 884, 125, 662, 4, 76, - /* 600 */ 73, 684, 136, 137, 148, 146, 147, 896, 687, 77, - /* 610 */ 207, 253, 9, 691, 139, 26, 10, 732, 27, 7, - /* 620 */ 11, 21, 734, 22, 86, 266, 594, 590, 84, 588, - /* 630 */ 587, 586, 583, 556, 277, 31, 94, 90, 98, 59, - /* 640 */ 633, 632, 629, 100, 578, 576, 568, 574, 570, 572, - /* 650 */ 566, 564, 597, 596, 595, 593, 592, 591, 589, 585, - /* 660 */ 584, 60, 554, 522, 520, 774, 773, 773, 773, 773, - /* 670 */ 773, 773, 773, 773, 773, 773, 773, 127, 128, + /* 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, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 190, 1, 189, 190, 209, 190, 190, 190, 190, 9, + /* 0 */ 190, 1, 189, 190, 209, 190, 190, 251, 196, 9, /* 10 */ 187, 188, 251, 13, 14, 190, 16, 17, 190, 251, /* 20 */ 20, 21, 251, 23, 24, 25, 26, 27, 28, 261, /* 30 */ 235, 260, 261, 33, 34, 251, 251, 37, 38, 39, - /* 40 */ 13, 14, 225, 16, 17, 260, 261, 20, 21, 1, + /* 40 */ 13, 14, 230, 16, 17, 260, 261, 20, 21, 1, /* 50 */ 23, 24, 25, 26, 27, 28, 233, 9, 251, 231, /* 60 */ 33, 34, 234, 253, 37, 38, 39, 14, 252, 16, - /* 70 */ 17, 248, 257, 20, 21, 257, 23, 24, 25, 26, - /* 80 */ 27, 28, 257, 5, 259, 190, 33, 34, 79, 67, + /* 70 */ 17, 248, 257, 20, 21, 1, 23, 24, 25, 26, + /* 80 */ 27, 28, 257, 9, 259, 79, 33, 34, 81, 67, /* 90 */ 37, 38, 39, 45, 46, 47, 48, 49, 50, 51, - /* 100 */ 52, 53, 54, 55, 56, 57, 58, 1, 196, 61, - /* 110 */ 110, 33, 34, 13, 14, 9, 16, 17, 81, 209, - /* 120 */ 20, 21, 1, 23, 24, 25, 26, 27, 28, 234, - /* 130 */ 9, 76, 105, 33, 34, 251, 81, 37, 38, 39, - /* 140 */ 13, 14, 230, 16, 17, 235, 190, 20, 21, 135, - /* 150 */ 23, 24, 25, 26, 27, 28, 251, 143, 144, 137, + /* 100 */ 52, 53, 54, 55, 56, 57, 58, 5, 251, 61, + /* 110 */ 110, 1, 190, 13, 14, 251, 16, 17, 195, 9, + /* 120 */ 20, 21, 199, 23, 24, 25, 26, 27, 28, 37, + /* 130 */ 38, 39, 105, 33, 34, 33, 34, 37, 38, 39, + /* 140 */ 13, 14, 195, 16, 17, 251, 199, 20, 21, 135, + /* 150 */ 23, 24, 25, 26, 27, 28, 234, 143, 144, 137, /* 160 */ 33, 34, 140, 141, 37, 38, 39, 88, 89, 90, /* 170 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, /* 180 */ 101, 102, 208, 190, 210, 211, 212, 213, 214, 215, /* 190 */ 216, 217, 218, 219, 220, 221, 222, 223, 16, 17, - /* 200 */ 44, 37, 20, 21, 0, 23, 24, 25, 26, 27, - /* 210 */ 28, 255, 209, 257, 190, 33, 34, 61, 190, 37, - /* 220 */ 38, 39, 104, 67, 231, 104, 108, 234, 110, 73, - /* 230 */ 74, 75, 104, 1, 2, 209, 251, 5, 235, 7, - /* 240 */ 112, 9, 208, 1, 2, 211, 212, 5, 233, 7, - /* 250 */ 216, 9, 218, 219, 220, 231, 222, 223, 234, 231, - /* 260 */ 104, 235, 234, 248, 105, 33, 34, 196, 112, 37, - /* 270 */ 190, 88, 113, 90, 91, 33, 34, 1, 95, 115, - /* 280 */ 97, 98, 99, 79, 101, 102, 190, 37, 38, 39, - /* 290 */ 134, 251, 136, 190, 25, 26, 27, 28, 142, 228, - /* 300 */ 195, 67, 33, 34, 199, 190, 37, 38, 39, 62, - /* 310 */ 63, 231, 15, 37, 234, 68, 69, 70, 71, 72, - /* 320 */ 104, 2, 236, 107, 5, 78, 7, 231, 9, 104, - /* 330 */ 234, 106, 62, 63, 231, 249, 104, 234, 68, 69, - /* 340 */ 70, 71, 72, 197, 198, 196, 104, 232, 251, 117, - /* 350 */ 33, 34, 33, 34, 37, 38, 39, 235, 195, 117, - /* 360 */ 62, 63, 199, 193, 194, 133, 68, 69, 70, 71, - /* 370 */ 72, 137, 124, 125, 140, 133, 227, 228, 229, 230, - /* 380 */ 64, 65, 66, 195, 109, 105, 105, 199, 105, 109, - /* 390 */ 109, 116, 109, 105, 105, 105, 60, 109, 109, 109, - /* 400 */ 5, 5, 7, 7, 109, 109, 105, 105, 111, 105, - /* 410 */ 109, 109, 105, 109, 105, 5, 109, 7, 109, 251, - /* 420 */ 138, 139, 138, 139, 251, 129, 131, 5, 251, 7, - /* 430 */ 111, 138, 139, 76, 77, 62, 63, 138, 139, 226, - /* 440 */ 104, 251, 251, 251, 251, 251, 251, 251, 251, 251, - /* 450 */ 235, 190, 226, 226, 226, 226, 226, 226, 190, 250, - /* 460 */ 258, 190, 190, 190, 190, 258, 233, 190, 233, 190, - /* 470 */ 233, 60, 117, 237, 254, 190, 190, 190, 254, 238, - /* 480 */ 120, 190, 190, 121, 190, 122, 247, 128, 244, 246, - /* 490 */ 190, 130, 254, 190, 254, 190, 190, 127, 190, 245, - /* 500 */ 190, 190, 190, 190, 190, 190, 126, 243, 190, 242, - /* 510 */ 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - /* 520 */ 190, 190, 190, 190, 190, 190, 119, 190, 190, 190, + /* 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, + /* 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, /* 530 */ 190, 190, 190, 190, 190, 190, 190, 190, 190, 190, - /* 540 */ 190, 190, 118, 191, 191, 191, 132, 191, 103, 191, - /* 550 */ 87, 86, 50, 83, 85, 54, 84, 82, 191, 191, - /* 560 */ 191, 79, 5, 145, 5, 5, 191, 191, 196, 5, - /* 570 */ 196, 145, 5, 90, 89, 191, 135, 113, 107, 192, - /* 580 */ 104, 192, 201, 205, 207, 206, 204, 202, 200, 203, - /* 590 */ 191, 197, 192, 191, 191, 224, 192, 105, 193, 109, - /* 600 */ 114, 105, 104, 109, 239, 241, 240, 224, 105, 104, - /* 610 */ 1, 104, 123, 105, 104, 109, 123, 105, 109, 104, - /* 620 */ 104, 104, 111, 104, 76, 107, 9, 5, 108, 5, - /* 630 */ 5, 5, 5, 80, 15, 109, 139, 76, 139, 16, - /* 640 */ 5, 5, 105, 139, 5, 5, 5, 5, 5, 5, + /* 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, 109, 80, 60, 59, 0, 262, 262, 262, 262, - /* 670 */ 262, 262, 262, 262, 262, 262, 262, 21, 21, 262, - /* 680 */ 262, 262, 262, 262, 262, 262, 262, 262, 262, 262, + /* 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, /* 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,101 +374,101 @@ static const YYCODETYPE yy_lookahead[] = { /* 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, + /* 860 */ 262, 262, 262, 262, 262, 262, 262, 262, }; #define YY_SHIFT_COUNT (314) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (665) +#define YY_SHIFT_MAX (667) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 156, 79, 79, 183, 183, 9, 232, 242, 106, 106, - /* 10 */ 106, 106, 106, 106, 106, 106, 106, 0, 48, 242, - /* 20 */ 319, 319, 319, 319, 121, 128, 106, 106, 106, 204, - /* 30 */ 106, 106, 55, 9, 37, 37, 679, 679, 679, 242, - /* 40 */ 242, 242, 242, 242, 242, 242, 242, 242, 242, 242, - /* 50 */ 242, 242, 242, 242, 242, 242, 242, 242, 242, 319, - /* 60 */ 319, 78, 78, 78, 78, 78, 78, 78, 106, 106, - /* 70 */ 106, 164, 106, 128, 128, 106, 106, 106, 248, 248, - /* 80 */ 275, 128, 106, 106, 106, 106, 106, 106, 106, 106, - /* 90 */ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, - /* 100 */ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, - /* 110 */ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, - /* 120 */ 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, - /* 130 */ 106, 106, 411, 411, 411, 355, 355, 355, 411, 355, - /* 140 */ 411, 359, 361, 370, 363, 380, 362, 360, 407, 424, - /* 150 */ 414, 411, 411, 411, 445, 9, 9, 411, 411, 463, - /* 160 */ 465, 502, 470, 469, 501, 472, 475, 445, 411, 482, - /* 170 */ 482, 411, 482, 411, 482, 411, 679, 679, 27, 100, - /* 180 */ 127, 100, 100, 53, 182, 269, 269, 269, 269, 247, - /* 190 */ 270, 298, 317, 317, 317, 317, 22, 14, 250, 250, - /* 200 */ 118, 234, 316, 280, 159, 281, 283, 288, 289, 290, - /* 210 */ 395, 396, 276, 336, 297, 295, 296, 301, 302, 304, - /* 220 */ 307, 309, 216, 282, 284, 293, 225, 299, 410, 422, - /* 230 */ 357, 373, 557, 418, 559, 560, 426, 564, 567, 483, - /* 240 */ 485, 441, 464, 471, 476, 486, 492, 490, 496, 498, - /* 250 */ 503, 494, 505, 609, 507, 508, 510, 506, 489, 509, - /* 260 */ 493, 512, 515, 511, 516, 471, 517, 518, 519, 520, - /* 270 */ 548, 617, 622, 624, 625, 626, 627, 553, 619, 561, - /* 280 */ 497, 526, 526, 623, 499, 504, 526, 635, 636, 537, - /* 290 */ 526, 639, 640, 641, 642, 643, 644, 645, 646, 647, - /* 300 */ 648, 649, 650, 651, 652, 653, 654, 655, 552, 582, - /* 310 */ 656, 657, 603, 605, 665, + /* 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, + /* 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, + /* 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, + /* 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, }; #define YY_REDUCE_COUNT (177) -#define YY_REDUCE_MIN (-239) -#define YY_REDUCE_MAX (405) +#define YY_REDUCE_MIN (-244) +#define YY_REDUCE_MAX (414) static const short yy_reduce_ofst[] = { - /* 0 */ -177, -26, -26, 34, 34, 149, -229, -215, -172, -175, - /* 10 */ -44, -7, 24, 28, 80, 96, 103, -184, -187, -232, - /* 20 */ -205, -90, 3, 26, -190, 15, -185, -182, 115, -88, - /* 30 */ -183, -105, 105, 71, 163, 188, 86, 146, 170, -239, - /* 40 */ -216, -193, -116, -95, -15, 40, 97, 168, 173, 177, - /* 50 */ 190, 191, 192, 193, 194, 195, 196, 197, 198, 122, - /* 60 */ 215, 213, 226, 227, 228, 229, 230, 231, 261, 268, - /* 70 */ 271, 209, 272, 233, 235, 273, 274, 277, 202, 207, - /* 80 */ 236, 237, 279, 285, 286, 287, 291, 292, 294, 300, - /* 90 */ 303, 305, 306, 308, 310, 311, 312, 313, 314, 315, - /* 100 */ 318, 320, 321, 322, 323, 324, 325, 326, 327, 328, - /* 110 */ 329, 330, 331, 332, 333, 334, 335, 337, 338, 339, - /* 120 */ 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, - /* 130 */ 350, 351, 352, 353, 354, 220, 224, 238, 356, 240, - /* 140 */ 358, 239, 243, 254, 244, 264, 267, 364, 366, 365, - /* 150 */ 241, 367, 368, 369, 371, 372, 374, 375, 376, 377, - /* 160 */ 379, 378, 381, 382, 385, 386, 388, 383, 384, 387, - /* 170 */ 389, 399, 400, 402, 404, 403, 394, 405, + /* 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, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 771, 883, 829, 895, 817, 826, 1023, 1023, 771, 771, - /* 10 */ 771, 771, 771, 771, 771, 771, 771, 942, 790, 1023, - /* 20 */ 771, 771, 771, 771, 771, 771, 771, 771, 771, 826, - /* 30 */ 771, 771, 832, 826, 832, 832, 937, 867, 885, 771, - /* 40 */ 771, 771, 771, 771, 771, 771, 771, 771, 771, 771, - /* 50 */ 771, 771, 771, 771, 771, 771, 771, 771, 771, 771, - /* 60 */ 771, 771, 771, 771, 771, 771, 771, 771, 771, 771, - /* 70 */ 771, 944, 947, 771, 771, 949, 771, 771, 969, 969, - /* 80 */ 935, 771, 771, 771, 771, 771, 771, 771, 771, 771, - /* 90 */ 771, 771, 771, 771, 771, 771, 771, 771, 771, 771, - /* 100 */ 771, 771, 771, 771, 771, 771, 771, 771, 771, 815, - /* 110 */ 771, 813, 771, 771, 771, 771, 771, 771, 771, 771, - /* 120 */ 771, 771, 771, 771, 771, 771, 800, 771, 771, 771, - /* 130 */ 771, 771, 792, 792, 792, 771, 771, 771, 792, 771, - /* 140 */ 792, 976, 980, 974, 962, 970, 961, 957, 955, 954, - /* 150 */ 984, 792, 792, 792, 830, 826, 826, 792, 792, 848, - /* 160 */ 846, 844, 836, 842, 838, 840, 834, 818, 792, 824, - /* 170 */ 824, 792, 824, 792, 824, 792, 867, 885, 771, 985, - /* 180 */ 771, 1022, 975, 1012, 1011, 1018, 1010, 1009, 1008, 771, - /* 190 */ 771, 771, 1004, 1005, 1007, 1006, 771, 771, 1014, 1013, - /* 200 */ 771, 771, 771, 771, 771, 771, 771, 771, 771, 771, - /* 210 */ 771, 771, 771, 987, 771, 981, 977, 771, 771, 771, - /* 220 */ 771, 771, 771, 771, 771, 771, 897, 771, 771, 771, - /* 230 */ 771, 771, 771, 771, 771, 771, 771, 771, 771, 771, - /* 240 */ 771, 771, 934, 771, 771, 771, 771, 945, 771, 771, - /* 250 */ 771, 771, 771, 771, 771, 771, 771, 971, 771, 963, - /* 260 */ 771, 771, 771, 771, 771, 909, 771, 771, 771, 771, - /* 270 */ 771, 771, 771, 771, 771, 771, 771, 771, 771, 771, - /* 280 */ 771, 1034, 1032, 771, 771, 771, 1028, 771, 771, 771, - /* 290 */ 1026, 771, 771, 771, 771, 771, 771, 771, 771, 771, - /* 300 */ 771, 771, 771, 771, 771, 771, 771, 771, 851, 771, - /* 310 */ 798, 796, 771, 788, 771, + /* 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, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1256,46 +1257,47 @@ static const char *const yyRuleName[] = { /* 223 */ "expr ::= NOW", /* 224 */ "expr ::= VARIABLE", /* 225 */ "expr ::= BOOL", - /* 226 */ "expr ::= ID LP exprlist RP", - /* 227 */ "expr ::= ID LP STAR RP", - /* 228 */ "expr ::= expr IS NULL", - /* 229 */ "expr ::= expr IS NOT NULL", - /* 230 */ "expr ::= expr LT expr", - /* 231 */ "expr ::= expr GT expr", - /* 232 */ "expr ::= expr LE expr", - /* 233 */ "expr ::= expr GE expr", - /* 234 */ "expr ::= expr NE expr", - /* 235 */ "expr ::= expr EQ expr", - /* 236 */ "expr ::= expr BETWEEN expr AND expr", - /* 237 */ "expr ::= expr AND expr", - /* 238 */ "expr ::= expr OR expr", - /* 239 */ "expr ::= expr PLUS expr", - /* 240 */ "expr ::= expr MINUS expr", - /* 241 */ "expr ::= expr STAR expr", - /* 242 */ "expr ::= expr SLASH expr", - /* 243 */ "expr ::= expr REM expr", - /* 244 */ "expr ::= expr LIKE expr", - /* 245 */ "expr ::= expr IN LP exprlist RP", - /* 246 */ "exprlist ::= exprlist COMMA expritem", - /* 247 */ "exprlist ::= expritem", - /* 248 */ "expritem ::= expr", - /* 249 */ "expritem ::=", - /* 250 */ "cmd ::= RESET QUERY CACHE", - /* 251 */ "cmd ::= SYNCDB ids REPLICA", - /* 252 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", - /* 253 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", - /* 254 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", - /* 255 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", - /* 256 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", - /* 257 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", - /* 258 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", - /* 259 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", - /* 260 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", - /* 261 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", - /* 262 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", - /* 263 */ "cmd ::= KILL CONNECTION INTEGER", - /* 264 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", - /* 265 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", + /* 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", }; #endif /* NDEBUG */ @@ -1981,46 +1983,47 @@ static const YYCODETYPE yyRuleInfoLhs[] = { 251, /* (223) expr ::= NOW */ 251, /* (224) expr ::= VARIABLE */ 251, /* (225) expr ::= BOOL */ - 251, /* (226) expr ::= ID LP exprlist RP */ - 251, /* (227) expr ::= ID LP STAR RP */ - 251, /* (228) expr ::= expr IS NULL */ - 251, /* (229) expr ::= expr IS NOT NULL */ - 251, /* (230) expr ::= expr LT expr */ - 251, /* (231) expr ::= expr GT expr */ - 251, /* (232) expr ::= expr LE expr */ - 251, /* (233) expr ::= expr GE expr */ - 251, /* (234) expr ::= expr NE expr */ - 251, /* (235) expr ::= expr EQ expr */ - 251, /* (236) expr ::= expr BETWEEN expr AND expr */ - 251, /* (237) expr ::= expr AND expr */ - 251, /* (238) expr ::= expr OR expr */ - 251, /* (239) expr ::= expr PLUS expr */ - 251, /* (240) expr ::= expr MINUS expr */ - 251, /* (241) expr ::= expr STAR expr */ - 251, /* (242) expr ::= expr SLASH expr */ - 251, /* (243) expr ::= expr REM expr */ - 251, /* (244) expr ::= expr LIKE expr */ - 251, /* (245) expr ::= expr IN LP exprlist RP */ - 260, /* (246) exprlist ::= exprlist COMMA expritem */ - 260, /* (247) exprlist ::= expritem */ - 261, /* (248) expritem ::= expr */ - 261, /* (249) expritem ::= */ - 188, /* (250) cmd ::= RESET QUERY CACHE */ - 188, /* (251) cmd ::= SYNCDB ids REPLICA */ - 188, /* (252) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - 188, /* (253) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - 188, /* (254) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - 188, /* (255) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - 188, /* (256) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - 188, /* (257) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - 188, /* (258) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - 188, /* (259) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - 188, /* (260) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - 188, /* (261) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - 188, /* (262) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - 188, /* (263) cmd ::= KILL CONNECTION INTEGER */ - 188, /* (264) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - 188, /* (265) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + 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 */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -2252,46 +2255,47 @@ static const signed char yyRuleInfoNRhs[] = { -1, /* (223) expr ::= NOW */ -1, /* (224) expr ::= VARIABLE */ -1, /* (225) expr ::= BOOL */ - -4, /* (226) expr ::= ID LP exprlist RP */ - -4, /* (227) expr ::= ID LP STAR RP */ - -3, /* (228) expr ::= expr IS NULL */ - -4, /* (229) expr ::= expr IS NOT NULL */ - -3, /* (230) expr ::= expr LT expr */ - -3, /* (231) expr ::= expr GT expr */ - -3, /* (232) expr ::= expr LE expr */ - -3, /* (233) expr ::= expr GE expr */ - -3, /* (234) expr ::= expr NE expr */ - -3, /* (235) expr ::= expr EQ expr */ - -5, /* (236) expr ::= expr BETWEEN expr AND expr */ - -3, /* (237) expr ::= expr AND expr */ - -3, /* (238) expr ::= expr OR expr */ - -3, /* (239) expr ::= expr PLUS expr */ - -3, /* (240) expr ::= expr MINUS expr */ - -3, /* (241) expr ::= expr STAR expr */ - -3, /* (242) expr ::= expr SLASH expr */ - -3, /* (243) expr ::= expr REM expr */ - -3, /* (244) expr ::= expr LIKE expr */ - -5, /* (245) expr ::= expr IN LP exprlist RP */ - -3, /* (246) exprlist ::= exprlist COMMA expritem */ - -1, /* (247) exprlist ::= expritem */ - -1, /* (248) expritem ::= expr */ - 0, /* (249) expritem ::= */ - -3, /* (250) cmd ::= RESET QUERY CACHE */ - -3, /* (251) cmd ::= SYNCDB ids REPLICA */ - -7, /* (252) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - -7, /* (253) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - -7, /* (254) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - -7, /* (255) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - -8, /* (256) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - -9, /* (257) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - -7, /* (258) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - -7, /* (259) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - -7, /* (260) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - -7, /* (261) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - -8, /* (262) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - -3, /* (263) cmd ::= KILL CONNECTION INTEGER */ - -5, /* (264) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - -5, /* (265) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + -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 */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -3086,7 +3090,7 @@ static YYACTIONTYPE yy_reduce( break; case 200: /* having_opt ::= */ case 210: /* where_opt ::= */ yytestcase(yyruleno==210); - case 249: /* expritem ::= */ yytestcase(yyruleno==249); + case 250: /* expritem ::= */ yytestcase(yyruleno==250); {yymsp[1].minor.yy170 = 0;} break; case 201: /* having_opt ::= HAVING expr */ @@ -3163,112 +3167,116 @@ static YYACTIONTYPE yy_reduce( { yylhsminor.yy170 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);} yymsp[0].minor.yy170 = yylhsminor.yy170; break; - case 226: /* expr ::= ID LP exprlist RP */ + case 226: /* 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 */ { 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 227: /* expr ::= ID LP STAR RP */ + case 228: /* 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 228: /* expr ::= expr IS NULL */ + case 229: /* expr ::= expr IS NULL */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-2].minor.yy170, NULL, TK_ISNULL);} yymsp[-2].minor.yy170 = yylhsminor.yy170; break; - case 229: /* expr ::= expr IS NOT NULL */ + case 230: /* expr ::= expr IS NOT NULL */ {yylhsminor.yy170 = tSqlExprCreate(yymsp[-3].minor.yy170, NULL, TK_NOTNULL);} yymsp[-3].minor.yy170 = yylhsminor.yy170; break; - case 230: /* expr ::= expr LT expr */ + case 231: /* 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 231: /* expr ::= expr GT expr */ + case 232: /* 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 232: /* expr ::= expr LE expr */ + case 233: /* 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 233: /* expr ::= expr GE expr */ + case 234: /* 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 234: /* expr ::= expr NE expr */ + case 235: /* 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 235: /* expr ::= expr EQ expr */ + case 236: /* 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 236: /* expr ::= expr BETWEEN expr AND expr */ + case 237: /* 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 237: /* expr ::= expr AND expr */ + case 238: /* 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 238: /* expr ::= expr OR expr */ + case 239: /* 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 239: /* expr ::= expr PLUS expr */ + case 240: /* 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 240: /* expr ::= expr MINUS expr */ + case 241: /* 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 241: /* expr ::= expr STAR expr */ + case 242: /* 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 242: /* expr ::= expr SLASH expr */ + case 243: /* 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 243: /* expr ::= expr REM expr */ + case 244: /* 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 244: /* expr ::= expr LIKE expr */ + case 245: /* 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 245: /* expr ::= expr IN LP exprlist RP */ + case 246: /* 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 246: /* exprlist ::= exprlist COMMA expritem */ + case 247: /* 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 247: /* exprlist ::= expritem */ + case 248: /* exprlist ::= expritem */ {yylhsminor.yy429 = tSqlExprListAppend(0,yymsp[0].minor.yy170,0, 0);} yymsp[0].minor.yy429 = yylhsminor.yy429; break; - case 248: /* expritem ::= expr */ + case 249: /* expritem ::= expr */ {yylhsminor.yy170 = yymsp[0].minor.yy170;} yymsp[0].minor.yy170 = yylhsminor.yy170; break; - case 250: /* cmd ::= RESET QUERY CACHE */ + case 251: /* cmd ::= RESET QUERY CACHE */ { setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);} break; - case 251: /* cmd ::= SYNCDB ids REPLICA */ + case 252: /* cmd ::= SYNCDB ids REPLICA */ { setDCLSqlElems(pInfo, TSDB_SQL_SYNC_DB_REPLICA, 1, &yymsp[-1].minor.yy0);} break; - case 252: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + case 253: /* 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 253: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + case 254: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3279,14 +3287,14 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 254: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + case 255: /* 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 255: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + case 256: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3297,7 +3305,7 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 256: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + case 257: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3311,7 +3319,7 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 257: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + case 258: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; @@ -3323,14 +3331,14 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 258: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + case 259: /* 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 259: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + case 260: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3341,14 +3349,14 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 260: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + case 261: /* 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 261: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + case 262: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3359,7 +3367,7 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 262: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + case 263: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3373,13 +3381,13 @@ static YYACTIONTYPE yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 263: /* cmd ::= KILL CONNECTION INTEGER */ + case 264: /* cmd ::= KILL CONNECTION INTEGER */ {setKillSql(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);} break; - case 264: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ + case 265: /* 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 265: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ + case 266: /* 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/src/vnode/src/vnodeRead.c b/src/vnode/src/vnodeRead.c index 8233c45632b1b08c6dfe24a1a692f21379dc5036..0836ade77ff6617ee032e7266c99ff73088f221b 100644 --- a/src/vnode/src/vnodeRead.c +++ b/src/vnode/src/vnodeRead.c @@ -364,7 +364,7 @@ static int32_t vnodeProcessFetchMsg(SVnodeObj *pVnode, SVReadMsg *pRead) { // register the qhandle to connect to quit query immediate if connection is broken if (vnodeNotifyCurrentQhandle(pRead->rpcHandle, pRetrieve->qId, *handle, pVnode->vgId) != TSDB_CODE_SUCCESS) { - vError("vgId:%d, QInfo:%"PRIu64 "-%p, retrieve discarded since link is broken, %p", pVnode->vgId, pRetrieve->qhandle, *handle, pRead->rpcHandle); + vError("vgId:%d, QInfo:%"PRIu64 "-%p, retrieve discarded since link is broken, conn:%p", pVnode->vgId, pRetrieve->qhandle, *handle, pRead->rpcHandle); code = TSDB_CODE_RPC_NETWORK_UNAVAIL; qKillQuery(*handle); qReleaseQInfo(pVnode->qMgmt, (void **)&handle, true); @@ -409,7 +409,7 @@ static int32_t vnodeProcessFetchMsg(SVnodeObj *pVnode, SVReadMsg *pRead) { // client is broken, the query needs to be killed immediately. int32_t vnodeNotifyCurrentQhandle(void *handle, uint64_t qId, void *qhandle, int32_t vgId) { SRetrieveTableMsg *pMsg = rpcMallocCont(sizeof(SRetrieveTableMsg)); - pMsg->qhandle = htobe64((uint64_t)qhandle); + pMsg->qId = htobe64(qId); pMsg->header.vgId = htonl(vgId); pMsg->header.contLen = htonl(sizeof(SRetrieveTableMsg)); diff --git a/src/vnode/src/vnodeWrite.c b/src/vnode/src/vnodeWrite.c index e318978a11186a86dff79a5aaea234b9719ce979..92e1ba804be5ab30366594933ebcdaff3bd0727b 100644 --- a/src/vnode/src/vnodeWrite.c +++ b/src/vnode/src/vnodeWrite.c @@ -96,6 +96,7 @@ int32_t vnodeProcessWrite(void *vparam, void *wparam, int32_t qtype, void *rpara // write into WAL code = walWrite(pVnode->wal, pHead); if (code < 0) { + if (syncCode > 0) atomic_sub_fetch_32(&pWrite->processedCount, 1); vError("vgId:%d, hver:%" PRIu64 " vver:%" PRIu64 " code:0x%x", pVnode->vgId, pHead->version, pVnode->version, code); return code; } @@ -104,7 +105,10 @@ int32_t vnodeProcessWrite(void *vparam, void *wparam, int32_t qtype, void *rpara // write data locally code = (*vnodeProcessWriteMsgFp[pHead->msgType])(pVnode, pHead->cont, pRspRet); - if (code < 0) return code; + if (code < 0) { + if (syncCode > 0) atomic_sub_fetch_32(&pWrite->processedCount, 1); + return code; + } return syncCode; } diff --git a/tests/script/general/parser/topbot.sim b/tests/script/general/parser/topbot.sim index e23bbf6724ea7b95a759764ac80cc2dbcdb73398..5c61acb2ba246f1f0102ed01b90e0b164ebfa8dc 100644 --- a/tests/script/general/parser/topbot.sim +++ b/tests/script/general/parser/topbot.sim @@ -325,4 +325,56 @@ if $row != 0 then return -1 endi +print ===============================>td-3621 +sql create table ttm2(ts timestamp, k bool); +sql insert into ttm2 values('2021-1-1 1:1:1', true) +sql insert into ttm2 values('2021-1-1 1:1:2', NULL) +sql insert into ttm2 values('2021-1-1 1:1:3', false) +sql select * from ttm2 where k is not null +if $row != 2 then + return -1 +endi + +if $data00 != @21-01-01 01:01:01.000@ then + print expect 21-01-01 01:01:01.000, actual $data00 + return -1 +endi + +sql select * from ttm2 where k is null +if $row != 1 then + return -1 +endi + +if $data00 != @21-01-01 01:01:02.000@ then + return -1 +endi + +sql select * from ttm2 where k=true +if $row != 1 then + return -1 +endi + +if $data00 != @21-01-01 01:01:01.000@ then + return -1 +endi + +sql select * from ttm2 where k=false +if $row != 1 then + return -1 +endi + +if $data00 != @21-01-01 01:01:03.000@ then + return -1 +endi + +sql select * from ttm2 where k<>false +if $row != 1 then + return -1 +endi + +sql_error select * from ttm2 where k=null +sql_error select * from ttm2 where k<>null +sql_error select * from ttm2 where k like null +sql_error select * from ttm2 where k