From 53e6acc8477a4ae7db6a70056c5ab7eb569303e4 Mon Sep 17 00:00:00 2001 From: wpan Date: Fri, 24 Sep 2021 15:24:01 +0800 Subject: [PATCH] fix bug and add cases --- src/client/src/tscLocal.c | 12 +- src/client/src/tscSQLParser.c | 49 +- src/client/src/tscServer.c | 6 +- src/client/src/tscUtil.c | 20 +- src/common/inc/tname.h | 2 + src/common/src/tname.c | 36 +- src/common/src/tvariant.c | 2 +- src/inc/ttokendef.h | 219 +- src/mnode/src/mnodeTable.c | 2 +- src/query/inc/sql.y | 114 +- src/query/src/sql.c | 3795 +++++++++-------- src/util/inc/tutil.h | 1 + src/util/src/ttokenizer.c | 5 +- src/util/src/tutil.c | 14 + tests/script/general/parser/tbname_escape.sim | 211 +- 15 files changed, 2397 insertions(+), 2091 deletions(-) diff --git a/src/client/src/tscLocal.c b/src/client/src/tscLocal.c index 07db18b498..044d97cecc 100644 --- a/src/client/src/tscLocal.c +++ b/src/client/src/tscLocal.c @@ -465,7 +465,7 @@ int32_t tscRebuildCreateTableStatement(void *param,char *result) { code = tscGetTableTagValue(builder, buf); if (code == TSDB_CODE_SUCCESS) { - snprintf(result + strlen(result), TSDB_MAX_BINARY_LEN - strlen(result), "CREATE TABLE %s USING %s TAGS %s", builder->buf, builder->sTableName, buf); + snprintf(result + strlen(result), TSDB_MAX_BINARY_LEN - strlen(result), "CREATE TABLE `%s` USING `%s` TAGS %s", builder->buf, builder->sTableName, buf); code = tscSCreateBuildResult(builder->pParentSql, SCREATE_BUILD_TABLE, builder->buf, result); } free(buf); @@ -574,12 +574,14 @@ static int32_t tscRebuildDDLForSubTable(SSqlObj *pSql, const char *tableName, ch } char fullName[TSDB_TABLE_FNAME_LEN * 2] = {0}; + char tblName[TSDB_TABLE_NAME_LEN + 1] = {0}; tNameGetDbName(&pTableMetaInfo->name, fullName); extractTableName(pMeta->sTableName, param->sTableName); - snprintf(fullName + strlen(fullName), TSDB_TABLE_FNAME_LEN - strlen(fullName), ".%s", param->sTableName); + snprintf(fullName + strlen(fullName), TSDB_TABLE_FNAME_LEN - strlen(fullName), ".`%s`", param->sTableName); strncpy(param->buf, tNameGetTableName(&pTableMetaInfo->name), TSDB_TABLE_NAME_LEN); + tableNameToStr(tblName, param->buf, '\''); param->pParentSql = pSql; param->pInterSql = pInterSql; @@ -602,7 +604,7 @@ static int32_t tscRebuildDDLForSubTable(SSqlObj *pSql, const char *tableName, ch return code; } - snprintf(query + strlen(query), TSDB_MAX_BINARY_LEN - strlen(query), "SELECT %s FROM %s WHERE TBNAME IN(\'%s\')", columns, fullName, param->buf); + snprintf(query + strlen(query), TSDB_MAX_BINARY_LEN - strlen(query), "SELECT %s FROM %s WHERE TBNAME IN(\'%s\')", columns, fullName, tblName); doAsyncQuery(pSql->pTscObj, pInterSql, tscSCreateCallBack, param, query, strlen(query)); free(query); free(columns); @@ -619,7 +621,7 @@ static int32_t tscRebuildDDLForNormalTable(SSqlObj *pSql, const char *tableName, SSchema *pSchema = tscGetTableSchema(pMeta); char *result = ddl; - sprintf(result, "create table %s (", tableName); + sprintf(result, "create table `%s` (", tableName); for (int32_t i = 0; i < numOfRows; ++i) { uint8_t type = pSchema[i].type; if (type == TSDB_DATA_TYPE_BINARY || type == TSDB_DATA_TYPE_NCHAR) { @@ -646,7 +648,7 @@ static int32_t tscRebuildDDLForSuperTable(SSqlObj *pSql, const char *tableName, int32_t totalRows = numOfRows + tscGetNumOfTags(pMeta); SSchema *pSchema = tscGetTableSchema(pMeta); - sprintf(result, "create table %s (", tableName); + sprintf(result, "create table `%s` (", tableName); for (int32_t i = 0; i < numOfRows; ++i) { uint8_t type = pSchema[i].type; if (type == TSDB_DATA_TYPE_BINARY || type == TSDB_DATA_TYPE_NCHAR) { diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index b61df1aa28..bfb0eb161f 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -570,10 +570,17 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { SStrToken* pzName = taosArrayGet(pInfo->pMiscInfo->a, 0); bool escapeEnabled = (pInfo->type == TSDB_SQL_DROP_TABLE) ? true: false; - + bool dbIncluded = false; - if ((pInfo->type != TSDB_SQL_DROP_DNODE) && (tscValidateName(pzName, escapeEnabled, &dbIncluded) != TSDB_CODE_SUCCESS)) { - return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg2); + char buf[TSDB_TABLE_FNAME_LEN]; + SStrToken sTblToken; + sTblToken.z = buf; + + if (pInfo->type != TSDB_SQL_DROP_DNODE) { + if ((escapeEnabled && (validateTableName(pzName->z, pzName->n, &sTblToken, &dbIncluded) != TSDB_CODE_SUCCESS)) || + ((!escapeEnabled) && (tscValidateName(pzName, escapeEnabled, &dbIncluded) != TSDB_CODE_SUCCESS))){ + return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg2); + } } if (pInfo->type == TSDB_SQL_DROP_DB) { @@ -586,7 +593,7 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { } else if (pInfo->type == TSDB_SQL_DROP_TABLE) { assert(taosArrayGetSize(pInfo->pMiscInfo->a) == 1); - code = tscSetTableFullName(&pTableMetaInfo->name, pzName, pSql, dbIncluded); + code = tscSetTableFullName(&pTableMetaInfo->name, &sTblToken, pSql, dbIncluded); if(code != TSDB_CODE_SUCCESS) { return code; } @@ -727,12 +734,16 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { SStrToken* pToken = taosArrayGet(pInfo->pMiscInfo->a, 0); bool dbIncluded = false; + char buf[TSDB_TABLE_FNAME_LEN]; + SStrToken sTblToken; + sTblToken.z = buf; - if (tscValidateName(pToken, true, &dbIncluded) != TSDB_CODE_SUCCESS) { + if (validateTableName(pToken->z, pToken->n, &sTblToken, &dbIncluded) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } + // additional msg has been attached already - code = tscSetTableFullName(&pTableMetaInfo->name, pToken, pSql, dbIncluded); + code = tscSetTableFullName(&pTableMetaInfo->name, &sTblToken, pSql, dbIncluded); if (code != TSDB_CODE_SUCCESS) { return code; } @@ -744,13 +755,17 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { const char* msg1 = "invalid table name"; SStrToken* pToken = taosArrayGet(pInfo->pMiscInfo->a, 0); - + bool dbIncluded = false; - if (tscValidateName(pToken, true, &dbIncluded) != TSDB_CODE_SUCCESS) { + char buf[TSDB_TABLE_FNAME_LEN]; + SStrToken sTblToken; + sTblToken.z = buf; + + if (validateTableName(pToken->z, pToken->n, &sTblToken, &dbIncluded) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } - code = tscSetTableFullName(&pTableMetaInfo->name, pToken, pSql, dbIncluded); + code = tscSetTableFullName(&pTableMetaInfo->name, &sTblToken, pSql, dbIncluded); if (code != TSDB_CODE_SUCCESS) { return code; } @@ -3201,6 +3216,7 @@ int32_t setShowInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { const char* msg3 = "database name too long"; const char* msg5 = "database name is empty"; const char* msg6 = "pattern string is empty"; + const char* msg7 = "pattern is invalid"; /* * database prefix in pInfo->pMiscInfo->a[0] @@ -3233,6 +3249,10 @@ int32_t setShowInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { // show table/stable like 'xxxx', set the like pattern for show tables SStrToken* pPattern = &pShowInfo->pattern; if (pPattern->type != 0) { + if (pPattern->type == TK_ID && pPattern->z[0] == TS_ESCAPE_CHAR) { + return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg7); + } + pPattern->n = strdequote(pPattern->z); if (pPattern->n <= 0) { @@ -8443,14 +8463,18 @@ static int32_t doLoadAllTableMeta(SSqlObj* pSql, SQueryInfo* pQueryInfo, SSqlNod } tscDequoteAndTrimToken(oriName); - + bool dbIncluded = false; - if (tscValidateName(oriName, true, &dbIncluded) != TSDB_CODE_SUCCESS) { + char buf[TSDB_TABLE_FNAME_LEN]; + SStrToken sTblToken; + sTblToken.z = buf; + + if (validateTableName(oriName->z, oriName->n, &sTblToken, &dbIncluded) != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } STableMetaInfo* pTableMetaInfo = tscGetMetaInfo(pQueryInfo, i); - code = tscSetTableFullName(&pTableMetaInfo->name, oriName, pSql, dbIncluded); + code = tscSetTableFullName(&pTableMetaInfo->name, &sTblToken, pSql, dbIncluded); if (code != TSDB_CODE_SUCCESS) { return code; } @@ -8996,6 +9020,7 @@ int32_t exprTreeFromSqlExpr(SSqlCmd* pCmd, tExprNode **pExpr, const tSqlExpr* pS if (colSize > 0) { SColIndex* idx = taosArrayGet(pCols, colSize - 1); + SSchema* pSchema = tscGetTableColumnSchema(pTableMeta, idx->colIndex); // convert time by precision if (pSchema != NULL && TSDB_DATA_TYPE_TIMESTAMP == pSchema->type && TSDB_DATA_TYPE_BINARY == (*pExpr)->pVal->nType) { diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 1489d3c92b..bcd4143264 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -2869,7 +2869,7 @@ int32_t getMultiTableMetaFromMnode(SSqlObj *pSql, SArray* pNameList, SArray* pVg for(int32_t i = 0; i < numOfTable; ++i) { char* name = taosArrayGetP(pNameList, i); if (i < numOfTable - 1 || numOfVgroupList > 0 || numOfUdf > 0) { - len = sprintf(start, "%s·", name); + len = sprintf(start, "%s`", name); } else { len = sprintf(start, "%s", name); } @@ -2880,7 +2880,7 @@ int32_t getMultiTableMetaFromMnode(SSqlObj *pSql, SArray* pNameList, SArray* pVg for(int32_t i = 0; i < numOfVgroupList; ++i) { char* name = taosArrayGetP(pVgroupNameList, i); if (i < numOfVgroupList - 1 || numOfUdf > 0) { - len = sprintf(start, "%s·", name); + len = sprintf(start, "%s`", name); } else { len = sprintf(start, "%s", name); } @@ -2891,7 +2891,7 @@ int32_t getMultiTableMetaFromMnode(SSqlObj *pSql, SArray* pNameList, SArray* pVg for(int32_t i = 0; i < numOfUdf; ++i) { SUdfInfo * u = taosArrayGet(pUdfList, i); if (i < numOfUdf - 1) { - len = sprintf(start, "%s·", u->name); + len = sprintf(start, "%s`", u->name); } else { len = sprintf(start, "%s", u->name); } diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index d249cd1abf..8d6c655bc9 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -2835,11 +2835,16 @@ void tscRmEscapeAndTrimToken(SStrToken* pToken) { int32_t tscValidateName(SStrToken* pToken, bool escapeEnabled, bool *dbIncluded) { 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)) { + || (pToken->type != TK_STRING && pToken->type != TK_ID)) { return TSDB_CODE_TSC_INVALID_OPERATION; } + if ((!escapeEnabled) && pToken->type == TK_ID) { + if (pToken->z[0] == TS_ESCAPE_CHAR) { + return TSDB_CODE_TSC_INVALID_OPERATION; + } + } + char* sep = NULL; if (escapeEnabled) { @@ -2870,13 +2875,13 @@ int32_t tscValidateName(SStrToken* pToken, bool escapeEnabled, bool *dbIncluded) return tscValidateName(pToken, escapeEnabled, NULL); } - } else if (escapeEnabled && pToken->type == TK_ESCAPE) { + } else if (pToken->type == TK_ID) { tscRmEscapeAndTrimToken(pToken); - return TSDB_CODE_SUCCESS; + return TSDB_CODE_SUCCESS; } else { if (isNumber(pToken)) { return TSDB_CODE_TSC_INVALID_OPERATION; - } + } } } else { // two part int32_t oldLen = pToken->n; @@ -2912,8 +2917,7 @@ int32_t tscValidateName(SStrToken* pToken, bool escapeEnabled, bool *dbIncluded) pToken->z = sep + 1; pToken->n = (uint32_t)(oldLen - (sep - pStr) - 1); int32_t len = tGetToken(pToken->z, &pToken->type); - 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)) { + if (len != pToken->n || (pToken->type != TK_STRING && pToken->type != TK_ID)) { return TSDB_CODE_TSC_INVALID_OPERATION; } @@ -2925,7 +2929,7 @@ int32_t tscValidateName(SStrToken* pToken, bool escapeEnabled, bool *dbIncluded) } } - if (escapeEnabled && pToken->type == TK_ESCAPE) { + if (escapeEnabled && pToken->type == TK_ID) { tscRmEscapeAndTrimToken(pToken); } diff --git a/src/common/inc/tname.h b/src/common/inc/tname.h index 5f2933f59d..22a6955026 100644 --- a/src/common/inc/tname.h +++ b/src/common/inc/tname.h @@ -94,6 +94,8 @@ void extractTableNameFromToken(SStrToken *pToken, SStrToken* pTable); char *tableNameGetPosition(SStrToken* pToken, char target); +char *tableNameToStr(char *dst, char *src, char quote); + SSchema tGetUserSpecifiedColumnSchema(tVariant* pVal, SStrToken* exprStr, const char* name); bool tscValidateTableNameLength(size_t len); diff --git a/src/common/src/tname.c b/src/common/src/tname.c index d02b5dc42d..c0951cba70 100644 --- a/src/common/src/tname.c +++ b/src/common/src/tname.c @@ -154,27 +154,27 @@ int64_t taosGetIntervalStartTimestamp(int64_t startTime, int64_t slidingTime, in char *tableNameGetPosition(SStrToken* pToken, char target) { bool inEscape = false; - bool inQuota = false; + bool inQuote = false; char quotaStr = 0; for (uint32_t i = 0; i < pToken->n; ++i) { - if (*(pToken->z + i) == target && (!inEscape) && (!inQuota)) { + if (*(pToken->z + i) == target && (!inEscape) && (!inQuote)) { return pToken->z + i; } if (*(pToken->z + i) == TS_ESCAPE_CHAR) { - if (!inQuota) { + if (!inQuote) { inEscape = !inEscape; } } if (*(pToken->z + i) == '\'' || *(pToken->z + i) == '"') { if (!inEscape) { - if (!inQuota) { + if (!inQuote) { quotaStr = *(pToken->z + i); - inQuota = !inQuota; + inQuote = !inQuote; } else if (quotaStr == *(pToken->z + i)) { - inQuota = !inQuota; + inQuote = !inQuote; } } } @@ -183,6 +183,30 @@ char *tableNameGetPosition(SStrToken* pToken, char target) { return NULL; } +char *tableNameToStr(char *dst, char *src, char quote) { + *dst = 0; + + if (src == NULL) { + return NULL; + } + + int32_t len = (int32_t)strlen(src); + if (len <= 0) { + return NULL; + } + + int32_t j = 0; + for (int32_t i = 0; i < len; ++i) { + if (*(src + i) == quote) { + *(dst + j++) = '\\'; + } + + *(dst + j++) = *(src + i); + } + + return dst; +} + /* * tablePrefix.columnName diff --git a/src/common/src/tvariant.c b/src/common/src/tvariant.c index ca3bb956a2..fadc6186fa 100644 --- a/src/common/src/tvariant.c +++ b/src/common/src/tvariant.c @@ -81,7 +81,7 @@ void tVariantCreate(tVariant *pVar, SStrToken *token) { case TSDB_DATA_TYPE_BINARY: { pVar->pz = strndup(token->z, token->n); - pVar->nLen = strRmquote(pVar->pz, token->n); + pVar->nLen = strRmquoteEscape(pVar->pz, token->n); break; } case TSDB_DATA_TYPE_TIMESTAMP: { diff --git a/src/inc/ttokendef.h b/src/inc/ttokendef.h index 66f8784106..a7e0dc4892 100644 --- a/src/inc/ttokendef.h +++ b/src/inc/ttokendef.h @@ -103,116 +103,115 @@ #define TK_RP 85 #define TK_IF 86 #define TK_EXISTS 87 -#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_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 diff --git a/src/mnode/src/mnodeTable.c b/src/mnode/src/mnodeTable.c index 76c2147d50..b3873b8627 100644 --- a/src/mnode/src/mnodeTable.c +++ b/src/mnode/src/mnodeTable.c @@ -2973,7 +2973,7 @@ static int32_t mnodeProcessMultiTableMetaMsg(SMnodeMsg *pMsg) { int32_t num = 0; int32_t code = TSDB_CODE_SUCCESS; char* str = strndup(pInfo->tableNames, contLen); - char** nameList = strsplit(str, "·", &num); + char** nameList = strsplit(str, "`", &num); SArray* pList = taosArrayInit(4, POINTER_BYTES); SMultiTableMeta *pMultiMeta = NULL; diff --git a/src/query/inc/sql.y b/src/query/inc/sql.y index fa9bdb2edb..f33f79775d 100644 --- a/src/query/inc/sql.y +++ b/src/query/inc/sql.y @@ -91,10 +91,12 @@ 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 ftblname(X). { +cmd ::= SHOW CREATE TABLE ids(X) cpxName(Y). { + X.n += Y.n; setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_TABLE, 1, &X); -} -cmd ::= SHOW CREATE STABLE ftblname(X). { +} +cmd ::= SHOW CREATE STABLE ids(X) cpxName(Y). { + X.n += Y.n; setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_STABLE, 1, &X); } @@ -106,7 +108,7 @@ cmd ::= SHOW dbPrefix(X) TABLES. { setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &X, 0); } -cmd ::= SHOW dbPrefix(X) TABLES LIKE tblname(Y). { +cmd ::= SHOW dbPrefix(X) TABLES LIKE ids(Y). { setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &X, &Y); } @@ -114,7 +116,7 @@ cmd ::= SHOW dbPrefix(X) STABLES. { setShowOptions(pInfo, TSDB_MGMT_TABLE_METRIC, &X, 0); } -cmd ::= SHOW dbPrefix(X) STABLES LIKE tblname(Y). { +cmd ::= SHOW dbPrefix(X) STABLES LIKE ids(Y). { SStrToken token; tSetDbName(&token, &X); setShowOptions(pInfo, TSDB_MGMT_TABLE_METRIC, &token, &Y); @@ -133,12 +135,14 @@ cmd ::= SHOW dbPrefix(X) VGROUPS ids(Y). { } //drop configure for tables -cmd ::= DROP TABLE ifexists(Y) ftblname(X). { +cmd ::= DROP TABLE ifexists(Y) ids(X) cpxName(Z). { + X.n += Z.n; setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &X, &Y, -1, -1); } //drop stable -cmd ::= DROP STABLE ifexists(Y) ftblname(X). { +cmd ::= DROP STABLE ifexists(Y) ids(X) cpxName(Z). { + X.n += Z.n; setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &X, &Y, -1, TSDB_SUPER_TABLE); } @@ -154,10 +158,13 @@ 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 ftblname(X). { +cmd ::= DESCRIBE ids(X) cpxName(Y). { + X.n += Y.n; setDCLSqlElems(pInfo, TSDB_SQL_DESCRIBE_TABLE, 1, &X); } -cmd ::= DESC ftblname(X). { + +cmd ::= DESC ids(X) cpxName(Y). { + X.n += Y.n; setDCLSqlElems(pInfo, TSDB_SQL_DESCRIBE_TABLE, 1, &X); } /////////////////////////////////THE ALTER STATEMENT//////////////////////////////////////// @@ -192,14 +199,6 @@ 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);} @@ -379,30 +378,36 @@ create_table_list(A) ::= create_table_list(X) create_from_stable(Z). { } %type create_table_args{SCreateTableSql*} -create_table_args(A) ::= ifnotexists(U) ftblname(V) LP columnlist(X) RP. { +create_table_args(A) ::= ifnotexists(U) ids(V) cpxName(Z) 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) ftblname(V) LP columnlist(X) RP TAGS LP columnlist(Y) RP. { +create_stable_args(A) ::= ifnotexists(U) ids(V) cpxName(Z) 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) ftblname(V) USING ftblname(X) TAGS LP tagitemlist(Y) RP. { +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; A = createNewChildTableInfo(&X, NULL, Y, &V, &U); } -create_from_stable(A) ::= ifnotexists(U) ftblname(V) USING ftblname(X) LP tagNamelist(P) RP TAGS LP tagitemlist(Y) RP. { +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; A = createNewChildTableInfo(&X, P, Y, &V, &U); } @@ -413,10 +418,11 @@ 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) ftblname(V) AS select(S). { +create_table_args(A) ::= ifnotexists(U) ids(V) cpxName(Z) 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); } @@ -543,19 +549,23 @@ sub(A) ::= sub(X) COMMA LP union(Y) RP ids(Z).{A = addSubqueryElem(X, Y, &Z);} %type tablelist {SRelationInfo*} %destructor tablelist {destroyRelationInfo($$);} -tablelist(A) ::= ftblname(X). { +tablelist(A) ::= ids(X) cpxName(Y). { + X.n += Y.n; A = setTableNameList(NULL, &X, NULL); } -tablelist(A) ::= ftblname(X) ids(Z). { +tablelist(A) ::= ids(X) cpxName(Y) ids(Z). { + X.n += Y.n; A = setTableNameList(NULL, &X, &Z); } -tablelist(A) ::= tablelist(Y) COMMA ftblname(X). { +tablelist(A) ::= tablelist(Y) COMMA ids(X) cpxName(Z). { + X.n += Z.n; A = setTableNameList(Y, &X, NULL); } -tablelist(A) ::= tablelist(Y) COMMA ftblname(X) ids(F). { +tablelist(A) ::= tablelist(Y) COMMA ids(X) cpxName(Z) ids(F). { + X.n += Z.n; A = setTableNameList(Y, &X, &F); } @@ -694,8 +704,6 @@ expr(A) ::= LP(X) expr(Y) RP(Z). {A = Y; A->exprToken.z = X.z; A->exprToke expr(A) ::= ID(X). { A = tSqlExprCreateIdValue(&X, TK_ID);} expr(A) ::= ID(X) DOT ID(Y). { X.n += (1+Y.n); A = tSqlExprCreateIdValue(&X, TK_ID);} expr(A) ::= ID(X) DOT STAR(Y). { X.n += (1+Y.n); A = tSqlExprCreateIdValue(&X, TK_ALL);} -expr(A) ::= ESCAPE(X) DOT ID(Y). { X.n += (1+Y.n); A = tSqlExprCreateIdValue(&X, TK_ID);} -expr(A) ::= ESCAPE(X) DOT STAR(Y). { X.n += (1+Y.n); A = tSqlExprCreateIdValue(&X, TK_ALL);} expr(A) ::= INTEGER(X). { A = tSqlExprCreateIdValue(&X, TK_INTEGER);} expr(A) ::= MINUS(X) INTEGER(Y). { X.n += Y.n; X.type = TK_INTEGER; A = tSqlExprCreateIdValue(&X, TK_INTEGER);} @@ -769,12 +777,15 @@ 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 ftblname(X) ADD COLUMN columnlist(A). { +cmd ::= ALTER TABLE ids(X) cpxName(F) ADD COLUMN columnlist(A). { + X.n += F.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER TABLE ftblname(X) DROP COLUMN ids(A). { +cmd ::= ALTER TABLE ids(X) cpxName(F) DROP COLUMN ids(A). { + X.n += F.n; + toTSDBType(A.type); SArray* K = tVariantListAppendToken(NULL, &A, -1); @@ -782,17 +793,21 @@ cmd ::= ALTER TABLE ftblname(X) DROP COLUMN ids(A). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER TABLE ftblname(X) MODIFY COLUMN columnlist(A). { +cmd ::= ALTER TABLE ids(X) cpxName(F) MODIFY COLUMN columnlist(A). { + X.n += F.n; 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 ftblname(X) ADD TAG columnlist(A). { +cmd ::= ALTER TABLE ids(X) cpxName(Y) ADD TAG columnlist(A). { + X.n += Y.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER TABLE ftblname(X) DROP TAG ids(Y). { +cmd ::= ALTER TABLE ids(X) cpxName(Z) DROP TAG ids(Y). { + X.n += Z.n; + toTSDBType(Y.type); SArray* A = tVariantListAppendToken(NULL, &Y, -1); @@ -800,7 +815,8 @@ cmd ::= ALTER TABLE ftblname(X) DROP TAG ids(Y). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER TABLE ftblname(X) CHANGE TAG ids(Y) ids(Z). { +cmd ::= ALTER TABLE ids(X) cpxName(F) CHANGE TAG ids(Y) ids(Z). { + X.n += F.n; toTSDBType(Y.type); SArray* A = tVariantListAppendToken(NULL, &Y, -1); @@ -812,7 +828,8 @@ cmd ::= ALTER TABLE ftblname(X) CHANGE TAG ids(Y) ids(Z). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER TABLE ftblname(X) SET TAG ids(Y) EQ tagitem(Z). { +cmd ::= ALTER TABLE ids(X) cpxName(F) SET TAG ids(Y) EQ tagitem(Z). { + X.n += F.n; toTSDBType(Y.type); SArray* A = tVariantListAppendToken(NULL, &Y, -1); @@ -822,18 +839,21 @@ cmd ::= ALTER TABLE ftblname(X) SET TAG ids(Y) EQ tagitem(Z). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER TABLE ftblname(X) MODIFY TAG columnlist(A). { +cmd ::= ALTER TABLE ids(X) cpxName(F) MODIFY TAG columnlist(A). { + X.n += F.n; 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 ftblname(X) ADD COLUMN columnlist(A). { +cmd ::= ALTER STABLE ids(X) cpxName(F) ADD COLUMN columnlist(A). { + X.n += F.n; 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 ftblname(X) DROP COLUMN ids(A). { +cmd ::= ALTER STABLE ids(X) cpxName(F) DROP COLUMN ids(A). { + X.n += F.n; toTSDBType(A.type); SArray* K = tVariantListAppendToken(NULL, &A, -1); @@ -842,17 +862,20 @@ cmd ::= ALTER STABLE ftblname(X) DROP COLUMN ids(A). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER STABLE ftblname(X) MODIFY COLUMN columnlist(A). { +cmd ::= ALTER STABLE ids(X) cpxName(F) MODIFY COLUMN columnlist(A). { + X.n += F.n; 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 ftblname(X) ADD TAG columnlist(A). { +cmd ::= ALTER STABLE ids(X) cpxName(Y) ADD TAG columnlist(A). { + X.n += Y.n; 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 ftblname(X) DROP TAG ids(Y). { +cmd ::= ALTER STABLE ids(X) cpxName(Z) DROP TAG ids(Y). { + X.n += Z.n; toTSDBType(Y.type); SArray* A = tVariantListAppendToken(NULL, &Y, -1); @@ -861,7 +884,8 @@ cmd ::= ALTER STABLE ftblname(X) DROP TAG ids(Y). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER STABLE ftblname(X) CHANGE TAG ids(Y) ids(Z). { +cmd ::= ALTER STABLE ids(X) cpxName(F) CHANGE TAG ids(Y) ids(Z). { + X.n += F.n; toTSDBType(Y.type); SArray* A = tVariantListAppendToken(NULL, &Y, -1); @@ -873,7 +897,8 @@ cmd ::= ALTER STABLE ftblname(X) CHANGE TAG ids(Y) ids(Z). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER STABLE ftblname(X) SET TAG ids(Y) EQ tagitem(Z). { +cmd ::= ALTER STABLE ids(X) cpxName(F) SET TAG ids(Y) EQ tagitem(Z). { + X.n += F.n; toTSDBType(Y.type); SArray* A = tVariantListAppendToken(NULL, &Y, -1); @@ -883,7 +908,8 @@ cmd ::= ALTER STABLE ftblname(X) SET TAG ids(Y) EQ tagitem(Z). { setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } -cmd ::= ALTER STABLE ftblname(X) MODIFY TAG columnlist(A). { +cmd ::= ALTER STABLE ids(X) cpxName(F) MODIFY TAG columnlist(A). { + X.n += F.n; 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 26020d9d76..b75e537f77 100644 --- a/src/query/src/sql.c +++ b/src/query/src/sql.c @@ -100,29 +100,29 @@ #endif /************* Begin control #defines *****************************************/ #define YYCODETYPE unsigned short int -#define YYNOCODE 281 +#define YYNOCODE 278 #define YYACTIONTYPE unsigned short int #define ParseTOKENTYPE SStrToken typedef union { int yyinit; ParseTOKENTYPE yy0; - 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; + 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; } YYMINORTYPE; #ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 @@ -138,18 +138,18 @@ typedef union { #define ParseCTX_FETCH #define ParseCTX_STORE #define YYFALLBACK 1 -#define YYNSTATE 358 -#define YYNRULE 300 -#define YYNRULE_WITH_ACTION 300 -#define YYNTOKEN 198 -#define YY_MAX_SHIFT 357 -#define YY_MIN_SHIFTREDUCE 572 -#define YY_MAX_SHIFTREDUCE 871 -#define YY_ERROR_ACTION 872 -#define YY_ACCEPT_ACTION 873 -#define YY_NO_ACTION 874 -#define YY_MIN_REDUCE 875 -#define YY_MAX_REDUCE 1174 +#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 YY_MAX_REDUCE 1166 /************* End control #defines *******************************************/ #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) @@ -216,294 +216,292 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (800) +#define YY_ACTTAB_COUNT (773) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 36, 624, 239, 624, 355, 162, 238, 267, 935, 625, - /* 10 */ 814, 625, 817, 75, 76, 355, 79, 80, 104, 935, - /* 20 */ 243, 69, 68, 67, 624, 78, 312, 83, 81, 84, - /* 30 */ 82, 244, 625, 664, 355, 74, 73, 217, 935, 72, - /* 40 */ 71, 70, 75, 76, 355, 79, 80, 237, 935, 243, - /* 50 */ 69, 68, 67, 195, 78, 312, 83, 81, 84, 82, - /* 60 */ 162, 162, 198, 933, 74, 73, 198, 902, 72, 71, - /* 70 */ 70, 75, 76, 1151, 79, 80, 196, 1151, 243, 69, - /* 80 */ 68, 67, 1095, 78, 312, 83, 81, 84, 82, 97, - /* 90 */ 631, 198, 355, 74, 73, 293, 935, 72, 71, 70, - /* 100 */ 624, 1057, 1151, 75, 77, 228, 79, 80, 625, 1035, - /* 110 */ 243, 69, 68, 67, 806, 78, 312, 83, 81, 84, - /* 120 */ 82, 72, 71, 70, 355, 74, 73, 214, 935, 72, - /* 130 */ 71, 70, 821, 191, 190, 189, 286, 1096, 107, 284, - /* 140 */ 188, 151, 150, 149, 148, 12, 573, 574, 575, 576, - /* 150 */ 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, - /* 160 */ 156, 76, 223, 79, 80, 356, 222, 243, 69, 68, - /* 170 */ 67, 1054, 78, 312, 83, 81, 84, 82, 1018, 1019, - /* 180 */ 51, 1022, 74, 73, 54, 343, 72, 71, 70, 79, - /* 190 */ 80, 162, 103, 243, 69, 68, 67, 246, 78, 312, - /* 200 */ 83, 81, 84, 82, 354, 353, 154, 355, 74, 73, - /* 210 */ 215, 935, 72, 71, 70, 60, 308, 350, 349, 307, - /* 220 */ 306, 305, 348, 304, 303, 302, 347, 301, 346, 345, - /* 230 */ 61, 224, 712, 1021, 37, 1032, 997, 985, 986, 987, - /* 240 */ 988, 989, 990, 991, 992, 993, 994, 995, 996, 998, - /* 250 */ 999, 201, 355, 242, 823, 915, 935, 812, 209, 815, - /* 260 */ 1034, 818, 333, 332, 147, 18, 17, 208, 109, 242, - /* 270 */ 823, 318, 103, 812, 247, 815, 245, 818, 321, 320, - /* 280 */ 54, 83, 81, 84, 82, 198, 1048, 220, 221, 74, - /* 290 */ 73, 313, 310, 72, 71, 70, 1150, 100, 60, 251, - /* 300 */ 350, 349, 225, 220, 221, 348, 6, 57, 177, 347, - /* 310 */ 61, 346, 345, 176, 118, 123, 114, 122, 355, 310, - /* 320 */ 736, 914, 935, 733, 234, 734, 355, 735, 1035, 99, - /* 330 */ 935, 1031, 264, 297, 96, 268, 85, 16, 15, 138, - /* 340 */ 314, 216, 873, 357, 137, 171, 143, 146, 136, 813, - /* 350 */ 624, 816, 85, 248, 249, 140, 314, 1005, 625, 1003, - /* 360 */ 1004, 74, 73, 274, 1006, 72, 71, 70, 1007, 54, - /* 370 */ 1008, 1009, 824, 819, 54, 54, 253, 54, 250, 820, - /* 380 */ 328, 327, 355, 54, 54, 906, 935, 355, 824, 819, - /* 390 */ 905, 935, 771, 772, 1048, 820, 355, 272, 271, 897, - /* 400 */ 935, 355, 54, 54, 896, 935, 27, 752, 54, 54, - /* 410 */ 265, 111, 22, 21, 155, 236, 232, 1029, 110, 1035, - /* 420 */ 1032, 233, 322, 933, 323, 1032, 1032, 900, 1032, 14, - /* 430 */ 324, 325, 98, 45, 1032, 1032, 257, 631, 737, 738, - /* 440 */ 933, 13, 351, 966, 936, 261, 260, 10, 1048, 329, - /* 450 */ 330, 924, 788, 1032, 1032, 331, 335, 252, 185, 1032, - /* 460 */ 1032, 135, 252, 252, 226, 1023, 235, 1, 175, 749, - /* 470 */ 173, 822, 266, 938, 343, 174, 1033, 925, 3, 186, - /* 480 */ 185, 1020, 101, 768, 185, 778, 779, 55, 89, 92, - /* 490 */ 722, 289, 724, 756, 291, 5, 723, 50, 157, 846, - /* 500 */ 86, 39, 825, 810, 808, 55, 55, 86, 315, 112, - /* 510 */ 787, 86, 241, 623, 38, 95, 741, 38, 742, 29, - /* 520 */ 268, 28, 202, 128, 31, 127, 30, 203, 38, 93, - /* 530 */ 90, 292, 145, 144, 7, 739, 204, 740, 33, 1145, - /* 540 */ 32, 811, 809, 133, 35, 132, 34, 1144, 711, 1143, - /* 550 */ 218, 219, 199, 200, 205, 197, 206, 207, 211, 212, - /* 560 */ 1170, 213, 210, 194, 1162, 1106, 1105, 230, 64, 1102, - /* 570 */ 1101, 231, 334, 262, 1088, 1087, 273, 1056, 1067, 1064, - /* 580 */ 1065, 1049, 269, 1069, 161, 280, 895, 172, 1030, 767, - /* 590 */ 227, 1028, 943, 294, 295, 108, 94, 91, 287, 296, - /* 600 */ 1046, 163, 299, 300, 62, 164, 66, 275, 192, 277, - /* 610 */ 58, 285, 311, 827, 165, 937, 319, 166, 1169, 125, - /* 620 */ 1168, 1165, 326, 1161, 130, 1160, 1157, 963, 283, 59, - /* 630 */ 56, 281, 63, 193, 921, 139, 919, 141, 142, 917, - /* 640 */ 916, 254, 913, 912, 911, 910, 909, 908, 907, 904, - /* 650 */ 279, 898, 276, 891, 298, 65, 278, 1089, 344, 134, - /* 660 */ 337, 336, 338, 339, 341, 340, 342, 352, 871, 255, - /* 670 */ 256, 870, 258, 259, 869, 268, 852, 851, 23, 942, - /* 680 */ 941, 119, 120, 263, 744, 102, 152, 288, 153, 19, - /* 690 */ 20, 179, 964, 180, 183, 178, 182, 181, 184, 2, - /* 700 */ 4, 46, 270, 11, 965, 769, 158, 159, 1001, 780, - /* 710 */ 774, 160, 105, 229, 776, 106, 49, 169, 167, 168, - /* 720 */ 170, 1011, 282, 24, 25, 26, 47, 48, 40, 41, - /* 730 */ 290, 113, 13, 52, 116, 115, 642, 53, 117, 677, - /* 740 */ 675, 674, 673, 671, 670, 669, 666, 628, 309, 826, - /* 750 */ 121, 8, 240, 828, 316, 9, 317, 55, 87, 124, - /* 760 */ 126, 88, 714, 713, 129, 131, 710, 658, 656, 648, - /* 770 */ 654, 650, 652, 646, 644, 680, 679, 678, 676, 672, - /* 780 */ 668, 667, 187, 626, 44, 590, 875, 874, 874, 874, - /* 790 */ 874, 874, 874, 874, 874, 874, 874, 874, 42, 43, + /* 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, }; static const YYCODETYPE yy_lookahead[] = { - /* 0 */ 269, 1, 209, 1, 200, 200, 209, 203, 204, 9, - /* 10 */ 5, 9, 7, 13, 14, 200, 16, 17, 203, 204, + /* 0 */ 266, 1, 199, 200, 199, 266, 245, 5, 266, 9, + /* 10 */ 249, 197, 198, 13, 14, 253, 16, 17, 247, 277, /* 20 */ 20, 21, 22, 23, 1, 25, 26, 27, 28, 29, - /* 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, 0, 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 */ 252, 9, 35, 36, 76, 77, 78, 79, 277, 1, - /* 270 */ 2, 83, 84, 5, 147, 7, 149, 9, 151, 152, - /* 280 */ 200, 27, 28, 29, 30, 269, 250, 35, 36, 35, - /* 290 */ 36, 39, 86, 39, 40, 41, 280, 85, 101, 70, - /* 300 */ 103, 104, 266, 35, 36, 108, 64, 65, 66, 112, - /* 310 */ 122, 114, 115, 71, 72, 73, 74, 75, 200, 86, - /* 320 */ 2, 203, 204, 5, 248, 7, 200, 9, 252, 203, - /* 330 */ 204, 251, 144, 91, 146, 123, 84, 64, 65, 66, - /* 340 */ 88, 153, 198, 199, 71, 256, 73, 74, 75, 5, - /* 350 */ 1, 7, 84, 35, 36, 82, 88, 226, 9, 228, - /* 360 */ 229, 35, 36, 274, 233, 39, 40, 41, 237, 200, - /* 370 */ 239, 240, 120, 121, 200, 200, 147, 200, 149, 127, - /* 380 */ 151, 152, 200, 200, 200, 203, 204, 200, 120, 121, - /* 390 */ 203, 204, 128, 129, 250, 127, 200, 271, 272, 203, - /* 400 */ 204, 200, 200, 200, 203, 204, 84, 39, 200, 200, - /* 410 */ 266, 89, 64, 65, 66, 248, 247, 200, 253, 252, - /* 420 */ 251, 247, 247, 200, 247, 251, 251, 204, 251, 210, - /* 430 */ 247, 247, 267, 84, 251, 251, 145, 88, 120, 121, - /* 440 */ 200, 119, 224, 225, 204, 154, 155, 210, 250, 247, - /* 450 */ 247, 208, 78, 251, 251, 247, 247, 200, 215, 251, - /* 460 */ 251, 80, 200, 200, 266, 246, 249, 211, 212, 100, - /* 470 */ 213, 127, 85, 208, 93, 213, 213, 208, 206, 207, - /* 480 */ 215, 244, 85, 85, 215, 85, 85, 100, 100, 100, - /* 490 */ 85, 85, 85, 125, 85, 126, 85, 84, 100, 85, - /* 500 */ 100, 100, 85, 1, 1, 100, 100, 100, 15, 100, - /* 510 */ 136, 100, 62, 85, 100, 84, 5, 100, 7, 148, - /* 520 */ 123, 150, 269, 148, 148, 150, 150, 269, 100, 140, - /* 530 */ 142, 118, 80, 81, 84, 5, 269, 7, 148, 269, - /* 540 */ 150, 39, 39, 148, 148, 150, 150, 269, 117, 269, - /* 550 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269, - /* 560 */ 252, 269, 269, 269, 252, 242, 242, 242, 268, 242, - /* 570 */ 242, 242, 242, 200, 278, 278, 273, 200, 200, 200, - /* 580 */ 200, 250, 250, 200, 200, 200, 200, 254, 250, 127, - /* 590 */ 273, 200, 200, 200, 200, 62, 139, 141, 134, 200, - /* 600 */ 265, 264, 200, 200, 200, 263, 138, 273, 200, 273, - /* 610 */ 200, 137, 200, 120, 262, 200, 200, 261, 200, 200, - /* 620 */ 200, 200, 200, 200, 200, 200, 200, 200, 132, 200, - /* 630 */ 200, 131, 200, 200, 200, 200, 200, 200, 200, 200, - /* 640 */ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - /* 650 */ 130, 200, 133, 200, 92, 143, 202, 202, 116, 99, - /* 660 */ 53, 98, 95, 97, 96, 57, 94, 86, 5, 156, - /* 670 */ 5, 5, 156, 5, 5, 123, 103, 102, 84, 214, - /* 680 */ 214, 210, 210, 145, 85, 124, 205, 118, 205, 205, - /* 690 */ 205, 221, 223, 217, 219, 222, 218, 220, 216, 211, - /* 700 */ 206, 84, 100, 100, 225, 85, 84, 84, 241, 85, - /* 710 */ 85, 100, 84, 1, 85, 84, 255, 258, 260, 259, - /* 720 */ 257, 241, 84, 135, 135, 84, 100, 100, 84, 84, - /* 730 */ 118, 80, 119, 90, 72, 89, 5, 90, 89, 9, - /* 740 */ 5, 5, 5, 5, 5, 5, 5, 87, 15, 85, - /* 750 */ 80, 84, 62, 120, 26, 84, 61, 100, 16, 150, - /* 760 */ 150, 16, 5, 5, 150, 150, 85, 5, 5, 5, - /* 770 */ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - /* 780 */ 5, 5, 100, 87, 62, 62, 0, 281, 281, 281, - /* 790 */ 281, 281, 281, 281, 281, 281, 281, 281, 21, 21, - /* 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, 281, 281, 281, 281, 281, + /* 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, }; -#define YY_SHIFT_COUNT (357) +#define YY_SHIFT_COUNT (367) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (786) +#define YY_SHIFT_MAX (758) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 188, 114, 114, 197, 197, 349, 206, 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, 264, - /* 50 */ 23, 233, 23, 23, 23, 23, 381, 206, 92, 92, - /* 60 */ 28, 800, 800, 800, 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, 368, 23, - /* 100 */ 23, 23, 108, 108, 23, 23, 23, 374, 23, 374, - /* 110 */ 369, 108, 23, 23, 23, 23, 23, 23, 23, 23, + /* 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, /* 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, 23, 462, 462, 462, - /* 160 */ 462, 533, 533, 457, 456, 464, 468, 474, 496, 500, - /* 170 */ 520, 519, 512, 562, 562, 542, 206, 206, 560, 563, - /* 180 */ 607, 567, 566, 608, 568, 572, 542, 28, 581, 581, - /* 190 */ 581, 581, 800, 800, 29, 58, 58, 90, 58, 147, - /* 200 */ 173, 242, 254, 254, 254, 254, 254, 254, 273, 69, - /* 210 */ 326, 326, 326, 326, 127, 229, 291, 322, 82, 82, - /* 220 */ 5, 344, 137, 348, 387, 212, 397, 398, 400, 401, - /* 230 */ 388, 389, 405, 406, 407, 409, 411, 413, 414, 417, - /* 240 */ 502, 503, 450, 493, 428, 371, 375, 376, 511, 530, - /* 250 */ 390, 395, 431, 396, 452, 663, 513, 665, 666, 516, - /* 260 */ 668, 669, 573, 575, 538, 552, 569, 594, 561, 599, - /* 270 */ 617, 602, 603, 620, 622, 624, 623, 625, 611, 628, - /* 280 */ 629, 631, 712, 638, 626, 588, 627, 589, 641, 569, - /* 290 */ 644, 612, 645, 613, 651, 643, 646, 662, 731, 647, - /* 300 */ 649, 730, 735, 736, 737, 738, 739, 740, 741, 660, - /* 310 */ 733, 670, 667, 664, 690, 633, 671, 728, 695, 742, - /* 320 */ 609, 610, 657, 657, 657, 657, 745, 614, 615, 657, - /* 330 */ 657, 657, 757, 758, 681, 657, 762, 763, 764, 765, - /* 340 */ 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, - /* 350 */ 776, 682, 696, 777, 778, 722, 723, 786, + /* 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, }; -#define YY_REDUCE_COUNT (193) -#define YY_REDUCE_MIN (-269) -#define YY_REDUCE_MAX (494) +#define YY_REDUCE_COUNT (206) +#define YY_REDUCE_MIN (-266) +#define YY_REDUCE_MAX (479) static const short yy_reduce_ofst[] = { - /* 0 */ 144, 10, 10, 131, 131, 126, -65, -207, -203, -178, - /* 10 */ -196, -185, -166, -156, -108, -76, 7, 52, 118, 182, - /* 20 */ 187, 196, 201, -16, -140, -139, 169, 174, 175, 177, - /* 30 */ 183, 184, 202, 203, 208, 209, -99, -35, 16, -143, - /* 40 */ 76, 167, -137, 223, 240, 36, 198, -195, -9, 89, - /* 50 */ 217, 219, 257, 262, 263, 80, 243, 237, 265, 269, - /* 60 */ 218, 165, 256, 272, -269, -216, -193, 253, 258, 267, - /* 70 */ 270, 278, 280, 281, 282, 283, 284, 285, 286, 287, - /* 80 */ 288, 289, 290, 292, 293, 294, 8, 308, 312, 323, - /* 90 */ 324, 325, 327, 328, 329, 330, 373, 377, 300, 378, - /* 100 */ 379, 380, 331, 332, 383, 384, 385, 296, 386, 297, - /* 110 */ 333, 338, 391, 392, 393, 394, 399, 402, 403, 404, - /* 120 */ 408, 410, 412, 415, 416, 418, 419, 420, 421, 422, - /* 130 */ 423, 424, 425, 426, 427, 429, 430, 432, 433, 434, - /* 140 */ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, - /* 150 */ 445, 446, 447, 448, 449, 451, 453, 303, 317, 334, - /* 160 */ 336, 454, 455, 335, 337, 342, 352, 356, 458, 460, - /* 170 */ 459, 463, 461, 465, 466, 467, 471, 472, 469, 473, - /* 180 */ 470, 476, 477, 478, 475, 482, 480, 479, 481, 483, - /* 190 */ 484, 485, 488, 494, + /* 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, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 872, 1000, 939, 1010, 922, 872, 932, 1153, 1153, 1153, - /* 10 */ 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - /* 20 */ 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - /* 30 */ 872, 872, 872, 872, 872, 872, 1058, 892, 1153, 872, - /* 40 */ 872, 872, 872, 872, 872, 872, 872, 872, 872, 1073, - /* 50 */ 872, 932, 872, 872, 872, 872, 946, 932, 946, 946, - /* 60 */ 872, 1053, 984, 1002, 872, 872, 872, 872, 872, 872, - /* 70 */ 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - /* 80 */ 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - /* 90 */ 872, 872, 872, 872, 872, 872, 872, 872, 1060, 1066, - /* 100 */ 1063, 872, 872, 872, 1068, 872, 872, 1092, 872, 1092, - /* 110 */ 1051, 872, 872, 872, 872, 872, 872, 872, 872, 872, - /* 120 */ 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - /* 130 */ 872, 872, 872, 872, 872, 872, 872, 872, 872, 920, - /* 140 */ 872, 918, 872, 872, 872, 872, 872, 872, 872, 872, - /* 150 */ 872, 872, 872, 872, 903, 872, 890, 872, 872, 872, - /* 160 */ 872, 894, 894, 1099, 1103, 1085, 1097, 1093, 1080, 1078, - /* 170 */ 1076, 1084, 1107, 944, 944, 940, 932, 932, 962, 960, - /* 180 */ 958, 950, 956, 952, 954, 948, 923, 872, 930, 930, - /* 190 */ 930, 930, 984, 1002, 872, 1108, 1098, 872, 1152, 1140, - /* 200 */ 1139, 872, 1148, 1147, 1146, 1138, 1137, 1136, 872, 872, - /* 210 */ 1132, 1135, 1134, 1133, 872, 872, 872, 872, 1142, 1141, - /* 220 */ 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - /* 230 */ 1104, 1100, 872, 872, 872, 872, 872, 872, 872, 872, - /* 240 */ 872, 872, 1110, 872, 872, 872, 872, 872, 872, 872, - /* 250 */ 872, 872, 1012, 872, 872, 872, 872, 872, 872, 872, - /* 260 */ 872, 872, 872, 872, 872, 1050, 872, 872, 872, 872, - /* 270 */ 872, 1062, 1061, 872, 872, 872, 872, 872, 872, 872, - /* 280 */ 872, 872, 872, 872, 1094, 872, 1086, 872, 872, 1024, - /* 290 */ 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - /* 300 */ 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - /* 310 */ 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - /* 320 */ 872, 872, 1171, 1166, 1167, 1164, 872, 872, 872, 1163, - /* 330 */ 1158, 1159, 872, 872, 872, 1156, 872, 872, 872, 872, - /* 340 */ 872, 872, 872, 872, 872, 872, 872, 872, 872, 872, - /* 350 */ 872, 968, 872, 901, 899, 933, 872, 872, + /* 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, }; /********** End of lemon-generated parsing tables *****************************/ @@ -611,7 +609,6 @@ 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 */ @@ -896,199 +893,196 @@ static const char *const yyTokenName[] = { /* 85 */ "RP", /* 86 */ "IF", /* 87 */ "EXISTS", - /* 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", + /* 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", }; #endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */ @@ -1117,17 +1111,17 @@ static const char *const yyRuleName[] = { /* 18 */ "dbPrefix ::= ids DOT", /* 19 */ "cpxName ::=", /* 20 */ "cpxName ::= DOT ids", - /* 21 */ "cmd ::= SHOW CREATE TABLE ftblname", - /* 22 */ "cmd ::= SHOW CREATE STABLE ftblname", + /* 21 */ "cmd ::= SHOW CREATE TABLE ids cpxName", + /* 22 */ "cmd ::= SHOW CREATE STABLE ids cpxName", /* 23 */ "cmd ::= SHOW CREATE DATABASE ids", /* 24 */ "cmd ::= SHOW dbPrefix TABLES", - /* 25 */ "cmd ::= SHOW dbPrefix TABLES LIKE tblname", + /* 25 */ "cmd ::= SHOW dbPrefix TABLES LIKE ids", /* 26 */ "cmd ::= SHOW dbPrefix STABLES", - /* 27 */ "cmd ::= SHOW dbPrefix STABLES LIKE tblname", + /* 27 */ "cmd ::= SHOW dbPrefix STABLES LIKE ids", /* 28 */ "cmd ::= SHOW dbPrefix VGROUPS", /* 29 */ "cmd ::= SHOW dbPrefix VGROUPS ids", - /* 30 */ "cmd ::= DROP TABLE ifexists ftblname", - /* 31 */ "cmd ::= DROP STABLE ifexists ftblname", + /* 30 */ "cmd ::= DROP TABLE ifexists ids cpxName", + /* 31 */ "cmd ::= DROP STABLE ifexists ids cpxName", /* 32 */ "cmd ::= DROP DATABASE ifexists ids", /* 33 */ "cmd ::= DROP TOPIC ifexists ids", /* 34 */ "cmd ::= DROP FUNCTION ids", @@ -1135,8 +1129,8 @@ static const char *const yyRuleName[] = { /* 36 */ "cmd ::= DROP USER ids", /* 37 */ "cmd ::= DROP ACCOUNT ids", /* 38 */ "cmd ::= USE ids", - /* 39 */ "cmd ::= DESCRIBE ftblname", - /* 40 */ "cmd ::= DESC ftblname", + /* 39 */ "cmd ::= DESCRIBE ids cpxName", + /* 40 */ "cmd ::= DESC ids cpxName", /* 41 */ "cmd ::= ALTER USER ids PASS ids", /* 42 */ "cmd ::= ALTER USER ids PRIVILEGE ids", /* 43 */ "cmd ::= ALTER DNODE ids ids", @@ -1154,248 +1148,242 @@ static const char *const yyRuleName[] = { /* 55 */ "ifexists ::=", /* 56 */ "ifnotexists ::= IF NOT EXISTS", /* 57 */ "ifnotexists ::=", - /* 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 ::= ESCAPE DOT ID", - /* 239 */ "expr ::= ESCAPE DOT STAR", - /* 240 */ "expr ::= INTEGER", - /* 241 */ "expr ::= MINUS INTEGER", - /* 242 */ "expr ::= PLUS INTEGER", - /* 243 */ "expr ::= FLOAT", - /* 244 */ "expr ::= MINUS FLOAT", - /* 245 */ "expr ::= PLUS FLOAT", - /* 246 */ "expr ::= STRING", - /* 247 */ "expr ::= NOW", - /* 248 */ "expr ::= VARIABLE", - /* 249 */ "expr ::= PLUS VARIABLE", - /* 250 */ "expr ::= MINUS VARIABLE", - /* 251 */ "expr ::= BOOL", - /* 252 */ "expr ::= NULL", - /* 253 */ "expr ::= ID LP exprlist RP", - /* 254 */ "expr ::= ID LP STAR RP", - /* 255 */ "expr ::= expr IS NULL", - /* 256 */ "expr ::= expr IS NOT NULL", - /* 257 */ "expr ::= expr LT expr", - /* 258 */ "expr ::= expr GT expr", - /* 259 */ "expr ::= expr LE expr", - /* 260 */ "expr ::= expr GE expr", - /* 261 */ "expr ::= expr NE expr", - /* 262 */ "expr ::= expr EQ expr", - /* 263 */ "expr ::= expr BETWEEN expr AND expr", - /* 264 */ "expr ::= expr AND expr", - /* 265 */ "expr ::= expr OR expr", - /* 266 */ "expr ::= expr PLUS expr", - /* 267 */ "expr ::= expr MINUS expr", - /* 268 */ "expr ::= expr STAR expr", - /* 269 */ "expr ::= expr SLASH expr", - /* 270 */ "expr ::= expr REM expr", - /* 271 */ "expr ::= expr LIKE expr", - /* 272 */ "expr ::= expr MATCH expr", - /* 273 */ "expr ::= expr NMATCH expr", - /* 274 */ "expr ::= expr IN LP exprlist RP", - /* 275 */ "exprlist ::= exprlist COMMA expritem", - /* 276 */ "exprlist ::= expritem", - /* 277 */ "expritem ::= expr", - /* 278 */ "expritem ::=", - /* 279 */ "cmd ::= RESET QUERY CACHE", - /* 280 */ "cmd ::= SYNCDB ids REPLICA", - /* 281 */ "cmd ::= ALTER TABLE ftblname ADD COLUMN columnlist", - /* 282 */ "cmd ::= ALTER TABLE ftblname DROP COLUMN ids", - /* 283 */ "cmd ::= ALTER TABLE ftblname MODIFY COLUMN columnlist", - /* 284 */ "cmd ::= ALTER TABLE ftblname ADD TAG columnlist", - /* 285 */ "cmd ::= ALTER TABLE ftblname DROP TAG ids", - /* 286 */ "cmd ::= ALTER TABLE ftblname CHANGE TAG ids ids", - /* 287 */ "cmd ::= ALTER TABLE ftblname SET TAG ids EQ tagitem", - /* 288 */ "cmd ::= ALTER TABLE ftblname MODIFY TAG columnlist", - /* 289 */ "cmd ::= ALTER STABLE ftblname ADD COLUMN columnlist", - /* 290 */ "cmd ::= ALTER STABLE ftblname DROP COLUMN ids", - /* 291 */ "cmd ::= ALTER STABLE ftblname MODIFY COLUMN columnlist", - /* 292 */ "cmd ::= ALTER STABLE ftblname ADD TAG columnlist", - /* 293 */ "cmd ::= ALTER STABLE ftblname DROP TAG ids", - /* 294 */ "cmd ::= ALTER STABLE ftblname CHANGE TAG ids ids", - /* 295 */ "cmd ::= ALTER STABLE ftblname SET TAG ids EQ tagitem", - /* 296 */ "cmd ::= ALTER STABLE ftblname MODIFY TAG columnlist", - /* 297 */ "cmd ::= KILL CONNECTION INTEGER", - /* 298 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", - /* 299 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", + /* 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", }; #endif /* NDEBUG */ @@ -1521,60 +1509,60 @@ static void yy_destructor( ** inside the C code. */ /********* Begin destructor definitions ***************************************/ - case 209: /* exprlist */ - case 253: /* selcollist */ - case 267: /* sclp */ + case 206: /* exprlist */ + case 250: /* selcollist */ + case 264: /* sclp */ { -tSqlExprListDestroy((yypminor->yy247)); +tSqlExprListDestroy((yypminor->yy421)); } break; - 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)); + 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 */ +{ +taosArrayDestroy((yypminor->yy421)); } break; - case 245: /* create_table_list */ + case 242: /* create_table_list */ { -destroyCreateTableSql((yypminor->yy336)); +destroyCreateTableSql((yypminor->yy438)); } break; - case 250: /* select */ + case 247: /* select */ { -destroySqlNode((yypminor->yy246)); +destroySqlNode((yypminor->yy56)); } break; - case 254: /* from */ - case 271: /* tablelist */ - case 272: /* sub */ + case 251: /* from */ + case 268: /* tablelist */ + case 269: /* sub */ { -destroyRelationInfo((yypminor->yy46)); +destroyRelationInfo((yypminor->yy8)); } break; - case 255: /* where_opt */ - case 262: /* having_opt */ - case 269: /* expr */ - case 280: /* expritem */ + case 252: /* where_opt */ + case 259: /* having_opt */ + case 266: /* expr */ + case 277: /* expritem */ { -tSqlExprDestroy((yypminor->yy44)); +tSqlExprDestroy((yypminor->yy439)); } break; - case 266: /* union */ + case 263: /* union */ { -destroyAllSqlNode((yypminor->yy247)); +destroyAllSqlNode((yypminor->yy421)); } break; - case 276: /* sortitem */ + case 273: /* sortitem */ { -tVariantDestroy(&(yypminor->yy378)); +tVariantDestroy(&(yypminor->yy430)); } break; /********* End destructor definitions *****************************************/ @@ -1863,306 +1851,300 @@ static void yy_shift( /* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side ** of that rule */ static const YYCODETYPE yyRuleInfoLhs[] = { - 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 ::= ESCAPE DOT ID */ - 269, /* (239) expr ::= ESCAPE DOT STAR */ - 269, /* (240) expr ::= INTEGER */ - 269, /* (241) expr ::= MINUS INTEGER */ - 269, /* (242) expr ::= PLUS INTEGER */ - 269, /* (243) expr ::= FLOAT */ - 269, /* (244) expr ::= MINUS FLOAT */ - 269, /* (245) expr ::= PLUS FLOAT */ - 269, /* (246) expr ::= STRING */ - 269, /* (247) expr ::= NOW */ - 269, /* (248) expr ::= VARIABLE */ - 269, /* (249) expr ::= PLUS VARIABLE */ - 269, /* (250) expr ::= MINUS VARIABLE */ - 269, /* (251) expr ::= BOOL */ - 269, /* (252) expr ::= NULL */ - 269, /* (253) expr ::= ID LP exprlist RP */ - 269, /* (254) expr ::= ID LP STAR RP */ - 269, /* (255) expr ::= expr IS NULL */ - 269, /* (256) expr ::= expr IS NOT NULL */ - 269, /* (257) expr ::= expr LT expr */ - 269, /* (258) expr ::= expr GT expr */ - 269, /* (259) expr ::= expr LE expr */ - 269, /* (260) expr ::= expr GE expr */ - 269, /* (261) expr ::= expr NE expr */ - 269, /* (262) expr ::= expr EQ expr */ - 269, /* (263) expr ::= expr BETWEEN expr AND expr */ - 269, /* (264) expr ::= expr AND expr */ - 269, /* (265) expr ::= expr OR expr */ - 269, /* (266) expr ::= expr PLUS expr */ - 269, /* (267) expr ::= expr MINUS expr */ - 269, /* (268) expr ::= expr STAR expr */ - 269, /* (269) expr ::= expr SLASH expr */ - 269, /* (270) expr ::= expr REM expr */ - 269, /* (271) expr ::= expr LIKE expr */ - 269, /* (272) expr ::= expr MATCH expr */ - 269, /* (273) expr ::= expr NMATCH expr */ - 269, /* (274) expr ::= expr IN LP exprlist RP */ - 209, /* (275) exprlist ::= exprlist COMMA expritem */ - 209, /* (276) exprlist ::= expritem */ - 280, /* (277) expritem ::= expr */ - 280, /* (278) expritem ::= */ - 199, /* (279) cmd ::= RESET QUERY CACHE */ - 199, /* (280) cmd ::= SYNCDB ids REPLICA */ - 199, /* (281) cmd ::= ALTER TABLE ftblname ADD COLUMN columnlist */ - 199, /* (282) cmd ::= ALTER TABLE ftblname DROP COLUMN ids */ - 199, /* (283) cmd ::= ALTER TABLE ftblname MODIFY COLUMN columnlist */ - 199, /* (284) cmd ::= ALTER TABLE ftblname ADD TAG columnlist */ - 199, /* (285) cmd ::= ALTER TABLE ftblname DROP TAG ids */ - 199, /* (286) cmd ::= ALTER TABLE ftblname CHANGE TAG ids ids */ - 199, /* (287) cmd ::= ALTER TABLE ftblname SET TAG ids EQ tagitem */ - 199, /* (288) cmd ::= ALTER TABLE ftblname MODIFY TAG columnlist */ - 199, /* (289) cmd ::= ALTER STABLE ftblname ADD COLUMN columnlist */ - 199, /* (290) cmd ::= ALTER STABLE ftblname DROP COLUMN ids */ - 199, /* (291) cmd ::= ALTER STABLE ftblname MODIFY COLUMN columnlist */ - 199, /* (292) cmd ::= ALTER STABLE ftblname ADD TAG columnlist */ - 199, /* (293) cmd ::= ALTER STABLE ftblname DROP TAG ids */ - 199, /* (294) cmd ::= ALTER STABLE ftblname CHANGE TAG ids ids */ - 199, /* (295) cmd ::= ALTER STABLE ftblname SET TAG ids EQ tagitem */ - 199, /* (296) cmd ::= ALTER STABLE ftblname MODIFY TAG columnlist */ - 199, /* (297) cmd ::= KILL CONNECTION INTEGER */ - 199, /* (298) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - 199, /* (299) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + 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 */ }; /* For rule J, yyRuleInfoNRhs[J] contains the negative of the number @@ -2189,17 +2171,17 @@ static const signed char yyRuleInfoNRhs[] = { -2, /* (18) dbPrefix ::= ids DOT */ 0, /* (19) cpxName ::= */ -2, /* (20) cpxName ::= DOT ids */ - -4, /* (21) cmd ::= SHOW CREATE TABLE ftblname */ - -4, /* (22) cmd ::= SHOW CREATE STABLE ftblname */ + -5, /* (21) cmd ::= SHOW CREATE TABLE ids cpxName */ + -5, /* (22) cmd ::= SHOW CREATE STABLE ids cpxName */ -4, /* (23) cmd ::= SHOW CREATE DATABASE ids */ -3, /* (24) cmd ::= SHOW dbPrefix TABLES */ - -5, /* (25) cmd ::= SHOW dbPrefix TABLES LIKE tblname */ + -5, /* (25) cmd ::= SHOW dbPrefix TABLES LIKE ids */ -3, /* (26) cmd ::= SHOW dbPrefix STABLES */ - -5, /* (27) cmd ::= SHOW dbPrefix STABLES LIKE tblname */ + -5, /* (27) cmd ::= SHOW dbPrefix STABLES LIKE ids */ -3, /* (28) cmd ::= SHOW dbPrefix VGROUPS */ -4, /* (29) cmd ::= SHOW dbPrefix VGROUPS ids */ - -4, /* (30) cmd ::= DROP TABLE ifexists ftblname */ - -4, /* (31) cmd ::= DROP STABLE ifexists ftblname */ + -5, /* (30) cmd ::= DROP TABLE ifexists ids cpxName */ + -5, /* (31) cmd ::= DROP STABLE ifexists ids cpxName */ -4, /* (32) cmd ::= DROP DATABASE ifexists ids */ -4, /* (33) cmd ::= DROP TOPIC ifexists ids */ -3, /* (34) cmd ::= DROP FUNCTION ids */ @@ -2207,8 +2189,8 @@ static const signed char yyRuleInfoNRhs[] = { -3, /* (36) cmd ::= DROP USER ids */ -3, /* (37) cmd ::= DROP ACCOUNT ids */ -2, /* (38) cmd ::= USE ids */ - -2, /* (39) cmd ::= DESCRIBE ftblname */ - -2, /* (40) cmd ::= DESC ftblname */ + -3, /* (39) cmd ::= DESCRIBE ids cpxName */ + -3, /* (40) cmd ::= DESC ids cpxName */ -5, /* (41) cmd ::= ALTER USER ids PASS ids */ -5, /* (42) cmd ::= ALTER USER ids PRIVILEGE ids */ -4, /* (43) cmd ::= ALTER DNODE ids ids */ @@ -2226,248 +2208,242 @@ static const signed char yyRuleInfoNRhs[] = { 0, /* (55) ifexists ::= */ -3, /* (56) ifnotexists ::= IF NOT EXISTS */ 0, /* (57) ifnotexists ::= */ - -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 */ - -3, /* (238) expr ::= ESCAPE DOT ID */ - -3, /* (239) expr ::= ESCAPE DOT STAR */ - -1, /* (240) expr ::= INTEGER */ - -2, /* (241) expr ::= MINUS INTEGER */ - -2, /* (242) expr ::= PLUS INTEGER */ - -1, /* (243) expr ::= FLOAT */ - -2, /* (244) expr ::= MINUS FLOAT */ - -2, /* (245) expr ::= PLUS FLOAT */ - -1, /* (246) expr ::= STRING */ - -1, /* (247) expr ::= NOW */ - -1, /* (248) expr ::= VARIABLE */ - -2, /* (249) expr ::= PLUS VARIABLE */ - -2, /* (250) expr ::= MINUS VARIABLE */ - -1, /* (251) expr ::= BOOL */ - -1, /* (252) expr ::= NULL */ - -4, /* (253) expr ::= ID LP exprlist RP */ - -4, /* (254) expr ::= ID LP STAR RP */ - -3, /* (255) expr ::= expr IS NULL */ - -4, /* (256) expr ::= expr IS NOT NULL */ - -3, /* (257) expr ::= expr LT expr */ - -3, /* (258) expr ::= expr GT expr */ - -3, /* (259) expr ::= expr LE expr */ - -3, /* (260) expr ::= expr GE expr */ - -3, /* (261) expr ::= expr NE expr */ - -3, /* (262) expr ::= expr EQ expr */ - -5, /* (263) expr ::= expr BETWEEN expr AND expr */ - -3, /* (264) expr ::= expr AND expr */ - -3, /* (265) expr ::= expr OR expr */ - -3, /* (266) expr ::= expr PLUS expr */ - -3, /* (267) expr ::= expr MINUS expr */ - -3, /* (268) expr ::= expr STAR expr */ - -3, /* (269) expr ::= expr SLASH expr */ - -3, /* (270) expr ::= expr REM expr */ - -3, /* (271) expr ::= expr LIKE expr */ - -3, /* (272) expr ::= expr MATCH expr */ - -3, /* (273) expr ::= expr NMATCH expr */ - -5, /* (274) expr ::= expr IN LP exprlist RP */ - -3, /* (275) exprlist ::= exprlist COMMA expritem */ - -1, /* (276) exprlist ::= expritem */ - -1, /* (277) expritem ::= expr */ - 0, /* (278) expritem ::= */ - -3, /* (279) cmd ::= RESET QUERY CACHE */ - -3, /* (280) cmd ::= SYNCDB ids REPLICA */ - -6, /* (281) cmd ::= ALTER TABLE ftblname ADD COLUMN columnlist */ - -6, /* (282) cmd ::= ALTER TABLE ftblname DROP COLUMN ids */ - -6, /* (283) cmd ::= ALTER TABLE ftblname MODIFY COLUMN columnlist */ - -6, /* (284) cmd ::= ALTER TABLE ftblname ADD TAG columnlist */ - -6, /* (285) cmd ::= ALTER TABLE ftblname DROP TAG ids */ - -7, /* (286) cmd ::= ALTER TABLE ftblname CHANGE TAG ids ids */ - -8, /* (287) cmd ::= ALTER TABLE ftblname SET TAG ids EQ tagitem */ - -6, /* (288) cmd ::= ALTER TABLE ftblname MODIFY TAG columnlist */ - -6, /* (289) cmd ::= ALTER STABLE ftblname ADD COLUMN columnlist */ - -6, /* (290) cmd ::= ALTER STABLE ftblname DROP COLUMN ids */ - -6, /* (291) cmd ::= ALTER STABLE ftblname MODIFY COLUMN columnlist */ - -6, /* (292) cmd ::= ALTER STABLE ftblname ADD TAG columnlist */ - -6, /* (293) cmd ::= ALTER STABLE ftblname DROP TAG ids */ - -7, /* (294) cmd ::= ALTER STABLE ftblname CHANGE TAG ids ids */ - -8, /* (295) cmd ::= ALTER STABLE ftblname SET TAG ids EQ tagitem */ - -6, /* (296) cmd ::= ALTER STABLE ftblname MODIFY TAG columnlist */ - -3, /* (297) cmd ::= KILL CONNECTION INTEGER */ - -5, /* (298) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - -5, /* (299) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + -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 */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -2558,9 +2534,9 @@ static YYACTIONTYPE yy_reduce( /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* program ::= cmd */ - 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); + 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); {} break; case 1: /* cmd ::= SHOW DATABASES */ @@ -2624,14 +2600,16 @@ static YYACTIONTYPE yy_reduce( case 20: /* cpxName ::= DOT ids */ {yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; yymsp[-1].minor.yy0.n += 1; } break; - case 21: /* cmd ::= SHOW CREATE TABLE ftblname */ + case 21: /* cmd ::= SHOW CREATE TABLE ids cpxName */ { - setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_TABLE, 1, &yymsp[0].minor.yy0); + yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; + setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_TABLE, 1, &yymsp[-1].minor.yy0); } break; - case 22: /* cmd ::= SHOW CREATE STABLE ftblname */ + case 22: /* cmd ::= SHOW CREATE STABLE ids cpxName */ { - setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_STABLE, 1, &yymsp[0].minor.yy0); + yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; + setDCLSqlElems(pInfo, TSDB_SQL_SHOW_CREATE_STABLE, 1, &yymsp[-1].minor.yy0); } break; case 23: /* cmd ::= SHOW CREATE DATABASE ids */ @@ -2644,7 +2622,7 @@ static YYACTIONTYPE yy_reduce( setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &yymsp[-1].minor.yy0, 0); } break; - case 25: /* cmd ::= SHOW dbPrefix TABLES LIKE tblname */ + case 25: /* cmd ::= SHOW dbPrefix TABLES LIKE ids */ { setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0); } @@ -2654,7 +2632,7 @@ static YYACTIONTYPE yy_reduce( setShowOptions(pInfo, TSDB_MGMT_TABLE_METRIC, &yymsp[-1].minor.yy0, 0); } break; - case 27: /* cmd ::= SHOW dbPrefix STABLES LIKE tblname */ + case 27: /* cmd ::= SHOW dbPrefix STABLES LIKE ids */ { SStrToken token; tSetDbName(&token, &yymsp[-3].minor.yy0); @@ -2675,14 +2653,16 @@ static YYACTIONTYPE yy_reduce( setShowOptions(pInfo, TSDB_MGMT_TABLE_VGROUP, &token, &yymsp[0].minor.yy0); } break; - case 30: /* cmd ::= DROP TABLE ifexists ftblname */ + case 30: /* cmd ::= DROP TABLE ifexists ids cpxName */ { - setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &yymsp[0].minor.yy0, &yymsp[-1].minor.yy0, -1, -1); + 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); } break; - case 31: /* cmd ::= DROP STABLE ifexists ftblname */ + case 31: /* cmd ::= DROP STABLE ifexists ids cpxName */ { - setDropDbTableInfo(pInfo, TSDB_SQL_DROP_TABLE, &yymsp[0].minor.yy0, &yymsp[-1].minor.yy0, -1, TSDB_SUPER_TABLE); + 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); } break; case 32: /* cmd ::= DROP DATABASE ifexists ids */ @@ -2706,10 +2686,11 @@ static YYACTIONTYPE yy_reduce( case 38: /* cmd ::= USE ids */ { setDCLSqlElems(pInfo, TSDB_SQL_USE_DB, 1, &yymsp[0].minor.yy0);} break; - case 39: /* cmd ::= DESCRIBE ftblname */ - case 40: /* cmd ::= DESC ftblname */ yytestcase(yyruleno==40); + case 39: /* cmd ::= DESCRIBE ids cpxName */ + case 40: /* cmd ::= DESC ids cpxName */ yytestcase(yyruleno==40); { - setDCLSqlElems(pInfo, TSDB_SQL_DESCRIBE_TABLE, 1, &yymsp[0].minor.yy0); + yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; + setDCLSqlElems(pInfo, TSDB_SQL_DESCRIBE_TABLE, 1, &yymsp[-1].minor.yy0); } break; case 41: /* cmd ::= ALTER USER ids PASS ids */ @@ -2732,22 +2713,19 @@ static YYACTIONTYPE yy_reduce( break; case 47: /* cmd ::= ALTER DATABASE ids alter_db_optr */ case 48: /* cmd ::= ALTER TOPIC ids alter_topic_optr */ yytestcase(yyruleno==48); -{ SStrToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy262, &t);} +{ SStrToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy90, &t);} break; case 49: /* cmd ::= ALTER ACCOUNT ids acct_optr */ -{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy47);} +{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy171);} break; case 50: /* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */ -{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy47);} +{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy171);} break; case 51: /* cmd ::= COMPACT VNODES IN LP exprlist RP */ -{ setCompactVnodeSql(pInfo, TSDB_SQL_COMPACT_VNODE, yymsp[-1].minor.yy247);} +{ setCompactVnodeSql(pInfo, TSDB_SQL_COMPACT_VNODE, yymsp[-1].minor.yy421);} break; case 52: /* ids ::= ID */ case 53: /* ids ::= STRING */ yytestcase(yyruleno==53); - 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; } yymsp[0].minor.yy0 = yylhsminor.yy0; break; @@ -2756,779 +2734,792 @@ static YYACTIONTYPE yy_reduce( break; case 55: /* ifexists ::= */ case 57: /* ifnotexists ::= */ yytestcase(yyruleno==57); - case 185: /* distinct ::= */ yytestcase(yyruleno==185); + case 181: /* distinct ::= */ yytestcase(yyruleno==181); { yymsp[1].minor.yy0.n = 0;} break; case 56: /* ifnotexists ::= IF NOT EXISTS */ { yymsp[-2].minor.yy0.n = 1;} break; - 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 */ + case 58: /* cmd ::= CREATE DNODE ids */ { setDCLSqlElems(pInfo, TSDB_SQL_CREATE_DNODE, 1, &yymsp[0].minor.yy0);} 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);} + case 59: /* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */ +{ setCreateAcctSql(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy171);} 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);} + case 60: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */ + case 61: /* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ yytestcase(yyruleno==61); +{ setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy90, &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);} + case 62: /* cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ +{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy183, &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);} + case 63: /* cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */ +{ setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &yymsp[-5].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy183, &yymsp[0].minor.yy0, 2);} break; - case 68: /* cmd ::= CREATE USER ids PASS ids */ + case 64: /* cmd ::= CREATE USER ids PASS ids */ { setCreateUserSql(pInfo, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);} 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); + 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); { yymsp[1].minor.yy0.n = 0; } 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); + 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); { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } break; - 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); + case 85: /* acct_optr ::= pps tseries storage streams qtime dbs users conns state */ +{ + 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; +} + yymsp[-8].minor.yy171 = yylhsminor.yy171; + break; + case 86: /* intitemlist ::= intitemlist COMMA intitem */ + case 155: /* tagitemlist ::= tagitemlist COMMA tagitem */ yytestcase(yyruleno==155); +{ yylhsminor.yy421 = tVariantListAppend(yymsp[-2].minor.yy421, &yymsp[0].minor.yy430, -1); } + yymsp[-2].minor.yy421 = yylhsminor.yy421; + break; + case 87: /* intitemlist ::= intitem */ + case 156: /* tagitemlist ::= tagitem */ yytestcase(yyruleno==156); +{ yylhsminor.yy421 = tVariantListAppend(NULL, &yymsp[0].minor.yy430, -1); } + 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); +{ toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy430, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy430 = yylhsminor.yy430; + break; + case 89: /* keep ::= KEEP intitemlist */ +{ yymsp[-1].minor.yy421 = yymsp[0].minor.yy421; } + 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); { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } 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 */ + case 105: /* db_optr ::= */ +{setDefaultCreateDbOption(&yymsp[1].minor.yy90); yymsp[1].minor.yy90.dbType = TSDB_DB_TYPE_DEFAULT;} + break; + case 106: /* db_optr ::= db_optr cache */ +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + 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); +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + 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); +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 109: /* db_optr ::= db_optr days */ +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 110: /* db_optr ::= db_optr minrows */ +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 111: /* db_optr ::= db_optr maxrows */ +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); } + 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); +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 113: /* db_optr ::= db_optr ctime */ +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 114: /* db_optr ::= db_optr wal */ +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 115: /* db_optr ::= db_optr fsync */ +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + 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); +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 117: /* db_optr ::= db_optr prec */ +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.precision = yymsp[0].minor.yy0; } + 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); +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.keep = yymsp[0].minor.yy421; } + 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); +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + 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); +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 121: /* topic_optr ::= db_optr */ + case 131: /* alter_topic_optr ::= alter_db_optr */ yytestcase(yyruleno==131); +{ yylhsminor.yy90 = yymsp[0].minor.yy90; yylhsminor.yy90.dbType = TSDB_DB_TYPE_TOPIC; } + 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); +{ yylhsminor.yy90 = yymsp[-1].minor.yy90; yylhsminor.yy90.partitions = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[-1].minor.yy90 = yylhsminor.yy90; + break; + case 123: /* alter_db_optr ::= */ +{ setDefaultCreateDbOption(&yymsp[1].minor.yy90); yymsp[1].minor.yy90.dbType = TSDB_DB_TYPE_DEFAULT;} + break; + case 133: /* typename ::= ids */ { yymsp[0].minor.yy0.type = 0; - tSetColumnType (&yylhsminor.yy179, &yymsp[0].minor.yy0); + tSetColumnType (&yylhsminor.yy183, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy179 = yylhsminor.yy179; + yymsp[0].minor.yy183 = yylhsminor.yy183; break; - case 138: /* typename ::= ids LP signed RP */ + case 134: /* typename ::= ids LP signed RP */ { - if (yymsp[-1].minor.yy403 <= 0) { + if (yymsp[-1].minor.yy325 <= 0) { yymsp[-3].minor.yy0.type = 0; - tSetColumnType(&yylhsminor.yy179, &yymsp[-3].minor.yy0); + tSetColumnType(&yylhsminor.yy183, &yymsp[-3].minor.yy0); } else { - yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy403; // negative value of name length - tSetColumnType(&yylhsminor.yy179, &yymsp[-3].minor.yy0); + yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy325; // negative value of name length + tSetColumnType(&yylhsminor.yy183, &yymsp[-3].minor.yy0); } } - yymsp[-3].minor.yy179 = yylhsminor.yy179; + yymsp[-3].minor.yy183 = yylhsminor.yy183; break; - case 139: /* typename ::= ids UNSIGNED */ + case 135: /* 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.yy179, &yymsp[-1].minor.yy0); + tSetColumnType (&yylhsminor.yy183, &yymsp[-1].minor.yy0); } - yymsp[-1].minor.yy179 = yylhsminor.yy179; + yymsp[-1].minor.yy183 = yylhsminor.yy183; break; - case 140: /* signed ::= INTEGER */ -{ yylhsminor.yy403 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } - yymsp[0].minor.yy403 = yylhsminor.yy403; + case 136: /* signed ::= INTEGER */ +{ yylhsminor.yy325 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + yymsp[0].minor.yy325 = yylhsminor.yy325; break; - case 141: /* signed ::= PLUS INTEGER */ -{ yymsp[-1].minor.yy403 = strtol(yymsp[0].minor.yy0.z, NULL, 10); } + case 137: /* signed ::= PLUS INTEGER */ +{ yymsp[-1].minor.yy325 = 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);} + case 138: /* signed ::= MINUS INTEGER */ +{ yymsp[-1].minor.yy325 = -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;} + case 142: /* cmd ::= CREATE TABLE create_table_list */ +{ pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy438;} break; - case 147: /* create_table_list ::= create_from_stable */ + case 143: /* create_table_list ::= create_from_stable */ { SCreateTableSql* pCreateTable = calloc(1, sizeof(SCreateTableSql)); pCreateTable->childTableInfo = taosArrayInit(4, sizeof(SCreatedTableInfo)); - taosArrayPush(pCreateTable->childTableInfo, &yymsp[0].minor.yy42); + taosArrayPush(pCreateTable->childTableInfo, &yymsp[0].minor.yy152); pCreateTable->type = TSQL_CREATE_TABLE_FROM_STABLE; - yylhsminor.yy336 = pCreateTable; + yylhsminor.yy438 = pCreateTable; } - yymsp[0].minor.yy336 = yylhsminor.yy336; + yymsp[0].minor.yy438 = yylhsminor.yy438; break; - case 148: /* create_table_list ::= create_table_list create_from_stable */ + case 144: /* create_table_list ::= create_table_list create_from_stable */ { - taosArrayPush(yymsp[-1].minor.yy336->childTableInfo, &yymsp[0].minor.yy42); - yylhsminor.yy336 = yymsp[-1].minor.yy336; + taosArrayPush(yymsp[-1].minor.yy438->childTableInfo, &yymsp[0].minor.yy152); + yylhsminor.yy438 = yymsp[-1].minor.yy438; } - yymsp[-1].minor.yy336 = yylhsminor.yy336; + yymsp[-1].minor.yy438 = yylhsminor.yy438; break; - case 149: /* create_table_args ::= ifnotexists ftblname LP columnlist RP */ + case 145: /* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */ { - yylhsminor.yy336 = tSetCreateTableInfo(yymsp[-1].minor.yy247, NULL, NULL, TSQL_CREATE_TABLE); - setSqlInfo(pInfo, yylhsminor.yy336, NULL, TSDB_SQL_CREATE_TABLE); + yylhsminor.yy438 = tSetCreateTableInfo(yymsp[-1].minor.yy421, NULL, NULL, TSQL_CREATE_TABLE); + setSqlInfo(pInfo, yylhsminor.yy438, NULL, TSDB_SQL_CREATE_TABLE); - setCreatedTableName(pInfo, &yymsp[-3].minor.yy0, &yymsp[-4].minor.yy0); + yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; + setCreatedTableName(pInfo, &yymsp[-4].minor.yy0, &yymsp[-5].minor.yy0); } - yymsp[-4].minor.yy336 = yylhsminor.yy336; + yymsp[-5].minor.yy438 = yylhsminor.yy438; break; - case 150: /* create_stable_args ::= ifnotexists ftblname LP columnlist RP TAGS LP columnlist RP */ + case 146: /* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */ { - yylhsminor.yy336 = tSetCreateTableInfo(yymsp[-5].minor.yy247, yymsp[-1].minor.yy247, NULL, TSQL_CREATE_STABLE); - setSqlInfo(pInfo, yylhsminor.yy336, NULL, TSDB_SQL_CREATE_TABLE); + yylhsminor.yy438 = tSetCreateTableInfo(yymsp[-5].minor.yy421, yymsp[-1].minor.yy421, NULL, TSQL_CREATE_STABLE); + setSqlInfo(pInfo, yylhsminor.yy438, NULL, TSDB_SQL_CREATE_TABLE); - setCreatedTableName(pInfo, &yymsp[-7].minor.yy0, &yymsp[-8].minor.yy0); + yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n; + setCreatedTableName(pInfo, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0); } - yymsp[-8].minor.yy336 = yylhsminor.yy336; + yymsp[-9].minor.yy438 = yylhsminor.yy438; break; - case 151: /* create_from_stable ::= ifnotexists ftblname USING ftblname TAGS LP tagitemlist RP */ + case 147: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */ { - yylhsminor.yy42 = createNewChildTableInfo(&yymsp[-4].minor.yy0, NULL, yymsp[-1].minor.yy247, &yymsp[-6].minor.yy0, &yymsp[-7].minor.yy0); + 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); } - yymsp[-7].minor.yy42 = yylhsminor.yy42; + yymsp[-9].minor.yy152 = yylhsminor.yy152; break; - case 152: /* create_from_stable ::= ifnotexists ftblname USING ftblname LP tagNamelist RP TAGS LP tagitemlist RP */ + case 148: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */ { - yylhsminor.yy42 = createNewChildTableInfo(&yymsp[-7].minor.yy0, yymsp[-5].minor.yy247, yymsp[-1].minor.yy247, &yymsp[-9].minor.yy0, &yymsp[-10].minor.yy0); + 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); } - yymsp[-10].minor.yy42 = yylhsminor.yy42; + yymsp[-12].minor.yy152 = yylhsminor.yy152; 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; + case 149: /* tagNamelist ::= tagNamelist COMMA ids */ +{taosArrayPush(yymsp[-2].minor.yy421, &yymsp[0].minor.yy0); yylhsminor.yy421 = yymsp[-2].minor.yy421; } + yymsp[-2].minor.yy421 = yylhsminor.yy421; break; - case 154: /* tagNamelist ::= ids */ -{yylhsminor.yy247 = taosArrayInit(4, sizeof(SStrToken)); taosArrayPush(yylhsminor.yy247, &yymsp[0].minor.yy0);} - yymsp[0].minor.yy247 = yylhsminor.yy247; + case 150: /* tagNamelist ::= ids */ +{yylhsminor.yy421 = taosArrayInit(4, sizeof(SStrToken)); taosArrayPush(yylhsminor.yy421, &yymsp[0].minor.yy0);} + yymsp[0].minor.yy421 = yylhsminor.yy421; break; - case 155: /* create_table_args ::= ifnotexists ftblname AS select */ + case 151: /* create_table_args ::= ifnotexists ids cpxName AS select */ { - yylhsminor.yy336 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy246, TSQL_CREATE_STREAM); - setSqlInfo(pInfo, yylhsminor.yy336, NULL, TSDB_SQL_CREATE_TABLE); + yylhsminor.yy438 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy56, TSQL_CREATE_STREAM); + setSqlInfo(pInfo, yylhsminor.yy438, NULL, TSDB_SQL_CREATE_TABLE); - setCreatedTableName(pInfo, &yymsp[-2].minor.yy0, &yymsp[-3].minor.yy0); + yymsp[-3].minor.yy0.n += yymsp[-2].minor.yy0.n; + setCreatedTableName(pInfo, &yymsp[-3].minor.yy0, &yymsp[-4].minor.yy0); } - yymsp[-3].minor.yy336 = yylhsminor.yy336; + yymsp[-4].minor.yy438 = yylhsminor.yy438; 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; + case 152: /* columnlist ::= columnlist COMMA column */ +{taosArrayPush(yymsp[-2].minor.yy421, &yymsp[0].minor.yy183); yylhsminor.yy421 = yymsp[-2].minor.yy421; } + yymsp[-2].minor.yy421 = yylhsminor.yy421; 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; + case 153: /* columnlist ::= column */ +{yylhsminor.yy421 = taosArrayInit(4, sizeof(TAOS_FIELD)); taosArrayPush(yylhsminor.yy421, &yymsp[0].minor.yy183);} + yymsp[0].minor.yy421 = yylhsminor.yy421; break; - case 158: /* column ::= ids typename */ + case 154: /* column ::= ids typename */ { - tSetColumnInfo(&yylhsminor.yy179, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy179); + tSetColumnInfo(&yylhsminor.yy183, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy183); } - yymsp[-1].minor.yy179 = yylhsminor.yy179; + yymsp[-1].minor.yy183 = yylhsminor.yy183; break; - case 165: /* tagitem ::= NULL */ -{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy378, &yymsp[0].minor.yy0); } - yymsp[0].minor.yy378 = yylhsminor.yy378; + case 161: /* tagitem ::= NULL */ +{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy430, &yymsp[0].minor.yy0); } + yymsp[0].minor.yy430 = yylhsminor.yy430; 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; + case 162: /* tagitem ::= NOW */ +{ yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; tVariantCreate(&yylhsminor.yy430, &yymsp[0].minor.yy0);} + yymsp[0].minor.yy430 = yylhsminor.yy430; 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); + 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); { 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.yy378, &yymsp[-1].minor.yy0); + tVariantCreate(&yylhsminor.yy430, &yymsp[-1].minor.yy0); } - yymsp[-1].minor.yy378 = yylhsminor.yy378; + yymsp[-1].minor.yy430 = yylhsminor.yy430; break; - 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 */ + 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 */ { - 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); + 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); } - yymsp[-13].minor.yy246 = yylhsminor.yy246; + yymsp[-13].minor.yy56 = yylhsminor.yy56; break; - case 172: /* select ::= LP select RP */ -{yymsp[-2].minor.yy246 = yymsp[-1].minor.yy246;} + case 168: /* select ::= LP select RP */ +{yymsp[-2].minor.yy56 = yymsp[-1].minor.yy56;} break; - case 173: /* union ::= select */ -{ yylhsminor.yy247 = setSubclause(NULL, yymsp[0].minor.yy246); } - yymsp[0].minor.yy247 = yylhsminor.yy247; + case 169: /* union ::= select */ +{ yylhsminor.yy421 = setSubclause(NULL, yymsp[0].minor.yy56); } + yymsp[0].minor.yy421 = yylhsminor.yy421; 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; + case 170: /* union ::= union UNION ALL select */ +{ yylhsminor.yy421 = appendSelectClause(yymsp[-3].minor.yy421, yymsp[0].minor.yy56); } + yymsp[-3].minor.yy421 = yylhsminor.yy421; break; - case 175: /* cmd ::= union */ -{ setSqlInfo(pInfo, yymsp[0].minor.yy247, NULL, TSDB_SQL_SELECT); } + case 171: /* cmd ::= union */ +{ setSqlInfo(pInfo, yymsp[0].minor.yy421, NULL, TSDB_SQL_SELECT); } break; - case 176: /* select ::= SELECT selcollist */ + case 172: /* select ::= SELECT selcollist */ { - yylhsminor.yy246 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy247, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + yylhsminor.yy56 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy421, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); } - yymsp[-1].minor.yy246 = yylhsminor.yy246; + yymsp[-1].minor.yy56 = yylhsminor.yy56; break; - case 177: /* sclp ::= selcollist COMMA */ -{yylhsminor.yy247 = yymsp[-1].minor.yy247;} - yymsp[-1].minor.yy247 = yylhsminor.yy247; + case 173: /* sclp ::= selcollist COMMA */ +{yylhsminor.yy421 = yymsp[-1].minor.yy421;} + yymsp[-1].minor.yy421 = yylhsminor.yy421; break; - case 178: /* sclp ::= */ - case 210: /* orderby_opt ::= */ yytestcase(yyruleno==210); -{yymsp[1].minor.yy247 = 0;} + case 174: /* sclp ::= */ + case 206: /* orderby_opt ::= */ yytestcase(yyruleno==206); +{yymsp[1].minor.yy421 = 0;} break; - case 179: /* selcollist ::= sclp distinct expr as */ + case 175: /* selcollist ::= sclp distinct expr as */ { - 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); + 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); } - yymsp[-3].minor.yy247 = yylhsminor.yy247; + yymsp[-3].minor.yy421 = yylhsminor.yy421; break; - case 180: /* selcollist ::= sclp STAR */ + case 176: /* selcollist ::= sclp STAR */ { tSqlExpr *pNode = tSqlExprCreateIdValue(NULL, TK_ALL); - yylhsminor.yy247 = tSqlExprListAppend(yymsp[-1].minor.yy247, pNode, 0, 0); + yylhsminor.yy421 = tSqlExprListAppend(yymsp[-1].minor.yy421, pNode, 0, 0); } - yymsp[-1].minor.yy247 = yylhsminor.yy247; + yymsp[-1].minor.yy421 = yylhsminor.yy421; break; - case 181: /* as ::= AS ids */ + case 177: /* as ::= AS ids */ { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } break; - case 182: /* as ::= ids */ + case 178: /* as ::= ids */ { yylhsminor.yy0 = yymsp[0].minor.yy0; } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 183: /* as ::= */ + case 179: /* as ::= */ { yymsp[1].minor.yy0.n = 0; } break; - case 184: /* distinct ::= DISTINCT */ + case 180: /* distinct ::= DISTINCT */ { yylhsminor.yy0 = yymsp[0].minor.yy0; } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 186: /* from ::= FROM tablelist */ - case 187: /* from ::= FROM sub */ yytestcase(yyruleno==187); -{yymsp[-1].minor.yy46 = yymsp[0].minor.yy46;} + case 182: /* from ::= FROM tablelist */ + case 183: /* from ::= FROM sub */ yytestcase(yyruleno==183); +{yymsp[-1].minor.yy8 = yymsp[0].minor.yy8;} break; - case 188: /* sub ::= LP union RP */ -{yymsp[-2].minor.yy46 = addSubqueryElem(NULL, yymsp[-1].minor.yy247, NULL);} + case 184: /* sub ::= LP union RP */ +{yymsp[-2].minor.yy8 = addSubqueryElem(NULL, yymsp[-1].minor.yy421, NULL);} break; - case 189: /* sub ::= LP union RP ids */ -{yymsp[-3].minor.yy46 = addSubqueryElem(NULL, yymsp[-2].minor.yy247, &yymsp[0].minor.yy0);} + case 185: /* sub ::= LP union RP ids */ +{yymsp[-3].minor.yy8 = addSubqueryElem(NULL, yymsp[-2].minor.yy421, &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; + case 186: /* sub ::= sub COMMA LP union RP ids */ +{yylhsminor.yy8 = addSubqueryElem(yymsp[-5].minor.yy8, yymsp[-2].minor.yy421, &yymsp[0].minor.yy0);} + yymsp[-5].minor.yy8 = yylhsminor.yy8; break; - case 191: /* tablelist ::= ftblname */ + case 187: /* tablelist ::= ids cpxName */ { - yylhsminor.yy46 = setTableNameList(NULL, &yymsp[0].minor.yy0, NULL); + yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; + yylhsminor.yy8 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL); } - yymsp[0].minor.yy46 = yylhsminor.yy46; + yymsp[-1].minor.yy8 = yylhsminor.yy8; break; - case 192: /* tablelist ::= ftblname ids */ + case 188: /* tablelist ::= ids cpxName ids */ { - yylhsminor.yy46 = setTableNameList(NULL, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); + yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; + yylhsminor.yy8 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } - yymsp[-1].minor.yy46 = yylhsminor.yy46; + yymsp[-2].minor.yy8 = yylhsminor.yy8; break; - case 193: /* tablelist ::= tablelist COMMA ftblname */ + case 189: /* tablelist ::= tablelist COMMA ids cpxName */ { - yylhsminor.yy46 = setTableNameList(yymsp[-2].minor.yy46, &yymsp[0].minor.yy0, NULL); + yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; + yylhsminor.yy8 = setTableNameList(yymsp[-3].minor.yy8, &yymsp[-1].minor.yy0, NULL); } - yymsp[-2].minor.yy46 = yylhsminor.yy46; + yymsp[-3].minor.yy8 = yylhsminor.yy8; break; - case 194: /* tablelist ::= tablelist COMMA ftblname ids */ + case 190: /* tablelist ::= tablelist COMMA ids cpxName ids */ { - yylhsminor.yy46 = setTableNameList(yymsp[-3].minor.yy46, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); + 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); } - yymsp[-3].minor.yy46 = yylhsminor.yy46; + yymsp[-4].minor.yy8 = yylhsminor.yy8; break; - case 195: /* tmvar ::= VARIABLE */ + case 191: /* tmvar ::= VARIABLE */ {yylhsminor.yy0 = yymsp[0].minor.yy0;} yymsp[0].minor.yy0 = yylhsminor.yy0; break; - 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; + case 192: /* interval_option ::= intervalKey LP tmvar RP */ +{yylhsminor.yy400.interval = yymsp[-1].minor.yy0; yylhsminor.yy400.offset.n = 0; yylhsminor.yy400.token = yymsp[-3].minor.yy104;} + yymsp[-3].minor.yy400 = yylhsminor.yy400; 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; + case 193: /* interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ +{yylhsminor.yy400.interval = yymsp[-3].minor.yy0; yylhsminor.yy400.offset = yymsp[-1].minor.yy0; yylhsminor.yy400.token = yymsp[-5].minor.yy104;} + yymsp[-5].minor.yy400 = yylhsminor.yy400; break; - case 198: /* interval_option ::= */ -{memset(&yymsp[1].minor.yy430, 0, sizeof(yymsp[1].minor.yy430));} + case 194: /* interval_option ::= */ +{memset(&yymsp[1].minor.yy400, 0, sizeof(yymsp[1].minor.yy400));} break; - case 199: /* intervalKey ::= INTERVAL */ -{yymsp[0].minor.yy2 = TK_INTERVAL;} + case 195: /* intervalKey ::= INTERVAL */ +{yymsp[0].minor.yy104 = TK_INTERVAL;} break; - case 200: /* intervalKey ::= EVERY */ -{yymsp[0].minor.yy2 = TK_EVERY; } + case 196: /* intervalKey ::= EVERY */ +{yymsp[0].minor.yy104 = TK_EVERY; } break; - case 201: /* session_option ::= */ -{yymsp[1].minor.yy507.col.n = 0; yymsp[1].minor.yy507.gap.n = 0;} + case 197: /* session_option ::= */ +{yymsp[1].minor.yy147.col.n = 0; yymsp[1].minor.yy147.gap.n = 0;} break; - case 202: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ + case 198: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; - yymsp[-6].minor.yy507.col = yymsp[-4].minor.yy0; - yymsp[-6].minor.yy507.gap = yymsp[-1].minor.yy0; + yymsp[-6].minor.yy147.col = yymsp[-4].minor.yy0; + yymsp[-6].minor.yy147.gap = yymsp[-1].minor.yy0; } break; - case 203: /* windowstate_option ::= */ -{ yymsp[1].minor.yy492.col.n = 0; yymsp[1].minor.yy492.col.z = NULL;} + case 199: /* windowstate_option ::= */ +{ yymsp[1].minor.yy40.col.n = 0; yymsp[1].minor.yy40.col.z = NULL;} break; - case 204: /* windowstate_option ::= STATE_WINDOW LP ids RP */ -{ yymsp[-3].minor.yy492.col = yymsp[-1].minor.yy0; } + case 200: /* windowstate_option ::= STATE_WINDOW LP ids RP */ +{ yymsp[-3].minor.yy40.col = yymsp[-1].minor.yy0; } break; - case 205: /* fill_opt ::= */ -{ yymsp[1].minor.yy247 = 0; } + case 201: /* fill_opt ::= */ +{ yymsp[1].minor.yy421 = 0; } break; - case 206: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + case 202: /* 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.yy247, &A, -1, 0); - yymsp[-5].minor.yy247 = yymsp[-1].minor.yy247; + tVariantListInsert(yymsp[-1].minor.yy421, &A, -1, 0); + yymsp[-5].minor.yy421 = yymsp[-1].minor.yy421; } break; - case 207: /* fill_opt ::= FILL LP ID RP */ + case 203: /* fill_opt ::= FILL LP ID RP */ { toTSDBType(yymsp[-1].minor.yy0.type); - yymsp[-3].minor.yy247 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1); + yymsp[-3].minor.yy421 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1); } break; - case 208: /* sliding_opt ::= SLIDING LP tmvar RP */ + case 204: /* sliding_opt ::= SLIDING LP tmvar RP */ {yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0; } break; - case 209: /* sliding_opt ::= */ + case 205: /* sliding_opt ::= */ {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = NULL; yymsp[1].minor.yy0.type = 0; } break; - case 211: /* orderby_opt ::= ORDER BY sortlist */ -{yymsp[-2].minor.yy247 = yymsp[0].minor.yy247;} + case 207: /* orderby_opt ::= ORDER BY sortlist */ +{yymsp[-2].minor.yy421 = yymsp[0].minor.yy421;} break; - case 212: /* sortlist ::= sortlist COMMA item sortorder */ + case 208: /* sortlist ::= sortlist COMMA item sortorder */ { - yylhsminor.yy247 = tVariantListAppend(yymsp[-3].minor.yy247, &yymsp[-1].minor.yy378, yymsp[0].minor.yy222); + yylhsminor.yy421 = tVariantListAppend(yymsp[-3].minor.yy421, &yymsp[-1].minor.yy430, yymsp[0].minor.yy96); } - yymsp[-3].minor.yy247 = yylhsminor.yy247; + yymsp[-3].minor.yy421 = yylhsminor.yy421; break; - case 213: /* sortlist ::= item sortorder */ + case 209: /* sortlist ::= item sortorder */ { - yylhsminor.yy247 = tVariantListAppend(NULL, &yymsp[-1].minor.yy378, yymsp[0].minor.yy222); + yylhsminor.yy421 = tVariantListAppend(NULL, &yymsp[-1].minor.yy430, yymsp[0].minor.yy96); } - yymsp[-1].minor.yy247 = yylhsminor.yy247; + yymsp[-1].minor.yy421 = yylhsminor.yy421; break; - case 214: /* item ::= ids cpxName */ + case 210: /* item ::= ids cpxName */ { toTSDBType(yymsp[-1].minor.yy0.type); yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; - tVariantCreate(&yylhsminor.yy378, &yymsp[-1].minor.yy0); + tVariantCreate(&yylhsminor.yy430, &yymsp[-1].minor.yy0); } - yymsp[-1].minor.yy378 = yylhsminor.yy378; + yymsp[-1].minor.yy430 = yylhsminor.yy430; break; - case 215: /* sortorder ::= ASC */ -{ yymsp[0].minor.yy222 = TSDB_ORDER_ASC; } + case 211: /* sortorder ::= ASC */ +{ yymsp[0].minor.yy96 = TSDB_ORDER_ASC; } break; - case 216: /* sortorder ::= DESC */ -{ yymsp[0].minor.yy222 = TSDB_ORDER_DESC;} + case 212: /* sortorder ::= DESC */ +{ yymsp[0].minor.yy96 = TSDB_ORDER_DESC;} break; - case 217: /* sortorder ::= */ -{ yymsp[1].minor.yy222 = TSDB_ORDER_ASC; } + case 213: /* sortorder ::= */ +{ yymsp[1].minor.yy96 = TSDB_ORDER_ASC; } break; - case 218: /* groupby_opt ::= */ -{ yymsp[1].minor.yy247 = 0;} + case 214: /* groupby_opt ::= */ +{ yymsp[1].minor.yy421 = 0;} break; - case 219: /* groupby_opt ::= GROUP BY grouplist */ -{ yymsp[-2].minor.yy247 = yymsp[0].minor.yy247;} + case 215: /* groupby_opt ::= GROUP BY grouplist */ +{ yymsp[-2].minor.yy421 = yymsp[0].minor.yy421;} break; - case 220: /* grouplist ::= grouplist COMMA item */ + case 216: /* grouplist ::= grouplist COMMA item */ { - yylhsminor.yy247 = tVariantListAppend(yymsp[-2].minor.yy247, &yymsp[0].minor.yy378, -1); + yylhsminor.yy421 = tVariantListAppend(yymsp[-2].minor.yy421, &yymsp[0].minor.yy430, -1); } - yymsp[-2].minor.yy247 = yylhsminor.yy247; + yymsp[-2].minor.yy421 = yylhsminor.yy421; break; - case 221: /* grouplist ::= item */ + case 217: /* grouplist ::= item */ { - yylhsminor.yy247 = tVariantListAppend(NULL, &yymsp[0].minor.yy378, -1); + yylhsminor.yy421 = tVariantListAppend(NULL, &yymsp[0].minor.yy430, -1); } - yymsp[0].minor.yy247 = yylhsminor.yy247; + yymsp[0].minor.yy421 = yylhsminor.yy421; + break; + case 218: /* having_opt ::= */ + case 228: /* where_opt ::= */ yytestcase(yyruleno==228); + case 272: /* expritem ::= */ yytestcase(yyruleno==272); +{yymsp[1].minor.yy439 = 0;} + break; + case 219: /* having_opt ::= HAVING expr */ + case 229: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==229); +{yymsp[-1].minor.yy439 = yymsp[0].minor.yy439;} break; - case 222: /* having_opt ::= */ - case 232: /* where_opt ::= */ yytestcase(yyruleno==232); - case 278: /* expritem ::= */ yytestcase(yyruleno==278); -{yymsp[1].minor.yy44 = 0;} + case 220: /* limit_opt ::= */ + case 224: /* slimit_opt ::= */ yytestcase(yyruleno==224); +{yymsp[1].minor.yy166.limit = -1; yymsp[1].minor.yy166.offset = 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;} + case 221: /* limit_opt ::= LIMIT signed */ + case 225: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==225); +{yymsp[-1].minor.yy166.limit = yymsp[0].minor.yy325; yymsp[-1].minor.yy166.offset = 0;} break; - case 224: /* limit_opt ::= */ - case 228: /* slimit_opt ::= */ yytestcase(yyruleno==228); -{yymsp[1].minor.yy204.limit = -1; yymsp[1].minor.yy204.offset = 0;} + case 222: /* limit_opt ::= LIMIT signed OFFSET signed */ +{ yymsp[-3].minor.yy166.limit = yymsp[-2].minor.yy325; yymsp[-3].minor.yy166.offset = yymsp[0].minor.yy325;} 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;} + case 223: /* limit_opt ::= LIMIT signed COMMA signed */ +{ yymsp[-3].minor.yy166.limit = yymsp[0].minor.yy325; yymsp[-3].minor.yy166.offset = yymsp[-2].minor.yy325;} 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;} + case 226: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ +{yymsp[-3].minor.yy166.limit = yymsp[-2].minor.yy325; yymsp[-3].minor.yy166.offset = yymsp[0].minor.yy325;} 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;} + case 227: /* slimit_opt ::= SLIMIT signed COMMA signed */ +{yymsp[-3].minor.yy166.limit = yymsp[0].minor.yy325; yymsp[-3].minor.yy166.offset = yymsp[-2].minor.yy325;} 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;} + case 230: /* expr ::= LP expr RP */ +{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);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; 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;} + case 231: /* expr ::= ID */ +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_ID);} + yymsp[0].minor.yy439 = yylhsminor.yy439; 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; + case 232: /* expr ::= ID DOT ID */ +{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ID);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 235: /* expr ::= ID */ -{ yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_ID);} - yymsp[0].minor.yy44 = yylhsminor.yy44; + case 233: /* expr ::= ID DOT STAR */ +{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ALL);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 236: /* expr ::= ID DOT ID */ - case 238: /* expr ::= ESCAPE DOT ID */ yytestcase(yyruleno==238); -{ 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; + case 234: /* expr ::= INTEGER */ +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_INTEGER);} + yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 237: /* expr ::= ID DOT STAR */ - case 239: /* expr ::= ESCAPE DOT STAR */ yytestcase(yyruleno==239); -{ 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; + case 235: /* expr ::= MINUS INTEGER */ + case 236: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==236); +{ 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);} + yymsp[-1].minor.yy439 = yylhsminor.yy439; break; - case 240: /* expr ::= INTEGER */ -{ yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_INTEGER);} - yymsp[0].minor.yy44 = yylhsminor.yy44; + case 237: /* expr ::= FLOAT */ +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_FLOAT);} + yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 241: /* expr ::= MINUS INTEGER */ - case 242: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==242); -{ 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; + case 238: /* expr ::= MINUS FLOAT */ + case 239: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==239); +{ 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);} + yymsp[-1].minor.yy439 = yylhsminor.yy439; break; - case 243: /* expr ::= FLOAT */ -{ yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_FLOAT);} - yymsp[0].minor.yy44 = yylhsminor.yy44; + case 240: /* expr ::= STRING */ +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_STRING);} + yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 244: /* expr ::= MINUS FLOAT */ - case 245: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==245); -{ 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; + case 241: /* expr ::= NOW */ +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NOW); } + yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 246: /* expr ::= STRING */ -{ yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_STRING);} - yymsp[0].minor.yy44 = yylhsminor.yy44; + case 242: /* expr ::= VARIABLE */ +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);} + yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 247: /* expr ::= NOW */ -{ yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NOW); } - yymsp[0].minor.yy44 = yylhsminor.yy44; + case 243: /* expr ::= PLUS VARIABLE */ + case 244: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==244); +{ 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);} + yymsp[-1].minor.yy439 = yylhsminor.yy439; break; - case 248: /* expr ::= VARIABLE */ -{ yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);} - yymsp[0].minor.yy44 = yylhsminor.yy44; + case 245: /* expr ::= BOOL */ +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);} + yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 249: /* expr ::= PLUS VARIABLE */ - case 250: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==250); -{ 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; + case 246: /* expr ::= NULL */ +{ yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);} + yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 251: /* expr ::= BOOL */ -{ yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);} - yymsp[0].minor.yy44 = yylhsminor.yy44; + case 247: /* expr ::= ID LP exprlist RP */ +{ 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); } + yymsp[-3].minor.yy439 = yylhsminor.yy439; break; - case 252: /* expr ::= NULL */ -{ yylhsminor.yy44 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);} - yymsp[0].minor.yy44 = yylhsminor.yy44; + case 248: /* expr ::= ID LP STAR RP */ +{ tStrTokenAppend(pInfo->funcs, &yymsp[-3].minor.yy0); yylhsminor.yy439 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); } + yymsp[-3].minor.yy439 = yylhsminor.yy439; break; - case 253: /* 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; + case 249: /* expr ::= expr IS NULL */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, NULL, TK_ISNULL);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 254: /* 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; + case 250: /* expr ::= expr IS NOT NULL */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-3].minor.yy439, NULL, TK_NOTNULL);} + yymsp[-3].minor.yy439 = yylhsminor.yy439; break; - case 255: /* expr ::= expr IS NULL */ -{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, NULL, TK_ISNULL);} - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 251: /* expr ::= expr LT expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_LT);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 256: /* expr ::= expr IS NOT NULL */ -{yylhsminor.yy44 = tSqlExprCreate(yymsp[-3].minor.yy44, NULL, TK_NOTNULL);} - yymsp[-3].minor.yy44 = yylhsminor.yy44; + case 252: /* expr ::= expr GT expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_GT);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 257: /* expr ::= expr LT expr */ -{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_LT);} - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 253: /* expr ::= expr LE expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_LE);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 258: /* expr ::= expr GT expr */ -{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_GT);} - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 254: /* expr ::= expr GE expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_GE);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 259: /* expr ::= expr LE expr */ -{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_LE);} - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 255: /* expr ::= expr NE expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_NE);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 260: /* expr ::= expr GE expr */ -{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_GE);} - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 256: /* expr ::= expr EQ expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_EQ);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 261: /* expr ::= expr NE expr */ -{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_NE);} - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 257: /* expr ::= expr BETWEEN expr AND expr */ +{ 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);} + yymsp[-4].minor.yy439 = yylhsminor.yy439; break; - case 262: /* 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 263: /* 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 264: /* 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 265: /* expr ::= expr OR expr */ -{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_OR); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 258: /* expr ::= expr AND expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_AND);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 266: /* expr ::= expr PLUS expr */ -{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_PLUS); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 259: /* expr ::= expr OR expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_OR); } + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 267: /* expr ::= expr MINUS expr */ -{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_MINUS); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 260: /* expr ::= expr PLUS expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_PLUS); } + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 268: /* expr ::= expr STAR expr */ -{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_STAR); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 261: /* expr ::= expr MINUS expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_MINUS); } + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 269: /* expr ::= expr SLASH expr */ -{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_DIVIDE);} - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 262: /* expr ::= expr STAR expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_STAR); } + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 270: /* expr ::= expr REM expr */ -{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_REM); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 263: /* expr ::= expr SLASH expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_DIVIDE);} + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 271: /* expr ::= expr LIKE expr */ -{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_LIKE); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 264: /* expr ::= expr REM expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_REM); } + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 272: /* expr ::= expr MATCH expr */ -{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_MATCH); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 265: /* expr ::= expr LIKE expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_LIKE); } + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 273: /* expr ::= expr NMATCH expr */ -{yylhsminor.yy44 = tSqlExprCreate(yymsp[-2].minor.yy44, yymsp[0].minor.yy44, TK_NMATCH); } - yymsp[-2].minor.yy44 = yylhsminor.yy44; + case 266: /* expr ::= expr MATCH expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_MATCH); } + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 274: /* 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; + case 267: /* expr ::= expr NMATCH expr */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, yymsp[0].minor.yy439, TK_NMATCH); } + yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 275: /* exprlist ::= exprlist COMMA expritem */ -{yylhsminor.yy247 = tSqlExprListAppend(yymsp[-2].minor.yy247,yymsp[0].minor.yy44,0, 0);} - yymsp[-2].minor.yy247 = yylhsminor.yy247; + case 268: /* expr ::= expr IN LP exprlist RP */ +{yylhsminor.yy439 = tSqlExprCreate(yymsp[-4].minor.yy439, (tSqlExpr*)yymsp[-1].minor.yy421, TK_IN); } + yymsp[-4].minor.yy439 = yylhsminor.yy439; break; - case 276: /* exprlist ::= expritem */ -{yylhsminor.yy247 = tSqlExprListAppend(0,yymsp[0].minor.yy44,0, 0);} - yymsp[0].minor.yy247 = yylhsminor.yy247; + case 269: /* exprlist ::= exprlist COMMA expritem */ +{yylhsminor.yy421 = tSqlExprListAppend(yymsp[-2].minor.yy421,yymsp[0].minor.yy439,0, 0);} + yymsp[-2].minor.yy421 = yylhsminor.yy421; break; - case 277: /* expritem ::= expr */ -{yylhsminor.yy44 = yymsp[0].minor.yy44;} - yymsp[0].minor.yy44 = yylhsminor.yy44; + case 270: /* exprlist ::= expritem */ +{yylhsminor.yy421 = tSqlExprListAppend(0,yymsp[0].minor.yy439,0, 0);} + yymsp[0].minor.yy421 = yylhsminor.yy421; break; - case 279: /* cmd ::= RESET QUERY CACHE */ + case 271: /* expritem ::= expr */ +{yylhsminor.yy439 = yymsp[0].minor.yy439;} + yymsp[0].minor.yy439 = yylhsminor.yy439; + break; + case 273: /* cmd ::= RESET QUERY CACHE */ { setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);} break; - case 280: /* cmd ::= SYNCDB ids REPLICA */ + case 274: /* cmd ::= SYNCDB ids REPLICA */ { setDCLSqlElems(pInfo, TSDB_SQL_SYNC_DB_REPLICA, 1, &yymsp[-1].minor.yy0);} break; - case 281: /* cmd ::= ALTER TABLE ftblname ADD COLUMN columnlist */ + case 275: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ { - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, yymsp[0].minor.yy247, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1); + 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); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 282: /* cmd ::= ALTER TABLE ftblname DROP COLUMN ids */ + case 276: /* cmd ::= ALTER TABLE ids cpxName 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[-3].minor.yy0, NULL, K, TSDB_ALTER_TABLE_DROP_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, K, TSDB_ALTER_TABLE_DROP_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 283: /* cmd ::= ALTER TABLE ftblname MODIFY COLUMN columnlist */ + case 277: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ { - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, yymsp[0].minor.yy247, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1); + 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); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 284: /* cmd ::= ALTER TABLE ftblname ADD TAG columnlist */ + case 278: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ { - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, yymsp[0].minor.yy247, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1); + 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); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 285: /* cmd ::= ALTER TABLE ftblname DROP TAG ids */ + case 279: /* cmd ::= ALTER TABLE ids cpxName 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[-3].minor.yy0, NULL, A, TSDB_ALTER_TABLE_DROP_TAG_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, A, TSDB_ALTER_TABLE_DROP_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 286: /* cmd ::= ALTER TABLE ftblname CHANGE TAG ids ids */ + case 280: /* cmd ::= ALTER TABLE ids cpxName 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); @@ -3536,67 +3527,75 @@ static YYACTIONTYPE yy_reduce( toTSDBType(yymsp[0].minor.yy0.type); A = tVariantListAppendToken(A, &yymsp[0].minor.yy0, -1); - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, A, TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-5].minor.yy0, NULL, A, TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 287: /* cmd ::= ALTER TABLE ftblname SET TAG ids EQ tagitem */ + case 281: /* cmd ::= ALTER TABLE ids cpxName 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.yy378, -1); + A = tVariantListAppend(A, &yymsp[0].minor.yy430, -1); - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-5].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, -1); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 288: /* cmd ::= ALTER TABLE ftblname MODIFY TAG columnlist */ + case 282: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ { - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, yymsp[0].minor.yy247, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1); + 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); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 289: /* cmd ::= ALTER STABLE ftblname ADD COLUMN columnlist */ + case 283: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ { - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, yymsp[0].minor.yy247, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE); + 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); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 290: /* cmd ::= ALTER STABLE ftblname DROP COLUMN ids */ + case 284: /* cmd ::= ALTER STABLE ids cpxName 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[-3].minor.yy0, NULL, K, TSDB_ALTER_TABLE_DROP_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, K, TSDB_ALTER_TABLE_DROP_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 291: /* cmd ::= ALTER STABLE ftblname MODIFY COLUMN columnlist */ + case 285: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ { - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, yymsp[0].minor.yy247, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE); + 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); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 292: /* cmd ::= ALTER STABLE ftblname ADD TAG columnlist */ + case 286: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ { - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, yymsp[0].minor.yy247, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE); + 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); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 293: /* cmd ::= ALTER STABLE ftblname DROP TAG ids */ + case 287: /* cmd ::= ALTER STABLE ids cpxName 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[-3].minor.yy0, NULL, A, TSDB_ALTER_TABLE_DROP_TAG_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, A, TSDB_ALTER_TABLE_DROP_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 294: /* cmd ::= ALTER STABLE ftblname CHANGE TAG ids ids */ + case 288: /* cmd ::= ALTER STABLE ids cpxName 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); @@ -3604,34 +3603,36 @@ static YYACTIONTYPE yy_reduce( toTSDBType(yymsp[0].minor.yy0.type); A = tVariantListAppendToken(A, &yymsp[0].minor.yy0, -1); - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, NULL, A, TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-5].minor.yy0, NULL, A, TSDB_ALTER_TABLE_CHANGE_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 295: /* cmd ::= ALTER STABLE ftblname SET TAG ids EQ tagitem */ + case 289: /* cmd ::= ALTER STABLE ids cpxName 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.yy378, -1); + A = tVariantListAppend(A, &yymsp[0].minor.yy430, -1); - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-5].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, TSDB_SUPER_TABLE); + SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 296: /* cmd ::= ALTER STABLE ftblname MODIFY TAG columnlist */ + case 290: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ { - SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-3].minor.yy0, yymsp[0].minor.yy247, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE); + 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); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 297: /* cmd ::= KILL CONNECTION INTEGER */ + case 291: /* cmd ::= KILL CONNECTION INTEGER */ {setKillSql(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);} break; - case 298: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ + case 292: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ {yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_STREAM, &yymsp[-2].minor.yy0);} break; - case 299: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ + case 293: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ {yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_QUERY, &yymsp[-2].minor.yy0);} break; default: diff --git a/src/util/inc/tutil.h b/src/util/inc/tutil.h index 6bcfb5de29..4e2609eb28 100644 --- a/src/util/inc/tutil.h +++ b/src/util/inc/tutil.h @@ -27,6 +27,7 @@ extern "C" { int32_t strdequote(char *src); int32_t strRmquote(char *z, int32_t len); +int32_t strRmquoteEscape(char *z, int32_t len); size_t strtrim(char *src); char * strnchr(char *haystack, char needle, int32_t len, bool skipquote); char ** strsplit(char *src, const char *delim, int32_t *num); diff --git a/src/util/src/ttokenizer.c b/src/util/src/ttokenizer.c index b75e7ad33d..be1f19a121 100644 --- a/src/util/src/ttokenizer.c +++ b/src/util/src/ttokenizer.c @@ -228,8 +228,7 @@ static SKeyword keywordTable[] = { {"FUNCTIONS", TK_FUNCTIONS}, {"OUTPUTTYPE", TK_OUTPUTTYPE}, {"AGGREGATE", TK_AGGREGATE}, - {"BUFSIZE", TK_BUFSIZE}, - {"ESCAPE", TK_ESCAPE} + {"BUFSIZE", TK_BUFSIZE} }; static const char isIdChar[] = { @@ -447,7 +446,7 @@ uint32_t tGetToken(char* z, uint32_t* tokenId) { for (i = 1; z[i]; i++) { if (z[i] == '`') { i++; - *tokenId = TK_ESCAPE; + *tokenId = TK_ID; return i; } } diff --git a/src/util/src/tutil.c b/src/util/src/tutil.c index 5f8c92898f..e44c12d6dd 100644 --- a/src/util/src/tutil.c +++ b/src/util/src/tutil.c @@ -84,6 +84,20 @@ int32_t strRmquote(char *z, int32_t len){ return len - 2 - cnt; } +int32_t strRmquoteEscape(char *z, int32_t len) { + if (len <= 0) return len; + + if (z[0] == '\'' || z[0] == '\"') { + return strRmquote(z, len); + } else if (len > 1 && z[0] == TS_ESCAPE_CHAR && z[len - 1] == TS_ESCAPE_CHAR) { + memmove(z, z + 1, len - 2); + return len - 2; + } + + return len; +} + + size_t strtrim(char *z) { int32_t i = 0; diff --git a/tests/script/general/parser/tbname_escape.sim b/tests/script/general/parser/tbname_escape.sim index 40c900ec1a..cd70f6749a 100644 --- a/tests/script/general/parser/tbname_escape.sim +++ b/tests/script/general/parser/tbname_escape.sim @@ -17,6 +17,9 @@ sql_error create stable `dbesc`.stba (ts timestamp, f1 int) tags(t1 int); sql create stable `!.!.!` (ts timestamp, f1 int) tags(t1 int); sql create stable 'st1' (ts timestamp, f1 int) tags(t1 int) ; +sql create stable `st2` (ts timestamp, f1 int) tags(t1 int) ; +sql create stable dbesc.`st3` (ts timestamp, f1 int) tags(t1 int) ; +sql create table `***` (ts timestamp, f1 int) tags(t1 int); sql create table `.,@` (ts timestamp, f1 int); sql_error create table ',?,?,?' using dbesc.`!.!.!` tags(1); @@ -66,6 +69,31 @@ if $data00 != @21-09-22 10:10:13.000@ then return -1 endi +sql select `.....`.*, `.....,`.* from dbesc.`.....`,dbesc.`.....,` where `.....`.ts=`.....,`.ts; +if $rows != 1 then + return -1 +endi +if $data00 != @21-09-22 10:10:13.000@ then + return -1 +endi + +sql select a.*, b.* from dbesc.`.....` a,dbesc.`.....,` b where a.ts=b.ts; +if $rows != 1 then + return -1 +endi +if $data00 != @21-09-22 10:10:13.000@ then + return -1 +endi + +#!!!! +sql select a.*, b.* from dbesc.`.....` 'a',dbesc.`.....,` 'b' where a.ts=b.ts; +if $rows != 1 then + return -1 +endi +if $data00 != @21-09-22 10:10:13.000@ then + return -1 +endi + sql select a.*, b.* from `.....` a,`.....,` b where a.ts=b.ts; if $rows != 1 then return -1 @@ -74,8 +102,189 @@ if $data00 != @21-09-22 10:10:13.000@ then return -1 endi -sql select * from `!.!.!` where tbname = `.....`; +sql insert into dbesc.`.....` values ('2021-09-22 10:10:18', 9); +sql insert into 'dbesc'.`.....` values ('2021-09-22 10:10:19', 10); +sql insert into "dbesc".`.....` values ('2021-09-22 10:10:20', 11); + +sql_error select * from `!.!.!` where tbname = `.....`; + +sql select * from `!.!.!` where tbname = '.....'; +if $rows != 4 then + return -1 +endi +if $data00 != @21-09-22 10:10:13.000@ then + return -1 +endi +if $data10 != @21-09-22 10:10:18.000@ then + return -1 +endi +if $data20 != @21-09-22 10:10:19.000@ then + return -1 +endi +if $data30 != @21-09-22 10:10:20.000@ then + return -1 +endi + +sql select * from `!.!.!` where tbname = "....."; +if $rows != 4 then + return -1 +endi +if $data00 != @21-09-22 10:10:13.000@ then + return -1 +endi +if $data10 != @21-09-22 10:10:18.000@ then + return -1 +endi +if $data20 != @21-09-22 10:10:19.000@ then + return -1 +endi +if $data30 != @21-09-22 10:10:20.000@ then + return -1 +endi + +sql select * from `!.!.!` where tbname in ("....."); +if $rows != 4 then + return -1 +endi +if $data00 != @21-09-22 10:10:13.000@ then + return -1 +endi +if $data10 != @21-09-22 10:10:18.000@ then + return -1 +endi +if $data20 != @21-09-22 10:10:19.000@ then + return -1 +endi +if $data30 != @21-09-22 10:10:20.000@ then + return -1 +endi + +sql select * from `!.!.!` where tbname like "....."; +if $rows != 4 then + return -1 +endi +if $data00 != @21-09-22 10:10:13.000@ then + return -1 +endi +if $data10 != @21-09-22 10:10:18.000@ then + return -1 +endi +if $data20 != @21-09-22 10:10:19.000@ then + return -1 +endi +if $data30 != @21-09-22 10:10:20.000@ then + return -1 +endi + +sql select * from `!.!.!` where tbname like "....%"; +if $rows != 7 then + return -1 +endi +if $data00 != @21-09-22 10:10:13.000@ then + return -1 +endi +if $data10 != @21-09-22 10:10:18.000@ then + return -1 +endi +if $data20 != @21-09-22 10:10:19.000@ then + return -1 +endi +if $data30 != @21-09-22 10:10:20.000@ then + return -1 +endi +if $data40 != @21-09-22 10:10:13.000@ then + return -1 +endi +if $data50 != @21-09-22 10:10:14.000@ then + return -1 +endi +if $data60 != @21-09-22 10:10:17.000@ then + return -1 +endi + +sql create table `select * from st1` (ts timestamp, f1 int); +sql create table `'"'"` (ts timestamp, f1 int); +sql create table `''""` using `!.!.!` tags (9); sql SHOW CREATE TABLE `.....`; +sql SHOW CREATE TABLE dbesc.`.....`; +sql SHOW CREATE TABLE 'dbesc'.`.....`; +sql SHOW CREATE TABLE `!.!.!`; +sql SHOW CREATE TABLE `select * from st1`; +sql SHOW CREATE TABLE `'"'"`; +sql show create table `''""`; + +sql_error SHOW CREATE STABLE `.....`; +sql SHOW CREATE STABLE `!.!.!`; + +sql SHOW dbesc.TABLES LIKE '***'; +if $rows != 0 then + return -1 +endi + +sql SHOW dbesc.STABLES LIKE '***'; +if $rows != 1 then + return -1 +endi + +sql SHOW dbesc.TABLES LIKE '.....'; +if $rows != 1 then + return -1 +endi + +sql SHOW dbesc.STABLES LIKE '.....'; +if $rows != 0 then + return -1 +endi + +sql_error SHOW dbesc.TABLES LIKE `.....`; +sql_error SHOW dbesc.STABLES LIKE `***`; + +sql show tables; +if $rows != 15 then + return -1 +endi + +sql_error drop table dbesc.'.....,,,1'; +sql drop table dbesc.`.....,,,1`; +sql_error drop table dbesc.'.....,,'; +sql drop table `.....,,`; +sql drop stable dbesc.'st1'; +sql drop stable dbesc.`st2`; +sql drop stable dbesc.st3; + +sql describe `.....`; +sql_error desc '.....'; + +sql_error ALTER TABLE `.....` ADD COLUMN f2 float; +sql ALTER TABLE `!.!.!` ADD COLUMN f2 float; +sql describe `!.!.!`; +if $rows != 4 then + return -1 +endi + +sql ALTER TABLE `!.!.!` DROP COLUMN f2; +sql_error ALTER TABLE `!.!.!` MODIFY COLUMN f2 int; +sql ALTER TABLE `!.!.!` ADD COLUMN f3 binary(10); +sql ALTER TABLE `!.!.!` MODIFY COLUMN f3 binary(11); + +sql ALTER TABLE `!.!.!` ADD TAG t2 int; +sql ALTER TABLE `!.!.!` DROP TAG t2; +sql ALTER TABLE `!.!.!` ADD TAG ta binary(10); +sql ALTER TABLE `!.!.!` CHANGE TAG ta tb; +sql_error ALTER TABLE `!.!.!` SET TAG t1=99; +sql ALTER TABLE `.....` SET TAG t1=99; +sql ALTER TABLE `!.!.!` ADD TAG t3 binary(10); +sql ALTER TABLE `!.!.!` MODIFY TAG t3 binary(11); +sql ALTER STABLE `!.!.!` ADD COLUMN f4 binary(10); +sql ALTER STABLE `!.!.!` DROP COLUMN f4; +sql ALTER STABLE `!.!.!` ADD COLUMN f5 binary(10); +sql ALTER STABLE `!.!.!` MODIFY COLUMN f5 binary(12); +sql ALTER STABLE `!.!.!` ADD TAG t4 double; +sql ALTER STABLE `!.!.!` DROP TAG t4; +sql ALTER STABLE `!.!.!` ADD TAG t5 binary(1); +sql ALTER STABLE `!.!.!` CHANGE TAG t5 t6; +sql_error ALTER STABLE `!.!.!` SET TAG t6=999; +sql ALTER STABLE `!.!.!` MODIFY TAG t6 binary(12); system sh/exec.sh -n dnode1 -s stop -x SIGINT -- GitLab