From ebc8c4d857932cdff68f461dd20b5fbff146fa0b Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 4 Jun 2020 11:07:15 +0000 Subject: [PATCH] [TD-464] support kill connection --- src/client/src/tscSQLParser.c | 43 +++-- src/inc/ttokendef.h | 4 +- src/mnode/inc/mnodeProfile.h | 15 +- src/mnode/src/mnodeProfile.c | 59 +++--- src/mnode/src/mnodeShow.c | 37 ++-- src/query/src/sql.c | 343 +++++++++++++++++----------------- tests/script/sh/deploy.sh | 2 +- 7 files changed, 271 insertions(+), 232 deletions(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 7b078210bf..858245e376 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -93,7 +93,7 @@ static int32_t validateArithmeticSQLExpr(tSQLExpr* pExpr, SQueryInfo* pQueryInfo static int32_t validateDNodeConfig(tDCLSQL* pOptions); static int32_t validateLocalConfig(tDCLSQL* pOptions); static int32_t validateColumnName(char* name); -static int32_t setKillInfo(SSqlObj* pSql, struct SSqlInfo* pInfo); +static int32_t setKillInfo(SSqlObj* pSql, struct SSqlInfo* pInfo, int32_t killType); static bool validateOneTags(SSqlCmd* pCmd, TAOS_FIELD* pTagField); static bool hasTimestampForPointInterpQuery(SQueryInfo* pQueryInfo); @@ -532,7 +532,7 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) { case TSDB_SQL_KILL_QUERY: case TSDB_SQL_KILL_STREAM: case TSDB_SQL_KILL_CONNECTION: { - if ((code = setKillInfo(pSql, pInfo)) != TSDB_CODE_SUCCESS) { + if ((code = setKillInfo(pSql, pInfo, pInfo->type)) != TSDB_CODE_SUCCESS) { return code; } @@ -2231,31 +2231,46 @@ int32_t setShowInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { return TSDB_CODE_SUCCESS; } -int32_t setKillInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { - const char* msg1 = "invalid ip address"; - const char* msg2 = "invalid port"; +int32_t setKillInfo(SSqlObj* pSql, struct SSqlInfo* pInfo, int32_t killType) { + const char* msg1 = "invalid connection ID"; + const char* msg2 = "invalid query ID"; + const char* msg3 = "invalid stream ID"; SSqlCmd* pCmd = &pSql->cmd; pCmd->command = pInfo->type; - SSQLToken* ip = &(pInfo->pDCLInfo->ip); - if (ip->n > TSDB_KILL_MSG_LEN) { + SSQLToken* idStr = &(pInfo->pDCLInfo->ip); + if (idStr->n > TSDB_KILL_MSG_LEN) { return TSDB_CODE_INVALID_SQL; } - strncpy(pCmd->payload, ip->z, ip->n); - + strncpy(pCmd->payload, idStr->z, idStr->n); const char delim = ':'; + char* connIdStr = strtok(idStr->z, &delim); + char* queryIdStr = strtok(NULL, &delim); - char* ipStr = strtok(ip->z, &delim); - char* portStr = strtok(NULL, &delim); + int32_t connId = (int32_t)strtol(connIdStr, NULL, 10); + if (connId <= 0) { + memset(pCmd->payload, 0, strlen(pCmd->payload)); + return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg1); + } - uint16_t port = (uint16_t)strtol(portStr, NULL, 10); - if (port <= 0 || port > 65535) { + if (killType == TSDB_SQL_KILL_CONNECTION) { + strncpy(pCmd->payload, idStr->z, idStr->n); + return TSDB_CODE_SUCCESS; + } + + int32_t queryId = (int32_t)strtol(queryIdStr, NULL, 10); + if (queryId <= 0) { memset(pCmd->payload, 0, strlen(pCmd->payload)); - return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg2); + if (killType == TSDB_SQL_KILL_QUERY) { + return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg2); + } else { + return invalidSqlErrMsg(tscGetErrorMsgPayload(pCmd), msg3); + } } + strncpy(pCmd->payload, idStr->z, idStr->n); return TSDB_CODE_SUCCESS; } diff --git a/src/inc/ttokendef.h b/src/inc/ttokendef.h index effaafc4e7..d388bc9dbe 100644 --- a/src/inc/ttokendef.h +++ b/src/inc/ttokendef.h @@ -148,8 +148,8 @@ #define TK_SET 130 #define TK_KILL 131 #define TK_CONNECTION 132 -#define TK_COLON 133 -#define TK_STREAM 134 +#define TK_STREAM 133 +#define TK_COLON 134 #define TK_ABORT 135 #define TK_AFTER 136 #define TK_ATTACH 137 diff --git a/src/mnode/inc/mnodeProfile.h b/src/mnode/inc/mnodeProfile.h index 29a808a189..a8fe210015 100644 --- a/src/mnode/inc/mnodeProfile.h +++ b/src/mnode/inc/mnodeProfile.h @@ -21,11 +21,22 @@ extern "C" { #endif #include "mnodeDef.h" +typedef struct { + char user[TSDB_USER_LEN + 1]; + int8_t killed; + uint16_t port; + uint32_t ip; + uint32_t connId; + uint64_t stime; + uint64_t lastAccess; +} SConnObj; + int32_t mnodeInitProfile(); void mnodeCleanupProfile(); -uint32_t mnodeCreateConn(char *user, uint32_t ip, uint16_t port); -bool mnodeCheckConn(uint32_t connId, char *user, uint32_t ip, uint16_t port); +SConnObj *mnodeCreateConn(char *user, uint32_t ip, uint16_t port); +SConnObj *mnodeAccquireConn(uint32_t connId, char *user, uint32_t ip, uint16_t port); +void mnodeReleaseConn(SConnObj *pConn); #ifdef __cplusplus } diff --git a/src/mnode/src/mnodeProfile.c b/src/mnode/src/mnodeProfile.c index 4623c87f66..de041d862d 100644 --- a/src/mnode/src/mnodeProfile.c +++ b/src/mnode/src/mnodeProfile.c @@ -39,15 +39,6 @@ #define CONN_KEEP_TIME (tsShellActivityTimer * 3) #define CONN_CHECK_TIME (tsShellActivityTimer * 2) -typedef struct { - char user[TSDB_USER_LEN + 1]; - int8_t killed; - uint16_t port; - uint32_t ip; - uint32_t connId; - uint64_t stime; -} SConnObj; - extern void *tsMnodeTmr; static SCacheObj *tsMnodeConnCache = NULL; static uint32_t tsConnIndex = 0; @@ -91,13 +82,13 @@ void mnodeCleanupProfile() { } } -uint32_t mnodeCreateConn(char *user, uint32_t ip, uint16_t port) { +SConnObj *mnodeCreateConn(char *user, uint32_t ip, uint16_t port) { int32_t connSize = taosHashGetSize(tsMnodeConnCache->pHashTable); if (connSize > tsMaxShellConns) { mError("failed to create conn for user:%s ip:%s:%u, conns:%d larger than maxShellConns:%d, ", user, taosIpStr(ip), port, connSize, tsMaxShellConns); terrno = TSDB_CODE_TOO_MANY_SHELL_CONNS; - return 0; + return NULL; } uint32_t connId = atomic_add_fetch_32(&tsConnIndex, 1); @@ -109,18 +100,22 @@ uint32_t mnodeCreateConn(char *user, uint32_t ip, uint16_t port) { .connId = connId, .stime = taosGetTimestampMs() }; - - char key[10]; - sprintf(key, "%u", connId); strcpy(connObj.user, user); - void *pConn = taosCachePut(tsMnodeConnCache, key, &connObj, sizeof(connObj), CONN_KEEP_TIME); - taosCacheRelease(tsMnodeConnCache, &pConn, false); - + + char key[10]; + sprintf(key, "%u", connId); + SConnObj *pConn = taosCachePut(tsMnodeConnCache, key, &connObj, sizeof(connObj), CONN_KEEP_TIME); + mTrace("connId:%d, is created, user:%s ip:%s:%u", connId, user, taosIpStr(ip), port); - return connId; + return pConn; +} + +void mnodeReleaseConn(SConnObj *pConn) { + if(pConn == NULL) return; + taosCacheRelease(tsMnodeConnCache, (void**)&pConn, false); } -bool mnodeCheckConn(uint32_t connId, char *user, uint32_t ip, uint16_t port) { +SConnObj *mnodeAccquireConn(uint32_t connId, char *user, uint32_t ip, uint16_t port) { char key[10]; sprintf(key, "%u", connId); uint64_t expireTime = CONN_KEEP_TIME * 1000 + (uint64_t)taosGetTimestampMs(); @@ -128,19 +123,19 @@ bool mnodeCheckConn(uint32_t connId, char *user, uint32_t ip, uint16_t port) { SConnObj *pConn = taosCacheUpdateExpireTimeByName(tsMnodeConnCache, key, expireTime); if (pConn == NULL) { mError("connId:%d, is already destroyed, user:%s ip:%s:%u", connId, user, taosIpStr(ip), port); - return false; + return NULL; } - if (pConn->ip != ip || pConn->port != port /* || strcmp(pConn->user, user) != 0 */ ) { + if (pConn->ip != ip || pConn->port != port /* || strcmp(pConn->user, user) != 0 */) { mError("connId:%d, incoming conn user:%s ip:%s:%u, not match exist conn user:%s ip:%s:%u", connId, user, taosIpStr(ip), port, pConn->user, taosIpStr(pConn->ip), pConn->port); - taosCacheRelease(tsMnodeConnCache, (void**)&pConn, false); - return false; + taosCacheRelease(tsMnodeConnCache, (void **)&pConn, false); + return NULL; } - //mTrace("connId:%d, is incoming, user:%s ip:%s:%u", connId, pConn->user, taosIpStr(pConn->ip), pConn->port); - taosCacheRelease(tsMnodeConnCache, (void**)&pConn, false); - return true; + // mTrace("connId:%d, is incoming, user:%s ip:%s:%u", connId, pConn->user, taosIpStr(pConn->ip), pConn->port); + pConn->lastAccess = expireTime; + return pConn; } static void mnodeFreeConn(void *data) { @@ -553,6 +548,12 @@ int32_t mnodeGetConnsMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *pConn) { pSchema[cols].bytes = htons(pShow->bytes[cols]); cols++; + pShow->bytes[cols] = 8; + pSchema[cols].type = TSDB_DATA_TYPE_TIMESTAMP; + strcpy(pSchema[cols].name, "last access"); + pSchema[cols].bytes = htons(pShow->bytes[cols]); + cols++; + pMeta->numOfColumns = htons(cols); pShow->numOfColumns = cols; @@ -597,6 +598,10 @@ int32_t mnodeRetrieveConns(SShowObj *pShow, char *data, int32_t rows, void *pCon *(int64_t *)pWrite = pConnObj->stime; cols++; + pWrite = data + pShow->offset[cols] * rows + pShow->bytes[cols] * numOfRows; + *(int64_t *)pWrite = pConnObj->lastAccess; + cols++; + numOfRows++; } @@ -675,7 +680,7 @@ int32_t mnodeProcessKillConnectionMsg(SMnodeMsg *pMsg) { mError("connId:%s, failed to kill, conn not exist", pKill->queryId); return TSDB_CODE_INVALID_CONNECTION; } else { - mError("connId:%s, is killed by user:%s", pKill->queryId, pUser->user); + mPrint("connId:%s, is killed by user:%s", pKill->queryId, pUser->user); pConn->killed = 1; taosCacheRelease(tsMnodeConnCache, (void**)&pConn, false); return TSDB_CODE_SUCCESS; diff --git a/src/mnode/src/mnodeShow.c b/src/mnode/src/mnodeShow.c index 0a456a9095..0713328df5 100644 --- a/src/mnode/src/mnodeShow.c +++ b/src/mnode/src/mnodeShow.c @@ -232,22 +232,26 @@ static int32_t mnodeProcessHeartBeatMsg(SMnodeMsg *pMsg) { rpcGetConnInfo(pMsg->rpcMsg.handle, &connInfo); int32_t connId = htonl(pHBMsg->connId); - if (!mnodeCheckConn(connId, connInfo.user, connInfo.clientIp, connInfo.clientPort)) { - connId = mnodeCreateConn(connInfo.user, connInfo.clientIp, connInfo.clientPort); - if (connId == 0) { -#if 0 - // do not close existing links, otherwise - mError("failed to create connId, close connect"); + SConnObj *pConn = mnodeAccquireConn(connId, connInfo.user, connInfo.clientIp, connInfo.clientPort); + if (pConn == NULL) { + pConn = mnodeCreateConn(connInfo.user, connInfo.clientIp, connInfo.clientPort); + } + + if (pConn == NULL) { + // do not close existing links, otherwise + // mError("failed to create connId, close connect"); + // pHBRsp->killConnection = 1; + } else { + pHBRsp->connId = htonl(pConn->connId); + if (pConn->killed != 0) { pHBRsp->killConnection = 1; -#endif - } + } } - pHBRsp->connId = htonl(connId); pHBRsp->onlineDnodes = htonl(mnodeGetOnlinDnodesNum()); pHBRsp->totalDnodes = htonl(mnodeGetDnodesNum()); mnodeGetMnodeIpSetForShell(&pHBRsp->ipList); - + /* * TODO * Dispose kill stream or kill query message @@ -259,6 +263,7 @@ static int32_t mnodeProcessHeartBeatMsg(SMnodeMsg *pMsg) { pMsg->rpcRsp.rsp = pHBRsp; pMsg->rpcRsp.len = sizeof(SCMHeartBeatRsp); + mnodeReleaseConn(pConn); return TSDB_CODE_SUCCESS; } @@ -298,15 +303,19 @@ static int32_t mnodeProcessConnectMsg(SMnodeMsg *pMsg) { goto connect_over; } - int32_t connId = mnodeCreateConn(connInfo.user, connInfo.clientIp, connInfo.clientPort); - if (connId == 0) code = terrno; + SConnObj *pConn = mnodeCreateConn(connInfo.user, connInfo.clientIp, connInfo.clientPort); + if (pConn == NULL) { + code = terrno; + } else { + pConnectRsp->connId = htonl(pConn->connId); + mnodeReleaseConn(pConn); + } sprintf(pConnectRsp->acctId, "%x", pAcct->acctId); strcpy(pConnectRsp->serverVersion, version); pConnectRsp->writeAuth = pUser->writeAuth; pConnectRsp->superAuth = pUser->superAuth; - pConnectRsp->connId = htonl(connId); - + mnodeGetMnodeIpSetForShell(&pConnectRsp->ipList); connect_over: diff --git a/src/query/src/sql.c b/src/query/src/sql.c index d079e5a24e..545cef4082 100644 --- a/src/query/src/sql.c +++ b/src/query/src/sql.c @@ -126,17 +126,17 @@ typedef union { #define ParseARG_FETCH SSqlInfo* pInfo = yypParser->pInfo #define ParseARG_STORE yypParser->pInfo = pInfo #define YYFALLBACK 1 -#define YYNSTATE 247 +#define YYNSTATE 241 #define YYNRULE 220 #define YYNTOKEN 205 -#define YY_MAX_SHIFT 246 -#define YY_MIN_SHIFTREDUCE 403 -#define YY_MAX_SHIFTREDUCE 622 -#define YY_ERROR_ACTION 623 -#define YY_ACCEPT_ACTION 624 -#define YY_NO_ACTION 625 -#define YY_MIN_REDUCE 626 -#define YY_MAX_REDUCE 845 +#define YY_MAX_SHIFT 240 +#define YY_MIN_SHIFTREDUCE 397 +#define YY_MAX_SHIFTREDUCE 616 +#define YY_ERROR_ACTION 617 +#define YY_ACCEPT_ACTION 618 +#define YY_NO_ACTION 619 +#define YY_MIN_REDUCE 620 +#define YY_MAX_REDUCE 839 /************* End control #defines *******************************************/ /* Define the yytestcase() macro to be a no-op if is not already defined @@ -202,63 +202,63 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (547) +#define YY_ACTTAB_COUNT (541) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 724, 444, 723, 11, 722, 134, 624, 246, 725, 445, - /* 10 */ 727, 726, 764, 41, 43, 21, 35, 36, 153, 244, - /* 20 */ 135, 29, 135, 444, 203, 39, 37, 40, 38, 158, - /* 30 */ 833, 445, 832, 34, 33, 139, 135, 32, 31, 30, - /* 40 */ 41, 43, 753, 35, 36, 157, 833, 166, 29, 739, - /* 50 */ 103, 203, 39, 37, 40, 38, 188, 21, 103, 99, - /* 60 */ 34, 33, 761, 155, 32, 31, 30, 404, 405, 406, - /* 70 */ 407, 408, 409, 410, 411, 412, 413, 414, 415, 245, - /* 80 */ 444, 742, 41, 43, 103, 35, 36, 103, 445, 168, - /* 90 */ 29, 738, 21, 203, 39, 37, 40, 38, 32, 31, - /* 100 */ 30, 56, 34, 33, 753, 787, 32, 31, 30, 43, - /* 110 */ 191, 35, 36, 788, 829, 198, 29, 21, 154, 203, - /* 120 */ 39, 37, 40, 38, 167, 578, 739, 8, 34, 33, - /* 130 */ 61, 113, 32, 31, 30, 665, 35, 36, 126, 59, - /* 140 */ 200, 29, 58, 17, 203, 39, 37, 40, 38, 221, - /* 150 */ 26, 739, 169, 34, 33, 220, 219, 32, 31, 30, - /* 160 */ 16, 239, 214, 238, 213, 212, 211, 237, 210, 236, - /* 170 */ 235, 209, 720, 828, 709, 710, 711, 712, 713, 714, - /* 180 */ 715, 716, 717, 718, 719, 162, 591, 234, 76, 582, - /* 190 */ 165, 585, 240, 588, 234, 162, 591, 98, 827, 582, - /* 200 */ 225, 585, 60, 588, 26, 162, 591, 12, 742, 582, - /* 210 */ 742, 585, 674, 588, 27, 126, 21, 159, 160, 34, - /* 220 */ 33, 202, 842, 32, 31, 30, 148, 159, 160, 740, - /* 230 */ 536, 539, 88, 87, 142, 18, 666, 159, 160, 126, - /* 240 */ 147, 559, 560, 39, 37, 40, 38, 50, 226, 550, - /* 250 */ 739, 34, 33, 46, 507, 32, 31, 30, 523, 531, - /* 260 */ 17, 520, 151, 521, 51, 522, 190, 26, 16, 239, - /* 270 */ 152, 238, 243, 242, 95, 237, 551, 236, 235, 177, - /* 280 */ 14, 42, 223, 222, 580, 741, 185, 187, 182, 170, - /* 290 */ 171, 42, 590, 584, 150, 587, 74, 78, 83, 86, - /* 300 */ 77, 42, 590, 161, 608, 592, 80, 589, 13, 13, - /* 310 */ 140, 583, 590, 586, 513, 47, 141, 589, 46, 798, - /* 320 */ 581, 116, 117, 68, 64, 67, 143, 589, 130, 128, - /* 330 */ 91, 90, 89, 512, 48, 207, 527, 22, 528, 22, - /* 340 */ 144, 3, 73, 72, 10, 9, 145, 525, 146, 526, - /* 350 */ 85, 84, 137, 797, 133, 138, 136, 163, 794, 524, - /* 360 */ 793, 164, 763, 733, 224, 100, 755, 780, 779, 114, - /* 370 */ 26, 115, 112, 676, 208, 131, 24, 217, 673, 218, - /* 380 */ 841, 70, 840, 838, 118, 694, 25, 93, 23, 132, - /* 390 */ 663, 79, 189, 546, 661, 192, 81, 82, 659, 658, - /* 400 */ 172, 127, 656, 196, 655, 654, 653, 652, 644, 129, - /* 410 */ 650, 648, 646, 52, 752, 767, 49, 44, 768, 781, - /* 420 */ 201, 199, 197, 195, 193, 28, 216, 75, 227, 228, - /* 430 */ 229, 230, 205, 232, 231, 53, 233, 241, 622, 149, - /* 440 */ 173, 62, 65, 174, 176, 175, 621, 178, 179, 180, - /* 450 */ 181, 657, 121, 120, 695, 125, 119, 122, 123, 92, - /* 460 */ 124, 651, 1, 106, 104, 737, 94, 105, 620, 109, - /* 470 */ 107, 108, 110, 111, 2, 184, 613, 183, 186, 190, - /* 480 */ 533, 55, 547, 156, 101, 57, 552, 194, 102, 5, - /* 490 */ 6, 63, 484, 593, 4, 19, 20, 15, 204, 7, - /* 500 */ 206, 481, 479, 478, 477, 475, 448, 215, 66, 45, - /* 510 */ 22, 509, 508, 69, 506, 54, 469, 467, 459, 465, - /* 520 */ 461, 463, 457, 455, 71, 483, 482, 480, 476, 474, - /* 530 */ 46, 446, 419, 417, 626, 625, 625, 625, 625, 625, - /* 540 */ 96, 625, 625, 625, 625, 625, 97, + /* 0 */ 718, 438, 717, 11, 716, 134, 618, 240, 719, 439, + /* 10 */ 721, 720, 758, 41, 43, 21, 35, 36, 153, 238, + /* 20 */ 135, 29, 135, 438, 197, 39, 37, 40, 38, 158, + /* 30 */ 827, 439, 826, 34, 33, 139, 135, 32, 31, 30, + /* 40 */ 41, 43, 747, 35, 36, 157, 827, 166, 29, 733, + /* 50 */ 103, 197, 39, 37, 40, 38, 182, 21, 103, 99, + /* 60 */ 34, 33, 755, 155, 32, 31, 30, 398, 399, 400, + /* 70 */ 401, 402, 403, 404, 405, 406, 407, 408, 409, 239, + /* 80 */ 438, 736, 41, 43, 103, 35, 36, 103, 439, 168, + /* 90 */ 29, 732, 21, 197, 39, 37, 40, 38, 32, 31, + /* 100 */ 30, 56, 34, 33, 747, 781, 32, 31, 30, 43, + /* 110 */ 185, 35, 36, 782, 823, 192, 29, 21, 154, 197, + /* 120 */ 39, 37, 40, 38, 167, 572, 733, 8, 34, 33, + /* 130 */ 61, 113, 32, 31, 30, 659, 35, 36, 126, 59, + /* 140 */ 194, 29, 58, 17, 197, 39, 37, 40, 38, 215, + /* 150 */ 26, 733, 169, 34, 33, 214, 213, 32, 31, 30, + /* 160 */ 16, 233, 208, 232, 207, 206, 205, 231, 204, 230, + /* 170 */ 229, 203, 714, 219, 703, 704, 705, 706, 707, 708, + /* 180 */ 709, 710, 711, 712, 713, 162, 585, 50, 60, 576, + /* 190 */ 175, 579, 165, 582, 234, 162, 585, 179, 178, 576, + /* 200 */ 27, 579, 734, 582, 51, 162, 585, 12, 98, 576, + /* 210 */ 736, 579, 736, 582, 228, 26, 21, 159, 160, 34, + /* 220 */ 33, 196, 836, 32, 31, 30, 148, 159, 160, 76, + /* 230 */ 822, 533, 88, 87, 142, 228, 668, 159, 160, 126, + /* 240 */ 147, 553, 554, 39, 37, 40, 38, 821, 220, 544, + /* 250 */ 733, 34, 33, 46, 501, 32, 31, 30, 517, 525, + /* 260 */ 17, 514, 151, 515, 152, 516, 184, 26, 16, 233, + /* 270 */ 140, 232, 237, 236, 95, 231, 660, 230, 229, 126, + /* 280 */ 530, 42, 217, 216, 578, 18, 581, 181, 161, 170, + /* 290 */ 171, 42, 584, 577, 150, 580, 74, 78, 83, 86, + /* 300 */ 77, 42, 584, 574, 545, 602, 80, 583, 14, 13, + /* 310 */ 141, 586, 584, 143, 507, 13, 47, 583, 46, 73, + /* 320 */ 72, 116, 117, 68, 64, 67, 3, 583, 130, 128, + /* 330 */ 91, 90, 89, 506, 201, 48, 144, 22, 22, 575, + /* 340 */ 521, 519, 522, 520, 10, 9, 85, 84, 145, 146, + /* 350 */ 137, 133, 138, 735, 136, 792, 791, 163, 788, 518, + /* 360 */ 787, 164, 757, 727, 218, 100, 749, 774, 773, 114, + /* 370 */ 26, 115, 112, 670, 202, 131, 24, 211, 667, 212, + /* 380 */ 835, 70, 834, 832, 118, 688, 25, 183, 23, 132, + /* 390 */ 657, 79, 93, 540, 655, 186, 81, 82, 653, 652, + /* 400 */ 172, 190, 127, 746, 650, 649, 648, 647, 646, 638, + /* 410 */ 129, 644, 642, 52, 640, 44, 49, 195, 761, 762, + /* 420 */ 775, 191, 193, 189, 187, 28, 210, 75, 221, 222, + /* 430 */ 223, 224, 225, 199, 226, 227, 235, 53, 616, 174, + /* 440 */ 615, 149, 62, 173, 65, 176, 177, 614, 180, 651, + /* 450 */ 607, 184, 92, 527, 645, 541, 120, 689, 121, 122, + /* 460 */ 119, 123, 125, 124, 94, 104, 1, 731, 105, 111, + /* 470 */ 108, 106, 107, 109, 110, 2, 55, 57, 101, 156, + /* 480 */ 188, 5, 546, 102, 19, 6, 587, 20, 4, 15, + /* 490 */ 63, 7, 198, 478, 200, 475, 473, 472, 471, 469, + /* 500 */ 442, 209, 66, 45, 69, 71, 22, 503, 502, 500, + /* 510 */ 54, 463, 461, 453, 459, 455, 457, 451, 449, 477, + /* 520 */ 476, 474, 470, 468, 46, 440, 96, 413, 411, 620, + /* 530 */ 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, + /* 540 */ 97, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 225, 1, 227, 258, 229, 258, 206, 207, 233, 9, @@ -278,44 +278,44 @@ static const YYCODETYPE yy_lookahead[] = { /* 140 */ 262, 21, 264, 97, 24, 25, 26, 27, 28, 241, /* 150 */ 104, 243, 126, 33, 34, 129, 130, 37, 38, 39, /* 160 */ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - /* 170 */ 95, 96, 225, 258, 227, 228, 229, 230, 231, 232, - /* 180 */ 233, 234, 235, 236, 237, 1, 2, 78, 72, 5, - /* 190 */ 226, 7, 226, 9, 78, 1, 2, 97, 258, 5, - /* 200 */ 209, 7, 245, 9, 104, 1, 2, 44, 244, 5, - /* 210 */ 244, 7, 213, 9, 257, 216, 209, 33, 34, 33, - /* 220 */ 34, 37, 244, 37, 38, 39, 63, 33, 34, 238, - /* 230 */ 102, 37, 69, 70, 71, 107, 213, 33, 34, 216, - /* 240 */ 77, 114, 115, 25, 26, 27, 28, 102, 241, 98, + /* 170 */ 95, 96, 225, 209, 227, 228, 229, 230, 231, 232, + /* 180 */ 233, 234, 235, 236, 237, 1, 2, 102, 245, 5, + /* 190 */ 125, 7, 226, 9, 226, 1, 2, 132, 133, 5, + /* 200 */ 257, 7, 238, 9, 119, 1, 2, 44, 97, 5, + /* 210 */ 244, 7, 244, 9, 78, 104, 209, 33, 34, 33, + /* 220 */ 34, 37, 244, 37, 38, 39, 63, 33, 34, 72, + /* 230 */ 258, 37, 69, 70, 71, 78, 213, 33, 34, 216, + /* 240 */ 77, 114, 115, 25, 26, 27, 28, 258, 241, 98, /* 250 */ 243, 33, 34, 102, 5, 37, 38, 39, 2, 98, - /* 260 */ 97, 5, 258, 7, 119, 9, 105, 104, 85, 86, - /* 270 */ 258, 88, 60, 61, 62, 92, 98, 94, 95, 125, - /* 280 */ 102, 97, 33, 34, 1, 244, 132, 124, 134, 33, + /* 260 */ 97, 5, 258, 7, 258, 9, 105, 104, 85, 86, + /* 270 */ 258, 88, 60, 61, 62, 92, 213, 94, 95, 216, + /* 280 */ 102, 97, 33, 34, 5, 107, 7, 124, 59, 33, /* 290 */ 34, 97, 108, 5, 131, 7, 64, 65, 66, 67, - /* 300 */ 68, 97, 108, 59, 98, 98, 74, 123, 102, 102, - /* 310 */ 258, 5, 108, 7, 98, 102, 258, 123, 102, 239, - /* 320 */ 37, 64, 65, 66, 67, 68, 258, 123, 64, 65, - /* 330 */ 66, 67, 68, 98, 121, 98, 5, 102, 7, 102, - /* 340 */ 258, 97, 127, 128, 127, 128, 258, 5, 258, 7, - /* 350 */ 72, 73, 258, 239, 258, 258, 258, 239, 239, 103, + /* 300 */ 68, 97, 108, 1, 98, 98, 74, 123, 102, 102, + /* 310 */ 258, 98, 108, 258, 98, 102, 102, 123, 102, 127, + /* 320 */ 128, 64, 65, 66, 67, 68, 97, 123, 64, 65, + /* 330 */ 66, 67, 68, 98, 98, 121, 258, 102, 102, 37, + /* 340 */ 5, 5, 7, 7, 127, 128, 72, 73, 258, 258, + /* 350 */ 258, 258, 258, 244, 258, 239, 239, 239, 239, 103, /* 360 */ 239, 239, 209, 240, 239, 209, 242, 265, 265, 209, /* 370 */ 104, 209, 246, 209, 209, 209, 209, 209, 209, 209, - /* 380 */ 209, 209, 209, 209, 209, 209, 209, 59, 209, 209, - /* 390 */ 209, 209, 242, 108, 209, 261, 209, 209, 209, 209, - /* 400 */ 209, 209, 209, 261, 209, 209, 209, 209, 209, 209, - /* 410 */ 209, 209, 209, 118, 255, 210, 120, 117, 210, 210, - /* 420 */ 112, 116, 111, 110, 109, 122, 75, 84, 83, 49, - /* 430 */ 80, 82, 210, 81, 53, 210, 79, 75, 5, 210, - /* 440 */ 133, 214, 214, 5, 58, 133, 5, 133, 5, 133, - /* 450 */ 58, 210, 218, 222, 224, 217, 223, 221, 219, 211, - /* 460 */ 220, 210, 215, 252, 254, 242, 211, 253, 5, 249, - /* 470 */ 251, 250, 248, 247, 212, 58, 87, 133, 125, 105, - /* 480 */ 98, 106, 98, 1, 97, 102, 98, 97, 97, 113, - /* 490 */ 113, 72, 9, 98, 97, 102, 102, 97, 99, 97, - /* 500 */ 99, 5, 5, 5, 5, 5, 76, 15, 72, 16, - /* 510 */ 102, 5, 5, 128, 98, 97, 5, 5, 5, 5, - /* 520 */ 5, 5, 5, 5, 128, 5, 5, 5, 5, 5, - /* 530 */ 102, 76, 59, 58, 0, 269, 269, 269, 269, 269, - /* 540 */ 21, 269, 269, 269, 269, 269, 21, 269, 269, 269, + /* 380 */ 209, 209, 209, 209, 209, 209, 209, 242, 209, 209, + /* 390 */ 209, 209, 59, 108, 209, 261, 209, 209, 209, 209, + /* 400 */ 209, 261, 209, 255, 209, 209, 209, 209, 209, 209, + /* 410 */ 209, 209, 209, 118, 209, 117, 120, 112, 210, 210, + /* 420 */ 210, 111, 116, 110, 109, 122, 75, 84, 83, 49, + /* 430 */ 80, 82, 53, 210, 81, 79, 75, 210, 5, 5, + /* 440 */ 5, 210, 214, 134, 214, 134, 5, 5, 125, 210, + /* 450 */ 87, 105, 211, 98, 210, 98, 222, 224, 218, 221, + /* 460 */ 223, 219, 217, 220, 211, 254, 215, 242, 253, 247, + /* 470 */ 250, 252, 251, 249, 248, 212, 106, 102, 97, 1, + /* 480 */ 97, 113, 98, 97, 102, 113, 98, 102, 97, 97, + /* 490 */ 72, 97, 99, 9, 99, 5, 5, 5, 5, 5, + /* 500 */ 76, 15, 72, 16, 128, 128, 102, 5, 5, 98, + /* 510 */ 97, 5, 5, 5, 5, 5, 5, 5, 5, 5, + /* 520 */ 5, 5, 5, 5, 102, 76, 21, 59, 58, 0, + /* 530 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, + /* 540 */ 21, 269, 269, 269, 269, 269, 269, 269, 269, 269, /* 550 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, /* 560 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, /* 570 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, @@ -335,84 +335,83 @@ static const YYCODETYPE yy_lookahead[] = { /* 710 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, /* 720 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, /* 730 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, - /* 740 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, - /* 750 */ 269, 269, + /* 740 */ 269, 269, 269, 269, 269, 269, }; -#define YY_SHIFT_COUNT (246) +#define YY_SHIFT_COUNT (240) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (534) +#define YY_SHIFT_MAX (529) static const unsigned short int yy_shift_ofst[] = { /* 0 */ 163, 75, 183, 184, 204, 79, 79, 79, 79, 79, /* 10 */ 79, 0, 22, 204, 256, 256, 256, 46, 79, 79, - /* 20 */ 79, 79, 79, 116, 109, 109, 547, 194, 204, 204, + /* 20 */ 79, 79, 79, 157, 136, 136, 541, 194, 204, 204, /* 30 */ 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, /* 40 */ 204, 204, 204, 204, 204, 256, 256, 249, 249, 249, - /* 50 */ 249, 249, 249, 30, 249, 100, 79, 79, 127, 127, - /* 60 */ 128, 79, 79, 79, 79, 79, 79, 79, 79, 79, + /* 50 */ 249, 249, 249, 30, 249, 111, 79, 79, 127, 127, + /* 60 */ 178, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* 70 */ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, /* 80 */ 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - /* 90 */ 79, 79, 79, 79, 79, 79, 79, 79, 266, 328, - /* 100 */ 328, 285, 285, 328, 295, 296, 300, 308, 305, 311, - /* 110 */ 313, 315, 303, 266, 328, 328, 351, 351, 328, 343, - /* 120 */ 345, 380, 350, 349, 381, 352, 357, 328, 362, 328, - /* 130 */ 362, 547, 547, 27, 69, 69, 69, 95, 120, 218, + /* 90 */ 79, 79, 79, 79, 79, 79, 79, 79, 266, 333, + /* 100 */ 333, 285, 285, 333, 295, 296, 298, 305, 306, 310, + /* 110 */ 313, 315, 303, 266, 333, 333, 351, 351, 333, 343, + /* 120 */ 345, 380, 350, 349, 379, 353, 356, 333, 361, 333, + /* 130 */ 361, 541, 541, 27, 69, 69, 69, 95, 120, 218, /* 140 */ 218, 218, 232, 186, 186, 186, 186, 257, 264, 26, - /* 150 */ 154, 61, 61, 212, 161, 151, 178, 206, 207, 288, - /* 160 */ 306, 283, 244, 213, 145, 216, 235, 237, 215, 217, - /* 170 */ 331, 342, 278, 433, 307, 438, 312, 386, 441, 314, - /* 180 */ 443, 316, 392, 463, 344, 417, 389, 353, 374, 382, - /* 190 */ 375, 383, 384, 387, 482, 390, 388, 391, 393, 376, - /* 200 */ 394, 377, 395, 397, 400, 399, 402, 401, 419, 483, - /* 210 */ 496, 497, 498, 499, 500, 430, 492, 436, 493, 385, - /* 220 */ 396, 408, 506, 507, 416, 418, 408, 511, 512, 513, - /* 230 */ 514, 515, 516, 517, 518, 520, 521, 522, 523, 524, - /* 240 */ 428, 455, 519, 525, 473, 475, 534, + /* 150 */ 65, 61, 61, 212, 161, 151, 206, 207, 213, 279, + /* 160 */ 288, 302, 229, 214, 85, 216, 235, 236, 192, 217, + /* 170 */ 335, 336, 274, 433, 309, 434, 435, 311, 441, 442, + /* 180 */ 363, 323, 346, 355, 370, 375, 357, 381, 478, 383, + /* 190 */ 384, 386, 382, 368, 385, 372, 388, 391, 392, 393, + /* 200 */ 394, 395, 418, 484, 490, 491, 492, 493, 494, 424, + /* 210 */ 486, 430, 487, 376, 377, 404, 502, 503, 411, 413, + /* 220 */ 404, 506, 507, 508, 509, 510, 511, 512, 513, 514, + /* 230 */ 515, 516, 517, 518, 422, 449, 505, 519, 468, 470, + /* 240 */ 529, }; #define YY_REDUCE_COUNT (132) #define YY_REDUCE_MIN (-255) -#define YY_REDUCE_MAX (262) +#define YY_REDUCE_MAX (263) static const short yy_reduce_ofst[] = { /* 0 */ -200, -53, -225, -238, -222, -151, -122, -194, -117, -92, - /* 10 */ 7, -197, -190, -236, -163, -36, -34, -138, -150, -159, - /* 20 */ -125, -9, -152, -78, -1, 23, -43, -255, -253, -223, - /* 30 */ -144, -85, -60, 4, 12, 52, 58, 68, 82, 88, - /* 40 */ 90, 94, 96, 97, 98, -22, 41, 80, 114, 118, + /* 10 */ 7, -197, -190, -236, -163, -34, -32, -138, -150, -159, + /* 20 */ -125, -36, -152, -78, 23, 63, -57, -255, -253, -223, + /* 30 */ -144, -28, -11, 4, 6, 12, 52, 55, 78, 90, + /* 40 */ 91, 92, 93, 94, 96, -22, 109, 116, 117, 118, /* 50 */ 119, 121, 122, 123, 125, 124, 153, 156, 102, 103, /* 60 */ 126, 160, 162, 164, 165, 166, 167, 168, 169, 170, /* 70 */ 171, 172, 173, 174, 175, 176, 177, 179, 180, 181, - /* 80 */ 182, 185, 187, 188, 189, 190, 191, 192, 193, 195, - /* 90 */ 196, 197, 198, 199, 200, 201, 202, 203, 150, 205, - /* 100 */ 208, 134, 142, 209, 159, 210, 214, 211, 219, 221, - /* 110 */ 220, 224, 226, 223, 222, 225, 227, 228, 229, 230, - /* 120 */ 233, 231, 234, 236, 239, 240, 238, 241, 248, 251, - /* 130 */ 255, 247, 262, + /* 80 */ 182, 185, 187, 188, 189, 190, 191, 193, 195, 196, + /* 90 */ 197, 198, 199, 200, 201, 202, 203, 205, 145, 208, + /* 100 */ 209, 134, 140, 210, 148, 211, 215, 219, 221, 220, + /* 110 */ 224, 226, 222, 225, 223, 227, 228, 230, 231, 233, + /* 120 */ 237, 234, 240, 238, 242, 243, 245, 239, 241, 244, + /* 130 */ 253, 251, 263, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 623, 675, 664, 835, 835, 623, 623, 623, 623, 623, - /* 10 */ 623, 765, 641, 835, 623, 623, 623, 623, 623, 623, - /* 20 */ 623, 623, 623, 677, 677, 677, 760, 623, 623, 623, - /* 30 */ 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, - /* 40 */ 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, - /* 50 */ 623, 623, 623, 623, 623, 623, 623, 623, 784, 784, - /* 60 */ 758, 623, 623, 623, 623, 623, 623, 623, 623, 623, - /* 70 */ 623, 623, 623, 623, 623, 623, 623, 623, 623, 662, - /* 80 */ 623, 660, 623, 623, 623, 623, 623, 623, 623, 623, - /* 90 */ 623, 623, 623, 623, 623, 649, 623, 623, 623, 643, - /* 100 */ 643, 623, 623, 643, 791, 795, 789, 777, 785, 776, - /* 110 */ 772, 771, 799, 623, 643, 643, 672, 672, 643, 693, - /* 120 */ 691, 689, 681, 687, 683, 685, 679, 643, 670, 643, - /* 130 */ 670, 708, 721, 623, 800, 834, 790, 818, 817, 830, - /* 140 */ 824, 823, 623, 822, 821, 820, 819, 623, 623, 623, - /* 150 */ 623, 826, 825, 623, 623, 623, 623, 623, 623, 623, - /* 160 */ 623, 623, 802, 796, 792, 623, 623, 623, 623, 623, - /* 170 */ 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, - /* 180 */ 623, 623, 623, 623, 623, 623, 623, 623, 757, 623, - /* 190 */ 623, 766, 623, 623, 623, 623, 623, 623, 786, 623, - /* 200 */ 778, 623, 623, 623, 623, 623, 623, 734, 623, 623, - /* 210 */ 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, - /* 220 */ 623, 839, 623, 623, 623, 728, 837, 623, 623, 623, - /* 230 */ 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, - /* 240 */ 696, 623, 647, 645, 623, 639, 623, + /* 0 */ 617, 669, 658, 829, 829, 617, 617, 617, 617, 617, + /* 10 */ 617, 759, 635, 829, 617, 617, 617, 617, 617, 617, + /* 20 */ 617, 617, 617, 671, 671, 671, 754, 617, 617, 617, + /* 30 */ 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, + /* 40 */ 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, + /* 50 */ 617, 617, 617, 617, 617, 617, 617, 617, 778, 778, + /* 60 */ 752, 617, 617, 617, 617, 617, 617, 617, 617, 617, + /* 70 */ 617, 617, 617, 617, 617, 617, 617, 617, 617, 656, + /* 80 */ 617, 654, 617, 617, 617, 617, 617, 617, 617, 617, + /* 90 */ 617, 617, 617, 617, 617, 643, 617, 617, 617, 637, + /* 100 */ 637, 617, 617, 637, 785, 789, 783, 771, 779, 770, + /* 110 */ 766, 765, 793, 617, 637, 637, 666, 666, 637, 687, + /* 120 */ 685, 683, 675, 681, 677, 679, 673, 637, 664, 637, + /* 130 */ 664, 702, 715, 617, 794, 828, 784, 812, 811, 824, + /* 140 */ 818, 817, 617, 816, 815, 814, 813, 617, 617, 617, + /* 150 */ 617, 820, 819, 617, 617, 617, 617, 617, 617, 617, + /* 160 */ 617, 617, 796, 790, 786, 617, 617, 617, 617, 617, + /* 170 */ 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, + /* 180 */ 617, 617, 751, 617, 617, 760, 617, 617, 617, 617, + /* 190 */ 617, 617, 780, 617, 772, 617, 617, 617, 617, 617, + /* 200 */ 617, 728, 617, 617, 617, 617, 617, 617, 617, 617, + /* 210 */ 617, 617, 617, 617, 617, 833, 617, 617, 617, 722, + /* 220 */ 831, 617, 617, 617, 617, 617, 617, 617, 617, 617, + /* 230 */ 617, 617, 617, 617, 690, 617, 641, 639, 617, 633, + /* 240 */ 617, }; /********** End of lemon-generated parsing tables *****************************/ @@ -565,8 +564,8 @@ static const YYCODETYPE yyFallback[] = { 0, /* SET => nothing */ 0, /* KILL => nothing */ 0, /* CONNECTION => nothing */ - 0, /* COLON => nothing */ 0, /* STREAM => nothing */ + 0, /* COLON => nothing */ 1, /* ABORT => ID */ 1, /* AFTER => ID */ 1, /* ATTACH => ID */ @@ -856,8 +855,8 @@ static const char *const yyTokenName[] = { /* 130 */ "SET", /* 131 */ "KILL", /* 132 */ "CONNECTION", - /* 133 */ "COLON", - /* 134 */ "STREAM", + /* 133 */ "STREAM", + /* 134 */ "COLON", /* 135 */ "ABORT", /* 136 */ "AFTER", /* 137 */ "ATTACH", @@ -1216,9 +1215,9 @@ static const char *const yyRuleName[] = { /* 214 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", /* 215 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", /* 216 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", - /* 217 */ "cmd ::= KILL CONNECTION IPTOKEN COLON INTEGER", - /* 218 */ "cmd ::= KILL STREAM IPTOKEN COLON INTEGER COLON INTEGER", - /* 219 */ "cmd ::= KILL QUERY IPTOKEN COLON INTEGER COLON INTEGER", + /* 217 */ "cmd ::= KILL CONNECTION INTEGER", + /* 218 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", + /* 219 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", }; #endif /* NDEBUG */ @@ -1893,9 +1892,9 @@ static const struct { { 207, -7 }, /* (214) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ { 207, -8 }, /* (215) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ { 207, -9 }, /* (216) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - { 207, -5 }, /* (217) cmd ::= KILL CONNECTION IPTOKEN COLON INTEGER */ - { 207, -7 }, /* (218) cmd ::= KILL STREAM IPTOKEN COLON INTEGER COLON INTEGER */ - { 207, -7 }, /* (219) cmd ::= KILL QUERY IPTOKEN COLON INTEGER COLON INTEGER */ + { 207, -3 }, /* (217) cmd ::= KILL CONNECTION INTEGER */ + { 207, -5 }, /* (218) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + { 207, -5 }, /* (219) cmd ::= KILL QUERY INTEGER COLON INTEGER */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -2734,14 +2733,14 @@ static void yy_reduce( setSQLInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 217: /* cmd ::= KILL CONNECTION IPTOKEN COLON INTEGER */ -{yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSQL(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[-2].minor.yy0);} + case 217: /* cmd ::= KILL CONNECTION INTEGER */ +{setKillSQL(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);} break; - case 218: /* cmd ::= KILL STREAM IPTOKEN COLON INTEGER COLON INTEGER */ -{yymsp[-4].minor.yy0.n += (yymsp[-3].minor.yy0.n + yymsp[-2].minor.yy0.n + yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSQL(pInfo, TSDB_SQL_KILL_STREAM, &yymsp[-4].minor.yy0);} + case 218: /* 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 219: /* cmd ::= KILL QUERY IPTOKEN COLON INTEGER COLON INTEGER */ -{yymsp[-4].minor.yy0.n += (yymsp[-3].minor.yy0.n + yymsp[-2].minor.yy0.n + yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSQL(pInfo, TSDB_SQL_KILL_QUERY, &yymsp[-4].minor.yy0);} + case 219: /* 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: break; diff --git a/tests/script/sh/deploy.sh b/tests/script/sh/deploy.sh index 5837cf5a1a..db0df5c185 100755 --- a/tests/script/sh/deploy.sh +++ b/tests/script/sh/deploy.sh @@ -111,7 +111,7 @@ echo "serverPort ${NODE}" >> $TAOS_CFG echo "dataDir $DATA_DIR" >> $TAOS_CFG echo "logDir $LOG_DIR" >> $TAOS_CFG echo "dDebugFlag 135" >> $TAOS_CFG -echo "mDebugFlag 135" >> $TAOS_CFG +echo "mDebugFlag 199" >> $TAOS_CFG echo "sdbDebugFlag 135" >> $TAOS_CFG echo "rpcDebugFlag 135" >> $TAOS_CFG echo "tmrDebugFlag 131" >> $TAOS_CFG -- GitLab