diff --git a/src/client/inc/tsclient.h b/src/client/inc/tsclient.h index a3db44c3826e823f38a4c1a5533a713bf58bc927..07fdbdfe7c052c984bc476c2c9344ddd51a6d054 100644 --- a/src/client/inc/tsclient.h +++ b/src/client/inc/tsclient.h @@ -336,6 +336,7 @@ typedef struct STscObj { char user[TSDB_USER_LEN]; char pass[TSDB_PASS_LEN]; char acctId[TSDB_ACCT_ID_LEN]; + char tags[TSDB_TAGS_LEN]; char db[TSDB_ACCT_ID_LEN + TSDB_DB_NAME_LEN]; char sversion[TSDB_VERSION_LEN]; char clusterId[TSDB_CLUSTER_ID_LEN]; diff --git a/src/client/src/tscAsync.c b/src/client/src/tscAsync.c index b0900513e999a1d9f5be182f5aa242794307541e..35d4e4435bc5d4cd1c594cc4b06b3ad1a7dd1de7 100644 --- a/src/client/src/tscAsync.c +++ b/src/client/src/tscAsync.c @@ -34,6 +34,320 @@ static void tscAsyncQueryRowsForNextVnode(void *param, TAOS_RES *tres, int numOf */ static void tscAsyncFetchRowsProxy(void *param, TAOS_RES *tres, int numOfRows); +// like select * from st1 , st2 where ... format +static inline int32_t likeBlanksCommaBlans(char * str) { + char *p = str; + int32_t cnt1 = 0; // ' ' count + int32_t cnt2 = 0; // ',' count + + while (*p != 0) { + if(*p == ' ') + cnt1++; + else if(*p == ',') + cnt2++; + else + return cnt2 == 0 ? 0 : cnt1 + cnt2; + p++; + } + + return 0; +} + + +// return tbname start , put tbname end to args pe +static char *searchTBName(char *from_end, char **pend) { + char *p = from_end; + // remove pre blanks + while(*p == ' ') { + ++p; + } + char *tbname = p; + + if(*p == 0) + return NULL; + + // goto next blank + while(1) { + p++; + + if(*p == ' ') { + // if following not have , this is end + + // format like select * from stb1 , stb2 , stb3 where ... + int32_t len = likeBlanksCommaBlans(p); + if(len > 0) { + p += len; + continue; + } + + // tbname is end + if(pend) + *pend = p; + + return tbname; + } else if(*p == ';' || *p == 0) { + // sql end flag '\0' or ';' end + if(pend) + *pend = p; + + return tbname; + } + } + + return NULL; +} + +// return names min pointer +static inline char *searchEndPart(char *tbname_end) { + char* names[] = { + " group ", + " order ", + " interval(", + " interval (", + " session(", + " session (", + " state_window(", + " state_window (", + " slimit ", + " slimit(", + " limit ", + " limit(", + " sliding ", + " fill(", + " fill (" + " >>", + ";" + }; + + int32_t count = sizeof(names)/sizeof(char *); + char * p = NULL; + for(int32_t i = 0; i < count; i++) { + char * p1 = strstr(tbname_end, names[i]); + if (p1) { + if (p == NULL || p1 < p) + p = p1; + } + } + + if(p == NULL) { + // move string end + p = tbname_end + strlen(tbname_end); + } + + return p; +} + +// get brackets context and set context to pend +static inline char *bracketsString(char *select, char **pend){ + char *p = select; + int32_t cnt = 0; + while (*p) { + if(*p == '(') { + // left bracket + cnt++; + } else if(*p == ')') { + // right bracket + cnt--; + } + + if(cnt < 0) { + // this is end + if(pend) + *pend = p; + // copy str to new + int len = p - 1 - select; + if(len == 0) + return NULL; + len += 1; // string end + char *str = (char *)malloc(len); + strncpy(str, select, len); + str[len] = 0; + + return str; + } + ++p; + } + + return NULL; +} + +// +// return new malloc buffer, NULL is need not insert or failed tags example is 'tags=3' +// sql part : +// select * from st where age=1 order by ts; +// ------------- --- ----------- ----------- +// select part tbname part condition part end part +// +static inline char *insertTags(char *sql, char *tags) { + char *p = sql; + // remove pre blanks + while(*p == ' ') { + ++p; + } + + // filter not query sql + if(strncmp(p, "select ", 7) != 0) { + return NULL; + } + + // specail check + char *from = strstr(p, " from "); + char *block = strstr(p, " _block_dist() "); + if (from == NULL || block != NULL) { + return NULL; + } + + char *select = strstr(p + 7, "select "); // sub select sql + char *union_all = strstr(p + 7, " union all "); + + // need append tags filter + int32_t bufLen = strlen(sql) + 1 + TSDB_TAGS_LEN; + char *buf = malloc(bufLen); + memset(buf, 0, bufLen); + + // case1 if have sub select, tags only append to sub select sql + if(select && union_all) { + // union all like select * from t1 union all select * from t2 union all select * from .... + size_t len = strlen(sql) + 10; + // part1 + char *part1 = (char *)malloc(len); + memset(part1, 0, len); + strncpy(part1, p, union_all - p); + char *p1 = insertTags(part1, tags); + free(part1); + if(p1 == NULL) { + free(buf); + return NULL; + } + + // part2 + char *part2 = union_all + sizeof(" union all ") - 1; + char *p2 = insertTags(part2, tags); + if(p2 == NULL) { + free(buf); + free(p1); + return NULL; + } + + // combine p1 + union all + p2 + len = strlen(p1) + strlen(p2) + 32; + char *all = (char *)malloc(len); + strcpy(all, p1); + strcat(all, " union all "); + strcat(all, p2); + + free(p1); + free(p2); + free(buf); + + return all; + } + else if(select) { + char *part1_end = select - 1; + char *part2 = NULL; + char *part3_start = 0; + char *sub_sql = bracketsString(select, &part3_start); + if (sub_sql == NULL) { + // unknown format, can not insert tags + tscError("TAGS found sub select sql but can not parse brackets format. select=%s sql=%s", select, sql); + free(buf); + return NULL; + } + + // nest call + part2 = insertTags(sub_sql, tags); + free(sub_sql); + if (part2 == NULL) { + // unknown format, can not insert tags + tscError("TAGS insertTags sub select sql failed. subsql=%s sql=%s", sub_sql, sql); + free(buf); + return NULL; + } + + // new string is part1 + part2 + part 3 + strncpy(buf, p, part1_end - p + 1); + strcat(buf, part2); + strcat(buf, part3_start); + + // return ok 1 + // like select * from (select * from st where age>1) where age == 2; + // after-> select * from (select * from st where (tags=3) and (age>1) ) where age == 2; + return buf; + } + + char *tbname_end = NULL; + char *tbname = searchTBName(from + sizeof(" from ") - 1, &tbname_end); + if(tbname == NULL || tbname_end == NULL) { + // unexpect string format + free(buf); + return NULL; + } + + // condition part + char *where = strstr(tbname_end, " where "); + char *end_part = searchEndPart(tbname_end); + if(end_part == NULL) { + // invalid sql + free(buf); + return NULL; + } + + // case2 no condition part + if(where == NULL) { + strncpy(buf, p, end_part - p); + strcat(buf, " where "); + strcat(buf, tags); + strcat(buf, end_part); + + // return ok 2 + // like select * from st order by ts; + // after-> select * from st where tags=3 order by ts; + return buf; + } + + // case3 found condition part + char *cond_part = where + sizeof("where "); + strncpy(buf, p, cond_part - p); // where before part(include where ) + strcat(buf, "("); + int32_t cond_len = end_part - cond_part; + // cat cond part + strncat(buf, cond_part, cond_len); + strcat(buf, ") and ("); + // cat tags part + strcat(buf, tags); + strcat(buf, ")"); + // cat end part + strcat(buf, end_part); + + // return ok 3 + // like select * from st where age=1 order by ts; + // after-> select * from st where (age=1) and (tags=3) order by ts; + return buf; +} + +// if return true success, false is not append privilege sql +bool appendTagsFilter(SSqlObj* pSql) { + // valid tags + STscObj * pTscObj = pSql->pTscObj; + if(pTscObj->tags[0] == 0) { + tscDebug("TAGS 0x%" PRIx64 " tags empty. user=%s", pSql->self, pTscObj->user); + return false; + } + + char * p = insertTags(pSql->sqlstr, pTscObj->tags); + if(p == NULL) { + return false; + } + + // replace new + char * old = pSql->sqlstr; + pSql->sqlstr = p; + tscDebug("TAGS 0x%" PRIx64 " replace sqlstr ok. old=%s new=%s tags=%s", pSql->self, old, p, pTscObj->tags); + free(old); + + return true; +} + void doAsyncQuery(STscObj* pObj, SSqlObj* pSql, __async_cb_func_t fp, void* param, const char* sqlstr, size_t sqlLen) { SSqlCmd* pCmd = &pSql->cmd; @@ -60,6 +374,8 @@ void doAsyncQuery(STscObj* pObj, SSqlObj* pSql, __async_cb_func_t fp, void* para strntolower(pSql->sqlstr, sqlstr, (int32_t)sqlLen); + appendTagsFilter(pSql); + tscDebugL("0x%"PRIx64" SQL: %s", pSql->self, pSql->sqlstr); pCmd->resColumnId = TSDB_RES_COL_ID; diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 193676cd93303f035cda24a2d944e85fbff91ee1..17c70125eebb2ef4c2f7a4c62d9ff2e022b5889c 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -862,6 +862,7 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { const char* msg3 = "name too long"; const char* msg5 = "invalid user rights"; const char* msg7 = "not support options"; + const char* msg8 = "tags filter length must over 3 bytes."; pCmd->command = pInfo->type; @@ -900,7 +901,11 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { } else { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg5); } - } else { + } else if (pUser->type == TSDB_ALTER_USER_TAGS) { + SStrToken* pTags = &pUser->tags; + if(pTags->n < 4) + return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg8); + } else { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg7); } } @@ -10471,6 +10476,7 @@ int32_t validateSqlNode(SSqlObj* pSql, SSqlNode* pSqlNode, SQueryInfo* pQueryInf const char* msg7 = "derivative/twa/rate/irate/diff/tail/stateCount/stateDuration requires timestamp column exists in subquery"; const char* msg8 = "condition missing for join query"; const char* msg9 = "not support 3 level select"; + const char* msg10 = "limit user forbid query normal or child table, you can query from stable."; int32_t code = TSDB_CODE_SUCCESS; SSqlCmd* pCmd = &pSql->cmd; @@ -10655,6 +10661,11 @@ int32_t validateSqlNode(SSqlObj* pSql, SSqlNode* pSqlNode, SQueryInfo* pQueryInf bool isSTable = UTIL_TABLE_IS_SUPER_TABLE(pTableMetaInfo); + // if have tags, only support query on super table + if( !isSTable && pSql->pTscObj->tags[0] !=0) { + return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg10); + } + int32_t type = isSTable? TSDB_QUERY_TYPE_STABLE_QUERY:TSDB_QUERY_TYPE_TABLE_QUERY; TSDB_QUERY_SET_TYPE(pQueryInfo->type, type); diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 779847d7c89deb35f6747e2c89c17cc061ce6445..2818d1014424c442454d4664859d3d90ab58ebdd 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -1475,11 +1475,15 @@ int32_t tscBuildUserMsg(SSqlObj *pSql, SSqlInfo *pInfo) { pAlterMsg->privilege = (char)pCmd->count; } else if (pUser->type == TSDB_ALTER_USER_PASSWD) { strncpy(pAlterMsg->pass, pUser->passwd.z, pUser->passwd.n); + } else if (pUser->type == TSDB_ALTER_USER_TAGS) { + // copy tags + strncpy(pAlterMsg->tags, pUser->tags.z, pUser->tags.n); } else { // create user password info strncpy(pAlterMsg->pass, pUser->passwd.z, pUser->passwd.n); + strncpy(pAlterMsg->tags, pUser->tags.z, pUser->tags.n); } - if (pUser->type == TSDB_ALTER_USER_PASSWD || pUser->type == TSDB_ALTER_USER_PRIVILEGES) { + if (pUser->type == TSDB_ALTER_USER_PASSWD || pUser->type == TSDB_ALTER_USER_PRIVILEGES || pUser->type == TSDB_ALTER_USER_TAGS) { pCmd->msgType = TSDB_MSG_TYPE_CM_ALTER_USER; } else { pCmd->msgType = TSDB_MSG_TYPE_CM_CREATE_USER; @@ -2866,7 +2870,11 @@ int tscProcessConnectRsp(SSqlObj *pSql) { pObj->writeAuth = pConnect->writeAuth; pObj->superAuth = pConnect->superAuth; pObj->connId = htonl(pConnect->connId); - tstrncpy(pObj->clusterId, pConnect->clusterId, sizeof(pObj->clusterId)); + tstrncpy(pObj->clusterId, pConnect->clusterId, sizeof(pObj->clusterId)); + if (pConnect->tags[0] != 0) { + strcpy(pObj->tags, pConnect->tags); + tscInfo("TAGS client received . user=%s tags=%s", pObj->user, pObj->tags); + } createHbObj(pObj); diff --git a/src/inc/taosdef.h b/src/inc/taosdef.h index 5f9b8b8192a4e396d9254e67a90fe4910c5c3cc8..ade0c83ef76f167e6e0bd52d41b117a5e32a9b1d 100644 --- a/src/inc/taosdef.h +++ b/src/inc/taosdef.h @@ -89,6 +89,9 @@ extern const int32_t TYPE_BYTES[16]; #define TSDB_PASS_LEN 16 #define SHELL_MAX_PASSWORD_LEN 20 +// user set query tags max len +#define TSDB_TAGS_LEN 256 + #define TSDB_TRUE 1 #define TSDB_FALSE 0 #define TSDB_OK 0 diff --git a/src/inc/taosmsg.h b/src/inc/taosmsg.h index 280747afed543eaddf2ed657c6067f4aad31a321..f2aed524de4328236297aee1e85100c8825bb485 100644 --- a/src/inc/taosmsg.h +++ b/src/inc/taosmsg.h @@ -185,6 +185,7 @@ enum _mgmt_table { #define TSDB_ALTER_USER_PASSWD 0x1 #define TSDB_ALTER_USER_PRIVILEGES 0x2 +#define TSDB_ALTER_USER_TAGS 0x4 #define TSDB_KILL_MSG_LEN 30 @@ -362,6 +363,7 @@ typedef struct { char acctId[TSDB_ACCT_ID_LEN]; char serverVersion[TSDB_VERSION_LEN]; char clusterId[TSDB_CLUSTER_ID_LEN]; + char tags[TSDB_TAGS_LEN]; int8_t writeAuth; int8_t superAuth; int8_t reserved1; @@ -400,6 +402,7 @@ typedef struct { int8_t extend; char user[TSDB_USER_LEN]; char pass[TSDB_PASS_LEN]; + char tags[TSDB_TAGS_LEN]; int8_t privilege; int8_t flag; } SCreateUserMsg, SAlterUserMsg; diff --git a/src/inc/ttokendef.h b/src/inc/ttokendef.h index ce21a2c65adef9fbac772f2f7c3e3151e06bbcdc..cba93ba5836337f2e0089055e1e57309c23ce8b2 100644 --- a/src/inc/ttokendef.h +++ b/src/inc/ttokendef.h @@ -100,42 +100,42 @@ #define TK_ALTER 82 #define TK_PASS 83 #define TK_PRIVILEGE 84 -#define TK_LOCAL 85 -#define TK_COMPACT 86 -#define TK_LP 87 -#define TK_RP 88 -#define TK_IF 89 -#define TK_EXISTS 90 -#define TK_AS 91 -#define TK_OUTPUTTYPE 92 -#define TK_AGGREGATE 93 -#define TK_BUFSIZE 94 -#define TK_PPS 95 -#define TK_TSERIES 96 -#define TK_DBS 97 -#define TK_STORAGE 98 -#define TK_QTIME 99 -#define TK_CONNS 100 -#define TK_STATE 101 -#define TK_COMMA 102 -#define TK_KEEP 103 -#define TK_CACHE 104 -#define TK_REPLICA 105 -#define TK_QUORUM 106 -#define TK_DAYS 107 -#define TK_MINROWS 108 -#define TK_MAXROWS 109 -#define TK_BLOCKS 110 -#define TK_CTIME 111 -#define TK_WAL 112 -#define TK_FSYNC 113 -#define TK_COMP 114 -#define TK_PRECISION 115 -#define TK_UPDATE 116 -#define TK_CACHELAST 117 -#define TK_PARTITIONS 118 -#define TK_UNSIGNED 119 -#define TK_TAGS 120 +#define TK_TAGS 85 +#define TK_LOCAL 86 +#define TK_COMPACT 87 +#define TK_LP 88 +#define TK_RP 89 +#define TK_IF 90 +#define TK_EXISTS 91 +#define TK_AS 92 +#define TK_OUTPUTTYPE 93 +#define TK_AGGREGATE 94 +#define TK_BUFSIZE 95 +#define TK_PPS 96 +#define TK_TSERIES 97 +#define TK_DBS 98 +#define TK_STORAGE 99 +#define TK_QTIME 100 +#define TK_CONNS 101 +#define TK_STATE 102 +#define TK_COMMA 103 +#define TK_KEEP 104 +#define TK_CACHE 105 +#define TK_REPLICA 106 +#define TK_QUORUM 107 +#define TK_DAYS 108 +#define TK_MINROWS 109 +#define TK_MAXROWS 110 +#define TK_BLOCKS 111 +#define TK_CTIME 112 +#define TK_WAL 113 +#define TK_FSYNC 114 +#define TK_COMP 115 +#define TK_PRECISION 116 +#define TK_UPDATE 117 +#define TK_CACHELAST 118 +#define TK_PARTITIONS 119 +#define TK_UNSIGNED 120 #define TK_USING 121 #define TK_TO 122 #define TK_SPLIT 123 @@ -222,6 +222,7 @@ #define TK_VALUES 204 #define TK_FILE 205 + #define TK_SPACE 300 #define TK_COMMENT 301 #define TK_ILLEGAL 302 diff --git a/src/kit/shell/src/shellAuto.c b/src/kit/shell/src/shellAuto.c index 8622b201a6fe6666476f0ac9916aebc169b78923..cff639f88546fdd80f7536e564fab8223f5d082b 100644 --- a/src/kit/shell/src/shellAuto.c +++ b/src/kit/shell/src/shellAuto.c @@ -74,6 +74,7 @@ SWords shellCommands[] = { {"alter local tmrDebugFlag 143;", 0, 0, NULL}, {"alter topic", 0, 0, NULL}, {"alter user pass", 0, 0, NULL}, + {"alter user tags", 0, 0, NULL}, {"alter user privilege read", 0, 0, NULL}, {"alter user privilege write", 0, 0, NULL}, {"create table using tags(", 0, 0, NULL}, @@ -82,7 +83,7 @@ SWords shellCommands[] = { {"create dnode ", 0, 0, NULL}, {"create topic", 0, 0, NULL}, {"create function ", 0, 0, NULL}, - {"create user pass", 0, 0, NULL}, + {"create user pass tags", 0, 0, NULL}, {"compact vnode in", 0, 0, NULL}, {"describe ", 0, 0, NULL}, #ifdef TD_ENTERPRISE @@ -124,7 +125,7 @@ SWords shellCommands[] = { {"show variables;", 0, 0, NULL}, {"show vgroups;", 0, 0, NULL}, {"insert into values(", 0, 0, NULL}, - {"insert into using tags(", 0, 0, NULL}, + {"insert into using tags( ) values(", 0, 0, NULL}, {"use ", 0, 0, NULL}, {"quit", 0, 0, NULL} }; @@ -359,7 +360,8 @@ void showHelp() { alter local resetlog; \n\ alter local DebugFlag 143; \n\ alter topic \n\ - alter user pass\n\ + alter user pass ;\n\ + alter user tags ;\n\ alter user privilege read ;\n\ alter user privilege write ;\n\ ----- C ----- \n\ @@ -370,6 +372,7 @@ void showHelp() { create topic \n\ create function \n\ create user pass ;\n\ + create user pass tags ;\n\ compact vnode in (vgid,vgid,vgid);\n\ ----- D ----- \n\ describe ;\n\ diff --git a/src/mnode/inc/mnodeDef.h b/src/mnode/inc/mnodeDef.h index 5acc8dd85eb7fe8cd3f4b17f47e06161e39a6dc4..4bbbbb7d86a55aa97ec61935157d914e5a08e973 100644 --- a/src/mnode/inc/mnodeDef.h +++ b/src/mnode/inc/mnodeDef.h @@ -202,6 +202,20 @@ typedef struct SDbObj { pthread_mutex_t mutex; } SDbObj; +// old tags +typedef struct SUserObjOld { + char user[TSDB_USER_LEN]; + char pass[TSDB_KEY_LEN]; + char acct[TSDB_USER_LEN]; + int64_t createdTime; + int8_t superAuth; + int8_t writeAuth; + int8_t reserved[10]; + int8_t updateEnd[4]; + int32_t refCount; + struct SAcctObj * pAcct; +} SUserObjOld; + typedef struct SUserObj { char user[TSDB_USER_LEN]; char pass[TSDB_KEY_LEN]; @@ -210,6 +224,7 @@ typedef struct SUserObj { int8_t superAuth; int8_t writeAuth; int8_t reserved[10]; + char tags[TSDB_TAGS_LEN]; int8_t updateEnd[4]; int32_t refCount; struct SAcctObj * pAcct; diff --git a/src/mnode/inc/mnodeUser.h b/src/mnode/inc/mnodeUser.h index b8f08051203e229e5fee17982ab5a47de20c41a9..9ced4f33beb66ff15ad8f675889eaf67c826fcbe 100644 --- a/src/mnode/inc/mnodeUser.h +++ b/src/mnode/inc/mnodeUser.h @@ -30,7 +30,7 @@ void mnodeIncUserRef(SUserObj *pUser); void mnodeDecUserRef(SUserObj *pUser); SUserObj *mnodeGetUserFromConn(void *pConn); char * mnodeGetUserFromMsg(void *pMnodeMsg); -int32_t mnodeCreateUser(SAcctObj *pAcct, char *name, char *pass, void *pMsg); +int32_t mnodeCreateUser(SAcctObj *pAcct, char *name, char *pass, char* tags, void *pMsg); void mnodeDropAllUsers(SAcctObj *pAcct); int32_t mnodeCompactUsers(); diff --git a/src/mnode/src/mnodeShow.c b/src/mnode/src/mnodeShow.c index 169cd10b7e0bda62eb75c38e8ec241e6b9a76c40..b64f5dc5ea4dd4677b0b5faa6118072a4d529a46 100644 --- a/src/mnode/src/mnodeShow.c +++ b/src/mnode/src/mnodeShow.c @@ -343,6 +343,9 @@ static int32_t mnodeProcessConnectMsg(SMnodeMsg *pMsg) { memcpy(pConnectRsp->serverVersion, version, TSDB_VERSION_LEN); pConnectRsp->writeAuth = pUser->writeAuth; pConnectRsp->superAuth = pUser->superAuth; + strcpy(pConnectRsp->tags, pUser->tags); + if(pUser->tags[0]) + mInfo("TAGS server response to client. user=%s tags=%s", pUser->user, pUser->tags); mnodeGetMnodeEpSetForShell(&pConnectRsp->epSet, false); diff --git a/src/mnode/src/mnodeUser.c b/src/mnode/src/mnodeUser.c index b3e3ba6cd9698b08aceb86841bd858a7c6f05220..6d6ccb933e414fd8d07c5282753685603a7e1be2 100644 --- a/src/mnode/src/mnodeUser.c +++ b/src/mnode/src/mnodeUser.c @@ -132,9 +132,9 @@ static int32_t mnodeUserActionRestored() { if (numOfRows <= 0 && dnodeIsFirstDeploy()) { mInfo("dnode first deploy, create root user"); SAcctObj *pAcct = mnodeGetAcct(TSDB_DEFAULT_USER); - mnodeCreateUser(pAcct, TSDB_DEFAULT_USER, TSDB_DEFAULT_PASS, NULL); - mnodeCreateUser(pAcct, "monitor", tsInternalPass, NULL); - mnodeCreateUser(pAcct, "_"TSDB_DEFAULT_USER, tsInternalPass, NULL); + mnodeCreateUser(pAcct, TSDB_DEFAULT_USER, TSDB_DEFAULT_PASS, NULL, NULL); + mnodeCreateUser(pAcct, "monitor", tsInternalPass, NULL, NULL); + mnodeCreateUser(pAcct, "_"TSDB_DEFAULT_USER, tsInternalPass, NULL, NULL); mnodeDecAcctRef(pAcct); } @@ -229,7 +229,7 @@ static int32_t mnodeUpdateUser(SUserObj *pUser, void *pMsg) { return code; } -int32_t mnodeCreateUser(SAcctObj *pAcct, char *name, char *pass, void *pMsg) { +int32_t mnodeCreateUser(SAcctObj *pAcct, char *name, char *pass, char *tags, void *pMsg) { int32_t code = acctCheck(pAcct, ACCT_GRANT_USER); if (code != TSDB_CODE_SUCCESS) { return code; @@ -259,6 +259,10 @@ int32_t mnodeCreateUser(SAcctObj *pAcct, char *name, char *pass, void *pMsg) { tstrncpy(pUser->user, name, TSDB_USER_LEN); taosEncryptPass((uint8_t*) pass, strlen(pass), pUser->pass); strcpy(pUser->acct, pAcct->user); + if (tags) { + strcpy(pUser->tags, tags); + } + pUser->createdTime = taosGetTimestampMs(); pUser->superAuth = 0; pUser->writeAuth = 1; @@ -336,6 +340,14 @@ static int32_t mnodeGetUserMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *pCo pSchema[cols].bytes = htons(pShow->bytes[cols]); cols++; + // tags + pShow->bytes[cols] = TSDB_USER_LEN + VARSTR_HEADER_SIZE; + pSchema[cols].type = TSDB_DATA_TYPE_BINARY; + strcpy(pSchema[cols].name, "tags"); + pSchema[cols].bytes = htons(pShow->bytes[cols]); + cols++; + + pMeta->numOfColumns = htons(cols); strcpy(pMeta->tableFname, "show users"); pShow->numOfColumns = cols; @@ -417,6 +429,11 @@ static int32_t mnodeRetrieveUsers(SShowObj *pShow, char *data, int32_t rows, voi STR_WITH_MAXSIZE_TO_VARSTR(pWrite, pUser->acct, pShow->bytes[cols]); cols++; + // tags + pWrite = data + pShow->offset[cols] * rows + pShow->bytes[cols] * numOfRows; + STR_WITH_MAXSIZE_TO_VARSTR(pWrite, pUser->tags, pShow->bytes[cols]); + cols++; + numOfRows++; mnodeDecUserRef(pUser); } @@ -450,7 +467,7 @@ static int32_t mnodeProcessCreateUserMsg(SMnodeMsg *pMsg) { if (pOperUser->superAuth) { SCreateUserMsg *pCreate = pMsg->rpcMsg.pCont; - return mnodeCreateUser(pOperUser->pAcct, pCreate->user, pCreate->pass, pMsg); + return mnodeCreateUser(pOperUser->pAcct, pCreate->user, pCreate->pass, pCreate->tags, pMsg); } else { mError("user:%s, no rights to create user", pOperUser->user); return TSDB_CODE_MND_NO_RIGHTS; @@ -536,6 +553,36 @@ static int32_t mnodeProcessAlterUserMsg(SMnodeMsg *pMsg) { mError("user:%s, no rights to alter user", pOperUser->user); code = TSDB_CODE_MND_NO_RIGHTS; } + // ALTER TAGS + } else if ((pAlter->flag & TSDB_ALTER_USER_TAGS) != 0) { + // check has right + bool hasRight = false; + if (strcmp(pUser->user, TSDB_DEFAULT_USER) == 0) { + hasRight = false; + } else if (strcmp(pUser->user, pUser->acct) == 0) { + hasRight = false; + } else if (strcmp(pOperUser->user, TSDB_DEFAULT_USER) == 0) { + hasRight = true; + } else if (strcmp(pUser->user, pOperUser->user) == 0) { + hasRight = false; + } else if (pOperUser->superAuth) { + if (strcmp(pUser->user, TSDB_DEFAULT_USER) == 0) { + hasRight = false; + } else if (strcmp(pOperUser->acct, pUser->acct) != 0) { + hasRight = false; + } else { + hasRight = true; + } + } + + // set tags new values + if (hasRight) { + strcpy(pUser->tags, pAlter->tags); + code = mnodeUpdateUser(pUser, pMsg); + } else { + mError("user:%s, no rights to alter user tags", pOperUser->user); + code = TSDB_CODE_MND_NO_RIGHTS; + } } else { mError("user:%s, no rights to alter user", pOperUser->user); code = TSDB_CODE_MND_NO_RIGHTS; diff --git a/src/query/inc/qSqlparser.h b/src/query/inc/qSqlparser.h index 2a75d4d9923ef53d4b8f3eb5a91e8e3596ca1b08..84acd1d06007b4410f145be1c144e7facc3c8762 100644 --- a/src/query/inc/qSqlparser.h +++ b/src/query/inc/qSqlparser.h @@ -235,6 +235,7 @@ typedef struct SShowInfo { typedef struct SUserInfo { SStrToken user; SStrToken passwd; + SStrToken tags; // format like tag1,tag2,tag3 ... splite with ',' SStrToken privilege; int16_t type; } SUserInfo; @@ -358,9 +359,9 @@ void setShowOptions(SSqlInfo *pInfo, int32_t type, SStrToken* prefix, SStrToken* void setCreateDbInfo(SSqlInfo *pInfo, int32_t type, SStrToken *pToken, SCreateDbInfo *pDB, SStrToken *pIgExists); void setCreateAcctSql(SSqlInfo *pInfo, int32_t type, SStrToken *pName, SStrToken *pPwd, SCreateAcctInfo *pAcctInfo); -void setCreateUserSql(SSqlInfo *pInfo, SStrToken *pName, SStrToken *pPasswd); +void setCreateUserSql(SSqlInfo *pInfo, SStrToken *pName, SStrToken *pPasswd, SStrToken *pTags); void setKillSql(SSqlInfo *pInfo, int32_t type, SStrToken *ip); -void setAlterUserSql(SSqlInfo *pInfo, int16_t type, SStrToken *pName, SStrToken* pPwd, SStrToken *pPrivilege); +void setAlterUserSql(SSqlInfo *pInfo, int16_t type, SStrToken *pName, SStrToken* pPwd, SStrToken *pPrivilege, SStrToken *pTags); void setCompactVnodeSql(SSqlInfo *pInfo, int32_t type, SArray *pParam); diff --git a/src/query/inc/sql.y b/src/query/inc/sql.y index e55875f2706ef4b9794ce54c205e07907bc5d3f7..64b22009c34a13c973f3a24fd36e8d992d8d145c 100644 --- a/src/query/inc/sql.y +++ b/src/query/inc/sql.y @@ -161,8 +161,9 @@ cmd ::= DESC ids(X) cpxName(Y). { setDCLSqlElems(pInfo, TSDB_SQL_DESCRIBE_TABLE, 1, &X); } /////////////////////////////////THE ALTER STATEMENT//////////////////////////////////////// -cmd ::= ALTER USER ids(X) PASS ids(Y). { setAlterUserSql(pInfo, TSDB_ALTER_USER_PASSWD, &X, &Y, NULL); } -cmd ::= ALTER USER ids(X) PRIVILEGE ids(Y). { setAlterUserSql(pInfo, TSDB_ALTER_USER_PRIVILEGES, &X, NULL, &Y);} +cmd ::= ALTER USER ids(X) PASS ids(Y). { setAlterUserSql(pInfo, TSDB_ALTER_USER_PASSWD, &X, &Y, NULL, NULL);} +cmd ::= ALTER USER ids(X) PRIVILEGE ids(Y). { setAlterUserSql(pInfo, TSDB_ALTER_USER_PRIVILEGES, &X, NULL, &Y, NULL);} +cmd ::= ALTER USER ids(X) TAGS ids(Y). { setAlterUserSql(pInfo, TSDB_ALTER_USER_TAGS, &X, NULL, NULL, &Y);} cmd ::= ALTER DNODE ids(X) ids(Y). { setDCLSqlElems(pInfo, TSDB_SQL_CFG_DNODE, 2, &X, &Y); } cmd ::= ALTER DNODE ids(X) ids(Y) ids(Z). { setDCLSqlElems(pInfo, TSDB_SQL_CFG_DNODE, 3, &X, &Y, &Z); } cmd ::= ALTER LOCAL ids(X). { setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 1, &X); } @@ -201,7 +202,8 @@ cmd ::= CREATE DATABASE ifnotexists(Z) ids(X) db_optr(Y). { setCreateDbInfo(pIn cmd ::= CREATE TOPIC ifnotexists(Z) ids(X) topic_optr(Y). { setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &X, &Y, &Z);} cmd ::= CREATE FUNCTION ids(X) AS ids(Y) OUTPUTTYPE typename(Z) bufsize(B). { setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &X, &Y, &Z, &B, 1);} cmd ::= CREATE AGGREGATE FUNCTION ids(X) AS ids(Y) OUTPUTTYPE typename(Z) bufsize(B). { setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &X, &Y, &Z, &B, 2);} -cmd ::= CREATE USER ids(X) PASS ids(Y). { setCreateUserSql(pInfo, &X, &Y);} +cmd ::= CREATE USER ids(X) PASS ids(Y). { setCreateUserSql(pInfo, &X, &Y, NULL);} +cmd ::= CREATE USER ids(X) PASS ids(Y) TAGS ids(Z). { setCreateUserSql(pInfo, &X, &Y, &Z);} bufsize(Y) ::= . { Y.n = 0; } bufsize(Y) ::= BUFSIZE INTEGER(X). { Y = X; } diff --git a/src/query/src/qSqlParser.c b/src/query/src/qSqlParser.c index fe459ee460bbbcc0072f647b88f9a9ef51117a2a..e8981f3ab59479aea464fdef287cf11aeffbfffd 100644 --- a/src/query/src/qSqlParser.c +++ b/src/query/src/qSqlParser.c @@ -1473,7 +1473,19 @@ void setCompactVnodeSql(SSqlInfo *pInfo, int32_t type, SArray *pParam) { pInfo->list = pParam; } -void setCreateUserSql(SSqlInfo *pInfo, SStrToken *pName, SStrToken *pPasswd) { +bool removeSingleQuota(SStrToken* pStr) { + char * p1 = pStr->z; + char * p2 = pStr->z + pStr->n - 1; + if (pStr->n > 2 && *p1 == '\'' && *p2 == '\'') { + pStr->z ++; + pStr->n -= 2; + return true; + } + + return false; +} + +void setCreateUserSql(SSqlInfo *pInfo, SStrToken *pName, SStrToken *pPasswd, SStrToken *pTags) { pInfo->type = TSDB_SQL_CREATE_USER; if (pInfo->pMiscInfo == NULL) { pInfo->pMiscInfo = calloc(1, sizeof(SMiscInfo)); @@ -1483,9 +1495,14 @@ void setCreateUserSql(SSqlInfo *pInfo, SStrToken *pName, SStrToken *pPasswd) { pInfo->pMiscInfo->user.user = *pName; pInfo->pMiscInfo->user.passwd = *pPasswd; + // set tags if have + if (pTags) { + pInfo->pMiscInfo->user.tags = *pTags; + removeSingleQuota(&pInfo->pMiscInfo->user.tags); + } } -void setAlterUserSql(SSqlInfo *pInfo, int16_t type, SStrToken *pName, SStrToken* pPwd, SStrToken *pPrivilege) { +void setAlterUserSql(SSqlInfo *pInfo, int16_t type, SStrToken *pName, SStrToken* pPwd, SStrToken *pPrivilege, SStrToken *pTags) { pInfo->type = TSDB_SQL_ALTER_USER; if (pInfo->pMiscInfo == NULL) { pInfo->pMiscInfo = calloc(1, sizeof(SMiscInfo)); @@ -1508,6 +1525,14 @@ void setAlterUserSql(SSqlInfo *pInfo, int16_t type, SStrToken *pName, SStrToken* } else { pUser->privilege.type = TSDB_DATA_TYPE_NULL; } + + // tags + if (pTags != NULL) { + pUser->tags = *pTags; + removeSingleQuota(&pUser->tags); + } else { + pUser->tags.type = TSDB_DATA_TYPE_NULL; + } } void setKillSql(SSqlInfo *pInfo, int32_t type, SStrToken *id) { diff --git a/src/query/src/sql.c b/src/query/src/sql.c index c21482853ec6098d787932f9631c97a6dd54eaf7..2ae20c7ae52cd6ce9bafcdebbef97cc578f53116 100644 --- a/src/query/src/sql.c +++ b/src/query/src/sql.c @@ -130,17 +130,17 @@ typedef union { #define ParseARG_FETCH SSqlInfo* pInfo = yypParser->pInfo #define ParseARG_STORE yypParser->pInfo = pInfo #define YYFALLBACK 1 -#define YYNSTATE 414 -#define YYNRULE 327 +#define YYNSTATE 417 +#define YYNRULE 329 #define YYNTOKEN 206 -#define YY_MAX_SHIFT 413 -#define YY_MIN_SHIFTREDUCE 643 -#define YY_MAX_SHIFTREDUCE 969 -#define YY_ERROR_ACTION 970 -#define YY_ACCEPT_ACTION 971 -#define YY_NO_ACTION 972 -#define YY_MIN_REDUCE 973 -#define YY_MAX_REDUCE 1299 +#define YY_MAX_SHIFT 416 +#define YY_MIN_SHIFTREDUCE 647 +#define YY_MAX_SHIFTREDUCE 975 +#define YY_ERROR_ACTION 976 +#define YY_ACCEPT_ACTION 977 +#define YY_NO_ACTION 978 +#define YY_MIN_REDUCE 979 +#define YY_MAX_REDUCE 1307 /************* End control #defines *******************************************/ /* Define the yytestcase() macro to be a no-op if is not already defined @@ -206,198 +206,197 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (935) +#define YY_ACTTAB_COUNT (930) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 228, 694, 290, 173, 1208, 65, 1209, 330, 694, 695, - /* 10 */ 1272, 267, 1274, 195, 43, 44, 695, 47, 48, 412, - /* 20 */ 258, 280, 32, 31, 30, 1131, 65, 46, 363, 51, + /* 0 */ 230, 699, 1139, 175, 1216, 65, 1217, 332, 699, 700, + /* 10 */ 1280, 270, 1282, 1164, 43, 44, 700, 47, 48, 415, + /* 20 */ 261, 283, 32, 31, 30, 736, 65, 46, 366, 51, /* 30 */ 49, 52, 50, 37, 36, 35, 34, 33, 42, 41, - /* 40 */ 265, 110, 40, 39, 38, 43, 44, 1132, 47, 48, - /* 50 */ 260, 778, 280, 32, 31, 30, 96, 1129, 46, 363, + /* 40 */ 268, 24, 40, 39, 38, 43, 44, 1140, 47, 48, + /* 50 */ 263, 1280, 283, 32, 31, 30, 314, 1137, 46, 366, /* 60 */ 51, 49, 52, 50, 37, 36, 35, 34, 33, 42, - /* 70 */ 41, 270, 1147, 40, 39, 38, 311, 310, 1129, 43, - /* 80 */ 44, 730, 47, 48, 388, 387, 280, 32, 31, 30, - /* 90 */ 261, 95, 46, 363, 51, 49, 52, 50, 37, 36, - /* 100 */ 35, 34, 33, 42, 41, 24, 226, 40, 39, 38, - /* 110 */ 43, 44, 13, 47, 48, 1272, 1272, 280, 32, 31, - /* 120 */ 30, 1122, 64, 46, 363, 51, 49, 52, 50, 37, - /* 130 */ 36, 35, 34, 33, 42, 41, 272, 82, 40, 39, - /* 140 */ 38, 43, 45, 1132, 47, 48, 114, 93, 280, 32, - /* 150 */ 31, 30, 359, 892, 46, 363, 51, 49, 52, 50, - /* 160 */ 37, 36, 35, 34, 33, 42, 41, 296, 273, 40, - /* 170 */ 39, 38, 44, 227, 47, 48, 300, 299, 280, 32, - /* 180 */ 31, 30, 83, 1272, 46, 363, 51, 49, 52, 50, - /* 190 */ 37, 36, 35, 34, 33, 42, 41, 694, 140, 40, - /* 200 */ 39, 38, 47, 48, 274, 695, 280, 32, 31, 30, - /* 210 */ 398, 1132, 46, 363, 51, 49, 52, 50, 37, 36, - /* 220 */ 35, 34, 33, 42, 41, 852, 853, 40, 39, 38, - /* 230 */ 398, 73, 357, 405, 404, 356, 355, 354, 403, 353, - /* 240 */ 352, 351, 402, 350, 401, 400, 644, 645, 646, 647, - /* 250 */ 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, - /* 260 */ 167, 101, 259, 1090, 1078, 1079, 1080, 1081, 1082, 1083, - /* 270 */ 1084, 1085, 1086, 1087, 1088, 1089, 1091, 1092, 25, 840, - /* 280 */ 252, 908, 362, 843, 896, 85, 899, 188, 902, 138, - /* 290 */ 132, 143, 166, 164, 163, 242, 142, 312, 148, 151, - /* 300 */ 141, 74, 244, 290, 277, 361, 320, 145, 154, 153, - /* 310 */ 152, 243, 316, 317, 196, 371, 101, 256, 257, 1156, - /* 320 */ 1262, 365, 279, 252, 908, 1147, 29, 896, 86, 899, - /* 330 */ 1272, 902, 51, 49, 52, 50, 37, 36, 35, 34, - /* 340 */ 33, 42, 41, 262, 6, 40, 39, 38, 65, 112, - /* 350 */ 806, 694, 232, 803, 115, 804, 74, 805, 313, 695, - /* 360 */ 256, 257, 1272, 5, 68, 199, 53, 1294, 224, 29, - /* 370 */ 198, 121, 126, 117, 125, 411, 409, 671, 1272, 303, - /* 380 */ 1275, 91, 1111, 1112, 61, 1115, 285, 286, 253, 346, - /* 390 */ 1116, 1153, 293, 271, 1114, 334, 107, 283, 106, 263, - /* 400 */ 1129, 1021, 1219, 909, 903, 905, 289, 89, 209, 53, - /* 410 */ 898, 276, 901, 37, 36, 35, 34, 33, 42, 41, - /* 420 */ 233, 234, 40, 39, 38, 219, 217, 215, 904, 281, - /* 430 */ 1272, 1272, 214, 158, 157, 156, 155, 57, 73, 777, - /* 440 */ 405, 404, 971, 413, 98, 403, 909, 903, 905, 402, - /* 450 */ 65, 401, 400, 1098, 65, 1096, 1097, 42, 41, 65, - /* 460 */ 1099, 40, 39, 38, 1100, 65, 1101, 1102, 65, 65, - /* 470 */ 65, 904, 807, 287, 65, 228, 897, 284, 900, 282, - /* 480 */ 872, 374, 373, 359, 307, 1272, 291, 1275, 288, 290, - /* 490 */ 383, 382, 361, 228, 1147, 375, 40, 39, 38, 376, - /* 500 */ 364, 824, 1129, 1272, 377, 1275, 1129, 92, 245, 333, - /* 510 */ 378, 1129, 304, 384, 385, 386, 65, 1129, 1272, 390, - /* 520 */ 1129, 1129, 1129, 246, 247, 290, 1129, 248, 249, 1258, - /* 530 */ 368, 906, 1257, 1272, 1272, 1256, 1130, 1272, 1272, 1272, - /* 540 */ 871, 1113, 1272, 254, 255, 1272, 230, 231, 235, 229, - /* 550 */ 236, 237, 239, 1272, 1272, 240, 1272, 1272, 1272, 1272, - /* 560 */ 1272, 1272, 1272, 241, 238, 1272, 821, 225, 1128, 1206, - /* 570 */ 109, 1207, 108, 1272, 1272, 1031, 1022, 1272, 406, 1059, - /* 580 */ 1, 197, 209, 209, 3, 210, 305, 99, 849, 828, - /* 590 */ 315, 314, 859, 860, 788, 10, 338, 907, 790, 340, - /* 600 */ 66, 789, 175, 60, 278, 943, 77, 54, 66, 910, - /* 610 */ 66, 367, 77, 113, 693, 77, 15, 1286, 14, 9, - /* 620 */ 131, 1218, 130, 9, 17, 268, 16, 307, 9, 813, - /* 630 */ 811, 814, 812, 19, 366, 18, 341, 1215, 913, 380, - /* 640 */ 379, 137, 21, 136, 20, 895, 150, 149, 191, 1214, - /* 650 */ 269, 389, 169, 26, 301, 171, 172, 1127, 1155, 1166, - /* 660 */ 1163, 1164, 1148, 308, 1168, 174, 179, 326, 1198, 1123, - /* 670 */ 1197, 1196, 1195, 190, 192, 165, 1121, 193, 194, 1299, - /* 680 */ 407, 1036, 343, 344, 345, 348, 349, 75, 839, 222, - /* 690 */ 71, 360, 1030, 372, 1293, 128, 27, 319, 1292, 1289, - /* 700 */ 200, 381, 1285, 134, 1284, 1281, 201, 264, 321, 323, - /* 710 */ 1056, 72, 67, 87, 1145, 180, 76, 84, 223, 335, - /* 720 */ 28, 1018, 329, 331, 144, 327, 182, 1016, 146, 147, - /* 730 */ 185, 1014, 1013, 292, 212, 181, 213, 1010, 1009, 1008, - /* 740 */ 1007, 1006, 1005, 1004, 216, 218, 996, 220, 993, 221, - /* 750 */ 989, 325, 322, 168, 318, 90, 306, 1125, 97, 94, - /* 760 */ 102, 324, 347, 399, 139, 391, 392, 393, 88, 395, - /* 770 */ 275, 342, 394, 396, 397, 170, 968, 295, 967, 250, - /* 780 */ 294, 251, 1035, 122, 123, 1034, 298, 1012, 297, 966, - /* 790 */ 949, 948, 302, 11, 307, 816, 337, 309, 100, 204, - /* 800 */ 159, 203, 1057, 202, 206, 205, 208, 1011, 207, 160, - /* 810 */ 1003, 2, 161, 1094, 336, 1002, 183, 162, 995, 1058, - /* 820 */ 189, 187, 184, 186, 59, 4, 994, 58, 103, 848, - /* 830 */ 80, 846, 1104, 842, 845, 841, 81, 178, 850, 176, - /* 840 */ 266, 861, 177, 22, 855, 104, 69, 857, 105, 328, - /* 850 */ 366, 332, 23, 70, 111, 12, 55, 339, 116, 114, - /* 860 */ 119, 56, 62, 708, 743, 741, 740, 118, 739, 63, - /* 870 */ 120, 737, 736, 735, 732, 358, 698, 124, 7, 940, - /* 880 */ 938, 912, 941, 911, 939, 8, 370, 127, 914, 78, - /* 890 */ 369, 66, 129, 810, 79, 133, 780, 779, 135, 776, - /* 900 */ 724, 722, 714, 720, 809, 716, 718, 712, 710, 746, - /* 910 */ 745, 744, 742, 738, 734, 733, 211, 696, 661, 973, - /* 920 */ 670, 408, 668, 972, 972, 972, 972, 972, 972, 972, - /* 930 */ 972, 972, 972, 972, 410, + /* 70 */ 41, 273, 228, 40, 39, 38, 313, 312, 1137, 275, + /* 80 */ 43, 44, 1280, 47, 48, 1161, 1140, 283, 32, 31, + /* 90 */ 30, 362, 95, 46, 366, 51, 49, 52, 50, 37, + /* 100 */ 36, 35, 34, 33, 42, 41, 229, 1270, 40, 39, + /* 110 */ 38, 43, 44, 401, 47, 48, 1280, 1280, 283, 32, + /* 120 */ 31, 30, 1122, 64, 46, 366, 51, 49, 52, 50, + /* 130 */ 37, 36, 35, 34, 33, 42, 41, 1302, 234, 40, + /* 140 */ 39, 38, 277, 43, 45, 784, 47, 48, 1280, 1140, + /* 150 */ 283, 32, 31, 30, 65, 898, 46, 366, 51, 49, + /* 160 */ 52, 50, 37, 36, 35, 34, 33, 42, 41, 858, + /* 170 */ 859, 40, 39, 38, 44, 298, 47, 48, 391, 390, + /* 180 */ 283, 32, 31, 30, 302, 301, 46, 366, 51, 49, + /* 190 */ 52, 50, 37, 36, 35, 34, 33, 42, 41, 699, + /* 200 */ 141, 40, 39, 38, 47, 48, 1136, 700, 283, 32, + /* 210 */ 31, 30, 362, 401, 46, 366, 51, 49, 52, 50, + /* 220 */ 37, 36, 35, 34, 33, 42, 41, 371, 190, 40, + /* 230 */ 39, 38, 73, 360, 408, 407, 359, 358, 357, 406, + /* 240 */ 356, 355, 354, 405, 353, 404, 403, 322, 648, 649, + /* 250 */ 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, + /* 260 */ 660, 661, 169, 101, 262, 1098, 1086, 1087, 1088, 1089, + /* 270 */ 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1099, 1100, + /* 280 */ 25, 51, 49, 52, 50, 37, 36, 35, 34, 33, + /* 290 */ 42, 41, 115, 699, 40, 39, 38, 244, 235, 254, + /* 300 */ 914, 700, 74, 902, 246, 905, 281, 908, 1280, 1028, + /* 310 */ 156, 155, 154, 245, 1155, 112, 211, 236, 374, 101, + /* 320 */ 37, 36, 35, 34, 33, 42, 41, 1280, 1124, 40, + /* 330 */ 39, 38, 264, 977, 416, 919, 258, 259, 254, 914, + /* 340 */ 368, 1214, 902, 1215, 905, 29, 908, 901, 1119, 1120, + /* 350 */ 61, 1123, 5, 68, 201, 40, 39, 38, 74, 200, + /* 360 */ 122, 127, 118, 126, 247, 812, 336, 107, 809, 106, + /* 370 */ 810, 904, 811, 907, 1280, 258, 259, 409, 1067, 349, + /* 380 */ 57, 305, 280, 91, 29, 1155, 53, 42, 41, 286, + /* 390 */ 255, 40, 39, 38, 295, 248, 292, 139, 133, 144, + /* 400 */ 1294, 288, 289, 306, 143, 1280, 149, 153, 142, 315, + /* 410 */ 221, 219, 217, 82, 65, 279, 146, 216, 160, 159, + /* 420 */ 158, 157, 915, 909, 911, 53, 73, 365, 408, 407, + /* 430 */ 65, 846, 284, 406, 903, 849, 906, 405, 1130, 404, + /* 440 */ 403, 1106, 1155, 1104, 1105, 1227, 226, 910, 1107, 65, + /* 450 */ 364, 830, 1108, 65, 1109, 1110, 1280, 83, 1283, 274, + /* 460 */ 265, 915, 909, 911, 318, 319, 1137, 282, 65, 287, + /* 470 */ 65, 285, 65, 377, 376, 378, 294, 13, 291, 230, + /* 480 */ 386, 385, 1137, 65, 65, 276, 910, 813, 290, 1280, + /* 490 */ 6, 1283, 912, 827, 379, 1226, 230, 249, 380, 250, + /* 500 */ 271, 1137, 152, 151, 150, 1137, 1280, 1280, 1283, 1280, + /* 510 */ 114, 93, 109, 381, 108, 387, 1223, 388, 1, 199, + /* 520 */ 1137, 10, 1137, 251, 1137, 414, 412, 675, 389, 393, + /* 530 */ 168, 166, 165, 1280, 1266, 1137, 1137, 1265, 1264, 834, + /* 540 */ 256, 92, 257, 293, 1280, 878, 232, 1280, 1280, 233, + /* 550 */ 1280, 266, 1280, 237, 197, 913, 1280, 231, 238, 1280, + /* 560 */ 239, 241, 242, 1280, 243, 98, 240, 1280, 1280, 227, + /* 570 */ 1280, 1280, 1280, 293, 1280, 1121, 1280, 293, 293, 1280, + /* 580 */ 1038, 110, 99, 307, 198, 1029, 855, 211, 367, 1138, + /* 590 */ 3, 212, 211, 317, 316, 865, 96, 66, 866, 364, + /* 600 */ 177, 85, 1222, 794, 309, 877, 370, 272, 340, 77, + /* 610 */ 796, 342, 54, 795, 949, 343, 335, 66, 60, 193, + /* 620 */ 916, 309, 66, 698, 77, 113, 89, 77, 9, 369, + /* 630 */ 819, 15, 820, 14, 9, 392, 132, 9, 131, 17, + /* 640 */ 817, 16, 818, 86, 383, 382, 19, 171, 18, 138, + /* 650 */ 303, 137, 173, 21, 174, 20, 1135, 1163, 783, 26, + /* 660 */ 1174, 1171, 1172, 1156, 310, 1176, 176, 181, 328, 194, + /* 670 */ 1206, 1205, 1204, 1203, 192, 1131, 1129, 195, 196, 1044, + /* 680 */ 345, 346, 347, 348, 351, 1307, 167, 352, 75, 224, + /* 690 */ 71, 410, 363, 1037, 845, 375, 1301, 129, 1300, 1297, + /* 700 */ 202, 27, 321, 87, 1153, 384, 267, 323, 325, 1293, + /* 710 */ 135, 1292, 1289, 203, 1064, 84, 72, 67, 337, 76, + /* 720 */ 225, 1025, 145, 183, 1023, 147, 148, 1021, 28, 1020, + /* 730 */ 333, 331, 1019, 186, 184, 260, 214, 215, 1016, 329, + /* 740 */ 182, 1015, 1014, 327, 1013, 1012, 1011, 324, 1010, 218, + /* 750 */ 220, 1002, 222, 999, 223, 995, 320, 94, 170, 350, + /* 760 */ 90, 308, 402, 1133, 140, 97, 394, 102, 326, 395, + /* 770 */ 396, 397, 398, 399, 88, 400, 278, 172, 344, 974, + /* 780 */ 296, 297, 973, 300, 299, 252, 253, 972, 955, 954, + /* 790 */ 123, 1042, 1041, 124, 309, 304, 339, 11, 100, 822, + /* 800 */ 311, 1018, 58, 1017, 1009, 210, 205, 1065, 206, 204, + /* 810 */ 207, 208, 161, 209, 162, 2, 163, 164, 1008, 103, + /* 820 */ 1102, 185, 338, 1066, 1001, 1000, 854, 59, 187, 188, + /* 830 */ 189, 191, 4, 80, 852, 848, 847, 1112, 81, 180, + /* 840 */ 856, 851, 178, 269, 867, 179, 69, 861, 104, 369, + /* 850 */ 863, 105, 330, 334, 111, 70, 12, 22, 23, 55, + /* 860 */ 341, 56, 114, 117, 116, 62, 120, 714, 749, 747, + /* 870 */ 746, 745, 743, 119, 742, 741, 63, 121, 738, 703, + /* 880 */ 125, 946, 7, 944, 361, 918, 947, 917, 945, 920, + /* 890 */ 8, 372, 373, 78, 128, 130, 66, 79, 134, 786, + /* 900 */ 136, 785, 782, 730, 728, 720, 726, 722, 724, 718, + /* 910 */ 816, 716, 815, 752, 751, 750, 748, 744, 740, 739, + /* 920 */ 213, 665, 979, 701, 674, 672, 978, 411, 978, 413, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 280, 1, 209, 209, 288, 209, 290, 291, 1, 9, - /* 10 */ 290, 1, 292, 220, 14, 15, 9, 17, 18, 209, - /* 20 */ 210, 21, 22, 23, 24, 262, 209, 27, 28, 29, + /* 0 */ 280, 1, 262, 209, 288, 209, 290, 291, 1, 9, + /* 10 */ 290, 1, 292, 209, 14, 15, 9, 17, 18, 209, + /* 20 */ 210, 21, 22, 23, 24, 5, 209, 27, 28, 29, /* 30 */ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - /* 40 */ 255, 263, 42, 43, 44, 14, 15, 262, 17, 18, - /* 50 */ 254, 5, 21, 22, 23, 24, 278, 261, 27, 28, + /* 40 */ 255, 280, 42, 43, 44, 14, 15, 262, 17, 18, + /* 50 */ 254, 290, 21, 22, 23, 24, 285, 261, 27, 28, /* 60 */ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - /* 70 */ 39, 254, 259, 42, 43, 44, 282, 283, 261, 14, - /* 80 */ 15, 5, 17, 18, 38, 39, 21, 22, 23, 24, - /* 90 */ 277, 91, 27, 28, 29, 30, 31, 32, 33, 34, - /* 100 */ 35, 36, 37, 38, 39, 280, 280, 42, 43, 44, - /* 110 */ 14, 15, 87, 17, 18, 290, 290, 21, 22, 23, - /* 120 */ 24, 209, 91, 27, 28, 29, 30, 31, 32, 33, - /* 130 */ 34, 35, 36, 37, 38, 39, 255, 102, 42, 43, - /* 140 */ 44, 14, 15, 262, 17, 18, 121, 122, 21, 22, - /* 150 */ 23, 24, 89, 88, 27, 28, 29, 30, 31, 32, - /* 160 */ 33, 34, 35, 36, 37, 38, 39, 151, 256, 42, - /* 170 */ 43, 44, 15, 280, 17, 18, 160, 161, 21, 22, - /* 180 */ 23, 24, 147, 290, 27, 28, 29, 30, 31, 32, - /* 190 */ 33, 34, 35, 36, 37, 38, 39, 1, 83, 42, - /* 200 */ 43, 44, 17, 18, 255, 9, 21, 22, 23, 24, - /* 210 */ 95, 262, 27, 28, 29, 30, 31, 32, 33, 34, - /* 220 */ 35, 36, 37, 38, 39, 133, 134, 42, 43, 44, - /* 230 */ 95, 103, 104, 105, 106, 107, 108, 109, 110, 111, - /* 240 */ 112, 113, 114, 115, 116, 117, 50, 51, 52, 53, - /* 250 */ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - /* 260 */ 64, 87, 66, 233, 234, 235, 236, 237, 238, 239, - /* 270 */ 240, 241, 242, 243, 244, 245, 246, 247, 49, 5, - /* 280 */ 1, 2, 25, 9, 5, 102, 7, 267, 9, 67, - /* 290 */ 68, 69, 67, 68, 69, 66, 74, 285, 76, 77, - /* 300 */ 78, 127, 73, 209, 216, 48, 286, 85, 79, 80, - /* 310 */ 81, 82, 38, 39, 220, 86, 87, 38, 39, 209, - /* 320 */ 280, 42, 65, 1, 2, 259, 47, 5, 145, 7, - /* 330 */ 290, 9, 29, 30, 31, 32, 33, 34, 35, 36, - /* 340 */ 37, 38, 39, 277, 87, 42, 43, 44, 209, 217, - /* 350 */ 2, 1, 280, 5, 217, 7, 127, 9, 285, 9, - /* 360 */ 38, 39, 290, 67, 68, 69, 87, 262, 280, 47, - /* 370 */ 74, 75, 76, 77, 78, 70, 71, 72, 290, 150, - /* 380 */ 292, 152, 250, 251, 252, 253, 38, 39, 159, 93, - /* 390 */ 253, 281, 163, 254, 0, 287, 288, 73, 290, 125, - /* 400 */ 261, 215, 249, 124, 125, 126, 73, 87, 222, 87, - /* 410 */ 5, 216, 7, 33, 34, 35, 36, 37, 38, 39, - /* 420 */ 280, 280, 42, 43, 44, 67, 68, 69, 149, 216, - /* 430 */ 290, 290, 74, 75, 76, 77, 78, 87, 103, 119, - /* 440 */ 105, 106, 207, 208, 88, 110, 124, 125, 126, 114, - /* 450 */ 209, 116, 117, 233, 209, 235, 236, 38, 39, 209, - /* 460 */ 240, 42, 43, 44, 244, 209, 246, 247, 209, 209, - /* 470 */ 209, 149, 124, 125, 209, 280, 5, 153, 7, 155, - /* 480 */ 81, 157, 158, 89, 128, 290, 153, 292, 155, 209, - /* 490 */ 157, 158, 48, 280, 259, 254, 42, 43, 44, 254, - /* 500 */ 220, 42, 261, 290, 254, 292, 261, 217, 280, 65, - /* 510 */ 254, 261, 277, 254, 254, 254, 209, 261, 290, 254, - /* 520 */ 261, 261, 261, 280, 280, 209, 261, 280, 280, 280, - /* 530 */ 16, 126, 280, 290, 290, 280, 220, 290, 290, 290, - /* 540 */ 141, 251, 290, 280, 280, 290, 280, 280, 280, 280, - /* 550 */ 280, 280, 280, 290, 290, 280, 290, 290, 290, 290, - /* 560 */ 290, 290, 290, 280, 280, 290, 102, 280, 261, 288, - /* 570 */ 288, 290, 290, 290, 290, 215, 215, 290, 231, 232, - /* 580 */ 218, 219, 222, 222, 213, 214, 88, 88, 88, 130, - /* 590 */ 38, 39, 88, 88, 88, 131, 88, 126, 88, 88, - /* 600 */ 102, 88, 102, 87, 1, 88, 102, 102, 102, 88, - /* 610 */ 102, 25, 102, 102, 88, 102, 154, 262, 156, 102, - /* 620 */ 154, 249, 156, 102, 154, 249, 156, 128, 102, 5, - /* 630 */ 5, 7, 7, 154, 48, 156, 120, 249, 124, 38, - /* 640 */ 39, 154, 154, 156, 156, 42, 83, 84, 257, 249, - /* 650 */ 249, 249, 209, 279, 209, 209, 209, 209, 209, 209, - /* 660 */ 209, 209, 259, 259, 209, 209, 209, 209, 289, 259, - /* 670 */ 289, 289, 289, 264, 209, 65, 209, 209, 209, 265, - /* 680 */ 89, 209, 209, 209, 209, 209, 209, 209, 126, 209, - /* 690 */ 209, 209, 209, 209, 209, 209, 148, 284, 209, 209, - /* 700 */ 209, 209, 209, 209, 209, 209, 209, 284, 284, 284, - /* 710 */ 209, 209, 209, 144, 276, 275, 209, 146, 209, 139, - /* 720 */ 143, 209, 137, 142, 209, 136, 273, 209, 209, 209, - /* 730 */ 270, 209, 209, 209, 209, 274, 209, 209, 209, 209, - /* 740 */ 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, - /* 750 */ 209, 135, 138, 211, 132, 212, 211, 211, 211, 123, - /* 760 */ 211, 211, 94, 118, 101, 100, 56, 97, 211, 60, - /* 770 */ 211, 211, 99, 98, 96, 131, 5, 5, 5, 211, - /* 780 */ 162, 211, 221, 217, 217, 221, 5, 211, 162, 5, - /* 790 */ 105, 104, 151, 87, 128, 88, 120, 102, 129, 224, - /* 800 */ 212, 228, 230, 229, 225, 227, 223, 211, 226, 212, - /* 810 */ 211, 218, 212, 248, 258, 211, 272, 212, 211, 232, - /* 820 */ 265, 268, 271, 269, 266, 213, 211, 87, 102, 88, - /* 830 */ 102, 126, 248, 5, 126, 5, 87, 102, 88, 87, - /* 840 */ 1, 88, 87, 140, 88, 87, 102, 88, 87, 87, - /* 850 */ 48, 1, 140, 102, 91, 87, 87, 120, 83, 121, - /* 860 */ 75, 87, 92, 5, 9, 5, 5, 91, 5, 92, - /* 870 */ 91, 5, 5, 5, 5, 16, 90, 83, 87, 9, - /* 880 */ 9, 88, 9, 88, 9, 87, 64, 156, 124, 17, - /* 890 */ 28, 102, 156, 126, 17, 156, 5, 5, 156, 88, - /* 900 */ 5, 5, 5, 5, 126, 5, 5, 5, 5, 5, - /* 910 */ 5, 5, 5, 5, 5, 5, 102, 90, 65, 0, - /* 920 */ 9, 22, 9, 293, 293, 293, 293, 293, 293, 293, - /* 930 */ 293, 293, 293, 293, 22, 293, 293, 293, 293, 293, + /* 70 */ 39, 254, 280, 42, 43, 44, 282, 283, 261, 255, + /* 80 */ 14, 15, 290, 17, 18, 281, 262, 21, 22, 23, + /* 90 */ 24, 90, 92, 27, 28, 29, 30, 31, 32, 33, + /* 100 */ 34, 35, 36, 37, 38, 39, 280, 280, 42, 43, + /* 110 */ 44, 14, 15, 96, 17, 18, 290, 290, 21, 22, + /* 120 */ 23, 24, 0, 92, 27, 28, 29, 30, 31, 32, + /* 130 */ 33, 34, 35, 36, 37, 38, 39, 262, 280, 42, + /* 140 */ 43, 44, 255, 14, 15, 5, 17, 18, 290, 262, + /* 150 */ 21, 22, 23, 24, 209, 89, 27, 28, 29, 30, + /* 160 */ 31, 32, 33, 34, 35, 36, 37, 38, 39, 133, + /* 170 */ 134, 42, 43, 44, 15, 151, 17, 18, 38, 39, + /* 180 */ 21, 22, 23, 24, 160, 161, 27, 28, 29, 30, + /* 190 */ 31, 32, 33, 34, 35, 36, 37, 38, 39, 1, + /* 200 */ 83, 42, 43, 44, 17, 18, 261, 9, 21, 22, + /* 210 */ 23, 24, 90, 96, 27, 28, 29, 30, 31, 32, + /* 220 */ 33, 34, 35, 36, 37, 38, 39, 16, 267, 42, + /* 230 */ 43, 44, 104, 105, 106, 107, 108, 109, 110, 111, + /* 240 */ 112, 113, 114, 115, 116, 117, 118, 286, 50, 51, + /* 250 */ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + /* 260 */ 62, 63, 64, 88, 66, 233, 234, 235, 236, 237, + /* 270 */ 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + /* 280 */ 49, 29, 30, 31, 32, 33, 34, 35, 36, 37, + /* 290 */ 38, 39, 217, 1, 42, 43, 44, 66, 280, 1, + /* 300 */ 2, 9, 127, 5, 73, 7, 1, 9, 290, 215, + /* 310 */ 79, 80, 81, 82, 259, 217, 222, 280, 87, 88, + /* 320 */ 33, 34, 35, 36, 37, 38, 39, 290, 253, 42, + /* 330 */ 43, 44, 277, 207, 208, 124, 38, 39, 1, 2, + /* 340 */ 42, 288, 5, 290, 7, 47, 9, 42, 250, 251, + /* 350 */ 252, 253, 67, 68, 69, 42, 43, 44, 127, 74, + /* 360 */ 75, 76, 77, 78, 280, 2, 287, 288, 5, 290, + /* 370 */ 7, 5, 9, 7, 290, 38, 39, 231, 232, 94, + /* 380 */ 88, 150, 216, 152, 47, 259, 88, 38, 39, 73, + /* 390 */ 159, 42, 43, 44, 163, 280, 73, 67, 68, 69, + /* 400 */ 262, 38, 39, 277, 74, 290, 76, 77, 78, 285, + /* 410 */ 67, 68, 69, 103, 209, 216, 86, 74, 75, 76, + /* 420 */ 77, 78, 124, 125, 126, 88, 104, 25, 106, 107, + /* 430 */ 209, 5, 216, 111, 5, 9, 7, 115, 209, 117, + /* 440 */ 118, 233, 259, 235, 236, 249, 280, 149, 240, 209, + /* 450 */ 48, 42, 244, 209, 246, 247, 290, 147, 292, 254, + /* 460 */ 277, 124, 125, 126, 38, 39, 261, 65, 209, 153, + /* 470 */ 209, 155, 209, 157, 158, 254, 153, 88, 155, 280, + /* 480 */ 157, 158, 261, 209, 209, 256, 149, 124, 125, 290, + /* 490 */ 88, 292, 126, 103, 254, 249, 280, 280, 254, 280, + /* 500 */ 249, 261, 83, 84, 85, 261, 290, 290, 292, 290, + /* 510 */ 121, 122, 288, 254, 290, 254, 249, 254, 218, 219, + /* 520 */ 261, 131, 261, 280, 261, 70, 71, 72, 254, 254, + /* 530 */ 67, 68, 69, 290, 280, 261, 261, 280, 280, 130, + /* 540 */ 280, 217, 280, 209, 290, 81, 280, 290, 290, 280, + /* 550 */ 290, 125, 290, 280, 220, 126, 290, 280, 280, 290, + /* 560 */ 280, 280, 280, 290, 280, 89, 280, 290, 290, 280, + /* 570 */ 290, 290, 290, 209, 290, 251, 290, 209, 209, 290, + /* 580 */ 215, 263, 89, 89, 220, 215, 89, 222, 220, 220, + /* 590 */ 213, 214, 222, 38, 39, 89, 278, 103, 89, 48, + /* 600 */ 103, 103, 249, 89, 128, 141, 25, 249, 89, 103, + /* 610 */ 89, 89, 103, 89, 89, 85, 65, 103, 88, 257, + /* 620 */ 89, 128, 103, 89, 103, 103, 88, 103, 103, 48, + /* 630 */ 5, 154, 7, 156, 103, 249, 154, 103, 156, 154, + /* 640 */ 5, 156, 7, 145, 38, 39, 154, 209, 156, 154, + /* 650 */ 209, 156, 209, 154, 209, 156, 209, 209, 120, 279, + /* 660 */ 209, 209, 209, 259, 259, 209, 209, 209, 209, 209, + /* 670 */ 289, 289, 289, 289, 264, 259, 209, 209, 209, 209, + /* 680 */ 209, 209, 209, 209, 209, 265, 65, 209, 209, 209, + /* 690 */ 209, 90, 209, 209, 126, 209, 209, 209, 209, 209, + /* 700 */ 209, 148, 284, 144, 276, 209, 284, 284, 284, 209, + /* 710 */ 209, 209, 209, 209, 209, 146, 209, 209, 139, 209, + /* 720 */ 209, 209, 209, 274, 209, 209, 209, 209, 143, 209, + /* 730 */ 142, 137, 209, 271, 273, 209, 209, 209, 209, 136, + /* 740 */ 275, 209, 209, 135, 209, 209, 209, 138, 209, 209, + /* 750 */ 209, 209, 209, 209, 209, 209, 132, 123, 211, 95, + /* 760 */ 212, 211, 119, 211, 102, 211, 101, 211, 211, 56, + /* 770 */ 98, 100, 60, 99, 211, 97, 211, 131, 211, 5, + /* 780 */ 162, 5, 5, 5, 162, 211, 211, 5, 106, 105, + /* 790 */ 217, 221, 221, 217, 128, 151, 85, 88, 129, 89, + /* 800 */ 103, 211, 88, 211, 211, 223, 228, 230, 224, 229, + /* 810 */ 227, 225, 212, 226, 212, 218, 212, 212, 211, 103, + /* 820 */ 248, 272, 258, 232, 211, 211, 89, 266, 270, 269, + /* 830 */ 268, 265, 213, 103, 126, 5, 5, 248, 88, 103, + /* 840 */ 89, 126, 88, 1, 89, 88, 103, 89, 88, 48, + /* 850 */ 89, 88, 88, 1, 92, 103, 88, 140, 140, 88, + /* 860 */ 85, 88, 121, 83, 85, 93, 75, 5, 9, 5, + /* 870 */ 5, 5, 5, 92, 5, 5, 93, 92, 5, 91, + /* 880 */ 83, 9, 88, 9, 16, 89, 9, 89, 9, 124, + /* 890 */ 88, 28, 64, 17, 156, 156, 103, 17, 156, 5, + /* 900 */ 156, 5, 89, 5, 5, 5, 5, 5, 5, 5, + /* 910 */ 126, 5, 126, 5, 5, 5, 5, 5, 5, 5, + /* 920 */ 103, 65, 0, 91, 9, 9, 293, 22, 293, 22, + /* 930 */ 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, /* 940 */ 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, /* 950 */ 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, /* 960 */ 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, @@ -417,127 +416,126 @@ static const YYCODETYPE yy_lookahead[] = { /* 1100 */ 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, /* 1110 */ 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, /* 1120 */ 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, - /* 1130 */ 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, - /* 1140 */ 293, + /* 1130 */ 293, 293, 293, 293, 293, 293, }; -#define YY_SHIFT_COUNT (413) +#define YY_SHIFT_COUNT (416) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (919) +#define YY_SHIFT_MAX (922) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 229, 128, 128, 335, 335, 63, 279, 322, 322, 322, - /* 10 */ 350, 7, 7, 7, 7, 7, 7, 7, 7, 7, - /* 20 */ 7, 7, 10, 10, 0, 196, 322, 322, 322, 322, - /* 30 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, - /* 40 */ 322, 322, 322, 322, 322, 322, 322, 322, 322, 322, - /* 50 */ 322, 322, 322, 322, 348, 348, 348, 174, 174, 92, - /* 60 */ 7, 394, 7, 7, 7, 7, 7, 115, 63, 10, - /* 70 */ 10, 135, 135, 76, 935, 935, 935, 348, 348, 348, - /* 80 */ 274, 274, 46, 46, 46, 46, 46, 46, 25, 46, - /* 90 */ 7, 7, 7, 7, 7, 7, 459, 7, 7, 7, - /* 100 */ 174, 174, 7, 7, 7, 7, 399, 399, 399, 399, - /* 110 */ 464, 174, 7, 7, 7, 7, 7, 7, 7, 7, + /* 0 */ 231, 128, 128, 322, 322, 1, 298, 337, 337, 337, + /* 10 */ 292, 7, 7, 7, 7, 7, 7, 7, 7, 7, + /* 20 */ 7, 7, 10, 10, 0, 198, 337, 337, 337, 337, + /* 30 */ 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, + /* 40 */ 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, + /* 50 */ 337, 337, 337, 337, 363, 363, 363, 175, 175, 36, + /* 60 */ 7, 122, 7, 7, 7, 7, 7, 117, 1, 10, + /* 70 */ 10, 17, 17, 20, 930, 930, 930, 363, 363, 363, + /* 80 */ 426, 426, 140, 140, 140, 140, 140, 140, 389, 140, + /* 90 */ 7, 7, 7, 7, 7, 7, 409, 7, 7, 7, + /* 100 */ 175, 175, 7, 7, 7, 7, 464, 464, 464, 464, + /* 110 */ 390, 175, 7, 7, 7, 7, 7, 7, 7, 7, /* 120 */ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, /* 130 */ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, /* 140 */ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, /* 150 */ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - /* 160 */ 7, 7, 7, 7, 7, 7, 7, 7, 548, 610, - /* 170 */ 591, 610, 610, 610, 610, 562, 562, 562, 562, 610, - /* 180 */ 569, 571, 580, 577, 581, 585, 589, 616, 614, 622, - /* 190 */ 548, 636, 610, 610, 610, 668, 668, 645, 63, 63, - /* 200 */ 610, 610, 663, 665, 710, 670, 673, 709, 675, 678, - /* 210 */ 645, 76, 610, 610, 591, 591, 610, 591, 610, 591, - /* 220 */ 610, 610, 935, 935, 31, 65, 96, 96, 96, 127, - /* 230 */ 157, 185, 303, 303, 303, 303, 303, 303, 380, 380, - /* 240 */ 380, 380, 296, 222, 358, 419, 419, 419, 419, 419, - /* 250 */ 324, 333, 257, 16, 454, 454, 405, 471, 305, 225, - /* 260 */ 498, 356, 499, 552, 500, 504, 505, 444, 35, 183, - /* 270 */ 506, 508, 510, 511, 513, 516, 517, 521, 586, 603, - /* 280 */ 514, 526, 462, 466, 470, 624, 625, 601, 479, 487, - /* 290 */ 320, 488, 563, 644, 771, 618, 772, 773, 626, 781, - /* 300 */ 784, 685, 687, 641, 666, 676, 706, 669, 707, 740, - /* 310 */ 695, 726, 741, 728, 705, 708, 828, 830, 749, 750, - /* 320 */ 752, 753, 755, 756, 735, 758, 759, 761, 839, 762, - /* 330 */ 744, 703, 802, 850, 751, 712, 763, 768, 676, 769, - /* 340 */ 737, 774, 738, 775, 770, 776, 785, 858, 777, 779, - /* 350 */ 855, 860, 861, 863, 866, 867, 868, 869, 786, 859, - /* 360 */ 794, 870, 871, 791, 793, 795, 873, 875, 764, 798, - /* 370 */ 862, 822, 872, 731, 736, 789, 789, 789, 789, 767, - /* 380 */ 778, 877, 739, 742, 789, 789, 789, 891, 892, 811, - /* 390 */ 789, 895, 896, 897, 898, 900, 901, 902, 903, 904, - /* 400 */ 905, 906, 907, 908, 909, 910, 814, 827, 911, 899, - /* 410 */ 913, 912, 853, 919, + /* 160 */ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + /* 170 */ 553, 621, 601, 621, 621, 621, 621, 568, 568, 568, + /* 180 */ 568, 621, 559, 569, 579, 585, 588, 594, 603, 608, + /* 190 */ 609, 624, 553, 634, 621, 621, 621, 664, 664, 643, + /* 200 */ 1, 1, 621, 621, 662, 665, 713, 672, 671, 712, + /* 210 */ 674, 678, 643, 20, 621, 621, 601, 601, 621, 601, + /* 220 */ 621, 601, 621, 621, 930, 930, 31, 66, 97, 97, + /* 230 */ 97, 129, 159, 187, 252, 252, 252, 252, 252, 252, + /* 240 */ 287, 287, 287, 287, 285, 330, 343, 349, 349, 349, + /* 250 */ 349, 349, 316, 323, 402, 24, 313, 313, 366, 429, + /* 260 */ 419, 455, 463, 494, 476, 493, 555, 497, 506, 509, + /* 270 */ 551, 310, 498, 514, 519, 521, 522, 524, 530, 525, + /* 280 */ 531, 581, 305, 211, 534, 477, 482, 485, 625, 635, + /* 290 */ 606, 492, 495, 538, 499, 646, 774, 618, 776, 777, + /* 300 */ 622, 778, 782, 682, 684, 644, 666, 711, 709, 669, + /* 310 */ 710, 714, 697, 716, 737, 730, 708, 715, 830, 831, + /* 320 */ 750, 751, 754, 755, 757, 758, 736, 760, 761, 763, + /* 330 */ 842, 764, 743, 717, 801, 852, 752, 718, 762, 768, + /* 340 */ 711, 771, 775, 773, 741, 779, 780, 772, 781, 791, + /* 350 */ 862, 783, 785, 859, 864, 865, 866, 867, 869, 870, + /* 360 */ 873, 788, 868, 797, 872, 874, 794, 796, 798, 877, + /* 370 */ 879, 765, 802, 863, 828, 876, 738, 739, 793, 793, + /* 380 */ 793, 793, 784, 786, 880, 742, 744, 793, 793, 793, + /* 390 */ 894, 896, 813, 793, 898, 899, 900, 901, 902, 903, + /* 400 */ 904, 906, 908, 909, 910, 911, 912, 913, 914, 817, + /* 410 */ 832, 915, 905, 916, 907, 856, 922, }; -#define YY_REDUCE_COUNT (223) +#define YY_REDUCE_COUNT (225) #define YY_REDUCE_MIN (-284) -#define YY_REDUCE_MAX (615) +#define YY_REDUCE_MAX (619) static const short yy_reduce_ofst[] = { - /* 0 */ 235, 30, 30, 220, 220, 132, 88, 195, 213, -280, - /* 10 */ -206, -204, -183, 139, 241, 245, 250, 256, 259, 260, - /* 20 */ 261, 265, -284, 108, 110, -190, -175, -174, -107, 40, - /* 30 */ 72, 140, 141, 228, 243, 244, 247, 248, 249, 252, - /* 40 */ 255, 263, 264, 266, 267, 268, 269, 270, 271, 272, - /* 50 */ 275, 283, 284, 287, -215, -119, -51, -187, 66, 20, - /* 60 */ -88, 137, -207, 94, 280, 316, 307, 186, 290, 281, - /* 70 */ 282, 360, 361, 347, -222, 362, 371, -237, 105, 355, - /* 80 */ 12, 73, 153, 372, 376, 388, 400, 401, 391, 402, - /* 90 */ 443, 445, 446, 447, 448, 449, 374, 450, 451, 452, - /* 100 */ 403, 404, 455, 456, 457, 458, 379, 381, 382, 383, - /* 110 */ 409, 410, 465, 467, 468, 469, 472, 473, 474, 475, - /* 120 */ 476, 477, 478, 480, 481, 482, 483, 484, 485, 486, - /* 130 */ 489, 490, 491, 492, 493, 494, 495, 496, 497, 501, - /* 140 */ 502, 503, 507, 509, 512, 515, 518, 519, 520, 522, - /* 150 */ 523, 524, 525, 527, 528, 529, 530, 531, 532, 533, - /* 160 */ 534, 535, 536, 537, 538, 539, 540, 541, 414, 542, - /* 170 */ 543, 545, 546, 547, 549, 413, 423, 424, 425, 550, - /* 180 */ 438, 440, 461, 453, 544, 551, 460, 554, 553, 558, - /* 190 */ 555, 556, 557, 559, 560, 561, 564, 565, 566, 567, - /* 200 */ 568, 570, 572, 574, 573, 575, 578, 579, 582, 583, - /* 210 */ 584, 587, 576, 596, 588, 597, 599, 600, 604, 605, - /* 220 */ 607, 615, 593, 612, + /* 0 */ 126, 32, 32, 208, 208, 98, 166, 199, 216, -280, + /* 10 */ -206, -204, -183, 205, 221, 240, 244, 259, 261, 263, + /* 20 */ 274, 275, -284, 79, -196, -190, -239, -208, -174, -173, + /* 30 */ -142, 18, 37, 84, 115, 217, 219, 243, 254, 257, + /* 40 */ 258, 260, 262, 266, 269, 273, 277, 278, 280, 281, + /* 50 */ 282, 284, 286, 289, -215, -176, -113, 55, 183, -39, + /* 60 */ 229, 75, 334, 364, 368, 369, -55, 94, 324, 53, + /* 70 */ 224, 365, 370, 146, 318, 300, 377, -260, -125, 138, + /* 80 */ -229, 124, 196, 246, 251, 267, 353, 358, 362, 386, + /* 90 */ 438, 441, 443, 445, 447, 448, 380, 451, 452, 453, + /* 100 */ 404, 405, 456, 457, 458, 459, 381, 382, 383, 384, + /* 110 */ 410, 416, 460, 467, 468, 469, 470, 471, 472, 473, + /* 120 */ 474, 475, 478, 479, 480, 481, 483, 484, 486, 487, + /* 130 */ 488, 489, 490, 491, 496, 500, 501, 502, 503, 504, + /* 140 */ 505, 507, 508, 510, 511, 512, 513, 515, 516, 517, + /* 150 */ 518, 520, 523, 526, 527, 528, 529, 532, 533, 535, + /* 160 */ 536, 537, 539, 540, 541, 542, 543, 544, 545, 546, + /* 170 */ 420, 547, 548, 550, 552, 554, 556, 418, 422, 423, + /* 180 */ 424, 557, 428, 465, 449, 461, 549, 462, 558, 560, + /* 190 */ 562, 561, 566, 564, 563, 565, 567, 570, 571, 572, + /* 200 */ 573, 576, 574, 575, 577, 580, 578, 584, 583, 586, + /* 210 */ 587, 582, 589, 591, 590, 592, 600, 602, 593, 604, + /* 220 */ 607, 605, 613, 614, 597, 619, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 970, 1093, 1032, 1103, 1019, 1029, 1277, 1277, 1277, 1277, - /* 10 */ 970, 970, 970, 970, 970, 970, 970, 970, 970, 970, - /* 20 */ 970, 970, 970, 970, 1157, 990, 970, 970, 970, 970, - /* 30 */ 970, 970, 970, 970, 970, 970, 970, 970, 970, 970, - /* 40 */ 970, 970, 970, 970, 970, 970, 970, 970, 970, 970, - /* 50 */ 970, 970, 970, 970, 970, 970, 970, 970, 970, 1181, - /* 60 */ 970, 1029, 970, 970, 970, 970, 970, 1039, 1029, 970, - /* 70 */ 970, 1039, 1039, 970, 1152, 1077, 1095, 970, 970, 970, - /* 80 */ 970, 970, 970, 970, 970, 970, 970, 970, 1124, 970, - /* 90 */ 970, 970, 970, 970, 970, 970, 1159, 1165, 1162, 970, - /* 100 */ 970, 970, 1167, 970, 970, 970, 1203, 1203, 1203, 1203, - /* 110 */ 1150, 970, 970, 970, 970, 970, 970, 970, 970, 970, - /* 120 */ 970, 970, 970, 970, 970, 970, 970, 970, 970, 970, - /* 130 */ 970, 970, 970, 970, 970, 970, 970, 970, 970, 970, - /* 140 */ 970, 970, 970, 970, 1017, 970, 1015, 970, 970, 970, - /* 150 */ 970, 970, 970, 970, 970, 970, 970, 970, 970, 970, - /* 160 */ 970, 970, 970, 970, 970, 970, 970, 988, 1220, 992, - /* 170 */ 1027, 992, 992, 992, 992, 970, 970, 970, 970, 992, - /* 180 */ 1212, 1216, 1193, 1210, 1204, 1188, 1186, 1184, 1192, 1177, - /* 190 */ 1220, 1126, 992, 992, 992, 1037, 1037, 1033, 1029, 1029, - /* 200 */ 992, 992, 1055, 1053, 1051, 1043, 1049, 1045, 1047, 1041, - /* 210 */ 1020, 970, 992, 992, 1027, 1027, 992, 1027, 992, 1027, - /* 220 */ 992, 992, 1077, 1095, 1276, 970, 1221, 1211, 1276, 970, - /* 230 */ 1253, 1252, 1267, 1266, 1265, 1251, 1250, 1249, 1245, 1248, - /* 240 */ 1247, 1246, 970, 970, 970, 1264, 1263, 1261, 1260, 1259, - /* 250 */ 970, 970, 1223, 970, 1255, 1254, 970, 970, 970, 970, - /* 260 */ 970, 970, 970, 1174, 970, 970, 970, 1199, 1217, 1213, - /* 270 */ 970, 970, 970, 970, 970, 970, 970, 970, 1224, 970, - /* 280 */ 970, 970, 970, 970, 970, 970, 970, 1138, 970, 970, - /* 290 */ 1105, 970, 970, 970, 970, 970, 970, 970, 970, 970, - /* 300 */ 970, 970, 970, 970, 1149, 970, 970, 970, 970, 970, - /* 310 */ 1161, 1160, 970, 970, 970, 970, 970, 970, 970, 970, - /* 320 */ 970, 970, 970, 970, 970, 970, 970, 970, 970, 970, - /* 330 */ 1205, 970, 1200, 970, 1194, 970, 970, 970, 1117, 970, - /* 340 */ 970, 970, 970, 970, 970, 970, 970, 970, 970, 970, - /* 350 */ 970, 970, 970, 970, 970, 970, 970, 970, 970, 970, - /* 360 */ 970, 970, 970, 970, 970, 970, 970, 970, 970, 970, - /* 370 */ 970, 970, 970, 970, 970, 1295, 1290, 1291, 1288, 970, - /* 380 */ 970, 970, 970, 970, 1287, 1282, 1283, 970, 970, 970, - /* 390 */ 1280, 970, 970, 970, 970, 970, 970, 970, 970, 970, - /* 400 */ 970, 970, 970, 970, 970, 970, 1061, 970, 970, 999, - /* 410 */ 970, 997, 970, 970, + /* 0 */ 976, 1101, 1039, 1111, 1026, 1036, 1285, 1285, 1285, 1285, + /* 10 */ 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, + /* 20 */ 976, 976, 976, 976, 1165, 996, 976, 976, 976, 976, + /* 30 */ 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, + /* 40 */ 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, + /* 50 */ 976, 976, 976, 976, 976, 976, 976, 976, 976, 1189, + /* 60 */ 976, 1036, 976, 976, 976, 976, 976, 1047, 1036, 976, + /* 70 */ 976, 1047, 1047, 976, 1160, 1085, 1103, 976, 976, 976, + /* 80 */ 976, 976, 976, 976, 976, 976, 976, 976, 1132, 976, + /* 90 */ 976, 976, 976, 976, 976, 976, 1167, 1173, 1170, 976, + /* 100 */ 976, 976, 1175, 976, 976, 976, 1211, 1211, 1211, 1211, + /* 110 */ 1158, 976, 976, 976, 976, 976, 976, 976, 976, 976, + /* 120 */ 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, + /* 130 */ 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, + /* 140 */ 976, 976, 976, 976, 976, 1024, 976, 1022, 976, 976, + /* 150 */ 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, + /* 160 */ 976, 976, 976, 976, 976, 976, 976, 976, 976, 994, + /* 170 */ 1228, 998, 1034, 998, 998, 998, 998, 976, 976, 976, + /* 180 */ 976, 998, 1220, 1224, 1201, 1218, 1212, 1196, 1194, 1192, + /* 190 */ 1200, 1185, 1228, 1134, 998, 998, 998, 1045, 1045, 1040, + /* 200 */ 1036, 1036, 998, 998, 1063, 1061, 1059, 1051, 1057, 1053, + /* 210 */ 1055, 1049, 1027, 976, 998, 998, 1034, 1034, 998, 1034, + /* 220 */ 998, 1034, 998, 998, 1085, 1103, 1284, 976, 1229, 1219, + /* 230 */ 1284, 976, 1261, 1260, 1275, 1274, 1273, 1259, 1258, 1257, + /* 240 */ 1253, 1256, 1255, 1254, 976, 976, 976, 1272, 1271, 1269, + /* 250 */ 1268, 1267, 976, 976, 1231, 976, 1263, 1262, 976, 976, + /* 260 */ 976, 976, 976, 976, 976, 976, 1182, 976, 976, 976, + /* 270 */ 1207, 1225, 1221, 976, 976, 976, 976, 976, 976, 976, + /* 280 */ 976, 1232, 976, 976, 976, 976, 976, 976, 976, 976, + /* 290 */ 1146, 976, 976, 1113, 976, 976, 976, 976, 976, 976, + /* 300 */ 976, 976, 976, 976, 976, 976, 1157, 976, 976, 976, + /* 310 */ 976, 976, 1169, 1168, 976, 976, 976, 976, 976, 976, + /* 320 */ 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, + /* 330 */ 976, 976, 1213, 976, 1208, 976, 1202, 976, 976, 976, + /* 340 */ 1125, 976, 976, 976, 976, 1043, 976, 976, 976, 976, + /* 350 */ 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, + /* 360 */ 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, + /* 370 */ 976, 976, 976, 976, 976, 976, 976, 976, 1303, 1298, + /* 380 */ 1299, 1296, 976, 976, 976, 976, 976, 1295, 1290, 1291, + /* 390 */ 976, 976, 976, 1288, 976, 976, 976, 976, 976, 976, + /* 400 */ 976, 976, 976, 976, 976, 976, 976, 976, 976, 1069, + /* 410 */ 976, 976, 1005, 976, 1003, 976, 976, }; /********** End of lemon-generated parsing tables *****************************/ @@ -642,6 +640,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* ALTER => nothing */ 0, /* PASS => nothing */ 0, /* PRIVILEGE => nothing */ + 0, /* TAGS => nothing */ 0, /* LOCAL => nothing */ 0, /* COMPACT => nothing */ 0, /* LP => nothing */ @@ -677,7 +676,6 @@ static const YYCODETYPE yyFallback[] = { 0, /* CACHELAST => nothing */ 0, /* PARTITIONS => nothing */ 0, /* UNSIGNED => nothing */ - 0, /* TAGS => nothing */ 0, /* USING => nothing */ 0, /* TO => nothing */ 0, /* SPLIT => nothing */ @@ -934,42 +932,42 @@ static const char *const yyTokenName[] = { /* 82 */ "ALTER", /* 83 */ "PASS", /* 84 */ "PRIVILEGE", - /* 85 */ "LOCAL", - /* 86 */ "COMPACT", - /* 87 */ "LP", - /* 88 */ "RP", - /* 89 */ "IF", - /* 90 */ "EXISTS", - /* 91 */ "AS", - /* 92 */ "OUTPUTTYPE", - /* 93 */ "AGGREGATE", - /* 94 */ "BUFSIZE", - /* 95 */ "PPS", - /* 96 */ "TSERIES", - /* 97 */ "DBS", - /* 98 */ "STORAGE", - /* 99 */ "QTIME", - /* 100 */ "CONNS", - /* 101 */ "STATE", - /* 102 */ "COMMA", - /* 103 */ "KEEP", - /* 104 */ "CACHE", - /* 105 */ "REPLICA", - /* 106 */ "QUORUM", - /* 107 */ "DAYS", - /* 108 */ "MINROWS", - /* 109 */ "MAXROWS", - /* 110 */ "BLOCKS", - /* 111 */ "CTIME", - /* 112 */ "WAL", - /* 113 */ "FSYNC", - /* 114 */ "COMP", - /* 115 */ "PRECISION", - /* 116 */ "UPDATE", - /* 117 */ "CACHELAST", - /* 118 */ "PARTITIONS", - /* 119 */ "UNSIGNED", - /* 120 */ "TAGS", + /* 85 */ "TAGS", + /* 86 */ "LOCAL", + /* 87 */ "COMPACT", + /* 88 */ "LP", + /* 89 */ "RP", + /* 90 */ "IF", + /* 91 */ "EXISTS", + /* 92 */ "AS", + /* 93 */ "OUTPUTTYPE", + /* 94 */ "AGGREGATE", + /* 95 */ "BUFSIZE", + /* 96 */ "PPS", + /* 97 */ "TSERIES", + /* 98 */ "DBS", + /* 99 */ "STORAGE", + /* 100 */ "QTIME", + /* 101 */ "CONNS", + /* 102 */ "STATE", + /* 103 */ "COMMA", + /* 104 */ "KEEP", + /* 105 */ "CACHE", + /* 106 */ "REPLICA", + /* 107 */ "QUORUM", + /* 108 */ "DAYS", + /* 109 */ "MINROWS", + /* 110 */ "MAXROWS", + /* 111 */ "BLOCKS", + /* 112 */ "CTIME", + /* 113 */ "WAL", + /* 114 */ "FSYNC", + /* 115 */ "COMP", + /* 116 */ "PRECISION", + /* 117 */ "UPDATE", + /* 118 */ "CACHELAST", + /* 119 */ "PARTITIONS", + /* 120 */ "UNSIGNED", /* 121 */ "USING", /* 122 */ "TO", /* 123 */ "SPLIT", @@ -1191,291 +1189,293 @@ static const char *const yyRuleName[] = { /* 39 */ "cmd ::= DESC ids cpxName", /* 40 */ "cmd ::= ALTER USER ids PASS ids", /* 41 */ "cmd ::= ALTER USER ids PRIVILEGE ids", - /* 42 */ "cmd ::= ALTER DNODE ids ids", - /* 43 */ "cmd ::= ALTER DNODE ids ids ids", - /* 44 */ "cmd ::= ALTER LOCAL ids", - /* 45 */ "cmd ::= ALTER LOCAL ids ids", - /* 46 */ "cmd ::= ALTER DATABASE ids alter_db_optr", - /* 47 */ "cmd ::= ALTER TOPIC ids alter_topic_optr", - /* 48 */ "cmd ::= ALTER ACCOUNT ids acct_optr", - /* 49 */ "cmd ::= ALTER ACCOUNT ids PASS ids acct_optr", - /* 50 */ "cmd ::= COMPACT VNODES IN LP exprlist RP", - /* 51 */ "ids ::= ID", - /* 52 */ "ids ::= STRING", - /* 53 */ "ifexists ::= IF EXISTS", - /* 54 */ "ifexists ::=", - /* 55 */ "ifnotexists ::= IF NOT EXISTS", - /* 56 */ "ifnotexists ::=", - /* 57 */ "cmd ::= CREATE DNODE ids", - /* 58 */ "cmd ::= CREATE ACCOUNT ids PASS ids acct_optr", - /* 59 */ "cmd ::= CREATE DATABASE ifnotexists ids db_optr", - /* 60 */ "cmd ::= CREATE TOPIC ifnotexists ids topic_optr", - /* 61 */ "cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize", - /* 62 */ "cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize", - /* 63 */ "cmd ::= CREATE USER ids PASS ids", - /* 64 */ "bufsize ::=", - /* 65 */ "bufsize ::= BUFSIZE INTEGER", - /* 66 */ "pps ::=", - /* 67 */ "pps ::= PPS INTEGER", - /* 68 */ "tseries ::=", - /* 69 */ "tseries ::= TSERIES INTEGER", - /* 70 */ "dbs ::=", - /* 71 */ "dbs ::= DBS INTEGER", - /* 72 */ "streams ::=", - /* 73 */ "streams ::= STREAMS INTEGER", - /* 74 */ "storage ::=", - /* 75 */ "storage ::= STORAGE INTEGER", - /* 76 */ "qtime ::=", - /* 77 */ "qtime ::= QTIME INTEGER", - /* 78 */ "users ::=", - /* 79 */ "users ::= USERS INTEGER", - /* 80 */ "conns ::=", - /* 81 */ "conns ::= CONNS INTEGER", - /* 82 */ "state ::=", - /* 83 */ "state ::= STATE ids", - /* 84 */ "acct_optr ::= pps tseries storage streams qtime dbs users conns state", - /* 85 */ "intitemlist ::= intitemlist COMMA intitem", - /* 86 */ "intitemlist ::= intitem", - /* 87 */ "intitem ::= INTEGER", - /* 88 */ "keep ::= KEEP intitemlist", - /* 89 */ "cache ::= CACHE INTEGER", - /* 90 */ "replica ::= REPLICA INTEGER", - /* 91 */ "quorum ::= QUORUM INTEGER", - /* 92 */ "days ::= DAYS INTEGER", - /* 93 */ "minrows ::= MINROWS INTEGER", - /* 94 */ "maxrows ::= MAXROWS INTEGER", - /* 95 */ "blocks ::= BLOCKS INTEGER", - /* 96 */ "ctime ::= CTIME INTEGER", - /* 97 */ "wal ::= WAL INTEGER", - /* 98 */ "fsync ::= FSYNC INTEGER", - /* 99 */ "comp ::= COMP INTEGER", - /* 100 */ "prec ::= PRECISION STRING", - /* 101 */ "update ::= UPDATE INTEGER", - /* 102 */ "cachelast ::= CACHELAST INTEGER", - /* 103 */ "partitions ::= PARTITIONS INTEGER", - /* 104 */ "db_optr ::=", - /* 105 */ "db_optr ::= db_optr cache", - /* 106 */ "db_optr ::= db_optr replica", - /* 107 */ "db_optr ::= db_optr quorum", - /* 108 */ "db_optr ::= db_optr days", - /* 109 */ "db_optr ::= db_optr minrows", - /* 110 */ "db_optr ::= db_optr maxrows", - /* 111 */ "db_optr ::= db_optr blocks", - /* 112 */ "db_optr ::= db_optr ctime", - /* 113 */ "db_optr ::= db_optr wal", - /* 114 */ "db_optr ::= db_optr fsync", - /* 115 */ "db_optr ::= db_optr comp", - /* 116 */ "db_optr ::= db_optr prec", - /* 117 */ "db_optr ::= db_optr keep", - /* 118 */ "db_optr ::= db_optr update", - /* 119 */ "db_optr ::= db_optr cachelast", - /* 120 */ "topic_optr ::= db_optr", - /* 121 */ "topic_optr ::= topic_optr partitions", - /* 122 */ "alter_db_optr ::=", - /* 123 */ "alter_db_optr ::= alter_db_optr replica", - /* 124 */ "alter_db_optr ::= alter_db_optr quorum", - /* 125 */ "alter_db_optr ::= alter_db_optr keep", - /* 126 */ "alter_db_optr ::= alter_db_optr blocks", - /* 127 */ "alter_db_optr ::= alter_db_optr comp", - /* 128 */ "alter_db_optr ::= alter_db_optr update", - /* 129 */ "alter_db_optr ::= alter_db_optr cachelast", - /* 130 */ "alter_topic_optr ::= alter_db_optr", - /* 131 */ "alter_topic_optr ::= alter_topic_optr partitions", - /* 132 */ "typename ::= ids", - /* 133 */ "typename ::= ids LP signed RP", - /* 134 */ "typename ::= ids UNSIGNED", - /* 135 */ "signed ::= INTEGER", - /* 136 */ "signed ::= PLUS INTEGER", - /* 137 */ "signed ::= MINUS INTEGER", - /* 138 */ "cmd ::= CREATE TABLE create_table_args", - /* 139 */ "cmd ::= CREATE TABLE create_stable_args", - /* 140 */ "cmd ::= CREATE STABLE create_stable_args", - /* 141 */ "cmd ::= CREATE TABLE create_table_list", - /* 142 */ "create_table_list ::= create_from_stable", - /* 143 */ "create_table_list ::= create_table_list create_from_stable", - /* 144 */ "create_table_args ::= ifnotexists ids cpxName LP columnlist RP", - /* 145 */ "create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP", - /* 146 */ "create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP", - /* 147 */ "create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP", - /* 148 */ "tagNamelist ::= tagNamelist COMMA ids", - /* 149 */ "tagNamelist ::= ids", - /* 150 */ "create_table_args ::= ifnotexists ids cpxName to_opt split_opt AS select", - /* 151 */ "to_opt ::=", - /* 152 */ "to_opt ::= TO ids cpxName", - /* 153 */ "split_opt ::=", - /* 154 */ "split_opt ::= SPLIT ids", - /* 155 */ "columnlist ::= columnlist COMMA column", - /* 156 */ "columnlist ::= column", - /* 157 */ "column ::= ids typename", - /* 158 */ "tagitemlist ::= tagitemlist COMMA tagitem", - /* 159 */ "tagitemlist ::= tagitem", - /* 160 */ "tagitem ::= INTEGER", - /* 161 */ "tagitem ::= FLOAT", - /* 162 */ "tagitem ::= STRING", - /* 163 */ "tagitem ::= BOOL", - /* 164 */ "tagitem ::= NULL", - /* 165 */ "tagitem ::= NOW", - /* 166 */ "tagitem ::= NOW PLUS VARIABLE", - /* 167 */ "tagitem ::= NOW MINUS VARIABLE", - /* 168 */ "tagitem ::= MINUS INTEGER", - /* 169 */ "tagitem ::= MINUS FLOAT", - /* 170 */ "tagitem ::= PLUS INTEGER", - /* 171 */ "tagitem ::= PLUS FLOAT", - /* 172 */ "select ::= SELECT selcollist from where_opt range_option interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt", - /* 173 */ "select ::= LP select RP", - /* 174 */ "union ::= select", - /* 175 */ "union ::= union UNION ALL select", - /* 176 */ "cmd ::= union", - /* 177 */ "select ::= SELECT selcollist", - /* 178 */ "sclp ::= selcollist COMMA", - /* 179 */ "sclp ::=", - /* 180 */ "selcollist ::= sclp distinct expr as", - /* 181 */ "selcollist ::= sclp STAR", - /* 182 */ "as ::= AS ids", - /* 183 */ "as ::= ids", - /* 184 */ "as ::=", - /* 185 */ "distinct ::= DISTINCT", - /* 186 */ "distinct ::=", - /* 187 */ "from ::= FROM tablelist", - /* 188 */ "from ::= FROM sub", - /* 189 */ "sub ::= LP union RP", - /* 190 */ "sub ::= LP union RP ids", - /* 191 */ "sub ::= sub COMMA LP union RP ids", - /* 192 */ "tablelist ::= ids cpxName", - /* 193 */ "tablelist ::= ids cpxName ids", - /* 194 */ "tablelist ::= tablelist COMMA ids cpxName", - /* 195 */ "tablelist ::= tablelist COMMA ids cpxName ids", - /* 196 */ "tmvar ::= VARIABLE", - /* 197 */ "timestamp ::= INTEGER", - /* 198 */ "timestamp ::= MINUS INTEGER", - /* 199 */ "timestamp ::= PLUS INTEGER", - /* 200 */ "timestamp ::= STRING", - /* 201 */ "timestamp ::= NOW", - /* 202 */ "timestamp ::= NOW PLUS VARIABLE", - /* 203 */ "timestamp ::= NOW MINUS VARIABLE", - /* 204 */ "range_option ::=", - /* 205 */ "range_option ::= RANGE LP timestamp COMMA timestamp RP", - /* 206 */ "interval_option ::= intervalKey LP tmvar RP", - /* 207 */ "interval_option ::= intervalKey LP tmvar COMMA tmvar RP", - /* 208 */ "interval_option ::=", - /* 209 */ "intervalKey ::= INTERVAL", - /* 210 */ "intervalKey ::= EVERY", - /* 211 */ "session_option ::=", - /* 212 */ "session_option ::= SESSION LP ids cpxName COMMA tmvar RP", - /* 213 */ "windowstate_option ::=", - /* 214 */ "windowstate_option ::= STATE_WINDOW LP ids RP", - /* 215 */ "fill_opt ::=", - /* 216 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP", - /* 217 */ "fill_opt ::= FILL LP ID RP", - /* 218 */ "sliding_opt ::= SLIDING LP tmvar RP", - /* 219 */ "sliding_opt ::=", - /* 220 */ "orderby_opt ::=", - /* 221 */ "orderby_opt ::= ORDER BY sortlist", - /* 222 */ "sortlist ::= sortlist COMMA item sortorder", - /* 223 */ "sortlist ::= sortlist COMMA arrow sortorder", - /* 224 */ "sortlist ::= item sortorder", - /* 225 */ "sortlist ::= arrow sortorder", - /* 226 */ "item ::= ID", - /* 227 */ "item ::= ID DOT ID", - /* 228 */ "sortorder ::= ASC", - /* 229 */ "sortorder ::= DESC", - /* 230 */ "sortorder ::=", - /* 231 */ "groupby_opt ::=", - /* 232 */ "groupby_opt ::= GROUP BY grouplist", - /* 233 */ "grouplist ::= grouplist COMMA item", - /* 234 */ "grouplist ::= grouplist COMMA arrow", - /* 235 */ "grouplist ::= item", - /* 236 */ "grouplist ::= arrow", - /* 237 */ "having_opt ::=", - /* 238 */ "having_opt ::= HAVING expr", - /* 239 */ "limit_opt ::=", - /* 240 */ "limit_opt ::= LIMIT signed", - /* 241 */ "limit_opt ::= LIMIT signed OFFSET signed", - /* 242 */ "limit_opt ::= LIMIT signed COMMA signed", - /* 243 */ "slimit_opt ::=", - /* 244 */ "slimit_opt ::= SLIMIT signed", - /* 245 */ "slimit_opt ::= SLIMIT signed SOFFSET signed", - /* 246 */ "slimit_opt ::= SLIMIT signed COMMA signed", - /* 247 */ "where_opt ::=", - /* 248 */ "where_opt ::= WHERE expr", - /* 249 */ "expr ::= LP expr RP", - /* 250 */ "expr ::= ID", - /* 251 */ "expr ::= ID DOT ID", - /* 252 */ "expr ::= ID DOT STAR", - /* 253 */ "expr ::= INTEGER", - /* 254 */ "expr ::= MINUS INTEGER", - /* 255 */ "expr ::= PLUS INTEGER", - /* 256 */ "expr ::= FLOAT", - /* 257 */ "expr ::= MINUS FLOAT", - /* 258 */ "expr ::= PLUS FLOAT", - /* 259 */ "expr ::= STRING", - /* 260 */ "expr ::= NOW", - /* 261 */ "expr ::= TODAY", - /* 262 */ "expr ::= VARIABLE", - /* 263 */ "expr ::= PLUS VARIABLE", - /* 264 */ "expr ::= MINUS VARIABLE", - /* 265 */ "expr ::= BOOL", - /* 266 */ "expr ::= NULL", - /* 267 */ "expr ::= ID LP exprlist RP", - /* 268 */ "expr ::= ID LP STAR RP", - /* 269 */ "expr ::= ID LP expr AS typename RP", - /* 270 */ "expr ::= expr IS NULL", - /* 271 */ "expr ::= expr IS NOT NULL", - /* 272 */ "expr ::= expr LT expr", - /* 273 */ "expr ::= expr GT expr", - /* 274 */ "expr ::= expr LE expr", - /* 275 */ "expr ::= expr GE expr", - /* 276 */ "expr ::= expr NE expr", - /* 277 */ "expr ::= expr EQ expr", - /* 278 */ "expr ::= expr BETWEEN expr AND expr", - /* 279 */ "expr ::= expr AND expr", - /* 280 */ "expr ::= expr OR expr", - /* 281 */ "expr ::= expr PLUS expr", - /* 282 */ "expr ::= expr MINUS expr", - /* 283 */ "expr ::= expr STAR expr", - /* 284 */ "expr ::= expr SLASH expr", - /* 285 */ "expr ::= expr REM expr", - /* 286 */ "expr ::= expr BITAND expr", - /* 287 */ "expr ::= expr BITOR expr", - /* 288 */ "expr ::= expr BITXOR expr", - /* 289 */ "expr ::= BITNOT expr", - /* 290 */ "expr ::= expr LSHIFT expr", - /* 291 */ "expr ::= expr RSHIFT expr", - /* 292 */ "expr ::= expr LIKE expr", - /* 293 */ "expr ::= expr MATCH expr", - /* 294 */ "expr ::= expr NMATCH expr", - /* 295 */ "expr ::= ID CONTAINS STRING", - /* 296 */ "expr ::= ID DOT ID CONTAINS STRING", - /* 297 */ "arrow ::= ID ARROW STRING", - /* 298 */ "arrow ::= ID DOT ID ARROW STRING", - /* 299 */ "expr ::= arrow", - /* 300 */ "expr ::= expr IN LP exprlist RP", - /* 301 */ "exprlist ::= exprlist COMMA expritem", - /* 302 */ "exprlist ::= expritem", - /* 303 */ "expritem ::= expr", - /* 304 */ "expritem ::=", - /* 305 */ "cmd ::= RESET QUERY CACHE", - /* 306 */ "cmd ::= SYNCDB ids REPLICA", - /* 307 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", - /* 308 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", - /* 309 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist", - /* 310 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", - /* 311 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", - /* 312 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", - /* 313 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", - /* 314 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist", - /* 315 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", - /* 316 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", - /* 317 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist", - /* 318 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", - /* 319 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", - /* 320 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", - /* 321 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem", - /* 322 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist", - /* 323 */ "cmd ::= KILL CONNECTION INTEGER", - /* 324 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", - /* 325 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", - /* 326 */ "cmd ::= DELETE FROM ifexists ids cpxName where_opt", + /* 42 */ "cmd ::= ALTER USER ids TAGS ids", + /* 43 */ "cmd ::= ALTER DNODE ids ids", + /* 44 */ "cmd ::= ALTER DNODE ids ids ids", + /* 45 */ "cmd ::= ALTER LOCAL ids", + /* 46 */ "cmd ::= ALTER LOCAL ids ids", + /* 47 */ "cmd ::= ALTER DATABASE ids alter_db_optr", + /* 48 */ "cmd ::= ALTER TOPIC ids alter_topic_optr", + /* 49 */ "cmd ::= ALTER ACCOUNT ids acct_optr", + /* 50 */ "cmd ::= ALTER ACCOUNT ids PASS ids acct_optr", + /* 51 */ "cmd ::= COMPACT VNODES IN LP exprlist RP", + /* 52 */ "ids ::= ID", + /* 53 */ "ids ::= STRING", + /* 54 */ "ifexists ::= IF EXISTS", + /* 55 */ "ifexists ::=", + /* 56 */ "ifnotexists ::= IF NOT EXISTS", + /* 57 */ "ifnotexists ::=", + /* 58 */ "cmd ::= CREATE DNODE ids", + /* 59 */ "cmd ::= CREATE ACCOUNT ids PASS ids acct_optr", + /* 60 */ "cmd ::= CREATE DATABASE ifnotexists ids db_optr", + /* 61 */ "cmd ::= CREATE TOPIC ifnotexists ids topic_optr", + /* 62 */ "cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize", + /* 63 */ "cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize", + /* 64 */ "cmd ::= CREATE USER ids PASS ids", + /* 65 */ "cmd ::= CREATE USER ids PASS ids TAGS ids", + /* 66 */ "bufsize ::=", + /* 67 */ "bufsize ::= BUFSIZE INTEGER", + /* 68 */ "pps ::=", + /* 69 */ "pps ::= PPS INTEGER", + /* 70 */ "tseries ::=", + /* 71 */ "tseries ::= TSERIES INTEGER", + /* 72 */ "dbs ::=", + /* 73 */ "dbs ::= DBS INTEGER", + /* 74 */ "streams ::=", + /* 75 */ "streams ::= STREAMS INTEGER", + /* 76 */ "storage ::=", + /* 77 */ "storage ::= STORAGE INTEGER", + /* 78 */ "qtime ::=", + /* 79 */ "qtime ::= QTIME INTEGER", + /* 80 */ "users ::=", + /* 81 */ "users ::= USERS INTEGER", + /* 82 */ "conns ::=", + /* 83 */ "conns ::= CONNS INTEGER", + /* 84 */ "state ::=", + /* 85 */ "state ::= STATE ids", + /* 86 */ "acct_optr ::= pps tseries storage streams qtime dbs users conns state", + /* 87 */ "intitemlist ::= intitemlist COMMA intitem", + /* 88 */ "intitemlist ::= intitem", + /* 89 */ "intitem ::= INTEGER", + /* 90 */ "keep ::= KEEP intitemlist", + /* 91 */ "cache ::= CACHE INTEGER", + /* 92 */ "replica ::= REPLICA INTEGER", + /* 93 */ "quorum ::= QUORUM INTEGER", + /* 94 */ "days ::= DAYS INTEGER", + /* 95 */ "minrows ::= MINROWS INTEGER", + /* 96 */ "maxrows ::= MAXROWS INTEGER", + /* 97 */ "blocks ::= BLOCKS INTEGER", + /* 98 */ "ctime ::= CTIME INTEGER", + /* 99 */ "wal ::= WAL INTEGER", + /* 100 */ "fsync ::= FSYNC INTEGER", + /* 101 */ "comp ::= COMP INTEGER", + /* 102 */ "prec ::= PRECISION STRING", + /* 103 */ "update ::= UPDATE INTEGER", + /* 104 */ "cachelast ::= CACHELAST INTEGER", + /* 105 */ "partitions ::= PARTITIONS INTEGER", + /* 106 */ "db_optr ::=", + /* 107 */ "db_optr ::= db_optr cache", + /* 108 */ "db_optr ::= db_optr replica", + /* 109 */ "db_optr ::= db_optr quorum", + /* 110 */ "db_optr ::= db_optr days", + /* 111 */ "db_optr ::= db_optr minrows", + /* 112 */ "db_optr ::= db_optr maxrows", + /* 113 */ "db_optr ::= db_optr blocks", + /* 114 */ "db_optr ::= db_optr ctime", + /* 115 */ "db_optr ::= db_optr wal", + /* 116 */ "db_optr ::= db_optr fsync", + /* 117 */ "db_optr ::= db_optr comp", + /* 118 */ "db_optr ::= db_optr prec", + /* 119 */ "db_optr ::= db_optr keep", + /* 120 */ "db_optr ::= db_optr update", + /* 121 */ "db_optr ::= db_optr cachelast", + /* 122 */ "topic_optr ::= db_optr", + /* 123 */ "topic_optr ::= topic_optr partitions", + /* 124 */ "alter_db_optr ::=", + /* 125 */ "alter_db_optr ::= alter_db_optr replica", + /* 126 */ "alter_db_optr ::= alter_db_optr quorum", + /* 127 */ "alter_db_optr ::= alter_db_optr keep", + /* 128 */ "alter_db_optr ::= alter_db_optr blocks", + /* 129 */ "alter_db_optr ::= alter_db_optr comp", + /* 130 */ "alter_db_optr ::= alter_db_optr update", + /* 131 */ "alter_db_optr ::= alter_db_optr cachelast", + /* 132 */ "alter_topic_optr ::= alter_db_optr", + /* 133 */ "alter_topic_optr ::= alter_topic_optr partitions", + /* 134 */ "typename ::= ids", + /* 135 */ "typename ::= ids LP signed RP", + /* 136 */ "typename ::= ids UNSIGNED", + /* 137 */ "signed ::= INTEGER", + /* 138 */ "signed ::= PLUS INTEGER", + /* 139 */ "signed ::= MINUS INTEGER", + /* 140 */ "cmd ::= CREATE TABLE create_table_args", + /* 141 */ "cmd ::= CREATE TABLE create_stable_args", + /* 142 */ "cmd ::= CREATE STABLE create_stable_args", + /* 143 */ "cmd ::= CREATE TABLE create_table_list", + /* 144 */ "create_table_list ::= create_from_stable", + /* 145 */ "create_table_list ::= create_table_list create_from_stable", + /* 146 */ "create_table_args ::= ifnotexists ids cpxName LP columnlist RP", + /* 147 */ "create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP", + /* 148 */ "create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP", + /* 149 */ "create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP", + /* 150 */ "tagNamelist ::= tagNamelist COMMA ids", + /* 151 */ "tagNamelist ::= ids", + /* 152 */ "create_table_args ::= ifnotexists ids cpxName to_opt split_opt AS select", + /* 153 */ "to_opt ::=", + /* 154 */ "to_opt ::= TO ids cpxName", + /* 155 */ "split_opt ::=", + /* 156 */ "split_opt ::= SPLIT ids", + /* 157 */ "columnlist ::= columnlist COMMA column", + /* 158 */ "columnlist ::= column", + /* 159 */ "column ::= ids typename", + /* 160 */ "tagitemlist ::= tagitemlist COMMA tagitem", + /* 161 */ "tagitemlist ::= tagitem", + /* 162 */ "tagitem ::= INTEGER", + /* 163 */ "tagitem ::= FLOAT", + /* 164 */ "tagitem ::= STRING", + /* 165 */ "tagitem ::= BOOL", + /* 166 */ "tagitem ::= NULL", + /* 167 */ "tagitem ::= NOW", + /* 168 */ "tagitem ::= NOW PLUS VARIABLE", + /* 169 */ "tagitem ::= NOW MINUS VARIABLE", + /* 170 */ "tagitem ::= MINUS INTEGER", + /* 171 */ "tagitem ::= MINUS FLOAT", + /* 172 */ "tagitem ::= PLUS INTEGER", + /* 173 */ "tagitem ::= PLUS FLOAT", + /* 174 */ "select ::= SELECT selcollist from where_opt range_option interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt", + /* 175 */ "select ::= LP select RP", + /* 176 */ "union ::= select", + /* 177 */ "union ::= union UNION ALL select", + /* 178 */ "cmd ::= union", + /* 179 */ "select ::= SELECT selcollist", + /* 180 */ "sclp ::= selcollist COMMA", + /* 181 */ "sclp ::=", + /* 182 */ "selcollist ::= sclp distinct expr as", + /* 183 */ "selcollist ::= sclp STAR", + /* 184 */ "as ::= AS ids", + /* 185 */ "as ::= ids", + /* 186 */ "as ::=", + /* 187 */ "distinct ::= DISTINCT", + /* 188 */ "distinct ::=", + /* 189 */ "from ::= FROM tablelist", + /* 190 */ "from ::= FROM sub", + /* 191 */ "sub ::= LP union RP", + /* 192 */ "sub ::= LP union RP ids", + /* 193 */ "sub ::= sub COMMA LP union RP ids", + /* 194 */ "tablelist ::= ids cpxName", + /* 195 */ "tablelist ::= ids cpxName ids", + /* 196 */ "tablelist ::= tablelist COMMA ids cpxName", + /* 197 */ "tablelist ::= tablelist COMMA ids cpxName ids", + /* 198 */ "tmvar ::= VARIABLE", + /* 199 */ "timestamp ::= INTEGER", + /* 200 */ "timestamp ::= MINUS INTEGER", + /* 201 */ "timestamp ::= PLUS INTEGER", + /* 202 */ "timestamp ::= STRING", + /* 203 */ "timestamp ::= NOW", + /* 204 */ "timestamp ::= NOW PLUS VARIABLE", + /* 205 */ "timestamp ::= NOW MINUS VARIABLE", + /* 206 */ "range_option ::=", + /* 207 */ "range_option ::= RANGE LP timestamp COMMA timestamp RP", + /* 208 */ "interval_option ::= intervalKey LP tmvar RP", + /* 209 */ "interval_option ::= intervalKey LP tmvar COMMA tmvar RP", + /* 210 */ "interval_option ::=", + /* 211 */ "intervalKey ::= INTERVAL", + /* 212 */ "intervalKey ::= EVERY", + /* 213 */ "session_option ::=", + /* 214 */ "session_option ::= SESSION LP ids cpxName COMMA tmvar RP", + /* 215 */ "windowstate_option ::=", + /* 216 */ "windowstate_option ::= STATE_WINDOW LP ids RP", + /* 217 */ "fill_opt ::=", + /* 218 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP", + /* 219 */ "fill_opt ::= FILL LP ID RP", + /* 220 */ "sliding_opt ::= SLIDING LP tmvar RP", + /* 221 */ "sliding_opt ::=", + /* 222 */ "orderby_opt ::=", + /* 223 */ "orderby_opt ::= ORDER BY sortlist", + /* 224 */ "sortlist ::= sortlist COMMA item sortorder", + /* 225 */ "sortlist ::= sortlist COMMA arrow sortorder", + /* 226 */ "sortlist ::= item sortorder", + /* 227 */ "sortlist ::= arrow sortorder", + /* 228 */ "item ::= ID", + /* 229 */ "item ::= ID DOT ID", + /* 230 */ "sortorder ::= ASC", + /* 231 */ "sortorder ::= DESC", + /* 232 */ "sortorder ::=", + /* 233 */ "groupby_opt ::=", + /* 234 */ "groupby_opt ::= GROUP BY grouplist", + /* 235 */ "grouplist ::= grouplist COMMA item", + /* 236 */ "grouplist ::= grouplist COMMA arrow", + /* 237 */ "grouplist ::= item", + /* 238 */ "grouplist ::= arrow", + /* 239 */ "having_opt ::=", + /* 240 */ "having_opt ::= HAVING expr", + /* 241 */ "limit_opt ::=", + /* 242 */ "limit_opt ::= LIMIT signed", + /* 243 */ "limit_opt ::= LIMIT signed OFFSET signed", + /* 244 */ "limit_opt ::= LIMIT signed COMMA signed", + /* 245 */ "slimit_opt ::=", + /* 246 */ "slimit_opt ::= SLIMIT signed", + /* 247 */ "slimit_opt ::= SLIMIT signed SOFFSET signed", + /* 248 */ "slimit_opt ::= SLIMIT signed COMMA signed", + /* 249 */ "where_opt ::=", + /* 250 */ "where_opt ::= WHERE expr", + /* 251 */ "expr ::= LP expr RP", + /* 252 */ "expr ::= ID", + /* 253 */ "expr ::= ID DOT ID", + /* 254 */ "expr ::= ID DOT STAR", + /* 255 */ "expr ::= INTEGER", + /* 256 */ "expr ::= MINUS INTEGER", + /* 257 */ "expr ::= PLUS INTEGER", + /* 258 */ "expr ::= FLOAT", + /* 259 */ "expr ::= MINUS FLOAT", + /* 260 */ "expr ::= PLUS FLOAT", + /* 261 */ "expr ::= STRING", + /* 262 */ "expr ::= NOW", + /* 263 */ "expr ::= TODAY", + /* 264 */ "expr ::= VARIABLE", + /* 265 */ "expr ::= PLUS VARIABLE", + /* 266 */ "expr ::= MINUS VARIABLE", + /* 267 */ "expr ::= BOOL", + /* 268 */ "expr ::= NULL", + /* 269 */ "expr ::= ID LP exprlist RP", + /* 270 */ "expr ::= ID LP STAR RP", + /* 271 */ "expr ::= ID LP expr AS typename RP", + /* 272 */ "expr ::= expr IS NULL", + /* 273 */ "expr ::= expr IS NOT NULL", + /* 274 */ "expr ::= expr LT expr", + /* 275 */ "expr ::= expr GT expr", + /* 276 */ "expr ::= expr LE expr", + /* 277 */ "expr ::= expr GE expr", + /* 278 */ "expr ::= expr NE expr", + /* 279 */ "expr ::= expr EQ expr", + /* 280 */ "expr ::= expr BETWEEN expr AND expr", + /* 281 */ "expr ::= expr AND expr", + /* 282 */ "expr ::= expr OR expr", + /* 283 */ "expr ::= expr PLUS expr", + /* 284 */ "expr ::= expr MINUS expr", + /* 285 */ "expr ::= expr STAR expr", + /* 286 */ "expr ::= expr SLASH expr", + /* 287 */ "expr ::= expr REM expr", + /* 288 */ "expr ::= expr BITAND expr", + /* 289 */ "expr ::= expr BITOR expr", + /* 290 */ "expr ::= expr BITXOR expr", + /* 291 */ "expr ::= BITNOT expr", + /* 292 */ "expr ::= expr LSHIFT expr", + /* 293 */ "expr ::= expr RSHIFT expr", + /* 294 */ "expr ::= expr LIKE expr", + /* 295 */ "expr ::= expr MATCH expr", + /* 296 */ "expr ::= expr NMATCH expr", + /* 297 */ "expr ::= ID CONTAINS STRING", + /* 298 */ "expr ::= ID DOT ID CONTAINS STRING", + /* 299 */ "arrow ::= ID ARROW STRING", + /* 300 */ "arrow ::= ID DOT ID ARROW STRING", + /* 301 */ "expr ::= arrow", + /* 302 */ "expr ::= expr IN LP exprlist RP", + /* 303 */ "exprlist ::= exprlist COMMA expritem", + /* 304 */ "exprlist ::= expritem", + /* 305 */ "expritem ::= expr", + /* 306 */ "expritem ::=", + /* 307 */ "cmd ::= RESET QUERY CACHE", + /* 308 */ "cmd ::= SYNCDB ids REPLICA", + /* 309 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", + /* 310 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", + /* 311 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist", + /* 312 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", + /* 313 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", + /* 314 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", + /* 315 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", + /* 316 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist", + /* 317 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", + /* 318 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", + /* 319 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist", + /* 320 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", + /* 321 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", + /* 322 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", + /* 323 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem", + /* 324 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist", + /* 325 */ "cmd ::= KILL CONNECTION INTEGER", + /* 326 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", + /* 327 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", + /* 328 */ "cmd ::= DELETE FROM ifexists ids cpxName where_opt", }; #endif /* NDEBUG */ @@ -1982,291 +1982,293 @@ static const struct { { 208, -3 }, /* (39) cmd ::= DESC ids cpxName */ { 208, -5 }, /* (40) cmd ::= ALTER USER ids PASS ids */ { 208, -5 }, /* (41) cmd ::= ALTER USER ids PRIVILEGE ids */ - { 208, -4 }, /* (42) cmd ::= ALTER DNODE ids ids */ - { 208, -5 }, /* (43) cmd ::= ALTER DNODE ids ids ids */ - { 208, -3 }, /* (44) cmd ::= ALTER LOCAL ids */ - { 208, -4 }, /* (45) cmd ::= ALTER LOCAL ids ids */ - { 208, -4 }, /* (46) cmd ::= ALTER DATABASE ids alter_db_optr */ - { 208, -4 }, /* (47) cmd ::= ALTER TOPIC ids alter_topic_optr */ - { 208, -4 }, /* (48) cmd ::= ALTER ACCOUNT ids acct_optr */ - { 208, -6 }, /* (49) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ - { 208, -6 }, /* (50) cmd ::= COMPACT VNODES IN LP exprlist RP */ - { 209, -1 }, /* (51) ids ::= ID */ - { 209, -1 }, /* (52) ids ::= STRING */ - { 212, -2 }, /* (53) ifexists ::= IF EXISTS */ - { 212, 0 }, /* (54) ifexists ::= */ - { 217, -3 }, /* (55) ifnotexists ::= IF NOT EXISTS */ - { 217, 0 }, /* (56) ifnotexists ::= */ - { 208, -3 }, /* (57) cmd ::= CREATE DNODE ids */ - { 208, -6 }, /* (58) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ - { 208, -5 }, /* (59) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ - { 208, -5 }, /* (60) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ - { 208, -8 }, /* (61) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ - { 208, -9 }, /* (62) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ - { 208, -5 }, /* (63) cmd ::= CREATE USER ids PASS ids */ - { 221, 0 }, /* (64) bufsize ::= */ - { 221, -2 }, /* (65) bufsize ::= BUFSIZE INTEGER */ - { 222, 0 }, /* (66) pps ::= */ - { 222, -2 }, /* (67) pps ::= PPS INTEGER */ - { 223, 0 }, /* (68) tseries ::= */ - { 223, -2 }, /* (69) tseries ::= TSERIES INTEGER */ - { 224, 0 }, /* (70) dbs ::= */ - { 224, -2 }, /* (71) dbs ::= DBS INTEGER */ - { 225, 0 }, /* (72) streams ::= */ - { 225, -2 }, /* (73) streams ::= STREAMS INTEGER */ - { 226, 0 }, /* (74) storage ::= */ - { 226, -2 }, /* (75) storage ::= STORAGE INTEGER */ - { 227, 0 }, /* (76) qtime ::= */ - { 227, -2 }, /* (77) qtime ::= QTIME INTEGER */ - { 228, 0 }, /* (78) users ::= */ - { 228, -2 }, /* (79) users ::= USERS INTEGER */ - { 229, 0 }, /* (80) conns ::= */ - { 229, -2 }, /* (81) conns ::= CONNS INTEGER */ - { 230, 0 }, /* (82) state ::= */ - { 230, -2 }, /* (83) state ::= STATE ids */ - { 215, -9 }, /* (84) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ - { 231, -3 }, /* (85) intitemlist ::= intitemlist COMMA intitem */ - { 231, -1 }, /* (86) intitemlist ::= intitem */ - { 232, -1 }, /* (87) intitem ::= INTEGER */ - { 233, -2 }, /* (88) keep ::= KEEP intitemlist */ - { 234, -2 }, /* (89) cache ::= CACHE INTEGER */ - { 235, -2 }, /* (90) replica ::= REPLICA INTEGER */ - { 236, -2 }, /* (91) quorum ::= QUORUM INTEGER */ - { 237, -2 }, /* (92) days ::= DAYS INTEGER */ - { 238, -2 }, /* (93) minrows ::= MINROWS INTEGER */ - { 239, -2 }, /* (94) maxrows ::= MAXROWS INTEGER */ - { 240, -2 }, /* (95) blocks ::= BLOCKS INTEGER */ - { 241, -2 }, /* (96) ctime ::= CTIME INTEGER */ - { 242, -2 }, /* (97) wal ::= WAL INTEGER */ - { 243, -2 }, /* (98) fsync ::= FSYNC INTEGER */ - { 244, -2 }, /* (99) comp ::= COMP INTEGER */ - { 245, -2 }, /* (100) prec ::= PRECISION STRING */ - { 246, -2 }, /* (101) update ::= UPDATE INTEGER */ - { 247, -2 }, /* (102) cachelast ::= CACHELAST INTEGER */ - { 248, -2 }, /* (103) partitions ::= PARTITIONS INTEGER */ - { 218, 0 }, /* (104) db_optr ::= */ - { 218, -2 }, /* (105) db_optr ::= db_optr cache */ - { 218, -2 }, /* (106) db_optr ::= db_optr replica */ - { 218, -2 }, /* (107) db_optr ::= db_optr quorum */ - { 218, -2 }, /* (108) db_optr ::= db_optr days */ - { 218, -2 }, /* (109) db_optr ::= db_optr minrows */ - { 218, -2 }, /* (110) db_optr ::= db_optr maxrows */ - { 218, -2 }, /* (111) db_optr ::= db_optr blocks */ - { 218, -2 }, /* (112) db_optr ::= db_optr ctime */ - { 218, -2 }, /* (113) db_optr ::= db_optr wal */ - { 218, -2 }, /* (114) db_optr ::= db_optr fsync */ - { 218, -2 }, /* (115) db_optr ::= db_optr comp */ - { 218, -2 }, /* (116) db_optr ::= db_optr prec */ - { 218, -2 }, /* (117) db_optr ::= db_optr keep */ - { 218, -2 }, /* (118) db_optr ::= db_optr update */ - { 218, -2 }, /* (119) db_optr ::= db_optr cachelast */ - { 219, -1 }, /* (120) topic_optr ::= db_optr */ - { 219, -2 }, /* (121) topic_optr ::= topic_optr partitions */ - { 213, 0 }, /* (122) alter_db_optr ::= */ - { 213, -2 }, /* (123) alter_db_optr ::= alter_db_optr replica */ - { 213, -2 }, /* (124) alter_db_optr ::= alter_db_optr quorum */ - { 213, -2 }, /* (125) alter_db_optr ::= alter_db_optr keep */ - { 213, -2 }, /* (126) alter_db_optr ::= alter_db_optr blocks */ - { 213, -2 }, /* (127) alter_db_optr ::= alter_db_optr comp */ - { 213, -2 }, /* (128) alter_db_optr ::= alter_db_optr update */ - { 213, -2 }, /* (129) alter_db_optr ::= alter_db_optr cachelast */ - { 214, -1 }, /* (130) alter_topic_optr ::= alter_db_optr */ - { 214, -2 }, /* (131) alter_topic_optr ::= alter_topic_optr partitions */ - { 220, -1 }, /* (132) typename ::= ids */ - { 220, -4 }, /* (133) typename ::= ids LP signed RP */ - { 220, -2 }, /* (134) typename ::= ids UNSIGNED */ - { 249, -1 }, /* (135) signed ::= INTEGER */ - { 249, -2 }, /* (136) signed ::= PLUS INTEGER */ - { 249, -2 }, /* (137) signed ::= MINUS INTEGER */ - { 208, -3 }, /* (138) cmd ::= CREATE TABLE create_table_args */ - { 208, -3 }, /* (139) cmd ::= CREATE TABLE create_stable_args */ - { 208, -3 }, /* (140) cmd ::= CREATE STABLE create_stable_args */ - { 208, -3 }, /* (141) cmd ::= CREATE TABLE create_table_list */ - { 252, -1 }, /* (142) create_table_list ::= create_from_stable */ - { 252, -2 }, /* (143) create_table_list ::= create_table_list create_from_stable */ - { 250, -6 }, /* (144) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ - { 251, -10 }, /* (145) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ - { 253, -10 }, /* (146) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ - { 253, -13 }, /* (147) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ - { 256, -3 }, /* (148) tagNamelist ::= tagNamelist COMMA ids */ - { 256, -1 }, /* (149) tagNamelist ::= ids */ - { 250, -7 }, /* (150) create_table_args ::= ifnotexists ids cpxName to_opt split_opt AS select */ - { 257, 0 }, /* (151) to_opt ::= */ - { 257, -3 }, /* (152) to_opt ::= TO ids cpxName */ - { 258, 0 }, /* (153) split_opt ::= */ - { 258, -2 }, /* (154) split_opt ::= SPLIT ids */ - { 254, -3 }, /* (155) columnlist ::= columnlist COMMA column */ - { 254, -1 }, /* (156) columnlist ::= column */ - { 261, -2 }, /* (157) column ::= ids typename */ - { 255, -3 }, /* (158) tagitemlist ::= tagitemlist COMMA tagitem */ - { 255, -1 }, /* (159) tagitemlist ::= tagitem */ - { 262, -1 }, /* (160) tagitem ::= INTEGER */ - { 262, -1 }, /* (161) tagitem ::= FLOAT */ - { 262, -1 }, /* (162) tagitem ::= STRING */ - { 262, -1 }, /* (163) tagitem ::= BOOL */ - { 262, -1 }, /* (164) tagitem ::= NULL */ - { 262, -1 }, /* (165) tagitem ::= NOW */ - { 262, -3 }, /* (166) tagitem ::= NOW PLUS VARIABLE */ - { 262, -3 }, /* (167) tagitem ::= NOW MINUS VARIABLE */ - { 262, -2 }, /* (168) tagitem ::= MINUS INTEGER */ - { 262, -2 }, /* (169) tagitem ::= MINUS FLOAT */ - { 262, -2 }, /* (170) tagitem ::= PLUS INTEGER */ - { 262, -2 }, /* (171) tagitem ::= PLUS FLOAT */ - { 259, -15 }, /* (172) select ::= SELECT selcollist from where_opt range_option interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ - { 259, -3 }, /* (173) select ::= LP select RP */ - { 277, -1 }, /* (174) union ::= select */ - { 277, -4 }, /* (175) union ::= union UNION ALL select */ - { 208, -1 }, /* (176) cmd ::= union */ - { 259, -2 }, /* (177) select ::= SELECT selcollist */ - { 278, -2 }, /* (178) sclp ::= selcollist COMMA */ - { 278, 0 }, /* (179) sclp ::= */ - { 263, -4 }, /* (180) selcollist ::= sclp distinct expr as */ - { 263, -2 }, /* (181) selcollist ::= sclp STAR */ - { 281, -2 }, /* (182) as ::= AS ids */ - { 281, -1 }, /* (183) as ::= ids */ - { 281, 0 }, /* (184) as ::= */ - { 279, -1 }, /* (185) distinct ::= DISTINCT */ - { 279, 0 }, /* (186) distinct ::= */ - { 264, -2 }, /* (187) from ::= FROM tablelist */ - { 264, -2 }, /* (188) from ::= FROM sub */ - { 283, -3 }, /* (189) sub ::= LP union RP */ - { 283, -4 }, /* (190) sub ::= LP union RP ids */ - { 283, -6 }, /* (191) sub ::= sub COMMA LP union RP ids */ - { 282, -2 }, /* (192) tablelist ::= ids cpxName */ - { 282, -3 }, /* (193) tablelist ::= ids cpxName ids */ - { 282, -4 }, /* (194) tablelist ::= tablelist COMMA ids cpxName */ - { 282, -5 }, /* (195) tablelist ::= tablelist COMMA ids cpxName ids */ - { 284, -1 }, /* (196) tmvar ::= VARIABLE */ - { 285, -1 }, /* (197) timestamp ::= INTEGER */ - { 285, -2 }, /* (198) timestamp ::= MINUS INTEGER */ - { 285, -2 }, /* (199) timestamp ::= PLUS INTEGER */ - { 285, -1 }, /* (200) timestamp ::= STRING */ - { 285, -1 }, /* (201) timestamp ::= NOW */ - { 285, -3 }, /* (202) timestamp ::= NOW PLUS VARIABLE */ - { 285, -3 }, /* (203) timestamp ::= NOW MINUS VARIABLE */ - { 266, 0 }, /* (204) range_option ::= */ - { 266, -6 }, /* (205) range_option ::= RANGE LP timestamp COMMA timestamp RP */ - { 267, -4 }, /* (206) interval_option ::= intervalKey LP tmvar RP */ - { 267, -6 }, /* (207) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ - { 267, 0 }, /* (208) interval_option ::= */ - { 286, -1 }, /* (209) intervalKey ::= INTERVAL */ - { 286, -1 }, /* (210) intervalKey ::= EVERY */ - { 269, 0 }, /* (211) session_option ::= */ - { 269, -7 }, /* (212) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ - { 270, 0 }, /* (213) windowstate_option ::= */ - { 270, -4 }, /* (214) windowstate_option ::= STATE_WINDOW LP ids RP */ - { 271, 0 }, /* (215) fill_opt ::= */ - { 271, -6 }, /* (216) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ - { 271, -4 }, /* (217) fill_opt ::= FILL LP ID RP */ - { 268, -4 }, /* (218) sliding_opt ::= SLIDING LP tmvar RP */ - { 268, 0 }, /* (219) sliding_opt ::= */ - { 274, 0 }, /* (220) orderby_opt ::= */ - { 274, -3 }, /* (221) orderby_opt ::= ORDER BY sortlist */ - { 287, -4 }, /* (222) sortlist ::= sortlist COMMA item sortorder */ - { 287, -4 }, /* (223) sortlist ::= sortlist COMMA arrow sortorder */ - { 287, -2 }, /* (224) sortlist ::= item sortorder */ - { 287, -2 }, /* (225) sortlist ::= arrow sortorder */ - { 288, -1 }, /* (226) item ::= ID */ - { 288, -3 }, /* (227) item ::= ID DOT ID */ - { 289, -1 }, /* (228) sortorder ::= ASC */ - { 289, -1 }, /* (229) sortorder ::= DESC */ - { 289, 0 }, /* (230) sortorder ::= */ - { 272, 0 }, /* (231) groupby_opt ::= */ - { 272, -3 }, /* (232) groupby_opt ::= GROUP BY grouplist */ - { 291, -3 }, /* (233) grouplist ::= grouplist COMMA item */ - { 291, -3 }, /* (234) grouplist ::= grouplist COMMA arrow */ - { 291, -1 }, /* (235) grouplist ::= item */ - { 291, -1 }, /* (236) grouplist ::= arrow */ - { 273, 0 }, /* (237) having_opt ::= */ - { 273, -2 }, /* (238) having_opt ::= HAVING expr */ - { 276, 0 }, /* (239) limit_opt ::= */ - { 276, -2 }, /* (240) limit_opt ::= LIMIT signed */ - { 276, -4 }, /* (241) limit_opt ::= LIMIT signed OFFSET signed */ - { 276, -4 }, /* (242) limit_opt ::= LIMIT signed COMMA signed */ - { 275, 0 }, /* (243) slimit_opt ::= */ - { 275, -2 }, /* (244) slimit_opt ::= SLIMIT signed */ - { 275, -4 }, /* (245) slimit_opt ::= SLIMIT signed SOFFSET signed */ - { 275, -4 }, /* (246) slimit_opt ::= SLIMIT signed COMMA signed */ - { 265, 0 }, /* (247) where_opt ::= */ - { 265, -2 }, /* (248) where_opt ::= WHERE expr */ - { 280, -3 }, /* (249) expr ::= LP expr RP */ - { 280, -1 }, /* (250) expr ::= ID */ - { 280, -3 }, /* (251) expr ::= ID DOT ID */ - { 280, -3 }, /* (252) expr ::= ID DOT STAR */ - { 280, -1 }, /* (253) expr ::= INTEGER */ - { 280, -2 }, /* (254) expr ::= MINUS INTEGER */ - { 280, -2 }, /* (255) expr ::= PLUS INTEGER */ - { 280, -1 }, /* (256) expr ::= FLOAT */ - { 280, -2 }, /* (257) expr ::= MINUS FLOAT */ - { 280, -2 }, /* (258) expr ::= PLUS FLOAT */ - { 280, -1 }, /* (259) expr ::= STRING */ - { 280, -1 }, /* (260) expr ::= NOW */ - { 280, -1 }, /* (261) expr ::= TODAY */ - { 280, -1 }, /* (262) expr ::= VARIABLE */ - { 280, -2 }, /* (263) expr ::= PLUS VARIABLE */ - { 280, -2 }, /* (264) expr ::= MINUS VARIABLE */ - { 280, -1 }, /* (265) expr ::= BOOL */ - { 280, -1 }, /* (266) expr ::= NULL */ - { 280, -4 }, /* (267) expr ::= ID LP exprlist RP */ - { 280, -4 }, /* (268) expr ::= ID LP STAR RP */ - { 280, -6 }, /* (269) expr ::= ID LP expr AS typename RP */ - { 280, -3 }, /* (270) expr ::= expr IS NULL */ - { 280, -4 }, /* (271) expr ::= expr IS NOT NULL */ - { 280, -3 }, /* (272) expr ::= expr LT expr */ - { 280, -3 }, /* (273) expr ::= expr GT expr */ - { 280, -3 }, /* (274) expr ::= expr LE expr */ - { 280, -3 }, /* (275) expr ::= expr GE expr */ - { 280, -3 }, /* (276) expr ::= expr NE expr */ - { 280, -3 }, /* (277) expr ::= expr EQ expr */ - { 280, -5 }, /* (278) expr ::= expr BETWEEN expr AND expr */ - { 280, -3 }, /* (279) expr ::= expr AND expr */ - { 280, -3 }, /* (280) expr ::= expr OR expr */ - { 280, -3 }, /* (281) expr ::= expr PLUS expr */ - { 280, -3 }, /* (282) expr ::= expr MINUS expr */ - { 280, -3 }, /* (283) expr ::= expr STAR expr */ - { 280, -3 }, /* (284) expr ::= expr SLASH expr */ - { 280, -3 }, /* (285) expr ::= expr REM expr */ - { 280, -3 }, /* (286) expr ::= expr BITAND expr */ - { 280, -3 }, /* (287) expr ::= expr BITOR expr */ - { 280, -3 }, /* (288) expr ::= expr BITXOR expr */ - { 280, -2 }, /* (289) expr ::= BITNOT expr */ - { 280, -3 }, /* (290) expr ::= expr LSHIFT expr */ - { 280, -3 }, /* (291) expr ::= expr RSHIFT expr */ - { 280, -3 }, /* (292) expr ::= expr LIKE expr */ - { 280, -3 }, /* (293) expr ::= expr MATCH expr */ - { 280, -3 }, /* (294) expr ::= expr NMATCH expr */ - { 280, -3 }, /* (295) expr ::= ID CONTAINS STRING */ - { 280, -5 }, /* (296) expr ::= ID DOT ID CONTAINS STRING */ - { 290, -3 }, /* (297) arrow ::= ID ARROW STRING */ - { 290, -5 }, /* (298) arrow ::= ID DOT ID ARROW STRING */ - { 280, -1 }, /* (299) expr ::= arrow */ - { 280, -5 }, /* (300) expr ::= expr IN LP exprlist RP */ - { 216, -3 }, /* (301) exprlist ::= exprlist COMMA expritem */ - { 216, -1 }, /* (302) exprlist ::= expritem */ - { 292, -1 }, /* (303) expritem ::= expr */ - { 292, 0 }, /* (304) expritem ::= */ - { 208, -3 }, /* (305) cmd ::= RESET QUERY CACHE */ - { 208, -3 }, /* (306) cmd ::= SYNCDB ids REPLICA */ - { 208, -7 }, /* (307) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - { 208, -7 }, /* (308) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - { 208, -7 }, /* (309) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ - { 208, -7 }, /* (310) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - { 208, -7 }, /* (311) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - { 208, -8 }, /* (312) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - { 208, -9 }, /* (313) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - { 208, -7 }, /* (314) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ - { 208, -7 }, /* (315) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - { 208, -7 }, /* (316) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - { 208, -7 }, /* (317) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ - { 208, -7 }, /* (318) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - { 208, -7 }, /* (319) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - { 208, -8 }, /* (320) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - { 208, -9 }, /* (321) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ - { 208, -7 }, /* (322) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ - { 208, -3 }, /* (323) cmd ::= KILL CONNECTION INTEGER */ - { 208, -5 }, /* (324) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - { 208, -5 }, /* (325) cmd ::= KILL QUERY INTEGER COLON INTEGER */ - { 208, -6 }, /* (326) cmd ::= DELETE FROM ifexists ids cpxName where_opt */ + { 208, -5 }, /* (42) cmd ::= ALTER USER ids TAGS ids */ + { 208, -4 }, /* (43) cmd ::= ALTER DNODE ids ids */ + { 208, -5 }, /* (44) cmd ::= ALTER DNODE ids ids ids */ + { 208, -3 }, /* (45) cmd ::= ALTER LOCAL ids */ + { 208, -4 }, /* (46) cmd ::= ALTER LOCAL ids ids */ + { 208, -4 }, /* (47) cmd ::= ALTER DATABASE ids alter_db_optr */ + { 208, -4 }, /* (48) cmd ::= ALTER TOPIC ids alter_topic_optr */ + { 208, -4 }, /* (49) cmd ::= ALTER ACCOUNT ids acct_optr */ + { 208, -6 }, /* (50) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ + { 208, -6 }, /* (51) cmd ::= COMPACT VNODES IN LP exprlist RP */ + { 209, -1 }, /* (52) ids ::= ID */ + { 209, -1 }, /* (53) ids ::= STRING */ + { 212, -2 }, /* (54) ifexists ::= IF EXISTS */ + { 212, 0 }, /* (55) ifexists ::= */ + { 217, -3 }, /* (56) ifnotexists ::= IF NOT EXISTS */ + { 217, 0 }, /* (57) ifnotexists ::= */ + { 208, -3 }, /* (58) cmd ::= CREATE DNODE ids */ + { 208, -6 }, /* (59) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ + { 208, -5 }, /* (60) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ + { 208, -5 }, /* (61) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ + { 208, -8 }, /* (62) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + { 208, -9 }, /* (63) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + { 208, -5 }, /* (64) cmd ::= CREATE USER ids PASS ids */ + { 208, -7 }, /* (65) cmd ::= CREATE USER ids PASS ids TAGS ids */ + { 221, 0 }, /* (66) bufsize ::= */ + { 221, -2 }, /* (67) bufsize ::= BUFSIZE INTEGER */ + { 222, 0 }, /* (68) pps ::= */ + { 222, -2 }, /* (69) pps ::= PPS INTEGER */ + { 223, 0 }, /* (70) tseries ::= */ + { 223, -2 }, /* (71) tseries ::= TSERIES INTEGER */ + { 224, 0 }, /* (72) dbs ::= */ + { 224, -2 }, /* (73) dbs ::= DBS INTEGER */ + { 225, 0 }, /* (74) streams ::= */ + { 225, -2 }, /* (75) streams ::= STREAMS INTEGER */ + { 226, 0 }, /* (76) storage ::= */ + { 226, -2 }, /* (77) storage ::= STORAGE INTEGER */ + { 227, 0 }, /* (78) qtime ::= */ + { 227, -2 }, /* (79) qtime ::= QTIME INTEGER */ + { 228, 0 }, /* (80) users ::= */ + { 228, -2 }, /* (81) users ::= USERS INTEGER */ + { 229, 0 }, /* (82) conns ::= */ + { 229, -2 }, /* (83) conns ::= CONNS INTEGER */ + { 230, 0 }, /* (84) state ::= */ + { 230, -2 }, /* (85) state ::= STATE ids */ + { 215, -9 }, /* (86) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ + { 231, -3 }, /* (87) intitemlist ::= intitemlist COMMA intitem */ + { 231, -1 }, /* (88) intitemlist ::= intitem */ + { 232, -1 }, /* (89) intitem ::= INTEGER */ + { 233, -2 }, /* (90) keep ::= KEEP intitemlist */ + { 234, -2 }, /* (91) cache ::= CACHE INTEGER */ + { 235, -2 }, /* (92) replica ::= REPLICA INTEGER */ + { 236, -2 }, /* (93) quorum ::= QUORUM INTEGER */ + { 237, -2 }, /* (94) days ::= DAYS INTEGER */ + { 238, -2 }, /* (95) minrows ::= MINROWS INTEGER */ + { 239, -2 }, /* (96) maxrows ::= MAXROWS INTEGER */ + { 240, -2 }, /* (97) blocks ::= BLOCKS INTEGER */ + { 241, -2 }, /* (98) ctime ::= CTIME INTEGER */ + { 242, -2 }, /* (99) wal ::= WAL INTEGER */ + { 243, -2 }, /* (100) fsync ::= FSYNC INTEGER */ + { 244, -2 }, /* (101) comp ::= COMP INTEGER */ + { 245, -2 }, /* (102) prec ::= PRECISION STRING */ + { 246, -2 }, /* (103) update ::= UPDATE INTEGER */ + { 247, -2 }, /* (104) cachelast ::= CACHELAST INTEGER */ + { 248, -2 }, /* (105) partitions ::= PARTITIONS INTEGER */ + { 218, 0 }, /* (106) db_optr ::= */ + { 218, -2 }, /* (107) db_optr ::= db_optr cache */ + { 218, -2 }, /* (108) db_optr ::= db_optr replica */ + { 218, -2 }, /* (109) db_optr ::= db_optr quorum */ + { 218, -2 }, /* (110) db_optr ::= db_optr days */ + { 218, -2 }, /* (111) db_optr ::= db_optr minrows */ + { 218, -2 }, /* (112) db_optr ::= db_optr maxrows */ + { 218, -2 }, /* (113) db_optr ::= db_optr blocks */ + { 218, -2 }, /* (114) db_optr ::= db_optr ctime */ + { 218, -2 }, /* (115) db_optr ::= db_optr wal */ + { 218, -2 }, /* (116) db_optr ::= db_optr fsync */ + { 218, -2 }, /* (117) db_optr ::= db_optr comp */ + { 218, -2 }, /* (118) db_optr ::= db_optr prec */ + { 218, -2 }, /* (119) db_optr ::= db_optr keep */ + { 218, -2 }, /* (120) db_optr ::= db_optr update */ + { 218, -2 }, /* (121) db_optr ::= db_optr cachelast */ + { 219, -1 }, /* (122) topic_optr ::= db_optr */ + { 219, -2 }, /* (123) topic_optr ::= topic_optr partitions */ + { 213, 0 }, /* (124) alter_db_optr ::= */ + { 213, -2 }, /* (125) alter_db_optr ::= alter_db_optr replica */ + { 213, -2 }, /* (126) alter_db_optr ::= alter_db_optr quorum */ + { 213, -2 }, /* (127) alter_db_optr ::= alter_db_optr keep */ + { 213, -2 }, /* (128) alter_db_optr ::= alter_db_optr blocks */ + { 213, -2 }, /* (129) alter_db_optr ::= alter_db_optr comp */ + { 213, -2 }, /* (130) alter_db_optr ::= alter_db_optr update */ + { 213, -2 }, /* (131) alter_db_optr ::= alter_db_optr cachelast */ + { 214, -1 }, /* (132) alter_topic_optr ::= alter_db_optr */ + { 214, -2 }, /* (133) alter_topic_optr ::= alter_topic_optr partitions */ + { 220, -1 }, /* (134) typename ::= ids */ + { 220, -4 }, /* (135) typename ::= ids LP signed RP */ + { 220, -2 }, /* (136) typename ::= ids UNSIGNED */ + { 249, -1 }, /* (137) signed ::= INTEGER */ + { 249, -2 }, /* (138) signed ::= PLUS INTEGER */ + { 249, -2 }, /* (139) signed ::= MINUS INTEGER */ + { 208, -3 }, /* (140) cmd ::= CREATE TABLE create_table_args */ + { 208, -3 }, /* (141) cmd ::= CREATE TABLE create_stable_args */ + { 208, -3 }, /* (142) cmd ::= CREATE STABLE create_stable_args */ + { 208, -3 }, /* (143) cmd ::= CREATE TABLE create_table_list */ + { 252, -1 }, /* (144) create_table_list ::= create_from_stable */ + { 252, -2 }, /* (145) create_table_list ::= create_table_list create_from_stable */ + { 250, -6 }, /* (146) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ + { 251, -10 }, /* (147) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ + { 253, -10 }, /* (148) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ + { 253, -13 }, /* (149) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ + { 256, -3 }, /* (150) tagNamelist ::= tagNamelist COMMA ids */ + { 256, -1 }, /* (151) tagNamelist ::= ids */ + { 250, -7 }, /* (152) create_table_args ::= ifnotexists ids cpxName to_opt split_opt AS select */ + { 257, 0 }, /* (153) to_opt ::= */ + { 257, -3 }, /* (154) to_opt ::= TO ids cpxName */ + { 258, 0 }, /* (155) split_opt ::= */ + { 258, -2 }, /* (156) split_opt ::= SPLIT ids */ + { 254, -3 }, /* (157) columnlist ::= columnlist COMMA column */ + { 254, -1 }, /* (158) columnlist ::= column */ + { 261, -2 }, /* (159) column ::= ids typename */ + { 255, -3 }, /* (160) tagitemlist ::= tagitemlist COMMA tagitem */ + { 255, -1 }, /* (161) tagitemlist ::= tagitem */ + { 262, -1 }, /* (162) tagitem ::= INTEGER */ + { 262, -1 }, /* (163) tagitem ::= FLOAT */ + { 262, -1 }, /* (164) tagitem ::= STRING */ + { 262, -1 }, /* (165) tagitem ::= BOOL */ + { 262, -1 }, /* (166) tagitem ::= NULL */ + { 262, -1 }, /* (167) tagitem ::= NOW */ + { 262, -3 }, /* (168) tagitem ::= NOW PLUS VARIABLE */ + { 262, -3 }, /* (169) tagitem ::= NOW MINUS VARIABLE */ + { 262, -2 }, /* (170) tagitem ::= MINUS INTEGER */ + { 262, -2 }, /* (171) tagitem ::= MINUS FLOAT */ + { 262, -2 }, /* (172) tagitem ::= PLUS INTEGER */ + { 262, -2 }, /* (173) tagitem ::= PLUS FLOAT */ + { 259, -15 }, /* (174) select ::= SELECT selcollist from where_opt range_option interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ + { 259, -3 }, /* (175) select ::= LP select RP */ + { 277, -1 }, /* (176) union ::= select */ + { 277, -4 }, /* (177) union ::= union UNION ALL select */ + { 208, -1 }, /* (178) cmd ::= union */ + { 259, -2 }, /* (179) select ::= SELECT selcollist */ + { 278, -2 }, /* (180) sclp ::= selcollist COMMA */ + { 278, 0 }, /* (181) sclp ::= */ + { 263, -4 }, /* (182) selcollist ::= sclp distinct expr as */ + { 263, -2 }, /* (183) selcollist ::= sclp STAR */ + { 281, -2 }, /* (184) as ::= AS ids */ + { 281, -1 }, /* (185) as ::= ids */ + { 281, 0 }, /* (186) as ::= */ + { 279, -1 }, /* (187) distinct ::= DISTINCT */ + { 279, 0 }, /* (188) distinct ::= */ + { 264, -2 }, /* (189) from ::= FROM tablelist */ + { 264, -2 }, /* (190) from ::= FROM sub */ + { 283, -3 }, /* (191) sub ::= LP union RP */ + { 283, -4 }, /* (192) sub ::= LP union RP ids */ + { 283, -6 }, /* (193) sub ::= sub COMMA LP union RP ids */ + { 282, -2 }, /* (194) tablelist ::= ids cpxName */ + { 282, -3 }, /* (195) tablelist ::= ids cpxName ids */ + { 282, -4 }, /* (196) tablelist ::= tablelist COMMA ids cpxName */ + { 282, -5 }, /* (197) tablelist ::= tablelist COMMA ids cpxName ids */ + { 284, -1 }, /* (198) tmvar ::= VARIABLE */ + { 285, -1 }, /* (199) timestamp ::= INTEGER */ + { 285, -2 }, /* (200) timestamp ::= MINUS INTEGER */ + { 285, -2 }, /* (201) timestamp ::= PLUS INTEGER */ + { 285, -1 }, /* (202) timestamp ::= STRING */ + { 285, -1 }, /* (203) timestamp ::= NOW */ + { 285, -3 }, /* (204) timestamp ::= NOW PLUS VARIABLE */ + { 285, -3 }, /* (205) timestamp ::= NOW MINUS VARIABLE */ + { 266, 0 }, /* (206) range_option ::= */ + { 266, -6 }, /* (207) range_option ::= RANGE LP timestamp COMMA timestamp RP */ + { 267, -4 }, /* (208) interval_option ::= intervalKey LP tmvar RP */ + { 267, -6 }, /* (209) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ + { 267, 0 }, /* (210) interval_option ::= */ + { 286, -1 }, /* (211) intervalKey ::= INTERVAL */ + { 286, -1 }, /* (212) intervalKey ::= EVERY */ + { 269, 0 }, /* (213) session_option ::= */ + { 269, -7 }, /* (214) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ + { 270, 0 }, /* (215) windowstate_option ::= */ + { 270, -4 }, /* (216) windowstate_option ::= STATE_WINDOW LP ids RP */ + { 271, 0 }, /* (217) fill_opt ::= */ + { 271, -6 }, /* (218) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + { 271, -4 }, /* (219) fill_opt ::= FILL LP ID RP */ + { 268, -4 }, /* (220) sliding_opt ::= SLIDING LP tmvar RP */ + { 268, 0 }, /* (221) sliding_opt ::= */ + { 274, 0 }, /* (222) orderby_opt ::= */ + { 274, -3 }, /* (223) orderby_opt ::= ORDER BY sortlist */ + { 287, -4 }, /* (224) sortlist ::= sortlist COMMA item sortorder */ + { 287, -4 }, /* (225) sortlist ::= sortlist COMMA arrow sortorder */ + { 287, -2 }, /* (226) sortlist ::= item sortorder */ + { 287, -2 }, /* (227) sortlist ::= arrow sortorder */ + { 288, -1 }, /* (228) item ::= ID */ + { 288, -3 }, /* (229) item ::= ID DOT ID */ + { 289, -1 }, /* (230) sortorder ::= ASC */ + { 289, -1 }, /* (231) sortorder ::= DESC */ + { 289, 0 }, /* (232) sortorder ::= */ + { 272, 0 }, /* (233) groupby_opt ::= */ + { 272, -3 }, /* (234) groupby_opt ::= GROUP BY grouplist */ + { 291, -3 }, /* (235) grouplist ::= grouplist COMMA item */ + { 291, -3 }, /* (236) grouplist ::= grouplist COMMA arrow */ + { 291, -1 }, /* (237) grouplist ::= item */ + { 291, -1 }, /* (238) grouplist ::= arrow */ + { 273, 0 }, /* (239) having_opt ::= */ + { 273, -2 }, /* (240) having_opt ::= HAVING expr */ + { 276, 0 }, /* (241) limit_opt ::= */ + { 276, -2 }, /* (242) limit_opt ::= LIMIT signed */ + { 276, -4 }, /* (243) limit_opt ::= LIMIT signed OFFSET signed */ + { 276, -4 }, /* (244) limit_opt ::= LIMIT signed COMMA signed */ + { 275, 0 }, /* (245) slimit_opt ::= */ + { 275, -2 }, /* (246) slimit_opt ::= SLIMIT signed */ + { 275, -4 }, /* (247) slimit_opt ::= SLIMIT signed SOFFSET signed */ + { 275, -4 }, /* (248) slimit_opt ::= SLIMIT signed COMMA signed */ + { 265, 0 }, /* (249) where_opt ::= */ + { 265, -2 }, /* (250) where_opt ::= WHERE expr */ + { 280, -3 }, /* (251) expr ::= LP expr RP */ + { 280, -1 }, /* (252) expr ::= ID */ + { 280, -3 }, /* (253) expr ::= ID DOT ID */ + { 280, -3 }, /* (254) expr ::= ID DOT STAR */ + { 280, -1 }, /* (255) expr ::= INTEGER */ + { 280, -2 }, /* (256) expr ::= MINUS INTEGER */ + { 280, -2 }, /* (257) expr ::= PLUS INTEGER */ + { 280, -1 }, /* (258) expr ::= FLOAT */ + { 280, -2 }, /* (259) expr ::= MINUS FLOAT */ + { 280, -2 }, /* (260) expr ::= PLUS FLOAT */ + { 280, -1 }, /* (261) expr ::= STRING */ + { 280, -1 }, /* (262) expr ::= NOW */ + { 280, -1 }, /* (263) expr ::= TODAY */ + { 280, -1 }, /* (264) expr ::= VARIABLE */ + { 280, -2 }, /* (265) expr ::= PLUS VARIABLE */ + { 280, -2 }, /* (266) expr ::= MINUS VARIABLE */ + { 280, -1 }, /* (267) expr ::= BOOL */ + { 280, -1 }, /* (268) expr ::= NULL */ + { 280, -4 }, /* (269) expr ::= ID LP exprlist RP */ + { 280, -4 }, /* (270) expr ::= ID LP STAR RP */ + { 280, -6 }, /* (271) expr ::= ID LP expr AS typename RP */ + { 280, -3 }, /* (272) expr ::= expr IS NULL */ + { 280, -4 }, /* (273) expr ::= expr IS NOT NULL */ + { 280, -3 }, /* (274) expr ::= expr LT expr */ + { 280, -3 }, /* (275) expr ::= expr GT expr */ + { 280, -3 }, /* (276) expr ::= expr LE expr */ + { 280, -3 }, /* (277) expr ::= expr GE expr */ + { 280, -3 }, /* (278) expr ::= expr NE expr */ + { 280, -3 }, /* (279) expr ::= expr EQ expr */ + { 280, -5 }, /* (280) expr ::= expr BETWEEN expr AND expr */ + { 280, -3 }, /* (281) expr ::= expr AND expr */ + { 280, -3 }, /* (282) expr ::= expr OR expr */ + { 280, -3 }, /* (283) expr ::= expr PLUS expr */ + { 280, -3 }, /* (284) expr ::= expr MINUS expr */ + { 280, -3 }, /* (285) expr ::= expr STAR expr */ + { 280, -3 }, /* (286) expr ::= expr SLASH expr */ + { 280, -3 }, /* (287) expr ::= expr REM expr */ + { 280, -3 }, /* (288) expr ::= expr BITAND expr */ + { 280, -3 }, /* (289) expr ::= expr BITOR expr */ + { 280, -3 }, /* (290) expr ::= expr BITXOR expr */ + { 280, -2 }, /* (291) expr ::= BITNOT expr */ + { 280, -3 }, /* (292) expr ::= expr LSHIFT expr */ + { 280, -3 }, /* (293) expr ::= expr RSHIFT expr */ + { 280, -3 }, /* (294) expr ::= expr LIKE expr */ + { 280, -3 }, /* (295) expr ::= expr MATCH expr */ + { 280, -3 }, /* (296) expr ::= expr NMATCH expr */ + { 280, -3 }, /* (297) expr ::= ID CONTAINS STRING */ + { 280, -5 }, /* (298) expr ::= ID DOT ID CONTAINS STRING */ + { 290, -3 }, /* (299) arrow ::= ID ARROW STRING */ + { 290, -5 }, /* (300) arrow ::= ID DOT ID ARROW STRING */ + { 280, -1 }, /* (301) expr ::= arrow */ + { 280, -5 }, /* (302) expr ::= expr IN LP exprlist RP */ + { 216, -3 }, /* (303) exprlist ::= exprlist COMMA expritem */ + { 216, -1 }, /* (304) exprlist ::= expritem */ + { 292, -1 }, /* (305) expritem ::= expr */ + { 292, 0 }, /* (306) expritem ::= */ + { 208, -3 }, /* (307) cmd ::= RESET QUERY CACHE */ + { 208, -3 }, /* (308) cmd ::= SYNCDB ids REPLICA */ + { 208, -7 }, /* (309) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + { 208, -7 }, /* (310) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + { 208, -7 }, /* (311) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ + { 208, -7 }, /* (312) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + { 208, -7 }, /* (313) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + { 208, -8 }, /* (314) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + { 208, -9 }, /* (315) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + { 208, -7 }, /* (316) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ + { 208, -7 }, /* (317) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + { 208, -7 }, /* (318) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + { 208, -7 }, /* (319) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ + { 208, -7 }, /* (320) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + { 208, -7 }, /* (321) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + { 208, -8 }, /* (322) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + { 208, -9 }, /* (323) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ + { 208, -7 }, /* (324) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ + { 208, -3 }, /* (325) cmd ::= KILL CONNECTION INTEGER */ + { 208, -5 }, /* (326) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + { 208, -5 }, /* (327) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + { 208, -6 }, /* (328) cmd ::= DELETE FROM ifexists ids cpxName where_opt */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -2347,9 +2349,9 @@ static void yy_reduce( /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* program ::= cmd */ - case 138: /* cmd ::= CREATE TABLE create_table_args */ yytestcase(yyruleno==138); - case 139: /* cmd ::= CREATE TABLE create_stable_args */ yytestcase(yyruleno==139); - case 140: /* cmd ::= CREATE STABLE create_stable_args */ yytestcase(yyruleno==140); + case 140: /* cmd ::= CREATE TABLE create_table_args */ yytestcase(yyruleno==140); + case 141: /* cmd ::= CREATE TABLE create_stable_args */ yytestcase(yyruleno==141); + case 142: /* cmd ::= CREATE STABLE create_stable_args */ yytestcase(yyruleno==142); {} break; case 1: /* cmd ::= SHOW DATABASES */ @@ -2500,96 +2502,102 @@ static void yy_reduce( } break; case 40: /* cmd ::= ALTER USER ids PASS ids */ -{ setAlterUserSql(pInfo, TSDB_ALTER_USER_PASSWD, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, NULL); } +{ setAlterUserSql(pInfo, TSDB_ALTER_USER_PASSWD, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, NULL, NULL);} break; case 41: /* cmd ::= ALTER USER ids PRIVILEGE ids */ -{ setAlterUserSql(pInfo, TSDB_ALTER_USER_PRIVILEGES, &yymsp[-2].minor.yy0, NULL, &yymsp[0].minor.yy0);} +{ setAlterUserSql(pInfo, TSDB_ALTER_USER_PRIVILEGES, &yymsp[-2].minor.yy0, NULL, &yymsp[0].minor.yy0, NULL);} break; - case 42: /* cmd ::= ALTER DNODE ids ids */ + case 42: /* cmd ::= ALTER USER ids TAGS ids */ +{ setAlterUserSql(pInfo, TSDB_ALTER_USER_TAGS, &yymsp[-2].minor.yy0, NULL, NULL, &yymsp[0].minor.yy0);} + break; + case 43: /* cmd ::= ALTER DNODE ids ids */ { setDCLSqlElems(pInfo, TSDB_SQL_CFG_DNODE, 2, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 43: /* cmd ::= ALTER DNODE ids ids ids */ + case 44: /* cmd ::= ALTER DNODE ids ids ids */ { setDCLSqlElems(pInfo, TSDB_SQL_CFG_DNODE, 3, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 44: /* cmd ::= ALTER LOCAL ids */ + case 45: /* cmd ::= ALTER LOCAL ids */ { setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 1, &yymsp[0].minor.yy0); } break; - case 45: /* cmd ::= ALTER LOCAL ids ids */ + case 46: /* cmd ::= ALTER LOCAL ids ids */ { setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 2, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } break; - case 46: /* cmd ::= ALTER DATABASE ids alter_db_optr */ - case 47: /* cmd ::= ALTER TOPIC ids alter_topic_optr */ yytestcase(yyruleno==47); + case 47: /* cmd ::= ALTER DATABASE ids alter_db_optr */ + case 48: /* cmd ::= ALTER TOPIC ids alter_topic_optr */ yytestcase(yyruleno==48); { SStrToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy564, &t);} break; - case 48: /* cmd ::= ALTER ACCOUNT ids acct_optr */ + case 49: /* cmd ::= ALTER ACCOUNT ids acct_optr */ { setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy563);} break; - case 49: /* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ + case 50: /* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ { setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy563);} break; - case 50: /* cmd ::= COMPACT VNODES IN LP exprlist RP */ + case 51: /* cmd ::= COMPACT VNODES IN LP exprlist RP */ { setCompactVnodeSql(pInfo, TSDB_SQL_COMPACT_VNODE, yymsp[-1].minor.yy367);} break; - case 51: /* ids ::= ID */ - case 52: /* ids ::= STRING */ yytestcase(yyruleno==52); + case 52: /* ids ::= ID */ + case 53: /* ids ::= STRING */ yytestcase(yyruleno==53); {yylhsminor.yy0 = yymsp[0].minor.yy0; } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 53: /* ifexists ::= IF EXISTS */ + case 54: /* ifexists ::= IF EXISTS */ { yymsp[-1].minor.yy0.n = 1;} break; - case 54: /* ifexists ::= */ - case 56: /* ifnotexists ::= */ yytestcase(yyruleno==56); - case 186: /* distinct ::= */ yytestcase(yyruleno==186); + case 55: /* ifexists ::= */ + case 57: /* ifnotexists ::= */ yytestcase(yyruleno==57); + case 188: /* distinct ::= */ yytestcase(yyruleno==188); { yymsp[1].minor.yy0.n = 0;} break; - case 55: /* ifnotexists ::= IF NOT EXISTS */ + case 56: /* ifnotexists ::= IF NOT EXISTS */ { yymsp[-2].minor.yy0.n = 1;} break; - case 57: /* cmd ::= CREATE DNODE ids */ + case 58: /* cmd ::= CREATE DNODE ids */ { setDCLSqlElems(pInfo, TSDB_SQL_CREATE_DNODE, 1, &yymsp[0].minor.yy0);} break; - case 58: /* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ + case 59: /* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ { setCreateAcctSql(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy563);} break; - case 59: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */ - case 60: /* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ yytestcase(yyruleno==60); + case 60: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */ + case 61: /* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ yytestcase(yyruleno==61); { setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy564, &yymsp[-2].minor.yy0);} break; - case 61: /* cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + case 62: /* cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ { setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy307, &yymsp[0].minor.yy0, 1);} break; - case 62: /* cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + case 63: /* cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ { setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy307, &yymsp[0].minor.yy0, 2);} break; - case 63: /* cmd ::= CREATE USER ids PASS ids */ -{ setCreateUserSql(pInfo, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);} - break; - case 64: /* bufsize ::= */ - case 66: /* pps ::= */ yytestcase(yyruleno==66); - case 68: /* tseries ::= */ yytestcase(yyruleno==68); - case 70: /* dbs ::= */ yytestcase(yyruleno==70); - case 72: /* streams ::= */ yytestcase(yyruleno==72); - case 74: /* storage ::= */ yytestcase(yyruleno==74); - case 76: /* qtime ::= */ yytestcase(yyruleno==76); - case 78: /* users ::= */ yytestcase(yyruleno==78); - case 80: /* conns ::= */ yytestcase(yyruleno==80); - case 82: /* state ::= */ yytestcase(yyruleno==82); + case 64: /* cmd ::= CREATE USER ids PASS ids */ +{ setCreateUserSql(pInfo, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, NULL);} + break; + case 65: /* cmd ::= CREATE USER ids PASS ids TAGS ids */ +{ setCreateUserSql(pInfo, &yymsp[-4].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);} + break; + case 66: /* bufsize ::= */ + case 68: /* pps ::= */ yytestcase(yyruleno==68); + case 70: /* tseries ::= */ yytestcase(yyruleno==70); + case 72: /* dbs ::= */ yytestcase(yyruleno==72); + case 74: /* streams ::= */ yytestcase(yyruleno==74); + case 76: /* storage ::= */ yytestcase(yyruleno==76); + case 78: /* qtime ::= */ yytestcase(yyruleno==78); + case 80: /* users ::= */ yytestcase(yyruleno==80); + case 82: /* conns ::= */ yytestcase(yyruleno==82); + case 84: /* state ::= */ yytestcase(yyruleno==84); { yymsp[1].minor.yy0.n = 0; } break; - case 65: /* bufsize ::= BUFSIZE INTEGER */ - case 67: /* pps ::= PPS INTEGER */ yytestcase(yyruleno==67); - case 69: /* tseries ::= TSERIES INTEGER */ yytestcase(yyruleno==69); - case 71: /* dbs ::= DBS INTEGER */ yytestcase(yyruleno==71); - case 73: /* streams ::= STREAMS INTEGER */ yytestcase(yyruleno==73); - case 75: /* storage ::= STORAGE INTEGER */ yytestcase(yyruleno==75); - case 77: /* qtime ::= QTIME INTEGER */ yytestcase(yyruleno==77); - case 79: /* users ::= USERS INTEGER */ yytestcase(yyruleno==79); - case 81: /* conns ::= CONNS INTEGER */ yytestcase(yyruleno==81); - case 83: /* state ::= STATE ids */ yytestcase(yyruleno==83); + case 67: /* bufsize ::= BUFSIZE INTEGER */ + case 69: /* pps ::= PPS INTEGER */ yytestcase(yyruleno==69); + case 71: /* tseries ::= TSERIES INTEGER */ yytestcase(yyruleno==71); + case 73: /* dbs ::= DBS INTEGER */ yytestcase(yyruleno==73); + case 75: /* streams ::= STREAMS INTEGER */ yytestcase(yyruleno==75); + case 77: /* storage ::= STORAGE INTEGER */ yytestcase(yyruleno==77); + case 79: /* qtime ::= QTIME INTEGER */ yytestcase(yyruleno==79); + case 81: /* users ::= USERS INTEGER */ yytestcase(yyruleno==81); + case 83: /* conns ::= CONNS INTEGER */ yytestcase(yyruleno==83); + case 85: /* state ::= STATE ids */ yytestcase(yyruleno==85); { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } break; - case 84: /* acct_optr ::= pps tseries storage streams qtime dbs users conns state */ + case 86: /* acct_optr ::= pps tseries storage streams qtime dbs users conns state */ { yylhsminor.yy563.maxUsers = (yymsp[-2].minor.yy0.n>0)?atoi(yymsp[-2].minor.yy0.z):-1; yylhsminor.yy563.maxDbs = (yymsp[-3].minor.yy0.n>0)?atoi(yymsp[-3].minor.yy0.z):-1; @@ -2603,135 +2611,135 @@ static void yy_reduce( } yymsp[-8].minor.yy563 = yylhsminor.yy563; break; - case 85: /* intitemlist ::= intitemlist COMMA intitem */ - case 158: /* tagitemlist ::= tagitemlist COMMA tagitem */ yytestcase(yyruleno==158); + case 87: /* intitemlist ::= intitemlist COMMA intitem */ + case 160: /* tagitemlist ::= tagitemlist COMMA tagitem */ yytestcase(yyruleno==160); { yylhsminor.yy367 = tVariantListAppend(yymsp[-2].minor.yy367, &yymsp[0].minor.yy410, -1); } yymsp[-2].minor.yy367 = yylhsminor.yy367; break; - case 86: /* intitemlist ::= intitem */ - case 159: /* tagitemlist ::= tagitem */ yytestcase(yyruleno==159); + case 88: /* intitemlist ::= intitem */ + case 161: /* tagitemlist ::= tagitem */ yytestcase(yyruleno==161); { yylhsminor.yy367 = tVariantListAppend(NULL, &yymsp[0].minor.yy410, -1); } yymsp[0].minor.yy367 = yylhsminor.yy367; break; - case 87: /* intitem ::= INTEGER */ - case 160: /* tagitem ::= INTEGER */ yytestcase(yyruleno==160); - case 161: /* tagitem ::= FLOAT */ yytestcase(yyruleno==161); - case 162: /* tagitem ::= STRING */ yytestcase(yyruleno==162); - case 163: /* tagitem ::= BOOL */ yytestcase(yyruleno==163); + case 89: /* intitem ::= INTEGER */ + case 162: /* tagitem ::= INTEGER */ yytestcase(yyruleno==162); + case 163: /* tagitem ::= FLOAT */ yytestcase(yyruleno==163); + case 164: /* tagitem ::= STRING */ yytestcase(yyruleno==164); + case 165: /* tagitem ::= BOOL */ yytestcase(yyruleno==165); { toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy410, &yymsp[0].minor.yy0); } yymsp[0].minor.yy410 = yylhsminor.yy410; break; - case 88: /* keep ::= KEEP intitemlist */ + case 90: /* keep ::= KEEP intitemlist */ { yymsp[-1].minor.yy367 = yymsp[0].minor.yy367; } break; - case 89: /* cache ::= CACHE INTEGER */ - case 90: /* replica ::= REPLICA INTEGER */ yytestcase(yyruleno==90); - case 91: /* quorum ::= QUORUM INTEGER */ yytestcase(yyruleno==91); - case 92: /* days ::= DAYS INTEGER */ yytestcase(yyruleno==92); - case 93: /* minrows ::= MINROWS INTEGER */ yytestcase(yyruleno==93); - case 94: /* maxrows ::= MAXROWS INTEGER */ yytestcase(yyruleno==94); - case 95: /* blocks ::= BLOCKS INTEGER */ yytestcase(yyruleno==95); - case 96: /* ctime ::= CTIME INTEGER */ yytestcase(yyruleno==96); - case 97: /* wal ::= WAL INTEGER */ yytestcase(yyruleno==97); - case 98: /* fsync ::= FSYNC INTEGER */ yytestcase(yyruleno==98); - case 99: /* comp ::= COMP INTEGER */ yytestcase(yyruleno==99); - case 100: /* prec ::= PRECISION STRING */ yytestcase(yyruleno==100); - case 101: /* update ::= UPDATE INTEGER */ yytestcase(yyruleno==101); - case 102: /* cachelast ::= CACHELAST INTEGER */ yytestcase(yyruleno==102); - case 103: /* partitions ::= PARTITIONS INTEGER */ yytestcase(yyruleno==103); + case 91: /* cache ::= CACHE INTEGER */ + case 92: /* replica ::= REPLICA INTEGER */ yytestcase(yyruleno==92); + case 93: /* quorum ::= QUORUM INTEGER */ yytestcase(yyruleno==93); + case 94: /* days ::= DAYS INTEGER */ yytestcase(yyruleno==94); + case 95: /* minrows ::= MINROWS INTEGER */ yytestcase(yyruleno==95); + case 96: /* maxrows ::= MAXROWS INTEGER */ yytestcase(yyruleno==96); + case 97: /* blocks ::= BLOCKS INTEGER */ yytestcase(yyruleno==97); + case 98: /* ctime ::= CTIME INTEGER */ yytestcase(yyruleno==98); + case 99: /* wal ::= WAL INTEGER */ yytestcase(yyruleno==99); + case 100: /* fsync ::= FSYNC INTEGER */ yytestcase(yyruleno==100); + case 101: /* comp ::= COMP INTEGER */ yytestcase(yyruleno==101); + case 102: /* prec ::= PRECISION STRING */ yytestcase(yyruleno==102); + case 103: /* update ::= UPDATE INTEGER */ yytestcase(yyruleno==103); + case 104: /* cachelast ::= CACHELAST INTEGER */ yytestcase(yyruleno==104); + case 105: /* partitions ::= PARTITIONS INTEGER */ yytestcase(yyruleno==105); { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } break; - case 104: /* db_optr ::= */ + case 106: /* db_optr ::= */ {setDefaultCreateDbOption(&yymsp[1].minor.yy564); yymsp[1].minor.yy564.dbType = TSDB_DB_TYPE_DEFAULT;} break; - case 105: /* db_optr ::= db_optr cache */ + case 107: /* db_optr ::= db_optr cache */ { yylhsminor.yy564 = yymsp[-1].minor.yy564; yylhsminor.yy564.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); } yymsp[-1].minor.yy564 = yylhsminor.yy564; break; - case 106: /* db_optr ::= db_optr replica */ - case 123: /* alter_db_optr ::= alter_db_optr replica */ yytestcase(yyruleno==123); + case 108: /* db_optr ::= db_optr replica */ + case 125: /* alter_db_optr ::= alter_db_optr replica */ yytestcase(yyruleno==125); { yylhsminor.yy564 = yymsp[-1].minor.yy564; yylhsminor.yy564.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); } yymsp[-1].minor.yy564 = yylhsminor.yy564; break; - case 107: /* db_optr ::= db_optr quorum */ - case 124: /* alter_db_optr ::= alter_db_optr quorum */ yytestcase(yyruleno==124); + case 109: /* db_optr ::= db_optr quorum */ + case 126: /* alter_db_optr ::= alter_db_optr quorum */ yytestcase(yyruleno==126); { yylhsminor.yy564 = yymsp[-1].minor.yy564; yylhsminor.yy564.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); } yymsp[-1].minor.yy564 = yylhsminor.yy564; break; - case 108: /* db_optr ::= db_optr days */ + case 110: /* db_optr ::= db_optr days */ { yylhsminor.yy564 = yymsp[-1].minor.yy564; yylhsminor.yy564.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); } yymsp[-1].minor.yy564 = yylhsminor.yy564; break; - case 109: /* db_optr ::= db_optr minrows */ + case 111: /* db_optr ::= db_optr minrows */ { yylhsminor.yy564 = yymsp[-1].minor.yy564; yylhsminor.yy564.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } yymsp[-1].minor.yy564 = yylhsminor.yy564; break; - case 110: /* db_optr ::= db_optr maxrows */ + case 112: /* db_optr ::= db_optr maxrows */ { yylhsminor.yy564 = yymsp[-1].minor.yy564; yylhsminor.yy564.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } yymsp[-1].minor.yy564 = yylhsminor.yy564; break; - case 111: /* db_optr ::= db_optr blocks */ - case 126: /* alter_db_optr ::= alter_db_optr blocks */ yytestcase(yyruleno==126); + case 113: /* db_optr ::= db_optr blocks */ + case 128: /* alter_db_optr ::= alter_db_optr blocks */ yytestcase(yyruleno==128); { yylhsminor.yy564 = yymsp[-1].minor.yy564; yylhsminor.yy564.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); } yymsp[-1].minor.yy564 = yylhsminor.yy564; break; - case 112: /* db_optr ::= db_optr ctime */ + case 114: /* db_optr ::= db_optr ctime */ { yylhsminor.yy564 = yymsp[-1].minor.yy564; yylhsminor.yy564.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); } yymsp[-1].minor.yy564 = yylhsminor.yy564; break; - case 113: /* db_optr ::= db_optr wal */ + case 115: /* db_optr ::= db_optr wal */ { yylhsminor.yy564 = yymsp[-1].minor.yy564; yylhsminor.yy564.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } yymsp[-1].minor.yy564 = yylhsminor.yy564; break; - case 114: /* db_optr ::= db_optr fsync */ + case 116: /* db_optr ::= db_optr fsync */ { yylhsminor.yy564 = yymsp[-1].minor.yy564; yylhsminor.yy564.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); } yymsp[-1].minor.yy564 = yylhsminor.yy564; break; - case 115: /* db_optr ::= db_optr comp */ - case 127: /* alter_db_optr ::= alter_db_optr comp */ yytestcase(yyruleno==127); + case 117: /* db_optr ::= db_optr comp */ + case 129: /* alter_db_optr ::= alter_db_optr comp */ yytestcase(yyruleno==129); { yylhsminor.yy564 = yymsp[-1].minor.yy564; yylhsminor.yy564.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } yymsp[-1].minor.yy564 = yylhsminor.yy564; break; - case 116: /* db_optr ::= db_optr prec */ + case 118: /* db_optr ::= db_optr prec */ { yylhsminor.yy564 = yymsp[-1].minor.yy564; yylhsminor.yy564.precision = yymsp[0].minor.yy0; } yymsp[-1].minor.yy564 = yylhsminor.yy564; break; - case 117: /* db_optr ::= db_optr keep */ - case 125: /* alter_db_optr ::= alter_db_optr keep */ yytestcase(yyruleno==125); + case 119: /* db_optr ::= db_optr keep */ + case 127: /* alter_db_optr ::= alter_db_optr keep */ yytestcase(yyruleno==127); { yylhsminor.yy564 = yymsp[-1].minor.yy564; yylhsminor.yy564.keep = yymsp[0].minor.yy367; } yymsp[-1].minor.yy564 = yylhsminor.yy564; break; - case 118: /* db_optr ::= db_optr update */ - case 128: /* alter_db_optr ::= alter_db_optr update */ yytestcase(yyruleno==128); + case 120: /* db_optr ::= db_optr update */ + case 130: /* alter_db_optr ::= alter_db_optr update */ yytestcase(yyruleno==130); { yylhsminor.yy564 = yymsp[-1].minor.yy564; yylhsminor.yy564.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); } yymsp[-1].minor.yy564 = yylhsminor.yy564; break; - case 119: /* db_optr ::= db_optr cachelast */ - case 129: /* alter_db_optr ::= alter_db_optr cachelast */ yytestcase(yyruleno==129); + case 121: /* db_optr ::= db_optr cachelast */ + case 131: /* alter_db_optr ::= alter_db_optr cachelast */ yytestcase(yyruleno==131); { yylhsminor.yy564 = yymsp[-1].minor.yy564; yylhsminor.yy564.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); } yymsp[-1].minor.yy564 = yylhsminor.yy564; break; - case 120: /* topic_optr ::= db_optr */ - case 130: /* alter_topic_optr ::= alter_db_optr */ yytestcase(yyruleno==130); + case 122: /* topic_optr ::= db_optr */ + case 132: /* alter_topic_optr ::= alter_db_optr */ yytestcase(yyruleno==132); { yylhsminor.yy564 = yymsp[0].minor.yy564; yylhsminor.yy564.dbType = TSDB_DB_TYPE_TOPIC; } yymsp[0].minor.yy564 = yylhsminor.yy564; break; - case 121: /* topic_optr ::= topic_optr partitions */ - case 131: /* alter_topic_optr ::= alter_topic_optr partitions */ yytestcase(yyruleno==131); + case 123: /* topic_optr ::= topic_optr partitions */ + case 133: /* alter_topic_optr ::= alter_topic_optr partitions */ yytestcase(yyruleno==133); { yylhsminor.yy564 = yymsp[-1].minor.yy564; yylhsminor.yy564.partitions = strtol(yymsp[0].minor.yy0.z, NULL, 10); } yymsp[-1].minor.yy564 = yylhsminor.yy564; break; - case 122: /* alter_db_optr ::= */ + case 124: /* alter_db_optr ::= */ { setDefaultCreateDbOption(&yymsp[1].minor.yy564); yymsp[1].minor.yy564.dbType = TSDB_DB_TYPE_DEFAULT;} break; - case 132: /* typename ::= ids */ + case 134: /* typename ::= ids */ { yymsp[0].minor.yy0.type = 0; tSetColumnType (&yylhsminor.yy307, &yymsp[0].minor.yy0); } yymsp[0].minor.yy307 = yylhsminor.yy307; break; - case 133: /* typename ::= ids LP signed RP */ + case 135: /* typename ::= ids LP signed RP */ { if (yymsp[-1].minor.yy443 <= 0) { yymsp[-3].minor.yy0.type = 0; @@ -2743,7 +2751,7 @@ static void yy_reduce( } yymsp[-3].minor.yy307 = yylhsminor.yy307; break; - case 134: /* typename ::= ids UNSIGNED */ + case 136: /* typename ::= ids UNSIGNED */ { yymsp[-1].minor.yy0.type = 0; yymsp[-1].minor.yy0.n = ((yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z); @@ -2751,20 +2759,20 @@ static void yy_reduce( } yymsp[-1].minor.yy307 = yylhsminor.yy307; break; - case 135: /* signed ::= INTEGER */ + case 137: /* signed ::= INTEGER */ { yylhsminor.yy443 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } yymsp[0].minor.yy443 = yylhsminor.yy443; break; - case 136: /* signed ::= PLUS INTEGER */ + case 138: /* signed ::= PLUS INTEGER */ { yymsp[-1].minor.yy443 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } break; - case 137: /* signed ::= MINUS INTEGER */ + case 139: /* signed ::= MINUS INTEGER */ { yymsp[-1].minor.yy443 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);} break; - case 141: /* cmd ::= CREATE TABLE create_table_list */ + case 143: /* cmd ::= CREATE TABLE create_table_list */ { pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy74;} break; - case 142: /* create_table_list ::= create_from_stable */ + case 144: /* create_table_list ::= create_from_stable */ { SCreateTableSql* pCreateTable = calloc(1, sizeof(SCreateTableSql)); pCreateTable->childTableInfo = taosArrayInit(4, sizeof(SCreatedTableInfo)); @@ -2775,14 +2783,14 @@ static void yy_reduce( } yymsp[0].minor.yy74 = yylhsminor.yy74; break; - case 143: /* create_table_list ::= create_table_list create_from_stable */ + case 145: /* create_table_list ::= create_table_list create_from_stable */ { taosArrayPush(yymsp[-1].minor.yy74->childTableInfo, &yymsp[0].minor.yy110); yylhsminor.yy74 = yymsp[-1].minor.yy74; } yymsp[-1].minor.yy74 = yylhsminor.yy74; break; - case 144: /* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ + case 146: /* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ { yylhsminor.yy74 = tSetCreateTableInfo(yymsp[-1].minor.yy367, NULL, NULL, TSQL_CREATE_TABLE); setSqlInfo(pInfo, yylhsminor.yy74, NULL, TSDB_SQL_CREATE_TABLE); @@ -2792,7 +2800,7 @@ static void yy_reduce( } yymsp[-5].minor.yy74 = yylhsminor.yy74; break; - case 145: /* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ + case 147: /* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ { yylhsminor.yy74 = tSetCreateTableInfo(yymsp[-5].minor.yy367, yymsp[-1].minor.yy367, NULL, TSQL_CREATE_STABLE); setSqlInfo(pInfo, yylhsminor.yy74, NULL, TSDB_SQL_CREATE_TABLE); @@ -2802,7 +2810,7 @@ static void yy_reduce( } yymsp[-9].minor.yy74 = yylhsminor.yy74; break; - case 146: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ + case 148: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; @@ -2810,7 +2818,7 @@ static void yy_reduce( } yymsp[-9].minor.yy110 = yylhsminor.yy110; break; - case 147: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ + case 149: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ { yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; yymsp[-11].minor.yy0.n += yymsp[-10].minor.yy0.n; @@ -2818,15 +2826,15 @@ static void yy_reduce( } yymsp[-12].minor.yy110 = yylhsminor.yy110; break; - case 148: /* tagNamelist ::= tagNamelist COMMA ids */ + case 150: /* tagNamelist ::= tagNamelist COMMA ids */ {taosArrayPush(yymsp[-2].minor.yy367, &yymsp[0].minor.yy0); yylhsminor.yy367 = yymsp[-2].minor.yy367; } yymsp[-2].minor.yy367 = yylhsminor.yy367; break; - case 149: /* tagNamelist ::= ids */ + case 151: /* tagNamelist ::= ids */ {yylhsminor.yy367 = taosArrayInit(4, sizeof(SStrToken)); taosArrayPush(yylhsminor.yy367, &yymsp[0].minor.yy0);} yymsp[0].minor.yy367 = yylhsminor.yy367; break; - case 150: /* create_table_args ::= ifnotexists ids cpxName to_opt split_opt AS select */ + case 152: /* create_table_args ::= ifnotexists ids cpxName to_opt split_opt AS select */ { yylhsminor.yy74 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy426, TSQL_CREATE_STREAM); setSqlInfo(pInfo, yylhsminor.yy74, NULL, TSDB_SQL_CREATE_TABLE); @@ -2837,57 +2845,57 @@ static void yy_reduce( } yymsp[-6].minor.yy74 = yylhsminor.yy74; break; - case 151: /* to_opt ::= */ - case 153: /* split_opt ::= */ yytestcase(yyruleno==153); + case 153: /* to_opt ::= */ + case 155: /* split_opt ::= */ yytestcase(yyruleno==155); {yymsp[1].minor.yy0.n = 0;} break; - case 152: /* to_opt ::= TO ids cpxName */ + case 154: /* to_opt ::= TO ids cpxName */ { yymsp[-2].minor.yy0 = yymsp[-1].minor.yy0; yymsp[-2].minor.yy0.n += yymsp[0].minor.yy0.n; } break; - case 154: /* split_opt ::= SPLIT ids */ + case 156: /* split_opt ::= SPLIT ids */ { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0;} break; - case 155: /* columnlist ::= columnlist COMMA column */ + case 157: /* columnlist ::= columnlist COMMA column */ {taosArrayPush(yymsp[-2].minor.yy367, &yymsp[0].minor.yy307); yylhsminor.yy367 = yymsp[-2].minor.yy367; } yymsp[-2].minor.yy367 = yylhsminor.yy367; break; - case 156: /* columnlist ::= column */ + case 158: /* columnlist ::= column */ {yylhsminor.yy367 = taosArrayInit(4, sizeof(TAOS_FIELD)); taosArrayPush(yylhsminor.yy367, &yymsp[0].minor.yy307);} yymsp[0].minor.yy367 = yylhsminor.yy367; break; - case 157: /* column ::= ids typename */ + case 159: /* column ::= ids typename */ { tSetColumnInfo(&yylhsminor.yy307, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy307); } yymsp[-1].minor.yy307 = yylhsminor.yy307; break; - case 164: /* tagitem ::= NULL */ + case 166: /* tagitem ::= NULL */ { yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy410, &yymsp[0].minor.yy0); } yymsp[0].minor.yy410 = yylhsminor.yy410; break; - case 165: /* tagitem ::= NOW */ + case 167: /* tagitem ::= NOW */ { yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreateExt(&yylhsminor.yy410, &yymsp[0].minor.yy0, TK_NOW, true);} yymsp[0].minor.yy410 = yylhsminor.yy410; break; - case 166: /* tagitem ::= NOW PLUS VARIABLE */ + case 168: /* tagitem ::= NOW PLUS VARIABLE */ { yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreateExt(&yymsp[-2].minor.yy410, &yymsp[0].minor.yy0, TK_PLUS, true); } break; - case 167: /* tagitem ::= NOW MINUS VARIABLE */ + case 169: /* tagitem ::= NOW MINUS VARIABLE */ { yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreateExt(&yymsp[-2].minor.yy410, &yymsp[0].minor.yy0, TK_MINUS, true); } break; - case 168: /* tagitem ::= MINUS INTEGER */ - case 169: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==169); - case 170: /* tagitem ::= PLUS INTEGER */ yytestcase(yyruleno==170); - case 171: /* tagitem ::= PLUS FLOAT */ yytestcase(yyruleno==171); + case 170: /* tagitem ::= MINUS INTEGER */ + case 171: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==171); + case 172: /* tagitem ::= PLUS INTEGER */ yytestcase(yyruleno==172); + case 173: /* tagitem ::= PLUS FLOAT */ yytestcase(yyruleno==173); { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = yymsp[0].minor.yy0.type; @@ -2896,179 +2904,179 @@ static void yy_reduce( } yymsp[-1].minor.yy410 = yylhsminor.yy410; break; - case 172: /* select ::= SELECT selcollist from where_opt range_option interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ + case 174: /* select ::= SELECT selcollist from where_opt range_option interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ { yylhsminor.yy426 = tSetQuerySqlNode(&yymsp[-14].minor.yy0, yymsp[-13].minor.yy367, yymsp[-12].minor.yy480, yymsp[-11].minor.yy378, yymsp[-4].minor.yy367, yymsp[-2].minor.yy367, &yymsp[-9].minor.yy478, &yymsp[-7].minor.yy373, &yymsp[-6].minor.yy204, &yymsp[-8].minor.yy0, yymsp[-5].minor.yy367, &yymsp[0].minor.yy24, &yymsp[-1].minor.yy24, yymsp[-3].minor.yy378, &yymsp[-10].minor.yy214); } yymsp[-14].minor.yy426 = yylhsminor.yy426; break; - case 173: /* select ::= LP select RP */ + case 175: /* select ::= LP select RP */ {yymsp[-2].minor.yy426 = yymsp[-1].minor.yy426;} break; - case 174: /* union ::= select */ + case 176: /* union ::= select */ { yylhsminor.yy367 = setSubclause(NULL, yymsp[0].minor.yy426); } yymsp[0].minor.yy367 = yylhsminor.yy367; break; - case 175: /* union ::= union UNION ALL select */ + case 177: /* union ::= union UNION ALL select */ { yylhsminor.yy367 = appendSelectClause(yymsp[-3].minor.yy367, yymsp[0].minor.yy426); } yymsp[-3].minor.yy367 = yylhsminor.yy367; break; - case 176: /* cmd ::= union */ + case 178: /* cmd ::= union */ { setSqlInfo(pInfo, yymsp[0].minor.yy367, NULL, TSDB_SQL_SELECT); } break; - case 177: /* select ::= SELECT selcollist */ + case 179: /* select ::= SELECT selcollist */ { yylhsminor.yy426 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy367, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); } yymsp[-1].minor.yy426 = yylhsminor.yy426; break; - case 178: /* sclp ::= selcollist COMMA */ + case 180: /* sclp ::= selcollist COMMA */ {yylhsminor.yy367 = yymsp[-1].minor.yy367;} yymsp[-1].minor.yy367 = yylhsminor.yy367; break; - case 179: /* sclp ::= */ - case 220: /* orderby_opt ::= */ yytestcase(yyruleno==220); + case 181: /* sclp ::= */ + case 222: /* orderby_opt ::= */ yytestcase(yyruleno==222); {yymsp[1].minor.yy367 = 0;} break; - case 180: /* selcollist ::= sclp distinct expr as */ + case 182: /* selcollist ::= sclp distinct expr as */ { yylhsminor.yy367 = tSqlExprListAppend(yymsp[-3].minor.yy367, yymsp[-1].minor.yy378, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0); } yymsp[-3].minor.yy367 = yylhsminor.yy367; break; - case 181: /* selcollist ::= sclp STAR */ + case 183: /* selcollist ::= sclp STAR */ { tSqlExpr *pNode = tSqlExprCreateIdValue(pInfo, NULL, TK_ALL); yylhsminor.yy367 = tSqlExprListAppend(yymsp[-1].minor.yy367, pNode, 0, 0); } yymsp[-1].minor.yy367 = yylhsminor.yy367; break; - case 182: /* as ::= AS ids */ + case 184: /* as ::= AS ids */ { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } break; - case 183: /* as ::= ids */ + case 185: /* as ::= ids */ { yylhsminor.yy0 = yymsp[0].minor.yy0; } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 184: /* as ::= */ + case 186: /* as ::= */ { yymsp[1].minor.yy0.n = 0; } break; - case 185: /* distinct ::= DISTINCT */ + case 187: /* distinct ::= DISTINCT */ { yylhsminor.yy0 = yymsp[0].minor.yy0; } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 187: /* from ::= FROM tablelist */ - case 188: /* from ::= FROM sub */ yytestcase(yyruleno==188); + case 189: /* from ::= FROM tablelist */ + case 190: /* from ::= FROM sub */ yytestcase(yyruleno==190); {yymsp[-1].minor.yy480 = yymsp[0].minor.yy480;} break; - case 189: /* sub ::= LP union RP */ + case 191: /* sub ::= LP union RP */ {yymsp[-2].minor.yy480 = addSubqueryElem(NULL, yymsp[-1].minor.yy367, NULL);} break; - case 190: /* sub ::= LP union RP ids */ + case 192: /* sub ::= LP union RP ids */ {yymsp[-3].minor.yy480 = addSubqueryElem(NULL, yymsp[-2].minor.yy367, &yymsp[0].minor.yy0);} break; - case 191: /* sub ::= sub COMMA LP union RP ids */ + case 193: /* sub ::= sub COMMA LP union RP ids */ {yylhsminor.yy480 = addSubqueryElem(yymsp[-5].minor.yy480, yymsp[-2].minor.yy367, &yymsp[0].minor.yy0);} yymsp[-5].minor.yy480 = yylhsminor.yy480; break; - case 192: /* tablelist ::= ids cpxName */ + case 194: /* tablelist ::= ids cpxName */ { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yylhsminor.yy480 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL); } yymsp[-1].minor.yy480 = yylhsminor.yy480; break; - case 193: /* tablelist ::= ids cpxName ids */ + case 195: /* tablelist ::= ids cpxName ids */ { yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; yylhsminor.yy480 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy480 = yylhsminor.yy480; break; - case 194: /* tablelist ::= tablelist COMMA ids cpxName */ + case 196: /* tablelist ::= tablelist COMMA ids cpxName */ { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yylhsminor.yy480 = setTableNameList(yymsp[-3].minor.yy480, &yymsp[-1].minor.yy0, NULL); } yymsp[-3].minor.yy480 = yylhsminor.yy480; break; - case 195: /* tablelist ::= tablelist COMMA ids cpxName ids */ + case 197: /* tablelist ::= tablelist COMMA ids cpxName ids */ { yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; yylhsminor.yy480 = setTableNameList(yymsp[-4].minor.yy480, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } yymsp[-4].minor.yy480 = yylhsminor.yy480; break; - case 196: /* tmvar ::= VARIABLE */ + case 198: /* tmvar ::= VARIABLE */ {yylhsminor.yy0 = yymsp[0].minor.yy0;} yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 197: /* timestamp ::= INTEGER */ + case 199: /* timestamp ::= INTEGER */ { yylhsminor.yy378 = tSqlExprCreateTimestamp(&yymsp[0].minor.yy0, TK_INTEGER);} yymsp[0].minor.yy378 = yylhsminor.yy378; break; - case 198: /* timestamp ::= MINUS INTEGER */ - case 199: /* timestamp ::= PLUS INTEGER */ yytestcase(yyruleno==199); + case 200: /* timestamp ::= MINUS INTEGER */ + case 201: /* timestamp ::= PLUS INTEGER */ yytestcase(yyruleno==201); { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy378 = tSqlExprCreateTimestamp(&yymsp[-1].minor.yy0, TK_INTEGER);} yymsp[-1].minor.yy378 = yylhsminor.yy378; break; - case 200: /* timestamp ::= STRING */ + case 202: /* timestamp ::= STRING */ { yylhsminor.yy378 = tSqlExprCreateTimestamp(&yymsp[0].minor.yy0, TK_STRING);} yymsp[0].minor.yy378 = yylhsminor.yy378; break; - case 201: /* timestamp ::= NOW */ + case 203: /* timestamp ::= NOW */ { yylhsminor.yy378 = tSqlExprCreateTimestamp(&yymsp[0].minor.yy0, TK_NOW); } yymsp[0].minor.yy378 = yylhsminor.yy378; break; - case 202: /* timestamp ::= NOW PLUS VARIABLE */ + case 204: /* timestamp ::= NOW PLUS VARIABLE */ {yymsp[-2].minor.yy378 = tSqlExprCreateTimestamp(&yymsp[0].minor.yy0, TK_PLUS); } break; - case 203: /* timestamp ::= NOW MINUS VARIABLE */ + case 205: /* timestamp ::= NOW MINUS VARIABLE */ {yymsp[-2].minor.yy378 = tSqlExprCreateTimestamp(&yymsp[0].minor.yy0, TK_MINUS); } break; - case 204: /* range_option ::= */ + case 206: /* range_option ::= */ {yymsp[1].minor.yy214.start = 0; yymsp[1].minor.yy214.end = 0;} break; - case 205: /* range_option ::= RANGE LP timestamp COMMA timestamp RP */ + case 207: /* range_option ::= RANGE LP timestamp COMMA timestamp RP */ {yymsp[-5].minor.yy214.start = yymsp[-3].minor.yy378; yymsp[-5].minor.yy214.end = yymsp[-1].minor.yy378;} break; - case 206: /* interval_option ::= intervalKey LP tmvar RP */ + case 208: /* interval_option ::= intervalKey LP tmvar RP */ {yylhsminor.yy478.interval = yymsp[-1].minor.yy0; yylhsminor.yy478.offset.n = 0; yylhsminor.yy478.token = yymsp[-3].minor.yy586;} yymsp[-3].minor.yy478 = yylhsminor.yy478; break; - case 207: /* interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ + case 209: /* interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ {yylhsminor.yy478.interval = yymsp[-3].minor.yy0; yylhsminor.yy478.offset = yymsp[-1].minor.yy0; yylhsminor.yy478.token = yymsp[-5].minor.yy586;} yymsp[-5].minor.yy478 = yylhsminor.yy478; break; - case 208: /* interval_option ::= */ + case 210: /* interval_option ::= */ {memset(&yymsp[1].minor.yy478, 0, sizeof(yymsp[1].minor.yy478));} break; - case 209: /* intervalKey ::= INTERVAL */ + case 211: /* intervalKey ::= INTERVAL */ {yymsp[0].minor.yy586 = TK_INTERVAL;} break; - case 210: /* intervalKey ::= EVERY */ + case 212: /* intervalKey ::= EVERY */ {yymsp[0].minor.yy586 = TK_EVERY; } break; - case 211: /* session_option ::= */ + case 213: /* session_option ::= */ {yymsp[1].minor.yy373.col.n = 0; yymsp[1].minor.yy373.gap.n = 0;} break; - case 212: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ + case 214: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; yymsp[-6].minor.yy373.col = yymsp[-4].minor.yy0; yymsp[-6].minor.yy373.gap = yymsp[-1].minor.yy0; } break; - case 213: /* windowstate_option ::= */ + case 215: /* windowstate_option ::= */ { yymsp[1].minor.yy204.col.n = 0; yymsp[1].minor.yy204.col.z = NULL;} break; - case 214: /* windowstate_option ::= STATE_WINDOW LP ids RP */ + case 216: /* windowstate_option ::= STATE_WINDOW LP ids RP */ { yymsp[-3].minor.yy204.col = yymsp[-1].minor.yy0; } break; - case 215: /* fill_opt ::= */ + case 217: /* fill_opt ::= */ { yymsp[1].minor.yy367 = 0; } break; - case 216: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + case 218: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ { tVariant A = {0}; toTSDBType(yymsp[-3].minor.yy0.type); @@ -3078,53 +3086,53 @@ static void yy_reduce( yymsp[-5].minor.yy367 = yymsp[-1].minor.yy367; } break; - case 217: /* fill_opt ::= FILL LP ID RP */ + case 219: /* fill_opt ::= FILL LP ID RP */ { toTSDBType(yymsp[-1].minor.yy0.type); yymsp[-3].minor.yy367 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1, true); } break; - case 218: /* sliding_opt ::= SLIDING LP tmvar RP */ + case 220: /* sliding_opt ::= SLIDING LP tmvar RP */ {yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0; } break; - case 219: /* sliding_opt ::= */ + case 221: /* sliding_opt ::= */ {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = NULL; yymsp[1].minor.yy0.type = 0; } break; - case 221: /* orderby_opt ::= ORDER BY sortlist */ + case 223: /* orderby_opt ::= ORDER BY sortlist */ {yymsp[-2].minor.yy367 = yymsp[0].minor.yy367;} break; - case 222: /* sortlist ::= sortlist COMMA item sortorder */ + case 224: /* sortlist ::= sortlist COMMA item sortorder */ { yylhsminor.yy367 = commonItemAppend(yymsp[-3].minor.yy367, &yymsp[-1].minor.yy410, NULL, false, yymsp[0].minor.yy274); } yymsp[-3].minor.yy367 = yylhsminor.yy367; break; - case 223: /* sortlist ::= sortlist COMMA arrow sortorder */ + case 225: /* sortlist ::= sortlist COMMA arrow sortorder */ { yylhsminor.yy367 = commonItemAppend(yymsp[-3].minor.yy367, NULL, yymsp[-1].minor.yy378, true, yymsp[0].minor.yy274); } yymsp[-3].minor.yy367 = yylhsminor.yy367; break; - case 224: /* sortlist ::= item sortorder */ + case 226: /* sortlist ::= item sortorder */ { yylhsminor.yy367 = commonItemAppend(NULL, &yymsp[-1].minor.yy410, NULL, false, yymsp[0].minor.yy274); } yymsp[-1].minor.yy367 = yylhsminor.yy367; break; - case 225: /* sortlist ::= arrow sortorder */ + case 227: /* sortlist ::= arrow sortorder */ { yylhsminor.yy367 = commonItemAppend(NULL, NULL, yymsp[-1].minor.yy378, true, yymsp[0].minor.yy274); } yymsp[-1].minor.yy367 = yylhsminor.yy367; break; - case 226: /* item ::= ID */ + case 228: /* item ::= ID */ { toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy410, &yymsp[0].minor.yy0); } yymsp[0].minor.yy410 = yylhsminor.yy410; break; - case 227: /* item ::= ID DOT ID */ + case 229: /* item ::= ID DOT ID */ { toTSDBType(yymsp[-2].minor.yy0.type); yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); @@ -3132,295 +3140,295 @@ static void yy_reduce( } yymsp[-2].minor.yy410 = yylhsminor.yy410; break; - case 228: /* sortorder ::= ASC */ + case 230: /* sortorder ::= ASC */ { yymsp[0].minor.yy274 = TSDB_ORDER_ASC; } break; - case 229: /* sortorder ::= DESC */ + case 231: /* sortorder ::= DESC */ { yymsp[0].minor.yy274 = TSDB_ORDER_DESC;} break; - case 230: /* sortorder ::= */ + case 232: /* sortorder ::= */ { yymsp[1].minor.yy274 = TSDB_ORDER_ASC; } break; - case 231: /* groupby_opt ::= */ + case 233: /* groupby_opt ::= */ { yymsp[1].minor.yy367 = 0;} break; - case 232: /* groupby_opt ::= GROUP BY grouplist */ + case 234: /* groupby_opt ::= GROUP BY grouplist */ { yymsp[-2].minor.yy367 = yymsp[0].minor.yy367;} break; - case 233: /* grouplist ::= grouplist COMMA item */ + case 235: /* grouplist ::= grouplist COMMA item */ { yylhsminor.yy367 = commonItemAppend(yymsp[-2].minor.yy367, &yymsp[0].minor.yy410, NULL, false, -1); } yymsp[-2].minor.yy367 = yylhsminor.yy367; break; - case 234: /* grouplist ::= grouplist COMMA arrow */ + case 236: /* grouplist ::= grouplist COMMA arrow */ { yylhsminor.yy367 = commonItemAppend(yymsp[-2].minor.yy367, NULL, yymsp[0].minor.yy378, true, -1); } yymsp[-2].minor.yy367 = yylhsminor.yy367; break; - case 235: /* grouplist ::= item */ + case 237: /* grouplist ::= item */ { yylhsminor.yy367 = commonItemAppend(NULL, &yymsp[0].minor.yy410, NULL, false, -1); } yymsp[0].minor.yy367 = yylhsminor.yy367; break; - case 236: /* grouplist ::= arrow */ + case 238: /* grouplist ::= arrow */ { yylhsminor.yy367 = commonItemAppend(NULL, NULL, yymsp[0].minor.yy378, true, -1); } yymsp[0].minor.yy367 = yylhsminor.yy367; break; - case 237: /* having_opt ::= */ - case 247: /* where_opt ::= */ yytestcase(yyruleno==247); - case 304: /* expritem ::= */ yytestcase(yyruleno==304); + case 239: /* having_opt ::= */ + case 249: /* where_opt ::= */ yytestcase(yyruleno==249); + case 306: /* expritem ::= */ yytestcase(yyruleno==306); {yymsp[1].minor.yy378 = 0;} break; - case 238: /* having_opt ::= HAVING expr */ - case 248: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==248); + case 240: /* having_opt ::= HAVING expr */ + case 250: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==250); {yymsp[-1].minor.yy378 = yymsp[0].minor.yy378;} break; - case 239: /* limit_opt ::= */ - case 243: /* slimit_opt ::= */ yytestcase(yyruleno==243); + case 241: /* limit_opt ::= */ + case 245: /* slimit_opt ::= */ yytestcase(yyruleno==245); {yymsp[1].minor.yy24.limit = -1; yymsp[1].minor.yy24.offset = 0;} break; - case 240: /* limit_opt ::= LIMIT signed */ - case 244: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==244); + case 242: /* limit_opt ::= LIMIT signed */ + case 246: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==246); {yymsp[-1].minor.yy24.limit = yymsp[0].minor.yy443; yymsp[-1].minor.yy24.offset = 0;} break; - case 241: /* limit_opt ::= LIMIT signed OFFSET signed */ + case 243: /* limit_opt ::= LIMIT signed OFFSET signed */ { yymsp[-3].minor.yy24.limit = yymsp[-2].minor.yy443; yymsp[-3].minor.yy24.offset = yymsp[0].minor.yy443;} break; - case 242: /* limit_opt ::= LIMIT signed COMMA signed */ + case 244: /* limit_opt ::= LIMIT signed COMMA signed */ { yymsp[-3].minor.yy24.limit = yymsp[0].minor.yy443; yymsp[-3].minor.yy24.offset = yymsp[-2].minor.yy443;} break; - case 245: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ + case 247: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ {yymsp[-3].minor.yy24.limit = yymsp[-2].minor.yy443; yymsp[-3].minor.yy24.offset = yymsp[0].minor.yy443;} break; - case 246: /* slimit_opt ::= SLIMIT signed COMMA signed */ + case 248: /* slimit_opt ::= SLIMIT signed COMMA signed */ {yymsp[-3].minor.yy24.limit = yymsp[0].minor.yy443; yymsp[-3].minor.yy24.offset = yymsp[-2].minor.yy443;} break; - case 249: /* expr ::= LP expr RP */ + case 251: /* expr ::= LP expr RP */ {yylhsminor.yy378 = yymsp[-1].minor.yy378; yylhsminor.yy378->exprToken.z = yymsp[-2].minor.yy0.z; yylhsminor.yy378->exprToken.n = (yymsp[0].minor.yy0.z - yymsp[-2].minor.yy0.z + 1);} yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 250: /* expr ::= ID */ + case 252: /* expr ::= ID */ { yylhsminor.yy378 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_ID);} yymsp[0].minor.yy378 = yylhsminor.yy378; break; - case 251: /* expr ::= ID DOT ID */ + case 253: /* expr ::= ID DOT ID */ { yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy378 = tSqlExprCreateIdValue(pInfo, &yymsp[-2].minor.yy0, TK_ID);} yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 252: /* expr ::= ID DOT STAR */ + case 254: /* expr ::= ID DOT STAR */ { yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy378 = tSqlExprCreateIdValue(pInfo, &yymsp[-2].minor.yy0, TK_ALL);} yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 253: /* expr ::= INTEGER */ + case 255: /* expr ::= INTEGER */ { yylhsminor.yy378 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_INTEGER);} yymsp[0].minor.yy378 = yylhsminor.yy378; break; - case 254: /* expr ::= MINUS INTEGER */ - case 255: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==255); + case 256: /* expr ::= MINUS INTEGER */ + case 257: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==257); { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy378 = tSqlExprCreateIdValue(pInfo, &yymsp[-1].minor.yy0, TK_INTEGER);} yymsp[-1].minor.yy378 = yylhsminor.yy378; break; - case 256: /* expr ::= FLOAT */ + case 258: /* expr ::= FLOAT */ { yylhsminor.yy378 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_FLOAT);} yymsp[0].minor.yy378 = yylhsminor.yy378; break; - case 257: /* expr ::= MINUS FLOAT */ - case 258: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==258); + case 259: /* expr ::= MINUS FLOAT */ + case 260: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==260); { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy378 = tSqlExprCreateIdValue(pInfo, &yymsp[-1].minor.yy0, TK_FLOAT);} yymsp[-1].minor.yy378 = yylhsminor.yy378; break; - case 259: /* expr ::= STRING */ + case 261: /* expr ::= STRING */ { yylhsminor.yy378 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING);} yymsp[0].minor.yy378 = yylhsminor.yy378; break; - case 260: /* expr ::= NOW */ + case 262: /* expr ::= NOW */ { yylhsminor.yy378 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_NOW); } yymsp[0].minor.yy378 = yylhsminor.yy378; break; - case 261: /* expr ::= TODAY */ + case 263: /* expr ::= TODAY */ { yylhsminor.yy378 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_TODAY); } yymsp[0].minor.yy378 = yylhsminor.yy378; break; - case 262: /* expr ::= VARIABLE */ + case 264: /* expr ::= VARIABLE */ { yylhsminor.yy378 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_VARIABLE);} yymsp[0].minor.yy378 = yylhsminor.yy378; break; - case 263: /* expr ::= PLUS VARIABLE */ - case 264: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==264); + case 265: /* expr ::= PLUS VARIABLE */ + case 266: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==266); { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy378 = tSqlExprCreateIdValue(pInfo, &yymsp[-1].minor.yy0, TK_VARIABLE);} yymsp[-1].minor.yy378 = yylhsminor.yy378; break; - case 265: /* expr ::= BOOL */ + case 267: /* expr ::= BOOL */ { yylhsminor.yy378 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_BOOL);} yymsp[0].minor.yy378 = yylhsminor.yy378; break; - case 266: /* expr ::= NULL */ + case 268: /* expr ::= NULL */ { yylhsminor.yy378 = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_NULL);} yymsp[0].minor.yy378 = yylhsminor.yy378; break; - case 267: /* expr ::= ID LP exprlist RP */ + case 269: /* expr ::= ID LP exprlist RP */ { tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy378 = tSqlExprCreateFunction(yymsp[-1].minor.yy367, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } yymsp[-3].minor.yy378 = yylhsminor.yy378; break; - case 268: /* expr ::= ID LP STAR RP */ + case 270: /* expr ::= ID LP STAR RP */ { tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy378 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } yymsp[-3].minor.yy378 = yylhsminor.yy378; break; - case 269: /* expr ::= ID LP expr AS typename RP */ + case 271: /* expr ::= ID LP expr AS typename RP */ { tStrTokenAppend(pInfo->funcs, &yymsp[-5].minor.yy0); yylhsminor.yy378 = tSqlExprCreateFuncWithParams(pInfo, yymsp[-3].minor.yy378, &yymsp[-1].minor.yy307, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0, yymsp[-5].minor.yy0.type); } yymsp[-5].minor.yy378 = yylhsminor.yy378; break; - case 270: /* expr ::= expr IS NULL */ + case 272: /* expr ::= expr IS NULL */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, NULL, TK_ISNULL);} yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 271: /* expr ::= expr IS NOT NULL */ + case 273: /* expr ::= expr IS NOT NULL */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-3].minor.yy378, NULL, TK_NOTNULL);} yymsp[-3].minor.yy378 = yylhsminor.yy378; break; - case 272: /* expr ::= expr LT expr */ + case 274: /* expr ::= expr LT expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_LT);} yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 273: /* expr ::= expr GT expr */ + case 275: /* expr ::= expr GT expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_GT);} yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 274: /* expr ::= expr LE expr */ + case 276: /* expr ::= expr LE expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_LE);} yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 275: /* expr ::= expr GE expr */ + case 277: /* expr ::= expr GE expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_GE);} yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 276: /* expr ::= expr NE expr */ + case 278: /* expr ::= expr NE expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_NE);} yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 277: /* expr ::= expr EQ expr */ + case 279: /* expr ::= expr EQ expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_EQ);} yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 278: /* expr ::= expr BETWEEN expr AND expr */ + case 280: /* expr ::= expr BETWEEN expr AND expr */ { tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy378); yylhsminor.yy378 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy378, yymsp[-2].minor.yy378, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy378, TK_LE), TK_AND);} yymsp[-4].minor.yy378 = yylhsminor.yy378; break; - case 279: /* expr ::= expr AND expr */ + case 281: /* expr ::= expr AND expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_AND);} yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 280: /* expr ::= expr OR expr */ + case 282: /* expr ::= expr OR expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_OR); } yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 281: /* expr ::= expr PLUS expr */ + case 283: /* expr ::= expr PLUS expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_PLUS); } yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 282: /* expr ::= expr MINUS expr */ + case 284: /* expr ::= expr MINUS expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_MINUS); } yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 283: /* expr ::= expr STAR expr */ + case 285: /* expr ::= expr STAR expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_STAR); } yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 284: /* expr ::= expr SLASH expr */ + case 286: /* expr ::= expr SLASH expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_DIVIDE);} yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 285: /* expr ::= expr REM expr */ + case 287: /* expr ::= expr REM expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_REM); } yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 286: /* expr ::= expr BITAND expr */ + case 288: /* expr ::= expr BITAND expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_BITAND);} yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 287: /* expr ::= expr BITOR expr */ + case 289: /* expr ::= expr BITOR expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_BITOR); } yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 288: /* expr ::= expr BITXOR expr */ + case 290: /* expr ::= expr BITXOR expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_BITXOR);} yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 289: /* expr ::= BITNOT expr */ + case 291: /* expr ::= BITNOT expr */ {yymsp[-1].minor.yy378 = tSqlExprCreate(yymsp[0].minor.yy378, NULL, TK_BITNOT);} break; - case 290: /* expr ::= expr LSHIFT expr */ + case 292: /* expr ::= expr LSHIFT expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_LSHIFT);} yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 291: /* expr ::= expr RSHIFT expr */ + case 293: /* expr ::= expr RSHIFT expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_RSHIFT);} yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 292: /* expr ::= expr LIKE expr */ + case 294: /* expr ::= expr LIKE expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_LIKE); } yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 293: /* expr ::= expr MATCH expr */ + case 295: /* expr ::= expr MATCH expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_MATCH); } yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 294: /* expr ::= expr NMATCH expr */ + case 296: /* expr ::= expr NMATCH expr */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-2].minor.yy378, yymsp[0].minor.yy378, TK_NMATCH); } yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 295: /* expr ::= ID CONTAINS STRING */ + case 297: /* expr ::= ID CONTAINS STRING */ { tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &yymsp[-2].minor.yy0, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING); yylhsminor.yy378 = tSqlExprCreate(S, M, TK_CONTAINS); } yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 296: /* expr ::= ID DOT ID CONTAINS STRING */ + case 298: /* expr ::= ID DOT ID CONTAINS STRING */ { yymsp[-4].minor.yy0.n += (1+yymsp[-2].minor.yy0.n); tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &yymsp[-4].minor.yy0, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING); yylhsminor.yy378 = tSqlExprCreate(S, M, TK_CONTAINS); } yymsp[-4].minor.yy378 = yylhsminor.yy378; break; - case 297: /* arrow ::= ID ARROW STRING */ + case 299: /* arrow ::= ID ARROW STRING */ {tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &yymsp[-2].minor.yy0, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING); yylhsminor.yy378 = tSqlExprCreate(S, M, TK_ARROW); } yymsp[-2].minor.yy378 = yylhsminor.yy378; break; - case 298: /* arrow ::= ID DOT ID ARROW STRING */ + case 300: /* arrow ::= ID DOT ID ARROW STRING */ {yymsp[-4].minor.yy0.n += (1+yymsp[-2].minor.yy0.n); tSqlExpr* S = tSqlExprCreateIdValue(pInfo, &yymsp[-4].minor.yy0, TK_ID); tSqlExpr* M = tSqlExprCreateIdValue(pInfo, &yymsp[0].minor.yy0, TK_STRING); yylhsminor.yy378 = tSqlExprCreate(S, M, TK_ARROW); } yymsp[-4].minor.yy378 = yylhsminor.yy378; break; - case 299: /* expr ::= arrow */ - case 303: /* expritem ::= expr */ yytestcase(yyruleno==303); + case 301: /* expr ::= arrow */ + case 305: /* expritem ::= expr */ yytestcase(yyruleno==305); {yylhsminor.yy378 = yymsp[0].minor.yy378;} yymsp[0].minor.yy378 = yylhsminor.yy378; break; - case 300: /* expr ::= expr IN LP exprlist RP */ + case 302: /* expr ::= expr IN LP exprlist RP */ {yylhsminor.yy378 = tSqlExprCreate(yymsp[-4].minor.yy378, (tSqlExpr*)yymsp[-1].minor.yy367, TK_IN); } yymsp[-4].minor.yy378 = yylhsminor.yy378; break; - case 301: /* exprlist ::= exprlist COMMA expritem */ + case 303: /* exprlist ::= exprlist COMMA expritem */ {yylhsminor.yy367 = tSqlExprListAppend(yymsp[-2].minor.yy367,yymsp[0].minor.yy378,0, 0);} yymsp[-2].minor.yy367 = yylhsminor.yy367; break; - case 302: /* exprlist ::= expritem */ + case 304: /* exprlist ::= expritem */ {yylhsminor.yy367 = tSqlExprListAppend(0,yymsp[0].minor.yy378,0, 0);} yymsp[0].minor.yy367 = yylhsminor.yy367; break; - case 305: /* cmd ::= RESET QUERY CACHE */ + case 307: /* cmd ::= RESET QUERY CACHE */ { setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);} break; - case 306: /* cmd ::= SYNCDB ids REPLICA */ + case 308: /* cmd ::= SYNCDB ids REPLICA */ { setDCLSqlElems(pInfo, TSDB_SQL_SYNC_DB_REPLICA, 1, &yymsp[-1].minor.yy0);} break; - case 307: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + case 309: /* 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.yy367, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 308: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + case 310: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3431,21 +3439,21 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 309: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ + case 311: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy367, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 310: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + case 312: /* 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.yy367, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 311: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + case 313: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3456,7 +3464,7 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 312: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + case 314: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3470,7 +3478,7 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 313: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + case 315: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; @@ -3482,21 +3490,21 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 314: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ + case 316: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy367, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 315: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + case 317: /* 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.yy367, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 316: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + case 318: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3507,21 +3515,21 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 317: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ + case 319: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy367, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 318: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + case 320: /* 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.yy367, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 319: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + case 321: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3532,7 +3540,7 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 320: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + case 322: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3546,7 +3554,7 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 321: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ + case 323: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; @@ -3558,23 +3566,23 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 322: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ + case 324: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy367, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 323: /* cmd ::= KILL CONNECTION INTEGER */ + case 325: /* cmd ::= KILL CONNECTION INTEGER */ {setKillSql(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);} break; - case 324: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ + case 326: /* 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 325: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ + case 327: /* 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; - case 326: /* cmd ::= DELETE FROM ifexists ids cpxName where_opt */ + case 328: /* cmd ::= DELETE FROM ifexists ids cpxName where_opt */ { yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; SDelData * pDelData = tGetDelData(&yymsp[-2].minor.yy0, &yymsp[-3].minor.yy0, yymsp[0].minor.yy378); @@ -3872,4 +3880,4 @@ void Parse( } #endif return; -} +} \ No newline at end of file