diff --git a/src/client/inc/tscUtil.h b/src/client/inc/tscUtil.h index c858bd5867c64da4c7397aed2035119ff414d112..46257459990c66734f8414b260fa268d62f5c1e2 100644 --- a/src/client/inc/tscUtil.h +++ b/src/client/inc/tscUtil.h @@ -240,7 +240,7 @@ void tscColumnListCopyAll(SArray* dst, const SArray* src); void convertQueryResult(SSqlRes* pRes, SQueryInfo* pQueryInfo, uint64_t objId, bool convertNchar); void tscDequoteAndTrimToken(SStrToken* pToken); -int32_t tscValidateName(SStrToken* pToken); +int32_t tscValidateName(SStrToken* pToken, bool escapeEnabled); void tscIncStreamExecutionCount(void* pStream); diff --git a/src/client/src/tscParseInsert.c b/src/client/src/tscParseInsert.c index 1bf27e6cad1d57fdfd4b786d1cdcea981bf3333b..75054d5be39ad6eb7fcaaf76af2e4668733c9f6f 100644 --- a/src/client/src/tscParseInsert.c +++ b/src/client/src/tscParseInsert.c @@ -1137,7 +1137,7 @@ static int32_t tscCheckIfCreateTable(char **sqlstr, SSqlObj *pSql, char** boundC sql = sToken.z; - if (tscValidateName(&tableToken) != TSDB_CODE_SUCCESS) { + if (tscValidateName(&tableToken, true) != TSDB_CODE_SUCCESS) { return tscInvalidOperationMsg(pInsertParam->msg, "invalid table name", *sqlstr); } @@ -1178,7 +1178,7 @@ int validateTableName(char *tblName, int len, SStrToken* psTblToken) { psTblToken->type = TK_ID; tGetToken(psTblToken->z, &psTblToken->type); - return tscValidateName(psTblToken); + return tscValidateName(psTblToken, true); } static int32_t validateDataSource(SInsertStatementParam *pInsertParam, int32_t type, const char *sql) { diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index e26e439492cec9c83b624c2bbb2bbc3a95de97b0..cb4a3b4b519911090e70c95add44984e0e756508 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -559,7 +559,7 @@ static int32_t retrieveTableMeta(TAOS* taos, char* tableName, STableMeta** pTabl SStrToken tableToken = {.z = tableNameLowerCase, .n = (uint32_t)strlen(tableNameLowerCase), .type = TK_ID}; tGetToken(tableNameLowerCase, &tableToken.type); // Check if the table name available or not - if (tscValidateName(&tableToken) != TSDB_CODE_SUCCESS) { + if (tscValidateName(&tableToken, true) != TSDB_CODE_SUCCESS) { code = TSDB_CODE_TSC_INVALID_TABLE_ID_LENGTH; sprintf(pSql->cmd.payload, "table name is invalid"); tscFreeRegisteredSqlObj(pSql); diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index a62a8ac3efca0836faab778224aa4a831e84e580..286031b51510a565cd9281f261b5c353d08c33dc 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -567,7 +567,8 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { const char* msg3 = "param name too long"; SStrToken* pzName = taosArrayGet(pInfo->pMiscInfo->a, 0); - if ((pInfo->type != TSDB_SQL_DROP_DNODE) && (tscValidateName(pzName) != TSDB_CODE_SUCCESS)) { + bool escapeEnabled = (pInfo->type == TSDB_SQL_DROP_TABLE) ? true: false; + if ((pInfo->type != TSDB_SQL_DROP_DNODE) && (tscValidateName(pzName, escapeEnabled) != TSDB_CODE_SUCCESS)) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg2); } @@ -605,7 +606,7 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { const char* msg = "invalid db name"; SStrToken* pToken = taosArrayGet(pInfo->pMiscInfo->a, 0); - if (tscValidateName(pToken) != TSDB_CODE_SUCCESS) { + if (tscValidateName(pToken, false) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg); } @@ -652,7 +653,7 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { char buf[TSDB_DB_NAME_LEN] = {0}; SStrToken token = taosTokenDup(&pCreateDB->dbname, buf, tListLen(buf)); - if (tscValidateName(&token) != TSDB_CODE_SUCCESS) { + if (tscValidateName(&token, false) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } @@ -699,7 +700,7 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg3); } - if (tscValidateName(pName) != TSDB_CODE_SUCCESS) { + if (tscValidateName(pName, false) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg2); } @@ -721,7 +722,7 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { const char* msg1 = "invalid table name"; SStrToken* pToken = taosArrayGet(pInfo->pMiscInfo->a, 0); - if (tscValidateName(pToken) != TSDB_CODE_SUCCESS) { + if (tscValidateName(pToken, true) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } // additional msg has been attached already @@ -737,7 +738,7 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { const char* msg1 = "invalid table name"; SStrToken* pToken = taosArrayGet(pInfo->pMiscInfo->a, 0); - if (tscValidateName(pToken) != TSDB_CODE_SUCCESS) { + if (tscValidateName(pToken, true) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } @@ -752,7 +753,7 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { const char* msg1 = "invalid database name"; SStrToken* pToken = taosArrayGet(pInfo->pMiscInfo->a, 0); - if (tscValidateName(pToken) != TSDB_CODE_SUCCESS) { + if (tscValidateName(pToken, false) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } @@ -816,7 +817,7 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg3); } - if (tscValidateName(pName) != TSDB_CODE_SUCCESS) { + if (tscValidateName(pName, false) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg2); } @@ -3206,7 +3207,7 @@ int32_t setShowInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg5); } - if (tscValidateName(pDbPrefixToken) != TSDB_CODE_SUCCESS) { + if (tscValidateName(pDbPrefixToken, false) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } @@ -5866,7 +5867,7 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { STableMetaInfo* pTableMetaInfo = tscGetMetaInfo(pQueryInfo, DEFAULT_TABLE_INDEX); - if (tscValidateName(&(pAlterSQL->name)) != TSDB_CODE_SUCCESS) { + if (tscValidateName(&(pAlterSQL->name, true)) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } @@ -7421,7 +7422,7 @@ int32_t doCheckForCreateTable(SSqlObj* pSql, int32_t subClauseIndex, SSqlInfo* p // if sql specifies db, use it, otherwise use default db SStrToken* pzTableName = &(pCreateTable->name); - if (tscValidateName(pzTableName) != TSDB_CODE_SUCCESS) { + if (tscValidateName(pzTableName, true) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } @@ -7485,7 +7486,7 @@ int32_t doCheckForCreateFromStable(SSqlObj* pSql, SSqlInfo* pInfo) { SCreatedTableInfo* pCreateTableInfo = taosArrayGet(pCreateTable->childTableInfo, j); SStrToken* pToken = &pCreateTableInfo->stableName; - if (tscValidateName(pToken) != TSDB_CODE_SUCCESS) { + if (tscValidateName(pToken, true) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } @@ -7660,7 +7661,7 @@ int32_t doCheckForCreateFromStable(SSqlObj* pSql, SSqlInfo* pInfo) { free(row); // table name - if (tscValidateName(&(pCreateTableInfo->name)) != TSDB_CODE_SUCCESS) { + if (tscValidateName(&(pCreateTableInfo->name, true)) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } @@ -7703,7 +7704,7 @@ int32_t doCheckForStream(SSqlObj* pSql, SSqlInfo* pInfo) { SStrToken* pName = &(pCreateTable->name); SSqlNode* pSqlNode = pCreateTable->pSelect; - if (tscValidateName(pName) != TSDB_CODE_SUCCESS) { + if (tscValidateName(pName, true) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } @@ -7718,7 +7719,7 @@ int32_t doCheckForStream(SSqlObj* pSql, SSqlInfo* pInfo) { SRelElementPair* p1 = taosArrayGet(pFromInfo->list, 0); SStrToken srcToken = {.z = p1->tableName.z, .n = p1->tableName.n, .type = TK_STRING}; - if (tscValidateName(&srcToken) != TSDB_CODE_SUCCESS) { + if (tscValidateName(&srcToken, true) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } @@ -8157,7 +8158,7 @@ static int32_t getTableNameFromSqlNode(SSqlNode* pSqlNode, SArray* tableNameList } tscDequoteAndTrimToken(t); - if (tscValidateName(t) != TSDB_CODE_SUCCESS) { + if (tscValidateName(t, true) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(msgBuf, msg1); } @@ -8417,7 +8418,7 @@ static int32_t doLoadAllTableMeta(SSqlObj* pSql, SQueryInfo* pQueryInfo, SSqlNod } tscDequoteAndTrimToken(oriName); - if (tscValidateName(oriName) != TSDB_CODE_SUCCESS) { + if (tscValidateName(oriName, true) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } @@ -8434,7 +8435,7 @@ static int32_t doLoadAllTableMeta(SSqlObj* pSql, SQueryInfo* pQueryInfo, SSqlNod } tscDequoteAndTrimToken(aliasName); - if (tscValidateName(aliasName) != TSDB_CODE_SUCCESS || aliasName->n >= TSDB_TABLE_NAME_LEN) { + if (tscValidateName(aliasName, false) != TSDB_CODE_SUCCESS || aliasName->n >= TSDB_TABLE_NAME_LEN) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg3); } diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 60a6e241ccdfd48c7eb5a68f2dd7a251f76097a5..90467245a8bf85fd039aea8b1063275667336f5f 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -2788,9 +2788,55 @@ void tscDequoteAndTrimToken(SStrToken* pToken) { pToken->n = last - first; } -int32_t tscValidateName(SStrToken* pToken) { - if (pToken == NULL || pToken->z == NULL || - (pToken->type != TK_STRING && pToken->type != TK_ID)) { +void tscRmEscapeAndTrimToken(SStrToken* pToken) { + uint32_t first = 0, last = pToken->n; + + // trim leading spaces + while (first < last) { + char c = pToken->z[first]; + if (c != ' ' && c != '\t') { + break; + } + first++; + } + + // trim ending spaces + while (first < last) { + char c = pToken->z[last - 1]; + if (c != ' ' && c != '\t') { + break; + } + last--; + } + + // there are still at least two characters + if (first < last - 1) { + char c = pToken->z[first]; + // dequote + if ((c == '`') && c == pToken->z[last - 1]) { + first++; + last--; + } + } + + // left shift the string and pad spaces + for (uint32_t i = 0; i + first < last; i++) { + pToken->z[i] = pToken->z[first + i]; + } + for (uint32_t i = last - first; i < pToken->n; i++) { + pToken->z[i] = ' '; + } + + // adjust token length + pToken->n = last - first; +} + + + +int32_t tscValidateName(SStrToken* pToken, bool escapeEnabled) { + if (pToken == NULL || pToken->z == NULL + || (escapeEnabled && pToken->type != TK_STRING && pToken->type != TK_ID && pToken->type != TK_ESCAPE) + || ((!escapeEnabled) && pToken->type != TK_STRING && pToken->type != TK_ID)) { return TSDB_CODE_TSC_INVALID_OPERATION; } @@ -2815,6 +2861,9 @@ int32_t tscValidateName(SStrToken* pToken) { return tscValidateName(pToken); } + } else if (escapeEnabled && pToken->type == TK_ESCAPE) { + tscRmEscapeAndTrimToken(pToken); + return TSDB_CODE_SUCCESS; } else { if (isNumber(pToken)) { return TSDB_CODE_TSC_INVALID_OPERATION; @@ -2846,7 +2895,8 @@ int32_t tscValidateName(SStrToken* pToken) { pToken->z = sep + 1; pToken->n = (uint32_t)(oldLen - (sep - pStr) - 1); int32_t len = tGetToken(pToken->z, &pToken->type); - if (len != pToken->n || (pToken->type != TK_STRING && pToken->type != TK_ID)) { + if (len != pToken->n || (escapeEnabled && pToken->type != TK_STRING && pToken->type != TK_ID && pToken->type != TK_ESCAPE) + || ((!escapeEnabled) && pToken->type != TK_STRING && pToken->type != TK_ID)) { return TSDB_CODE_TSC_INVALID_OPERATION; } @@ -2854,6 +2904,12 @@ int32_t tscValidateName(SStrToken* pToken) { return TSDB_CODE_TSC_INVALID_OPERATION; } + if (escapeEnabled && pToken->type == TK_ESCAPE) { + tscRmEscapeAndTrimToken(pToken); + } + + xxxxxxxtolower + // re-build the whole name string if (pStr[firstPartLen] == TS_PATH_DELIMITER[0]) { // first part do not have quote do nothing @@ -4981,7 +5037,7 @@ static int32_t doAddTableName(char* nextStr, char** str, SArray* pNameArray, SSq tGetToken(tablename, &sToken.type); // Check if the table name available or not - if (tscValidateName(&sToken) != TSDB_CODE_SUCCESS) { + if (tscValidateName(&sToken, true) != TSDB_CODE_SUCCESS) { sprintf(pCmd->payload, "table name is invalid"); return TSDB_CODE_TSC_INVALID_TABLE_ID_LENGTH; } diff --git a/src/inc/ttokendef.h b/src/inc/ttokendef.h index 9b0ad2cf13b6df01bda56906891a4de677ff08a3..df3cdd16da2f9bed290a084b585c74b53b82a0d3 100644 --- a/src/inc/ttokendef.h +++ b/src/inc/ttokendef.h @@ -103,115 +103,117 @@ #define TK_RP 85 #define TK_IF 86 #define TK_EXISTS 87 -#define TK_AS 88 -#define TK_OUTPUTTYPE 89 -#define TK_AGGREGATE 90 -#define TK_BUFSIZE 91 -#define TK_PPS 92 -#define TK_TSERIES 93 -#define TK_DBS 94 -#define TK_STORAGE 95 -#define TK_QTIME 96 -#define TK_CONNS 97 -#define TK_STATE 98 -#define TK_COMMA 99 -#define TK_KEEP 100 -#define TK_CACHE 101 -#define TK_REPLICA 102 -#define TK_QUORUM 103 -#define TK_DAYS 104 -#define TK_MINROWS 105 -#define TK_MAXROWS 106 -#define TK_BLOCKS 107 -#define TK_CTIME 108 -#define TK_WAL 109 -#define TK_FSYNC 110 -#define TK_COMP 111 -#define TK_PRECISION 112 -#define TK_UPDATE 113 -#define TK_CACHELAST 114 -#define TK_PARTITIONS 115 -#define TK_UNSIGNED 116 -#define TK_TAGS 117 -#define TK_USING 118 -#define TK_NULL 119 -#define TK_NOW 120 -#define TK_SELECT 121 -#define TK_UNION 122 -#define TK_ALL 123 -#define TK_DISTINCT 124 -#define TK_FROM 125 -#define TK_VARIABLE 126 -#define TK_INTERVAL 127 -#define TK_EVERY 128 -#define TK_SESSION 129 -#define TK_STATE_WINDOW 130 -#define TK_FILL 131 -#define TK_SLIDING 132 -#define TK_ORDER 133 -#define TK_BY 134 -#define TK_ASC 135 -#define TK_GROUP 136 -#define TK_HAVING 137 -#define TK_LIMIT 138 -#define TK_OFFSET 139 -#define TK_SLIMIT 140 -#define TK_SOFFSET 141 -#define TK_WHERE 142 -#define TK_RESET 143 -#define TK_QUERY 144 -#define TK_SYNCDB 145 -#define TK_ADD 146 -#define TK_COLUMN 147 -#define TK_MODIFY 148 -#define TK_TAG 149 -#define TK_CHANGE 150 -#define TK_SET 151 -#define TK_KILL 152 -#define TK_CONNECTION 153 -#define TK_STREAM 154 -#define TK_COLON 155 -#define TK_ABORT 156 -#define TK_AFTER 157 -#define TK_ATTACH 158 -#define TK_BEFORE 159 -#define TK_BEGIN 160 -#define TK_CASCADE 161 -#define TK_CLUSTER 162 -#define TK_CONFLICT 163 -#define TK_COPY 164 -#define TK_DEFERRED 165 -#define TK_DELIMITERS 166 -#define TK_DETACH 167 -#define TK_EACH 168 -#define TK_END 169 -#define TK_EXPLAIN 170 -#define TK_FAIL 171 -#define TK_FOR 172 -#define TK_IGNORE 173 -#define TK_IMMEDIATE 174 -#define TK_INITIALLY 175 -#define TK_INSTEAD 176 -#define TK_KEY 177 -#define TK_OF 178 -#define TK_RAISE 179 -#define TK_REPLACE 180 -#define TK_RESTRICT 181 -#define TK_ROW 182 -#define TK_STATEMENT 183 -#define TK_TRIGGER 184 -#define TK_VIEW 185 -#define TK_IPTOKEN 186 -#define TK_SEMI 187 -#define TK_NONE 188 -#define TK_PREV 189 -#define TK_LINEAR 190 -#define TK_IMPORT 191 -#define TK_TBNAME 192 -#define TK_JOIN 193 -#define TK_INSERT 194 -#define TK_INTO 195 -#define TK_VALUES 196 +#define TK_ESCAPE 88 +#define TK_AS 89 +#define TK_OUTPUTTYPE 90 +#define TK_AGGREGATE 91 +#define TK_BUFSIZE 92 +#define TK_PPS 93 +#define TK_TSERIES 94 +#define TK_DBS 95 +#define TK_STORAGE 96 +#define TK_QTIME 97 +#define TK_CONNS 98 +#define TK_STATE 99 +#define TK_COMMA 100 +#define TK_KEEP 101 +#define TK_CACHE 102 +#define TK_REPLICA 103 +#define TK_QUORUM 104 +#define TK_DAYS 105 +#define TK_MINROWS 106 +#define TK_MAXROWS 107 +#define TK_BLOCKS 108 +#define TK_CTIME 109 +#define TK_WAL 110 +#define TK_FSYNC 111 +#define TK_COMP 112 +#define TK_PRECISION 113 +#define TK_UPDATE 114 +#define TK_CACHELAST 115 +#define TK_PARTITIONS 116 +#define TK_UNSIGNED 117 +#define TK_TAGS 118 +#define TK_USING 119 +#define TK_NULL 120 +#define TK_NOW 121 +#define TK_SELECT 122 +#define TK_UNION 123 +#define TK_ALL 124 +#define TK_DISTINCT 125 +#define TK_FROM 126 +#define TK_VARIABLE 127 +#define TK_INTERVAL 128 +#define TK_EVERY 129 +#define TK_SESSION 130 +#define TK_STATE_WINDOW 131 +#define TK_FILL 132 +#define TK_SLIDING 133 +#define TK_ORDER 134 +#define TK_BY 135 +#define TK_ASC 136 +#define TK_GROUP 137 +#define TK_HAVING 138 +#define TK_LIMIT 139 +#define TK_OFFSET 140 +#define TK_SLIMIT 141 +#define TK_SOFFSET 142 +#define TK_WHERE 143 +#define TK_RESET 144 +#define TK_QUERY 145 +#define TK_SYNCDB 146 +#define TK_ADD 147 +#define TK_COLUMN 148 +#define TK_MODIFY 149 +#define TK_TAG 150 +#define TK_CHANGE 151 +#define TK_SET 152 +#define TK_KILL 153 +#define TK_CONNECTION 154 +#define TK_STREAM 155 +#define TK_COLON 156 +#define TK_ABORT 157 +#define TK_AFTER 158 +#define TK_ATTACH 159 +#define TK_BEFORE 160 +#define TK_BEGIN 161 +#define TK_CASCADE 162 +#define TK_CLUSTER 163 +#define TK_CONFLICT 164 +#define TK_COPY 165 +#define TK_DEFERRED 166 +#define TK_DELIMITERS 167 +#define TK_DETACH 168 +#define TK_EACH 169 +#define TK_END 170 +#define TK_EXPLAIN 171 +#define TK_FAIL 172 +#define TK_FOR 173 +#define TK_IGNORE 174 +#define TK_IMMEDIATE 175 +#define TK_INITIALLY 176 +#define TK_INSTEAD 177 +#define TK_KEY 178 +#define TK_OF 179 +#define TK_RAISE 180 +#define TK_REPLACE 181 +#define TK_RESTRICT 182 +#define TK_ROW 183 +#define TK_STATEMENT 184 +#define TK_TRIGGER 185 +#define TK_VIEW 186 +#define TK_IPTOKEN 187 +#define TK_SEMI 188 +#define TK_NONE 189 +#define TK_PREV 190 +#define TK_LINEAR 191 +#define TK_IMPORT 192 +#define TK_TBNAME 193 +#define TK_JOIN 194 +#define TK_INSERT 195 +#define TK_INTO 196 +#define TK_VALUES 197 + #define TK_SPACE 300 diff --git a/src/query/inc/sql.y b/src/query/inc/sql.y index 336e8620f210351471bddb9c94d56fcaa7f8a0fc..43e494b1debdc81550e679a1e34b130e8a264ba0 100644 --- a/src/query/inc/sql.y +++ b/src/query/inc/sql.y @@ -91,12 +91,10 @@ dbPrefix(A) ::= ids(X) DOT. {A = X; } cpxName(A) ::= . {A.n = 0; } cpxName(A) ::= DOT ids(Y). {A = Y; A.n += 1; } -cmd ::= SHOW CREATE TABLE ids(X) cpxName(Y). { - X.n += Y.n; +cmd ::= SHOW CREATE TABLE ftblname(X). { setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_TABLE, 1, &X); } -cmd ::= SHOW CREATE STABLE ids(X) cpxName(Y). { - X.n += Y.n; +cmd ::= SHOW CREATE STABLE ftblname(X). { setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_STABLE, 1, &X); } @@ -108,7 +106,7 @@ cmd ::= SHOW dbPrefix(X) TABLES. { setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &X, 0); } -cmd ::= SHOW dbPrefix(X) TABLES LIKE ids(Y). { +cmd ::= SHOW dbPrefix(X) TABLES LIKE tblname(Y). { setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &X, &Y); } @@ -116,7 +114,7 @@ cmd ::= SHOW dbPrefix(X) STABLES. { setShowOptions(pInfo, TSDB_MGMT_TABLE_METRIC, &X, 0); } -cmd ::= SHOW dbPrefix(X) STABLES LIKE ids(Y). { +cmd ::= SHOW dbPrefix(X) STABLES LIKE tblname(Y). { SStrToken token; tSetDbName(&token, &X); setShowOptions(pInfo, TSDB_MGMT_TABLE_METRIC, &token, &Y); @@ -135,14 +133,12 @@ cmd ::= SHOW dbPrefix(X) VGROUPS ids(Y). { } //drop configure for tables -cmd ::= DROP TABLE ifexists(Y) ids(X) cpxName(Z). { - X.n += Z.n; +cmd ::= DROP TABLE ifexists(Y) ftblname(X). { setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &X, &Y, -1, -1); } //drop stable -cmd ::= DROP STABLE ifexists(Y) ids(X) cpxName(Z). { - X.n += Z.n; +cmd ::= DROP STABLE ifexists(Y) ftblname(X). { setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &X, &Y, -1, TSDB_SUPER_TABLE); } @@ -158,12 +154,10 @@ cmd ::= DROP ACCOUNT ids(X). { setDCLSqlElems(pInfo, TSDB_SQL_DROP_ACCT, 1, cmd ::= USE ids(X). { setDCLSqlElems(pInfo, TSDB_SQL_USE_DB, 1, &X);} /////////////////////////////////THE DESCRIBE STATEMENT///////////////////////////////////// -cmd ::= DESCRIBE ids(X) cpxName(Y). { - X.n += Y.n; +cmd ::= DESCRIBE ftblname(X). { setDCLSqlElems(pInfo, TSDB_SQL_DESCRIBE_TABLE, 1, &X); } -cmd ::= DESC ids(X) cpxName(Y). { - X.n += Y.n; +cmd ::= DESC ftblname(X). { setDCLSqlElems(pInfo, TSDB_SQL_DESCRIBE_TABLE, 1, &X); } /////////////////////////////////THE ALTER STATEMENT//////////////////////////////////////// @@ -198,6 +192,14 @@ ifexists(X) ::= . { X.n = 0;} ifnotexists(X) ::= IF NOT EXISTS. { X.n = 1;} ifnotexists(X) ::= . { X.n = 0;} +%type tblname {SStrToken} +tblname(A) ::= ids(X). {A = X; } +tblname(A) ::= ESCAPE(X). {A = X; } + +%type ftblname {SStrToken} +ftblname(A) ::= tblname(X). {A = X; } +ftblname(A) ::= ids(X) DOT tblname(Y). {A = X; A.n += 1 + Y.n; } + /////////////////////////////////THE CREATE STATEMENT/////////////////////////////////////// //create option for dnode/db/user/account cmd ::= CREATE DNODE ids(X). { setDCLSqlElems(pInfo, TSDB_SQL_CREATE_DNODE, 1, &X);} @@ -377,36 +379,30 @@ create_table_list(A) ::= create_table_list(X) create_from_stable(Z). { } %type create_table_args{SCreateTableSql*} -create_table_args(A) ::= ifnotexists(U) ids(V) cpxName(Z) LP columnlist(X) RP. { +create_table_args(A) ::= ifnotexists(U) ftblname(V) LP columnlist(X) RP. { A = tSetCreateTableInfo(X, NULL, NULL, TSQL_CREATE_TABLE); setSqlInfo(pInfo, A, NULL, TSDB_SQL_CREATE_TABLE); - V.n += Z.n; setCreatedTableName(pInfo, &V, &U); } // create super table %type create_stable_args{SCreateTableSql*} -create_stable_args(A) ::= ifnotexists(U) ids(V) cpxName(Z) LP columnlist(X) RP TAGS LP columnlist(Y) RP. { +create_stable_args(A) ::= ifnotexists(U) ftblname(V) LP columnlist(X) RP TAGS LP columnlist(Y) RP. { A = tSetCreateTableInfo(X, Y, NULL, TSQL_CREATE_STABLE); setSqlInfo(pInfo, A, NULL, TSDB_SQL_CREATE_TABLE); - V.n += Z.n; setCreatedTableName(pInfo, &V, &U); } // create table by using super table // create table table_name using super_table_name tags(tag_values1, tag_values2) %type create_from_stable{SCreatedTableInfo} -create_from_stable(A) ::= ifnotexists(U) ids(V) cpxName(Z) USING ids(X) cpxName(F) TAGS LP tagitemlist(Y) RP. { - X.n += F.n; - V.n += Z.n; +create_from_stable(A) ::= ifnotexists(U) ftblname(V) USING ftblname(X) TAGS LP tagitemlist(Y) RP. { A = createNewChildTableInfo(&X, NULL, Y, &V, &U); } -create_from_stable(A) ::= ifnotexists(U) ids(V) cpxName(Z) USING ids(X) cpxName(F) LP tagNamelist(P) RP TAGS LP tagitemlist(Y) RP. { - X.n += F.n; - V.n += Z.n; +create_from_stable(A) ::= ifnotexists(U) ftblname(V) USING ftblname(X) LP tagNamelist(P) RP TAGS LP tagitemlist(Y) RP. { A = createNewChildTableInfo(&X, P, Y, &V, &U); } @@ -417,11 +413,10 @@ tagNamelist(A) ::= ids(X). {A = taosArrayInit(4, sizeof(SSt // create stream // create table table_name as select count(*) from super_table_name interval(time) -create_table_args(A) ::= ifnotexists(U) ids(V) cpxName(Z) AS select(S). { +create_table_args(A) ::= ifnotexists(U) ftblname(V) AS select(S). { A = tSetCreateTableInfo(NULL, NULL, S, TSQL_CREATE_STREAM); setSqlInfo(pInfo, A, NULL, TSDB_SQL_CREATE_TABLE); - V.n += Z.n; setCreatedTableName(pInfo, &V, &U); } @@ -548,23 +543,19 @@ sub(A) ::= sub(X) COMMA LP union(Y) RP ids(Z).{A = addSubqueryElem(X, Y, &Z);} %type tablelist {SRelationInfo*} %destructor tablelist {destroyRelationInfo($$);} -tablelist(A) ::= ids(X) cpxName(Y). { - X.n += Y.n; +tablelist(A) ::= ftblname(X). { A = setTableNameList(NULL, &X, NULL); } -tablelist(A) ::= ids(X) cpxName(Y) ids(Z). { - X.n += Y.n; +tablelist(A) ::= ftblname(X) ids(Z). { A = setTableNameList(NULL, &X, &Z); } -tablelist(A) ::= tablelist(Y) COMMA ids(X) cpxName(Z). { - X.n += Z.n; +tablelist(A) ::= tablelist(Y) COMMA ftblname(X). { A = setTableNameList(Y, &X, NULL); } -tablelist(A) ::= tablelist(Y) COMMA ids(X) cpxName(Z) ids(F). { - X.n += Z.n; +tablelist(A) ::= tablelist(Y) COMMA ftblname(X) ids(F). { A = setTableNameList(Y, &X, &F); } @@ -776,15 +767,12 @@ cmd ::= RESET QUERY CACHE. { setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);} cmd ::= SYNCDB ids(X) REPLICA.{ setDCLSqlElems(pInfo, TSDB_SQL_SYNC_DB_REPLICA, 1, &X);} ///////////////////////////////////ALTER TABLE statement////////////////////////////////// -cmd ::= ALTER TABLE ids(X) cpxName(F) ADD COLUMN columnlist(A). { - X.n += F.n; +cmd ::= ALTER TABLE ftblname(X) ADD COLUMN columnlist(A). { SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER TABLE ids(X) cpxName(F) DROP COLUMN ids(A). { - X.n += F.n; - +cmd ::= ALTER TABLE ftblname(X) DROP COLUMN ids(A). { toTSDBType(A.type); SArray* K = tVariantListAppendToken(NULL, &A, -1); @@ -792,21 +780,17 @@ cmd ::= ALTER TABLE ids(X) cpxName(F) DROP COLUMN ids(A). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER TABLE ids(X) cpxName(F) MODIFY COLUMN columnlist(A). { - X.n += F.n; +cmd ::= ALTER TABLE ftblname(X) MODIFY COLUMN columnlist(A). { SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } //////////////////////////////////ALTER TAGS statement///////////////////////////////////// -cmd ::= ALTER TABLE ids(X) cpxName(Y) ADD TAG columnlist(A). { - X.n += Y.n; +cmd ::= ALTER TABLE ftblname(X) ADD TAG columnlist(A). { SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER TABLE ids(X) cpxName(Z) DROP TAG ids(Y). { - X.n += Z.n; - +cmd ::= ALTER TABLE ftblname(X) DROP TAG ids(Y). { toTSDBType(Y.type); SArray* A = tVariantListAppendToken(NULL, &Y, -1); @@ -814,8 +798,7 @@ cmd ::= ALTER TABLE ids(X) cpxName(Z) DROP TAG ids(Y). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER TABLE ids(X) cpxName(F) CHANGE TAG ids(Y) ids(Z). { - X.n += F.n; +cmd ::= ALTER TABLE ftblname(X) CHANGE TAG ids(Y) ids(Z). { toTSDBType(Y.type); SArray* A = tVariantListAppendToken(NULL, &Y, -1); @@ -827,8 +810,7 @@ cmd ::= ALTER TABLE ids(X) cpxName(F) CHANGE TAG ids(Y) ids(Z). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER TABLE ids(X) cpxName(F) SET TAG ids(Y) EQ tagitem(Z). { - X.n += F.n; +cmd ::= ALTER TABLE ftblname(X) SET TAG ids(Y) EQ tagitem(Z). { toTSDBType(Y.type); SArray* A = tVariantListAppendToken(NULL, &Y, -1); @@ -838,21 +820,18 @@ cmd ::= ALTER TABLE ids(X) cpxName(F) SET TAG ids(Y) EQ tagitem(Z). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER TABLE ids(X) cpxName(F) MODIFY TAG columnlist(A). { - X.n += F.n; +cmd ::= ALTER TABLE ftblname(X) MODIFY TAG columnlist(A). { SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } ///////////////////////////////////ALTER STABLE statement////////////////////////////////// -cmd ::= ALTER STABLE ids(X) cpxName(F) ADD COLUMN columnlist(A). { - X.n += F.n; +cmd ::= ALTER STABLE ftblname(X) ADD COLUMN columnlist(A). { SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER STABLE ids(X) cpxName(F) DROP COLUMN ids(A). { - X.n += F.n; +cmd ::= ALTER STABLE ftblname(X) DROP COLUMN ids(A). { toTSDBType(A.type); SArray* K = tVariantListAppendToken(NULL, &A, -1); @@ -861,20 +840,17 @@ cmd ::= ALTER STABLE ids(X) cpxName(F) DROP COLUMN ids(A). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER STABLE ids(X) cpxName(F) MODIFY COLUMN columnlist(A). { - X.n += F.n; +cmd ::= ALTER STABLE ftblname(X) MODIFY COLUMN columnlist(A). { SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } //////////////////////////////////ALTER TAGS statement///////////////////////////////////// -cmd ::= ALTER STABLE ids(X) cpxName(Y) ADD TAG columnlist(A). { - X.n += Y.n; +cmd ::= ALTER STABLE ftblname(X) ADD TAG columnlist(A). { SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER STABLE ids(X) cpxName(Z) DROP TAG ids(Y). { - X.n += Z.n; +cmd ::= ALTER STABLE ftblname(X) DROP TAG ids(Y). { toTSDBType(Y.type); SArray* A = tVariantListAppendToken(NULL, &Y, -1); @@ -883,8 +859,7 @@ cmd ::= ALTER STABLE ids(X) cpxName(Z) DROP TAG ids(Y). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER STABLE ids(X) cpxName(F) CHANGE TAG ids(Y) ids(Z). { - X.n += F.n; +cmd ::= ALTER STABLE ftblname(X) CHANGE TAG ids(Y) ids(Z). { toTSDBType(Y.type); SArray* A = tVariantListAppendToken(NULL, &Y, -1); @@ -896,8 +871,7 @@ cmd ::= ALTER STABLE ids(X) cpxName(F) CHANGE TAG ids(Y) ids(Z). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER STABLE ids(X) cpxName(F) SET TAG ids(Y) EQ tagitem(Z). { - X.n += F.n; +cmd ::= ALTER STABLE ftblname(X) SET TAG ids(Y) EQ tagitem(Z). { toTSDBType(Y.type); SArray* A = tVariantListAppendToken(NULL, &Y, -1); @@ -907,8 +881,7 @@ cmd ::= ALTER STABLE ids(X) cpxName(F) SET TAG ids(Y) EQ tagitem(Z). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER STABLE ids(X) cpxName(F) MODIFY TAG columnlist(A). { - X.n += F.n; +cmd ::= ALTER STABLE ftblname(X) MODIFY TAG columnlist(A). { SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } diff --git a/src/query/src/sql.c b/src/query/src/sql.c index e89b6232f7e42b764df7660f06dcd207bfe6e4de..b657a1f2a09df6bbae43898c689ca46145f5d244 100644 --- a/src/query/src/sql.c +++ b/src/query/src/sql.c @@ -25,7 +25,6 @@ #include #include /************ Begin %include sections from the grammar ************************/ -#line 23 "sql.y" #include #include @@ -38,7 +37,6 @@ #include "ttokendef.h" #include "tutil.h" #include "tvariant.h" -#line 42 "sql.c" /**************** End of %include directives **********************************/ /* These constants specify the various numeric values for terminal symbols ** in a format understandable to "makeheaders". This section is blank unless @@ -102,29 +100,29 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 278 +#define YYNOCODE 281 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SStrToken typedef union { int yyinit; ParseTOKENTYPE yy0; - SRelationInfo* yy8; - SWindowStateVal yy40; - SSqlNode* yy56; - SCreateDbInfo yy90; - int yy96; - int32_t yy104; - SSessionWindowVal yy147; - SCreatedTableInfo yy152; - SLimitVal yy166; - SCreateAcctInfo yy171; - TAOS_FIELD yy183; - int64_t yy325; - SIntervalVal yy400; - SArray* yy421; - tVariant yy430; - SCreateTableSql* yy438; - tSqlExpr* yy439; + int32_t yy2; + SCreatedTableInfo yy42; + tSqlExpr* yy44; + SRelationInfo* yy46; + SCreateAcctInfo yy47; + TAOS_FIELD yy179; + SLimitVal yy204; + int yy222; + SSqlNode* yy246; + SArray* yy247; + SCreateDbInfo yy262; + SCreateTableSql* yy336; + tVariant yy378; + int64_t yy403; + SIntervalVal yy430; + SWindowStateVal yy492; + SSessionWindowVal yy507; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -140,17 +138,17 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 368 -#define YYNRULE 294 -#define YYNRULE_WITH_ACTION 294 -#define YYNTOKEN 197 -#define YY_MAX_SHIFT 367 -#define YY_MIN_SHIFTREDUCE 576 -#define YY_MAX_SHIFTREDUCE 869 -#define YY_ERROR_ACTION 870 -#define YY_ACCEPT_ACTION 871 -#define YY_NO_ACTION 872 -#define YY_MIN_REDUCE 873 +#define YYNSTATE 356 +#define YYNRULE 298 +#define YYNRULE_WITH_ACTION 298 +#define YYNTOKEN 198 +#define YY_MAX_SHIFT 355 +#define YY_MIN_SHIFTREDUCE 568 +#define YY_MAX_SHIFTREDUCE 865 +#define YY_ERROR_ACTION 866 +#define YY_ACCEPT_ACTION 867 +#define YY_NO_ACTION 868 +#define YY_MIN_REDUCE 869 #define YY_MAX_REDUCE 1166 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -218,292 +216,294 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (773) +#define YY_ACTTAB_COUNT (795) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 23, 628, 366, 235, 1051, 208, 241, 712, 211, 629, - /* 10 */ 1029, 871, 367, 59, 60, 173, 63, 64, 1042, 1142, - /* 20 */ 255, 53, 52, 51, 628, 62, 324, 67, 65, 68, - /* 30 */ 66, 157, 629, 286, 238, 58, 57, 344, 343, 56, - /* 40 */ 55, 54, 59, 60, 247, 63, 64, 252, 1029, 255, - /* 50 */ 53, 52, 51, 209, 62, 324, 67, 65, 68, 66, - /* 60 */ 999, 1042, 997, 998, 58, 57, 664, 1000, 56, 55, - /* 70 */ 54, 1001, 1048, 1002, 1003, 58, 57, 277, 1015, 56, - /* 80 */ 55, 54, 59, 60, 164, 63, 64, 38, 82, 255, - /* 90 */ 53, 52, 51, 88, 62, 324, 67, 65, 68, 66, - /* 100 */ 284, 283, 249, 752, 58, 57, 1029, 211, 56, 55, - /* 110 */ 54, 38, 59, 61, 806, 63, 64, 1042, 1143, 255, - /* 120 */ 53, 52, 51, 628, 62, 324, 67, 65, 68, 66, - /* 130 */ 45, 629, 237, 239, 58, 57, 1026, 164, 56, 55, - /* 140 */ 54, 60, 1023, 63, 64, 771, 772, 255, 53, 52, - /* 150 */ 51, 95, 62, 324, 67, 65, 68, 66, 38, 1090, - /* 160 */ 1025, 296, 58, 57, 322, 83, 56, 55, 54, 577, - /* 170 */ 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, - /* 180 */ 588, 589, 590, 155, 322, 236, 63, 64, 756, 248, - /* 190 */ 255, 53, 52, 51, 628, 62, 324, 67, 65, 68, - /* 200 */ 66, 251, 629, 245, 354, 58, 57, 1026, 215, 56, - /* 210 */ 55, 54, 1089, 44, 320, 361, 360, 319, 318, 317, - /* 220 */ 359, 316, 315, 314, 358, 313, 357, 356, 808, 38, - /* 230 */ 1, 180, 24, 991, 979, 980, 981, 982, 983, 984, - /* 240 */ 985, 986, 987, 988, 989, 990, 992, 993, 256, 214, - /* 250 */ 38, 254, 821, 922, 100, 810, 222, 813, 164, 816, - /* 260 */ 192, 211, 139, 138, 137, 221, 809, 254, 821, 329, - /* 270 */ 88, 810, 1143, 813, 246, 816, 1028, 29, 1026, 67, - /* 280 */ 65, 68, 66, 38, 1162, 233, 234, 58, 57, 325, - /* 290 */ 1017, 56, 55, 54, 38, 333, 56, 55, 54, 1026, - /* 300 */ 269, 233, 234, 258, 5, 41, 182, 45, 211, 273, - /* 310 */ 272, 181, 106, 111, 102, 110, 164, 73, 736, 1143, - /* 320 */ 932, 733, 812, 734, 815, 735, 263, 192, 334, 276, - /* 330 */ 309, 80, 1026, 94, 69, 123, 117, 128, 229, 335, - /* 340 */ 362, 960, 127, 1026, 133, 136, 126, 202, 200, 198, - /* 350 */ 69, 260, 261, 130, 197, 143, 142, 141, 140, 74, - /* 360 */ 44, 97, 361, 360, 788, 923, 38, 359, 38, 822, - /* 370 */ 817, 358, 192, 357, 356, 38, 818, 38, 38, 259, - /* 380 */ 811, 257, 814, 332, 331, 822, 817, 264, 125, 298, - /* 390 */ 264, 93, 818, 326, 1012, 1013, 35, 1016, 178, 14, - /* 400 */ 354, 179, 265, 96, 262, 264, 339, 338, 154, 152, - /* 410 */ 151, 336, 749, 340, 81, 1026, 1027, 1026, 3, 193, - /* 420 */ 341, 787, 342, 346, 1026, 278, 1026, 1026, 365, 364, - /* 430 */ 148, 85, 86, 99, 76, 737, 738, 768, 9, 39, - /* 440 */ 778, 779, 722, 819, 301, 724, 216, 303, 1014, 723, - /* 450 */ 34, 159, 844, 823, 70, 26, 39, 253, 39, 70, - /* 460 */ 79, 98, 627, 70, 135, 134, 25, 25, 280, 280, - /* 470 */ 16, 116, 15, 115, 77, 18, 25, 17, 741, 6, - /* 480 */ 742, 274, 739, 304, 740, 20, 122, 19, 121, 22, - /* 490 */ 217, 21, 711, 1100, 1137, 1136, 1135, 825, 231, 156, - /* 500 */ 232, 820, 212, 213, 218, 210, 1099, 219, 220, 224, - /* 510 */ 225, 226, 223, 207, 1154, 243, 1096, 1095, 244, 345, - /* 520 */ 1050, 1061, 1043, 48, 1058, 1059, 1063, 153, 281, 158, - /* 530 */ 163, 292, 1024, 175, 1082, 174, 1081, 279, 84, 285, - /* 540 */ 1022, 310, 176, 240, 177, 171, 167, 937, 306, 307, - /* 550 */ 308, 767, 311, 312, 1040, 165, 166, 46, 287, 289, - /* 560 */ 297, 299, 205, 168, 42, 78, 75, 50, 323, 931, - /* 570 */ 330, 1161, 113, 1160, 295, 169, 293, 291, 1157, 183, - /* 580 */ 337, 1153, 119, 288, 1152, 1149, 184, 957, 43, 40, - /* 590 */ 47, 206, 919, 129, 49, 917, 131, 132, 915, 914, - /* 600 */ 266, 195, 196, 911, 910, 909, 908, 907, 906, 905, - /* 610 */ 199, 201, 902, 900, 898, 896, 203, 893, 204, 889, - /* 620 */ 355, 124, 89, 290, 1083, 347, 348, 349, 350, 351, - /* 630 */ 352, 353, 363, 869, 230, 250, 305, 267, 268, 868, - /* 640 */ 270, 227, 228, 271, 867, 850, 107, 936, 935, 108, - /* 650 */ 849, 275, 280, 300, 10, 282, 744, 87, 30, 90, - /* 660 */ 913, 912, 904, 186, 958, 190, 185, 187, 144, 191, - /* 670 */ 189, 188, 145, 146, 147, 903, 995, 895, 4, 894, - /* 680 */ 959, 769, 160, 33, 780, 170, 172, 2, 161, 162, - /* 690 */ 774, 91, 242, 776, 92, 1005, 294, 11, 12, 31, - /* 700 */ 32, 13, 27, 302, 28, 99, 101, 104, 36, 103, - /* 710 */ 642, 37, 105, 677, 675, 674, 673, 671, 670, 669, - /* 720 */ 666, 321, 109, 632, 7, 826, 824, 8, 327, 328, - /* 730 */ 112, 114, 71, 72, 118, 714, 39, 120, 713, 710, - /* 740 */ 658, 656, 648, 654, 650, 652, 646, 644, 680, 679, - /* 750 */ 678, 676, 672, 668, 667, 194, 630, 594, 873, 872, - /* 760 */ 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - /* 770 */ 872, 149, 150, + /* 0 */ 36, 620, 239, 620, 353, 162, 238, 266, 929, 621, + /* 10 */ 808, 621, 811, 75, 76, 353, 79, 80, 104, 929, + /* 20 */ 242, 69, 68, 67, 620, 78, 311, 83, 81, 84, + /* 30 */ 82, 243, 621, 660, 353, 74, 73, 217, 929, 72, + /* 40 */ 71, 70, 75, 76, 353, 79, 80, 237, 929, 242, + /* 50 */ 69, 68, 67, 195, 78, 311, 83, 81, 84, 82, + /* 60 */ 162, 162, 198, 927, 74, 73, 198, 896, 72, 71, + /* 70 */ 70, 75, 76, 1143, 79, 80, 196, 1143, 242, 69, + /* 80 */ 68, 67, 1089, 78, 311, 83, 81, 84, 82, 97, + /* 90 */ 627, 198, 353, 74, 73, 292, 929, 72, 71, 70, + /* 100 */ 620, 1051, 1143, 75, 77, 228, 79, 80, 621, 1029, + /* 110 */ 242, 69, 68, 67, 802, 78, 311, 83, 81, 84, + /* 120 */ 82, 72, 71, 70, 353, 74, 73, 214, 929, 72, + /* 130 */ 71, 70, 815, 191, 190, 189, 285, 1090, 107, 283, + /* 140 */ 188, 151, 150, 149, 148, 12, 569, 570, 571, 572, + /* 150 */ 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, + /* 160 */ 156, 76, 223, 79, 80, 354, 222, 242, 69, 68, + /* 170 */ 67, 1048, 78, 311, 83, 81, 84, 82, 1012, 1013, + /* 180 */ 51, 1016, 74, 73, 54, 341, 72, 71, 70, 79, + /* 190 */ 80, 162, 103, 242, 69, 68, 67, 245, 78, 311, + /* 200 */ 83, 81, 84, 82, 352, 351, 154, 353, 74, 73, + /* 210 */ 215, 929, 72, 71, 70, 60, 307, 348, 347, 306, + /* 220 */ 305, 304, 346, 303, 302, 301, 345, 300, 344, 343, + /* 230 */ 61, 224, 708, 202, 37, 1026, 991, 979, 980, 981, + /* 240 */ 982, 983, 984, 985, 986, 987, 988, 989, 990, 992, + /* 250 */ 993, 201, 353, 241, 817, 909, 929, 806, 209, 809, + /* 260 */ 309, 812, 331, 330, 147, 18, 17, 208, 109, 241, + /* 270 */ 817, 316, 103, 806, 246, 809, 244, 812, 319, 318, + /* 280 */ 203, 83, 81, 84, 82, 198, 1042, 220, 221, 74, + /* 290 */ 73, 312, 918, 72, 71, 70, 1142, 240, 60, 185, + /* 300 */ 348, 347, 225, 220, 221, 346, 6, 57, 177, 345, + /* 310 */ 61, 344, 343, 176, 118, 123, 114, 122, 353, 7, + /* 320 */ 732, 908, 929, 729, 1042, 730, 353, 731, 250, 99, + /* 330 */ 929, 1023, 263, 296, 96, 620, 85, 16, 15, 138, + /* 340 */ 226, 216, 204, 621, 137, 54, 143, 146, 136, 867, + /* 350 */ 355, 1100, 85, 247, 248, 140, 999, 353, 997, 998, + /* 360 */ 900, 929, 353, 1000, 54, 899, 929, 1001, 171, 1002, + /* 370 */ 1003, 353, 818, 813, 891, 929, 54, 74, 73, 814, + /* 380 */ 235, 72, 71, 70, 54, 54, 273, 353, 818, 813, + /* 390 */ 890, 929, 232, 1015, 54, 814, 1026, 271, 270, 54, + /* 400 */ 54, 1042, 54, 748, 256, 252, 313, 249, 54, 326, + /* 410 */ 325, 233, 1137, 260, 259, 1026, 234, 264, 45, 27, + /* 420 */ 1029, 251, 627, 320, 111, 236, 14, 1026, 807, 1029, + /* 430 */ 810, 321, 322, 927, 173, 1026, 1026, 894, 733, 734, + /* 440 */ 54, 323, 22, 21, 155, 1026, 327, 328, 927, 329, + /* 450 */ 1026, 1026, 930, 1026, 13, 333, 767, 768, 110, 1026, + /* 460 */ 251, 135, 1017, 251, 932, 10, 784, 349, 960, 745, + /* 470 */ 919, 185, 98, 174, 341, 265, 1027, 185, 804, 309, + /* 480 */ 1, 175, 3, 186, 100, 101, 764, 774, 775, 752, + /* 490 */ 55, 1025, 89, 718, 288, 5, 92, 720, 50, 1014, + /* 500 */ 290, 157, 86, 39, 719, 840, 819, 1136, 55, 55, + /* 510 */ 619, 821, 86, 95, 1135, 112, 805, 145, 144, 86, + /* 520 */ 38, 38, 267, 267, 783, 38, 218, 29, 128, 28, + /* 530 */ 127, 31, 291, 30, 90, 737, 93, 738, 735, 219, + /* 540 */ 736, 199, 33, 133, 32, 132, 707, 200, 205, 197, + /* 550 */ 816, 206, 35, 207, 34, 211, 212, 213, 210, 194, + /* 560 */ 1028, 1162, 1154, 1099, 230, 1096, 1095, 231, 332, 64, + /* 570 */ 261, 1050, 1061, 1058, 1059, 1063, 161, 1043, 1082, 268, + /* 580 */ 1081, 108, 279, 1024, 889, 172, 1022, 937, 763, 293, + /* 590 */ 272, 297, 227, 274, 282, 280, 163, 294, 295, 94, + /* 600 */ 91, 1040, 286, 276, 164, 298, 299, 62, 66, 165, + /* 610 */ 192, 58, 284, 310, 166, 167, 931, 317, 1161, 168, + /* 620 */ 278, 169, 125, 170, 1160, 275, 1157, 324, 1153, 65, + /* 630 */ 130, 1152, 1149, 957, 59, 56, 63, 342, 193, 915, + /* 640 */ 139, 913, 141, 142, 911, 910, 253, 907, 906, 905, + /* 650 */ 904, 903, 902, 901, 898, 892, 885, 134, 334, 277, + /* 660 */ 1083, 335, 336, 337, 338, 339, 340, 350, 865, 254, + /* 670 */ 255, 864, 257, 258, 863, 267, 846, 845, 23, 936, + /* 680 */ 935, 119, 120, 262, 740, 102, 287, 46, 152, 269, + /* 690 */ 153, 180, 958, 19, 20, 178, 184, 179, 181, 182, + /* 700 */ 4, 183, 2, 765, 11, 158, 160, 776, 995, 959, + /* 710 */ 159, 229, 770, 105, 47, 772, 106, 281, 49, 24, + /* 720 */ 1005, 25, 26, 48, 40, 41, 113, 289, 115, 13, + /* 730 */ 116, 638, 52, 53, 117, 671, 673, 670, 669, 667, + /* 740 */ 666, 665, 662, 624, 308, 8, 9, 121, 822, 820, + /* 750 */ 314, 315, 124, 55, 87, 126, 88, 710, 709, 706, + /* 760 */ 654, 129, 131, 652, 644, 650, 646, 648, 642, 640, + /* 770 */ 676, 675, 674, 672, 668, 664, 663, 187, 622, 44, + /* 780 */ 586, 869, 868, 868, 868, 868, 868, 868, 868, 868, + /* 790 */ 868, 868, 868, 42, 43, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 266, 1, 199, 200, 199, 266, 245, 5, 266, 9, - /* 10 */ 249, 197, 198, 13, 14, 253, 16, 17, 247, 277, + /* 0 */ 269, 1, 209, 1, 200, 200, 209, 203, 204, 9, + /* 10 */ 5, 9, 7, 13, 14, 200, 16, 17, 203, 204, /* 20 */ 20, 21, 22, 23, 1, 25, 26, 27, 28, 29, - /* 30 */ 30, 199, 9, 271, 263, 35, 36, 35, 36, 39, - /* 40 */ 40, 41, 13, 14, 245, 16, 17, 206, 249, 20, - /* 50 */ 21, 22, 23, 266, 25, 26, 27, 28, 29, 30, - /* 60 */ 223, 247, 225, 226, 35, 36, 5, 230, 39, 40, - /* 70 */ 41, 234, 267, 236, 237, 35, 36, 263, 0, 39, - /* 80 */ 40, 41, 13, 14, 199, 16, 17, 199, 88, 20, - /* 90 */ 21, 22, 23, 84, 25, 26, 27, 28, 29, 30, - /* 100 */ 268, 269, 245, 39, 35, 36, 249, 266, 39, 40, - /* 110 */ 41, 199, 13, 14, 85, 16, 17, 247, 277, 20, - /* 120 */ 21, 22, 23, 1, 25, 26, 27, 28, 29, 30, - /* 130 */ 121, 9, 244, 263, 35, 36, 248, 199, 39, 40, - /* 140 */ 41, 14, 199, 16, 17, 127, 128, 20, 21, 22, - /* 150 */ 23, 250, 25, 26, 27, 28, 29, 30, 199, 274, - /* 160 */ 248, 276, 35, 36, 86, 264, 39, 40, 41, 47, - /* 170 */ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - /* 180 */ 58, 59, 60, 61, 86, 63, 16, 17, 124, 246, - /* 190 */ 20, 21, 22, 23, 1, 25, 26, 27, 28, 29, - /* 200 */ 30, 206, 9, 244, 92, 35, 36, 248, 266, 39, - /* 210 */ 40, 41, 274, 100, 101, 102, 103, 104, 105, 106, - /* 220 */ 107, 108, 109, 110, 111, 112, 113, 114, 1, 199, - /* 230 */ 208, 209, 46, 223, 224, 225, 226, 227, 228, 229, - /* 240 */ 230, 231, 232, 233, 234, 235, 236, 237, 206, 63, - /* 250 */ 199, 1, 2, 205, 207, 5, 70, 7, 199, 9, - /* 260 */ 212, 266, 76, 77, 78, 79, 39, 1, 2, 83, - /* 270 */ 84, 5, 277, 7, 244, 9, 249, 84, 248, 27, - /* 280 */ 28, 29, 30, 199, 249, 35, 36, 35, 36, 39, - /* 290 */ 243, 39, 40, 41, 199, 244, 39, 40, 41, 248, - /* 300 */ 144, 35, 36, 70, 64, 65, 66, 121, 266, 153, - /* 310 */ 154, 71, 72, 73, 74, 75, 199, 99, 2, 277, - /* 320 */ 205, 5, 5, 7, 7, 9, 70, 212, 244, 143, - /* 330 */ 90, 145, 248, 274, 84, 64, 65, 66, 152, 244, - /* 340 */ 221, 222, 71, 248, 73, 74, 75, 64, 65, 66, - /* 350 */ 84, 35, 36, 82, 71, 72, 73, 74, 75, 141, - /* 360 */ 100, 207, 102, 103, 78, 205, 199, 107, 199, 119, - /* 370 */ 120, 111, 212, 113, 114, 199, 126, 199, 199, 146, - /* 380 */ 5, 148, 7, 150, 151, 119, 120, 199, 80, 272, - /* 390 */ 199, 274, 126, 15, 240, 241, 242, 243, 210, 84, - /* 400 */ 92, 210, 146, 88, 148, 199, 150, 151, 64, 65, - /* 410 */ 66, 244, 99, 244, 207, 248, 210, 248, 203, 204, - /* 420 */ 244, 135, 244, 244, 248, 85, 248, 248, 67, 68, - /* 430 */ 69, 85, 85, 118, 99, 119, 120, 85, 125, 99, - /* 440 */ 85, 85, 85, 126, 85, 85, 266, 85, 241, 85, - /* 450 */ 84, 99, 85, 85, 99, 99, 99, 62, 99, 99, - /* 460 */ 84, 99, 85, 99, 80, 81, 99, 99, 122, 122, - /* 470 */ 147, 147, 149, 149, 139, 147, 99, 149, 5, 84, - /* 480 */ 7, 199, 5, 117, 7, 147, 147, 149, 149, 147, - /* 490 */ 266, 149, 116, 239, 266, 266, 266, 119, 266, 199, - /* 500 */ 266, 126, 266, 266, 266, 266, 239, 266, 266, 266, - /* 510 */ 266, 266, 266, 266, 249, 239, 239, 239, 239, 239, - /* 520 */ 199, 199, 247, 265, 199, 199, 199, 62, 247, 199, - /* 530 */ 199, 199, 247, 199, 275, 251, 275, 201, 201, 270, - /* 540 */ 199, 91, 199, 270, 199, 255, 259, 199, 199, 199, - /* 550 */ 199, 126, 199, 199, 262, 261, 260, 199, 270, 270, - /* 560 */ 136, 133, 199, 258, 199, 138, 140, 137, 199, 199, - /* 570 */ 199, 199, 199, 199, 131, 257, 130, 129, 199, 199, - /* 580 */ 199, 199, 199, 132, 199, 199, 199, 199, 199, 199, - /* 590 */ 199, 199, 199, 199, 142, 199, 199, 199, 199, 199, - /* 600 */ 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, - /* 610 */ 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, - /* 620 */ 115, 98, 201, 201, 201, 97, 53, 94, 96, 57, - /* 630 */ 95, 93, 86, 5, 201, 201, 201, 155, 5, 5, - /* 640 */ 155, 201, 201, 5, 5, 102, 207, 211, 211, 207, - /* 650 */ 101, 144, 122, 117, 84, 99, 85, 123, 84, 99, - /* 660 */ 201, 201, 201, 218, 220, 216, 219, 214, 202, 213, - /* 670 */ 215, 217, 202, 202, 202, 201, 238, 201, 203, 201, - /* 680 */ 222, 85, 84, 252, 85, 256, 254, 208, 84, 99, - /* 690 */ 85, 84, 1, 85, 84, 238, 84, 134, 134, 99, - /* 700 */ 99, 84, 84, 117, 84, 118, 80, 72, 89, 88, - /* 710 */ 5, 89, 88, 9, 5, 5, 5, 5, 5, 5, - /* 720 */ 5, 15, 80, 87, 84, 119, 85, 84, 26, 61, - /* 730 */ 149, 149, 16, 16, 149, 5, 99, 149, 5, 85, - /* 740 */ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - /* 750 */ 5, 5, 5, 5, 5, 99, 87, 62, 0, 278, - /* 760 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 770 */ 278, 21, 21, 278, 278, 278, 278, 278, 278, 278, - /* 780 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 790 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 800 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 810 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 820 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 830 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 840 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 850 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 860 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 870 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 880 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 890 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 900 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 910 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 920 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 930 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 940 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 950 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, - /* 960 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 30 */ 30, 209, 9, 5, 200, 35, 36, 203, 204, 39, + /* 40 */ 40, 41, 13, 14, 200, 16, 17, 203, 204, 20, + /* 50 */ 21, 22, 23, 269, 25, 26, 27, 28, 29, 30, + /* 60 */ 200, 200, 269, 200, 35, 36, 269, 204, 39, 40, + /* 70 */ 41, 13, 14, 280, 16, 17, 269, 280, 20, 21, + /* 80 */ 22, 23, 277, 25, 26, 27, 28, 29, 30, 89, + /* 90 */ 88, 269, 200, 35, 36, 203, 204, 39, 40, 41, + /* 100 */ 1, 200, 280, 13, 14, 248, 16, 17, 9, 252, + /* 110 */ 20, 21, 22, 23, 85, 25, 26, 27, 28, 29, + /* 120 */ 30, 39, 40, 41, 200, 35, 36, 203, 204, 39, + /* 130 */ 40, 41, 127, 64, 65, 66, 275, 277, 277, 279, + /* 140 */ 71, 72, 73, 74, 75, 210, 47, 48, 49, 50, + /* 150 */ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, + /* 160 */ 61, 14, 63, 16, 17, 200, 201, 20, 21, 22, + /* 170 */ 23, 270, 25, 26, 27, 28, 29, 30, 243, 244, + /* 180 */ 245, 246, 35, 36, 200, 93, 39, 40, 41, 16, + /* 190 */ 17, 200, 84, 20, 21, 22, 23, 70, 25, 26, + /* 200 */ 27, 28, 29, 30, 67, 68, 69, 200, 35, 36, + /* 210 */ 203, 204, 39, 40, 41, 101, 102, 103, 104, 105, + /* 220 */ 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + /* 230 */ 122, 247, 5, 269, 46, 251, 226, 227, 228, 229, + /* 240 */ 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + /* 250 */ 240, 63, 200, 1, 2, 203, 204, 5, 70, 7, + /* 260 */ 86, 9, 35, 36, 76, 77, 78, 79, 277, 1, + /* 270 */ 2, 83, 84, 5, 147, 7, 149, 9, 151, 152, + /* 280 */ 269, 27, 28, 29, 30, 269, 250, 35, 36, 35, + /* 290 */ 36, 39, 208, 39, 40, 41, 280, 62, 101, 215, + /* 300 */ 103, 104, 266, 35, 36, 108, 64, 65, 66, 112, + /* 310 */ 122, 114, 115, 71, 72, 73, 74, 75, 200, 84, + /* 320 */ 2, 203, 204, 5, 250, 7, 200, 9, 70, 203, + /* 330 */ 204, 200, 144, 91, 146, 1, 84, 64, 65, 66, + /* 340 */ 266, 153, 269, 9, 71, 200, 73, 74, 75, 198, + /* 350 */ 199, 242, 84, 35, 36, 82, 226, 200, 228, 229, + /* 360 */ 203, 204, 200, 233, 200, 203, 204, 237, 256, 239, + /* 370 */ 240, 200, 120, 121, 203, 204, 200, 35, 36, 127, + /* 380 */ 249, 39, 40, 41, 200, 200, 274, 200, 120, 121, + /* 390 */ 203, 204, 247, 0, 200, 127, 251, 271, 272, 200, + /* 400 */ 200, 250, 200, 39, 145, 147, 15, 149, 200, 151, + /* 410 */ 152, 247, 269, 154, 155, 251, 248, 266, 84, 84, + /* 420 */ 252, 200, 88, 247, 89, 248, 210, 251, 5, 252, + /* 430 */ 7, 247, 247, 200, 213, 251, 251, 204, 120, 121, + /* 440 */ 200, 247, 64, 65, 66, 251, 247, 247, 200, 247, + /* 450 */ 251, 251, 204, 251, 119, 247, 128, 129, 253, 251, + /* 460 */ 200, 80, 246, 200, 208, 210, 78, 224, 225, 100, + /* 470 */ 208, 215, 267, 213, 93, 85, 213, 215, 1, 86, + /* 480 */ 211, 212, 206, 207, 85, 85, 85, 85, 85, 125, + /* 490 */ 100, 251, 100, 85, 85, 126, 100, 85, 84, 244, + /* 500 */ 85, 100, 100, 100, 85, 85, 85, 269, 100, 100, + /* 510 */ 85, 120, 100, 84, 269, 100, 39, 80, 81, 100, + /* 520 */ 100, 100, 123, 123, 136, 100, 269, 148, 148, 150, + /* 530 */ 150, 148, 118, 150, 142, 5, 140, 7, 5, 269, + /* 540 */ 7, 269, 148, 148, 150, 150, 117, 269, 269, 269, + /* 550 */ 127, 269, 148, 269, 150, 269, 269, 269, 269, 269, + /* 560 */ 252, 252, 252, 242, 242, 242, 242, 242, 242, 268, + /* 570 */ 200, 200, 200, 200, 200, 200, 200, 250, 278, 250, + /* 580 */ 278, 62, 200, 250, 200, 254, 200, 200, 127, 200, + /* 590 */ 273, 92, 273, 273, 132, 131, 264, 200, 200, 139, + /* 600 */ 141, 265, 134, 273, 263, 200, 200, 200, 138, 262, + /* 610 */ 200, 200, 137, 200, 261, 260, 200, 200, 200, 259, + /* 620 */ 130, 258, 200, 257, 200, 133, 200, 200, 200, 143, + /* 630 */ 200, 200, 200, 200, 200, 200, 200, 116, 200, 200, + /* 640 */ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + /* 650 */ 200, 200, 200, 200, 200, 200, 200, 99, 98, 202, + /* 660 */ 202, 53, 95, 97, 57, 96, 94, 86, 5, 156, + /* 670 */ 5, 5, 156, 5, 5, 123, 103, 102, 84, 214, + /* 680 */ 214, 210, 210, 145, 85, 124, 118, 84, 205, 100, + /* 690 */ 205, 217, 223, 205, 205, 222, 216, 221, 220, 218, + /* 700 */ 206, 219, 211, 85, 100, 84, 100, 85, 241, 225, + /* 710 */ 84, 1, 85, 84, 100, 85, 84, 84, 255, 135, + /* 720 */ 241, 135, 84, 100, 84, 84, 80, 118, 89, 119, + /* 730 */ 72, 5, 90, 90, 89, 5, 9, 5, 5, 5, + /* 740 */ 5, 5, 5, 87, 15, 84, 84, 80, 120, 85, + /* 750 */ 26, 61, 150, 100, 16, 150, 16, 5, 5, 85, + /* 760 */ 5, 150, 150, 5, 5, 5, 5, 5, 5, 5, + /* 770 */ 5, 5, 5, 5, 5, 5, 5, 100, 87, 62, + /* 780 */ 62, 0, 281, 281, 281, 281, 281, 281, 281, 281, + /* 790 */ 281, 281, 281, 21, 21, 281, 281, 281, 281, 281, + /* 800 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 810 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 820 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 830 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 840 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 850 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 860 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 870 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 880 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 890 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 900 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 910 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 920 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 930 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 940 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 950 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 960 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 970 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 980 */ 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, + /* 990 */ 281, 281, 281, }; -#define YY_SHIFT_COUNT (367) +#define YY_SHIFT_COUNT (355) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (758) +#define YY_SHIFT_MAX (781) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 186, 113, 113, 260, 260, 98, 250, 266, 266, 193, - /* 10 */ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - /* 20 */ 23, 23, 23, 0, 122, 266, 316, 316, 316, 9, - /* 30 */ 9, 23, 23, 18, 23, 78, 23, 23, 23, 23, - /* 40 */ 308, 98, 112, 112, 61, 773, 773, 773, 266, 266, - /* 50 */ 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, - /* 60 */ 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, - /* 70 */ 316, 316, 316, 2, 2, 2, 2, 2, 2, 2, - /* 80 */ 23, 23, 23, 64, 23, 23, 23, 9, 9, 23, - /* 90 */ 23, 23, 23, 286, 286, 313, 9, 23, 23, 23, - /* 100 */ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - /* 110 */ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, + /* 0 */ 188, 114, 114, 197, 197, 334, 174, 252, 268, 268, + /* 10 */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + /* 20 */ 2, 2, 2, 23, 23, 23, 23, 23, 23, 23, + /* 30 */ 23, 23, 23, 23, 23, 23, 0, 99, 268, 318, + /* 40 */ 318, 318, 2, 2, 2, 108, 108, 23, 23, 328, + /* 50 */ 23, 393, 23, 23, 23, 23, 381, 174, 92, 92, + /* 60 */ 28, 795, 795, 795, 268, 268, 268, 268, 268, 268, + /* 70 */ 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, + /* 80 */ 268, 268, 268, 268, 268, 268, 318, 318, 318, 227, + /* 90 */ 227, 227, 227, 227, 227, 227, 23, 23, 364, 23, + /* 100 */ 23, 23, 108, 108, 23, 23, 23, 388, 23, 388, + /* 110 */ 369, 108, 23, 23, 23, 23, 23, 23, 23, 23, /* 120 */ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, /* 130 */ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, /* 140 */ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - /* 150 */ 23, 23, 23, 23, 23, 23, 465, 465, 465, 425, - /* 160 */ 425, 425, 425, 465, 465, 427, 426, 428, 430, 424, - /* 170 */ 443, 446, 448, 451, 452, 465, 465, 465, 450, 450, - /* 180 */ 505, 98, 98, 465, 465, 523, 528, 573, 533, 532, - /* 190 */ 572, 535, 538, 505, 61, 465, 465, 546, 546, 465, - /* 200 */ 546, 465, 546, 465, 465, 773, 773, 29, 69, 69, - /* 210 */ 99, 69, 127, 170, 240, 252, 252, 252, 252, 252, - /* 220 */ 252, 271, 283, 40, 40, 40, 40, 233, 256, 156, - /* 230 */ 315, 257, 257, 317, 375, 361, 344, 340, 346, 347, - /* 240 */ 352, 355, 356, 218, 335, 357, 359, 360, 362, 364, - /* 250 */ 366, 367, 368, 227, 395, 378, 377, 323, 324, 328, - /* 260 */ 473, 477, 338, 339, 376, 342, 384, 628, 482, 633, - /* 270 */ 634, 485, 638, 639, 543, 549, 507, 530, 536, 570, - /* 280 */ 534, 571, 574, 556, 560, 596, 598, 599, 604, 605, - /* 290 */ 590, 607, 608, 610, 691, 612, 600, 563, 601, 564, - /* 300 */ 617, 536, 618, 586, 620, 587, 626, 619, 621, 635, - /* 310 */ 705, 622, 624, 704, 709, 710, 711, 712, 713, 714, - /* 320 */ 715, 636, 706, 642, 640, 641, 606, 643, 702, 668, - /* 330 */ 716, 581, 582, 637, 637, 637, 637, 717, 585, 588, - /* 340 */ 637, 637, 637, 730, 733, 654, 637, 735, 736, 737, - /* 350 */ 738, 739, 740, 741, 742, 743, 744, 745, 746, 747, - /* 360 */ 748, 749, 656, 669, 750, 751, 695, 758, + /* 150 */ 23, 23, 23, 23, 23, 23, 23, 461, 461, 461, + /* 160 */ 461, 519, 519, 460, 459, 468, 470, 475, 462, 464, + /* 170 */ 490, 492, 486, 499, 499, 521, 174, 174, 558, 560, + /* 180 */ 608, 567, 566, 607, 569, 572, 521, 28, 581, 581, + /* 190 */ 581, 581, 795, 795, 29, 58, 58, 90, 58, 147, + /* 200 */ 173, 242, 254, 254, 254, 254, 254, 254, 273, 69, + /* 210 */ 342, 342, 342, 342, 127, 258, 259, 335, 82, 82, + /* 220 */ 5, 423, 137, 378, 390, 399, 400, 401, 402, 403, + /* 230 */ 392, 396, 408, 409, 412, 415, 419, 414, 420, 421, + /* 240 */ 477, 235, 391, 425, 379, 380, 383, 530, 533, 394, + /* 250 */ 395, 429, 404, 437, 663, 513, 665, 666, 516, 668, + /* 260 */ 669, 573, 575, 538, 552, 568, 594, 561, 599, 603, + /* 270 */ 589, 604, 618, 621, 622, 626, 627, 606, 629, 630, + /* 280 */ 632, 710, 633, 614, 584, 623, 586, 638, 568, 640, + /* 290 */ 609, 641, 610, 646, 642, 639, 658, 726, 643, 645, + /* 300 */ 727, 730, 732, 733, 734, 735, 736, 737, 656, 729, + /* 310 */ 667, 661, 664, 628, 662, 724, 690, 738, 602, 605, + /* 320 */ 653, 653, 653, 653, 740, 611, 612, 653, 653, 653, + /* 330 */ 752, 753, 674, 653, 755, 758, 759, 760, 761, 762, + /* 340 */ 763, 764, 765, 766, 767, 768, 769, 770, 771, 677, + /* 350 */ 691, 772, 773, 717, 718, 781, }; -#define YY_REDUCE_COUNT (206) -#define YY_REDUCE_MIN (-266) -#define YY_REDUCE_MAX (479) +#define YY_REDUCE_COUNT (193) +#define YY_REDUCE_MIN (-269) +#define YY_REDUCE_MAX (494) static const short yy_reduce_ofst[] = { - /* 0 */ -186, 10, 10, -163, -163, 154, -159, -5, 42, -168, - /* 10 */ -112, -115, 117, -41, 30, 51, 84, 95, 167, 169, - /* 20 */ 176, 178, 179, -195, -197, -258, -239, -201, -143, -229, - /* 30 */ -130, -62, 59, -238, -57, 47, 188, 191, 206, -88, - /* 40 */ 48, 207, 115, 160, 119, -99, 22, 215, -266, -261, - /* 50 */ -213, -58, 180, 224, 228, 229, 230, 232, 234, 236, - /* 60 */ 237, 238, 239, 241, 242, 243, 244, 245, 246, 247, - /* 70 */ 27, 35, 265, 254, 267, 276, 277, 278, 279, 280, - /* 80 */ 282, 300, 321, 258, 322, 325, 326, 275, 281, 327, - /* 90 */ 330, 331, 332, 259, 261, 284, 285, 334, 341, 343, - /* 100 */ 345, 348, 349, 350, 351, 353, 354, 358, 363, 365, - /* 110 */ 369, 370, 371, 372, 373, 374, 379, 380, 381, 382, - /* 120 */ 383, 385, 386, 387, 388, 389, 390, 391, 392, 393, - /* 130 */ 394, 396, 397, 398, 399, 400, 401, 402, 403, 404, - /* 140 */ 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, - /* 150 */ 415, 416, 417, 418, 419, 420, 336, 337, 421, 269, - /* 160 */ 273, 288, 289, 422, 423, 292, 294, 296, 287, 305, - /* 170 */ 318, 429, 290, 432, 431, 433, 434, 435, 436, 437, - /* 180 */ 438, 439, 442, 440, 441, 444, 447, 445, 453, 454, - /* 190 */ 455, 449, 456, 457, 458, 459, 460, 466, 470, 461, - /* 200 */ 471, 474, 472, 476, 478, 479, 475, + /* 0 */ 151, 10, 10, 130, 130, 126, -65, -207, -203, -178, + /* 10 */ -196, -185, -166, -156, -108, -76, 7, 52, 118, 157, + /* 20 */ 162, 171, 187, -16, -140, -139, 145, 164, 176, 184, + /* 30 */ 185, 194, 199, 200, 202, 208, -99, -35, 16, -143, + /* 40 */ 168, 177, -137, 233, 248, 36, 74, -195, -9, 112, + /* 50 */ 131, 216, 221, 260, 263, 240, 84, 255, 256, 262, + /* 60 */ 243, 205, 269, 276, -269, -216, -193, -36, 11, 73, + /* 70 */ 143, 238, 245, 257, 270, 272, 278, 279, 280, 282, + /* 80 */ 284, 286, 287, 288, 289, 290, 308, 309, 310, 109, + /* 90 */ 321, 322, 323, 324, 325, 326, 370, 371, 301, 372, + /* 100 */ 373, 374, 327, 329, 375, 376, 382, 300, 384, 302, + /* 110 */ 331, 333, 386, 387, 389, 397, 398, 405, 406, 407, + /* 120 */ 410, 411, 413, 416, 417, 418, 422, 424, 426, 427, + /* 130 */ 428, 430, 431, 432, 433, 434, 435, 436, 438, 439, + /* 140 */ 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, + /* 150 */ 450, 451, 452, 453, 454, 455, 456, 317, 319, 320, + /* 160 */ 330, 457, 458, 336, 332, 341, 347, 353, 355, 360, + /* 170 */ 363, 366, 463, 465, 466, 467, 471, 472, 469, 473, + /* 180 */ 476, 474, 478, 481, 482, 480, 479, 484, 483, 485, + /* 190 */ 488, 489, 491, 494, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 870, 994, 933, 1004, 920, 930, 1145, 1145, 1145, 870, - /* 10 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, - /* 20 */ 870, 870, 870, 1052, 890, 1145, 870, 870, 870, 870, - /* 30 */ 870, 870, 870, 1067, 870, 930, 870, 870, 870, 870, - /* 40 */ 940, 930, 940, 940, 870, 1047, 978, 996, 870, 870, - /* 50 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, - /* 60 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, - /* 70 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, - /* 80 */ 870, 870, 870, 1054, 1060, 1057, 870, 870, 870, 1062, - /* 90 */ 870, 870, 870, 1086, 1086, 1045, 870, 870, 870, 870, - /* 100 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, - /* 110 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, - /* 120 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 918, - /* 130 */ 870, 916, 870, 870, 870, 870, 870, 870, 870, 870, - /* 140 */ 870, 870, 870, 870, 870, 870, 870, 870, 901, 870, - /* 150 */ 870, 870, 870, 870, 870, 888, 892, 892, 892, 870, - /* 160 */ 870, 870, 870, 892, 892, 1093, 1097, 1079, 1091, 1087, - /* 170 */ 1074, 1072, 1070, 1078, 1101, 892, 892, 892, 938, 938, - /* 180 */ 934, 930, 930, 892, 892, 956, 954, 952, 944, 950, - /* 190 */ 946, 948, 942, 921, 870, 892, 892, 928, 928, 892, - /* 200 */ 928, 892, 928, 892, 892, 978, 996, 870, 1102, 1092, - /* 210 */ 870, 1144, 1132, 1131, 870, 1140, 1139, 1138, 1130, 1129, - /* 220 */ 1128, 870, 870, 1124, 1127, 1126, 1125, 870, 870, 870, - /* 230 */ 870, 1134, 1133, 870, 870, 870, 870, 870, 870, 870, - /* 240 */ 870, 870, 870, 1098, 1094, 870, 870, 870, 870, 870, - /* 250 */ 870, 870, 870, 870, 1104, 870, 870, 870, 870, 870, - /* 260 */ 870, 870, 870, 870, 1006, 870, 870, 870, 870, 870, - /* 270 */ 870, 870, 870, 870, 870, 870, 870, 1044, 870, 870, - /* 280 */ 870, 870, 870, 1056, 1055, 870, 870, 870, 870, 870, - /* 290 */ 870, 870, 870, 870, 870, 870, 1088, 870, 1080, 870, - /* 300 */ 870, 1018, 870, 870, 870, 870, 870, 870, 870, 870, - /* 310 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, - /* 320 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, - /* 330 */ 870, 870, 870, 1163, 1158, 1159, 1156, 870, 870, 870, - /* 340 */ 1155, 1150, 1151, 870, 870, 870, 1148, 870, 870, 870, - /* 350 */ 870, 870, 870, 870, 870, 870, 870, 870, 870, 870, - /* 360 */ 870, 870, 962, 870, 899, 897, 870, 870, + /* 0 */ 866, 994, 933, 1004, 916, 866, 926, 1145, 1145, 1145, + /* 10 */ 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, + /* 20 */ 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, + /* 30 */ 866, 866, 866, 866, 866, 866, 1052, 886, 1145, 866, + /* 40 */ 866, 866, 866, 866, 866, 866, 866, 866, 866, 1067, + /* 50 */ 866, 926, 866, 866, 866, 866, 940, 926, 940, 940, + /* 60 */ 866, 1047, 978, 996, 866, 866, 866, 866, 866, 866, + /* 70 */ 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, + /* 80 */ 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, + /* 90 */ 866, 866, 866, 866, 866, 866, 866, 866, 1054, 1060, + /* 100 */ 1057, 866, 866, 866, 1062, 866, 866, 1086, 866, 1086, + /* 110 */ 1045, 866, 866, 866, 866, 866, 866, 866, 866, 866, + /* 120 */ 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, + /* 130 */ 866, 866, 866, 866, 866, 866, 866, 866, 866, 914, + /* 140 */ 866, 912, 866, 866, 866, 866, 866, 866, 866, 866, + /* 150 */ 866, 866, 866, 866, 897, 866, 884, 866, 866, 866, + /* 160 */ 866, 888, 888, 1093, 1097, 1079, 1091, 1087, 1074, 1072, + /* 170 */ 1070, 1078, 1101, 938, 938, 934, 926, 926, 956, 954, + /* 180 */ 952, 944, 950, 946, 948, 942, 917, 866, 924, 924, + /* 190 */ 924, 924, 978, 996, 866, 1102, 1092, 866, 1144, 1132, + /* 200 */ 1131, 866, 1140, 1139, 1138, 1130, 1129, 1128, 866, 866, + /* 210 */ 1124, 1127, 1126, 1125, 866, 866, 866, 866, 1134, 1133, + /* 220 */ 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, + /* 230 */ 1098, 1094, 866, 866, 866, 866, 866, 866, 866, 866, + /* 240 */ 866, 1104, 866, 866, 866, 866, 866, 866, 866, 866, + /* 250 */ 866, 1006, 866, 866, 866, 866, 866, 866, 866, 866, + /* 260 */ 866, 866, 866, 866, 1044, 866, 866, 866, 866, 866, + /* 270 */ 1056, 1055, 866, 866, 866, 866, 866, 866, 866, 866, + /* 280 */ 866, 866, 866, 1088, 866, 1080, 866, 866, 1018, 866, + /* 290 */ 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, + /* 300 */ 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, + /* 310 */ 866, 866, 866, 866, 866, 866, 866, 866, 866, 866, + /* 320 */ 1163, 1158, 1159, 1156, 866, 866, 866, 1155, 1150, 1151, + /* 330 */ 866, 866, 866, 1148, 866, 866, 866, 866, 866, 866, + /* 340 */ 866, 866, 866, 866, 866, 866, 866, 866, 866, 962, + /* 350 */ 866, 895, 893, 927, 866, 866, }; /********** End of lemon-generated parsing tables *****************************/ @@ -611,6 +611,7 @@ static const YYCODETYPE yyFallback[] = { 0, /* RP => nothing */ 0, /* IF => nothing */ 0, /* EXISTS => nothing */ + 0, /* ESCAPE => nothing */ 0, /* AS => nothing */ 0, /* OUTPUTTYPE => nothing */ 0, /* AGGREGATE => nothing */ @@ -895,196 +896,199 @@ static const char *const yyTokenName[] = { /* 85 */ "RP", /* 86 */ "IF", /* 87 */ "EXISTS", - /* 88 */ "AS", - /* 89 */ "OUTPUTTYPE", - /* 90 */ "AGGREGATE", - /* 91 */ "BUFSIZE", - /* 92 */ "PPS", - /* 93 */ "TSERIES", - /* 94 */ "DBS", - /* 95 */ "STORAGE", - /* 96 */ "QTIME", - /* 97 */ "CONNS", - /* 98 */ "STATE", - /* 99 */ "COMMA", - /* 100 */ "KEEP", - /* 101 */ "CACHE", - /* 102 */ "REPLICA", - /* 103 */ "QUORUM", - /* 104 */ "DAYS", - /* 105 */ "MINROWS", - /* 106 */ "MAXROWS", - /* 107 */ "BLOCKS", - /* 108 */ "CTIME", - /* 109 */ "WAL", - /* 110 */ "FSYNC", - /* 111 */ "COMP", - /* 112 */ "PRECISION", - /* 113 */ "UPDATE", - /* 114 */ "CACHELAST", - /* 115 */ "PARTITIONS", - /* 116 */ "UNSIGNED", - /* 117 */ "TAGS", - /* 118 */ "USING", - /* 119 */ "NULL", - /* 120 */ "NOW", - /* 121 */ "SELECT", - /* 122 */ "UNION", - /* 123 */ "ALL", - /* 124 */ "DISTINCT", - /* 125 */ "FROM", - /* 126 */ "VARIABLE", - /* 127 */ "INTERVAL", - /* 128 */ "EVERY", - /* 129 */ "SESSION", - /* 130 */ "STATE_WINDOW", - /* 131 */ "FILL", - /* 132 */ "SLIDING", - /* 133 */ "ORDER", - /* 134 */ "BY", - /* 135 */ "ASC", - /* 136 */ "GROUP", - /* 137 */ "HAVING", - /* 138 */ "LIMIT", - /* 139 */ "OFFSET", - /* 140 */ "SLIMIT", - /* 141 */ "SOFFSET", - /* 142 */ "WHERE", - /* 143 */ "RESET", - /* 144 */ "QUERY", - /* 145 */ "SYNCDB", - /* 146 */ "ADD", - /* 147 */ "COLUMN", - /* 148 */ "MODIFY", - /* 149 */ "TAG", - /* 150 */ "CHANGE", - /* 151 */ "SET", - /* 152 */ "KILL", - /* 153 */ "CONNECTION", - /* 154 */ "STREAM", - /* 155 */ "COLON", - /* 156 */ "ABORT", - /* 157 */ "AFTER", - /* 158 */ "ATTACH", - /* 159 */ "BEFORE", - /* 160 */ "BEGIN", - /* 161 */ "CASCADE", - /* 162 */ "CLUSTER", - /* 163 */ "CONFLICT", - /* 164 */ "COPY", - /* 165 */ "DEFERRED", - /* 166 */ "DELIMITERS", - /* 167 */ "DETACH", - /* 168 */ "EACH", - /* 169 */ "END", - /* 170 */ "EXPLAIN", - /* 171 */ "FAIL", - /* 172 */ "FOR", - /* 173 */ "IGNORE", - /* 174 */ "IMMEDIATE", - /* 175 */ "INITIALLY", - /* 176 */ "INSTEAD", - /* 177 */ "KEY", - /* 178 */ "OF", - /* 179 */ "RAISE", - /* 180 */ "REPLACE", - /* 181 */ "RESTRICT", - /* 182 */ "ROW", - /* 183 */ "STATEMENT", - /* 184 */ "TRIGGER", - /* 185 */ "VIEW", - /* 186 */ "IPTOKEN", - /* 187 */ "SEMI", - /* 188 */ "NONE", - /* 189 */ "PREV", - /* 190 */ "LINEAR", - /* 191 */ "IMPORT", - /* 192 */ "TBNAME", - /* 193 */ "JOIN", - /* 194 */ "INSERT", - /* 195 */ "INTO", - /* 196 */ "VALUES", - /* 197 */ "program", - /* 198 */ "cmd", - /* 199 */ "ids", - /* 200 */ "dbPrefix", - /* 201 */ "cpxName", - /* 202 */ "ifexists", - /* 203 */ "alter_db_optr", - /* 204 */ "alter_topic_optr", - /* 205 */ "acct_optr", - /* 206 */ "exprlist", - /* 207 */ "ifnotexists", - /* 208 */ "db_optr", - /* 209 */ "topic_optr", - /* 210 */ "typename", - /* 211 */ "bufsize", - /* 212 */ "pps", - /* 213 */ "tseries", - /* 214 */ "dbs", - /* 215 */ "streams", - /* 216 */ "storage", - /* 217 */ "qtime", - /* 218 */ "users", - /* 219 */ "conns", - /* 220 */ "state", - /* 221 */ "intitemlist", - /* 222 */ "intitem", - /* 223 */ "keep", - /* 224 */ "cache", - /* 225 */ "replica", - /* 226 */ "quorum", - /* 227 */ "days", - /* 228 */ "minrows", - /* 229 */ "maxrows", - /* 230 */ "blocks", - /* 231 */ "ctime", - /* 232 */ "wal", - /* 233 */ "fsync", - /* 234 */ "comp", - /* 235 */ "prec", - /* 236 */ "update", - /* 237 */ "cachelast", - /* 238 */ "partitions", - /* 239 */ "signed", - /* 240 */ "create_table_args", - /* 241 */ "create_stable_args", - /* 242 */ "create_table_list", - /* 243 */ "create_from_stable", - /* 244 */ "columnlist", - /* 245 */ "tagitemlist", - /* 246 */ "tagNamelist", - /* 247 */ "select", - /* 248 */ "column", - /* 249 */ "tagitem", - /* 250 */ "selcollist", - /* 251 */ "from", - /* 252 */ "where_opt", - /* 253 */ "interval_option", - /* 254 */ "sliding_opt", - /* 255 */ "session_option", - /* 256 */ "windowstate_option", - /* 257 */ "fill_opt", - /* 258 */ "groupby_opt", - /* 259 */ "having_opt", - /* 260 */ "orderby_opt", - /* 261 */ "slimit_opt", - /* 262 */ "limit_opt", - /* 263 */ "union", - /* 264 */ "sclp", - /* 265 */ "distinct", - /* 266 */ "expr", - /* 267 */ "as", - /* 268 */ "tablelist", - /* 269 */ "sub", - /* 270 */ "tmvar", - /* 271 */ "intervalKey", - /* 272 */ "sortlist", - /* 273 */ "sortitem", - /* 274 */ "item", - /* 275 */ "sortorder", - /* 276 */ "grouplist", - /* 277 */ "expritem", + /* 88 */ "ESCAPE", + /* 89 */ "AS", + /* 90 */ "OUTPUTTYPE", + /* 91 */ "AGGREGATE", + /* 92 */ "BUFSIZE", + /* 93 */ "PPS", + /* 94 */ "TSERIES", + /* 95 */ "DBS", + /* 96 */ "STORAGE", + /* 97 */ "QTIME", + /* 98 */ "CONNS", + /* 99 */ "STATE", + /* 100 */ "COMMA", + /* 101 */ "KEEP", + /* 102 */ "CACHE", + /* 103 */ "REPLICA", + /* 104 */ "QUORUM", + /* 105 */ "DAYS", + /* 106 */ "MINROWS", + /* 107 */ "MAXROWS", + /* 108 */ "BLOCKS", + /* 109 */ "CTIME", + /* 110 */ "WAL", + /* 111 */ "FSYNC", + /* 112 */ "COMP", + /* 113 */ "PRECISION", + /* 114 */ "UPDATE", + /* 115 */ "CACHELAST", + /* 116 */ "PARTITIONS", + /* 117 */ "UNSIGNED", + /* 118 */ "TAGS", + /* 119 */ "USING", + /* 120 */ "NULL", + /* 121 */ "NOW", + /* 122 */ "SELECT", + /* 123 */ "UNION", + /* 124 */ "ALL", + /* 125 */ "DISTINCT", + /* 126 */ "FROM", + /* 127 */ "VARIABLE", + /* 128 */ "INTERVAL", + /* 129 */ "EVERY", + /* 130 */ "SESSION", + /* 131 */ "STATE_WINDOW", + /* 132 */ "FILL", + /* 133 */ "SLIDING", + /* 134 */ "ORDER", + /* 135 */ "BY", + /* 136 */ "ASC", + /* 137 */ "GROUP", + /* 138 */ "HAVING", + /* 139 */ "LIMIT", + /* 140 */ "OFFSET", + /* 141 */ "SLIMIT", + /* 142 */ "SOFFSET", + /* 143 */ "WHERE", + /* 144 */ "RESET", + /* 145 */ "QUERY", + /* 146 */ "SYNCDB", + /* 147 */ "ADD", + /* 148 */ "COLUMN", + /* 149 */ "MODIFY", + /* 150 */ "TAG", + /* 151 */ "CHANGE", + /* 152 */ "SET", + /* 153 */ "KILL", + /* 154 */ "CONNECTION", + /* 155 */ "STREAM", + /* 156 */ "COLON", + /* 157 */ "ABORT", + /* 158 */ "AFTER", + /* 159 */ "ATTACH", + /* 160 */ "BEFORE", + /* 161 */ "BEGIN", + /* 162 */ "CASCADE", + /* 163 */ "CLUSTER", + /* 164 */ "CONFLICT", + /* 165 */ "COPY", + /* 166 */ "DEFERRED", + /* 167 */ "DELIMITERS", + /* 168 */ "DETACH", + /* 169 */ "EACH", + /* 170 */ "END", + /* 171 */ "EXPLAIN", + /* 172 */ "FAIL", + /* 173 */ "FOR", + /* 174 */ "IGNORE", + /* 175 */ "IMMEDIATE", + /* 176 */ "INITIALLY", + /* 177 */ "INSTEAD", + /* 178 */ "KEY", + /* 179 */ "OF", + /* 180 */ "RAISE", + /* 181 */ "REPLACE", + /* 182 */ "RESTRICT", + /* 183 */ "ROW", + /* 184 */ "STATEMENT", + /* 185 */ "TRIGGER", + /* 186 */ "VIEW", + /* 187 */ "IPTOKEN", + /* 188 */ "SEMI", + /* 189 */ "NONE", + /* 190 */ "PREV", + /* 191 */ "LINEAR", + /* 192 */ "IMPORT", + /* 193 */ "TBNAME", + /* 194 */ "JOIN", + /* 195 */ "INSERT", + /* 196 */ "INTO", + /* 197 */ "VALUES", + /* 198 */ "program", + /* 199 */ "cmd", + /* 200 */ "ids", + /* 201 */ "dbPrefix", + /* 202 */ "cpxName", + /* 203 */ "ftblname", + /* 204 */ "tblname", + /* 205 */ "ifexists", + /* 206 */ "alter_db_optr", + /* 207 */ "alter_topic_optr", + /* 208 */ "acct_optr", + /* 209 */ "exprlist", + /* 210 */ "ifnotexists", + /* 211 */ "db_optr", + /* 212 */ "topic_optr", + /* 213 */ "typename", + /* 214 */ "bufsize", + /* 215 */ "pps", + /* 216 */ "tseries", + /* 217 */ "dbs", + /* 218 */ "streams", + /* 219 */ "storage", + /* 220 */ "qtime", + /* 221 */ "users", + /* 222 */ "conns", + /* 223 */ "state", + /* 224 */ "intitemlist", + /* 225 */ "intitem", + /* 226 */ "keep", + /* 227 */ "cache", + /* 228 */ "replica", + /* 229 */ "quorum", + /* 230 */ "days", + /* 231 */ "minrows", + /* 232 */ "maxrows", + /* 233 */ "blocks", + /* 234 */ "ctime", + /* 235 */ "wal", + /* 236 */ "fsync", + /* 237 */ "comp", + /* 238 */ "prec", + /* 239 */ "update", + /* 240 */ "cachelast", + /* 241 */ "partitions", + /* 242 */ "signed", + /* 243 */ "create_table_args", + /* 244 */ "create_stable_args", + /* 245 */ "create_table_list", + /* 246 */ "create_from_stable", + /* 247 */ "columnlist", + /* 248 */ "tagitemlist", + /* 249 */ "tagNamelist", + /* 250 */ "select", + /* 251 */ "column", + /* 252 */ "tagitem", + /* 253 */ "selcollist", + /* 254 */ "from", + /* 255 */ "where_opt", + /* 256 */ "interval_option", + /* 257 */ "sliding_opt", + /* 258 */ "session_option", + /* 259 */ "windowstate_option", + /* 260 */ "fill_opt", + /* 261 */ "groupby_opt", + /* 262 */ "having_opt", + /* 263 */ "orderby_opt", + /* 264 */ "slimit_opt", + /* 265 */ "limit_opt", + /* 266 */ "union", + /* 267 */ "sclp", + /* 268 */ "distinct", + /* 269 */ "expr", + /* 270 */ "as", + /* 271 */ "tablelist", + /* 272 */ "sub", + /* 273 */ "tmvar", + /* 274 */ "intervalKey", + /* 275 */ "sortlist", + /* 276 */ "sortitem", + /* 277 */ "item", + /* 278 */ "sortorder", + /* 279 */ "grouplist", + /* 280 */ "expritem", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -1113,17 +1117,17 @@ static const char *const yyRuleName[] = { /* 18 */ "dbPrefix ::= ids DOT", /* 19 */ "cpxName ::=", /* 20 */ "cpxName ::= DOT ids", - /* 21 */ "cmd ::= SHOW CREATE TABLE ids cpxName", - /* 22 */ "cmd ::= SHOW CREATE STABLE ids cpxName", + /* 21 */ "cmd ::= SHOW CREATE TABLE ftblname", + /* 22 */ "cmd ::= SHOW CREATE STABLE ftblname", /* 23 */ "cmd ::= SHOW CREATE DATABASE ids", /* 24 */ "cmd ::= SHOW dbPrefix TABLES", - /* 25 */ "cmd ::= SHOW dbPrefix TABLES LIKE ids", + /* 25 */ "cmd ::= SHOW dbPrefix TABLES LIKE tblname", /* 26 */ "cmd ::= SHOW dbPrefix STABLES", - /* 27 */ "cmd ::= SHOW dbPrefix STABLES LIKE ids", + /* 27 */ "cmd ::= SHOW dbPrefix STABLES LIKE tblname", /* 28 */ "cmd ::= SHOW dbPrefix VGROUPS", /* 29 */ "cmd ::= SHOW dbPrefix VGROUPS ids", - /* 30 */ "cmd ::= DROP TABLE ifexists ids cpxName", - /* 31 */ "cmd ::= DROP STABLE ifexists ids cpxName", + /* 30 */ "cmd ::= DROP TABLE ifexists ftblname", + /* 31 */ "cmd ::= DROP STABLE ifexists ftblname", /* 32 */ "cmd ::= DROP DATABASE ifexists ids", /* 33 */ "cmd ::= DROP TOPIC ifexists ids", /* 34 */ "cmd ::= DROP FUNCTION ids", @@ -1131,8 +1135,8 @@ static const char *const yyRuleName[] = { /* 36 */ "cmd ::= DROP USER ids", /* 37 */ "cmd ::= DROP ACCOUNT ids", /* 38 */ "cmd ::= USE ids", - /* 39 */ "cmd ::= DESCRIBE ids cpxName", - /* 40 */ "cmd ::= DESC ids cpxName", + /* 39 */ "cmd ::= DESCRIBE ftblname", + /* 40 */ "cmd ::= DESC ftblname", /* 41 */ "cmd ::= ALTER USER ids PASS ids", /* 42 */ "cmd ::= ALTER USER ids PRIVILEGE ids", /* 43 */ "cmd ::= ALTER DNODE ids ids", @@ -1150,242 +1154,246 @@ static const char *const yyRuleName[] = { /* 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 */ "bufsize ::=", - /* 66 */ "bufsize ::= BUFSIZE INTEGER", - /* 67 */ "pps ::=", - /* 68 */ "pps ::= PPS INTEGER", - /* 69 */ "tseries ::=", - /* 70 */ "tseries ::= TSERIES INTEGER", - /* 71 */ "dbs ::=", - /* 72 */ "dbs ::= DBS INTEGER", - /* 73 */ "streams ::=", - /* 74 */ "streams ::= STREAMS INTEGER", - /* 75 */ "storage ::=", - /* 76 */ "storage ::= STORAGE INTEGER", - /* 77 */ "qtime ::=", - /* 78 */ "qtime ::= QTIME INTEGER", - /* 79 */ "users ::=", - /* 80 */ "users ::= USERS INTEGER", - /* 81 */ "conns ::=", - /* 82 */ "conns ::= CONNS INTEGER", - /* 83 */ "state ::=", - /* 84 */ "state ::= STATE ids", - /* 85 */ "acct_optr ::= pps tseries storage streams qtime dbs users conns state", - /* 86 */ "intitemlist ::= intitemlist COMMA intitem", - /* 87 */ "intitemlist ::= intitem", - /* 88 */ "intitem ::= INTEGER", - /* 89 */ "keep ::= KEEP intitemlist", - /* 90 */ "cache ::= CACHE INTEGER", - /* 91 */ "replica ::= REPLICA INTEGER", - /* 92 */ "quorum ::= QUORUM INTEGER", - /* 93 */ "days ::= DAYS INTEGER", - /* 94 */ "minrows ::= MINROWS INTEGER", - /* 95 */ "maxrows ::= MAXROWS INTEGER", - /* 96 */ "blocks ::= BLOCKS INTEGER", - /* 97 */ "ctime ::= CTIME INTEGER", - /* 98 */ "wal ::= WAL INTEGER", - /* 99 */ "fsync ::= FSYNC INTEGER", - /* 100 */ "comp ::= COMP INTEGER", - /* 101 */ "prec ::= PRECISION STRING", - /* 102 */ "update ::= UPDATE INTEGER", - /* 103 */ "cachelast ::= CACHELAST INTEGER", - /* 104 */ "partitions ::= PARTITIONS INTEGER", - /* 105 */ "db_optr ::=", - /* 106 */ "db_optr ::= db_optr cache", - /* 107 */ "db_optr ::= db_optr replica", - /* 108 */ "db_optr ::= db_optr quorum", - /* 109 */ "db_optr ::= db_optr days", - /* 110 */ "db_optr ::= db_optr minrows", - /* 111 */ "db_optr ::= db_optr maxrows", - /* 112 */ "db_optr ::= db_optr blocks", - /* 113 */ "db_optr ::= db_optr ctime", - /* 114 */ "db_optr ::= db_optr wal", - /* 115 */ "db_optr ::= db_optr fsync", - /* 116 */ "db_optr ::= db_optr comp", - /* 117 */ "db_optr ::= db_optr prec", - /* 118 */ "db_optr ::= db_optr keep", - /* 119 */ "db_optr ::= db_optr update", - /* 120 */ "db_optr ::= db_optr cachelast", - /* 121 */ "topic_optr ::= db_optr", - /* 122 */ "topic_optr ::= topic_optr partitions", - /* 123 */ "alter_db_optr ::=", - /* 124 */ "alter_db_optr ::= alter_db_optr replica", - /* 125 */ "alter_db_optr ::= alter_db_optr quorum", - /* 126 */ "alter_db_optr ::= alter_db_optr keep", - /* 127 */ "alter_db_optr ::= alter_db_optr blocks", - /* 128 */ "alter_db_optr ::= alter_db_optr comp", - /* 129 */ "alter_db_optr ::= alter_db_optr update", - /* 130 */ "alter_db_optr ::= alter_db_optr cachelast", - /* 131 */ "alter_topic_optr ::= alter_db_optr", - /* 132 */ "alter_topic_optr ::= alter_topic_optr partitions", - /* 133 */ "typename ::= ids", - /* 134 */ "typename ::= ids LP signed RP", - /* 135 */ "typename ::= ids UNSIGNED", - /* 136 */ "signed ::= INTEGER", - /* 137 */ "signed ::= PLUS INTEGER", - /* 138 */ "signed ::= MINUS INTEGER", - /* 139 */ "cmd ::= CREATE TABLE create_table_args", - /* 140 */ "cmd ::= CREATE TABLE create_stable_args", - /* 141 */ "cmd ::= CREATE STABLE create_stable_args", - /* 142 */ "cmd ::= CREATE TABLE create_table_list", - /* 143 */ "create_table_list ::= create_from_stable", - /* 144 */ "create_table_list ::= create_table_list create_from_stable", - /* 145 */ "create_table_args ::= ifnotexists ids cpxName LP columnlist RP", - /* 146 */ "create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP", - /* 147 */ "create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP", - /* 148 */ "create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP", - /* 149 */ "tagNamelist ::= tagNamelist COMMA ids", - /* 150 */ "tagNamelist ::= ids", - /* 151 */ "create_table_args ::= ifnotexists ids cpxName AS select", - /* 152 */ "columnlist ::= columnlist COMMA column", - /* 153 */ "columnlist ::= column", - /* 154 */ "column ::= ids typename", - /* 155 */ "tagitemlist ::= tagitemlist COMMA tagitem", - /* 156 */ "tagitemlist ::= tagitem", - /* 157 */ "tagitem ::= INTEGER", - /* 158 */ "tagitem ::= FLOAT", - /* 159 */ "tagitem ::= STRING", - /* 160 */ "tagitem ::= BOOL", - /* 161 */ "tagitem ::= NULL", - /* 162 */ "tagitem ::= NOW", - /* 163 */ "tagitem ::= MINUS INTEGER", - /* 164 */ "tagitem ::= MINUS FLOAT", - /* 165 */ "tagitem ::= PLUS INTEGER", - /* 166 */ "tagitem ::= PLUS FLOAT", - /* 167 */ "select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt", - /* 168 */ "select ::= LP select RP", - /* 169 */ "union ::= select", - /* 170 */ "union ::= union UNION ALL select", - /* 171 */ "cmd ::= union", - /* 172 */ "select ::= SELECT selcollist", - /* 173 */ "sclp ::= selcollist COMMA", - /* 174 */ "sclp ::=", - /* 175 */ "selcollist ::= sclp distinct expr as", - /* 176 */ "selcollist ::= sclp STAR", - /* 177 */ "as ::= AS ids", - /* 178 */ "as ::= ids", - /* 179 */ "as ::=", - /* 180 */ "distinct ::= DISTINCT", - /* 181 */ "distinct ::=", - /* 182 */ "from ::= FROM tablelist", - /* 183 */ "from ::= FROM sub", - /* 184 */ "sub ::= LP union RP", - /* 185 */ "sub ::= LP union RP ids", - /* 186 */ "sub ::= sub COMMA LP union RP ids", - /* 187 */ "tablelist ::= ids cpxName", - /* 188 */ "tablelist ::= ids cpxName ids", - /* 189 */ "tablelist ::= tablelist COMMA ids cpxName", - /* 190 */ "tablelist ::= tablelist COMMA ids cpxName ids", - /* 191 */ "tmvar ::= VARIABLE", - /* 192 */ "interval_option ::= intervalKey LP tmvar RP", - /* 193 */ "interval_option ::= intervalKey LP tmvar COMMA tmvar RP", - /* 194 */ "interval_option ::=", - /* 195 */ "intervalKey ::= INTERVAL", - /* 196 */ "intervalKey ::= EVERY", - /* 197 */ "session_option ::=", - /* 198 */ "session_option ::= SESSION LP ids cpxName COMMA tmvar RP", - /* 199 */ "windowstate_option ::=", - /* 200 */ "windowstate_option ::= STATE_WINDOW LP ids RP", - /* 201 */ "fill_opt ::=", - /* 202 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP", - /* 203 */ "fill_opt ::= FILL LP ID RP", - /* 204 */ "sliding_opt ::= SLIDING LP tmvar RP", - /* 205 */ "sliding_opt ::=", - /* 206 */ "orderby_opt ::=", - /* 207 */ "orderby_opt ::= ORDER BY sortlist", - /* 208 */ "sortlist ::= sortlist COMMA item sortorder", - /* 209 */ "sortlist ::= item sortorder", - /* 210 */ "item ::= ids cpxName", - /* 211 */ "sortorder ::= ASC", - /* 212 */ "sortorder ::= DESC", - /* 213 */ "sortorder ::=", - /* 214 */ "groupby_opt ::=", - /* 215 */ "groupby_opt ::= GROUP BY grouplist", - /* 216 */ "grouplist ::= grouplist COMMA item", - /* 217 */ "grouplist ::= item", - /* 218 */ "having_opt ::=", - /* 219 */ "having_opt ::= HAVING expr", - /* 220 */ "limit_opt ::=", - /* 221 */ "limit_opt ::= LIMIT signed", - /* 222 */ "limit_opt ::= LIMIT signed OFFSET signed", - /* 223 */ "limit_opt ::= LIMIT signed COMMA signed", - /* 224 */ "slimit_opt ::=", - /* 225 */ "slimit_opt ::= SLIMIT signed", - /* 226 */ "slimit_opt ::= SLIMIT signed SOFFSET signed", - /* 227 */ "slimit_opt ::= SLIMIT signed COMMA signed", - /* 228 */ "where_opt ::=", - /* 229 */ "where_opt ::= WHERE expr", - /* 230 */ "expr ::= LP expr RP", - /* 231 */ "expr ::= ID", - /* 232 */ "expr ::= ID DOT ID", - /* 233 */ "expr ::= ID DOT STAR", - /* 234 */ "expr ::= INTEGER", - /* 235 */ "expr ::= MINUS INTEGER", - /* 236 */ "expr ::= PLUS INTEGER", - /* 237 */ "expr ::= FLOAT", - /* 238 */ "expr ::= MINUS FLOAT", - /* 239 */ "expr ::= PLUS FLOAT", - /* 240 */ "expr ::= STRING", - /* 241 */ "expr ::= NOW", - /* 242 */ "expr ::= VARIABLE", - /* 243 */ "expr ::= PLUS VARIABLE", - /* 244 */ "expr ::= MINUS VARIABLE", - /* 245 */ "expr ::= BOOL", - /* 246 */ "expr ::= NULL", - /* 247 */ "expr ::= ID LP exprlist RP", - /* 248 */ "expr ::= ID LP STAR RP", - /* 249 */ "expr ::= expr IS NULL", - /* 250 */ "expr ::= expr IS NOT NULL", - /* 251 */ "expr ::= expr LT expr", - /* 252 */ "expr ::= expr GT expr", - /* 253 */ "expr ::= expr LE expr", - /* 254 */ "expr ::= expr GE expr", - /* 255 */ "expr ::= expr NE expr", - /* 256 */ "expr ::= expr EQ expr", - /* 257 */ "expr ::= expr BETWEEN expr AND expr", - /* 258 */ "expr ::= expr AND expr", - /* 259 */ "expr ::= expr OR expr", - /* 260 */ "expr ::= expr PLUS expr", - /* 261 */ "expr ::= expr MINUS expr", - /* 262 */ "expr ::= expr STAR expr", - /* 263 */ "expr ::= expr SLASH expr", - /* 264 */ "expr ::= expr REM expr", - /* 265 */ "expr ::= expr LIKE expr", - /* 266 */ "expr ::= expr MATCH expr", - /* 267 */ "expr ::= expr NMATCH expr", - /* 268 */ "expr ::= expr IN LP exprlist RP", - /* 269 */ "exprlist ::= exprlist COMMA expritem", - /* 270 */ "exprlist ::= expritem", - /* 271 */ "expritem ::= expr", - /* 272 */ "expritem ::=", - /* 273 */ "cmd ::= RESET QUERY CACHE", - /* 274 */ "cmd ::= SYNCDB ids REPLICA", - /* 275 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", - /* 276 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", - /* 277 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist", - /* 278 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", - /* 279 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", - /* 280 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", - /* 281 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", - /* 282 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist", - /* 283 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", - /* 284 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", - /* 285 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist", - /* 286 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", - /* 287 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", - /* 288 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", - /* 289 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem", - /* 290 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist", - /* 291 */ "cmd ::= KILL CONNECTION INTEGER", - /* 292 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", - /* 293 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", + /* 58 */ "tblname ::= ids", + /* 59 */ "tblname ::= ESCAPE", + /* 60 */ "ftblname ::= tblname", + /* 61 */ "ftblname ::= ids DOT tblname", + /* 62 */ "cmd ::= CREATE DNODE ids", + /* 63 */ "cmd ::= CREATE ACCOUNT ids PASS ids acct_optr", + /* 64 */ "cmd ::= CREATE DATABASE ifnotexists ids db_optr", + /* 65 */ "cmd ::= CREATE TOPIC ifnotexists ids topic_optr", + /* 66 */ "cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize", + /* 67 */ "cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize", + /* 68 */ "cmd ::= CREATE USER ids PASS ids", + /* 69 */ "bufsize ::=", + /* 70 */ "bufsize ::= BUFSIZE INTEGER", + /* 71 */ "pps ::=", + /* 72 */ "pps ::= PPS INTEGER", + /* 73 */ "tseries ::=", + /* 74 */ "tseries ::= TSERIES INTEGER", + /* 75 */ "dbs ::=", + /* 76 */ "dbs ::= DBS INTEGER", + /* 77 */ "streams ::=", + /* 78 */ "streams ::= STREAMS INTEGER", + /* 79 */ "storage ::=", + /* 80 */ "storage ::= STORAGE INTEGER", + /* 81 */ "qtime ::=", + /* 82 */ "qtime ::= QTIME INTEGER", + /* 83 */ "users ::=", + /* 84 */ "users ::= USERS INTEGER", + /* 85 */ "conns ::=", + /* 86 */ "conns ::= CONNS INTEGER", + /* 87 */ "state ::=", + /* 88 */ "state ::= STATE ids", + /* 89 */ "acct_optr ::= pps tseries storage streams qtime dbs users conns state", + /* 90 */ "intitemlist ::= intitemlist COMMA intitem", + /* 91 */ "intitemlist ::= intitem", + /* 92 */ "intitem ::= INTEGER", + /* 93 */ "keep ::= KEEP intitemlist", + /* 94 */ "cache ::= CACHE INTEGER", + /* 95 */ "replica ::= REPLICA INTEGER", + /* 96 */ "quorum ::= QUORUM INTEGER", + /* 97 */ "days ::= DAYS INTEGER", + /* 98 */ "minrows ::= MINROWS INTEGER", + /* 99 */ "maxrows ::= MAXROWS INTEGER", + /* 100 */ "blocks ::= BLOCKS INTEGER", + /* 101 */ "ctime ::= CTIME INTEGER", + /* 102 */ "wal ::= WAL INTEGER", + /* 103 */ "fsync ::= FSYNC INTEGER", + /* 104 */ "comp ::= COMP INTEGER", + /* 105 */ "prec ::= PRECISION STRING", + /* 106 */ "update ::= UPDATE INTEGER", + /* 107 */ "cachelast ::= CACHELAST INTEGER", + /* 108 */ "partitions ::= PARTITIONS INTEGER", + /* 109 */ "db_optr ::=", + /* 110 */ "db_optr ::= db_optr cache", + /* 111 */ "db_optr ::= db_optr replica", + /* 112 */ "db_optr ::= db_optr quorum", + /* 113 */ "db_optr ::= db_optr days", + /* 114 */ "db_optr ::= db_optr minrows", + /* 115 */ "db_optr ::= db_optr maxrows", + /* 116 */ "db_optr ::= db_optr blocks", + /* 117 */ "db_optr ::= db_optr ctime", + /* 118 */ "db_optr ::= db_optr wal", + /* 119 */ "db_optr ::= db_optr fsync", + /* 120 */ "db_optr ::= db_optr comp", + /* 121 */ "db_optr ::= db_optr prec", + /* 122 */ "db_optr ::= db_optr keep", + /* 123 */ "db_optr ::= db_optr update", + /* 124 */ "db_optr ::= db_optr cachelast", + /* 125 */ "topic_optr ::= db_optr", + /* 126 */ "topic_optr ::= topic_optr partitions", + /* 127 */ "alter_db_optr ::=", + /* 128 */ "alter_db_optr ::= alter_db_optr replica", + /* 129 */ "alter_db_optr ::= alter_db_optr quorum", + /* 130 */ "alter_db_optr ::= alter_db_optr keep", + /* 131 */ "alter_db_optr ::= alter_db_optr blocks", + /* 132 */ "alter_db_optr ::= alter_db_optr comp", + /* 133 */ "alter_db_optr ::= alter_db_optr update", + /* 134 */ "alter_db_optr ::= alter_db_optr cachelast", + /* 135 */ "alter_topic_optr ::= alter_db_optr", + /* 136 */ "alter_topic_optr ::= alter_topic_optr partitions", + /* 137 */ "typename ::= ids", + /* 138 */ "typename ::= ids LP signed RP", + /* 139 */ "typename ::= ids UNSIGNED", + /* 140 */ "signed ::= INTEGER", + /* 141 */ "signed ::= PLUS INTEGER", + /* 142 */ "signed ::= MINUS INTEGER", + /* 143 */ "cmd ::= CREATE TABLE create_table_args", + /* 144 */ "cmd ::= CREATE TABLE create_stable_args", + /* 145 */ "cmd ::= CREATE STABLE create_stable_args", + /* 146 */ "cmd ::= CREATE TABLE create_table_list", + /* 147 */ "create_table_list ::= create_from_stable", + /* 148 */ "create_table_list ::= create_table_list create_from_stable", + /* 149 */ "create_table_args ::= ifnotexists ftblname LP columnlist RP", + /* 150 */ "create_stable_args ::= ifnotexists ftblname LP columnlist RP TAGS LP columnlist RP", + /* 151 */ "create_from_stable ::= ifnotexists ftblname USING ftblname TAGS LP tagitemlist RP", + /* 152 */ "create_from_stable ::= ifnotexists ftblname USING ftblname LP tagNamelist RP TAGS LP tagitemlist RP", + /* 153 */ "tagNamelist ::= tagNamelist COMMA ids", + /* 154 */ "tagNamelist ::= ids", + /* 155 */ "create_table_args ::= ifnotexists ftblname AS select", + /* 156 */ "columnlist ::= columnlist COMMA column", + /* 157 */ "columnlist ::= column", + /* 158 */ "column ::= ids typename", + /* 159 */ "tagitemlist ::= tagitemlist COMMA tagitem", + /* 160 */ "tagitemlist ::= tagitem", + /* 161 */ "tagitem ::= INTEGER", + /* 162 */ "tagitem ::= FLOAT", + /* 163 */ "tagitem ::= STRING", + /* 164 */ "tagitem ::= BOOL", + /* 165 */ "tagitem ::= NULL", + /* 166 */ "tagitem ::= NOW", + /* 167 */ "tagitem ::= MINUS INTEGER", + /* 168 */ "tagitem ::= MINUS FLOAT", + /* 169 */ "tagitem ::= PLUS INTEGER", + /* 170 */ "tagitem ::= PLUS FLOAT", + /* 171 */ "select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt", + /* 172 */ "select ::= LP select RP", + /* 173 */ "union ::= select", + /* 174 */ "union ::= union UNION ALL select", + /* 175 */ "cmd ::= union", + /* 176 */ "select ::= SELECT selcollist", + /* 177 */ "sclp ::= selcollist COMMA", + /* 178 */ "sclp ::=", + /* 179 */ "selcollist ::= sclp distinct expr as", + /* 180 */ "selcollist ::= sclp STAR", + /* 181 */ "as ::= AS ids", + /* 182 */ "as ::= ids", + /* 183 */ "as ::=", + /* 184 */ "distinct ::= DISTINCT", + /* 185 */ "distinct ::=", + /* 186 */ "from ::= FROM tablelist", + /* 187 */ "from ::= FROM sub", + /* 188 */ "sub ::= LP union RP", + /* 189 */ "sub ::= LP union RP ids", + /* 190 */ "sub ::= sub COMMA LP union RP ids", + /* 191 */ "tablelist ::= ftblname", + /* 192 */ "tablelist ::= ftblname ids", + /* 193 */ "tablelist ::= tablelist COMMA ftblname", + /* 194 */ "tablelist ::= tablelist COMMA ftblname ids", + /* 195 */ "tmvar ::= VARIABLE", + /* 196 */ "interval_option ::= intervalKey LP tmvar RP", + /* 197 */ "interval_option ::= intervalKey LP tmvar COMMA tmvar RP", + /* 198 */ "interval_option ::=", + /* 199 */ "intervalKey ::= INTERVAL", + /* 200 */ "intervalKey ::= EVERY", + /* 201 */ "session_option ::=", + /* 202 */ "session_option ::= SESSION LP ids cpxName COMMA tmvar RP", + /* 203 */ "windowstate_option ::=", + /* 204 */ "windowstate_option ::= STATE_WINDOW LP ids RP", + /* 205 */ "fill_opt ::=", + /* 206 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP", + /* 207 */ "fill_opt ::= FILL LP ID RP", + /* 208 */ "sliding_opt ::= SLIDING LP tmvar RP", + /* 209 */ "sliding_opt ::=", + /* 210 */ "orderby_opt ::=", + /* 211 */ "orderby_opt ::= ORDER BY sortlist", + /* 212 */ "sortlist ::= sortlist COMMA item sortorder", + /* 213 */ "sortlist ::= item sortorder", + /* 214 */ "item ::= ids cpxName", + /* 215 */ "sortorder ::= ASC", + /* 216 */ "sortorder ::= DESC", + /* 217 */ "sortorder ::=", + /* 218 */ "groupby_opt ::=", + /* 219 */ "groupby_opt ::= GROUP BY grouplist", + /* 220 */ "grouplist ::= grouplist COMMA item", + /* 221 */ "grouplist ::= item", + /* 222 */ "having_opt ::=", + /* 223 */ "having_opt ::= HAVING expr", + /* 224 */ "limit_opt ::=", + /* 225 */ "limit_opt ::= LIMIT signed", + /* 226 */ "limit_opt ::= LIMIT signed OFFSET signed", + /* 227 */ "limit_opt ::= LIMIT signed COMMA signed", + /* 228 */ "slimit_opt ::=", + /* 229 */ "slimit_opt ::= SLIMIT signed", + /* 230 */ "slimit_opt ::= SLIMIT signed SOFFSET signed", + /* 231 */ "slimit_opt ::= SLIMIT signed COMMA signed", + /* 232 */ "where_opt ::=", + /* 233 */ "where_opt ::= WHERE expr", + /* 234 */ "expr ::= LP expr RP", + /* 235 */ "expr ::= ID", + /* 236 */ "expr ::= ID DOT ID", + /* 237 */ "expr ::= ID DOT STAR", + /* 238 */ "expr ::= INTEGER", + /* 239 */ "expr ::= MINUS INTEGER", + /* 240 */ "expr ::= PLUS INTEGER", + /* 241 */ "expr ::= FLOAT", + /* 242 */ "expr ::= MINUS FLOAT", + /* 243 */ "expr ::= PLUS FLOAT", + /* 244 */ "expr ::= STRING", + /* 245 */ "expr ::= NOW", + /* 246 */ "expr ::= VARIABLE", + /* 247 */ "expr ::= PLUS VARIABLE", + /* 248 */ "expr ::= MINUS VARIABLE", + /* 249 */ "expr ::= BOOL", + /* 250 */ "expr ::= NULL", + /* 251 */ "expr ::= ID LP exprlist RP", + /* 252 */ "expr ::= ID LP STAR RP", + /* 253 */ "expr ::= expr IS NULL", + /* 254 */ "expr ::= expr IS NOT NULL", + /* 255 */ "expr ::= expr LT expr", + /* 256 */ "expr ::= expr GT expr", + /* 257 */ "expr ::= expr LE expr", + /* 258 */ "expr ::= expr GE expr", + /* 259 */ "expr ::= expr NE expr", + /* 260 */ "expr ::= expr EQ expr", + /* 261 */ "expr ::= expr BETWEEN expr AND expr", + /* 262 */ "expr ::= expr AND expr", + /* 263 */ "expr ::= expr OR expr", + /* 264 */ "expr ::= expr PLUS expr", + /* 265 */ "expr ::= expr MINUS expr", + /* 266 */ "expr ::= expr STAR expr", + /* 267 */ "expr ::= expr SLASH expr", + /* 268 */ "expr ::= expr REM expr", + /* 269 */ "expr ::= expr LIKE expr", + /* 270 */ "expr ::= expr MATCH expr", + /* 271 */ "expr ::= expr NMATCH expr", + /* 272 */ "expr ::= expr IN LP exprlist RP", + /* 273 */ "exprlist ::= exprlist COMMA expritem", + /* 274 */ "exprlist ::= expritem", + /* 275 */ "expritem ::= expr", + /* 276 */ "expritem ::=", + /* 277 */ "cmd ::= RESET QUERY CACHE", + /* 278 */ "cmd ::= SYNCDB ids REPLICA", + /* 279 */ "cmd ::= ALTER TABLE ftblname ADD COLUMN columnlist", + /* 280 */ "cmd ::= ALTER TABLE ftblname DROP COLUMN ids", + /* 281 */ "cmd ::= ALTER TABLE ftblname MODIFY COLUMN columnlist", + /* 282 */ "cmd ::= ALTER TABLE ftblname ADD TAG columnlist", + /* 283 */ "cmd ::= ALTER TABLE ftblname DROP TAG ids", + /* 284 */ "cmd ::= ALTER TABLE ftblname CHANGE TAG ids ids", + /* 285 */ "cmd ::= ALTER TABLE ftblname SET TAG ids EQ tagitem", + /* 286 */ "cmd ::= ALTER TABLE ftblname MODIFY TAG columnlist", + /* 287 */ "cmd ::= ALTER STABLE ftblname ADD COLUMN columnlist", + /* 288 */ "cmd ::= ALTER STABLE ftblname DROP COLUMN ids", + /* 289 */ "cmd ::= ALTER STABLE ftblname MODIFY COLUMN columnlist", + /* 290 */ "cmd ::= ALTER STABLE ftblname ADD TAG columnlist", + /* 291 */ "cmd ::= ALTER STABLE ftblname DROP TAG ids", + /* 292 */ "cmd ::= ALTER STABLE ftblname CHANGE TAG ids ids", + /* 293 */ "cmd ::= ALTER STABLE ftblname SET TAG ids EQ tagitem", + /* 294 */ "cmd ::= ALTER STABLE ftblname MODIFY TAG columnlist", + /* 295 */ "cmd ::= KILL CONNECTION INTEGER", + /* 296 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", + /* 297 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", }; #endif /* NDEBUG */ @@ -1511,76 +1519,60 @@ static void yy_destructor( ** inside the C code. */ /********* Begin destructor definitions ***************************************/ - case 206: /* exprlist */ - case 250: /* selcollist */ - case 264: /* sclp */ + case 209: /* exprlist */ + case 253: /* selcollist */ + case 267: /* sclp */ { -#line 762 "sql.y" -tSqlExprListDestroy((yypminor->yy421)); -#line 1521 "sql.c" +tSqlExprListDestroy((yypminor->yy247)); } break; - case 221: /* intitemlist */ - case 223: /* keep */ - case 244: /* columnlist */ - case 245: /* tagitemlist */ - case 246: /* tagNamelist */ - case 257: /* fill_opt */ - case 258: /* groupby_opt */ - case 260: /* orderby_opt */ - case 272: /* sortlist */ - case 276: /* grouplist */ -{ -#line 256 "sql.y" -taosArrayDestroy((yypminor->yy421)); -#line 1537 "sql.c" + case 224: /* intitemlist */ + case 226: /* keep */ + case 247: /* columnlist */ + case 248: /* tagitemlist */ + case 249: /* tagNamelist */ + case 260: /* fill_opt */ + case 261: /* groupby_opt */ + case 263: /* orderby_opt */ + case 275: /* sortlist */ + case 279: /* grouplist */ +{ +taosArrayDestroy((yypminor->yy247)); } break; - case 242: /* create_table_list */ + case 245: /* create_table_list */ { -#line 364 "sql.y" -destroyCreateTableSql((yypminor->yy438)); -#line 1544 "sql.c" +destroyCreateTableSql((yypminor->yy336)); } break; - case 247: /* select */ + case 250: /* select */ { -#line 484 "sql.y" -destroySqlNode((yypminor->yy56)); -#line 1551 "sql.c" +destroySqlNode((yypminor->yy246)); } break; - case 251: /* from */ - case 268: /* tablelist */ - case 269: /* sub */ + case 254: /* from */ + case 271: /* tablelist */ + case 272: /* sub */ { -#line 539 "sql.y" -destroyRelationInfo((yypminor->yy8)); -#line 1560 "sql.c" +destroyRelationInfo((yypminor->yy46)); } break; - case 252: /* where_opt */ - case 259: /* having_opt */ - case 266: /* expr */ - case 277: /* expritem */ + case 255: /* where_opt */ + case 262: /* having_opt */ + case 269: /* expr */ + case 280: /* expritem */ { -#line 691 "sql.y" -tSqlExprDestroy((yypminor->yy439)); -#line 1570 "sql.c" +tSqlExprDestroy((yypminor->yy44)); } break; - case 263: /* union */ + case 266: /* union */ { -#line 492 "sql.y" -destroyAllSqlNode((yypminor->yy421)); -#line 1577 "sql.c" +destroyAllSqlNode((yypminor->yy247)); } break; - case 273: /* sortitem */ + case 276: /* sortitem */ { -#line 624 "sql.y" -tVariantDestroy(&(yypminor->yy430)); -#line 1584 "sql.c" +tVariantDestroy(&(yypminor->yy378)); } break; /********* End destructor definitions *****************************************/ @@ -1869,300 +1861,304 @@ static void yy_shift( /* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side ** of that rule */ static const YYCODETYPE yyRuleInfoLhs[] = { - 197, /* (0) program ::= cmd */ - 198, /* (1) cmd ::= SHOW DATABASES */ - 198, /* (2) cmd ::= SHOW TOPICS */ - 198, /* (3) cmd ::= SHOW FUNCTIONS */ - 198, /* (4) cmd ::= SHOW MNODES */ - 198, /* (5) cmd ::= SHOW DNODES */ - 198, /* (6) cmd ::= SHOW ACCOUNTS */ - 198, /* (7) cmd ::= SHOW USERS */ - 198, /* (8) cmd ::= SHOW MODULES */ - 198, /* (9) cmd ::= SHOW QUERIES */ - 198, /* (10) cmd ::= SHOW CONNECTIONS */ - 198, /* (11) cmd ::= SHOW STREAMS */ - 198, /* (12) cmd ::= SHOW VARIABLES */ - 198, /* (13) cmd ::= SHOW SCORES */ - 198, /* (14) cmd ::= SHOW GRANTS */ - 198, /* (15) cmd ::= SHOW VNODES */ - 198, /* (16) cmd ::= SHOW VNODES ids */ - 200, /* (17) dbPrefix ::= */ - 200, /* (18) dbPrefix ::= ids DOT */ - 201, /* (19) cpxName ::= */ - 201, /* (20) cpxName ::= DOT ids */ - 198, /* (21) cmd ::= SHOW CREATE TABLE ids cpxName */ - 198, /* (22) cmd ::= SHOW CREATE STABLE ids cpxName */ - 198, /* (23) cmd ::= SHOW CREATE DATABASE ids */ - 198, /* (24) cmd ::= SHOW dbPrefix TABLES */ - 198, /* (25) cmd ::= SHOW dbPrefix TABLES LIKE ids */ - 198, /* (26) cmd ::= SHOW dbPrefix STABLES */ - 198, /* (27) cmd ::= SHOW dbPrefix STABLES LIKE ids */ - 198, /* (28) cmd ::= SHOW dbPrefix VGROUPS */ - 198, /* (29) cmd ::= SHOW dbPrefix VGROUPS ids */ - 198, /* (30) cmd ::= DROP TABLE ifexists ids cpxName */ - 198, /* (31) cmd ::= DROP STABLE ifexists ids cpxName */ - 198, /* (32) cmd ::= DROP DATABASE ifexists ids */ - 198, /* (33) cmd ::= DROP TOPIC ifexists ids */ - 198, /* (34) cmd ::= DROP FUNCTION ids */ - 198, /* (35) cmd ::= DROP DNODE ids */ - 198, /* (36) cmd ::= DROP USER ids */ - 198, /* (37) cmd ::= DROP ACCOUNT ids */ - 198, /* (38) cmd ::= USE ids */ - 198, /* (39) cmd ::= DESCRIBE ids cpxName */ - 198, /* (40) cmd ::= DESC ids cpxName */ - 198, /* (41) cmd ::= ALTER USER ids PASS ids */ - 198, /* (42) cmd ::= ALTER USER ids PRIVILEGE ids */ - 198, /* (43) cmd ::= ALTER DNODE ids ids */ - 198, /* (44) cmd ::= ALTER DNODE ids ids ids */ - 198, /* (45) cmd ::= ALTER LOCAL ids */ - 198, /* (46) cmd ::= ALTER LOCAL ids ids */ - 198, /* (47) cmd ::= ALTER DATABASE ids alter_db_optr */ - 198, /* (48) cmd ::= ALTER TOPIC ids alter_topic_optr */ - 198, /* (49) cmd ::= ALTER ACCOUNT ids acct_optr */ - 198, /* (50) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ - 198, /* (51) cmd ::= COMPACT VNODES IN LP exprlist RP */ - 199, /* (52) ids ::= ID */ - 199, /* (53) ids ::= STRING */ - 202, /* (54) ifexists ::= IF EXISTS */ - 202, /* (55) ifexists ::= */ - 207, /* (56) ifnotexists ::= IF NOT EXISTS */ - 207, /* (57) ifnotexists ::= */ - 198, /* (58) cmd ::= CREATE DNODE ids */ - 198, /* (59) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ - 198, /* (60) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ - 198, /* (61) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ - 198, /* (62) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ - 198, /* (63) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ - 198, /* (64) cmd ::= CREATE USER ids PASS ids */ - 211, /* (65) bufsize ::= */ - 211, /* (66) bufsize ::= BUFSIZE INTEGER */ - 212, /* (67) pps ::= */ - 212, /* (68) pps ::= PPS INTEGER */ - 213, /* (69) tseries ::= */ - 213, /* (70) tseries ::= TSERIES INTEGER */ - 214, /* (71) dbs ::= */ - 214, /* (72) dbs ::= DBS INTEGER */ - 215, /* (73) streams ::= */ - 215, /* (74) streams ::= STREAMS INTEGER */ - 216, /* (75) storage ::= */ - 216, /* (76) storage ::= STORAGE INTEGER */ - 217, /* (77) qtime ::= */ - 217, /* (78) qtime ::= QTIME INTEGER */ - 218, /* (79) users ::= */ - 218, /* (80) users ::= USERS INTEGER */ - 219, /* (81) conns ::= */ - 219, /* (82) conns ::= CONNS INTEGER */ - 220, /* (83) state ::= */ - 220, /* (84) state ::= STATE ids */ - 205, /* (85) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ - 221, /* (86) intitemlist ::= intitemlist COMMA intitem */ - 221, /* (87) intitemlist ::= intitem */ - 222, /* (88) intitem ::= INTEGER */ - 223, /* (89) keep ::= KEEP intitemlist */ - 224, /* (90) cache ::= CACHE INTEGER */ - 225, /* (91) replica ::= REPLICA INTEGER */ - 226, /* (92) quorum ::= QUORUM INTEGER */ - 227, /* (93) days ::= DAYS INTEGER */ - 228, /* (94) minrows ::= MINROWS INTEGER */ - 229, /* (95) maxrows ::= MAXROWS INTEGER */ - 230, /* (96) blocks ::= BLOCKS INTEGER */ - 231, /* (97) ctime ::= CTIME INTEGER */ - 232, /* (98) wal ::= WAL INTEGER */ - 233, /* (99) fsync ::= FSYNC INTEGER */ - 234, /* (100) comp ::= COMP INTEGER */ - 235, /* (101) prec ::= PRECISION STRING */ - 236, /* (102) update ::= UPDATE INTEGER */ - 237, /* (103) cachelast ::= CACHELAST INTEGER */ - 238, /* (104) partitions ::= PARTITIONS INTEGER */ - 208, /* (105) db_optr ::= */ - 208, /* (106) db_optr ::= db_optr cache */ - 208, /* (107) db_optr ::= db_optr replica */ - 208, /* (108) db_optr ::= db_optr quorum */ - 208, /* (109) db_optr ::= db_optr days */ - 208, /* (110) db_optr ::= db_optr minrows */ - 208, /* (111) db_optr ::= db_optr maxrows */ - 208, /* (112) db_optr ::= db_optr blocks */ - 208, /* (113) db_optr ::= db_optr ctime */ - 208, /* (114) db_optr ::= db_optr wal */ - 208, /* (115) db_optr ::= db_optr fsync */ - 208, /* (116) db_optr ::= db_optr comp */ - 208, /* (117) db_optr ::= db_optr prec */ - 208, /* (118) db_optr ::= db_optr keep */ - 208, /* (119) db_optr ::= db_optr update */ - 208, /* (120) db_optr ::= db_optr cachelast */ - 209, /* (121) topic_optr ::= db_optr */ - 209, /* (122) topic_optr ::= topic_optr partitions */ - 203, /* (123) alter_db_optr ::= */ - 203, /* (124) alter_db_optr ::= alter_db_optr replica */ - 203, /* (125) alter_db_optr ::= alter_db_optr quorum */ - 203, /* (126) alter_db_optr ::= alter_db_optr keep */ - 203, /* (127) alter_db_optr ::= alter_db_optr blocks */ - 203, /* (128) alter_db_optr ::= alter_db_optr comp */ - 203, /* (129) alter_db_optr ::= alter_db_optr update */ - 203, /* (130) alter_db_optr ::= alter_db_optr cachelast */ - 204, /* (131) alter_topic_optr ::= alter_db_optr */ - 204, /* (132) alter_topic_optr ::= alter_topic_optr partitions */ - 210, /* (133) typename ::= ids */ - 210, /* (134) typename ::= ids LP signed RP */ - 210, /* (135) typename ::= ids UNSIGNED */ - 239, /* (136) signed ::= INTEGER */ - 239, /* (137) signed ::= PLUS INTEGER */ - 239, /* (138) signed ::= MINUS INTEGER */ - 198, /* (139) cmd ::= CREATE TABLE create_table_args */ - 198, /* (140) cmd ::= CREATE TABLE create_stable_args */ - 198, /* (141) cmd ::= CREATE STABLE create_stable_args */ - 198, /* (142) cmd ::= CREATE TABLE create_table_list */ - 242, /* (143) create_table_list ::= create_from_stable */ - 242, /* (144) create_table_list ::= create_table_list create_from_stable */ - 240, /* (145) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ - 241, /* (146) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ - 243, /* (147) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ - 243, /* (148) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ - 246, /* (149) tagNamelist ::= tagNamelist COMMA ids */ - 246, /* (150) tagNamelist ::= ids */ - 240, /* (151) create_table_args ::= ifnotexists ids cpxName AS select */ - 244, /* (152) columnlist ::= columnlist COMMA column */ - 244, /* (153) columnlist ::= column */ - 248, /* (154) column ::= ids typename */ - 245, /* (155) tagitemlist ::= tagitemlist COMMA tagitem */ - 245, /* (156) tagitemlist ::= tagitem */ - 249, /* (157) tagitem ::= INTEGER */ - 249, /* (158) tagitem ::= FLOAT */ - 249, /* (159) tagitem ::= STRING */ - 249, /* (160) tagitem ::= BOOL */ - 249, /* (161) tagitem ::= NULL */ - 249, /* (162) tagitem ::= NOW */ - 249, /* (163) tagitem ::= MINUS INTEGER */ - 249, /* (164) tagitem ::= MINUS FLOAT */ - 249, /* (165) tagitem ::= PLUS INTEGER */ - 249, /* (166) tagitem ::= PLUS FLOAT */ - 247, /* (167) select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ - 247, /* (168) select ::= LP select RP */ - 263, /* (169) union ::= select */ - 263, /* (170) union ::= union UNION ALL select */ - 198, /* (171) cmd ::= union */ - 247, /* (172) select ::= SELECT selcollist */ - 264, /* (173) sclp ::= selcollist COMMA */ - 264, /* (174) sclp ::= */ - 250, /* (175) selcollist ::= sclp distinct expr as */ - 250, /* (176) selcollist ::= sclp STAR */ - 267, /* (177) as ::= AS ids */ - 267, /* (178) as ::= ids */ - 267, /* (179) as ::= */ - 265, /* (180) distinct ::= DISTINCT */ - 265, /* (181) distinct ::= */ - 251, /* (182) from ::= FROM tablelist */ - 251, /* (183) from ::= FROM sub */ - 269, /* (184) sub ::= LP union RP */ - 269, /* (185) sub ::= LP union RP ids */ - 269, /* (186) sub ::= sub COMMA LP union RP ids */ - 268, /* (187) tablelist ::= ids cpxName */ - 268, /* (188) tablelist ::= ids cpxName ids */ - 268, /* (189) tablelist ::= tablelist COMMA ids cpxName */ - 268, /* (190) tablelist ::= tablelist COMMA ids cpxName ids */ - 270, /* (191) tmvar ::= VARIABLE */ - 253, /* (192) interval_option ::= intervalKey LP tmvar RP */ - 253, /* (193) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ - 253, /* (194) interval_option ::= */ - 271, /* (195) intervalKey ::= INTERVAL */ - 271, /* (196) intervalKey ::= EVERY */ - 255, /* (197) session_option ::= */ - 255, /* (198) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ - 256, /* (199) windowstate_option ::= */ - 256, /* (200) windowstate_option ::= STATE_WINDOW LP ids RP */ - 257, /* (201) fill_opt ::= */ - 257, /* (202) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ - 257, /* (203) fill_opt ::= FILL LP ID RP */ - 254, /* (204) sliding_opt ::= SLIDING LP tmvar RP */ - 254, /* (205) sliding_opt ::= */ - 260, /* (206) orderby_opt ::= */ - 260, /* (207) orderby_opt ::= ORDER BY sortlist */ - 272, /* (208) sortlist ::= sortlist COMMA item sortorder */ - 272, /* (209) sortlist ::= item sortorder */ - 274, /* (210) item ::= ids cpxName */ - 275, /* (211) sortorder ::= ASC */ - 275, /* (212) sortorder ::= DESC */ - 275, /* (213) sortorder ::= */ - 258, /* (214) groupby_opt ::= */ - 258, /* (215) groupby_opt ::= GROUP BY grouplist */ - 276, /* (216) grouplist ::= grouplist COMMA item */ - 276, /* (217) grouplist ::= item */ - 259, /* (218) having_opt ::= */ - 259, /* (219) having_opt ::= HAVING expr */ - 262, /* (220) limit_opt ::= */ - 262, /* (221) limit_opt ::= LIMIT signed */ - 262, /* (222) limit_opt ::= LIMIT signed OFFSET signed */ - 262, /* (223) limit_opt ::= LIMIT signed COMMA signed */ - 261, /* (224) slimit_opt ::= */ - 261, /* (225) slimit_opt ::= SLIMIT signed */ - 261, /* (226) slimit_opt ::= SLIMIT signed SOFFSET signed */ - 261, /* (227) slimit_opt ::= SLIMIT signed COMMA signed */ - 252, /* (228) where_opt ::= */ - 252, /* (229) where_opt ::= WHERE expr */ - 266, /* (230) expr ::= LP expr RP */ - 266, /* (231) expr ::= ID */ - 266, /* (232) expr ::= ID DOT ID */ - 266, /* (233) expr ::= ID DOT STAR */ - 266, /* (234) expr ::= INTEGER */ - 266, /* (235) expr ::= MINUS INTEGER */ - 266, /* (236) expr ::= PLUS INTEGER */ - 266, /* (237) expr ::= FLOAT */ - 266, /* (238) expr ::= MINUS FLOAT */ - 266, /* (239) expr ::= PLUS FLOAT */ - 266, /* (240) expr ::= STRING */ - 266, /* (241) expr ::= NOW */ - 266, /* (242) expr ::= VARIABLE */ - 266, /* (243) expr ::= PLUS VARIABLE */ - 266, /* (244) expr ::= MINUS VARIABLE */ - 266, /* (245) expr ::= BOOL */ - 266, /* (246) expr ::= NULL */ - 266, /* (247) expr ::= ID LP exprlist RP */ - 266, /* (248) expr ::= ID LP STAR RP */ - 266, /* (249) expr ::= expr IS NULL */ - 266, /* (250) expr ::= expr IS NOT NULL */ - 266, /* (251) expr ::= expr LT expr */ - 266, /* (252) expr ::= expr GT expr */ - 266, /* (253) expr ::= expr LE expr */ - 266, /* (254) expr ::= expr GE expr */ - 266, /* (255) expr ::= expr NE expr */ - 266, /* (256) expr ::= expr EQ expr */ - 266, /* (257) expr ::= expr BETWEEN expr AND expr */ - 266, /* (258) expr ::= expr AND expr */ - 266, /* (259) expr ::= expr OR expr */ - 266, /* (260) expr ::= expr PLUS expr */ - 266, /* (261) expr ::= expr MINUS expr */ - 266, /* (262) expr ::= expr STAR expr */ - 266, /* (263) expr ::= expr SLASH expr */ - 266, /* (264) expr ::= expr REM expr */ - 266, /* (265) expr ::= expr LIKE expr */ - 266, /* (266) expr ::= expr MATCH expr */ - 266, /* (267) expr ::= expr NMATCH expr */ - 266, /* (268) expr ::= expr IN LP exprlist RP */ - 206, /* (269) exprlist ::= exprlist COMMA expritem */ - 206, /* (270) exprlist ::= expritem */ - 277, /* (271) expritem ::= expr */ - 277, /* (272) expritem ::= */ - 198, /* (273) cmd ::= RESET QUERY CACHE */ - 198, /* (274) cmd ::= SYNCDB ids REPLICA */ - 198, /* (275) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - 198, /* (276) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - 198, /* (277) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ - 198, /* (278) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - 198, /* (279) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - 198, /* (280) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - 198, /* (281) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - 198, /* (282) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ - 198, /* (283) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - 198, /* (284) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - 198, /* (285) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ - 198, /* (286) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - 198, /* (287) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - 198, /* (288) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - 198, /* (289) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ - 198, /* (290) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ - 198, /* (291) cmd ::= KILL CONNECTION INTEGER */ - 198, /* (292) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - 198, /* (293) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + 198, /* (0) program ::= cmd */ + 199, /* (1) cmd ::= SHOW DATABASES */ + 199, /* (2) cmd ::= SHOW TOPICS */ + 199, /* (3) cmd ::= SHOW FUNCTIONS */ + 199, /* (4) cmd ::= SHOW MNODES */ + 199, /* (5) cmd ::= SHOW DNODES */ + 199, /* (6) cmd ::= SHOW ACCOUNTS */ + 199, /* (7) cmd ::= SHOW USERS */ + 199, /* (8) cmd ::= SHOW MODULES */ + 199, /* (9) cmd ::= SHOW QUERIES */ + 199, /* (10) cmd ::= SHOW CONNECTIONS */ + 199, /* (11) cmd ::= SHOW STREAMS */ + 199, /* (12) cmd ::= SHOW VARIABLES */ + 199, /* (13) cmd ::= SHOW SCORES */ + 199, /* (14) cmd ::= SHOW GRANTS */ + 199, /* (15) cmd ::= SHOW VNODES */ + 199, /* (16) cmd ::= SHOW VNODES ids */ + 201, /* (17) dbPrefix ::= */ + 201, /* (18) dbPrefix ::= ids DOT */ + 202, /* (19) cpxName ::= */ + 202, /* (20) cpxName ::= DOT ids */ + 199, /* (21) cmd ::= SHOW CREATE TABLE ftblname */ + 199, /* (22) cmd ::= SHOW CREATE STABLE ftblname */ + 199, /* (23) cmd ::= SHOW CREATE DATABASE ids */ + 199, /* (24) cmd ::= SHOW dbPrefix TABLES */ + 199, /* (25) cmd ::= SHOW dbPrefix TABLES LIKE tblname */ + 199, /* (26) cmd ::= SHOW dbPrefix STABLES */ + 199, /* (27) cmd ::= SHOW dbPrefix STABLES LIKE tblname */ + 199, /* (28) cmd ::= SHOW dbPrefix VGROUPS */ + 199, /* (29) cmd ::= SHOW dbPrefix VGROUPS ids */ + 199, /* (30) cmd ::= DROP TABLE ifexists ftblname */ + 199, /* (31) cmd ::= DROP STABLE ifexists ftblname */ + 199, /* (32) cmd ::= DROP DATABASE ifexists ids */ + 199, /* (33) cmd ::= DROP TOPIC ifexists ids */ + 199, /* (34) cmd ::= DROP FUNCTION ids */ + 199, /* (35) cmd ::= DROP DNODE ids */ + 199, /* (36) cmd ::= DROP USER ids */ + 199, /* (37) cmd ::= DROP ACCOUNT ids */ + 199, /* (38) cmd ::= USE ids */ + 199, /* (39) cmd ::= DESCRIBE ftblname */ + 199, /* (40) cmd ::= DESC ftblname */ + 199, /* (41) cmd ::= ALTER USER ids PASS ids */ + 199, /* (42) cmd ::= ALTER USER ids PRIVILEGE ids */ + 199, /* (43) cmd ::= ALTER DNODE ids ids */ + 199, /* (44) cmd ::= ALTER DNODE ids ids ids */ + 199, /* (45) cmd ::= ALTER LOCAL ids */ + 199, /* (46) cmd ::= ALTER LOCAL ids ids */ + 199, /* (47) cmd ::= ALTER DATABASE ids alter_db_optr */ + 199, /* (48) cmd ::= ALTER TOPIC ids alter_topic_optr */ + 199, /* (49) cmd ::= ALTER ACCOUNT ids acct_optr */ + 199, /* (50) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ + 199, /* (51) cmd ::= COMPACT VNODES IN LP exprlist RP */ + 200, /* (52) ids ::= ID */ + 200, /* (53) ids ::= STRING */ + 205, /* (54) ifexists ::= IF EXISTS */ + 205, /* (55) ifexists ::= */ + 210, /* (56) ifnotexists ::= IF NOT EXISTS */ + 210, /* (57) ifnotexists ::= */ + 204, /* (58) tblname ::= ids */ + 204, /* (59) tblname ::= ESCAPE */ + 203, /* (60) ftblname ::= tblname */ + 203, /* (61) ftblname ::= ids DOT tblname */ + 199, /* (62) cmd ::= CREATE DNODE ids */ + 199, /* (63) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ + 199, /* (64) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ + 199, /* (65) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ + 199, /* (66) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + 199, /* (67) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + 199, /* (68) cmd ::= CREATE USER ids PASS ids */ + 214, /* (69) bufsize ::= */ + 214, /* (70) bufsize ::= BUFSIZE INTEGER */ + 215, /* (71) pps ::= */ + 215, /* (72) pps ::= PPS INTEGER */ + 216, /* (73) tseries ::= */ + 216, /* (74) tseries ::= TSERIES INTEGER */ + 217, /* (75) dbs ::= */ + 217, /* (76) dbs ::= DBS INTEGER */ + 218, /* (77) streams ::= */ + 218, /* (78) streams ::= STREAMS INTEGER */ + 219, /* (79) storage ::= */ + 219, /* (80) storage ::= STORAGE INTEGER */ + 220, /* (81) qtime ::= */ + 220, /* (82) qtime ::= QTIME INTEGER */ + 221, /* (83) users ::= */ + 221, /* (84) users ::= USERS INTEGER */ + 222, /* (85) conns ::= */ + 222, /* (86) conns ::= CONNS INTEGER */ + 223, /* (87) state ::= */ + 223, /* (88) state ::= STATE ids */ + 208, /* (89) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ + 224, /* (90) intitemlist ::= intitemlist COMMA intitem */ + 224, /* (91) intitemlist ::= intitem */ + 225, /* (92) intitem ::= INTEGER */ + 226, /* (93) keep ::= KEEP intitemlist */ + 227, /* (94) cache ::= CACHE INTEGER */ + 228, /* (95) replica ::= REPLICA INTEGER */ + 229, /* (96) quorum ::= QUORUM INTEGER */ + 230, /* (97) days ::= DAYS INTEGER */ + 231, /* (98) minrows ::= MINROWS INTEGER */ + 232, /* (99) maxrows ::= MAXROWS INTEGER */ + 233, /* (100) blocks ::= BLOCKS INTEGER */ + 234, /* (101) ctime ::= CTIME INTEGER */ + 235, /* (102) wal ::= WAL INTEGER */ + 236, /* (103) fsync ::= FSYNC INTEGER */ + 237, /* (104) comp ::= COMP INTEGER */ + 238, /* (105) prec ::= PRECISION STRING */ + 239, /* (106) update ::= UPDATE INTEGER */ + 240, /* (107) cachelast ::= CACHELAST INTEGER */ + 241, /* (108) partitions ::= PARTITIONS INTEGER */ + 211, /* (109) db_optr ::= */ + 211, /* (110) db_optr ::= db_optr cache */ + 211, /* (111) db_optr ::= db_optr replica */ + 211, /* (112) db_optr ::= db_optr quorum */ + 211, /* (113) db_optr ::= db_optr days */ + 211, /* (114) db_optr ::= db_optr minrows */ + 211, /* (115) db_optr ::= db_optr maxrows */ + 211, /* (116) db_optr ::= db_optr blocks */ + 211, /* (117) db_optr ::= db_optr ctime */ + 211, /* (118) db_optr ::= db_optr wal */ + 211, /* (119) db_optr ::= db_optr fsync */ + 211, /* (120) db_optr ::= db_optr comp */ + 211, /* (121) db_optr ::= db_optr prec */ + 211, /* (122) db_optr ::= db_optr keep */ + 211, /* (123) db_optr ::= db_optr update */ + 211, /* (124) db_optr ::= db_optr cachelast */ + 212, /* (125) topic_optr ::= db_optr */ + 212, /* (126) topic_optr ::= topic_optr partitions */ + 206, /* (127) alter_db_optr ::= */ + 206, /* (128) alter_db_optr ::= alter_db_optr replica */ + 206, /* (129) alter_db_optr ::= alter_db_optr quorum */ + 206, /* (130) alter_db_optr ::= alter_db_optr keep */ + 206, /* (131) alter_db_optr ::= alter_db_optr blocks */ + 206, /* (132) alter_db_optr ::= alter_db_optr comp */ + 206, /* (133) alter_db_optr ::= alter_db_optr update */ + 206, /* (134) alter_db_optr ::= alter_db_optr cachelast */ + 207, /* (135) alter_topic_optr ::= alter_db_optr */ + 207, /* (136) alter_topic_optr ::= alter_topic_optr partitions */ + 213, /* (137) typename ::= ids */ + 213, /* (138) typename ::= ids LP signed RP */ + 213, /* (139) typename ::= ids UNSIGNED */ + 242, /* (140) signed ::= INTEGER */ + 242, /* (141) signed ::= PLUS INTEGER */ + 242, /* (142) signed ::= MINUS INTEGER */ + 199, /* (143) cmd ::= CREATE TABLE create_table_args */ + 199, /* (144) cmd ::= CREATE TABLE create_stable_args */ + 199, /* (145) cmd ::= CREATE STABLE create_stable_args */ + 199, /* (146) cmd ::= CREATE TABLE create_table_list */ + 245, /* (147) create_table_list ::= create_from_stable */ + 245, /* (148) create_table_list ::= create_table_list create_from_stable */ + 243, /* (149) create_table_args ::= ifnotexists ftblname LP columnlist RP */ + 244, /* (150) create_stable_args ::= ifnotexists ftblname LP columnlist RP TAGS LP columnlist RP */ + 246, /* (151) create_from_stable ::= ifnotexists ftblname USING ftblname TAGS LP tagitemlist RP */ + 246, /* (152) create_from_stable ::= ifnotexists ftblname USING ftblname LP tagNamelist RP TAGS LP tagitemlist RP */ + 249, /* (153) tagNamelist ::= tagNamelist COMMA ids */ + 249, /* (154) tagNamelist ::= ids */ + 243, /* (155) create_table_args ::= ifnotexists ftblname AS select */ + 247, /* (156) columnlist ::= columnlist COMMA column */ + 247, /* (157) columnlist ::= column */ + 251, /* (158) column ::= ids typename */ + 248, /* (159) tagitemlist ::= tagitemlist COMMA tagitem */ + 248, /* (160) tagitemlist ::= tagitem */ + 252, /* (161) tagitem ::= INTEGER */ + 252, /* (162) tagitem ::= FLOAT */ + 252, /* (163) tagitem ::= STRING */ + 252, /* (164) tagitem ::= BOOL */ + 252, /* (165) tagitem ::= NULL */ + 252, /* (166) tagitem ::= NOW */ + 252, /* (167) tagitem ::= MINUS INTEGER */ + 252, /* (168) tagitem ::= MINUS FLOAT */ + 252, /* (169) tagitem ::= PLUS INTEGER */ + 252, /* (170) tagitem ::= PLUS FLOAT */ + 250, /* (171) select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ + 250, /* (172) select ::= LP select RP */ + 266, /* (173) union ::= select */ + 266, /* (174) union ::= union UNION ALL select */ + 199, /* (175) cmd ::= union */ + 250, /* (176) select ::= SELECT selcollist */ + 267, /* (177) sclp ::= selcollist COMMA */ + 267, /* (178) sclp ::= */ + 253, /* (179) selcollist ::= sclp distinct expr as */ + 253, /* (180) selcollist ::= sclp STAR */ + 270, /* (181) as ::= AS ids */ + 270, /* (182) as ::= ids */ + 270, /* (183) as ::= */ + 268, /* (184) distinct ::= DISTINCT */ + 268, /* (185) distinct ::= */ + 254, /* (186) from ::= FROM tablelist */ + 254, /* (187) from ::= FROM sub */ + 272, /* (188) sub ::= LP union RP */ + 272, /* (189) sub ::= LP union RP ids */ + 272, /* (190) sub ::= sub COMMA LP union RP ids */ + 271, /* (191) tablelist ::= ftblname */ + 271, /* (192) tablelist ::= ftblname ids */ + 271, /* (193) tablelist ::= tablelist COMMA ftblname */ + 271, /* (194) tablelist ::= tablelist COMMA ftblname ids */ + 273, /* (195) tmvar ::= VARIABLE */ + 256, /* (196) interval_option ::= intervalKey LP tmvar RP */ + 256, /* (197) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ + 256, /* (198) interval_option ::= */ + 274, /* (199) intervalKey ::= INTERVAL */ + 274, /* (200) intervalKey ::= EVERY */ + 258, /* (201) session_option ::= */ + 258, /* (202) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ + 259, /* (203) windowstate_option ::= */ + 259, /* (204) windowstate_option ::= STATE_WINDOW LP ids RP */ + 260, /* (205) fill_opt ::= */ + 260, /* (206) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + 260, /* (207) fill_opt ::= FILL LP ID RP */ + 257, /* (208) sliding_opt ::= SLIDING LP tmvar RP */ + 257, /* (209) sliding_opt ::= */ + 263, /* (210) orderby_opt ::= */ + 263, /* (211) orderby_opt ::= ORDER BY sortlist */ + 275, /* (212) sortlist ::= sortlist COMMA item sortorder */ + 275, /* (213) sortlist ::= item sortorder */ + 277, /* (214) item ::= ids cpxName */ + 278, /* (215) sortorder ::= ASC */ + 278, /* (216) sortorder ::= DESC */ + 278, /* (217) sortorder ::= */ + 261, /* (218) groupby_opt ::= */ + 261, /* (219) groupby_opt ::= GROUP BY grouplist */ + 279, /* (220) grouplist ::= grouplist COMMA item */ + 279, /* (221) grouplist ::= item */ + 262, /* (222) having_opt ::= */ + 262, /* (223) having_opt ::= HAVING expr */ + 265, /* (224) limit_opt ::= */ + 265, /* (225) limit_opt ::= LIMIT signed */ + 265, /* (226) limit_opt ::= LIMIT signed OFFSET signed */ + 265, /* (227) limit_opt ::= LIMIT signed COMMA signed */ + 264, /* (228) slimit_opt ::= */ + 264, /* (229) slimit_opt ::= SLIMIT signed */ + 264, /* (230) slimit_opt ::= SLIMIT signed SOFFSET signed */ + 264, /* (231) slimit_opt ::= SLIMIT signed COMMA signed */ + 255, /* (232) where_opt ::= */ + 255, /* (233) where_opt ::= WHERE expr */ + 269, /* (234) expr ::= LP expr RP */ + 269, /* (235) expr ::= ID */ + 269, /* (236) expr ::= ID DOT ID */ + 269, /* (237) expr ::= ID DOT STAR */ + 269, /* (238) expr ::= INTEGER */ + 269, /* (239) expr ::= MINUS INTEGER */ + 269, /* (240) expr ::= PLUS INTEGER */ + 269, /* (241) expr ::= FLOAT */ + 269, /* (242) expr ::= MINUS FLOAT */ + 269, /* (243) expr ::= PLUS FLOAT */ + 269, /* (244) expr ::= STRING */ + 269, /* (245) expr ::= NOW */ + 269, /* (246) expr ::= VARIABLE */ + 269, /* (247) expr ::= PLUS VARIABLE */ + 269, /* (248) expr ::= MINUS VARIABLE */ + 269, /* (249) expr ::= BOOL */ + 269, /* (250) expr ::= NULL */ + 269, /* (251) expr ::= ID LP exprlist RP */ + 269, /* (252) expr ::= ID LP STAR RP */ + 269, /* (253) expr ::= expr IS NULL */ + 269, /* (254) expr ::= expr IS NOT NULL */ + 269, /* (255) expr ::= expr LT expr */ + 269, /* (256) expr ::= expr GT expr */ + 269, /* (257) expr ::= expr LE expr */ + 269, /* (258) expr ::= expr GE expr */ + 269, /* (259) expr ::= expr NE expr */ + 269, /* (260) expr ::= expr EQ expr */ + 269, /* (261) expr ::= expr BETWEEN expr AND expr */ + 269, /* (262) expr ::= expr AND expr */ + 269, /* (263) expr ::= expr OR expr */ + 269, /* (264) expr ::= expr PLUS expr */ + 269, /* (265) expr ::= expr MINUS expr */ + 269, /* (266) expr ::= expr STAR expr */ + 269, /* (267) expr ::= expr SLASH expr */ + 269, /* (268) expr ::= expr REM expr */ + 269, /* (269) expr ::= expr LIKE expr */ + 269, /* (270) expr ::= expr MATCH expr */ + 269, /* (271) expr ::= expr NMATCH expr */ + 269, /* (272) expr ::= expr IN LP exprlist RP */ + 209, /* (273) exprlist ::= exprlist COMMA expritem */ + 209, /* (274) exprlist ::= expritem */ + 280, /* (275) expritem ::= expr */ + 280, /* (276) expritem ::= */ + 199, /* (277) cmd ::= RESET QUERY CACHE */ + 199, /* (278) cmd ::= SYNCDB ids REPLICA */ + 199, /* (279) cmd ::= ALTER TABLE ftblname ADD COLUMN columnlist */ + 199, /* (280) cmd ::= ALTER TABLE ftblname DROP COLUMN ids */ + 199, /* (281) cmd ::= ALTER TABLE ftblname MODIFY COLUMN columnlist */ + 199, /* (282) cmd ::= ALTER TABLE ftblname ADD TAG columnlist */ + 199, /* (283) cmd ::= ALTER TABLE ftblname DROP TAG ids */ + 199, /* (284) cmd ::= ALTER TABLE ftblname CHANGE TAG ids ids */ + 199, /* (285) cmd ::= ALTER TABLE ftblname SET TAG ids EQ tagitem */ + 199, /* (286) cmd ::= ALTER TABLE ftblname MODIFY TAG columnlist */ + 199, /* (287) cmd ::= ALTER STABLE ftblname ADD COLUMN columnlist */ + 199, /* (288) cmd ::= ALTER STABLE ftblname DROP COLUMN ids */ + 199, /* (289) cmd ::= ALTER STABLE ftblname MODIFY COLUMN columnlist */ + 199, /* (290) cmd ::= ALTER STABLE ftblname ADD TAG columnlist */ + 199, /* (291) cmd ::= ALTER STABLE ftblname DROP TAG ids */ + 199, /* (292) cmd ::= ALTER STABLE ftblname CHANGE TAG ids ids */ + 199, /* (293) cmd ::= ALTER STABLE ftblname SET TAG ids EQ tagitem */ + 199, /* (294) cmd ::= ALTER STABLE ftblname MODIFY TAG columnlist */ + 199, /* (295) cmd ::= KILL CONNECTION INTEGER */ + 199, /* (296) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + 199, /* (297) cmd ::= KILL QUERY INTEGER COLON INTEGER */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -2189,17 +2185,17 @@ static const signed char yyRuleInfoNRhs[] = { -2, /* (18) dbPrefix ::= ids DOT */ 0, /* (19) cpxName ::= */ -2, /* (20) cpxName ::= DOT ids */ - -5, /* (21) cmd ::= SHOW CREATE TABLE ids cpxName */ - -5, /* (22) cmd ::= SHOW CREATE STABLE ids cpxName */ + -4, /* (21) cmd ::= SHOW CREATE TABLE ftblname */ + -4, /* (22) cmd ::= SHOW CREATE STABLE ftblname */ -4, /* (23) cmd ::= SHOW CREATE DATABASE ids */ -3, /* (24) cmd ::= SHOW dbPrefix TABLES */ - -5, /* (25) cmd ::= SHOW dbPrefix TABLES LIKE ids */ + -5, /* (25) cmd ::= SHOW dbPrefix TABLES LIKE tblname */ -3, /* (26) cmd ::= SHOW dbPrefix STABLES */ - -5, /* (27) cmd ::= SHOW dbPrefix STABLES LIKE ids */ + -5, /* (27) cmd ::= SHOW dbPrefix STABLES LIKE tblname */ -3, /* (28) cmd ::= SHOW dbPrefix VGROUPS */ -4, /* (29) cmd ::= SHOW dbPrefix VGROUPS ids */ - -5, /* (30) cmd ::= DROP TABLE ifexists ids cpxName */ - -5, /* (31) cmd ::= DROP STABLE ifexists ids cpxName */ + -4, /* (30) cmd ::= DROP TABLE ifexists ftblname */ + -4, /* (31) cmd ::= DROP STABLE ifexists ftblname */ -4, /* (32) cmd ::= DROP DATABASE ifexists ids */ -4, /* (33) cmd ::= DROP TOPIC ifexists ids */ -3, /* (34) cmd ::= DROP FUNCTION ids */ @@ -2207,8 +2203,8 @@ static const signed char yyRuleInfoNRhs[] = { -3, /* (36) cmd ::= DROP USER ids */ -3, /* (37) cmd ::= DROP ACCOUNT ids */ -2, /* (38) cmd ::= USE ids */ - -3, /* (39) cmd ::= DESCRIBE ids cpxName */ - -3, /* (40) cmd ::= DESC ids cpxName */ + -2, /* (39) cmd ::= DESCRIBE ftblname */ + -2, /* (40) cmd ::= DESC ftblname */ -5, /* (41) cmd ::= ALTER USER ids PASS ids */ -5, /* (42) cmd ::= ALTER USER ids PRIVILEGE ids */ -4, /* (43) cmd ::= ALTER DNODE ids ids */ @@ -2226,242 +2222,246 @@ static const signed char yyRuleInfoNRhs[] = { 0, /* (55) ifexists ::= */ -3, /* (56) ifnotexists ::= IF NOT EXISTS */ 0, /* (57) ifnotexists ::= */ - -3, /* (58) cmd ::= CREATE DNODE ids */ - -6, /* (59) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ - -5, /* (60) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ - -5, /* (61) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ - -8, /* (62) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ - -9, /* (63) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ - -5, /* (64) cmd ::= CREATE USER ids PASS ids */ - 0, /* (65) bufsize ::= */ - -2, /* (66) bufsize ::= BUFSIZE INTEGER */ - 0, /* (67) pps ::= */ - -2, /* (68) pps ::= PPS INTEGER */ - 0, /* (69) tseries ::= */ - -2, /* (70) tseries ::= TSERIES INTEGER */ - 0, /* (71) dbs ::= */ - -2, /* (72) dbs ::= DBS INTEGER */ - 0, /* (73) streams ::= */ - -2, /* (74) streams ::= STREAMS INTEGER */ - 0, /* (75) storage ::= */ - -2, /* (76) storage ::= STORAGE INTEGER */ - 0, /* (77) qtime ::= */ - -2, /* (78) qtime ::= QTIME INTEGER */ - 0, /* (79) users ::= */ - -2, /* (80) users ::= USERS INTEGER */ - 0, /* (81) conns ::= */ - -2, /* (82) conns ::= CONNS INTEGER */ - 0, /* (83) state ::= */ - -2, /* (84) state ::= STATE ids */ - -9, /* (85) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ - -3, /* (86) intitemlist ::= intitemlist COMMA intitem */ - -1, /* (87) intitemlist ::= intitem */ - -1, /* (88) intitem ::= INTEGER */ - -2, /* (89) keep ::= KEEP intitemlist */ - -2, /* (90) cache ::= CACHE INTEGER */ - -2, /* (91) replica ::= REPLICA INTEGER */ - -2, /* (92) quorum ::= QUORUM INTEGER */ - -2, /* (93) days ::= DAYS INTEGER */ - -2, /* (94) minrows ::= MINROWS INTEGER */ - -2, /* (95) maxrows ::= MAXROWS INTEGER */ - -2, /* (96) blocks ::= BLOCKS INTEGER */ - -2, /* (97) ctime ::= CTIME INTEGER */ - -2, /* (98) wal ::= WAL INTEGER */ - -2, /* (99) fsync ::= FSYNC INTEGER */ - -2, /* (100) comp ::= COMP INTEGER */ - -2, /* (101) prec ::= PRECISION STRING */ - -2, /* (102) update ::= UPDATE INTEGER */ - -2, /* (103) cachelast ::= CACHELAST INTEGER */ - -2, /* (104) partitions ::= PARTITIONS INTEGER */ - 0, /* (105) db_optr ::= */ - -2, /* (106) db_optr ::= db_optr cache */ - -2, /* (107) db_optr ::= db_optr replica */ - -2, /* (108) db_optr ::= db_optr quorum */ - -2, /* (109) db_optr ::= db_optr days */ - -2, /* (110) db_optr ::= db_optr minrows */ - -2, /* (111) db_optr ::= db_optr maxrows */ - -2, /* (112) db_optr ::= db_optr blocks */ - -2, /* (113) db_optr ::= db_optr ctime */ - -2, /* (114) db_optr ::= db_optr wal */ - -2, /* (115) db_optr ::= db_optr fsync */ - -2, /* (116) db_optr ::= db_optr comp */ - -2, /* (117) db_optr ::= db_optr prec */ - -2, /* (118) db_optr ::= db_optr keep */ - -2, /* (119) db_optr ::= db_optr update */ - -2, /* (120) db_optr ::= db_optr cachelast */ - -1, /* (121) topic_optr ::= db_optr */ - -2, /* (122) topic_optr ::= topic_optr partitions */ - 0, /* (123) alter_db_optr ::= */ - -2, /* (124) alter_db_optr ::= alter_db_optr replica */ - -2, /* (125) alter_db_optr ::= alter_db_optr quorum */ - -2, /* (126) alter_db_optr ::= alter_db_optr keep */ - -2, /* (127) alter_db_optr ::= alter_db_optr blocks */ - -2, /* (128) alter_db_optr ::= alter_db_optr comp */ - -2, /* (129) alter_db_optr ::= alter_db_optr update */ - -2, /* (130) alter_db_optr ::= alter_db_optr cachelast */ - -1, /* (131) alter_topic_optr ::= alter_db_optr */ - -2, /* (132) alter_topic_optr ::= alter_topic_optr partitions */ - -1, /* (133) typename ::= ids */ - -4, /* (134) typename ::= ids LP signed RP */ - -2, /* (135) typename ::= ids UNSIGNED */ - -1, /* (136) signed ::= INTEGER */ - -2, /* (137) signed ::= PLUS INTEGER */ - -2, /* (138) signed ::= MINUS INTEGER */ - -3, /* (139) cmd ::= CREATE TABLE create_table_args */ - -3, /* (140) cmd ::= CREATE TABLE create_stable_args */ - -3, /* (141) cmd ::= CREATE STABLE create_stable_args */ - -3, /* (142) cmd ::= CREATE TABLE create_table_list */ - -1, /* (143) create_table_list ::= create_from_stable */ - -2, /* (144) create_table_list ::= create_table_list create_from_stable */ - -6, /* (145) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ - -10, /* (146) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ - -10, /* (147) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ - -13, /* (148) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ - -3, /* (149) tagNamelist ::= tagNamelist COMMA ids */ - -1, /* (150) tagNamelist ::= ids */ - -5, /* (151) create_table_args ::= ifnotexists ids cpxName AS select */ - -3, /* (152) columnlist ::= columnlist COMMA column */ - -1, /* (153) columnlist ::= column */ - -2, /* (154) column ::= ids typename */ - -3, /* (155) tagitemlist ::= tagitemlist COMMA tagitem */ - -1, /* (156) tagitemlist ::= tagitem */ - -1, /* (157) tagitem ::= INTEGER */ - -1, /* (158) tagitem ::= FLOAT */ - -1, /* (159) tagitem ::= STRING */ - -1, /* (160) tagitem ::= BOOL */ - -1, /* (161) tagitem ::= NULL */ - -1, /* (162) tagitem ::= NOW */ - -2, /* (163) tagitem ::= MINUS INTEGER */ - -2, /* (164) tagitem ::= MINUS FLOAT */ - -2, /* (165) tagitem ::= PLUS INTEGER */ - -2, /* (166) tagitem ::= PLUS FLOAT */ - -14, /* (167) select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ - -3, /* (168) select ::= LP select RP */ - -1, /* (169) union ::= select */ - -4, /* (170) union ::= union UNION ALL select */ - -1, /* (171) cmd ::= union */ - -2, /* (172) select ::= SELECT selcollist */ - -2, /* (173) sclp ::= selcollist COMMA */ - 0, /* (174) sclp ::= */ - -4, /* (175) selcollist ::= sclp distinct expr as */ - -2, /* (176) selcollist ::= sclp STAR */ - -2, /* (177) as ::= AS ids */ - -1, /* (178) as ::= ids */ - 0, /* (179) as ::= */ - -1, /* (180) distinct ::= DISTINCT */ - 0, /* (181) distinct ::= */ - -2, /* (182) from ::= FROM tablelist */ - -2, /* (183) from ::= FROM sub */ - -3, /* (184) sub ::= LP union RP */ - -4, /* (185) sub ::= LP union RP ids */ - -6, /* (186) sub ::= sub COMMA LP union RP ids */ - -2, /* (187) tablelist ::= ids cpxName */ - -3, /* (188) tablelist ::= ids cpxName ids */ - -4, /* (189) tablelist ::= tablelist COMMA ids cpxName */ - -5, /* (190) tablelist ::= tablelist COMMA ids cpxName ids */ - -1, /* (191) tmvar ::= VARIABLE */ - -4, /* (192) interval_option ::= intervalKey LP tmvar RP */ - -6, /* (193) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ - 0, /* (194) interval_option ::= */ - -1, /* (195) intervalKey ::= INTERVAL */ - -1, /* (196) intervalKey ::= EVERY */ - 0, /* (197) session_option ::= */ - -7, /* (198) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ - 0, /* (199) windowstate_option ::= */ - -4, /* (200) windowstate_option ::= STATE_WINDOW LP ids RP */ - 0, /* (201) fill_opt ::= */ - -6, /* (202) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ - -4, /* (203) fill_opt ::= FILL LP ID RP */ - -4, /* (204) sliding_opt ::= SLIDING LP tmvar RP */ - 0, /* (205) sliding_opt ::= */ - 0, /* (206) orderby_opt ::= */ - -3, /* (207) orderby_opt ::= ORDER BY sortlist */ - -4, /* (208) sortlist ::= sortlist COMMA item sortorder */ - -2, /* (209) sortlist ::= item sortorder */ - -2, /* (210) item ::= ids cpxName */ - -1, /* (211) sortorder ::= ASC */ - -1, /* (212) sortorder ::= DESC */ - 0, /* (213) sortorder ::= */ - 0, /* (214) groupby_opt ::= */ - -3, /* (215) groupby_opt ::= GROUP BY grouplist */ - -3, /* (216) grouplist ::= grouplist COMMA item */ - -1, /* (217) grouplist ::= item */ - 0, /* (218) having_opt ::= */ - -2, /* (219) having_opt ::= HAVING expr */ - 0, /* (220) limit_opt ::= */ - -2, /* (221) limit_opt ::= LIMIT signed */ - -4, /* (222) limit_opt ::= LIMIT signed OFFSET signed */ - -4, /* (223) limit_opt ::= LIMIT signed COMMA signed */ - 0, /* (224) slimit_opt ::= */ - -2, /* (225) slimit_opt ::= SLIMIT signed */ - -4, /* (226) slimit_opt ::= SLIMIT signed SOFFSET signed */ - -4, /* (227) slimit_opt ::= SLIMIT signed COMMA signed */ - 0, /* (228) where_opt ::= */ - -2, /* (229) where_opt ::= WHERE expr */ - -3, /* (230) expr ::= LP expr RP */ - -1, /* (231) expr ::= ID */ - -3, /* (232) expr ::= ID DOT ID */ - -3, /* (233) expr ::= ID DOT STAR */ - -1, /* (234) expr ::= INTEGER */ - -2, /* (235) expr ::= MINUS INTEGER */ - -2, /* (236) expr ::= PLUS INTEGER */ - -1, /* (237) expr ::= FLOAT */ - -2, /* (238) expr ::= MINUS FLOAT */ - -2, /* (239) expr ::= PLUS FLOAT */ - -1, /* (240) expr ::= STRING */ - -1, /* (241) expr ::= NOW */ - -1, /* (242) expr ::= VARIABLE */ - -2, /* (243) expr ::= PLUS VARIABLE */ - -2, /* (244) expr ::= MINUS VARIABLE */ - -1, /* (245) expr ::= BOOL */ - -1, /* (246) expr ::= NULL */ - -4, /* (247) expr ::= ID LP exprlist RP */ - -4, /* (248) expr ::= ID LP STAR RP */ - -3, /* (249) expr ::= expr IS NULL */ - -4, /* (250) expr ::= expr IS NOT NULL */ - -3, /* (251) expr ::= expr LT expr */ - -3, /* (252) expr ::= expr GT expr */ - -3, /* (253) expr ::= expr LE expr */ - -3, /* (254) expr ::= expr GE expr */ - -3, /* (255) expr ::= expr NE expr */ - -3, /* (256) expr ::= expr EQ expr */ - -5, /* (257) expr ::= expr BETWEEN expr AND expr */ - -3, /* (258) expr ::= expr AND expr */ - -3, /* (259) expr ::= expr OR expr */ - -3, /* (260) expr ::= expr PLUS expr */ - -3, /* (261) expr ::= expr MINUS expr */ - -3, /* (262) expr ::= expr STAR expr */ - -3, /* (263) expr ::= expr SLASH expr */ - -3, /* (264) expr ::= expr REM expr */ - -3, /* (265) expr ::= expr LIKE expr */ - -3, /* (266) expr ::= expr MATCH expr */ - -3, /* (267) expr ::= expr NMATCH expr */ - -5, /* (268) expr ::= expr IN LP exprlist RP */ - -3, /* (269) exprlist ::= exprlist COMMA expritem */ - -1, /* (270) exprlist ::= expritem */ - -1, /* (271) expritem ::= expr */ - 0, /* (272) expritem ::= */ - -3, /* (273) cmd ::= RESET QUERY CACHE */ - -3, /* (274) cmd ::= SYNCDB ids REPLICA */ - -7, /* (275) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - -7, /* (276) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - -7, /* (277) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ - -7, /* (278) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - -7, /* (279) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - -8, /* (280) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - -9, /* (281) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - -7, /* (282) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ - -7, /* (283) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - -7, /* (284) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - -7, /* (285) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ - -7, /* (286) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - -7, /* (287) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - -8, /* (288) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - -9, /* (289) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ - -7, /* (290) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ - -3, /* (291) cmd ::= KILL CONNECTION INTEGER */ - -5, /* (292) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - -5, /* (293) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + -1, /* (58) tblname ::= ids */ + -1, /* (59) tblname ::= ESCAPE */ + -1, /* (60) ftblname ::= tblname */ + -3, /* (61) ftblname ::= ids DOT tblname */ + -3, /* (62) cmd ::= CREATE DNODE ids */ + -6, /* (63) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ + -5, /* (64) cmd ::= CREATE DATABASE ifnotexists ids db_optr */ + -5, /* (65) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ + -8, /* (66) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + -9, /* (67) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ + -5, /* (68) cmd ::= CREATE USER ids PASS ids */ + 0, /* (69) bufsize ::= */ + -2, /* (70) bufsize ::= BUFSIZE INTEGER */ + 0, /* (71) pps ::= */ + -2, /* (72) pps ::= PPS INTEGER */ + 0, /* (73) tseries ::= */ + -2, /* (74) tseries ::= TSERIES INTEGER */ + 0, /* (75) dbs ::= */ + -2, /* (76) dbs ::= DBS INTEGER */ + 0, /* (77) streams ::= */ + -2, /* (78) streams ::= STREAMS INTEGER */ + 0, /* (79) storage ::= */ + -2, /* (80) storage ::= STORAGE INTEGER */ + 0, /* (81) qtime ::= */ + -2, /* (82) qtime ::= QTIME INTEGER */ + 0, /* (83) users ::= */ + -2, /* (84) users ::= USERS INTEGER */ + 0, /* (85) conns ::= */ + -2, /* (86) conns ::= CONNS INTEGER */ + 0, /* (87) state ::= */ + -2, /* (88) state ::= STATE ids */ + -9, /* (89) acct_optr ::= pps tseries storage streams qtime dbs users conns state */ + -3, /* (90) intitemlist ::= intitemlist COMMA intitem */ + -1, /* (91) intitemlist ::= intitem */ + -1, /* (92) intitem ::= INTEGER */ + -2, /* (93) keep ::= KEEP intitemlist */ + -2, /* (94) cache ::= CACHE INTEGER */ + -2, /* (95) replica ::= REPLICA INTEGER */ + -2, /* (96) quorum ::= QUORUM INTEGER */ + -2, /* (97) days ::= DAYS INTEGER */ + -2, /* (98) minrows ::= MINROWS INTEGER */ + -2, /* (99) maxrows ::= MAXROWS INTEGER */ + -2, /* (100) blocks ::= BLOCKS INTEGER */ + -2, /* (101) ctime ::= CTIME INTEGER */ + -2, /* (102) wal ::= WAL INTEGER */ + -2, /* (103) fsync ::= FSYNC INTEGER */ + -2, /* (104) comp ::= COMP INTEGER */ + -2, /* (105) prec ::= PRECISION STRING */ + -2, /* (106) update ::= UPDATE INTEGER */ + -2, /* (107) cachelast ::= CACHELAST INTEGER */ + -2, /* (108) partitions ::= PARTITIONS INTEGER */ + 0, /* (109) db_optr ::= */ + -2, /* (110) db_optr ::= db_optr cache */ + -2, /* (111) db_optr ::= db_optr replica */ + -2, /* (112) db_optr ::= db_optr quorum */ + -2, /* (113) db_optr ::= db_optr days */ + -2, /* (114) db_optr ::= db_optr minrows */ + -2, /* (115) db_optr ::= db_optr maxrows */ + -2, /* (116) db_optr ::= db_optr blocks */ + -2, /* (117) db_optr ::= db_optr ctime */ + -2, /* (118) db_optr ::= db_optr wal */ + -2, /* (119) db_optr ::= db_optr fsync */ + -2, /* (120) db_optr ::= db_optr comp */ + -2, /* (121) db_optr ::= db_optr prec */ + -2, /* (122) db_optr ::= db_optr keep */ + -2, /* (123) db_optr ::= db_optr update */ + -2, /* (124) db_optr ::= db_optr cachelast */ + -1, /* (125) topic_optr ::= db_optr */ + -2, /* (126) topic_optr ::= topic_optr partitions */ + 0, /* (127) alter_db_optr ::= */ + -2, /* (128) alter_db_optr ::= alter_db_optr replica */ + -2, /* (129) alter_db_optr ::= alter_db_optr quorum */ + -2, /* (130) alter_db_optr ::= alter_db_optr keep */ + -2, /* (131) alter_db_optr ::= alter_db_optr blocks */ + -2, /* (132) alter_db_optr ::= alter_db_optr comp */ + -2, /* (133) alter_db_optr ::= alter_db_optr update */ + -2, /* (134) alter_db_optr ::= alter_db_optr cachelast */ + -1, /* (135) alter_topic_optr ::= alter_db_optr */ + -2, /* (136) alter_topic_optr ::= alter_topic_optr partitions */ + -1, /* (137) typename ::= ids */ + -4, /* (138) typename ::= ids LP signed RP */ + -2, /* (139) typename ::= ids UNSIGNED */ + -1, /* (140) signed ::= INTEGER */ + -2, /* (141) signed ::= PLUS INTEGER */ + -2, /* (142) signed ::= MINUS INTEGER */ + -3, /* (143) cmd ::= CREATE TABLE create_table_args */ + -3, /* (144) cmd ::= CREATE TABLE create_stable_args */ + -3, /* (145) cmd ::= CREATE STABLE create_stable_args */ + -3, /* (146) cmd ::= CREATE TABLE create_table_list */ + -1, /* (147) create_table_list ::= create_from_stable */ + -2, /* (148) create_table_list ::= create_table_list create_from_stable */ + -5, /* (149) create_table_args ::= ifnotexists ftblname LP columnlist RP */ + -9, /* (150) create_stable_args ::= ifnotexists ftblname LP columnlist RP TAGS LP columnlist RP */ + -8, /* (151) create_from_stable ::= ifnotexists ftblname USING ftblname TAGS LP tagitemlist RP */ + -11, /* (152) create_from_stable ::= ifnotexists ftblname USING ftblname LP tagNamelist RP TAGS LP tagitemlist RP */ + -3, /* (153) tagNamelist ::= tagNamelist COMMA ids */ + -1, /* (154) tagNamelist ::= ids */ + -4, /* (155) create_table_args ::= ifnotexists ftblname AS select */ + -3, /* (156) columnlist ::= columnlist COMMA column */ + -1, /* (157) columnlist ::= column */ + -2, /* (158) column ::= ids typename */ + -3, /* (159) tagitemlist ::= tagitemlist COMMA tagitem */ + -1, /* (160) tagitemlist ::= tagitem */ + -1, /* (161) tagitem ::= INTEGER */ + -1, /* (162) tagitem ::= FLOAT */ + -1, /* (163) tagitem ::= STRING */ + -1, /* (164) tagitem ::= BOOL */ + -1, /* (165) tagitem ::= NULL */ + -1, /* (166) tagitem ::= NOW */ + -2, /* (167) tagitem ::= MINUS INTEGER */ + -2, /* (168) tagitem ::= MINUS FLOAT */ + -2, /* (169) tagitem ::= PLUS INTEGER */ + -2, /* (170) tagitem ::= PLUS FLOAT */ + -14, /* (171) select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ + -3, /* (172) select ::= LP select RP */ + -1, /* (173) union ::= select */ + -4, /* (174) union ::= union UNION ALL select */ + -1, /* (175) cmd ::= union */ + -2, /* (176) select ::= SELECT selcollist */ + -2, /* (177) sclp ::= selcollist COMMA */ + 0, /* (178) sclp ::= */ + -4, /* (179) selcollist ::= sclp distinct expr as */ + -2, /* (180) selcollist ::= sclp STAR */ + -2, /* (181) as ::= AS ids */ + -1, /* (182) as ::= ids */ + 0, /* (183) as ::= */ + -1, /* (184) distinct ::= DISTINCT */ + 0, /* (185) distinct ::= */ + -2, /* (186) from ::= FROM tablelist */ + -2, /* (187) from ::= FROM sub */ + -3, /* (188) sub ::= LP union RP */ + -4, /* (189) sub ::= LP union RP ids */ + -6, /* (190) sub ::= sub COMMA LP union RP ids */ + -1, /* (191) tablelist ::= ftblname */ + -2, /* (192) tablelist ::= ftblname ids */ + -3, /* (193) tablelist ::= tablelist COMMA ftblname */ + -4, /* (194) tablelist ::= tablelist COMMA ftblname ids */ + -1, /* (195) tmvar ::= VARIABLE */ + -4, /* (196) interval_option ::= intervalKey LP tmvar RP */ + -6, /* (197) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ + 0, /* (198) interval_option ::= */ + -1, /* (199) intervalKey ::= INTERVAL */ + -1, /* (200) intervalKey ::= EVERY */ + 0, /* (201) session_option ::= */ + -7, /* (202) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ + 0, /* (203) windowstate_option ::= */ + -4, /* (204) windowstate_option ::= STATE_WINDOW LP ids RP */ + 0, /* (205) fill_opt ::= */ + -6, /* (206) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + -4, /* (207) fill_opt ::= FILL LP ID RP */ + -4, /* (208) sliding_opt ::= SLIDING LP tmvar RP */ + 0, /* (209) sliding_opt ::= */ + 0, /* (210) orderby_opt ::= */ + -3, /* (211) orderby_opt ::= ORDER BY sortlist */ + -4, /* (212) sortlist ::= sortlist COMMA item sortorder */ + -2, /* (213) sortlist ::= item sortorder */ + -2, /* (214) item ::= ids cpxName */ + -1, /* (215) sortorder ::= ASC */ + -1, /* (216) sortorder ::= DESC */ + 0, /* (217) sortorder ::= */ + 0, /* (218) groupby_opt ::= */ + -3, /* (219) groupby_opt ::= GROUP BY grouplist */ + -3, /* (220) grouplist ::= grouplist COMMA item */ + -1, /* (221) grouplist ::= item */ + 0, /* (222) having_opt ::= */ + -2, /* (223) having_opt ::= HAVING expr */ + 0, /* (224) limit_opt ::= */ + -2, /* (225) limit_opt ::= LIMIT signed */ + -4, /* (226) limit_opt ::= LIMIT signed OFFSET signed */ + -4, /* (227) limit_opt ::= LIMIT signed COMMA signed */ + 0, /* (228) slimit_opt ::= */ + -2, /* (229) slimit_opt ::= SLIMIT signed */ + -4, /* (230) slimit_opt ::= SLIMIT signed SOFFSET signed */ + -4, /* (231) slimit_opt ::= SLIMIT signed COMMA signed */ + 0, /* (232) where_opt ::= */ + -2, /* (233) where_opt ::= WHERE expr */ + -3, /* (234) expr ::= LP expr RP */ + -1, /* (235) expr ::= ID */ + -3, /* (236) expr ::= ID DOT ID */ + -3, /* (237) expr ::= ID DOT STAR */ + -1, /* (238) expr ::= INTEGER */ + -2, /* (239) expr ::= MINUS INTEGER */ + -2, /* (240) expr ::= PLUS INTEGER */ + -1, /* (241) expr ::= FLOAT */ + -2, /* (242) expr ::= MINUS FLOAT */ + -2, /* (243) expr ::= PLUS FLOAT */ + -1, /* (244) expr ::= STRING */ + -1, /* (245) expr ::= NOW */ + -1, /* (246) expr ::= VARIABLE */ + -2, /* (247) expr ::= PLUS VARIABLE */ + -2, /* (248) expr ::= MINUS VARIABLE */ + -1, /* (249) expr ::= BOOL */ + -1, /* (250) expr ::= NULL */ + -4, /* (251) expr ::= ID LP exprlist RP */ + -4, /* (252) expr ::= ID LP STAR RP */ + -3, /* (253) expr ::= expr IS NULL */ + -4, /* (254) expr ::= expr IS NOT NULL */ + -3, /* (255) expr ::= expr LT expr */ + -3, /* (256) expr ::= expr GT expr */ + -3, /* (257) expr ::= expr LE expr */ + -3, /* (258) expr ::= expr GE expr */ + -3, /* (259) expr ::= expr NE expr */ + -3, /* (260) expr ::= expr EQ expr */ + -5, /* (261) expr ::= expr BETWEEN expr AND expr */ + -3, /* (262) expr ::= expr AND expr */ + -3, /* (263) expr ::= expr OR expr */ + -3, /* (264) expr ::= expr PLUS expr */ + -3, /* (265) expr ::= expr MINUS expr */ + -3, /* (266) expr ::= expr STAR expr */ + -3, /* (267) expr ::= expr SLASH expr */ + -3, /* (268) expr ::= expr REM expr */ + -3, /* (269) expr ::= expr LIKE expr */ + -3, /* (270) expr ::= expr MATCH expr */ + -3, /* (271) expr ::= expr NMATCH expr */ + -5, /* (272) expr ::= expr IN LP exprlist RP */ + -3, /* (273) exprlist ::= exprlist COMMA expritem */ + -1, /* (274) exprlist ::= expritem */ + -1, /* (275) expritem ::= expr */ + 0, /* (276) expritem ::= */ + -3, /* (277) cmd ::= RESET QUERY CACHE */ + -3, /* (278) cmd ::= SYNCDB ids REPLICA */ + -6, /* (279) cmd ::= ALTER TABLE ftblname ADD COLUMN columnlist */ + -6, /* (280) cmd ::= ALTER TABLE ftblname DROP COLUMN ids */ + -6, /* (281) cmd ::= ALTER TABLE ftblname MODIFY COLUMN columnlist */ + -6, /* (282) cmd ::= ALTER TABLE ftblname ADD TAG columnlist */ + -6, /* (283) cmd ::= ALTER TABLE ftblname DROP TAG ids */ + -7, /* (284) cmd ::= ALTER TABLE ftblname CHANGE TAG ids ids */ + -8, /* (285) cmd ::= ALTER TABLE ftblname SET TAG ids EQ tagitem */ + -6, /* (286) cmd ::= ALTER TABLE ftblname MODIFY TAG columnlist */ + -6, /* (287) cmd ::= ALTER STABLE ftblname ADD COLUMN columnlist */ + -6, /* (288) cmd ::= ALTER STABLE ftblname DROP COLUMN ids */ + -6, /* (289) cmd ::= ALTER STABLE ftblname MODIFY COLUMN columnlist */ + -6, /* (290) cmd ::= ALTER STABLE ftblname ADD TAG columnlist */ + -6, /* (291) cmd ::= ALTER STABLE ftblname DROP TAG ids */ + -7, /* (292) cmd ::= ALTER STABLE ftblname CHANGE TAG ids ids */ + -8, /* (293) cmd ::= ALTER STABLE ftblname SET TAG ids EQ tagitem */ + -6, /* (294) cmd ::= ALTER STABLE ftblname MODIFY TAG columnlist */ + -3, /* (295) cmd ::= KILL CONNECTION INTEGER */ + -5, /* (296) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + -5, /* (297) cmd ::= KILL QUERY INTEGER COLON INTEGER */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -2552,1415 +2552,975 @@ static YYACTIONTYPE yy_reduce( /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* program ::= cmd */ - case 139: /* cmd ::= CREATE TABLE create_table_args */ yytestcase(yyruleno==139); - case 140: /* cmd ::= CREATE TABLE create_stable_args */ yytestcase(yyruleno==140); - case 141: /* cmd ::= CREATE STABLE create_stable_args */ yytestcase(yyruleno==141); -#line 63 "sql.y" + case 143: /* cmd ::= CREATE TABLE create_table_args */ yytestcase(yyruleno==143); + case 144: /* cmd ::= CREATE TABLE create_stable_args */ yytestcase(yyruleno==144); + case 145: /* cmd ::= CREATE STABLE create_stable_args */ yytestcase(yyruleno==145); {} -#line 2561 "sql.c" break; case 1: /* cmd ::= SHOW DATABASES */ -#line 66 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_DB, 0, 0);} -#line 2566 "sql.c" break; case 2: /* cmd ::= SHOW TOPICS */ -#line 67 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_TP, 0, 0);} -#line 2571 "sql.c" break; case 3: /* cmd ::= SHOW FUNCTIONS */ -#line 68 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_FUNCTION, 0, 0);} -#line 2576 "sql.c" break; case 4: /* cmd ::= SHOW MNODES */ -#line 69 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_MNODE, 0, 0);} -#line 2581 "sql.c" break; case 5: /* cmd ::= SHOW DNODES */ -#line 70 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_DNODE, 0, 0);} -#line 2586 "sql.c" break; case 6: /* cmd ::= SHOW ACCOUNTS */ -#line 71 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_ACCT, 0, 0);} -#line 2591 "sql.c" break; case 7: /* cmd ::= SHOW USERS */ -#line 72 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_USER, 0, 0);} -#line 2596 "sql.c" break; case 8: /* cmd ::= SHOW MODULES */ -#line 74 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_MODULE, 0, 0); } -#line 2601 "sql.c" break; case 9: /* cmd ::= SHOW QUERIES */ -#line 75 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_QUERIES, 0, 0); } -#line 2606 "sql.c" break; case 10: /* cmd ::= SHOW CONNECTIONS */ -#line 76 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_CONNS, 0, 0);} -#line 2611 "sql.c" break; case 11: /* cmd ::= SHOW STREAMS */ -#line 77 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_STREAMS, 0, 0); } -#line 2616 "sql.c" break; case 12: /* cmd ::= SHOW VARIABLES */ -#line 78 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_VARIABLES, 0, 0); } -#line 2621 "sql.c" break; case 13: /* cmd ::= SHOW SCORES */ -#line 79 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_SCORES, 0, 0); } -#line 2626 "sql.c" break; case 14: /* cmd ::= SHOW GRANTS */ -#line 80 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_GRANTS, 0, 0); } -#line 2631 "sql.c" break; case 15: /* cmd ::= SHOW VNODES */ -#line 82 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_VNODES, 0, 0); } -#line 2636 "sql.c" break; case 16: /* cmd ::= SHOW VNODES ids */ -#line 83 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_VNODES, &yymsp[0].minor.yy0, 0); } -#line 2641 "sql.c" break; case 17: /* dbPrefix ::= */ -#line 87 "sql.y" {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.type = 0;} -#line 2646 "sql.c" break; case 18: /* dbPrefix ::= ids DOT */ -#line 88 "sql.y" {yylhsminor.yy0 = yymsp[-1].minor.yy0; } -#line 2651 "sql.c" yymsp[-1].minor.yy0 = yylhsminor.yy0; break; case 19: /* cpxName ::= */ -#line 91 "sql.y" {yymsp[1].minor.yy0.n = 0; } -#line 2657 "sql.c" break; case 20: /* cpxName ::= DOT ids */ -#line 92 "sql.y" {yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n += 1; } -#line 2662 "sql.c" break; - case 21: /* cmd ::= SHOW CREATE TABLE ids cpxName */ -#line 94 "sql.y" + case 21: /* cmd ::= SHOW CREATE TABLE ftblname */ { - yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_TABLE, 1, &yymsp[-1].minor.yy0); + setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_TABLE, 1, &yymsp[0].minor.yy0); } -#line 2670 "sql.c" break; - case 22: /* cmd ::= SHOW CREATE STABLE ids cpxName */ -#line 98 "sql.y" + case 22: /* cmd ::= SHOW CREATE STABLE ftblname */ { - yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_STABLE, 1, &yymsp[-1].minor.yy0); + setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_STABLE, 1, &yymsp[0].minor.yy0); } -#line 2678 "sql.c" break; case 23: /* cmd ::= SHOW CREATE DATABASE ids */ -#line 103 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_DATABASE, 1, &yymsp[0].minor.yy0); } -#line 2685 "sql.c" break; case 24: /* cmd ::= SHOW dbPrefix TABLES */ -#line 107 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &yymsp[-1].minor.yy0, 0); } -#line 2692 "sql.c" break; - case 25: /* cmd ::= SHOW dbPrefix TABLES LIKE ids */ -#line 111 "sql.y" + case 25: /* cmd ::= SHOW dbPrefix TABLES LIKE tblname */ { setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0); } -#line 2699 "sql.c" break; case 26: /* cmd ::= SHOW dbPrefix STABLES */ -#line 115 "sql.y" { setShowOptions(pInfo, TSDB_MGMT_TABLE_METRIC, &yymsp[-1].minor.yy0, 0); } -#line 2706 "sql.c" break; - case 27: /* cmd ::= SHOW dbPrefix STABLES LIKE ids */ -#line 119 "sql.y" + case 27: /* cmd ::= SHOW dbPrefix STABLES LIKE tblname */ { SStrToken token; tSetDbName(&token, &yymsp[-3].minor.yy0); setShowOptions(pInfo, TSDB_MGMT_TABLE_METRIC, &token, &yymsp[0].minor.yy0); } -#line 2715 "sql.c" break; case 28: /* cmd ::= SHOW dbPrefix VGROUPS */ -#line 125 "sql.y" { SStrToken token; tSetDbName(&token, &yymsp[-1].minor.yy0); setShowOptions(pInfo, TSDB_MGMT_TABLE_VGROUP, &token, 0); } -#line 2724 "sql.c" break; case 29: /* cmd ::= SHOW dbPrefix VGROUPS ids */ -#line 131 "sql.y" { SStrToken token; tSetDbName(&token, &yymsp[-2].minor.yy0); setShowOptions(pInfo, TSDB_MGMT_TABLE_VGROUP, &token, &yymsp[0].minor.yy0); } -#line 2733 "sql.c" break; - case 30: /* cmd ::= DROP TABLE ifexists ids cpxName */ -#line 138 "sql.y" + case 30: /* cmd ::= DROP TABLE ifexists ftblname */ { - yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &yymsp[-1].minor.yy0, &yymsp[-2].minor.yy0, -1, -1); + setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &yymsp[0].minor.yy0, &yymsp[-1].minor.yy0, -1, -1); } -#line 2741 "sql.c" break; - case 31: /* cmd ::= DROP STABLE ifexists ids cpxName */ -#line 144 "sql.y" + case 31: /* cmd ::= DROP STABLE ifexists ftblname */ { - yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &yymsp[-1].minor.yy0, &yymsp[-2].minor.yy0, -1, TSDB_SUPER_TABLE); + setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &yymsp[0].minor.yy0, &yymsp[-1].minor.yy0, -1, TSDB_SUPER_TABLE); } -#line 2749 "sql.c" break; case 32: /* cmd ::= DROP DATABASE ifexists ids */ -#line 149 "sql.y" { setDropDbTableInfo(pInfo, TSDB_SQL_DROP_DB, &yymsp[0].minor.yy0, &yymsp[-1].minor.yy0, TSDB_DB_TYPE_DEFAULT, -1); } -#line 2754 "sql.c" break; case 33: /* cmd ::= DROP TOPIC ifexists ids */ -#line 150 "sql.y" { setDropDbTableInfo(pInfo, TSDB_SQL_DROP_DB, &yymsp[0].minor.yy0, &yymsp[-1].minor.yy0, TSDB_DB_TYPE_TOPIC, -1); } -#line 2759 "sql.c" break; case 34: /* cmd ::= DROP FUNCTION ids */ -#line 151 "sql.y" { setDropFuncInfo(pInfo, TSDB_SQL_DROP_FUNCTION, &yymsp[0].minor.yy0); } -#line 2764 "sql.c" break; case 35: /* cmd ::= DROP DNODE ids */ -#line 153 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_DROP_DNODE, 1, &yymsp[0].minor.yy0); } -#line 2769 "sql.c" break; case 36: /* cmd ::= DROP USER ids */ -#line 154 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_DROP_USER, 1, &yymsp[0].minor.yy0); } -#line 2774 "sql.c" break; case 37: /* cmd ::= DROP ACCOUNT ids */ -#line 155 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_DROP_ACCT, 1, &yymsp[0].minor.yy0); } -#line 2779 "sql.c" break; case 38: /* cmd ::= USE ids */ -#line 158 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_USE_DB, 1, &yymsp[0].minor.yy0);} -#line 2784 "sql.c" break; - case 39: /* cmd ::= DESCRIBE ids cpxName */ - case 40: /* cmd ::= DESC ids cpxName */ yytestcase(yyruleno==40); -#line 161 "sql.y" + case 39: /* cmd ::= DESCRIBE ftblname */ + case 40: /* cmd ::= DESC ftblname */ yytestcase(yyruleno==40); { - yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - setDCLSqlElems(pInfo, TSDB_SQL_DESCRIBE_TABLE, 1, &yymsp[-1].minor.yy0); + setDCLSqlElems(pInfo, TSDB_SQL_DESCRIBE_TABLE, 1, &yymsp[0].minor.yy0); } -#line 2793 "sql.c" break; case 41: /* cmd ::= ALTER USER ids PASS ids */ -#line 170 "sql.y" { setAlterUserSql(pInfo, TSDB_ALTER_USER_PASSWD, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, NULL); } -#line 2798 "sql.c" break; case 42: /* cmd ::= ALTER USER ids PRIVILEGE ids */ -#line 171 "sql.y" { setAlterUserSql(pInfo, TSDB_ALTER_USER_PRIVILEGES, &yymsp[-2].minor.yy0, NULL, &yymsp[0].minor.yy0);} -#line 2803 "sql.c" break; case 43: /* cmd ::= ALTER DNODE ids ids */ -#line 172 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_CFG_DNODE, 2, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 2808 "sql.c" break; case 44: /* cmd ::= ALTER DNODE ids ids ids */ -#line 173 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_CFG_DNODE, 3, &yymsp[-2].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 2813 "sql.c" break; case 45: /* cmd ::= ALTER LOCAL ids */ -#line 174 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 1, &yymsp[0].minor.yy0); } -#line 2818 "sql.c" break; case 46: /* cmd ::= ALTER LOCAL ids ids */ -#line 175 "sql.y" { setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 2, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 2823 "sql.c" break; case 47: /* cmd ::= ALTER DATABASE ids alter_db_optr */ case 48: /* cmd ::= ALTER TOPIC ids alter_topic_optr */ yytestcase(yyruleno==48); -#line 176 "sql.y" -{ SStrToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy90, &t);} -#line 2829 "sql.c" +{ SStrToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy262, &t);} break; case 49: /* cmd ::= ALTER ACCOUNT ids acct_optr */ -#line 179 "sql.y" -{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy171);} -#line 2834 "sql.c" +{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy47);} break; case 50: /* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ -#line 180 "sql.y" -{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy171);} -#line 2839 "sql.c" +{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy47);} break; case 51: /* cmd ::= COMPACT VNODES IN LP exprlist RP */ -#line 184 "sql.y" -{ setCompactVnodeSql(pInfo, TSDB_SQL_COMPACT_VNODE, yymsp[-1].minor.yy421);} -#line 2844 "sql.c" +{ setCompactVnodeSql(pInfo, TSDB_SQL_COMPACT_VNODE, yymsp[-1].minor.yy247);} break; case 52: /* ids ::= ID */ case 53: /* ids ::= STRING */ yytestcase(yyruleno==53); -#line 190 "sql.y" + case 58: /* tblname ::= ids */ yytestcase(yyruleno==58); + case 59: /* tblname ::= ESCAPE */ yytestcase(yyruleno==59); + case 60: /* ftblname ::= tblname */ yytestcase(yyruleno==60); {yylhsminor.yy0 = yymsp[0].minor.yy0; } -#line 2850 "sql.c" yymsp[0].minor.yy0 = yylhsminor.yy0; break; case 54: /* ifexists ::= IF EXISTS */ -#line 194 "sql.y" { yymsp[-1].minor.yy0.n = 1;} -#line 2856 "sql.c" break; case 55: /* ifexists ::= */ case 57: /* ifnotexists ::= */ yytestcase(yyruleno==57); - case 181: /* distinct ::= */ yytestcase(yyruleno==181); -#line 195 "sql.y" + case 185: /* distinct ::= */ yytestcase(yyruleno==185); { yymsp[1].minor.yy0.n = 0;} -#line 2863 "sql.c" break; case 56: /* ifnotexists ::= IF NOT EXISTS */ -#line 198 "sql.y" { yymsp[-2].minor.yy0.n = 1;} -#line 2868 "sql.c" break; - case 58: /* cmd ::= CREATE DNODE ids */ -#line 203 "sql.y" + case 61: /* ftblname ::= ids DOT tblname */ +{yylhsminor.yy0 = yymsp[-2].minor.yy0; yylhsminor.yy0.n += 1 + yymsp[0].minor.yy0.n; } + yymsp[-2].minor.yy0 = yylhsminor.yy0; + break; + case 62: /* cmd ::= CREATE DNODE ids */ { setDCLSqlElems(pInfo, TSDB_SQL_CREATE_DNODE, 1, &yymsp[0].minor.yy0);} -#line 2873 "sql.c" - break; - case 59: /* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ -#line 205 "sql.y" -{ setCreateAcctSql(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy171);} -#line 2878 "sql.c" - break; - case 60: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */ - case 61: /* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ yytestcase(yyruleno==61); -#line 206 "sql.y" -{ setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy90, &yymsp[-2].minor.yy0);} -#line 2884 "sql.c" - break; - case 62: /* cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ -#line 208 "sql.y" -{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy183, &yymsp[0].minor.yy0, 1);} -#line 2889 "sql.c" - break; - case 63: /* cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ -#line 209 "sql.y" -{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy183, &yymsp[0].minor.yy0, 2);} -#line 2894 "sql.c" - break; - case 64: /* cmd ::= CREATE USER ids PASS ids */ -#line 210 "sql.y" + break; + case 63: /* 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.yy47);} + break; + case 64: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */ + case 65: /* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ yytestcase(yyruleno==65); +{ setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy262, &yymsp[-2].minor.yy0);} + break; + case 66: /* 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.yy179, &yymsp[0].minor.yy0, 1);} + break; + case 67: /* 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.yy179, &yymsp[0].minor.yy0, 2);} + break; + case 68: /* cmd ::= CREATE USER ids PASS ids */ { setCreateUserSql(pInfo, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);} -#line 2899 "sql.c" - break; - case 65: /* bufsize ::= */ - case 67: /* pps ::= */ yytestcase(yyruleno==67); - case 69: /* tseries ::= */ yytestcase(yyruleno==69); - case 71: /* dbs ::= */ yytestcase(yyruleno==71); - case 73: /* streams ::= */ yytestcase(yyruleno==73); - case 75: /* storage ::= */ yytestcase(yyruleno==75); - case 77: /* qtime ::= */ yytestcase(yyruleno==77); - case 79: /* users ::= */ yytestcase(yyruleno==79); - case 81: /* conns ::= */ yytestcase(yyruleno==81); - case 83: /* state ::= */ yytestcase(yyruleno==83); -#line 212 "sql.y" + break; + case 69: /* bufsize ::= */ + case 71: /* pps ::= */ yytestcase(yyruleno==71); + case 73: /* tseries ::= */ yytestcase(yyruleno==73); + case 75: /* dbs ::= */ yytestcase(yyruleno==75); + case 77: /* streams ::= */ yytestcase(yyruleno==77); + case 79: /* storage ::= */ yytestcase(yyruleno==79); + case 81: /* qtime ::= */ yytestcase(yyruleno==81); + case 83: /* users ::= */ yytestcase(yyruleno==83); + case 85: /* conns ::= */ yytestcase(yyruleno==85); + case 87: /* state ::= */ yytestcase(yyruleno==87); { yymsp[1].minor.yy0.n = 0; } -#line 2913 "sql.c" - break; - case 66: /* bufsize ::= BUFSIZE INTEGER */ - case 68: /* pps ::= PPS INTEGER */ yytestcase(yyruleno==68); - case 70: /* tseries ::= TSERIES INTEGER */ yytestcase(yyruleno==70); - case 72: /* dbs ::= DBS INTEGER */ yytestcase(yyruleno==72); - case 74: /* streams ::= STREAMS INTEGER */ yytestcase(yyruleno==74); - case 76: /* storage ::= STORAGE INTEGER */ yytestcase(yyruleno==76); - case 78: /* qtime ::= QTIME INTEGER */ yytestcase(yyruleno==78); - case 80: /* users ::= USERS INTEGER */ yytestcase(yyruleno==80); - case 82: /* conns ::= CONNS INTEGER */ yytestcase(yyruleno==82); - case 84: /* state ::= STATE ids */ yytestcase(yyruleno==84); -#line 213 "sql.y" + break; + case 70: /* bufsize ::= BUFSIZE INTEGER */ + case 72: /* pps ::= PPS INTEGER */ yytestcase(yyruleno==72); + case 74: /* tseries ::= TSERIES INTEGER */ yytestcase(yyruleno==74); + case 76: /* dbs ::= DBS INTEGER */ yytestcase(yyruleno==76); + case 78: /* streams ::= STREAMS INTEGER */ yytestcase(yyruleno==78); + case 80: /* storage ::= STORAGE INTEGER */ yytestcase(yyruleno==80); + case 82: /* qtime ::= QTIME INTEGER */ yytestcase(yyruleno==82); + case 84: /* users ::= USERS INTEGER */ yytestcase(yyruleno==84); + case 86: /* conns ::= CONNS INTEGER */ yytestcase(yyruleno==86); + case 88: /* state ::= STATE ids */ yytestcase(yyruleno==88); { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } -#line 2927 "sql.c" break; - case 85: /* acct_optr ::= pps tseries storage streams qtime dbs users conns state */ -#line 243 "sql.y" -{ - yylhsminor.yy171.maxUsers = (yymsp[-2].minor.yy0.n>0)?atoi(yymsp[-2].minor.yy0.z):-1; - yylhsminor.yy171.maxDbs = (yymsp[-3].minor.yy0.n>0)?atoi(yymsp[-3].minor.yy0.z):-1; - yylhsminor.yy171.maxTimeSeries = (yymsp[-7].minor.yy0.n>0)?atoi(yymsp[-7].minor.yy0.z):-1; - yylhsminor.yy171.maxStreams = (yymsp[-5].minor.yy0.n>0)?atoi(yymsp[-5].minor.yy0.z):-1; - yylhsminor.yy171.maxPointsPerSecond = (yymsp[-8].minor.yy0.n>0)?atoi(yymsp[-8].minor.yy0.z):-1; - yylhsminor.yy171.maxStorage = (yymsp[-6].minor.yy0.n>0)?strtoll(yymsp[-6].minor.yy0.z, NULL, 10):-1; - yylhsminor.yy171.maxQueryTime = (yymsp[-4].minor.yy0.n>0)?strtoll(yymsp[-4].minor.yy0.z, NULL, 10):-1; - yylhsminor.yy171.maxConnections = (yymsp[-1].minor.yy0.n>0)?atoi(yymsp[-1].minor.yy0.z):-1; - yylhsminor.yy171.stat = yymsp[0].minor.yy0; -} -#line 2942 "sql.c" - yymsp[-8].minor.yy171 = yylhsminor.yy171; - break; - case 86: /* intitemlist ::= intitemlist COMMA intitem */ - case 155: /* tagitemlist ::= tagitemlist COMMA tagitem */ yytestcase(yyruleno==155); -#line 259 "sql.y" -{ yylhsminor.yy421 = tVariantListAppend(yymsp[-2].minor.yy421, &yymsp[0].minor.yy430, -1); } -#line 2949 "sql.c" - yymsp[-2].minor.yy421 = yylhsminor.yy421; - break; - case 87: /* intitemlist ::= intitem */ - case 156: /* tagitemlist ::= tagitem */ yytestcase(yyruleno==156); -#line 260 "sql.y" -{ yylhsminor.yy421 = tVariantListAppend(NULL, &yymsp[0].minor.yy430, -1); } -#line 2956 "sql.c" - yymsp[0].minor.yy421 = yylhsminor.yy421; - break; - case 88: /* intitem ::= INTEGER */ - case 157: /* tagitem ::= INTEGER */ yytestcase(yyruleno==157); - case 158: /* tagitem ::= FLOAT */ yytestcase(yyruleno==158); - case 159: /* tagitem ::= STRING */ yytestcase(yyruleno==159); - case 160: /* tagitem ::= BOOL */ yytestcase(yyruleno==160); -#line 262 "sql.y" -{ toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy430, &yymsp[0].minor.yy0); } -#line 2966 "sql.c" - yymsp[0].minor.yy430 = yylhsminor.yy430; - break; - case 89: /* keep ::= KEEP intitemlist */ -#line 266 "sql.y" -{ yymsp[-1].minor.yy421 = yymsp[0].minor.yy421; } -#line 2972 "sql.c" - break; - case 90: /* cache ::= CACHE INTEGER */ - case 91: /* replica ::= REPLICA INTEGER */ yytestcase(yyruleno==91); - case 92: /* quorum ::= QUORUM INTEGER */ yytestcase(yyruleno==92); - case 93: /* days ::= DAYS INTEGER */ yytestcase(yyruleno==93); - case 94: /* minrows ::= MINROWS INTEGER */ yytestcase(yyruleno==94); - case 95: /* maxrows ::= MAXROWS INTEGER */ yytestcase(yyruleno==95); - case 96: /* blocks ::= BLOCKS INTEGER */ yytestcase(yyruleno==96); - case 97: /* ctime ::= CTIME INTEGER */ yytestcase(yyruleno==97); - case 98: /* wal ::= WAL INTEGER */ yytestcase(yyruleno==98); - case 99: /* fsync ::= FSYNC INTEGER */ yytestcase(yyruleno==99); - case 100: /* comp ::= COMP INTEGER */ yytestcase(yyruleno==100); - case 101: /* prec ::= PRECISION STRING */ yytestcase(yyruleno==101); - case 102: /* update ::= UPDATE INTEGER */ yytestcase(yyruleno==102); - case 103: /* cachelast ::= CACHELAST INTEGER */ yytestcase(yyruleno==103); - case 104: /* partitions ::= PARTITIONS INTEGER */ yytestcase(yyruleno==104); -#line 268 "sql.y" + case 89: /* acct_optr ::= pps tseries storage streams qtime dbs users conns state */ +{ + yylhsminor.yy47.maxUsers = (yymsp[-2].minor.yy0.n>0)?atoi(yymsp[-2].minor.yy0.z):-1; + yylhsminor.yy47.maxDbs = (yymsp[-3].minor.yy0.n>0)?atoi(yymsp[-3].minor.yy0.z):-1; + yylhsminor.yy47.maxTimeSeries = (yymsp[-7].minor.yy0.n>0)?atoi(yymsp[-7].minor.yy0.z):-1; + yylhsminor.yy47.maxStreams = (yymsp[-5].minor.yy0.n>0)?atoi(yymsp[-5].minor.yy0.z):-1; + yylhsminor.yy47.maxPointsPerSecond = (yymsp[-8].minor.yy0.n>0)?atoi(yymsp[-8].minor.yy0.z):-1; + yylhsminor.yy47.maxStorage = (yymsp[-6].minor.yy0.n>0)?strtoll(yymsp[-6].minor.yy0.z, NULL, 10):-1; + yylhsminor.yy47.maxQueryTime = (yymsp[-4].minor.yy0.n>0)?strtoll(yymsp[-4].minor.yy0.z, NULL, 10):-1; + yylhsminor.yy47.maxConnections = (yymsp[-1].minor.yy0.n>0)?atoi(yymsp[-1].minor.yy0.z):-1; + yylhsminor.yy47.stat = yymsp[0].minor.yy0; +} + yymsp[-8].minor.yy47 = yylhsminor.yy47; + break; + case 90: /* intitemlist ::= intitemlist COMMA intitem */ + case 159: /* tagitemlist ::= tagitemlist COMMA tagitem */ yytestcase(yyruleno==159); +{ yylhsminor.yy247 = tVariantListAppend(yymsp[-2].minor.yy247, &yymsp[0].minor.yy378, -1); } + yymsp[-2].minor.yy247 = yylhsminor.yy247; + break; + case 91: /* intitemlist ::= intitem */ + case 160: /* tagitemlist ::= tagitem */ yytestcase(yyruleno==160); +{ yylhsminor.yy247 = tVariantListAppend(NULL, &yymsp[0].minor.yy378, -1); } + yymsp[0].minor.yy247 = yylhsminor.yy247; + break; + case 92: /* intitem ::= INTEGER */ + case 161: /* tagitem ::= INTEGER */ yytestcase(yyruleno==161); + case 162: /* tagitem ::= FLOAT */ yytestcase(yyruleno==162); + case 163: /* tagitem ::= STRING */ yytestcase(yyruleno==163); + case 164: /* tagitem ::= BOOL */ yytestcase(yyruleno==164); +{ toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy378, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy378 = yylhsminor.yy378; + break; + case 93: /* keep ::= KEEP intitemlist */ +{ yymsp[-1].minor.yy247 = yymsp[0].minor.yy247; } + break; + case 94: /* cache ::= CACHE INTEGER */ + case 95: /* replica ::= REPLICA INTEGER */ yytestcase(yyruleno==95); + case 96: /* quorum ::= QUORUM INTEGER */ yytestcase(yyruleno==96); + case 97: /* days ::= DAYS INTEGER */ yytestcase(yyruleno==97); + case 98: /* minrows ::= MINROWS INTEGER */ yytestcase(yyruleno==98); + case 99: /* maxrows ::= MAXROWS INTEGER */ yytestcase(yyruleno==99); + case 100: /* blocks ::= BLOCKS INTEGER */ yytestcase(yyruleno==100); + case 101: /* ctime ::= CTIME INTEGER */ yytestcase(yyruleno==101); + case 102: /* wal ::= WAL INTEGER */ yytestcase(yyruleno==102); + case 103: /* fsync ::= FSYNC INTEGER */ yytestcase(yyruleno==103); + case 104: /* comp ::= COMP INTEGER */ yytestcase(yyruleno==104); + case 105: /* prec ::= PRECISION STRING */ yytestcase(yyruleno==105); + case 106: /* update ::= UPDATE INTEGER */ yytestcase(yyruleno==106); + case 107: /* cachelast ::= CACHELAST INTEGER */ yytestcase(yyruleno==107); + case 108: /* partitions ::= PARTITIONS INTEGER */ yytestcase(yyruleno==108); { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } -#line 2991 "sql.c" - break; - case 105: /* db_optr ::= */ -#line 285 "sql.y" -{setDefaultCreateDbOption(&yymsp[1].minor.yy90); yymsp[1].minor.yy90.dbType = TSDB_DB_TYPE_DEFAULT;} -#line 2996 "sql.c" - break; - case 106: /* db_optr ::= db_optr cache */ -#line 287 "sql.y" -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3001 "sql.c" - yymsp[-1].minor.yy90 = yylhsminor.yy90; - break; - case 107: /* db_optr ::= db_optr replica */ - case 124: /* alter_db_optr ::= alter_db_optr replica */ yytestcase(yyruleno==124); -#line 288 "sql.y" -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3008 "sql.c" - yymsp[-1].minor.yy90 = yylhsminor.yy90; - break; - case 108: /* db_optr ::= db_optr quorum */ - case 125: /* alter_db_optr ::= alter_db_optr quorum */ yytestcase(yyruleno==125); -#line 289 "sql.y" -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3015 "sql.c" - yymsp[-1].minor.yy90 = yylhsminor.yy90; - break; - case 109: /* db_optr ::= db_optr days */ -#line 290 "sql.y" -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3021 "sql.c" - yymsp[-1].minor.yy90 = yylhsminor.yy90; - break; - case 110: /* db_optr ::= db_optr minrows */ -#line 291 "sql.y" -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } -#line 3027 "sql.c" - yymsp[-1].minor.yy90 = yylhsminor.yy90; - break; - case 111: /* db_optr ::= db_optr maxrows */ -#line 292 "sql.y" -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } -#line 3033 "sql.c" - yymsp[-1].minor.yy90 = yylhsminor.yy90; - break; - case 112: /* db_optr ::= db_optr blocks */ - case 127: /* alter_db_optr ::= alter_db_optr blocks */ yytestcase(yyruleno==127); -#line 293 "sql.y" -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3040 "sql.c" - yymsp[-1].minor.yy90 = yylhsminor.yy90; - break; - case 113: /* db_optr ::= db_optr ctime */ -#line 294 "sql.y" -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3046 "sql.c" - yymsp[-1].minor.yy90 = yylhsminor.yy90; - break; - case 114: /* db_optr ::= db_optr wal */ -#line 295 "sql.y" -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3052 "sql.c" - yymsp[-1].minor.yy90 = yylhsminor.yy90; - break; - case 115: /* db_optr ::= db_optr fsync */ -#line 296 "sql.y" -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3058 "sql.c" - yymsp[-1].minor.yy90 = yylhsminor.yy90; - break; - case 116: /* db_optr ::= db_optr comp */ - case 128: /* alter_db_optr ::= alter_db_optr comp */ yytestcase(yyruleno==128); -#line 297 "sql.y" -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3065 "sql.c" - yymsp[-1].minor.yy90 = yylhsminor.yy90; - break; - case 117: /* db_optr ::= db_optr prec */ -#line 298 "sql.y" -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.precision = yymsp[0].minor.yy0; } -#line 3071 "sql.c" - yymsp[-1].minor.yy90 = yylhsminor.yy90; - break; - case 118: /* db_optr ::= db_optr keep */ - case 126: /* alter_db_optr ::= alter_db_optr keep */ yytestcase(yyruleno==126); -#line 299 "sql.y" -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.keep = yymsp[0].minor.yy421; } -#line 3078 "sql.c" - yymsp[-1].minor.yy90 = yylhsminor.yy90; - break; - case 119: /* db_optr ::= db_optr update */ - case 129: /* alter_db_optr ::= alter_db_optr update */ yytestcase(yyruleno==129); -#line 300 "sql.y" -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3085 "sql.c" - yymsp[-1].minor.yy90 = yylhsminor.yy90; - break; - case 120: /* db_optr ::= db_optr cachelast */ - case 130: /* alter_db_optr ::= alter_db_optr cachelast */ yytestcase(yyruleno==130); -#line 301 "sql.y" -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3092 "sql.c" - yymsp[-1].minor.yy90 = yylhsminor.yy90; - break; - case 121: /* topic_optr ::= db_optr */ - case 131: /* alter_topic_optr ::= alter_db_optr */ yytestcase(yyruleno==131); -#line 305 "sql.y" -{ yylhsminor.yy90 = yymsp[0].minor.yy90; yylhsminor.yy90.dbType = TSDB_DB_TYPE_TOPIC; } -#line 3099 "sql.c" - yymsp[0].minor.yy90 = yylhsminor.yy90; - break; - case 122: /* topic_optr ::= topic_optr partitions */ - case 132: /* alter_topic_optr ::= alter_topic_optr partitions */ yytestcase(yyruleno==132); -#line 306 "sql.y" -{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.partitions = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3106 "sql.c" - yymsp[-1].minor.yy90 = yylhsminor.yy90; - break; - case 123: /* alter_db_optr ::= */ -#line 309 "sql.y" -{ setDefaultCreateDbOption(&yymsp[1].minor.yy90); yymsp[1].minor.yy90.dbType = TSDB_DB_TYPE_DEFAULT;} -#line 3112 "sql.c" - break; - case 133: /* typename ::= ids */ -#line 329 "sql.y" + break; + case 109: /* db_optr ::= */ +{setDefaultCreateDbOption(&yymsp[1].minor.yy262); yymsp[1].minor.yy262.dbType = TSDB_DB_TYPE_DEFAULT;} + break; + case 110: /* db_optr ::= db_optr cache */ +{ yylhsminor.yy262 = yymsp[-1].minor.yy262; yylhsminor.yy262.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy262 = yylhsminor.yy262; + break; + case 111: /* db_optr ::= db_optr replica */ + case 128: /* alter_db_optr ::= alter_db_optr replica */ yytestcase(yyruleno==128); +{ yylhsminor.yy262 = yymsp[-1].minor.yy262; yylhsminor.yy262.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy262 = yylhsminor.yy262; + break; + case 112: /* db_optr ::= db_optr quorum */ + case 129: /* alter_db_optr ::= alter_db_optr quorum */ yytestcase(yyruleno==129); +{ yylhsminor.yy262 = yymsp[-1].minor.yy262; yylhsminor.yy262.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy262 = yylhsminor.yy262; + break; + case 113: /* db_optr ::= db_optr days */ +{ yylhsminor.yy262 = yymsp[-1].minor.yy262; yylhsminor.yy262.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy262 = yylhsminor.yy262; + break; + case 114: /* db_optr ::= db_optr minrows */ +{ yylhsminor.yy262 = yymsp[-1].minor.yy262; yylhsminor.yy262.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } + yymsp[-1].minor.yy262 = yylhsminor.yy262; + break; + case 115: /* db_optr ::= db_optr maxrows */ +{ yylhsminor.yy262 = yymsp[-1].minor.yy262; yylhsminor.yy262.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } + yymsp[-1].minor.yy262 = yylhsminor.yy262; + break; + case 116: /* db_optr ::= db_optr blocks */ + case 131: /* alter_db_optr ::= alter_db_optr blocks */ yytestcase(yyruleno==131); +{ yylhsminor.yy262 = yymsp[-1].minor.yy262; yylhsminor.yy262.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy262 = yylhsminor.yy262; + break; + case 117: /* db_optr ::= db_optr ctime */ +{ yylhsminor.yy262 = yymsp[-1].minor.yy262; yylhsminor.yy262.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy262 = yylhsminor.yy262; + break; + case 118: /* db_optr ::= db_optr wal */ +{ yylhsminor.yy262 = yymsp[-1].minor.yy262; yylhsminor.yy262.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy262 = yylhsminor.yy262; + break; + case 119: /* db_optr ::= db_optr fsync */ +{ yylhsminor.yy262 = yymsp[-1].minor.yy262; yylhsminor.yy262.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy262 = yylhsminor.yy262; + break; + case 120: /* db_optr ::= db_optr comp */ + case 132: /* alter_db_optr ::= alter_db_optr comp */ yytestcase(yyruleno==132); +{ yylhsminor.yy262 = yymsp[-1].minor.yy262; yylhsminor.yy262.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy262 = yylhsminor.yy262; + break; + case 121: /* db_optr ::= db_optr prec */ +{ yylhsminor.yy262 = yymsp[-1].minor.yy262; yylhsminor.yy262.precision = yymsp[0].minor.yy0; } + yymsp[-1].minor.yy262 = yylhsminor.yy262; + break; + case 122: /* db_optr ::= db_optr keep */ + case 130: /* alter_db_optr ::= alter_db_optr keep */ yytestcase(yyruleno==130); +{ yylhsminor.yy262 = yymsp[-1].minor.yy262; yylhsminor.yy262.keep = yymsp[0].minor.yy247; } + yymsp[-1].minor.yy262 = yylhsminor.yy262; + break; + case 123: /* db_optr ::= db_optr update */ + case 133: /* alter_db_optr ::= alter_db_optr update */ yytestcase(yyruleno==133); +{ yylhsminor.yy262 = yymsp[-1].minor.yy262; yylhsminor.yy262.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy262 = yylhsminor.yy262; + break; + case 124: /* db_optr ::= db_optr cachelast */ + case 134: /* alter_db_optr ::= alter_db_optr cachelast */ yytestcase(yyruleno==134); +{ yylhsminor.yy262 = yymsp[-1].minor.yy262; yylhsminor.yy262.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy262 = yylhsminor.yy262; + break; + case 125: /* topic_optr ::= db_optr */ + case 135: /* alter_topic_optr ::= alter_db_optr */ yytestcase(yyruleno==135); +{ yylhsminor.yy262 = yymsp[0].minor.yy262; yylhsminor.yy262.dbType = TSDB_DB_TYPE_TOPIC; } + yymsp[0].minor.yy262 = yylhsminor.yy262; + break; + case 126: /* topic_optr ::= topic_optr partitions */ + case 136: /* alter_topic_optr ::= alter_topic_optr partitions */ yytestcase(yyruleno==136); +{ yylhsminor.yy262 = yymsp[-1].minor.yy262; yylhsminor.yy262.partitions = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy262 = yylhsminor.yy262; + break; + case 127: /* alter_db_optr ::= */ +{ setDefaultCreateDbOption(&yymsp[1].minor.yy262); yymsp[1].minor.yy262.dbType = TSDB_DB_TYPE_DEFAULT;} + break; + case 137: /* typename ::= ids */ { yymsp[0].minor.yy0.type = 0; - tSetColumnType (&yylhsminor.yy183, &yymsp[0].minor.yy0); + tSetColumnType (&yylhsminor.yy179, &yymsp[0].minor.yy0); } -#line 3120 "sql.c" - yymsp[0].minor.yy183 = yylhsminor.yy183; + yymsp[0].minor.yy179 = yylhsminor.yy179; break; - case 134: /* typename ::= ids LP signed RP */ -#line 335 "sql.y" + case 138: /* typename ::= ids LP signed RP */ { - if (yymsp[-1].minor.yy325 <= 0) { + if (yymsp[-1].minor.yy403 <= 0) { yymsp[-3].minor.yy0.type = 0; - tSetColumnType(&yylhsminor.yy183, &yymsp[-3].minor.yy0); + tSetColumnType(&yylhsminor.yy179, &yymsp[-3].minor.yy0); } else { - yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy325; // negative value of name length - tSetColumnType(&yylhsminor.yy183, &yymsp[-3].minor.yy0); + yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy403; // negative value of name length + tSetColumnType(&yylhsminor.yy179, &yymsp[-3].minor.yy0); } } -#line 3134 "sql.c" - yymsp[-3].minor.yy183 = yylhsminor.yy183; + yymsp[-3].minor.yy179 = yylhsminor.yy179; break; - case 135: /* typename ::= ids UNSIGNED */ -#line 346 "sql.y" + case 139: /* 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); - tSetColumnType (&yylhsminor.yy183, &yymsp[-1].minor.yy0); + tSetColumnType (&yylhsminor.yy179, &yymsp[-1].minor.yy0); } -#line 3144 "sql.c" - yymsp[-1].minor.yy183 = yylhsminor.yy183; - break; - case 136: /* signed ::= INTEGER */ -#line 353 "sql.y" -{ yylhsminor.yy325 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3150 "sql.c" - yymsp[0].minor.yy325 = yylhsminor.yy325; - break; - case 137: /* signed ::= PLUS INTEGER */ -#line 354 "sql.y" -{ yymsp[-1].minor.yy325 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } -#line 3156 "sql.c" - break; - case 138: /* signed ::= MINUS INTEGER */ -#line 355 "sql.y" -{ yymsp[-1].minor.yy325 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);} -#line 3161 "sql.c" - break; - case 142: /* cmd ::= CREATE TABLE create_table_list */ -#line 361 "sql.y" -{ pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy438;} -#line 3166 "sql.c" - break; - case 143: /* create_table_list ::= create_from_stable */ -#line 365 "sql.y" + yymsp[-1].minor.yy179 = yylhsminor.yy179; + break; + case 140: /* signed ::= INTEGER */ +{ yylhsminor.yy403 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[0].minor.yy403 = yylhsminor.yy403; + break; + case 141: /* signed ::= PLUS INTEGER */ +{ yymsp[-1].minor.yy403 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + break; + case 142: /* signed ::= MINUS INTEGER */ +{ yymsp[-1].minor.yy403 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);} + break; + case 146: /* cmd ::= CREATE TABLE create_table_list */ +{ pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy336;} + break; + case 147: /* create_table_list ::= create_from_stable */ { SCreateTableSql* pCreateTable = calloc(1, sizeof(SCreateTableSql)); pCreateTable->childTableInfo = taosArrayInit(4, sizeof(SCreatedTableInfo)); - taosArrayPush(pCreateTable->childTableInfo, &yymsp[0].minor.yy152); + taosArrayPush(pCreateTable->childTableInfo, &yymsp[0].minor.yy42); pCreateTable->type = TSQL_CREATE_TABLE_FROM_STABLE; - yylhsminor.yy438 = pCreateTable; + yylhsminor.yy336 = pCreateTable; } -#line 3178 "sql.c" - yymsp[0].minor.yy438 = yylhsminor.yy438; + yymsp[0].minor.yy336 = yylhsminor.yy336; break; - case 144: /* create_table_list ::= create_table_list create_from_stable */ -#line 374 "sql.y" + case 148: /* create_table_list ::= create_table_list create_from_stable */ { - taosArrayPush(yymsp[-1].minor.yy438->childTableInfo, &yymsp[0].minor.yy152); - yylhsminor.yy438 = yymsp[-1].minor.yy438; + taosArrayPush(yymsp[-1].minor.yy336->childTableInfo, &yymsp[0].minor.yy42); + yylhsminor.yy336 = yymsp[-1].minor.yy336; } -#line 3187 "sql.c" - yymsp[-1].minor.yy438 = yylhsminor.yy438; + yymsp[-1].minor.yy336 = yylhsminor.yy336; break; - case 145: /* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ -#line 380 "sql.y" + case 149: /* create_table_args ::= ifnotexists ftblname LP columnlist RP */ { - yylhsminor.yy438 = tSetCreateTableInfo(yymsp[-1].minor.yy421, NULL, NULL, TSQL_CREATE_TABLE); - setSqlInfo(pInfo, yylhsminor.yy438, NULL, TSDB_SQL_CREATE_TABLE); + yylhsminor.yy336 = tSetCreateTableInfo(yymsp[-1].minor.yy247, NULL, NULL, TSQL_CREATE_TABLE); + setSqlInfo(pInfo, yylhsminor.yy336, NULL, TSDB_SQL_CREATE_TABLE); - yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - setCreatedTableName(pInfo, &yymsp[-4].minor.yy0, &yymsp[-5].minor.yy0); + setCreatedTableName(pInfo, &yymsp[-3].minor.yy0, &yymsp[-4].minor.yy0); } -#line 3199 "sql.c" - yymsp[-5].minor.yy438 = yylhsminor.yy438; + yymsp[-4].minor.yy336 = yylhsminor.yy336; break; - case 146: /* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ -#line 390 "sql.y" + case 150: /* create_stable_args ::= ifnotexists ftblname LP columnlist RP TAGS LP columnlist RP */ { - yylhsminor.yy438 = tSetCreateTableInfo(yymsp[-5].minor.yy421, yymsp[-1].minor.yy421, NULL, TSQL_CREATE_STABLE); - setSqlInfo(pInfo, yylhsminor.yy438, NULL, TSDB_SQL_CREATE_TABLE); + yylhsminor.yy336 = tSetCreateTableInfo(yymsp[-5].minor.yy247, yymsp[-1].minor.yy247, NULL, TSQL_CREATE_STABLE); + setSqlInfo(pInfo, yylhsminor.yy336, NULL, TSDB_SQL_CREATE_TABLE); - yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; - setCreatedTableName(pInfo, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0); + setCreatedTableName(pInfo, &yymsp[-7].minor.yy0, &yymsp[-8].minor.yy0); } -#line 3211 "sql.c" - yymsp[-9].minor.yy438 = yylhsminor.yy438; + yymsp[-8].minor.yy336 = yylhsminor.yy336; break; - case 147: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ -#line 401 "sql.y" + case 151: /* create_from_stable ::= ifnotexists ftblname USING ftblname TAGS LP tagitemlist RP */ { - yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; - yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; - yylhsminor.yy152 = createNewChildTableInfo(&yymsp[-5].minor.yy0, NULL, yymsp[-1].minor.yy421, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0); + yylhsminor.yy42 = createNewChildTableInfo(&yymsp[-4].minor.yy0, NULL, yymsp[-1].minor.yy247, &yymsp[-6].minor.yy0, &yymsp[-7].minor.yy0); } -#line 3221 "sql.c" - yymsp[-9].minor.yy152 = yylhsminor.yy152; + yymsp[-7].minor.yy42 = yylhsminor.yy42; break; - case 148: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ -#line 407 "sql.y" + case 152: /* create_from_stable ::= ifnotexists ftblname USING ftblname 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; - yylhsminor.yy152 = createNewChildTableInfo(&yymsp[-8].minor.yy0, yymsp[-5].minor.yy421, yymsp[-1].minor.yy421, &yymsp[-11].minor.yy0, &yymsp[-12].minor.yy0); + yylhsminor.yy42 = createNewChildTableInfo(&yymsp[-7].minor.yy0, yymsp[-5].minor.yy247, yymsp[-1].minor.yy247, &yymsp[-9].minor.yy0, &yymsp[-10].minor.yy0); } -#line 3231 "sql.c" - yymsp[-12].minor.yy152 = yylhsminor.yy152; - break; - case 149: /* tagNamelist ::= tagNamelist COMMA ids */ -#line 415 "sql.y" -{taosArrayPush(yymsp[-2].minor.yy421, &yymsp[0].minor.yy0); yylhsminor.yy421 = yymsp[-2].minor.yy421; } -#line 3237 "sql.c" - yymsp[-2].minor.yy421 = yylhsminor.yy421; - break; - case 150: /* tagNamelist ::= ids */ -#line 416 "sql.y" -{yylhsminor.yy421 = taosArrayInit(4, sizeof(SStrToken)); taosArrayPush(yylhsminor.yy421, &yymsp[0].minor.yy0);} -#line 3243 "sql.c" - yymsp[0].minor.yy421 = yylhsminor.yy421; - break; - case 151: /* create_table_args ::= ifnotexists ids cpxName AS select */ -#line 420 "sql.y" + yymsp[-10].minor.yy42 = yylhsminor.yy42; + break; + case 153: /* tagNamelist ::= tagNamelist COMMA ids */ +{taosArrayPush(yymsp[-2].minor.yy247, &yymsp[0].minor.yy0); yylhsminor.yy247 = yymsp[-2].minor.yy247; } + yymsp[-2].minor.yy247 = yylhsminor.yy247; + break; + case 154: /* tagNamelist ::= ids */ +{yylhsminor.yy247 = taosArrayInit(4, sizeof(SStrToken)); taosArrayPush(yylhsminor.yy247, &yymsp[0].minor.yy0);} + yymsp[0].minor.yy247 = yylhsminor.yy247; + break; + case 155: /* create_table_args ::= ifnotexists ftblname AS select */ { - yylhsminor.yy438 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy56, TSQL_CREATE_STREAM); - setSqlInfo(pInfo, yylhsminor.yy438, NULL, TSDB_SQL_CREATE_TABLE); + yylhsminor.yy336 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy246, TSQL_CREATE_STREAM); + setSqlInfo(pInfo, yylhsminor.yy336, NULL, TSDB_SQL_CREATE_TABLE); - yymsp[-3].minor.yy0.n += yymsp[-2].minor.yy0.n; - setCreatedTableName(pInfo, &yymsp[-3].minor.yy0, &yymsp[-4].minor.yy0); + setCreatedTableName(pInfo, &yymsp[-2].minor.yy0, &yymsp[-3].minor.yy0); } -#line 3255 "sql.c" - yymsp[-4].minor.yy438 = yylhsminor.yy438; - break; - case 152: /* columnlist ::= columnlist COMMA column */ -#line 431 "sql.y" -{taosArrayPush(yymsp[-2].minor.yy421, &yymsp[0].minor.yy183); yylhsminor.yy421 = yymsp[-2].minor.yy421; } -#line 3261 "sql.c" - yymsp[-2].minor.yy421 = yylhsminor.yy421; - break; - case 153: /* columnlist ::= column */ -#line 432 "sql.y" -{yylhsminor.yy421 = taosArrayInit(4, sizeof(TAOS_FIELD)); taosArrayPush(yylhsminor.yy421, &yymsp[0].minor.yy183);} -#line 3267 "sql.c" - yymsp[0].minor.yy421 = yylhsminor.yy421; - break; - case 154: /* column ::= ids typename */ -#line 436 "sql.y" + yymsp[-3].minor.yy336 = yylhsminor.yy336; + break; + case 156: /* columnlist ::= columnlist COMMA column */ +{taosArrayPush(yymsp[-2].minor.yy247, &yymsp[0].minor.yy179); yylhsminor.yy247 = yymsp[-2].minor.yy247; } + yymsp[-2].minor.yy247 = yylhsminor.yy247; + break; + case 157: /* columnlist ::= column */ +{yylhsminor.yy247 = taosArrayInit(4, sizeof(TAOS_FIELD)); taosArrayPush(yylhsminor.yy247, &yymsp[0].minor.yy179);} + yymsp[0].minor.yy247 = yylhsminor.yy247; + break; + case 158: /* column ::= ids typename */ { - tSetColumnInfo(&yylhsminor.yy183, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy183); + tSetColumnInfo(&yylhsminor.yy179, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy179); } -#line 3275 "sql.c" - yymsp[-1].minor.yy183 = yylhsminor.yy183; - break; - case 161: /* tagitem ::= NULL */ -#line 451 "sql.y" -{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy430, &yymsp[0].minor.yy0); } -#line 3281 "sql.c" - yymsp[0].minor.yy430 = yylhsminor.yy430; - break; - case 162: /* tagitem ::= NOW */ -#line 452 "sql.y" -{ yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreate(&yylhsminor.yy430, &yymsp[0].minor.yy0);} -#line 3287 "sql.c" - yymsp[0].minor.yy430 = yylhsminor.yy430; - break; - case 163: /* tagitem ::= MINUS INTEGER */ - case 164: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==164); - case 165: /* tagitem ::= PLUS INTEGER */ yytestcase(yyruleno==165); - case 166: /* tagitem ::= PLUS FLOAT */ yytestcase(yyruleno==166); -#line 454 "sql.y" + yymsp[-1].minor.yy179 = yylhsminor.yy179; + break; + case 165: /* tagitem ::= NULL */ +{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy378, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy378 = yylhsminor.yy378; + break; + case 166: /* tagitem ::= NOW */ +{ yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreate(&yylhsminor.yy378, &yymsp[0].minor.yy0);} + yymsp[0].minor.yy378 = yylhsminor.yy378; + break; + case 167: /* tagitem ::= MINUS INTEGER */ + case 168: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==168); + case 169: /* tagitem ::= PLUS INTEGER */ yytestcase(yyruleno==169); + case 170: /* tagitem ::= PLUS FLOAT */ yytestcase(yyruleno==170); { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = yymsp[0].minor.yy0.type; toTSDBType(yymsp[-1].minor.yy0.type); - tVariantCreate(&yylhsminor.yy430, &yymsp[-1].minor.yy0); + tVariantCreate(&yylhsminor.yy378, &yymsp[-1].minor.yy0); } -#line 3301 "sql.c" - yymsp[-1].minor.yy430 = yylhsminor.yy430; + yymsp[-1].minor.yy378 = yylhsminor.yy378; break; - case 167: /* select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ -#line 485 "sql.y" + case 171: /* select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ { - yylhsminor.yy56 = tSetQuerySqlNode(&yymsp[-13].minor.yy0, yymsp[-12].minor.yy421, yymsp[-11].minor.yy8, yymsp[-10].minor.yy439, yymsp[-4].minor.yy421, yymsp[-2].minor.yy421, &yymsp[-9].minor.yy400, &yymsp[-7].minor.yy147, &yymsp[-6].minor.yy40, &yymsp[-8].minor.yy0, yymsp[-5].minor.yy421, &yymsp[0].minor.yy166, &yymsp[-1].minor.yy166, yymsp[-3].minor.yy439); + yylhsminor.yy246 = tSetQuerySqlNode(&yymsp[-13].minor.yy0, yymsp[-12].minor.yy247, yymsp[-11].minor.yy46, yymsp[-10].minor.yy44, yymsp[-4].minor.yy247, yymsp[-2].minor.yy247, &yymsp[-9].minor.yy430, &yymsp[-7].minor.yy507, &yymsp[-6].minor.yy492, &yymsp[-8].minor.yy0, yymsp[-5].minor.yy247, &yymsp[0].minor.yy204, &yymsp[-1].minor.yy204, yymsp[-3].minor.yy44); } -#line 3309 "sql.c" - yymsp[-13].minor.yy56 = yylhsminor.yy56; - break; - case 168: /* select ::= LP select RP */ -#line 489 "sql.y" -{yymsp[-2].minor.yy56 = yymsp[-1].minor.yy56;} -#line 3315 "sql.c" - break; - case 169: /* union ::= select */ -#line 493 "sql.y" -{ yylhsminor.yy421 = setSubclause(NULL, yymsp[0].minor.yy56); } -#line 3320 "sql.c" - yymsp[0].minor.yy421 = yylhsminor.yy421; - break; - case 170: /* union ::= union UNION ALL select */ -#line 494 "sql.y" -{ yylhsminor.yy421 = appendSelectClause(yymsp[-3].minor.yy421, yymsp[0].minor.yy56); } -#line 3326 "sql.c" - yymsp[-3].minor.yy421 = yylhsminor.yy421; - break; - case 171: /* cmd ::= union */ -#line 496 "sql.y" -{ setSqlInfo(pInfo, yymsp[0].minor.yy421, NULL, TSDB_SQL_SELECT); } -#line 3332 "sql.c" - break; - case 172: /* select ::= SELECT selcollist */ -#line 503 "sql.y" + yymsp[-13].minor.yy246 = yylhsminor.yy246; + break; + case 172: /* select ::= LP select RP */ +{yymsp[-2].minor.yy246 = yymsp[-1].minor.yy246;} + break; + case 173: /* union ::= select */ +{ yylhsminor.yy247 = setSubclause(NULL, yymsp[0].minor.yy246); } + yymsp[0].minor.yy247 = yylhsminor.yy247; + break; + case 174: /* union ::= union UNION ALL select */ +{ yylhsminor.yy247 = appendSelectClause(yymsp[-3].minor.yy247, yymsp[0].minor.yy246); } + yymsp[-3].minor.yy247 = yylhsminor.yy247; + break; + case 175: /* cmd ::= union */ +{ setSqlInfo(pInfo, yymsp[0].minor.yy247, NULL, TSDB_SQL_SELECT); } + break; + case 176: /* select ::= SELECT selcollist */ { - yylhsminor.yy56 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy421, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + yylhsminor.yy246 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy247, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); } -#line 3339 "sql.c" - yymsp[-1].minor.yy56 = yylhsminor.yy56; - break; - case 173: /* sclp ::= selcollist COMMA */ -#line 515 "sql.y" -{yylhsminor.yy421 = yymsp[-1].minor.yy421;} -#line 3345 "sql.c" - yymsp[-1].minor.yy421 = yylhsminor.yy421; - break; - case 174: /* sclp ::= */ - case 206: /* orderby_opt ::= */ yytestcase(yyruleno==206); -#line 516 "sql.y" -{yymsp[1].minor.yy421 = 0;} -#line 3352 "sql.c" - break; - case 175: /* selcollist ::= sclp distinct expr as */ -#line 517 "sql.y" + yymsp[-1].minor.yy246 = yylhsminor.yy246; + break; + case 177: /* sclp ::= selcollist COMMA */ +{yylhsminor.yy247 = yymsp[-1].minor.yy247;} + yymsp[-1].minor.yy247 = yylhsminor.yy247; + break; + case 178: /* sclp ::= */ + case 210: /* orderby_opt ::= */ yytestcase(yyruleno==210); +{yymsp[1].minor.yy247 = 0;} + break; + case 179: /* selcollist ::= sclp distinct expr as */ { - yylhsminor.yy421 = tSqlExprListAppend(yymsp[-3].minor.yy421, yymsp[-1].minor.yy439, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0); + yylhsminor.yy247 = tSqlExprListAppend(yymsp[-3].minor.yy247, yymsp[-1].minor.yy44, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0); } -#line 3359 "sql.c" - yymsp[-3].minor.yy421 = yylhsminor.yy421; + yymsp[-3].minor.yy247 = yylhsminor.yy247; break; - case 176: /* selcollist ::= sclp STAR */ -#line 521 "sql.y" + case 180: /* selcollist ::= sclp STAR */ { tSqlExpr *pNode = tSqlExprCreateIdValue(NULL, TK_ALL); - yylhsminor.yy421 = tSqlExprListAppend(yymsp[-1].minor.yy421, pNode, 0, 0); + yylhsminor.yy247 = tSqlExprListAppend(yymsp[-1].minor.yy247, pNode, 0, 0); } -#line 3368 "sql.c" - yymsp[-1].minor.yy421 = yylhsminor.yy421; + yymsp[-1].minor.yy247 = yylhsminor.yy247; break; - case 177: /* as ::= AS ids */ -#line 529 "sql.y" + case 181: /* as ::= AS ids */ { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } -#line 3374 "sql.c" break; - case 178: /* as ::= ids */ -#line 530 "sql.y" + case 182: /* as ::= ids */ { yylhsminor.yy0 = yymsp[0].minor.yy0; } -#line 3379 "sql.c" yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 179: /* as ::= */ -#line 531 "sql.y" + case 183: /* as ::= */ { yymsp[1].minor.yy0.n = 0; } -#line 3385 "sql.c" break; - case 180: /* distinct ::= DISTINCT */ -#line 534 "sql.y" + case 184: /* distinct ::= DISTINCT */ { yylhsminor.yy0 = yymsp[0].minor.yy0; } -#line 3390 "sql.c" yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 182: /* from ::= FROM tablelist */ - case 183: /* from ::= FROM sub */ yytestcase(yyruleno==183); -#line 540 "sql.y" -{yymsp[-1].minor.yy8 = yymsp[0].minor.yy8;} -#line 3397 "sql.c" - break; - case 184: /* sub ::= LP union RP */ -#line 545 "sql.y" -{yymsp[-2].minor.yy8 = addSubqueryElem(NULL, yymsp[-1].minor.yy421, NULL);} -#line 3402 "sql.c" - break; - case 185: /* sub ::= LP union RP ids */ -#line 546 "sql.y" -{yymsp[-3].minor.yy8 = addSubqueryElem(NULL, yymsp[-2].minor.yy421, &yymsp[0].minor.yy0);} -#line 3407 "sql.c" - break; - case 186: /* sub ::= sub COMMA LP union RP ids */ -#line 547 "sql.y" -{yylhsminor.yy8 = addSubqueryElem(yymsp[-5].minor.yy8, yymsp[-2].minor.yy421, &yymsp[0].minor.yy0);} -#line 3412 "sql.c" - yymsp[-5].minor.yy8 = yylhsminor.yy8; - break; - case 187: /* tablelist ::= ids cpxName */ -#line 551 "sql.y" + case 186: /* from ::= FROM tablelist */ + case 187: /* from ::= FROM sub */ yytestcase(yyruleno==187); +{yymsp[-1].minor.yy46 = yymsp[0].minor.yy46;} + break; + case 188: /* sub ::= LP union RP */ +{yymsp[-2].minor.yy46 = addSubqueryElem(NULL, yymsp[-1].minor.yy247, NULL);} + break; + case 189: /* sub ::= LP union RP ids */ +{yymsp[-3].minor.yy46 = addSubqueryElem(NULL, yymsp[-2].minor.yy247, &yymsp[0].minor.yy0);} + break; + case 190: /* sub ::= sub COMMA LP union RP ids */ +{yylhsminor.yy46 = addSubqueryElem(yymsp[-5].minor.yy46, yymsp[-2].minor.yy247, &yymsp[0].minor.yy0);} + yymsp[-5].minor.yy46 = yylhsminor.yy46; + break; + case 191: /* tablelist ::= ftblname */ { - yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - yylhsminor.yy8 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL); + yylhsminor.yy46 = setTableNameList(NULL, &yymsp[0].minor.yy0, NULL); } -#line 3421 "sql.c" - yymsp[-1].minor.yy8 = yylhsminor.yy8; + yymsp[0].minor.yy46 = yylhsminor.yy46; break; - case 188: /* tablelist ::= ids cpxName ids */ -#line 556 "sql.y" + case 192: /* tablelist ::= ftblname ids */ { - yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; - yylhsminor.yy8 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); + yylhsminor.yy46 = setTableNameList(NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 3430 "sql.c" - yymsp[-2].minor.yy8 = yylhsminor.yy8; + yymsp[-1].minor.yy46 = yylhsminor.yy46; break; - case 189: /* tablelist ::= tablelist COMMA ids cpxName */ -#line 561 "sql.y" + case 193: /* tablelist ::= tablelist COMMA ftblname */ { - yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - yylhsminor.yy8 = setTableNameList(yymsp[-3].minor.yy8, &yymsp[-1].minor.yy0, NULL); + yylhsminor.yy46 = setTableNameList(yymsp[-2].minor.yy46, &yymsp[0].minor.yy0, NULL); } -#line 3439 "sql.c" - yymsp[-3].minor.yy8 = yylhsminor.yy8; + yymsp[-2].minor.yy46 = yylhsminor.yy46; break; - case 190: /* tablelist ::= tablelist COMMA ids cpxName ids */ -#line 566 "sql.y" + case 194: /* tablelist ::= tablelist COMMA ftblname ids */ { - yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; - yylhsminor.yy8 = setTableNameList(yymsp[-4].minor.yy8, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); + yylhsminor.yy46 = setTableNameList(yymsp[-3].minor.yy46, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 3448 "sql.c" - yymsp[-4].minor.yy8 = yylhsminor.yy8; + yymsp[-3].minor.yy46 = yylhsminor.yy46; break; - case 191: /* tmvar ::= VARIABLE */ -#line 573 "sql.y" + case 195: /* tmvar ::= VARIABLE */ {yylhsminor.yy0 = yymsp[0].minor.yy0;} -#line 3454 "sql.c" yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 192: /* interval_option ::= intervalKey LP tmvar RP */ -#line 576 "sql.y" -{yylhsminor.yy400.interval = yymsp[-1].minor.yy0; yylhsminor.yy400.offset.n = 0; yylhsminor.yy400.token = yymsp[-3].minor.yy104;} -#line 3460 "sql.c" - yymsp[-3].minor.yy400 = yylhsminor.yy400; - break; - case 193: /* interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ -#line 577 "sql.y" -{yylhsminor.yy400.interval = yymsp[-3].minor.yy0; yylhsminor.yy400.offset = yymsp[-1].minor.yy0; yylhsminor.yy400.token = yymsp[-5].minor.yy104;} -#line 3466 "sql.c" - yymsp[-5].minor.yy400 = yylhsminor.yy400; - break; - case 194: /* interval_option ::= */ -#line 578 "sql.y" -{memset(&yymsp[1].minor.yy400, 0, sizeof(yymsp[1].minor.yy400));} -#line 3472 "sql.c" - break; - case 195: /* intervalKey ::= INTERVAL */ -#line 581 "sql.y" -{yymsp[0].minor.yy104 = TK_INTERVAL;} -#line 3477 "sql.c" - break; - case 196: /* intervalKey ::= EVERY */ -#line 582 "sql.y" -{yymsp[0].minor.yy104 = TK_EVERY; } -#line 3482 "sql.c" - break; - case 197: /* session_option ::= */ -#line 585 "sql.y" -{yymsp[1].minor.yy147.col.n = 0; yymsp[1].minor.yy147.gap.n = 0;} -#line 3487 "sql.c" - break; - case 198: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ -#line 586 "sql.y" + case 196: /* interval_option ::= intervalKey LP tmvar RP */ +{yylhsminor.yy430.interval = yymsp[-1].minor.yy0; yylhsminor.yy430.offset.n = 0; yylhsminor.yy430.token = yymsp[-3].minor.yy2;} + yymsp[-3].minor.yy430 = yylhsminor.yy430; + break; + case 197: /* interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ +{yylhsminor.yy430.interval = yymsp[-3].minor.yy0; yylhsminor.yy430.offset = yymsp[-1].minor.yy0; yylhsminor.yy430.token = yymsp[-5].minor.yy2;} + yymsp[-5].minor.yy430 = yylhsminor.yy430; + break; + case 198: /* interval_option ::= */ +{memset(&yymsp[1].minor.yy430, 0, sizeof(yymsp[1].minor.yy430));} + break; + case 199: /* intervalKey ::= INTERVAL */ +{yymsp[0].minor.yy2 = TK_INTERVAL;} + break; + case 200: /* intervalKey ::= EVERY */ +{yymsp[0].minor.yy2 = TK_EVERY; } + break; + case 201: /* session_option ::= */ +{yymsp[1].minor.yy507.col.n = 0; yymsp[1].minor.yy507.gap.n = 0;} + break; + case 202: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - yymsp[-6].minor.yy147.col = yymsp[-4].minor.yy0; - yymsp[-6].minor.yy147.gap = yymsp[-1].minor.yy0; + yymsp[-6].minor.yy507.col = yymsp[-4].minor.yy0; + yymsp[-6].minor.yy507.gap = yymsp[-1].minor.yy0; } -#line 3496 "sql.c" break; - case 199: /* windowstate_option ::= */ -#line 593 "sql.y" -{ yymsp[1].minor.yy40.col.n = 0; yymsp[1].minor.yy40.col.z = NULL;} -#line 3501 "sql.c" + case 203: /* windowstate_option ::= */ +{ yymsp[1].minor.yy492.col.n = 0; yymsp[1].minor.yy492.col.z = NULL;} break; - case 200: /* windowstate_option ::= STATE_WINDOW LP ids RP */ -#line 594 "sql.y" -{ yymsp[-3].minor.yy40.col = yymsp[-1].minor.yy0; } -#line 3506 "sql.c" + case 204: /* windowstate_option ::= STATE_WINDOW LP ids RP */ +{ yymsp[-3].minor.yy492.col = yymsp[-1].minor.yy0; } break; - case 201: /* fill_opt ::= */ -#line 598 "sql.y" -{ yymsp[1].minor.yy421 = 0; } -#line 3511 "sql.c" + case 205: /* fill_opt ::= */ +{ yymsp[1].minor.yy247 = 0; } break; - case 202: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ -#line 599 "sql.y" + case 206: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ { tVariant A = {0}; toTSDBType(yymsp[-3].minor.yy0.type); tVariantCreate(&A, &yymsp[-3].minor.yy0); - tVariantListInsert(yymsp[-1].minor.yy421, &A, -1, 0); - yymsp[-5].minor.yy421 = yymsp[-1].minor.yy421; + tVariantListInsert(yymsp[-1].minor.yy247, &A, -1, 0); + yymsp[-5].minor.yy247 = yymsp[-1].minor.yy247; } -#line 3523 "sql.c" break; - case 203: /* fill_opt ::= FILL LP ID RP */ -#line 608 "sql.y" + case 207: /* fill_opt ::= FILL LP ID RP */ { toTSDBType(yymsp[-1].minor.yy0.type); - yymsp[-3].minor.yy421 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1); + yymsp[-3].minor.yy247 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1); } -#line 3531 "sql.c" break; - case 204: /* sliding_opt ::= SLIDING LP tmvar RP */ -#line 614 "sql.y" + case 208: /* sliding_opt ::= SLIDING LP tmvar RP */ {yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0; } -#line 3536 "sql.c" break; - case 205: /* sliding_opt ::= */ -#line 615 "sql.y" + case 209: /* sliding_opt ::= */ {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = NULL; yymsp[1].minor.yy0.type = 0; } -#line 3541 "sql.c" break; - case 207: /* orderby_opt ::= ORDER BY sortlist */ -#line 627 "sql.y" -{yymsp[-2].minor.yy421 = yymsp[0].minor.yy421;} -#line 3546 "sql.c" + case 211: /* orderby_opt ::= ORDER BY sortlist */ +{yymsp[-2].minor.yy247 = yymsp[0].minor.yy247;} break; - case 208: /* sortlist ::= sortlist COMMA item sortorder */ -#line 629 "sql.y" + case 212: /* sortlist ::= sortlist COMMA item sortorder */ { - yylhsminor.yy421 = tVariantListAppend(yymsp[-3].minor.yy421, &yymsp[-1].minor.yy430, yymsp[0].minor.yy96); + yylhsminor.yy247 = tVariantListAppend(yymsp[-3].minor.yy247, &yymsp[-1].minor.yy378, yymsp[0].minor.yy222); } -#line 3553 "sql.c" - yymsp[-3].minor.yy421 = yylhsminor.yy421; + yymsp[-3].minor.yy247 = yylhsminor.yy247; break; - case 209: /* sortlist ::= item sortorder */ -#line 633 "sql.y" + case 213: /* sortlist ::= item sortorder */ { - yylhsminor.yy421 = tVariantListAppend(NULL, &yymsp[-1].minor.yy430, yymsp[0].minor.yy96); + yylhsminor.yy247 = tVariantListAppend(NULL, &yymsp[-1].minor.yy378, yymsp[0].minor.yy222); } -#line 3561 "sql.c" - yymsp[-1].minor.yy421 = yylhsminor.yy421; + yymsp[-1].minor.yy247 = yylhsminor.yy247; break; - case 210: /* item ::= ids cpxName */ -#line 638 "sql.y" + case 214: /* item ::= ids cpxName */ { toTSDBType(yymsp[-1].minor.yy0.type); yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - tVariantCreate(&yylhsminor.yy430, &yymsp[-1].minor.yy0); + tVariantCreate(&yylhsminor.yy378, &yymsp[-1].minor.yy0); } -#line 3572 "sql.c" - yymsp[-1].minor.yy430 = yylhsminor.yy430; - break; - case 211: /* sortorder ::= ASC */ -#line 646 "sql.y" -{ yymsp[0].minor.yy96 = TSDB_ORDER_ASC; } -#line 3578 "sql.c" - break; - case 212: /* sortorder ::= DESC */ -#line 647 "sql.y" -{ yymsp[0].minor.yy96 = TSDB_ORDER_DESC;} -#line 3583 "sql.c" - break; - case 213: /* sortorder ::= */ -#line 648 "sql.y" -{ yymsp[1].minor.yy96 = TSDB_ORDER_ASC; } -#line 3588 "sql.c" - break; - case 214: /* groupby_opt ::= */ -#line 656 "sql.y" -{ yymsp[1].minor.yy421 = 0;} -#line 3593 "sql.c" - break; - case 215: /* groupby_opt ::= GROUP BY grouplist */ -#line 657 "sql.y" -{ yymsp[-2].minor.yy421 = yymsp[0].minor.yy421;} -#line 3598 "sql.c" - break; - case 216: /* grouplist ::= grouplist COMMA item */ -#line 659 "sql.y" + yymsp[-1].minor.yy378 = yylhsminor.yy378; + break; + case 215: /* sortorder ::= ASC */ +{ yymsp[0].minor.yy222 = TSDB_ORDER_ASC; } + break; + case 216: /* sortorder ::= DESC */ +{ yymsp[0].minor.yy222 = TSDB_ORDER_DESC;} + break; + case 217: /* sortorder ::= */ +{ yymsp[1].minor.yy222 = TSDB_ORDER_ASC; } + break; + case 218: /* groupby_opt ::= */ +{ yymsp[1].minor.yy247 = 0;} + break; + case 219: /* groupby_opt ::= GROUP BY grouplist */ +{ yymsp[-2].minor.yy247 = yymsp[0].minor.yy247;} + break; + case 220: /* grouplist ::= grouplist COMMA item */ { - yylhsminor.yy421 = tVariantListAppend(yymsp[-2].minor.yy421, &yymsp[0].minor.yy430, -1); + yylhsminor.yy247 = tVariantListAppend(yymsp[-2].minor.yy247, &yymsp[0].minor.yy378, -1); } -#line 3605 "sql.c" - yymsp[-2].minor.yy421 = yylhsminor.yy421; + yymsp[-2].minor.yy247 = yylhsminor.yy247; break; - case 217: /* grouplist ::= item */ -#line 663 "sql.y" + case 221: /* grouplist ::= item */ { - yylhsminor.yy421 = tVariantListAppend(NULL, &yymsp[0].minor.yy430, -1); + yylhsminor.yy247 = tVariantListAppend(NULL, &yymsp[0].minor.yy378, -1); } -#line 3613 "sql.c" - yymsp[0].minor.yy421 = yylhsminor.yy421; - break; - case 218: /* having_opt ::= */ - case 228: /* where_opt ::= */ yytestcase(yyruleno==228); - case 272: /* expritem ::= */ yytestcase(yyruleno==272); -#line 670 "sql.y" -{yymsp[1].minor.yy439 = 0;} -#line 3621 "sql.c" - break; - case 219: /* having_opt ::= HAVING expr */ - case 229: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==229); -#line 671 "sql.y" -{yymsp[-1].minor.yy439 = yymsp[0].minor.yy439;} -#line 3627 "sql.c" - break; - case 220: /* limit_opt ::= */ - case 224: /* slimit_opt ::= */ yytestcase(yyruleno==224); -#line 675 "sql.y" -{yymsp[1].minor.yy166.limit = -1; yymsp[1].minor.yy166.offset = 0;} -#line 3633 "sql.c" - break; - case 221: /* limit_opt ::= LIMIT signed */ - case 225: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==225); -#line 676 "sql.y" -{yymsp[-1].minor.yy166.limit = yymsp[0].minor.yy325; yymsp[-1].minor.yy166.offset = 0;} -#line 3639 "sql.c" - break; - case 222: /* limit_opt ::= LIMIT signed OFFSET signed */ -#line 678 "sql.y" -{ yymsp[-3].minor.yy166.limit = yymsp[-2].minor.yy325; yymsp[-3].minor.yy166.offset = yymsp[0].minor.yy325;} -#line 3644 "sql.c" - break; - case 223: /* limit_opt ::= LIMIT signed COMMA signed */ -#line 680 "sql.y" -{ yymsp[-3].minor.yy166.limit = yymsp[0].minor.yy325; yymsp[-3].minor.yy166.offset = yymsp[-2].minor.yy325;} -#line 3649 "sql.c" - break; - case 226: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ -#line 686 "sql.y" -{yymsp[-3].minor.yy166.limit = yymsp[-2].minor.yy325; yymsp[-3].minor.yy166.offset = yymsp[0].minor.yy325;} -#line 3654 "sql.c" - break; - case 227: /* slimit_opt ::= SLIMIT signed COMMA signed */ -#line 688 "sql.y" -{yymsp[-3].minor.yy166.limit = yymsp[0].minor.yy325; yymsp[-3].minor.yy166.offset = yymsp[-2].minor.yy325;} -#line 3659 "sql.c" - break; - case 230: /* expr ::= LP expr RP */ -#line 701 "sql.y" -{yylhsminor.yy439 = yymsp[-1].minor.yy439; yylhsminor.yy439->exprToken.z = yymsp[-2].minor.yy0.z; yylhsminor.yy439->exprToken.n = (yymsp[0].minor.yy0.z - yymsp[-2].minor.yy0.z + 1);} -#line 3664 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 231: /* expr ::= ID */ -#line 703 "sql.y" -{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_ID);} -#line 3670 "sql.c" - yymsp[0].minor.yy439 = yylhsminor.yy439; - break; - case 232: /* expr ::= ID DOT ID */ -#line 704 "sql.y" -{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ID);} -#line 3676 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 233: /* expr ::= ID DOT STAR */ -#line 705 "sql.y" -{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ALL);} -#line 3682 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 234: /* expr ::= INTEGER */ -#line 707 "sql.y" -{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_INTEGER);} -#line 3688 "sql.c" - yymsp[0].minor.yy439 = yylhsminor.yy439; - break; - case 235: /* expr ::= MINUS INTEGER */ - case 236: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==236); -#line 708 "sql.y" -{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_INTEGER);} -#line 3695 "sql.c" - yymsp[-1].minor.yy439 = yylhsminor.yy439; - break; - case 237: /* expr ::= FLOAT */ -#line 710 "sql.y" -{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_FLOAT);} -#line 3701 "sql.c" - yymsp[0].minor.yy439 = yylhsminor.yy439; - break; - case 238: /* expr ::= MINUS FLOAT */ - case 239: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==239); -#line 711 "sql.y" -{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_FLOAT);} -#line 3708 "sql.c" - yymsp[-1].minor.yy439 = yylhsminor.yy439; - break; - case 240: /* expr ::= STRING */ -#line 713 "sql.y" -{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_STRING);} -#line 3714 "sql.c" - yymsp[0].minor.yy439 = yylhsminor.yy439; - break; - case 241: /* expr ::= NOW */ -#line 714 "sql.y" -{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NOW); } -#line 3720 "sql.c" - yymsp[0].minor.yy439 = yylhsminor.yy439; - break; - case 242: /* expr ::= VARIABLE */ -#line 715 "sql.y" -{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);} -#line 3726 "sql.c" - yymsp[0].minor.yy439 = yylhsminor.yy439; - break; - case 243: /* expr ::= PLUS VARIABLE */ - case 244: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==244); -#line 716 "sql.y" -{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_VARIABLE);} -#line 3733 "sql.c" - yymsp[-1].minor.yy439 = yylhsminor.yy439; - break; - case 245: /* expr ::= BOOL */ -#line 718 "sql.y" -{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);} -#line 3739 "sql.c" - yymsp[0].minor.yy439 = yylhsminor.yy439; - break; - case 246: /* expr ::= NULL */ -#line 719 "sql.y" -{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);} -#line 3745 "sql.c" - yymsp[0].minor.yy439 = yylhsminor.yy439; - break; - case 247: /* expr ::= ID LP exprlist RP */ -#line 722 "sql.y" -{ tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy439 = tSqlExprCreateFunction(yymsp[-1].minor.yy421, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } -#line 3751 "sql.c" - yymsp[-3].minor.yy439 = yylhsminor.yy439; - break; - case 248: /* expr ::= ID LP STAR RP */ -#line 725 "sql.y" -{ tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy439 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } -#line 3757 "sql.c" - yymsp[-3].minor.yy439 = yylhsminor.yy439; - break; - case 249: /* expr ::= expr IS NULL */ -#line 728 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, NULL, TK_ISNULL);} -#line 3763 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 250: /* expr ::= expr IS NOT NULL */ -#line 729 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-3].minor.yy439, NULL, TK_NOTNULL);} -#line 3769 "sql.c" - yymsp[-3].minor.yy439 = yylhsminor.yy439; - break; - case 251: /* expr ::= expr LT expr */ -#line 732 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_LT);} -#line 3775 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 252: /* expr ::= expr GT expr */ -#line 733 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_GT);} -#line 3781 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 253: /* expr ::= expr LE expr */ -#line 734 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_LE);} -#line 3787 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 254: /* expr ::= expr GE expr */ -#line 735 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_GE);} -#line 3793 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 255: /* expr ::= expr NE expr */ -#line 736 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_NE);} -#line 3799 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 256: /* expr ::= expr EQ expr */ -#line 737 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_EQ);} -#line 3805 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 257: /* expr ::= expr BETWEEN expr AND expr */ -#line 739 "sql.y" -{ tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy439); yylhsminor.yy439 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy439, yymsp[-2].minor.yy439, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy439, TK_LE), TK_AND);} -#line 3811 "sql.c" - yymsp[-4].minor.yy439 = yylhsminor.yy439; - break; - case 258: /* expr ::= expr AND expr */ -#line 741 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_AND);} -#line 3817 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 259: /* expr ::= expr OR expr */ -#line 742 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_OR); } -#line 3823 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 260: /* expr ::= expr PLUS expr */ -#line 745 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_PLUS); } -#line 3829 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 261: /* expr ::= expr MINUS expr */ -#line 746 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_MINUS); } -#line 3835 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 262: /* expr ::= expr STAR expr */ -#line 747 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_STAR); } -#line 3841 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 263: /* expr ::= expr SLASH expr */ -#line 748 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_DIVIDE);} -#line 3847 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 264: /* expr ::= expr REM expr */ -#line 749 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_REM); } -#line 3853 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 265: /* expr ::= expr LIKE expr */ -#line 752 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_LIKE); } -#line 3859 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 266: /* expr ::= expr MATCH expr */ -#line 755 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_MATCH); } -#line 3865 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 267: /* expr ::= expr NMATCH expr */ -#line 756 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_NMATCH); } -#line 3871 "sql.c" - yymsp[-2].minor.yy439 = yylhsminor.yy439; - break; - case 268: /* expr ::= expr IN LP exprlist RP */ -#line 759 "sql.y" -{yylhsminor.yy439 = tSqlExprCreate(yymsp[-4].minor.yy439, (tSqlExpr*)yymsp[-1].minor.yy421, TK_IN); } -#line 3877 "sql.c" - yymsp[-4].minor.yy439 = yylhsminor.yy439; - break; - case 269: /* exprlist ::= exprlist COMMA expritem */ -#line 767 "sql.y" -{yylhsminor.yy421 = tSqlExprListAppend(yymsp[-2].minor.yy421,yymsp[0].minor.yy439,0, 0);} -#line 3883 "sql.c" - yymsp[-2].minor.yy421 = yylhsminor.yy421; - break; - case 270: /* exprlist ::= expritem */ -#line 768 "sql.y" -{yylhsminor.yy421 = tSqlExprListAppend(0,yymsp[0].minor.yy439,0, 0);} -#line 3889 "sql.c" - yymsp[0].minor.yy421 = yylhsminor.yy421; - break; - case 271: /* expritem ::= expr */ -#line 769 "sql.y" -{yylhsminor.yy439 = yymsp[0].minor.yy439;} -#line 3895 "sql.c" - yymsp[0].minor.yy439 = yylhsminor.yy439; - break; - case 273: /* cmd ::= RESET QUERY CACHE */ -#line 773 "sql.y" + yymsp[0].minor.yy247 = yylhsminor.yy247; + break; + case 222: /* having_opt ::= */ + case 232: /* where_opt ::= */ yytestcase(yyruleno==232); + case 276: /* expritem ::= */ yytestcase(yyruleno==276); +{yymsp[1].minor.yy44 = 0;} + break; + case 223: /* having_opt ::= HAVING expr */ + case 233: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==233); +{yymsp[-1].minor.yy44 = yymsp[0].minor.yy44;} + break; + case 224: /* limit_opt ::= */ + case 228: /* slimit_opt ::= */ yytestcase(yyruleno==228); +{yymsp[1].minor.yy204.limit = -1; yymsp[1].minor.yy204.offset = 0;} + break; + case 225: /* limit_opt ::= LIMIT signed */ + case 229: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==229); +{yymsp[-1].minor.yy204.limit = yymsp[0].minor.yy403; yymsp[-1].minor.yy204.offset = 0;} + break; + case 226: /* limit_opt ::= LIMIT signed OFFSET signed */ +{ yymsp[-3].minor.yy204.limit = yymsp[-2].minor.yy403; yymsp[-3].minor.yy204.offset = yymsp[0].minor.yy403;} + break; + case 227: /* limit_opt ::= LIMIT signed COMMA signed */ +{ yymsp[-3].minor.yy204.limit = yymsp[0].minor.yy403; yymsp[-3].minor.yy204.offset = yymsp[-2].minor.yy403;} + break; + case 230: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ +{yymsp[-3].minor.yy204.limit = yymsp[-2].minor.yy403; yymsp[-3].minor.yy204.offset = yymsp[0].minor.yy403;} + break; + case 231: /* slimit_opt ::= SLIMIT signed COMMA signed */ +{yymsp[-3].minor.yy204.limit = yymsp[0].minor.yy403; yymsp[-3].minor.yy204.offset = yymsp[-2].minor.yy403;} + break; + case 234: /* expr ::= LP expr RP */ +{yylhsminor.yy44 = yymsp[-1].minor.yy44; yylhsminor.yy44->exprToken.z = yymsp[-2].minor.yy0.z; yylhsminor.yy44->exprToken.n = (yymsp[0].minor.yy0.z - yymsp[-2].minor.yy0.z + 1);} + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 235: /* expr ::= ID */ +{ yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_ID);} + yymsp[0].minor.yy44 = yylhsminor.yy44; + break; + case 236: /* expr ::= ID DOT ID */ +{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ID);} + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 237: /* expr ::= ID DOT STAR */ +{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ALL);} + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 238: /* expr ::= INTEGER */ +{ yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_INTEGER);} + yymsp[0].minor.yy44 = yylhsminor.yy44; + break; + case 239: /* expr ::= MINUS INTEGER */ + case 240: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==240); +{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_INTEGER);} + yymsp[-1].minor.yy44 = yylhsminor.yy44; + break; + case 241: /* expr ::= FLOAT */ +{ yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_FLOAT);} + yymsp[0].minor.yy44 = yylhsminor.yy44; + break; + case 242: /* expr ::= MINUS FLOAT */ + case 243: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==243); +{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_FLOAT);} + yymsp[-1].minor.yy44 = yylhsminor.yy44; + break; + case 244: /* expr ::= STRING */ +{ yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_STRING);} + yymsp[0].minor.yy44 = yylhsminor.yy44; + break; + case 245: /* expr ::= NOW */ +{ yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NOW); } + yymsp[0].minor.yy44 = yylhsminor.yy44; + break; + case 246: /* expr ::= VARIABLE */ +{ yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);} + yymsp[0].minor.yy44 = yylhsminor.yy44; + break; + case 247: /* expr ::= PLUS VARIABLE */ + case 248: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==248); +{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_VARIABLE);} + yymsp[-1].minor.yy44 = yylhsminor.yy44; + break; + case 249: /* expr ::= BOOL */ +{ yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);} + yymsp[0].minor.yy44 = yylhsminor.yy44; + break; + case 250: /* expr ::= NULL */ +{ yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);} + yymsp[0].minor.yy44 = yylhsminor.yy44; + break; + case 251: /* expr ::= ID LP exprlist RP */ +{ tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy44 = tSqlExprCreateFunction(yymsp[-1].minor.yy247, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } + yymsp[-3].minor.yy44 = yylhsminor.yy44; + break; + case 252: /* expr ::= ID LP STAR RP */ +{ tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy44 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } + yymsp[-3].minor.yy44 = yylhsminor.yy44; + break; + case 253: /* expr ::= expr IS NULL */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, NULL, TK_ISNULL);} + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 254: /* expr ::= expr IS NOT NULL */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-3].minor.yy44, NULL, TK_NOTNULL);} + yymsp[-3].minor.yy44 = yylhsminor.yy44; + break; + case 255: /* expr ::= expr LT expr */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_LT);} + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 256: /* expr ::= expr GT expr */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_GT);} + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 257: /* expr ::= expr LE expr */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_LE);} + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 258: /* expr ::= expr GE expr */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_GE);} + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 259: /* expr ::= expr NE expr */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_NE);} + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 260: /* expr ::= expr EQ expr */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_EQ);} + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 261: /* expr ::= expr BETWEEN expr AND expr */ +{ tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy44); yylhsminor.yy44 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy44, yymsp[-2].minor.yy44, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy44, TK_LE), TK_AND);} + yymsp[-4].minor.yy44 = yylhsminor.yy44; + break; + case 262: /* expr ::= expr AND expr */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_AND);} + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 263: /* expr ::= expr OR expr */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_OR); } + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 264: /* expr ::= expr PLUS expr */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_PLUS); } + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 265: /* expr ::= expr MINUS expr */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_MINUS); } + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 266: /* expr ::= expr STAR expr */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_STAR); } + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 267: /* expr ::= expr SLASH expr */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_DIVIDE);} + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 268: /* expr ::= expr REM expr */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_REM); } + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 269: /* expr ::= expr LIKE expr */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_LIKE); } + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 270: /* expr ::= expr MATCH expr */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_MATCH); } + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 271: /* expr ::= expr NMATCH expr */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_NMATCH); } + yymsp[-2].minor.yy44 = yylhsminor.yy44; + break; + case 272: /* expr ::= expr IN LP exprlist RP */ +{yylhsminor.yy44 = tSqlExprCreate(yymsp[-4].minor.yy44, (tSqlExpr*)yymsp[-1].minor.yy247, TK_IN); } + yymsp[-4].minor.yy44 = yylhsminor.yy44; + break; + case 273: /* exprlist ::= exprlist COMMA expritem */ +{yylhsminor.yy247 = tSqlExprListAppend(yymsp[-2].minor.yy247,yymsp[0].minor.yy44,0, 0);} + yymsp[-2].minor.yy247 = yylhsminor.yy247; + break; + case 274: /* exprlist ::= expritem */ +{yylhsminor.yy247 = tSqlExprListAppend(0,yymsp[0].minor.yy44,0, 0);} + yymsp[0].minor.yy247 = yylhsminor.yy247; + break; + case 275: /* expritem ::= expr */ +{yylhsminor.yy44 = yymsp[0].minor.yy44;} + yymsp[0].minor.yy44 = yylhsminor.yy44; + break; + case 277: /* cmd ::= RESET QUERY CACHE */ { setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);} -#line 3901 "sql.c" break; - case 274: /* cmd ::= SYNCDB ids REPLICA */ -#line 776 "sql.y" + case 278: /* cmd ::= SYNCDB ids REPLICA */ { setDCLSqlElems(pInfo, TSDB_SQL_SYNC_DB_REPLICA, 1, &yymsp[-1].minor.yy0);} -#line 3906 "sql.c" break; - case 275: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ -#line 779 "sql.y" + case 279: /* cmd ::= ALTER TABLE ftblname ADD COLUMN columnlist */ { - yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, yymsp[0].minor.yy247, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3915 "sql.c" break; - case 276: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ -#line 785 "sql.y" + case 280: /* cmd ::= ALTER TABLE ftblname DROP COLUMN ids */ { - yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - toTSDBType(yymsp[0].minor.yy0.type); SArray* K = tVariantListAppendToken(NULL, &yymsp[0].minor.yy0, -1); - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, K, TSDB_ALTER_TABLE_DROP_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, NULL, K, TSDB_ALTER_TABLE_DROP_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3928 "sql.c" break; - case 277: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ -#line 795 "sql.y" + case 281: /* cmd ::= ALTER TABLE ftblname MODIFY COLUMN columnlist */ { - yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, yymsp[0].minor.yy247, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3937 "sql.c" break; - case 278: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ -#line 802 "sql.y" + case 282: /* cmd ::= ALTER TABLE ftblname ADD TAG columnlist */ { - yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, yymsp[0].minor.yy247, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3946 "sql.c" break; - case 279: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ -#line 807 "sql.y" + case 283: /* cmd ::= ALTER TABLE ftblname DROP TAG ids */ { - yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - toTSDBType(yymsp[0].minor.yy0.type); SArray* A = tVariantListAppendToken(NULL, &yymsp[0].minor.yy0, -1); - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, A, TSDB_ALTER_TABLE_DROP_TAG_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, NULL, A, TSDB_ALTER_TABLE_DROP_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3959 "sql.c" break; - case 280: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ -#line 817 "sql.y" + case 284: /* cmd ::= ALTER TABLE ftblname CHANGE TAG ids ids */ { - yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; toTSDBType(yymsp[-1].minor.yy0.type); SArray* A = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1); @@ -3968,91 +3528,67 @@ static YYACTIONTYPE yy_reduce( toTSDBType(yymsp[0].minor.yy0.type); A = tVariantListAppendToken(A, &yymsp[0].minor.yy0, -1); - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-5].minor.yy0, NULL, A, TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, A, TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3975 "sql.c" break; - case 281: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ -#line 830 "sql.y" + case 285: /* cmd ::= ALTER TABLE ftblname SET TAG ids EQ tagitem */ { - yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; toTSDBType(yymsp[-2].minor.yy0.type); SArray* A = tVariantListAppendToken(NULL, &yymsp[-2].minor.yy0, -1); - A = tVariantListAppend(A, &yymsp[0].minor.yy430, -1); + A = tVariantListAppend(A, &yymsp[0].minor.yy378, -1); - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-5].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3989 "sql.c" break; - case 282: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ -#line 841 "sql.y" + case 286: /* cmd ::= ALTER TABLE ftblname MODIFY TAG columnlist */ { - yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, yymsp[0].minor.yy247, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 3998 "sql.c" break; - case 283: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ -#line 848 "sql.y" + case 287: /* cmd ::= ALTER STABLE ftblname ADD COLUMN columnlist */ { - yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, yymsp[0].minor.yy247, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4007 "sql.c" break; - case 284: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ -#line 854 "sql.y" + case 288: /* cmd ::= ALTER STABLE ftblname DROP COLUMN ids */ { - yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; toTSDBType(yymsp[0].minor.yy0.type); SArray* K = tVariantListAppendToken(NULL, &yymsp[0].minor.yy0, -1); - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, K, TSDB_ALTER_TABLE_DROP_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, NULL, K, TSDB_ALTER_TABLE_DROP_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4020 "sql.c" break; - case 285: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ -#line 864 "sql.y" + case 289: /* cmd ::= ALTER STABLE ftblname MODIFY COLUMN columnlist */ { - yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, yymsp[0].minor.yy247, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4029 "sql.c" break; - case 286: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ -#line 871 "sql.y" + case 290: /* cmd ::= ALTER STABLE ftblname ADD TAG columnlist */ { - yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, yymsp[0].minor.yy247, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4038 "sql.c" break; - case 287: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ -#line 876 "sql.y" + case 291: /* cmd ::= ALTER STABLE ftblname DROP TAG ids */ { - yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; toTSDBType(yymsp[0].minor.yy0.type); SArray* A = tVariantListAppendToken(NULL, &yymsp[0].minor.yy0, -1); - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, A, TSDB_ALTER_TABLE_DROP_TAG_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, NULL, A, TSDB_ALTER_TABLE_DROP_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4051 "sql.c" break; - case 288: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ -#line 886 "sql.y" + case 292: /* cmd ::= ALTER STABLE ftblname CHANGE TAG ids ids */ { - yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; toTSDBType(yymsp[-1].minor.yy0.type); SArray* A = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1); @@ -4060,48 +3596,35 @@ static YYACTIONTYPE yy_reduce( toTSDBType(yymsp[0].minor.yy0.type); A = tVariantListAppendToken(A, &yymsp[0].minor.yy0, -1); - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-5].minor.yy0, NULL, A, TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, A, TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4067 "sql.c" break; - case 289: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ -#line 899 "sql.y" + case 293: /* cmd ::= ALTER STABLE ftblname SET TAG ids EQ tagitem */ { - yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; toTSDBType(yymsp[-2].minor.yy0.type); SArray* A = tVariantListAppendToken(NULL, &yymsp[-2].minor.yy0, -1); - A = tVariantListAppend(A, &yymsp[0].minor.yy430, -1); + A = tVariantListAppend(A, &yymsp[0].minor.yy378, -1); - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-5].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4081 "sql.c" break; - case 290: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ -#line 910 "sql.y" + case 294: /* cmd ::= ALTER STABLE ftblname MODIFY TAG columnlist */ { - yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, yymsp[0].minor.yy247, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -#line 4090 "sql.c" break; - case 291: /* cmd ::= KILL CONNECTION INTEGER */ -#line 917 "sql.y" + case 295: /* cmd ::= KILL CONNECTION INTEGER */ {setKillSql(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);} -#line 4095 "sql.c" break; - case 292: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ -#line 918 "sql.y" + case 296: /* 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);} -#line 4100 "sql.c" break; - case 293: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ -#line 919 "sql.y" + case 297: /* 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);} -#line 4105 "sql.c" break; default: break; @@ -4163,7 +3686,6 @@ static void yy_syntax_error( ParseCTX_FETCH #define TOKEN yyminor /************ Begin %syntax_error code ****************************************/ -#line 37 "sql.y" pInfo->valid = false; int32_t outputBufLen = tListLen(pInfo->msg); @@ -4186,7 +3708,6 @@ static void yy_syntax_error( } assert(len <= outputBufLen); -#line 4190 "sql.c" /************ End %syntax_error code ******************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ ParseCTX_STORE @@ -4212,8 +3733,7 @@ static void yy_accept( /* Here code is inserted which will be executed whenever the ** parser accepts */ /*********** Begin %parse_accept code *****************************************/ -#line 61 "sql.y" -#line 4217 "sql.c" + /*********** End %parse_accept code *******************************************/ ParseARG_STORE /* Suppress warning about unused %extra_argument variable */ ParseCTX_STORE diff --git a/src/query/tests/unitTest.cpp b/src/query/tests/unitTest.cpp index 1ed4cde40653aaed99031fca81a8719a3f748b6b..c97772f570e8184155e208f3693b12d831a1a770 100644 --- a/src/query/tests/unitTest.cpp +++ b/src/query/tests/unitTest.cpp @@ -23,7 +23,7 @@ int32_t testValidateName(char* name) { token.type = 0; tGetToken(name, &token.type); - return tscValidateName(&token); + return tscValidateName(&token, false); } } diff --git a/src/util/src/ttokenizer.c b/src/util/src/ttokenizer.c index 289c4a6ef5d5db1a04fdb33985ed4de959375f8d..b75e7ad33de3d54ad961822fcefa61881a9b10a5 100644 --- a/src/util/src/ttokenizer.c +++ b/src/util/src/ttokenizer.c @@ -229,6 +229,7 @@ static SKeyword keywordTable[] = { {"OUTPUTTYPE", TK_OUTPUTTYPE}, {"AGGREGATE", TK_AGGREGATE}, {"BUFSIZE", TK_BUFSIZE}, + {"ESCAPE", TK_ESCAPE} }; static const char isIdChar[] = { @@ -442,6 +443,17 @@ uint32_t tGetToken(char* z, uint32_t* tokenId) { break; } + case '`': { + for (i = 1; z[i]; i++) { + if (z[i] == '`') { + i++; + *tokenId = TK_ESCAPE; + return i; + } + } + + break; + } case '.': { /* * handle the the float number with out integer part