diff --git a/include/common/tep.h b/include/common/tep.h index aad5cc81d47b76a426c2c39c6caea8138fffc977..c8f45e4c82d94c0b7177777cc227b98c2c1414a0 100644 --- a/include/common/tep.h +++ b/include/common/tep.h @@ -13,5 +13,6 @@ int taosGetFqdnPortFromEp(const char *ep, char *fqdn, uint16_t *port); bool isEpsetEqual(const SEpSet *s1, const SEpSet *s2); void updateEpSet_s(SCorEpSet *pEpSet, SEpSet *pNewEpSet); +SEpSet getEpSet_s(SCorEpSet *pEpSet); #endif // TDENGINE_TEP_H diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 9d61b995d5e78ea58fd0e3b10edb146b5cc4ad72..a5c86c0648882e2dd93e4a52a4b506bbac62001f 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -371,7 +371,7 @@ typedef struct SColIndex { int16_t colId; // column id int16_t colIndex; // column index in colList if it is a normal column or index in tagColList if a tag int16_t flag; // denote if it is a tag or a normal column - char name[TSDB_COL_NAME_LEN + TSDB_DB_NAME_LEN + 1]; + char name[TSDB_DB_FNAME_LEN]; } SColIndex; typedef struct SColumnFilterInfo { @@ -518,7 +518,7 @@ typedef struct SRetrieveTableRsp { } SRetrieveTableRsp; typedef struct { - char db[TSDB_FULL_DB_NAME_LEN]; + char db[TSDB_DB_FNAME_LEN]; int32_t numOfVgroups; int32_t cacheBlockSize; // MB int32_t totalBlocks; @@ -542,7 +542,7 @@ typedef struct { } SCreateDbMsg; typedef struct { - char db[TSDB_FULL_DB_NAME_LEN]; + char db[TSDB_DB_FNAME_LEN]; int32_t totalBlocks; int32_t daysToKeep0; int32_t daysToKeep1; @@ -692,7 +692,7 @@ typedef struct { typedef struct { int32_t vgId; int32_t dnodeId; - char db[TSDB_FULL_DB_NAME_LEN]; + char db[TSDB_DB_FNAME_LEN]; uint64_t dbUid; int32_t vgVersion; int32_t cacheBlockSize; @@ -719,7 +719,7 @@ typedef struct { typedef struct { int32_t vgId; int32_t dnodeId; - char db[TSDB_FULL_DB_NAME_LEN]; + char db[TSDB_DB_FNAME_LEN]; uint64_t dbUid; } SDropVnodeMsg, SSyncVnodeMsg, SCompactVnodeMsg; @@ -795,7 +795,7 @@ typedef struct { } STagData; typedef struct { - char db[TSDB_FULL_DB_NAME_LEN]; + char db[TSDB_DB_FNAME_LEN]; int32_t vgVersion; int32_t vgNum; int8_t hashMethod; @@ -809,13 +809,13 @@ typedef struct { */ typedef struct { int8_t type; - char db[TSDB_FULL_DB_NAME_LEN]; + char db[TSDB_DB_FNAME_LEN]; int16_t payloadLen; char payload[]; } SShowMsg; typedef struct { - char db[TSDB_FULL_DB_NAME_LEN]; + char db[TSDB_DB_FNAME_LEN]; int32_t numOfVgroup; int32_t vgid[]; } SCompactMsg; diff --git a/include/libs/catalog/catalog.h b/include/libs/catalog/catalog.h index 4d3370630370117c8b125ec656cfabaa051aaed6..e55c2f57fdc23abff1dbf415d40652009970b2e7 100644 --- a/include/libs/catalog/catalog.h +++ b/include/libs/catalog/catalog.h @@ -67,14 +67,14 @@ int32_t catalogUpdateDBVgroupCache(struct SCatalog* pCatalog, const char* dbName /** * Get a table's meta data. * @param pCatalog (input, got with catalogGetHandle) - * @param pRpc (input, rpc object) + * @param pTransporter (input, rpc object) * @param pMgmtEps (input, mnode EPs) * @param pDBName (input, full db name) * @param pTableName (input, table name, NOT including db name) * @param pTableMeta(output, table meta data, NEED to free it by calller) * @return error code */ -int32_t catalogGetTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* pDBName, const char* pTableName, STableMeta** pTableMeta); +int32_t catalogGetTableMeta(struct SCatalog* pCatalog, void * pTransporter, const SEpSet* pMgmtEps, const char* pDBName, const char* pTableName, STableMeta** pTableMeta); /** * Force renew a table's local cached meta data. diff --git a/include/libs/parser/parsenodes.h b/include/libs/parser/parsenodes.h index 250739c1e649ab47af10b63f5c3355b4b718c9ee..d4c6ddb26fb36616f521b869eb84da396212b6a5 100644 --- a/include/libs/parser/parsenodes.h +++ b/include/libs/parser/parsenodes.h @@ -47,6 +47,8 @@ typedef struct SParseBasicCtx { const char *db; int32_t acctId; uint64_t requestId; + void *pTransporter; + SEpSet mgmtEpSet; } SParseBasicCtx; typedef struct SFieldInfo { diff --git a/include/libs/parser/parser.h b/include/libs/parser/parser.h index f2f3fcd49b581c97a01a081c063ffbfceddd69e7..8e7ff8ccc2e761f64d38fc64d35d6129844b03f7 100644 --- a/include/libs/parser/parser.h +++ b/include/libs/parser/parser.h @@ -23,10 +23,8 @@ extern "C" { #include "parsenodes.h" typedef struct SParseContext { - SParseBasicCtx ctx; - void *pRpc; + SParseBasicCtx ctx; struct SCatalog *pCatalog; - const SEpSet *pEpSet; int8_t schemaAttached; // denote if submit block is built with table schema or not const char *pSql; // sql string size_t sqlLen; // length of the sql string diff --git a/include/libs/qcom/query.h b/include/libs/qcom/query.h index 5ff42146e9902e63bd34ba2c7792d92163333582..ea131bbbf2cb1b1713c2b68af57959b1d64ab873 100644 --- a/include/libs/qcom/query.h +++ b/include/libs/qcom/query.h @@ -81,7 +81,7 @@ typedef struct SDBVgroupInfo { } SDBVgroupInfo; typedef struct SUseDbOutput { - char db[TSDB_FULL_DB_NAME_LEN]; + char db[TSDB_DB_FNAME_LEN]; SDBVgroupInfo dbVgroup; } SUseDbOutput; diff --git a/include/util/tdef.h b/include/util/tdef.h index 5edd0549f08b755b8e818a0d5b283716edbcbe98..8b810b410ce7c57865036142caadbca786965816 100644 --- a/include/util/tdef.h +++ b/include/util/tdef.h @@ -149,7 +149,7 @@ do { \ #define IS_RELATION_OPTR(op) (((op) >= TSDB_RELATION_LESS) && ((op) < TSDB_RELATION_IN)) #define IS_ARITHMETIC_OPTR(op) (((op) >= TSDB_BINARY_OP_ADD) && ((op) <= TSDB_BINARY_OP_REMAINDER)) -#define TS_PATH_DELIMITER_LEN 1 +#define TSDB_NAME_DELIMITER_LEN 1 #define TSDB_UNI_LEN 24 #define TSDB_USER_LEN TSDB_UNI_LEN @@ -165,17 +165,17 @@ do { \ #define TSDB_TABLE_NAME_LEN 193 // it is a null-terminated string #define TSDB_TOPIC_NAME_LEN 193 // it is a null-terminated string #define TSDB_DB_NAME_LEN 65 -#define TSDB_FULL_DB_NAME_LEN (TSDB_ACCT_ID_LEN + TSDB_DB_NAME_LEN) +#define TSDB_DB_FNAME_LEN (TSDB_ACCT_ID_LEN + TSDB_DB_NAME_LEN + TSDB_NAME_DELIMITER_LEN) -#define TSDB_FUNC_NAME_LEN 65 -#define TSDB_FUNC_COMMENT_LEN 4096 -#define TSDB_FUNC_CODE_LEN (65535 - 512) -#define TSDB_FUNC_BUF_SIZE 512 -#define TSDB_FUNC_TYPE_SCALAR 1 -#define TSDB_FUNC_TYPE_AGGREGATE 2 +#define TSDB_FUNC_NAME_LEN 65 +#define TSDB_FUNC_COMMENT_LEN 4096 +#define TSDB_FUNC_CODE_LEN (65535 - 512) +#define TSDB_FUNC_BUF_SIZE 512 +#define TSDB_FUNC_TYPE_SCALAR 1 +#define TSDB_FUNC_TYPE_AGGREGATE 2 #define TSDB_TYPE_STR_MAX_LEN 32 -#define TSDB_TABLE_FNAME_LEN (TSDB_FULL_DB_NAME_LEN + TSDB_TABLE_NAME_LEN) +#define TSDB_TABLE_FNAME_LEN (TSDB_DB_FNAME_LEN + TSDB_TABLE_NAME_LEN + TSDB_NAME_DELIMITER_LEN) #define TSDB_TOPIC_FNAME_LEN TSDB_TABLE_FNAME_LEN #define TSDB_COL_NAME_LEN 65 #define TSDB_MAX_SAVED_SQL_LEN TSDB_MAX_COLUMNS * 64 diff --git a/source/client/inc/clientInt.h b/source/client/inc/clientInt.h index 6d3003eab1e8d5c2fc40716561e9b3423ec1c295..021f6502544aeb3c09e284b8b5c9205a92be8dab 100644 --- a/source/client/inc/clientInt.h +++ b/source/client/inc/clientInt.h @@ -75,16 +75,16 @@ typedef struct SAppInfo { } SAppInfo; typedef struct STscObj { - char user[TSDB_USER_LEN]; - char pass[TSDB_PASSWORD_LEN]; - char db[TSDB_ACCT_ID_LEN + TSDB_DB_NAME_LEN]; - int32_t acctId; - uint32_t connId; - uint64_t id; // ref ID returned by taosAddRef - void *pTransporter; - pthread_mutex_t mutex; // used to protect the operation on db - int32_t numOfReqs; // number of sqlObj from this tscObj - SAppInstInfo *pAppInfo; + char user[TSDB_USER_LEN]; + char pass[TSDB_PASSWORD_LEN]; + char db[TSDB_DB_FNAME_LEN]; + int32_t acctId; + uint32_t connId; + uint64_t id; // ref ID returned by taosAddRef + void *pTransporter; + pthread_mutex_t mutex; // used to protect the operation on db + int32_t numOfReqs; // number of sqlObj from this tscObj + SAppInstInfo *pAppInfo; } STscObj; typedef struct SReqResultInfo { diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index da10332652bcc5f182eedb857f68c758513b2dab..c55f702b327ad909702f794493807d1552abb580 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -146,13 +146,15 @@ int32_t buildRequest(STscObj *pTscObj, const char *sql, int sqlLen, SRequestObj* int32_t parseSql(SRequestObj* pRequest, SQueryNode** pQuery) { SParseContext cxt = { - .ctx = {.requestId = pRequest->requestId, .acctId = pRequest->pTscObj->acctId, .db = getConnectionDB(pRequest->pTscObj)}, - .pSql = pRequest->sqlstr, + .ctx = {.requestId = pRequest->requestId, .acctId = pRequest->pTscObj->acctId, .db = getConnectionDB(pRequest->pTscObj), .pTransporter = pRequest->pTscObj->pTransporter}, + .pSql = pRequest->sqlstr, .sqlLen = pRequest->sqlLen, - .pMsg = pRequest->msgBuf, + .pMsg = pRequest->msgBuf, .msgLen = ERROR_MSG_BUF_DEFAULT_SIZE }; + cxt.ctx.mgmtEpSet = getEpSet_s(&pRequest->pTscObj->pAppInfo->mgmtEp); + int32_t code = qParseQuerySql(&cxt, pQuery); tfree(cxt.ctx.db); return code; @@ -165,7 +167,7 @@ int32_t execDdlQuery(SRequestObj* pRequest, SQueryNode* pQuery) { STscObj* pTscObj = pRequest->pTscObj; - SMsgSendInfo* body = buildSendMsgInfoImpl(pRequest); + SMsgSendInfo* pSendMsg = buildSendMsgInfoImpl(pRequest); SEpSet* pEpSet = &pTscObj->pAppInfo->mgmtEp.epSet; if (pDcl->msgType == TDMT_VND_CREATE_TABLE) { @@ -178,34 +180,34 @@ int32_t execDdlQuery(SRequestObj* pRequest, SQueryNode* pQuery) { return code; } - SCreateTableMsg* pMsg = body->msgInfo.pData; + SCreateTableMsg* pMsg = pSendMsg->msgInfo.pData; SName t = {0}; tNameFromString(&t, pMsg->name, T_NAME_ACCT|T_NAME_DB|T_NAME_TABLE); - char db[TSDB_DB_NAME_LEN + TS_PATH_DELIMITER_LEN + TSDB_ACCT_ID_LEN] = {0}; + char db[TSDB_DB_NAME_LEN + TSDB_NAME_DELIMITER_LEN + TSDB_ACCT_ID_LEN] = {0}; tNameGetFullDbName(&t, db); SVgroupInfo info = {0}; catalogGetTableHashVgroup(pCatalog, pRequest->pTscObj->pTransporter, pEpSet, db, tNameGetTableName(&t), &info); int64_t transporterId = 0; - SEpSet ep = {0}; - ep.inUse = info.inUse; + SEpSet ep = {0}; + ep.inUse = info.inUse; ep.numOfEps = info.numOfEps; for(int32_t i = 0; i < ep.numOfEps; ++i) { ep.port[i] = info.epAddr[i].port; tstrncpy(ep.fqdn[i], info.epAddr[i].fqdn, tListLen(ep.fqdn[i])); } - asyncSendMsgToServer(pTscObj->pTransporter, &ep, &transporterId, body); + asyncSendMsgToServer(pTscObj->pTransporter, &ep, &transporterId, pSendMsg); } else { int64_t transporterId = 0; - asyncSendMsgToServer(pTscObj->pTransporter, pEpSet, &transporterId, body); + asyncSendMsgToServer(pTscObj->pTransporter, pEpSet, &transporterId, pSendMsg); } tsem_wait(&pRequest->body.rspSem); - destroySendMsgInfo(body); + destroySendMsgInfo(pSendMsg); return TSDB_CODE_SUCCESS; } diff --git a/source/client/src/clientMsgHandler.c b/source/client/src/clientMsgHandler.c index b46304e62285ecadd16a45cc2da21039ed1e5a95..3f5ecd102817a11cb59f796a00a49fdee68e26ea 100644 --- a/source/client/src/clientMsgHandler.c +++ b/source/client/src/clientMsgHandler.c @@ -139,7 +139,7 @@ int32_t processShowRsp(void* param, const SDataBuf* pMsg, int32_t code) { pFields[i].bytes = pSchema[i].bytes; } -// pRequest->body.resInfo.pRspMsg = pMsg->pData; + pRequest->body.resInfo.pRspMsg = pMsg->pData; SReqResultInfo* pResInfo = &pRequest->body.resInfo; pResInfo->fields = pFields; diff --git a/source/common/src/tep.c b/source/common/src/tep.c index ef47a0e0c2a5abc0a21692bd88fb1030ecf07de8..9cc99e7f517b9791417fbe743416294d125e29ba 100644 --- a/source/common/src/tep.c +++ b/source/common/src/tep.c @@ -39,3 +39,12 @@ void updateEpSet_s(SCorEpSet *pEpSet, SEpSet *pNewEpSet) { taosCorEndWrite(&pEpSet->version); } +SEpSet getEpSet_s(SCorEpSet *pEpSet) { + SEpSet ep = {0}; + taosCorBeginRead(&pEpSet->version); + ep = pEpSet->epSet; + taosCorEndRead(&pEpSet->version); + + return ep; +} + diff --git a/source/common/src/tname.c b/source/common/src/tname.c index e24c8f7a8151fe272ec2e78d3ffab16858ff6d43..88a5ebb7f6eda28ddfb0b65ae7e5dc7030fada9f 100644 --- a/source/common/src/tname.c +++ b/source/common/src/tname.c @@ -110,7 +110,7 @@ int32_t tNameExtractFullName(const SName* name, char* dst) { return -1; } - int32_t len = snprintf(dst, TSDB_FULL_DB_NAME_LEN, "%d.%s", name->acctId, name->dbname); + int32_t len = snprintf(dst, TSDB_DB_FNAME_LEN, "%d.%s", name->acctId, name->dbname); size_t tnameLen = strlen(name->tname); if (tnameLen > 0) { @@ -134,10 +134,10 @@ int32_t tNameLen(const SName* name) { if (name->type == TSDB_DB_NAME_T) { assert(len2 == 0); - return len + len1 + TS_PATH_DELIMITER_LEN; + return len + len1 + TSDB_NAME_DELIMITER_LEN; } else { assert(len2 > 0); - return len + len1 + len2 + TS_PATH_DELIMITER_LEN * 2; + return len + len1 + len2 + TSDB_NAME_DELIMITER_LEN * 2; } } @@ -171,8 +171,7 @@ int32_t tNameGetDbName(const SName* name, char* dst) { int32_t tNameGetFullDbName(const SName* name, char* dst) { assert(name != NULL && dst != NULL); - snprintf(dst, TSDB_ACCT_ID_LEN + TS_PATH_DELIMITER_LEN + TSDB_DB_NAME_LEN, // there is a over write risk - "%d.%s", name->acctId, name->dbname); + snprintf(dst, TSDB_DB_FNAME_LEN, "%d.%s", name->acctId, name->dbname); return 0; } diff --git a/source/dnode/mgmt/impl/src/dndVnodes.c b/source/dnode/mgmt/impl/src/dndVnodes.c index 1e03bba10b48a7503c6df91c4c129110c8fd02e5..3eab3e5aec734dc1993bcd37b745529204b1e562 100644 --- a/source/dnode/mgmt/impl/src/dndVnodes.c +++ b/source/dnode/mgmt/impl/src/dndVnodes.c @@ -22,7 +22,7 @@ typedef struct { int32_t vgVersion; int8_t dropped; uint64_t dbUid; - char db[TSDB_FULL_DB_NAME_LEN]; + char db[TSDB_DB_FNAME_LEN]; char path[PATH_MAX + 20]; } SWrapperCfg; @@ -319,7 +319,7 @@ static int32_t dndGetVnodesFromFile(SDnode *pDnode, SWrapperCfg **ppCfgs, int32_ dError("failed to read %s since db not found", file); goto PRASE_VNODE_OVER; } - tstrncpy(pCfg->db, db->valuestring, TSDB_FULL_DB_NAME_LEN); + tstrncpy(pCfg->db, db->valuestring, TSDB_DB_FNAME_LEN); } *ppCfgs = pCfgs; @@ -569,7 +569,7 @@ static void dndGenerateVnodeCfg(SCreateVnodeMsg *pCreate, SVnodeCfg *pCfg) { } static void dndGenerateWrapperCfg(SDnode *pDnode, SCreateVnodeMsg *pCreate, SWrapperCfg *pCfg) { - memcpy(pCfg->db, pCreate->db, TSDB_FULL_DB_NAME_LEN); + memcpy(pCfg->db, pCreate->db, TSDB_DB_FNAME_LEN); pCfg->dbUid = pCreate->dbUid; pCfg->dropped = 0; snprintf(pCfg->path, sizeof(pCfg->path), "%s/vnode%d", pDnode->dir.vnodes, pCreate->vgId); diff --git a/source/dnode/mnode/impl/inc/mndDef.h b/source/dnode/mnode/impl/inc/mndDef.h index 1ac2c3d171e6d779a505157f6fb547b1d8533b39..ea0fe463028346b0db2bf18da5381b7e892ef4bf 100644 --- a/source/dnode/mnode/impl/inc/mndDef.h +++ b/source/dnode/mnode/impl/inc/mndDef.h @@ -209,7 +209,7 @@ typedef struct { } SDbCfg; typedef struct { - char name[TSDB_FULL_DB_NAME_LEN]; + char name[TSDB_DB_FNAME_LEN]; char acct[TSDB_USER_LEN]; int64_t createdTime; int64_t updateTime; @@ -232,7 +232,7 @@ typedef struct { int32_t version; uint32_t hashBegin; uint32_t hashEnd; - char dbName[TSDB_FULL_DB_NAME_LEN]; + char dbName[TSDB_DB_FNAME_LEN]; int64_t dbUid; int32_t numOfTables; int32_t numOfTimeSeries; @@ -246,7 +246,7 @@ typedef struct { typedef struct { char name[TSDB_TABLE_FNAME_LEN]; - char db[TSDB_FULL_DB_NAME_LEN]; + char db[TSDB_DB_FNAME_LEN]; int64_t createdTime; int64_t updateTime; uint64_t uid; @@ -286,7 +286,7 @@ typedef struct { int32_t payloadLen; void *pIter; SMnode *pMnode; - char db[TSDB_FULL_DB_NAME_LEN]; + char db[TSDB_DB_FNAME_LEN]; int16_t offset[TSDB_MAX_COLUMNS]; int32_t bytes[TSDB_MAX_COLUMNS]; char payload[]; @@ -294,7 +294,7 @@ typedef struct { typedef struct { char name[TSDB_TOPIC_FNAME_LEN]; - char db[TSDB_FULL_DB_NAME_LEN]; + char db[TSDB_DB_FNAME_LEN]; int64_t createTime; int64_t updateTime; uint64_t uid; @@ -309,7 +309,7 @@ typedef struct { typedef struct SMnodeMsg { char user[TSDB_USER_LEN]; - char db[TSDB_FULL_DB_NAME_LEN]; + char db[TSDB_DB_FNAME_LEN]; int32_t acctId; SMnode *pMnode; int64_t createdTime; diff --git a/source/dnode/mnode/impl/src/mndDb.c b/source/dnode/mnode/impl/src/mndDb.c index 6eb94eccf2c143edf609724cd308b1b9ad80f530..d05e301024ce376f4ab6e0b4b7224d821261015d 100644 --- a/source/dnode/mnode/impl/src/mndDb.c +++ b/source/dnode/mnode/impl/src/mndDb.c @@ -69,7 +69,7 @@ static SSdbRaw *mndDbActionEncode(SDbObj *pDb) { if (pRaw == NULL) return NULL; int32_t dataPos = 0; - SDB_SET_BINARY(pRaw, dataPos, pDb->name, TSDB_FULL_DB_NAME_LEN) + SDB_SET_BINARY(pRaw, dataPos, pDb->name, TSDB_DB_FNAME_LEN) SDB_SET_BINARY(pRaw, dataPos, pDb->acct, TSDB_USER_LEN) SDB_SET_INT64(pRaw, dataPos, pDb->createdTime) SDB_SET_INT64(pRaw, dataPos, pDb->updateTime) @@ -116,7 +116,7 @@ static SSdbRow *mndDbActionDecode(SSdbRaw *pRaw) { if (pDb == NULL) return NULL; int32_t dataPos = 0; - SDB_GET_BINARY(pRaw, pRow, dataPos, pDb->name, TSDB_FULL_DB_NAME_LEN) + SDB_GET_BINARY(pRaw, pRow, dataPos, pDb->name, TSDB_DB_FNAME_LEN) SDB_GET_BINARY(pRaw, pRow, dataPos, pDb->acct, TSDB_USER_LEN) SDB_GET_INT64(pRaw, pRow, dataPos, &pDb->createdTime) SDB_GET_INT64(pRaw, pRow, dataPos, &pDb->updateTime) @@ -353,11 +353,11 @@ static int32_t mndSetCreateDbUndoActions(SMnode *pMnode, STrans *pTrans, SDbObj static int32_t mndCreateDb(SMnode *pMnode, SMnodeMsg *pMsg, SCreateDbMsg *pCreate, SUserObj *pUser) { SDbObj dbObj = {0}; - memcpy(dbObj.name, pCreate->db, TSDB_FULL_DB_NAME_LEN); + memcpy(dbObj.name, pCreate->db, TSDB_DB_FNAME_LEN); memcpy(dbObj.acct, pUser->acct, TSDB_USER_LEN); dbObj.createdTime = taosGetTimestampMs(); dbObj.updateTime = dbObj.createdTime; - dbObj.uid = mndGenerateUid(dbObj.name, TSDB_FULL_DB_NAME_LEN); + dbObj.uid = mndGenerateUid(dbObj.name, TSDB_DB_FNAME_LEN); dbObj.cfgVersion = 1; dbObj.vgVersion = 1; dbObj.hashMethod = 1; @@ -891,7 +891,7 @@ static int32_t mndProcessUseDbMsg(SMnodeMsg *pMsg) { } } - memcpy(pRsp->db, pDb->name, TSDB_FULL_DB_NAME_LEN); + memcpy(pRsp->db, pDb->name, TSDB_DB_FNAME_LEN); pRsp->vgVersion = htonl(pDb->vgVersion); pRsp->vgNum = htonl(vindex); pRsp->hashMethod = pDb->hashMethod; diff --git a/source/dnode/mnode/impl/src/mndProfile.c b/source/dnode/mnode/impl/src/mndProfile.c index 548e2f7be6db1cd39e845082803391805a89e73d..9a4098857c5c39a040c13cb68d68028a703bb194 100644 --- a/source/dnode/mnode/impl/src/mndProfile.c +++ b/source/dnode/mnode/impl/src/mndProfile.c @@ -194,7 +194,7 @@ static int32_t mndProcessConnectMsg(SMnodeMsg *pMsg) { taosIp2String(info.clientIp, ip); if (pReq->db[0]) { - snprintf(pMsg->db, TSDB_FULL_DB_NAME_LEN, "%d%s%s", pMsg->acctId, TS_PATH_DELIMITER, pReq->db); + snprintf(pMsg->db, TSDB_DB_FNAME_LEN, "%d%s%s", pMsg->acctId, TS_PATH_DELIMITER, pReq->db); SDbObj *pDb = mndAcquireDb(pMnode, pMsg->db); if (pDb == NULL) { terrno = TSDB_CODE_MND_INVALID_DB; diff --git a/source/dnode/mnode/impl/src/mndShow.c b/source/dnode/mnode/impl/src/mndShow.c index 4e22a07460fade883e2b247fd92139b6392e2c3d..e50c6af4bb89fc9ff22d4670a5d1d87541ae2b35 100644 --- a/source/dnode/mnode/impl/src/mndShow.c +++ b/source/dnode/mnode/impl/src/mndShow.c @@ -62,7 +62,7 @@ static SShowObj *mndCreateShowObj(SMnode *pMnode, SShowMsg *pMsg) { pShow->pMnode = pMnode; pShow->type = pMsg->type; pShow->payloadLen = pMsg->payloadLen; - memcpy(pShow->db, pMsg->db, TSDB_FULL_DB_NAME_LEN); + memcpy(pShow->db, pMsg->db, TSDB_DB_FNAME_LEN); memcpy(pShow->payload, pMsg->payload, pMsg->payloadLen); } else { terrno = TSDB_CODE_OUT_OF_MEMORY; diff --git a/source/dnode/mnode/impl/src/mndStb.c b/source/dnode/mnode/impl/src/mndStb.c index 799eb4afa73d831f4eddc05a61b688dcd2b44e5d..97e91af93778c99fa3c5791e844db08ef9ec00bf 100644 --- a/source/dnode/mnode/impl/src/mndStb.c +++ b/source/dnode/mnode/impl/src/mndStb.c @@ -76,7 +76,7 @@ static SSdbRaw *mndStbActionEncode(SStbObj *pStb) { int32_t dataPos = 0; SDB_SET_BINARY(pRaw, dataPos, pStb->name, TSDB_TABLE_FNAME_LEN) - SDB_SET_BINARY(pRaw, dataPos, pStb->db, TSDB_FULL_DB_NAME_LEN) + SDB_SET_BINARY(pRaw, dataPos, pStb->db, TSDB_DB_FNAME_LEN) SDB_SET_INT64(pRaw, dataPos, pStb->createdTime) SDB_SET_INT64(pRaw, dataPos, pStb->updateTime) SDB_SET_INT64(pRaw, dataPos, pStb->uid) @@ -117,7 +117,7 @@ static SSdbRow *mndStbActionDecode(SSdbRaw *pRaw) { int32_t dataPos = 0; SDB_GET_BINARY(pRaw, pRow, dataPos, pStb->name, TSDB_TABLE_FNAME_LEN) - SDB_GET_BINARY(pRaw, pRow, dataPos, pStb->db, TSDB_FULL_DB_NAME_LEN) + SDB_GET_BINARY(pRaw, pRow, dataPos, pStb->db, TSDB_DB_FNAME_LEN) SDB_GET_INT64(pRaw, pRow, dataPos, &pStb->createdTime) SDB_GET_INT64(pRaw, pRow, dataPos, &pStb->updateTime) SDB_GET_INT64(pRaw, pRow, dataPos, &pStb->uid) @@ -435,7 +435,7 @@ static int32_t mndSetCreateStbUndoActions(SMnode *pMnode, STrans *pTrans, SDbObj static int32_t mndCreateStb(SMnode *pMnode, SMnodeMsg *pMsg, SCreateStbMsg *pCreate, SDbObj *pDb) { SStbObj stbObj = {0}; tstrncpy(stbObj.name, pCreate->name, TSDB_TABLE_FNAME_LEN); - tstrncpy(stbObj.db, pDb->name, TSDB_FULL_DB_NAME_LEN); + tstrncpy(stbObj.db, pDb->name, TSDB_DB_FNAME_LEN); stbObj.createdTime = taosGetTimestampMs(); stbObj.updateTime = stbObj.createdTime; stbObj.uid = mndGenerateUid(pCreate->name, TSDB_TABLE_FNAME_LEN); diff --git a/source/dnode/mnode/impl/src/mndTopic.c b/source/dnode/mnode/impl/src/mndTopic.c index 7106c79588fcd2948bbbd3a4611df7961d771946..597142d326a4b741f5b52868318c3f5cff1fa18d 100644 --- a/source/dnode/mnode/impl/src/mndTopic.c +++ b/source/dnode/mnode/impl/src/mndTopic.c @@ -79,7 +79,7 @@ static SSdbRaw *mndTopicActionEncode(STopicObj *pTopic) { int32_t dataPos = 0; SDB_SET_BINARY(pRaw, dataPos, pTopic->name, TSDB_TABLE_FNAME_LEN); - SDB_SET_BINARY(pRaw, dataPos, pTopic->db, TSDB_FULL_DB_NAME_LEN); + SDB_SET_BINARY(pRaw, dataPos, pTopic->db, TSDB_DB_FNAME_LEN); SDB_SET_INT64(pRaw, dataPos, pTopic->createTime); SDB_SET_INT64(pRaw, dataPos, pTopic->updateTime); SDB_SET_INT64(pRaw, dataPos, pTopic->uid); @@ -113,7 +113,7 @@ static SSdbRow *mndTopicActionDecode(SSdbRaw *pRaw) { int32_t dataPos = 0; SDB_GET_BINARY(pRaw, pRow, dataPos, pTopic->name, TSDB_TABLE_FNAME_LEN); - SDB_GET_BINARY(pRaw, pRow, dataPos, pTopic->db, TSDB_FULL_DB_NAME_LEN); + SDB_GET_BINARY(pRaw, pRow, dataPos, pTopic->db, TSDB_DB_FNAME_LEN); SDB_GET_INT64(pRaw, pRow, dataPos, &pTopic->createTime); SDB_GET_INT64(pRaw, pRow, dataPos, &pTopic->updateTime); SDB_GET_INT64(pRaw, pRow, dataPos, &pTopic->uid); @@ -348,7 +348,7 @@ static int32_t mndSetCreateTopicUndoActions(SMnode *pMnode, STrans *pTrans, SDbO static int32_t mndCreateTopic(SMnode *pMnode, SMnodeMsg *pMsg, SCreateTopicMsg *pCreate, SDbObj *pDb) { STopicObj topicObj = {0}; tstrncpy(topicObj.name, pCreate->name, TSDB_TABLE_FNAME_LEN); - tstrncpy(topicObj.db, pDb->name, TSDB_FULL_DB_NAME_LEN); + tstrncpy(topicObj.db, pDb->name, TSDB_DB_FNAME_LEN); topicObj.createTime = taosGetTimestampMs(); topicObj.updateTime = topicObj.createTime; topicObj.uid = mndGenerateUid(pCreate->name, TSDB_TABLE_FNAME_LEN); diff --git a/source/dnode/mnode/impl/src/mndVgroup.c b/source/dnode/mnode/impl/src/mndVgroup.c index c9f44012642f7b6492900f098d21f659bf4d4871..b12d2c471892fae33ac829562c374e7704358ac9 100644 --- a/source/dnode/mnode/impl/src/mndVgroup.c +++ b/source/dnode/mnode/impl/src/mndVgroup.c @@ -80,7 +80,7 @@ SSdbRaw *mndVgroupActionEncode(SVgObj *pVgroup) { SDB_SET_INT32(pRaw, dataPos, pVgroup->version) SDB_SET_INT32(pRaw, dataPos, pVgroup->hashBegin) SDB_SET_INT32(pRaw, dataPos, pVgroup->hashEnd) - SDB_SET_BINARY(pRaw, dataPos, pVgroup->dbName, TSDB_FULL_DB_NAME_LEN) + SDB_SET_BINARY(pRaw, dataPos, pVgroup->dbName, TSDB_DB_FNAME_LEN) SDB_SET_INT64(pRaw, dataPos, pVgroup->dbUid) SDB_SET_INT8(pRaw, dataPos, pVgroup->replica) for (int8_t i = 0; i < pVgroup->replica; ++i) { @@ -115,7 +115,7 @@ SSdbRow *mndVgroupActionDecode(SSdbRaw *pRaw) { SDB_GET_INT32(pRaw, pRow, dataPos, &pVgroup->version) SDB_GET_INT32(pRaw, pRow, dataPos, &pVgroup->hashBegin) SDB_GET_INT32(pRaw, pRow, dataPos, &pVgroup->hashEnd) - SDB_GET_BINARY(pRaw, pRow, dataPos, pVgroup->dbName, TSDB_FULL_DB_NAME_LEN) + SDB_GET_BINARY(pRaw, pRow, dataPos, pVgroup->dbName, TSDB_DB_FNAME_LEN) SDB_GET_INT64(pRaw, pRow, dataPos, &pVgroup->dbUid) SDB_GET_INT8(pRaw, pRow, dataPos, &pVgroup->replica) for (int8_t i = 0; i < pVgroup->replica; ++i) { @@ -172,7 +172,7 @@ SCreateVnodeMsg *mndBuildCreateVnodeMsg(SMnode *pMnode, SDnodeObj *pDnode, SDbOb pCreate->vgId = htonl(pVgroup->vgId); pCreate->dnodeId = htonl(pDnode->id); - memcpy(pCreate->db, pDb->name, TSDB_FULL_DB_NAME_LEN); + memcpy(pCreate->db, pDb->name, TSDB_DB_FNAME_LEN); pCreate->dbUid = htobe64(pDb->uid); pCreate->vgVersion = htonl(pVgroup->version); pCreate->cacheBlockSize = htonl(pDb->cfg.cacheBlockSize); @@ -231,7 +231,7 @@ SDropVnodeMsg *mndBuildDropVnodeMsg(SMnode *pMnode, SDnodeObj *pDnode, SDbObj *p pDrop->dnodeId = htonl(pDnode->id); pDrop->vgId = htonl(pVgroup->vgId); - memcpy(pDrop->db, pDb->name, TSDB_FULL_DB_NAME_LEN); + memcpy(pDrop->db, pDb->name, TSDB_DB_FNAME_LEN); pDrop->dbUid = htobe64(pDb->uid); return pDrop; @@ -294,7 +294,7 @@ int32_t mndAllocVgroup(SMnode *pMnode, SDbObj *pDb, SVgObj **ppVgroups) { pVgroup->hashEnd = hashMin + hashInterval * (v + 1) - 1; } - memcpy(pVgroup->dbName, pDb->name, TSDB_FULL_DB_NAME_LEN); + memcpy(pVgroup->dbName, pDb->name, TSDB_DB_FNAME_LEN); pVgroup->dbUid = pDb->uid; pVgroup->replica = pDb->cfg.replications; diff --git a/source/libs/catalog/src/catalog.c b/source/libs/catalog/src/catalog.c index b882e1a42c39b11e55cb6a8a32c6cc1387a3122d..b573953e9eb0b15dcaa547ef61943877b054f831 100644 --- a/source/libs/catalog/src/catalog.c +++ b/source/libs/catalog/src/catalog.c @@ -500,8 +500,8 @@ int32_t catalogGetDBVgroup(struct SCatalog* pCatalog, void *pRpc, const SEpSet* return TSDB_CODE_SUCCESS; } -int32_t catalogGetTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* pDBName, const char* pTableName, STableMeta** pTableMeta) { - return ctgGetTableMetaImpl(pCatalog, pRpc, pMgmtEps, pDBName, pTableName, false, pTableMeta); +int32_t catalogGetTableMeta(struct SCatalog* pCatalog, void *pTransporter, const SEpSet* pMgmtEps, const char* pDBName, const char* pTableName, STableMeta** pTableMeta) { + return ctgGetTableMetaImpl(pCatalog, pTransporter, pMgmtEps, pDBName, pTableName, false, pTableMeta); } int32_t catalogRenewTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* pDBName, const char* pTableName) { @@ -602,7 +602,7 @@ int32_t catalogGetAllMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* p int32_t code = 0; if (pReq->pTableName) { - char dbName[TSDB_FULL_DB_NAME_LEN]; + char dbName[TSDB_DB_FNAME_LEN]; int32_t tbNum = (int32_t)taosArrayGetSize(pReq->pTableName); if (tbNum > 0) { pRsp->pTableMeta = taosArrayInit(tbNum, POINTER_BYTES); diff --git a/source/libs/parser/inc/sql.y b/source/libs/parser/inc/sql.y index a3ce3c2427d207af50c8e51eaff49389d611cdd1..ed4ad1c0b7fa8bff86d5bc9031ebfea7f3566b85 100644 --- a/source/libs/parser/inc/sql.y +++ b/source/libs/parser/inc/sql.y @@ -445,6 +445,15 @@ tagitemlist1(A) ::= tagitem1(Y). { A = taosArrayInit(4, sizeof(SToken)); taosArr %type tagitem1 {SToken} tagitem1(A) ::= MINUS(X) INTEGER(Y). { A.n = X.n + Y.n; A.type = Y.type; } +tagitem1(A) ::= MINUS(X) FLOAT(Y). { A.n = X.n + Y.n; A.type = Y.type; } +tagitem1(A) ::= PLUS(X) INTEGER(Y). { A.n = X.n + Y.n; A.type = Y.type; } +tagitem1(A) ::= PLUS(X) FLOAT(Y). { A.n = X.n + Y.n; A.type = Y.type; } +tagitem1(A) ::= INTEGER(X). { A = X; } +tagitem1(A) ::= FLOAT(X). { A = X; } +tagitem1(A) ::= STRING(X). { A = X; } +tagitem1(A) ::= BOOL(X). { A = X; } +tagitem1(A) ::= NULL(X). { A = X; } +tagitem1(A) ::= NOW(X). { A = X; } %type tagitemlist {SArray*} %destructor tagitemlist {taosArrayDestroy($$);} diff --git a/source/libs/parser/inc/ttokendef.h b/source/libs/parser/inc/ttokendef.h index 4a5427c170e2e3c832b905a5f416c506b7d124b4..f998262a965491d16f25293adf5d8301522909b4 100644 --- a/source/libs/parser/inc/ttokendef.h +++ b/source/libs/parser/inc/ttokendef.h @@ -215,6 +215,7 @@ + #define TK_SPACE 300 #define TK_COMMENT 301 #define TK_ILLEGAL 302 diff --git a/source/libs/parser/src/dCDAstProcess.c b/source/libs/parser/src/dCDAstProcess.c index a0410e6ec049a171f64f78adeda5b0b744fdfefa..0d857bc4036ce613991888e2f972ffba9e6d77eb 100644 --- a/source/libs/parser/src/dCDAstProcess.c +++ b/source/libs/parser/src/dCDAstProcess.c @@ -323,6 +323,13 @@ int32_t doCheckForCreateCTable(SSqlInfo* pInfo, SParseBasicCtx *pCtx, SMsgBuf* p size_t valSize = taosArrayGetSize(pValList); STableMeta* pSuperTableMeta = NULL; + struct SCatalog* pCatalog = NULL; + + char dbName[TSDB_DB_FNAME_LEN] = {0}; + tNameGetFullDbName(&name, dbName); + + catalogGetTableMeta(pCatalog, pCtx->pTransporter, &pCtx->mgmtEpSet, dbName, pCreateTableInfo->tagdata.name, &pSuperTableMeta); + // too long tag values will return invalid sql, not be truncated automatically SSchema *pTagSchema = getTableTagSchema(pSuperTableMeta); STableComInfo tinfo = getTableInfo(pSuperTableMeta); diff --git a/source/libs/parser/src/insertParser.c b/source/libs/parser/src/insertParser.c index fb7790452d8ddbbc447c7d9b3753ef094e086808..73232cd2e1f04d9c45b15ff72f3da61457f58663 100644 --- a/source/libs/parser/src/insertParser.c +++ b/source/libs/parser/src/insertParser.c @@ -162,7 +162,7 @@ static int32_t buildName(SInsertParseContext* pCxt, SToken* pStname, char* fullD strncpy(fullDbName + n, pStname->z, p - pStname->z); strncpy(tableName, p + 1, pStname->n - (p - pStname->z) - 1); } else { - snprintf(fullDbName, TSDB_FULL_DB_NAME_LEN, "%d.%s", pCxt->pComCxt->ctx.acctId, pCxt->pComCxt->ctx.db); + snprintf(fullDbName, TSDB_DB_FNAME_LEN, "%d.%s", pCxt->pComCxt->ctx.acctId, pCxt->pComCxt->ctx.db); strncpy(tableName, pStname->z, pStname->n); } @@ -170,12 +170,12 @@ static int32_t buildName(SInsertParseContext* pCxt, SToken* pStname, char* fullD } static int32_t getTableMeta(SInsertParseContext* pCxt, SToken* pTname) { - char fullDbName[TSDB_FULL_DB_NAME_LEN] = {0}; + char fullDbName[TSDB_DB_FNAME_LEN] = {0}; char tableName[TSDB_TABLE_NAME_LEN] = {0}; CHECK_CODE(buildName(pCxt, pTname, fullDbName, tableName)); - CHECK_CODE(catalogGetTableMeta(pCxt->pComCxt->pCatalog, pCxt->pComCxt->pRpc, pCxt->pComCxt->pEpSet, fullDbName, tableName, &pCxt->pTableMeta)); + CHECK_CODE(catalogGetTableMeta(pCxt->pComCxt->pCatalog, pCxt->pComCxt->ctx.pTransporter, &pCxt->pComCxt->ctx.mgmtEpSet, fullDbName, tableName, &pCxt->pTableMeta)); SVgroupInfo vg; - CHECK_CODE(catalogGetTableHashVgroup(pCxt->pComCxt->pCatalog, pCxt->pComCxt->pRpc, pCxt->pComCxt->pEpSet, fullDbName, tableName, &vg)); + CHECK_CODE(catalogGetTableHashVgroup(pCxt->pComCxt->pCatalog, pCxt->pComCxt->ctx.pTransporter, &pCxt->pComCxt->ctx.mgmtEpSet, fullDbName, tableName, &vg)); CHECK_CODE(taosHashPut(pCxt->pVgroupsHashObj, (const char*)&vg.vgId, sizeof(vg.vgId), (char*)&vg, sizeof(vg))); return TSDB_CODE_SUCCESS; } diff --git a/source/libs/parser/src/parserUtil.c b/source/libs/parser/src/parserUtil.c index 8133ee62f74d2e69a4a34fb91903ba5fb03b00bd..39223b775411c76d0821f30e0f2fb208e85b2149 100644 --- a/source/libs/parser/src/parserUtil.c +++ b/source/libs/parser/src/parserUtil.c @@ -1918,7 +1918,7 @@ char* cloneCurrentDBName(SSqlObj* pSql) { case TAOS_REQ_FROM_HTTP: pCtx = pSql->param; if (pCtx && pCtx->db[0] != '\0') { - char db[TSDB_FULL_DB_NAME_LEN] = {0}; + char db[TSDB_DB_FNAME_LEN] = {0}; int32_t len = sprintf(db, "%s%s%s", pTscObj->acctId, TS_PATH_DELIMITER, pCtx->db); assert(len <= sizeof(db)); diff --git a/source/libs/parser/src/sql.c b/source/libs/parser/src/sql.c index 5d8990198917a506de97438c1e24d13cb813c5ce..dd34b042fb88669c00394e1cc5e272873d4cdcc8 100644 --- a/source/libs/parser/src/sql.c +++ b/source/libs/parser/src/sql.c @@ -130,17 +130,17 @@ typedef union { #define ParseARG_FETCH SSqlInfo* pInfo = yypParser->pInfo #define ParseARG_STORE yypParser->pInfo = pInfo #define YYFALLBACK 1 -#define YYNSTATE 362 -#define YYNRULE 291 +#define YYNSTATE 363 +#define YYNRULE 300 #define YYNTOKEN 197 -#define YY_MAX_SHIFT 361 -#define YY_MIN_SHIFTREDUCE 571 -#define YY_MAX_SHIFTREDUCE 861 -#define YY_ERROR_ACTION 862 -#define YY_ACCEPT_ACTION 863 -#define YY_NO_ACTION 864 -#define YY_MIN_REDUCE 865 -#define YY_MAX_REDUCE 1155 +#define YY_MAX_SHIFT 362 +#define YY_MIN_SHIFTREDUCE 581 +#define YY_MAX_SHIFTREDUCE 880 +#define YY_ERROR_ACTION 881 +#define YY_ACCEPT_ACTION 882 +#define YY_NO_ACTION 883 +#define YY_MIN_REDUCE 884 +#define YY_MAX_REDUCE 1183 /************* End control #defines *******************************************/ /* Define the yytestcase() macro to be a no-op if is not already defined @@ -206,85 +206,86 @@ typedef union { ** yy_default[] Default action for each state. ** *********** Begin parsing tables **********************************************/ -#define YY_ACTTAB_COUNT (767) +#define YY_ACTTAB_COUNT (778) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 94, 622, 34, 1008, 622, 21, 246, 700, 205, 623, - /* 10 */ 360, 229, 623, 55, 56, 1000, 59, 60, 160, 1131, - /* 20 */ 249, 49, 48, 47, 1040, 58, 319, 63, 61, 64, - /* 30 */ 62, 997, 998, 31, 1001, 54, 53, 339, 338, 52, - /* 40 */ 51, 50, 55, 56, 231, 59, 60, 242, 1011, 249, - /* 50 */ 49, 48, 47, 297, 58, 319, 63, 61, 64, 62, - /* 60 */ 657, 245, 863, 361, 54, 53, 205, 258, 52, 51, - /* 70 */ 50, 55, 56, 202, 59, 60, 175, 1132, 249, 49, - /* 80 */ 48, 47, 622, 58, 319, 63, 61, 64, 62, 79, - /* 90 */ 623, 1037, 1078, 54, 53, 235, 1017, 52, 51, 50, - /* 100 */ 622, 316, 247, 55, 57, 160, 59, 60, 623, 1030, - /* 110 */ 249, 49, 48, 47, 798, 58, 319, 63, 61, 64, - /* 120 */ 62, 205, 913, 153, 4, 54, 53, 271, 187, 52, - /* 130 */ 51, 50, 1132, 196, 194, 192, 160, 52, 51, 50, - /* 140 */ 191, 139, 138, 137, 136, 316, 572, 573, 574, 575, - /* 150 */ 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, - /* 160 */ 151, 56, 230, 59, 60, 25, 92, 249, 49, 48, - /* 170 */ 47, 97, 58, 319, 63, 61, 64, 62, 321, 1079, - /* 180 */ 80, 289, 54, 53, 160, 34, 52, 51, 50, 59, - /* 190 */ 60, 277, 276, 249, 49, 48, 47, 263, 58, 319, - /* 200 */ 63, 61, 64, 62, 250, 1002, 267, 266, 54, 53, - /* 210 */ 91, 85, 52, 51, 50, 42, 314, 355, 354, 313, - /* 220 */ 312, 311, 353, 310, 309, 308, 352, 307, 351, 350, - /* 230 */ 22, 1010, 980, 968, 969, 970, 971, 972, 973, 974, - /* 240 */ 975, 976, 977, 978, 979, 981, 982, 214, 43, 248, - /* 250 */ 813, 763, 764, 802, 215, 805, 291, 808, 90, 252, - /* 260 */ 135, 134, 133, 216, 205, 248, 813, 324, 85, 802, - /* 270 */ 34, 805, 34, 808, 169, 1132, 12, 63, 61, 64, - /* 280 */ 62, 93, 817, 227, 228, 54, 53, 320, 34, 52, - /* 290 */ 51, 50, 279, 3, 37, 177, 804, 258, 807, 227, - /* 300 */ 228, 103, 108, 99, 106, 43, 176, 34, 727, 34, - /* 310 */ 96, 724, 239, 725, 240, 726, 1011, 34, 1011, 803, - /* 320 */ 303, 806, 258, 349, 257, 122, 744, 270, 203, 77, - /* 330 */ 328, 1012, 65, 34, 1011, 253, 223, 251, 349, 327, - /* 340 */ 326, 254, 255, 42, 208, 355, 354, 272, 65, 329, - /* 350 */ 353, 330, 85, 1011, 352, 1011, 351, 350, 986, 331, - /* 360 */ 984, 985, 35, 1011, 34, 987, 34, 814, 809, 988, - /* 370 */ 73, 989, 990, 1032, 810, 335, 120, 114, 124, 1011, - /* 380 */ 356, 950, 34, 814, 809, 129, 132, 123, 780, 43, - /* 390 */ 810, 84, 54, 53, 126, 78, 52, 51, 50, 1016, - /* 400 */ 259, 923, 256, 1030, 334, 333, 336, 187, 337, 74, - /* 410 */ 1011, 748, 1011, 359, 358, 144, 1030, 811, 150, 148, - /* 420 */ 147, 232, 741, 82, 341, 728, 729, 999, 1011, 241, - /* 430 */ 914, 70, 83, 1014, 233, 760, 187, 243, 770, 800, - /* 440 */ 812, 1014, 209, 771, 710, 779, 294, 7, 712, 296, - /* 450 */ 155, 711, 30, 66, 1151, 836, 815, 210, 24, 35, - /* 460 */ 69, 35, 76, 172, 95, 621, 172, 131, 130, 69, - /* 470 */ 23, 23, 71, 14, 113, 13, 112, 801, 1126, 16, - /* 480 */ 23, 15, 732, 1125, 733, 298, 730, 18, 731, 17, - /* 490 */ 119, 20, 118, 19, 699, 1089, 1143, 1124, 225, 226, - /* 500 */ 206, 207, 211, 204, 212, 213, 218, 219, 1088, 220, - /* 510 */ 217, 237, 201, 1085, 1084, 238, 340, 268, 152, 1039, - /* 520 */ 44, 1050, 149, 1047, 1048, 1031, 274, 1071, 1052, 154, - /* 530 */ 159, 1070, 162, 285, 170, 1009, 171, 1007, 304, 173, - /* 540 */ 167, 174, 927, 278, 1028, 300, 759, 161, 301, 302, - /* 550 */ 164, 305, 306, 163, 234, 199, 40, 288, 280, 282, - /* 560 */ 317, 75, 922, 292, 72, 318, 46, 325, 290, 1150, - /* 570 */ 165, 286, 110, 1149, 1146, 178, 332, 1142, 284, 116, - /* 580 */ 281, 1141, 1138, 179, 947, 41, 36, 45, 200, 911, - /* 590 */ 125, 909, 127, 128, 907, 906, 260, 189, 190, 903, - /* 600 */ 902, 901, 900, 899, 898, 897, 193, 195, 894, 892, - /* 610 */ 890, 888, 197, 885, 198, 881, 121, 342, 273, 81, - /* 620 */ 86, 283, 343, 1072, 344, 345, 347, 346, 348, 224, - /* 630 */ 357, 861, 262, 244, 261, 299, 860, 264, 265, 859, - /* 640 */ 842, 221, 222, 841, 104, 926, 925, 269, 69, 293, - /* 650 */ 8, 275, 735, 87, 158, 26, 156, 905, 904, 186, - /* 660 */ 181, 948, 180, 182, 140, 141, 184, 183, 185, 896, - /* 670 */ 2, 142, 895, 1, 143, 949, 887, 886, 166, 168, - /* 680 */ 29, 1013, 761, 772, 157, 236, 766, 88, 27, 768, - /* 690 */ 89, 287, 9, 28, 10, 11, 38, 295, 721, 39, - /* 700 */ 96, 98, 101, 32, 635, 100, 670, 33, 102, 668, - /* 710 */ 667, 666, 664, 663, 662, 659, 626, 315, 105, 5, - /* 720 */ 107, 816, 322, 6, 818, 323, 109, 67, 111, 68, - /* 730 */ 115, 702, 117, 701, 698, 651, 649, 35, 641, 647, - /* 740 */ 643, 645, 639, 637, 672, 671, 669, 665, 661, 660, - /* 750 */ 188, 589, 624, 145, 865, 864, 864, 864, 864, 864, - /* 760 */ 864, 864, 864, 864, 864, 864, 146, + /* 0 */ 95, 632, 36, 1027, 632, 21, 248, 710, 205, 633, + /* 10 */ 361, 229, 633, 55, 56, 1019, 59, 60, 161, 1159, + /* 20 */ 251, 49, 48, 47, 1068, 58, 320, 63, 61, 64, + /* 30 */ 62, 1016, 1017, 33, 1020, 54, 53, 340, 339, 52, + /* 40 */ 51, 50, 55, 56, 231, 59, 60, 242, 1030, 251, + /* 50 */ 49, 48, 47, 667, 58, 320, 63, 61, 64, 62, + /* 60 */ 202, 247, 882, 362, 54, 53, 205, 260, 52, 51, + /* 70 */ 50, 55, 56, 203, 59, 60, 175, 1160, 251, 49, + /* 80 */ 48, 47, 632, 58, 320, 63, 61, 64, 62, 80, + /* 90 */ 633, 1065, 1106, 54, 53, 235, 1045, 52, 51, 50, + /* 100 */ 632, 317, 317, 55, 57, 161, 59, 60, 633, 1058, + /* 110 */ 251, 49, 48, 47, 817, 58, 320, 63, 61, 64, + /* 120 */ 62, 205, 208, 154, 241, 54, 53, 273, 1033, 52, + /* 130 */ 51, 50, 1160, 196, 194, 192, 161, 52, 51, 50, + /* 140 */ 191, 140, 139, 138, 137, 350, 582, 583, 584, 585, + /* 150 */ 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, + /* 160 */ 152, 56, 230, 59, 60, 27, 93, 251, 49, 48, + /* 170 */ 47, 98, 58, 320, 63, 61, 64, 62, 32, 1107, + /* 180 */ 81, 291, 54, 53, 161, 36, 52, 51, 50, 59, + /* 190 */ 60, 279, 278, 251, 49, 48, 47, 265, 58, 320, + /* 200 */ 63, 61, 64, 62, 252, 1021, 269, 268, 54, 53, + /* 210 */ 92, 299, 52, 51, 50, 42, 315, 356, 355, 314, + /* 220 */ 313, 312, 354, 311, 310, 309, 353, 308, 352, 351, + /* 230 */ 22, 1029, 999, 987, 988, 989, 990, 991, 992, 993, + /* 240 */ 994, 995, 996, 997, 998, 1000, 1001, 214, 245, 250, + /* 250 */ 832, 1060, 1033, 821, 215, 824, 293, 827, 91, 254, + /* 260 */ 136, 135, 134, 216, 205, 250, 832, 325, 86, 821, + /* 270 */ 209, 824, 36, 827, 170, 1160, 12, 63, 61, 64, + /* 280 */ 62, 94, 1044, 227, 228, 54, 53, 321, 36, 52, + /* 290 */ 51, 50, 281, 3, 39, 177, 782, 783, 210, 227, + /* 300 */ 228, 104, 109, 100, 107, 43, 86, 823, 746, 826, + /* 310 */ 97, 743, 123, 744, 239, 745, 738, 1154, 1030, 735, + /* 320 */ 304, 736, 86, 737, 259, 350, 822, 272, 825, 78, + /* 330 */ 240, 733, 65, 734, 1030, 255, 223, 253, 1032, 328, + /* 340 */ 327, 256, 257, 43, 42, 85, 356, 355, 65, 243, + /* 350 */ 244, 354, 121, 115, 125, 353, 763, 352, 351, 43, + /* 360 */ 74, 130, 133, 124, 36, 36, 36, 833, 828, 1058, + /* 370 */ 127, 36, 357, 969, 829, 1005, 36, 1003, 1004, 360, + /* 380 */ 359, 145, 1006, 833, 828, 36, 1007, 232, 1008, 1009, + /* 390 */ 829, 54, 53, 36, 36, 52, 51, 50, 322, 75, + /* 400 */ 261, 1058, 258, 932, 335, 334, 329, 330, 331, 187, + /* 410 */ 1030, 1030, 1030, 332, 151, 149, 148, 1030, 336, 233, + /* 420 */ 260, 260, 1030, 79, 799, 747, 748, 337, 830, 176, + /* 430 */ 1031, 1030, 942, 739, 740, 338, 342, 760, 187, 1030, + /* 440 */ 1030, 767, 933, 274, 779, 83, 720, 831, 187, 84, + /* 450 */ 789, 790, 71, 296, 722, 1018, 298, 819, 37, 156, + /* 460 */ 721, 37, 7, 855, 834, 66, 24, 249, 37, 67, + /* 470 */ 631, 96, 731, 77, 732, 67, 132, 131, 23, 23, + /* 480 */ 1153, 798, 70, 1152, 225, 23, 70, 1099, 14, 4, + /* 490 */ 13, 226, 114, 72, 113, 820, 16, 206, 15, 751, + /* 500 */ 207, 752, 836, 1117, 749, 709, 750, 211, 204, 18, + /* 510 */ 120, 17, 119, 212, 20, 213, 19, 218, 1179, 219, + /* 520 */ 1171, 220, 217, 201, 1116, 270, 237, 1113, 1112, 238, + /* 530 */ 341, 153, 1067, 44, 1078, 1075, 1076, 1098, 1080, 1059, + /* 540 */ 276, 150, 155, 160, 287, 1028, 280, 171, 172, 275, + /* 550 */ 234, 1026, 282, 173, 174, 946, 284, 301, 162, 778, + /* 560 */ 1056, 163, 164, 165, 166, 167, 168, 169, 286, 294, + /* 570 */ 302, 290, 303, 306, 307, 76, 199, 40, 73, 46, + /* 580 */ 318, 941, 319, 292, 326, 288, 1178, 111, 1177, 283, + /* 590 */ 1174, 178, 333, 1170, 117, 1169, 45, 1166, 179, 966, + /* 600 */ 41, 38, 200, 930, 126, 305, 928, 128, 129, 926, + /* 610 */ 925, 262, 189, 190, 922, 921, 920, 919, 918, 917, + /* 620 */ 916, 193, 195, 913, 911, 909, 907, 197, 904, 198, + /* 630 */ 900, 122, 343, 82, 87, 344, 285, 1100, 345, 346, + /* 640 */ 347, 348, 349, 358, 880, 224, 246, 300, 263, 264, + /* 650 */ 879, 221, 266, 222, 267, 878, 945, 105, 944, 861, + /* 660 */ 860, 271, 70, 295, 8, 28, 924, 923, 277, 141, + /* 670 */ 181, 967, 182, 142, 184, 915, 180, 183, 185, 143, + /* 680 */ 186, 144, 914, 968, 906, 905, 754, 88, 2, 1, + /* 690 */ 780, 157, 158, 31, 791, 785, 159, 89, 236, 787, + /* 700 */ 90, 289, 29, 9, 30, 10, 11, 25, 297, 26, + /* 710 */ 97, 99, 102, 645, 34, 101, 680, 35, 103, 678, + /* 720 */ 677, 676, 674, 673, 672, 669, 316, 106, 636, 323, + /* 730 */ 108, 835, 5, 324, 837, 6, 37, 68, 110, 112, + /* 740 */ 69, 712, 116, 118, 711, 708, 661, 659, 651, 657, + /* 750 */ 653, 655, 649, 647, 682, 681, 679, 675, 671, 670, + /* 760 */ 634, 188, 599, 884, 883, 883, 883, 883, 883, 883, + /* 770 */ 883, 883, 883, 883, 883, 883, 146, 147, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 207, 1, 200, 200, 1, 266, 206, 5, 266, 9, @@ -292,79 +293,79 @@ static const YYCODETYPE yy_lookahead[] = { /* 20 */ 20, 21, 22, 23, 200, 25, 26, 27, 28, 29, /* 30 */ 30, 238, 239, 240, 241, 35, 36, 35, 36, 39, /* 40 */ 40, 41, 13, 14, 242, 16, 17, 244, 246, 20, - /* 50 */ 21, 22, 23, 36, 25, 26, 27, 28, 29, 30, - /* 60 */ 5, 206, 198, 199, 35, 36, 266, 200, 39, 40, + /* 50 */ 21, 22, 23, 5, 25, 26, 27, 28, 29, 30, + /* 60 */ 266, 206, 198, 199, 35, 36, 266, 200, 39, 40, /* 70 */ 41, 13, 14, 266, 16, 17, 209, 277, 20, 21, /* 80 */ 22, 23, 1, 25, 26, 27, 28, 29, 30, 89, /* 90 */ 9, 267, 274, 35, 36, 248, 249, 39, 40, 41, - /* 100 */ 1, 86, 62, 13, 14, 200, 16, 17, 9, 245, + /* 100 */ 1, 86, 86, 13, 14, 200, 16, 17, 9, 245, /* 110 */ 20, 21, 22, 23, 85, 25, 26, 27, 28, 29, - /* 120 */ 30, 266, 205, 200, 84, 35, 36, 263, 211, 39, + /* 120 */ 30, 266, 266, 200, 243, 35, 36, 263, 247, 39, /* 130 */ 40, 41, 277, 64, 65, 66, 200, 39, 40, 41, - /* 140 */ 71, 72, 73, 74, 75, 86, 47, 48, 49, 50, + /* 140 */ 71, 72, 73, 74, 75, 93, 47, 48, 49, 50, /* 150 */ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, /* 160 */ 61, 14, 63, 16, 17, 84, 250, 20, 21, 22, - /* 170 */ 23, 207, 25, 26, 27, 28, 29, 30, 15, 274, + /* 170 */ 23, 207, 25, 26, 27, 28, 29, 30, 84, 274, /* 180 */ 264, 276, 35, 36, 200, 200, 39, 40, 41, 16, /* 190 */ 17, 268, 269, 20, 21, 22, 23, 144, 25, 26, /* 200 */ 27, 28, 29, 30, 206, 241, 153, 154, 35, 36, - /* 210 */ 274, 84, 39, 40, 41, 101, 102, 103, 104, 105, + /* 210 */ 274, 117, 39, 40, 41, 101, 102, 103, 104, 105, /* 220 */ 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, /* 230 */ 46, 246, 222, 223, 224, 225, 226, 227, 228, 229, - /* 240 */ 230, 231, 232, 233, 234, 235, 236, 63, 121, 1, - /* 250 */ 2, 127, 128, 5, 70, 7, 272, 9, 274, 70, + /* 240 */ 230, 231, 232, 233, 234, 235, 236, 63, 243, 1, + /* 250 */ 2, 245, 247, 5, 70, 7, 272, 9, 274, 70, /* 260 */ 76, 77, 78, 79, 266, 1, 2, 83, 84, 5, - /* 270 */ 200, 7, 200, 9, 253, 277, 84, 27, 28, 29, - /* 280 */ 30, 89, 119, 35, 36, 35, 36, 39, 200, 39, - /* 290 */ 40, 41, 271, 64, 65, 66, 5, 200, 7, 35, - /* 300 */ 36, 72, 73, 74, 75, 121, 209, 200, 2, 200, - /* 310 */ 118, 5, 242, 7, 242, 9, 246, 200, 246, 5, - /* 320 */ 91, 7, 200, 93, 70, 80, 39, 143, 266, 145, - /* 330 */ 242, 209, 84, 200, 246, 146, 152, 148, 93, 150, - /* 340 */ 151, 35, 36, 101, 266, 103, 104, 85, 84, 242, - /* 350 */ 108, 242, 84, 246, 112, 246, 114, 115, 222, 242, - /* 360 */ 224, 225, 100, 246, 200, 229, 200, 119, 120, 233, - /* 370 */ 100, 235, 236, 245, 126, 242, 64, 65, 66, 246, - /* 380 */ 220, 221, 200, 119, 120, 73, 74, 75, 78, 121, - /* 390 */ 126, 123, 35, 36, 82, 207, 39, 40, 41, 249, - /* 400 */ 146, 205, 148, 245, 150, 151, 242, 211, 242, 139, - /* 410 */ 246, 124, 246, 67, 68, 69, 245, 126, 64, 65, - /* 420 */ 66, 263, 100, 85, 242, 119, 120, 239, 246, 243, - /* 430 */ 205, 100, 85, 247, 263, 85, 211, 243, 85, 1, - /* 440 */ 126, 247, 266, 85, 85, 135, 85, 125, 85, 85, - /* 450 */ 100, 85, 84, 100, 249, 85, 85, 266, 100, 100, - /* 460 */ 122, 100, 84, 100, 100, 85, 100, 80, 81, 122, - /* 470 */ 100, 100, 141, 147, 147, 149, 149, 39, 266, 147, - /* 480 */ 100, 149, 5, 266, 7, 117, 5, 147, 7, 149, - /* 490 */ 147, 147, 149, 149, 116, 237, 249, 266, 266, 266, - /* 500 */ 266, 266, 266, 266, 266, 266, 266, 266, 237, 266, - /* 510 */ 266, 237, 266, 237, 237, 237, 237, 200, 200, 200, - /* 520 */ 265, 200, 62, 200, 200, 245, 245, 275, 200, 200, - /* 530 */ 200, 275, 260, 200, 251, 245, 200, 200, 92, 200, - /* 540 */ 255, 200, 200, 270, 262, 200, 126, 261, 200, 200, - /* 550 */ 258, 200, 200, 259, 270, 200, 200, 131, 270, 270, - /* 560 */ 200, 138, 200, 133, 140, 200, 137, 200, 136, 200, - /* 570 */ 257, 130, 200, 200, 200, 200, 200, 200, 129, 200, - /* 580 */ 132, 200, 200, 200, 200, 200, 200, 142, 200, 200, - /* 590 */ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - /* 600 */ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, - /* 610 */ 200, 200, 200, 200, 200, 200, 99, 98, 202, 202, - /* 620 */ 202, 202, 53, 202, 95, 97, 96, 57, 94, 202, - /* 630 */ 86, 5, 5, 202, 155, 202, 5, 155, 5, 5, - /* 640 */ 103, 202, 202, 102, 207, 210, 210, 144, 122, 117, - /* 650 */ 84, 100, 85, 100, 100, 84, 84, 202, 202, 212, - /* 660 */ 217, 219, 218, 213, 203, 203, 214, 216, 215, 202, - /* 670 */ 204, 203, 202, 208, 203, 221, 202, 202, 256, 254, - /* 680 */ 252, 247, 85, 85, 84, 1, 85, 84, 100, 85, - /* 690 */ 84, 84, 134, 100, 134, 84, 84, 117, 5, 84, - /* 700 */ 118, 80, 72, 90, 5, 89, 9, 90, 89, 5, - /* 710 */ 5, 5, 5, 5, 5, 5, 87, 15, 80, 84, - /* 720 */ 88, 85, 26, 84, 119, 61, 149, 16, 149, 16, - /* 730 */ 149, 5, 149, 5, 85, 5, 5, 100, 5, 5, - /* 740 */ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - /* 750 */ 100, 62, 87, 21, 0, 278, 278, 278, 278, 278, - /* 760 */ 278, 278, 278, 278, 278, 278, 21, 278, 278, 278, - /* 770 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 270 */ 266, 7, 200, 9, 253, 277, 84, 27, 28, 29, + /* 280 */ 30, 89, 249, 35, 36, 35, 36, 39, 200, 39, + /* 290 */ 40, 41, 271, 64, 65, 66, 127, 128, 266, 35, + /* 300 */ 36, 72, 73, 74, 75, 121, 84, 5, 2, 7, + /* 310 */ 118, 5, 80, 7, 242, 9, 2, 266, 246, 5, + /* 320 */ 91, 7, 84, 9, 70, 93, 5, 143, 7, 145, + /* 330 */ 242, 5, 84, 7, 246, 146, 152, 148, 247, 150, + /* 340 */ 151, 35, 36, 121, 101, 123, 103, 104, 84, 35, + /* 350 */ 36, 108, 64, 65, 66, 112, 39, 114, 115, 121, + /* 360 */ 100, 73, 74, 75, 200, 200, 200, 119, 120, 245, + /* 370 */ 82, 200, 220, 221, 126, 222, 200, 224, 225, 67, + /* 380 */ 68, 69, 229, 119, 120, 200, 233, 263, 235, 236, + /* 390 */ 126, 35, 36, 200, 200, 39, 40, 41, 15, 139, + /* 400 */ 146, 245, 148, 205, 150, 151, 242, 242, 242, 211, + /* 410 */ 246, 246, 246, 242, 64, 65, 66, 246, 242, 263, + /* 420 */ 200, 200, 246, 207, 78, 119, 120, 242, 126, 209, + /* 430 */ 209, 246, 205, 119, 120, 242, 242, 100, 211, 246, + /* 440 */ 246, 124, 205, 85, 85, 85, 85, 126, 211, 85, + /* 450 */ 85, 85, 100, 85, 85, 239, 85, 1, 100, 100, + /* 460 */ 85, 100, 125, 85, 85, 100, 100, 62, 100, 100, + /* 470 */ 85, 100, 5, 84, 7, 100, 80, 81, 100, 100, + /* 480 */ 266, 135, 122, 266, 266, 100, 122, 275, 147, 84, + /* 490 */ 149, 266, 147, 141, 149, 39, 147, 266, 149, 5, + /* 500 */ 266, 7, 119, 237, 5, 116, 7, 266, 266, 147, + /* 510 */ 147, 149, 149, 266, 147, 266, 149, 266, 249, 266, + /* 520 */ 249, 266, 266, 266, 237, 200, 237, 237, 237, 237, + /* 530 */ 237, 200, 200, 265, 200, 200, 200, 275, 200, 245, + /* 540 */ 245, 62, 200, 200, 200, 245, 270, 251, 200, 202, + /* 550 */ 270, 200, 270, 200, 200, 200, 270, 200, 261, 126, + /* 560 */ 262, 260, 259, 258, 257, 256, 255, 254, 129, 133, + /* 570 */ 200, 131, 200, 200, 200, 138, 200, 200, 140, 137, + /* 580 */ 200, 200, 200, 136, 200, 130, 200, 200, 200, 132, + /* 590 */ 200, 200, 200, 200, 200, 200, 142, 200, 200, 200, + /* 600 */ 200, 200, 200, 200, 200, 92, 200, 200, 200, 200, + /* 610 */ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + /* 620 */ 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, + /* 630 */ 200, 99, 98, 202, 202, 53, 202, 202, 95, 97, + /* 640 */ 57, 96, 94, 86, 5, 202, 202, 202, 155, 5, + /* 650 */ 5, 202, 155, 202, 5, 5, 210, 207, 210, 103, + /* 660 */ 102, 144, 122, 117, 84, 84, 202, 202, 100, 203, + /* 670 */ 217, 219, 213, 203, 214, 202, 218, 216, 215, 203, + /* 680 */ 212, 203, 202, 221, 202, 202, 85, 100, 204, 208, + /* 690 */ 85, 84, 84, 252, 85, 85, 100, 84, 1, 85, + /* 700 */ 84, 84, 100, 134, 100, 134, 84, 84, 117, 84, + /* 710 */ 118, 80, 72, 5, 90, 89, 9, 90, 89, 5, + /* 720 */ 5, 5, 5, 5, 5, 5, 15, 80, 87, 26, + /* 730 */ 88, 85, 84, 61, 119, 84, 100, 16, 149, 149, + /* 740 */ 16, 5, 149, 149, 5, 85, 5, 5, 5, 5, + /* 750 */ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + /* 760 */ 87, 100, 62, 0, 278, 278, 278, 278, 278, 278, + /* 770 */ 278, 278, 278, 278, 278, 278, 21, 21, 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, @@ -383,114 +384,115 @@ static const YYCODETYPE yy_lookahead[] = { /* 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, + /* 960 */ 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, + /* 970 */ 278, 278, 278, 278, 278, }; -#define YY_SHIFT_COUNT (361) +#define YY_SHIFT_COUNT (362) #define YY_SHIFT_MIN (0) -#define YY_SHIFT_MAX (754) +#define YY_SHIFT_MAX (763) static const unsigned short int yy_shift_ofst[] = { - /* 0 */ 184, 114, 242, 59, 248, 264, 264, 81, 3, 3, + /* 0 */ 184, 114, 243, 16, 248, 264, 264, 81, 3, 3, /* 10 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - /* 20 */ 3, 0, 99, 264, 306, 127, 127, 3, 3, 124, - /* 30 */ 3, 15, 3, 3, 3, 3, 245, 59, 17, 17, - /* 40 */ 230, 230, 55, 767, 264, 264, 264, 264, 264, 264, + /* 20 */ 3, 0, 99, 264, 306, 314, 314, 238, 238, 3, + /* 30 */ 3, 169, 3, 15, 3, 3, 3, 3, 232, 16, + /* 40 */ 52, 52, 48, 778, 264, 264, 264, 264, 264, 264, /* 50 */ 264, 264, 264, 264, 264, 264, 264, 264, 264, 264, - /* 60 */ 264, 264, 264, 264, 264, 264, 306, 306, 306, 268, - /* 70 */ 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, - /* 80 */ 287, 3, 3, 3, 127, 127, 3, 3, 3, 3, - /* 90 */ 310, 310, 322, 127, 3, 3, 3, 3, 3, 3, + /* 60 */ 264, 264, 264, 264, 264, 264, 306, 314, 306, 306, + /* 70 */ 222, 2, 2, 2, 2, 2, 2, 2, 3, 3, + /* 80 */ 3, 317, 3, 3, 3, 238, 238, 3, 3, 3, + /* 90 */ 3, 346, 346, 337, 238, 3, 3, 3, 3, 3, /* 100 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 110 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 120 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 130 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 140 */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - /* 150 */ 3, 3, 460, 460, 460, 420, 420, 420, 420, 460, - /* 160 */ 460, 423, 424, 430, 429, 432, 426, 441, 449, 448, - /* 170 */ 445, 460, 17, 460, 460, 446, 446, 59, 460, 460, - /* 180 */ 517, 519, 569, 529, 528, 570, 530, 534, 55, 460, - /* 190 */ 460, 544, 544, 460, 544, 460, 544, 460, 460, 767, - /* 200 */ 767, 29, 58, 58, 90, 58, 147, 173, 250, 250, - /* 210 */ 250, 250, 250, 250, 229, 69, 312, 357, 357, 357, - /* 220 */ 357, 189, 254, 53, 192, 98, 98, 291, 314, 346, - /* 230 */ 354, 262, 338, 347, 350, 353, 358, 331, 270, 359, - /* 240 */ 361, 363, 364, 366, 368, 370, 371, 438, 40, 163, - /* 250 */ 380, 326, 327, 332, 477, 481, 340, 343, 378, 344, - /* 260 */ 387, 626, 479, 627, 631, 482, 633, 634, 537, 541, - /* 270 */ 503, 526, 532, 566, 567, 571, 551, 553, 597, 572, - /* 280 */ 598, 600, 601, 554, 603, 604, 606, 684, 607, 588, - /* 290 */ 558, 593, 560, 611, 532, 612, 580, 693, 615, 582, - /* 300 */ 621, 613, 616, 630, 699, 617, 619, 697, 704, 705, - /* 310 */ 706, 707, 708, 709, 710, 629, 702, 638, 632, 635, - /* 320 */ 636, 605, 639, 696, 664, 711, 577, 579, 637, 637, - /* 330 */ 637, 637, 713, 581, 583, 637, 637, 637, 726, 728, - /* 340 */ 649, 637, 730, 731, 733, 734, 735, 736, 737, 738, - /* 350 */ 739, 740, 741, 742, 743, 744, 650, 665, 732, 745, - /* 360 */ 689, 754, + /* 150 */ 3, 3, 3, 479, 479, 479, 433, 433, 433, 433, + /* 160 */ 479, 479, 437, 438, 436, 442, 447, 440, 455, 439, + /* 170 */ 457, 454, 479, 479, 479, 513, 513, 16, 479, 479, + /* 180 */ 532, 534, 582, 543, 542, 583, 545, 548, 48, 479, + /* 190 */ 479, 557, 557, 479, 557, 479, 557, 479, 479, 778, + /* 200 */ 778, 29, 58, 58, 90, 58, 147, 173, 250, 250, + /* 210 */ 250, 250, 250, 250, 229, 69, 288, 356, 356, 356, + /* 220 */ 356, 189, 254, 53, 192, 98, 98, 302, 321, 312, + /* 230 */ 350, 358, 360, 364, 359, 365, 366, 352, 260, 361, + /* 240 */ 368, 369, 371, 326, 467, 375, 94, 378, 379, 456, + /* 250 */ 405, 383, 385, 341, 345, 349, 494, 499, 362, 363, + /* 260 */ 389, 367, 396, 639, 493, 644, 645, 497, 649, 650, + /* 270 */ 556, 558, 517, 540, 546, 580, 601, 581, 568, 587, + /* 280 */ 605, 607, 609, 608, 610, 596, 613, 614, 616, 697, + /* 290 */ 617, 602, 569, 604, 571, 622, 546, 623, 591, 625, + /* 300 */ 592, 631, 624, 626, 640, 708, 627, 629, 707, 714, + /* 310 */ 715, 716, 717, 718, 719, 720, 641, 711, 647, 642, + /* 320 */ 648, 646, 615, 651, 703, 672, 721, 589, 590, 636, + /* 330 */ 636, 636, 636, 724, 593, 594, 636, 636, 636, 736, + /* 340 */ 739, 660, 636, 741, 742, 743, 744, 745, 746, 747, + /* 350 */ 748, 749, 750, 751, 752, 753, 754, 661, 673, 755, + /* 360 */ 756, 700, 763, }; #define YY_REDUCE_COUNT (200) #define YY_REDUCE_MIN (-261) -#define YY_REDUCE_MAX (475) +#define YY_REDUCE_MAX (484) static const short yy_reduce_ofst[] = { - /* 0 */ -136, 10, 136, -207, -200, -145, -2, -77, -198, -95, - /* 10 */ -16, 70, 72, 88, 107, 109, 117, 133, 164, 166, - /* 20 */ 182, -176, -190, -258, -153, 158, 171, -182, -64, 21, - /* 30 */ -197, -36, -133, 97, 122, -15, -83, 188, 186, 194, - /* 40 */ 196, 225, 160, -84, -261, -193, 62, 78, 176, 191, - /* 50 */ 212, 217, 231, 232, 233, 234, 235, 236, 237, 238, - /* 60 */ 239, 240, 241, 243, 244, 246, 150, 205, 247, 128, - /* 70 */ 258, 271, 274, 276, 277, 278, 279, 317, 318, 319, - /* 80 */ 255, 321, 323, 324, 280, 281, 328, 329, 330, 333, - /* 90 */ 252, 256, 283, 290, 336, 337, 339, 341, 342, 345, - /* 100 */ 348, 349, 351, 352, 355, 356, 360, 362, 365, 367, - /* 110 */ 369, 372, 373, 374, 375, 376, 377, 379, 381, 382, - /* 120 */ 383, 384, 385, 386, 388, 389, 390, 391, 392, 393, - /* 130 */ 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, - /* 140 */ 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, - /* 150 */ 414, 415, 416, 417, 418, 273, 284, 288, 289, 419, - /* 160 */ 421, 282, 286, 272, 294, 292, 313, 422, 285, 425, - /* 170 */ 428, 427, 434, 431, 433, 435, 436, 437, 439, 440, - /* 180 */ 442, 444, 443, 450, 451, 452, 453, 447, 454, 455, - /* 190 */ 456, 461, 462, 467, 468, 470, 471, 474, 475, 465, - /* 200 */ 466, + /* 0 */ -136, 10, 153, -207, -200, -145, -2, -77, -198, -95, + /* 10 */ -16, 72, 88, 164, 165, 166, 171, 176, 185, 193, + /* 20 */ 194, -176, -190, -258, -153, -119, 5, 124, 156, -182, + /* 30 */ -64, 21, -197, -36, -133, 220, 221, -15, 198, 216, + /* 40 */ 227, 237, 152, -84, -261, -206, -193, -144, 4, 32, + /* 50 */ 51, 214, 217, 218, 225, 231, 234, 241, 242, 247, + /* 60 */ 249, 251, 253, 255, 256, 257, 33, 91, 269, 271, + /* 70 */ 6, 266, 287, 289, 290, 291, 292, 293, 325, 331, + /* 80 */ 332, 268, 334, 335, 336, 294, 295, 338, 342, 343, + /* 90 */ 344, 212, 262, 296, 300, 348, 351, 353, 354, 355, + /* 100 */ 357, 370, 372, 373, 374, 376, 377, 380, 381, 382, + /* 110 */ 384, 386, 387, 388, 390, 391, 392, 393, 394, 395, + /* 120 */ 397, 398, 399, 400, 401, 402, 403, 404, 406, 407, + /* 130 */ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, + /* 140 */ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, + /* 150 */ 428, 429, 430, 347, 431, 432, 276, 280, 282, 286, + /* 160 */ 434, 435, 298, 297, 301, 303, 305, 307, 309, 311, + /* 170 */ 313, 441, 443, 444, 445, 446, 448, 450, 449, 451, + /* 180 */ 452, 458, 453, 459, 461, 460, 463, 468, 462, 464, + /* 190 */ 465, 466, 470, 473, 476, 480, 478, 482, 483, 481, + /* 200 */ 484, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 862, 924, 912, 921, 1134, 1134, 1134, 862, 862, 862, - /* 10 */ 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, - /* 20 */ 862, 1041, 882, 1134, 862, 862, 862, 862, 862, 1056, - /* 30 */ 862, 921, 862, 862, 862, 862, 930, 921, 862, 862, - /* 40 */ 930, 930, 862, 1036, 862, 862, 862, 862, 862, 862, - /* 50 */ 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, - /* 60 */ 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, - /* 70 */ 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, - /* 80 */ 1043, 1049, 1046, 862, 862, 862, 1051, 862, 862, 862, - /* 90 */ 1075, 1075, 1034, 862, 862, 862, 862, 862, 862, 862, - /* 100 */ 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, - /* 110 */ 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, - /* 120 */ 862, 862, 862, 862, 862, 910, 862, 908, 862, 862, - /* 130 */ 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, - /* 140 */ 862, 862, 862, 862, 893, 862, 862, 862, 862, 862, - /* 150 */ 862, 880, 884, 884, 884, 862, 862, 862, 862, 884, - /* 160 */ 884, 1082, 1086, 1068, 1080, 1076, 1063, 1061, 1059, 1067, - /* 170 */ 1090, 884, 862, 884, 884, 928, 928, 921, 884, 884, - /* 180 */ 946, 944, 942, 934, 940, 936, 938, 932, 862, 884, - /* 190 */ 884, 919, 919, 884, 919, 884, 919, 884, 884, 967, - /* 200 */ 983, 862, 1091, 1081, 862, 1133, 1121, 1120, 1129, 1128, - /* 210 */ 1127, 1119, 1118, 1117, 862, 862, 862, 1113, 1116, 1115, - /* 220 */ 1114, 862, 862, 862, 862, 1123, 1122, 862, 862, 862, - /* 230 */ 862, 862, 862, 862, 862, 862, 862, 1087, 1083, 862, - /* 240 */ 862, 862, 862, 862, 862, 862, 862, 862, 1093, 862, - /* 250 */ 862, 862, 862, 862, 862, 862, 862, 862, 991, 862, - /* 260 */ 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, - /* 270 */ 862, 1033, 862, 862, 862, 862, 1045, 1044, 862, 862, - /* 280 */ 862, 862, 862, 862, 862, 862, 862, 862, 862, 1077, - /* 290 */ 862, 1069, 862, 862, 1003, 862, 862, 862, 862, 862, - /* 300 */ 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, - /* 310 */ 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, - /* 320 */ 862, 862, 862, 862, 862, 862, 862, 862, 1152, 1147, - /* 330 */ 1148, 1145, 862, 862, 862, 1144, 1139, 1140, 862, 862, - /* 340 */ 862, 1137, 862, 862, 862, 862, 862, 862, 862, 862, - /* 350 */ 862, 862, 862, 862, 862, 862, 952, 862, 891, 889, - /* 360 */ 862, 862, + /* 0 */ 881, 943, 931, 940, 1162, 1162, 1162, 881, 881, 881, + /* 10 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + /* 20 */ 881, 1069, 901, 1162, 881, 881, 881, 881, 881, 881, + /* 30 */ 881, 1084, 881, 940, 881, 881, 881, 881, 949, 940, + /* 40 */ 949, 949, 881, 1064, 881, 881, 881, 881, 881, 881, + /* 50 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + /* 60 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + /* 70 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + /* 80 */ 881, 1071, 1077, 1074, 881, 881, 881, 1079, 881, 881, + /* 90 */ 881, 1103, 1103, 1062, 881, 881, 881, 881, 881, 881, + /* 100 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + /* 110 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + /* 120 */ 881, 881, 881, 881, 881, 881, 929, 881, 927, 881, + /* 130 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + /* 140 */ 881, 881, 881, 881, 881, 912, 881, 881, 881, 881, + /* 150 */ 881, 881, 899, 903, 903, 903, 881, 881, 881, 881, + /* 160 */ 903, 903, 1110, 1114, 1096, 1108, 1104, 1091, 1089, 1087, + /* 170 */ 1095, 1118, 903, 903, 903, 947, 947, 940, 903, 903, + /* 180 */ 965, 963, 961, 953, 959, 955, 957, 951, 881, 903, + /* 190 */ 903, 938, 938, 903, 938, 903, 938, 903, 903, 986, + /* 200 */ 1002, 881, 1119, 1109, 881, 1161, 1149, 1148, 1157, 1156, + /* 210 */ 1155, 1147, 1146, 1145, 881, 881, 881, 1141, 1144, 1143, + /* 220 */ 1142, 881, 881, 881, 881, 1151, 1150, 881, 881, 881, + /* 230 */ 881, 881, 881, 881, 881, 881, 881, 1115, 1111, 881, + /* 240 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + /* 250 */ 1121, 881, 881, 881, 881, 881, 881, 881, 881, 881, + /* 260 */ 1010, 881, 881, 881, 881, 881, 881, 881, 881, 881, + /* 270 */ 881, 881, 881, 1061, 881, 881, 881, 881, 1073, 1072, + /* 280 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + /* 290 */ 881, 1105, 881, 1097, 881, 881, 1022, 881, 881, 881, + /* 300 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + /* 310 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 881, + /* 320 */ 881, 881, 881, 881, 881, 881, 881, 881, 881, 1180, + /* 330 */ 1175, 1176, 1173, 881, 881, 881, 1172, 1167, 1168, 881, + /* 340 */ 881, 881, 1165, 881, 881, 881, 881, 881, 881, 881, + /* 350 */ 881, 881, 881, 881, 881, 881, 881, 971, 881, 910, + /* 360 */ 908, 881, 881, }; /********** End of lemon-generated parsing tables *****************************/ @@ -1229,146 +1231,155 @@ static const char *const yyRuleName[] = { /* 148 */ "tagitemlist1 ::= tagitemlist1 COMMA tagitem1", /* 149 */ "tagitemlist1 ::= tagitem1", /* 150 */ "tagitem1 ::= MINUS INTEGER", - /* 151 */ "tagitemlist ::= tagitemlist COMMA tagitem", - /* 152 */ "tagitemlist ::= tagitem", - /* 153 */ "tagitem ::= INTEGER", - /* 154 */ "tagitem ::= FLOAT", - /* 155 */ "tagitem ::= STRING", - /* 156 */ "tagitem ::= BOOL", - /* 157 */ "tagitem ::= NULL", - /* 158 */ "tagitem ::= NOW", - /* 159 */ "tagitem ::= MINUS INTEGER", - /* 160 */ "tagitem ::= MINUS FLOAT", - /* 161 */ "tagitem ::= PLUS INTEGER", - /* 162 */ "tagitem ::= PLUS FLOAT", - /* 163 */ "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", - /* 164 */ "select ::= LP select RP", - /* 165 */ "union ::= select", - /* 166 */ "union ::= union UNION ALL select", - /* 167 */ "union ::= union UNION select", - /* 168 */ "cmd ::= union", - /* 169 */ "select ::= SELECT selcollist", - /* 170 */ "sclp ::= selcollist COMMA", - /* 171 */ "sclp ::=", - /* 172 */ "selcollist ::= sclp distinct expr as", - /* 173 */ "selcollist ::= sclp STAR", - /* 174 */ "as ::= AS ids", - /* 175 */ "as ::= ids", - /* 176 */ "as ::=", - /* 177 */ "distinct ::= DISTINCT", - /* 178 */ "distinct ::=", - /* 179 */ "from ::= FROM tablelist", - /* 180 */ "from ::= FROM sub", - /* 181 */ "sub ::= LP union RP", - /* 182 */ "sub ::= LP union RP ids", - /* 183 */ "sub ::= sub COMMA LP union RP ids", - /* 184 */ "tablelist ::= ids cpxName", - /* 185 */ "tablelist ::= ids cpxName ids", - /* 186 */ "tablelist ::= tablelist COMMA ids cpxName", - /* 187 */ "tablelist ::= tablelist COMMA ids cpxName ids", - /* 188 */ "tmvar ::= VARIABLE", - /* 189 */ "interval_option ::= intervalKey LP tmvar RP", - /* 190 */ "interval_option ::= intervalKey LP tmvar COMMA tmvar RP", - /* 191 */ "interval_option ::=", - /* 192 */ "intervalKey ::= INTERVAL", - /* 193 */ "intervalKey ::= EVERY", - /* 194 */ "session_option ::=", - /* 195 */ "session_option ::= SESSION LP ids cpxName COMMA tmvar RP", - /* 196 */ "windowstate_option ::=", - /* 197 */ "windowstate_option ::= STATE_WINDOW LP ids RP", - /* 198 */ "fill_opt ::=", - /* 199 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP", - /* 200 */ "fill_opt ::= FILL LP ID RP", - /* 201 */ "sliding_opt ::= SLIDING LP tmvar RP", - /* 202 */ "sliding_opt ::=", - /* 203 */ "orderby_opt ::=", - /* 204 */ "orderby_opt ::= ORDER BY sortlist", - /* 205 */ "sortlist ::= sortlist COMMA item sortorder", - /* 206 */ "sortlist ::= item sortorder", - /* 207 */ "item ::= ids cpxName", - /* 208 */ "sortorder ::= ASC", - /* 209 */ "sortorder ::= DESC", - /* 210 */ "sortorder ::=", - /* 211 */ "groupby_opt ::=", - /* 212 */ "groupby_opt ::= GROUP BY grouplist", - /* 213 */ "grouplist ::= grouplist COMMA item", - /* 214 */ "grouplist ::= item", - /* 215 */ "having_opt ::=", - /* 216 */ "having_opt ::= HAVING expr", - /* 217 */ "limit_opt ::=", - /* 218 */ "limit_opt ::= LIMIT signed", - /* 219 */ "limit_opt ::= LIMIT signed OFFSET signed", - /* 220 */ "limit_opt ::= LIMIT signed COMMA signed", - /* 221 */ "slimit_opt ::=", - /* 222 */ "slimit_opt ::= SLIMIT signed", - /* 223 */ "slimit_opt ::= SLIMIT signed SOFFSET signed", - /* 224 */ "slimit_opt ::= SLIMIT signed COMMA signed", - /* 225 */ "where_opt ::=", - /* 226 */ "where_opt ::= WHERE expr", - /* 227 */ "expr ::= LP expr RP", - /* 228 */ "expr ::= ID", - /* 229 */ "expr ::= ID DOT ID", - /* 230 */ "expr ::= ID DOT STAR", - /* 231 */ "expr ::= INTEGER", - /* 232 */ "expr ::= MINUS INTEGER", - /* 233 */ "expr ::= PLUS INTEGER", - /* 234 */ "expr ::= FLOAT", - /* 235 */ "expr ::= MINUS FLOAT", - /* 236 */ "expr ::= PLUS FLOAT", - /* 237 */ "expr ::= STRING", - /* 238 */ "expr ::= NOW", - /* 239 */ "expr ::= VARIABLE", - /* 240 */ "expr ::= PLUS VARIABLE", - /* 241 */ "expr ::= MINUS VARIABLE", - /* 242 */ "expr ::= BOOL", - /* 243 */ "expr ::= NULL", - /* 244 */ "expr ::= ID LP exprlist RP", - /* 245 */ "expr ::= ID LP STAR RP", - /* 246 */ "expr ::= expr IS NULL", - /* 247 */ "expr ::= expr IS NOT NULL", - /* 248 */ "expr ::= expr LT expr", - /* 249 */ "expr ::= expr GT expr", - /* 250 */ "expr ::= expr LE expr", - /* 251 */ "expr ::= expr GE expr", - /* 252 */ "expr ::= expr NE expr", - /* 253 */ "expr ::= expr EQ expr", - /* 254 */ "expr ::= expr BETWEEN expr AND expr", - /* 255 */ "expr ::= expr AND expr", - /* 256 */ "expr ::= expr OR expr", - /* 257 */ "expr ::= expr PLUS expr", - /* 258 */ "expr ::= expr MINUS expr", - /* 259 */ "expr ::= expr STAR expr", - /* 260 */ "expr ::= expr SLASH expr", - /* 261 */ "expr ::= expr REM expr", - /* 262 */ "expr ::= expr LIKE expr", - /* 263 */ "expr ::= expr MATCH expr", - /* 264 */ "expr ::= expr NMATCH expr", - /* 265 */ "expr ::= expr IN LP exprlist RP", - /* 266 */ "exprlist ::= exprlist COMMA expritem", - /* 267 */ "exprlist ::= expritem", - /* 268 */ "expritem ::= expr", - /* 269 */ "expritem ::=", - /* 270 */ "cmd ::= RESET QUERY CACHE", - /* 271 */ "cmd ::= SYNCDB ids REPLICA", - /* 272 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist", - /* 273 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", - /* 274 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist", - /* 275 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", - /* 276 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", - /* 277 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", - /* 278 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", - /* 279 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist", - /* 280 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", - /* 281 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", - /* 282 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist", - /* 283 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", - /* 284 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", - /* 285 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", - /* 286 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem", - /* 287 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist", - /* 288 */ "cmd ::= KILL CONNECTION INTEGER", - /* 289 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", - /* 290 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", + /* 151 */ "tagitem1 ::= MINUS FLOAT", + /* 152 */ "tagitem1 ::= PLUS INTEGER", + /* 153 */ "tagitem1 ::= PLUS FLOAT", + /* 154 */ "tagitem1 ::= INTEGER", + /* 155 */ "tagitem1 ::= FLOAT", + /* 156 */ "tagitem1 ::= STRING", + /* 157 */ "tagitem1 ::= BOOL", + /* 158 */ "tagitem1 ::= NULL", + /* 159 */ "tagitem1 ::= NOW", + /* 160 */ "tagitemlist ::= tagitemlist COMMA tagitem", + /* 161 */ "tagitemlist ::= tagitem", + /* 162 */ "tagitem ::= INTEGER", + /* 163 */ "tagitem ::= FLOAT", + /* 164 */ "tagitem ::= STRING", + /* 165 */ "tagitem ::= BOOL", + /* 166 */ "tagitem ::= NULL", + /* 167 */ "tagitem ::= NOW", + /* 168 */ "tagitem ::= MINUS INTEGER", + /* 169 */ "tagitem ::= MINUS FLOAT", + /* 170 */ "tagitem ::= PLUS INTEGER", + /* 171 */ "tagitem ::= PLUS FLOAT", + /* 172 */ "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", + /* 173 */ "select ::= LP select RP", + /* 174 */ "union ::= select", + /* 175 */ "union ::= union UNION ALL select", + /* 176 */ "union ::= union UNION select", + /* 177 */ "cmd ::= union", + /* 178 */ "select ::= SELECT selcollist", + /* 179 */ "sclp ::= selcollist COMMA", + /* 180 */ "sclp ::=", + /* 181 */ "selcollist ::= sclp distinct expr as", + /* 182 */ "selcollist ::= sclp STAR", + /* 183 */ "as ::= AS ids", + /* 184 */ "as ::= ids", + /* 185 */ "as ::=", + /* 186 */ "distinct ::= DISTINCT", + /* 187 */ "distinct ::=", + /* 188 */ "from ::= FROM tablelist", + /* 189 */ "from ::= FROM sub", + /* 190 */ "sub ::= LP union RP", + /* 191 */ "sub ::= LP union RP ids", + /* 192 */ "sub ::= sub COMMA LP union RP ids", + /* 193 */ "tablelist ::= ids cpxName", + /* 194 */ "tablelist ::= ids cpxName ids", + /* 195 */ "tablelist ::= tablelist COMMA ids cpxName", + /* 196 */ "tablelist ::= tablelist COMMA ids cpxName ids", + /* 197 */ "tmvar ::= VARIABLE", + /* 198 */ "interval_option ::= intervalKey LP tmvar RP", + /* 199 */ "interval_option ::= intervalKey LP tmvar COMMA tmvar RP", + /* 200 */ "interval_option ::=", + /* 201 */ "intervalKey ::= INTERVAL", + /* 202 */ "intervalKey ::= EVERY", + /* 203 */ "session_option ::=", + /* 204 */ "session_option ::= SESSION LP ids cpxName COMMA tmvar RP", + /* 205 */ "windowstate_option ::=", + /* 206 */ "windowstate_option ::= STATE_WINDOW LP ids RP", + /* 207 */ "fill_opt ::=", + /* 208 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP", + /* 209 */ "fill_opt ::= FILL LP ID RP", + /* 210 */ "sliding_opt ::= SLIDING LP tmvar RP", + /* 211 */ "sliding_opt ::=", + /* 212 */ "orderby_opt ::=", + /* 213 */ "orderby_opt ::= ORDER BY sortlist", + /* 214 */ "sortlist ::= sortlist COMMA item sortorder", + /* 215 */ "sortlist ::= item sortorder", + /* 216 */ "item ::= ids cpxName", + /* 217 */ "sortorder ::= ASC", + /* 218 */ "sortorder ::= DESC", + /* 219 */ "sortorder ::=", + /* 220 */ "groupby_opt ::=", + /* 221 */ "groupby_opt ::= GROUP BY grouplist", + /* 222 */ "grouplist ::= grouplist COMMA item", + /* 223 */ "grouplist ::= item", + /* 224 */ "having_opt ::=", + /* 225 */ "having_opt ::= HAVING expr", + /* 226 */ "limit_opt ::=", + /* 227 */ "limit_opt ::= LIMIT signed", + /* 228 */ "limit_opt ::= LIMIT signed OFFSET signed", + /* 229 */ "limit_opt ::= LIMIT signed COMMA signed", + /* 230 */ "slimit_opt ::=", + /* 231 */ "slimit_opt ::= SLIMIT signed", + /* 232 */ "slimit_opt ::= SLIMIT signed SOFFSET signed", + /* 233 */ "slimit_opt ::= SLIMIT signed COMMA signed", + /* 234 */ "where_opt ::=", + /* 235 */ "where_opt ::= WHERE expr", + /* 236 */ "expr ::= LP expr RP", + /* 237 */ "expr ::= ID", + /* 238 */ "expr ::= ID DOT ID", + /* 239 */ "expr ::= ID 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 ids cpxName ADD COLUMN columnlist", + /* 282 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids", + /* 283 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist", + /* 284 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist", + /* 285 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids", + /* 286 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids", + /* 287 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem", + /* 288 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist", + /* 289 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist", + /* 290 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids", + /* 291 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist", + /* 292 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist", + /* 293 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids", + /* 294 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids", + /* 295 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem", + /* 296 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist", + /* 297 */ "cmd ::= KILL CONNECTION INTEGER", + /* 298 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER", + /* 299 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER", }; #endif /* NDEBUG */ @@ -1988,146 +1999,155 @@ static const struct { { 243, -3 }, /* (148) tagitemlist1 ::= tagitemlist1 COMMA tagitem1 */ { 243, -1 }, /* (149) tagitemlist1 ::= tagitem1 */ { 247, -2 }, /* (150) tagitem1 ::= MINUS INTEGER */ - { 248, -3 }, /* (151) tagitemlist ::= tagitemlist COMMA tagitem */ - { 248, -1 }, /* (152) tagitemlist ::= tagitem */ - { 249, -1 }, /* (153) tagitem ::= INTEGER */ - { 249, -1 }, /* (154) tagitem ::= FLOAT */ - { 249, -1 }, /* (155) tagitem ::= STRING */ - { 249, -1 }, /* (156) tagitem ::= BOOL */ - { 249, -1 }, /* (157) tagitem ::= NULL */ - { 249, -1 }, /* (158) tagitem ::= NOW */ - { 249, -2 }, /* (159) tagitem ::= MINUS INTEGER */ - { 249, -2 }, /* (160) tagitem ::= MINUS FLOAT */ - { 249, -2 }, /* (161) tagitem ::= PLUS INTEGER */ - { 249, -2 }, /* (162) tagitem ::= PLUS FLOAT */ - { 245, -14 }, /* (163) 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 */ - { 245, -3 }, /* (164) select ::= LP select RP */ - { 263, -1 }, /* (165) union ::= select */ - { 263, -4 }, /* (166) union ::= union UNION ALL select */ - { 263, -3 }, /* (167) union ::= union UNION select */ - { 199, -1 }, /* (168) cmd ::= union */ - { 245, -2 }, /* (169) select ::= SELECT selcollist */ - { 264, -2 }, /* (170) sclp ::= selcollist COMMA */ - { 264, 0 }, /* (171) sclp ::= */ - { 250, -4 }, /* (172) selcollist ::= sclp distinct expr as */ - { 250, -2 }, /* (173) selcollist ::= sclp STAR */ - { 267, -2 }, /* (174) as ::= AS ids */ - { 267, -1 }, /* (175) as ::= ids */ - { 267, 0 }, /* (176) as ::= */ - { 265, -1 }, /* (177) distinct ::= DISTINCT */ - { 265, 0 }, /* (178) distinct ::= */ - { 251, -2 }, /* (179) from ::= FROM tablelist */ - { 251, -2 }, /* (180) from ::= FROM sub */ - { 269, -3 }, /* (181) sub ::= LP union RP */ - { 269, -4 }, /* (182) sub ::= LP union RP ids */ - { 269, -6 }, /* (183) sub ::= sub COMMA LP union RP ids */ - { 268, -2 }, /* (184) tablelist ::= ids cpxName */ - { 268, -3 }, /* (185) tablelist ::= ids cpxName ids */ - { 268, -4 }, /* (186) tablelist ::= tablelist COMMA ids cpxName */ - { 268, -5 }, /* (187) tablelist ::= tablelist COMMA ids cpxName ids */ - { 270, -1 }, /* (188) tmvar ::= VARIABLE */ - { 253, -4 }, /* (189) interval_option ::= intervalKey LP tmvar RP */ - { 253, -6 }, /* (190) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ - { 253, 0 }, /* (191) interval_option ::= */ - { 271, -1 }, /* (192) intervalKey ::= INTERVAL */ - { 271, -1 }, /* (193) intervalKey ::= EVERY */ - { 255, 0 }, /* (194) session_option ::= */ - { 255, -7 }, /* (195) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ - { 256, 0 }, /* (196) windowstate_option ::= */ - { 256, -4 }, /* (197) windowstate_option ::= STATE_WINDOW LP ids RP */ - { 257, 0 }, /* (198) fill_opt ::= */ - { 257, -6 }, /* (199) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ - { 257, -4 }, /* (200) fill_opt ::= FILL LP ID RP */ - { 254, -4 }, /* (201) sliding_opt ::= SLIDING LP tmvar RP */ - { 254, 0 }, /* (202) sliding_opt ::= */ - { 260, 0 }, /* (203) orderby_opt ::= */ - { 260, -3 }, /* (204) orderby_opt ::= ORDER BY sortlist */ - { 272, -4 }, /* (205) sortlist ::= sortlist COMMA item sortorder */ - { 272, -2 }, /* (206) sortlist ::= item sortorder */ - { 274, -2 }, /* (207) item ::= ids cpxName */ - { 275, -1 }, /* (208) sortorder ::= ASC */ - { 275, -1 }, /* (209) sortorder ::= DESC */ - { 275, 0 }, /* (210) sortorder ::= */ - { 258, 0 }, /* (211) groupby_opt ::= */ - { 258, -3 }, /* (212) groupby_opt ::= GROUP BY grouplist */ - { 276, -3 }, /* (213) grouplist ::= grouplist COMMA item */ - { 276, -1 }, /* (214) grouplist ::= item */ - { 259, 0 }, /* (215) having_opt ::= */ - { 259, -2 }, /* (216) having_opt ::= HAVING expr */ - { 262, 0 }, /* (217) limit_opt ::= */ - { 262, -2 }, /* (218) limit_opt ::= LIMIT signed */ - { 262, -4 }, /* (219) limit_opt ::= LIMIT signed OFFSET signed */ - { 262, -4 }, /* (220) limit_opt ::= LIMIT signed COMMA signed */ - { 261, 0 }, /* (221) slimit_opt ::= */ - { 261, -2 }, /* (222) slimit_opt ::= SLIMIT signed */ - { 261, -4 }, /* (223) slimit_opt ::= SLIMIT signed SOFFSET signed */ - { 261, -4 }, /* (224) slimit_opt ::= SLIMIT signed COMMA signed */ - { 252, 0 }, /* (225) where_opt ::= */ - { 252, -2 }, /* (226) where_opt ::= WHERE expr */ - { 266, -3 }, /* (227) expr ::= LP expr RP */ - { 266, -1 }, /* (228) expr ::= ID */ - { 266, -3 }, /* (229) expr ::= ID DOT ID */ - { 266, -3 }, /* (230) expr ::= ID DOT STAR */ - { 266, -1 }, /* (231) expr ::= INTEGER */ - { 266, -2 }, /* (232) expr ::= MINUS INTEGER */ - { 266, -2 }, /* (233) expr ::= PLUS INTEGER */ - { 266, -1 }, /* (234) expr ::= FLOAT */ - { 266, -2 }, /* (235) expr ::= MINUS FLOAT */ - { 266, -2 }, /* (236) expr ::= PLUS FLOAT */ - { 266, -1 }, /* (237) expr ::= STRING */ - { 266, -1 }, /* (238) expr ::= NOW */ - { 266, -1 }, /* (239) expr ::= VARIABLE */ - { 266, -2 }, /* (240) expr ::= PLUS VARIABLE */ - { 266, -2 }, /* (241) expr ::= MINUS VARIABLE */ - { 266, -1 }, /* (242) expr ::= BOOL */ - { 266, -1 }, /* (243) expr ::= NULL */ - { 266, -4 }, /* (244) expr ::= ID LP exprlist RP */ - { 266, -4 }, /* (245) expr ::= ID LP STAR RP */ - { 266, -3 }, /* (246) expr ::= expr IS NULL */ - { 266, -4 }, /* (247) expr ::= expr IS NOT NULL */ - { 266, -3 }, /* (248) expr ::= expr LT expr */ - { 266, -3 }, /* (249) expr ::= expr GT expr */ - { 266, -3 }, /* (250) expr ::= expr LE expr */ - { 266, -3 }, /* (251) expr ::= expr GE expr */ - { 266, -3 }, /* (252) expr ::= expr NE expr */ - { 266, -3 }, /* (253) expr ::= expr EQ expr */ - { 266, -5 }, /* (254) expr ::= expr BETWEEN expr AND expr */ - { 266, -3 }, /* (255) expr ::= expr AND expr */ - { 266, -3 }, /* (256) expr ::= expr OR expr */ - { 266, -3 }, /* (257) expr ::= expr PLUS expr */ - { 266, -3 }, /* (258) expr ::= expr MINUS expr */ - { 266, -3 }, /* (259) expr ::= expr STAR expr */ - { 266, -3 }, /* (260) expr ::= expr SLASH expr */ - { 266, -3 }, /* (261) expr ::= expr REM expr */ - { 266, -3 }, /* (262) expr ::= expr LIKE expr */ - { 266, -3 }, /* (263) expr ::= expr MATCH expr */ - { 266, -3 }, /* (264) expr ::= expr NMATCH expr */ - { 266, -5 }, /* (265) expr ::= expr IN LP exprlist RP */ - { 206, -3 }, /* (266) exprlist ::= exprlist COMMA expritem */ - { 206, -1 }, /* (267) exprlist ::= expritem */ - { 277, -1 }, /* (268) expritem ::= expr */ - { 277, 0 }, /* (269) expritem ::= */ - { 199, -3 }, /* (270) cmd ::= RESET QUERY CACHE */ - { 199, -3 }, /* (271) cmd ::= SYNCDB ids REPLICA */ - { 199, -7 }, /* (272) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ - { 199, -7 }, /* (273) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ - { 199, -7 }, /* (274) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ - { 199, -7 }, /* (275) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ - { 199, -7 }, /* (276) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ - { 199, -8 }, /* (277) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ - { 199, -9 }, /* (278) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ - { 199, -7 }, /* (279) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ - { 199, -7 }, /* (280) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ - { 199, -7 }, /* (281) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ - { 199, -7 }, /* (282) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ - { 199, -7 }, /* (283) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ - { 199, -7 }, /* (284) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ - { 199, -8 }, /* (285) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ - { 199, -9 }, /* (286) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ - { 199, -7 }, /* (287) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ - { 199, -3 }, /* (288) cmd ::= KILL CONNECTION INTEGER */ - { 199, -5 }, /* (289) cmd ::= KILL STREAM INTEGER COLON INTEGER */ - { 199, -5 }, /* (290) cmd ::= KILL QUERY INTEGER COLON INTEGER */ + { 247, -2 }, /* (151) tagitem1 ::= MINUS FLOAT */ + { 247, -2 }, /* (152) tagitem1 ::= PLUS INTEGER */ + { 247, -2 }, /* (153) tagitem1 ::= PLUS FLOAT */ + { 247, -1 }, /* (154) tagitem1 ::= INTEGER */ + { 247, -1 }, /* (155) tagitem1 ::= FLOAT */ + { 247, -1 }, /* (156) tagitem1 ::= STRING */ + { 247, -1 }, /* (157) tagitem1 ::= BOOL */ + { 247, -1 }, /* (158) tagitem1 ::= NULL */ + { 247, -1 }, /* (159) tagitem1 ::= NOW */ + { 248, -3 }, /* (160) tagitemlist ::= tagitemlist COMMA tagitem */ + { 248, -1 }, /* (161) tagitemlist ::= tagitem */ + { 249, -1 }, /* (162) tagitem ::= INTEGER */ + { 249, -1 }, /* (163) tagitem ::= FLOAT */ + { 249, -1 }, /* (164) tagitem ::= STRING */ + { 249, -1 }, /* (165) tagitem ::= BOOL */ + { 249, -1 }, /* (166) tagitem ::= NULL */ + { 249, -1 }, /* (167) tagitem ::= NOW */ + { 249, -2 }, /* (168) tagitem ::= MINUS INTEGER */ + { 249, -2 }, /* (169) tagitem ::= MINUS FLOAT */ + { 249, -2 }, /* (170) tagitem ::= PLUS INTEGER */ + { 249, -2 }, /* (171) tagitem ::= PLUS FLOAT */ + { 245, -14 }, /* (172) 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 */ + { 245, -3 }, /* (173) select ::= LP select RP */ + { 263, -1 }, /* (174) union ::= select */ + { 263, -4 }, /* (175) union ::= union UNION ALL select */ + { 263, -3 }, /* (176) union ::= union UNION select */ + { 199, -1 }, /* (177) cmd ::= union */ + { 245, -2 }, /* (178) select ::= SELECT selcollist */ + { 264, -2 }, /* (179) sclp ::= selcollist COMMA */ + { 264, 0 }, /* (180) sclp ::= */ + { 250, -4 }, /* (181) selcollist ::= sclp distinct expr as */ + { 250, -2 }, /* (182) selcollist ::= sclp STAR */ + { 267, -2 }, /* (183) as ::= AS ids */ + { 267, -1 }, /* (184) as ::= ids */ + { 267, 0 }, /* (185) as ::= */ + { 265, -1 }, /* (186) distinct ::= DISTINCT */ + { 265, 0 }, /* (187) distinct ::= */ + { 251, -2 }, /* (188) from ::= FROM tablelist */ + { 251, -2 }, /* (189) from ::= FROM sub */ + { 269, -3 }, /* (190) sub ::= LP union RP */ + { 269, -4 }, /* (191) sub ::= LP union RP ids */ + { 269, -6 }, /* (192) sub ::= sub COMMA LP union RP ids */ + { 268, -2 }, /* (193) tablelist ::= ids cpxName */ + { 268, -3 }, /* (194) tablelist ::= ids cpxName ids */ + { 268, -4 }, /* (195) tablelist ::= tablelist COMMA ids cpxName */ + { 268, -5 }, /* (196) tablelist ::= tablelist COMMA ids cpxName ids */ + { 270, -1 }, /* (197) tmvar ::= VARIABLE */ + { 253, -4 }, /* (198) interval_option ::= intervalKey LP tmvar RP */ + { 253, -6 }, /* (199) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ + { 253, 0 }, /* (200) interval_option ::= */ + { 271, -1 }, /* (201) intervalKey ::= INTERVAL */ + { 271, -1 }, /* (202) intervalKey ::= EVERY */ + { 255, 0 }, /* (203) session_option ::= */ + { 255, -7 }, /* (204) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ + { 256, 0 }, /* (205) windowstate_option ::= */ + { 256, -4 }, /* (206) windowstate_option ::= STATE_WINDOW LP ids RP */ + { 257, 0 }, /* (207) fill_opt ::= */ + { 257, -6 }, /* (208) fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + { 257, -4 }, /* (209) fill_opt ::= FILL LP ID RP */ + { 254, -4 }, /* (210) sliding_opt ::= SLIDING LP tmvar RP */ + { 254, 0 }, /* (211) sliding_opt ::= */ + { 260, 0 }, /* (212) orderby_opt ::= */ + { 260, -3 }, /* (213) orderby_opt ::= ORDER BY sortlist */ + { 272, -4 }, /* (214) sortlist ::= sortlist COMMA item sortorder */ + { 272, -2 }, /* (215) sortlist ::= item sortorder */ + { 274, -2 }, /* (216) item ::= ids cpxName */ + { 275, -1 }, /* (217) sortorder ::= ASC */ + { 275, -1 }, /* (218) sortorder ::= DESC */ + { 275, 0 }, /* (219) sortorder ::= */ + { 258, 0 }, /* (220) groupby_opt ::= */ + { 258, -3 }, /* (221) groupby_opt ::= GROUP BY grouplist */ + { 276, -3 }, /* (222) grouplist ::= grouplist COMMA item */ + { 276, -1 }, /* (223) grouplist ::= item */ + { 259, 0 }, /* (224) having_opt ::= */ + { 259, -2 }, /* (225) having_opt ::= HAVING expr */ + { 262, 0 }, /* (226) limit_opt ::= */ + { 262, -2 }, /* (227) limit_opt ::= LIMIT signed */ + { 262, -4 }, /* (228) limit_opt ::= LIMIT signed OFFSET signed */ + { 262, -4 }, /* (229) limit_opt ::= LIMIT signed COMMA signed */ + { 261, 0 }, /* (230) slimit_opt ::= */ + { 261, -2 }, /* (231) slimit_opt ::= SLIMIT signed */ + { 261, -4 }, /* (232) slimit_opt ::= SLIMIT signed SOFFSET signed */ + { 261, -4 }, /* (233) slimit_opt ::= SLIMIT signed COMMA signed */ + { 252, 0 }, /* (234) where_opt ::= */ + { 252, -2 }, /* (235) where_opt ::= WHERE expr */ + { 266, -3 }, /* (236) expr ::= LP expr RP */ + { 266, -1 }, /* (237) expr ::= ID */ + { 266, -3 }, /* (238) expr ::= ID DOT ID */ + { 266, -3 }, /* (239) expr ::= ID DOT STAR */ + { 266, -1 }, /* (240) expr ::= INTEGER */ + { 266, -2 }, /* (241) expr ::= MINUS INTEGER */ + { 266, -2 }, /* (242) expr ::= PLUS INTEGER */ + { 266, -1 }, /* (243) expr ::= FLOAT */ + { 266, -2 }, /* (244) expr ::= MINUS FLOAT */ + { 266, -2 }, /* (245) expr ::= PLUS FLOAT */ + { 266, -1 }, /* (246) expr ::= STRING */ + { 266, -1 }, /* (247) expr ::= NOW */ + { 266, -1 }, /* (248) expr ::= VARIABLE */ + { 266, -2 }, /* (249) expr ::= PLUS VARIABLE */ + { 266, -2 }, /* (250) expr ::= MINUS VARIABLE */ + { 266, -1 }, /* (251) expr ::= BOOL */ + { 266, -1 }, /* (252) expr ::= NULL */ + { 266, -4 }, /* (253) expr ::= ID LP exprlist RP */ + { 266, -4 }, /* (254) expr ::= ID LP STAR RP */ + { 266, -3 }, /* (255) expr ::= expr IS NULL */ + { 266, -4 }, /* (256) expr ::= expr IS NOT NULL */ + { 266, -3 }, /* (257) expr ::= expr LT expr */ + { 266, -3 }, /* (258) expr ::= expr GT expr */ + { 266, -3 }, /* (259) expr ::= expr LE expr */ + { 266, -3 }, /* (260) expr ::= expr GE expr */ + { 266, -3 }, /* (261) expr ::= expr NE expr */ + { 266, -3 }, /* (262) expr ::= expr EQ expr */ + { 266, -5 }, /* (263) expr ::= expr BETWEEN expr AND expr */ + { 266, -3 }, /* (264) expr ::= expr AND expr */ + { 266, -3 }, /* (265) expr ::= expr OR expr */ + { 266, -3 }, /* (266) expr ::= expr PLUS expr */ + { 266, -3 }, /* (267) expr ::= expr MINUS expr */ + { 266, -3 }, /* (268) expr ::= expr STAR expr */ + { 266, -3 }, /* (269) expr ::= expr SLASH expr */ + { 266, -3 }, /* (270) expr ::= expr REM expr */ + { 266, -3 }, /* (271) expr ::= expr LIKE expr */ + { 266, -3 }, /* (272) expr ::= expr MATCH expr */ + { 266, -3 }, /* (273) expr ::= expr NMATCH expr */ + { 266, -5 }, /* (274) expr ::= expr IN LP exprlist RP */ + { 206, -3 }, /* (275) exprlist ::= exprlist COMMA expritem */ + { 206, -1 }, /* (276) exprlist ::= expritem */ + { 277, -1 }, /* (277) expritem ::= expr */ + { 277, 0 }, /* (278) expritem ::= */ + { 199, -3 }, /* (279) cmd ::= RESET QUERY CACHE */ + { 199, -3 }, /* (280) cmd ::= SYNCDB ids REPLICA */ + { 199, -7 }, /* (281) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + { 199, -7 }, /* (282) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + { 199, -7 }, /* (283) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ + { 199, -7 }, /* (284) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + { 199, -7 }, /* (285) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + { 199, -8 }, /* (286) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + { 199, -9 }, /* (287) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + { 199, -7 }, /* (288) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ + { 199, -7 }, /* (289) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + { 199, -7 }, /* (290) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + { 199, -7 }, /* (291) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ + { 199, -7 }, /* (292) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + { 199, -7 }, /* (293) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + { 199, -8 }, /* (294) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + { 199, -9 }, /* (295) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ + { 199, -7 }, /* (296) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ + { 199, -3 }, /* (297) cmd ::= KILL CONNECTION INTEGER */ + { 199, -5 }, /* (298) cmd ::= KILL STREAM INTEGER COLON INTEGER */ + { 199, -5 }, /* (299) cmd ::= KILL QUERY INTEGER COLON INTEGER */ }; static void yy_accept(yyParser*); /* Forward Declaration */ @@ -2407,7 +2427,7 @@ static void yy_reduce( break; case 54: /* ifexists ::= */ case 56: /* ifnotexists ::= */ yytestcase(yyruleno==56); - case 178: /* distinct ::= */ yytestcase(yyruleno==178); + case 187: /* distinct ::= */ yytestcase(yyruleno==187); { yymsp[1].minor.yy0.n = 0;} break; case 55: /* ifnotexists ::= IF NOT EXISTS */ @@ -2470,20 +2490,20 @@ static void yy_reduce( yymsp[-8].minor.yy171 = yylhsminor.yy171; break; case 84: /* intitemlist ::= intitemlist COMMA intitem */ - case 151: /* tagitemlist ::= tagitemlist COMMA tagitem */ yytestcase(yyruleno==151); + case 160: /* tagitemlist ::= tagitemlist COMMA tagitem */ yytestcase(yyruleno==160); { yylhsminor.yy421 = tListItemAppend(yymsp[-2].minor.yy421, &yymsp[0].minor.yy69, -1); } yymsp[-2].minor.yy421 = yylhsminor.yy421; break; case 85: /* intitemlist ::= intitem */ - case 152: /* tagitemlist ::= tagitem */ yytestcase(yyruleno==152); + case 161: /* tagitemlist ::= tagitem */ yytestcase(yyruleno==161); { yylhsminor.yy421 = tListItemAppend(NULL, &yymsp[0].minor.yy69, -1); } yymsp[0].minor.yy421 = yylhsminor.yy421; break; case 86: /* intitem ::= INTEGER */ - case 153: /* tagitem ::= INTEGER */ yytestcase(yyruleno==153); - case 154: /* tagitem ::= FLOAT */ yytestcase(yyruleno==154); - case 155: /* tagitem ::= STRING */ yytestcase(yyruleno==155); - case 156: /* tagitem ::= BOOL */ yytestcase(yyruleno==156); + case 162: /* tagitem ::= INTEGER */ yytestcase(yyruleno==162); + case 163: /* tagitem ::= FLOAT */ yytestcase(yyruleno==163); + case 164: /* tagitem ::= STRING */ yytestcase(yyruleno==164); + case 165: /* tagitem ::= BOOL */ yytestcase(yyruleno==165); { toTSDBType(yymsp[0].minor.yy0.type); taosVariantCreate(&yylhsminor.yy69, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.type); } yymsp[0].minor.yy69 = yylhsminor.yy69; break; @@ -2714,21 +2734,33 @@ static void yy_reduce( yymsp[0].minor.yy421 = yylhsminor.yy421; break; case 150: /* tagitem1 ::= MINUS INTEGER */ + case 151: /* tagitem1 ::= MINUS FLOAT */ yytestcase(yyruleno==151); + case 152: /* tagitem1 ::= PLUS INTEGER */ yytestcase(yyruleno==152); + case 153: /* tagitem1 ::= PLUS FLOAT */ yytestcase(yyruleno==153); { yylhsminor.yy0.n = yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n; yylhsminor.yy0.type = yymsp[0].minor.yy0.type; } yymsp[-1].minor.yy0 = yylhsminor.yy0; break; - case 157: /* tagitem ::= NULL */ + case 154: /* tagitem1 ::= INTEGER */ + case 155: /* tagitem1 ::= FLOAT */ yytestcase(yyruleno==155); + case 156: /* tagitem1 ::= STRING */ yytestcase(yyruleno==156); + case 157: /* tagitem1 ::= BOOL */ yytestcase(yyruleno==157); + case 158: /* tagitem1 ::= NULL */ yytestcase(yyruleno==158); + case 159: /* tagitem1 ::= NOW */ yytestcase(yyruleno==159); +{ yylhsminor.yy0 = yymsp[0].minor.yy0; } + yymsp[0].minor.yy0 = yylhsminor.yy0; + break; + case 166: /* tagitem ::= NULL */ { yymsp[0].minor.yy0.type = 0; taosVariantCreate(&yylhsminor.yy69, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.type); } yymsp[0].minor.yy69 = yylhsminor.yy69; break; - case 158: /* tagitem ::= NOW */ + case 167: /* tagitem ::= NOW */ { yymsp[0].minor.yy0.type = TSDB_DATA_TYPE_TIMESTAMP; taosVariantCreate(&yylhsminor.yy69, yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n, yymsp[0].minor.yy0.type);} yymsp[0].minor.yy69 = yylhsminor.yy69; break; - case 159: /* tagitem ::= MINUS INTEGER */ - case 160: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==160); - case 161: /* tagitem ::= PLUS INTEGER */ yytestcase(yyruleno==161); - case 162: /* tagitem ::= PLUS FLOAT */ yytestcase(yyruleno==162); + case 168: /* tagitem ::= MINUS INTEGER */ + case 169: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==169); + case 170: /* tagitem ::= PLUS INTEGER */ yytestcase(yyruleno==170); + case 171: /* tagitem ::= PLUS FLOAT */ yytestcase(yyruleno==171); { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = yymsp[0].minor.yy0.type; @@ -2737,154 +2769,154 @@ static void yy_reduce( } yymsp[-1].minor.yy69 = yylhsminor.yy69; break; - case 163: /* 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 172: /* select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */ { yylhsminor.yy56 = tSetQuerySqlNode(&yymsp[-13].minor.yy0, yymsp[-12].minor.yy421, yymsp[-11].minor.yy8, yymsp[-10].minor.yy439, yymsp[-4].minor.yy421, yymsp[-2].minor.yy421, &yymsp[-9].minor.yy400, &yymsp[-7].minor.yy147, &yymsp[-6].minor.yy40, &yymsp[-8].minor.yy0, yymsp[-5].minor.yy421, &yymsp[0].minor.yy231, &yymsp[-1].minor.yy231, yymsp[-3].minor.yy439); } yymsp[-13].minor.yy56 = yylhsminor.yy56; break; - case 164: /* select ::= LP select RP */ + case 173: /* select ::= LP select RP */ {yymsp[-2].minor.yy56 = yymsp[-1].minor.yy56;} break; - case 165: /* union ::= select */ + case 174: /* union ::= select */ { yylhsminor.yy149 = setSubclause(NULL, yymsp[0].minor.yy56); } yymsp[0].minor.yy149 = yylhsminor.yy149; break; - case 166: /* union ::= union UNION ALL select */ + case 175: /* union ::= union UNION ALL select */ { yylhsminor.yy149 = appendSelectClause(yymsp[-3].minor.yy149, SQL_TYPE_UNIONALL, yymsp[0].minor.yy56); } yymsp[-3].minor.yy149 = yylhsminor.yy149; break; - case 167: /* union ::= union UNION select */ + case 176: /* union ::= union UNION select */ { yylhsminor.yy149 = appendSelectClause(yymsp[-2].minor.yy149, SQL_TYPE_UNION, yymsp[0].minor.yy56); } yymsp[-2].minor.yy149 = yylhsminor.yy149; break; - case 168: /* cmd ::= union */ + case 177: /* cmd ::= union */ { setSqlInfo(pInfo, yymsp[0].minor.yy149, NULL, TSDB_SQL_SELECT); } break; - case 169: /* select ::= SELECT selcollist */ + case 178: /* select ::= SELECT selcollist */ { yylhsminor.yy56 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy421, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); } yymsp[-1].minor.yy56 = yylhsminor.yy56; break; - case 170: /* sclp ::= selcollist COMMA */ + case 179: /* sclp ::= selcollist COMMA */ {yylhsminor.yy421 = yymsp[-1].minor.yy421;} yymsp[-1].minor.yy421 = yylhsminor.yy421; break; - case 171: /* sclp ::= */ - case 203: /* orderby_opt ::= */ yytestcase(yyruleno==203); + case 180: /* sclp ::= */ + case 212: /* orderby_opt ::= */ yytestcase(yyruleno==212); {yymsp[1].minor.yy421 = 0;} break; - case 172: /* selcollist ::= sclp distinct expr as */ + case 181: /* selcollist ::= sclp distinct expr as */ { yylhsminor.yy421 = tSqlExprListAppend(yymsp[-3].minor.yy421, yymsp[-1].minor.yy439, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0); } yymsp[-3].minor.yy421 = yylhsminor.yy421; break; - case 173: /* selcollist ::= sclp STAR */ + case 182: /* selcollist ::= sclp STAR */ { tSqlExpr *pNode = tSqlExprCreateIdValue(NULL, TK_ALL); yylhsminor.yy421 = tSqlExprListAppend(yymsp[-1].minor.yy421, pNode, 0, 0); } yymsp[-1].minor.yy421 = yylhsminor.yy421; break; - case 174: /* as ::= AS ids */ + case 183: /* as ::= AS ids */ { yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; } break; - case 175: /* as ::= ids */ + case 184: /* as ::= ids */ { yylhsminor.yy0 = yymsp[0].minor.yy0; } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 176: /* as ::= */ + case 185: /* as ::= */ { yymsp[1].minor.yy0.n = 0; } break; - case 177: /* distinct ::= DISTINCT */ + case 186: /* distinct ::= DISTINCT */ { yylhsminor.yy0 = yymsp[0].minor.yy0; } yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 179: /* from ::= FROM tablelist */ - case 180: /* from ::= FROM sub */ yytestcase(yyruleno==180); + case 188: /* from ::= FROM tablelist */ + case 189: /* from ::= FROM sub */ yytestcase(yyruleno==189); {yymsp[-1].minor.yy8 = yymsp[0].minor.yy8;} break; - case 181: /* sub ::= LP union RP */ + case 190: /* sub ::= LP union RP */ {yymsp[-2].minor.yy8 = addSubquery(NULL, yymsp[-1].minor.yy149, NULL);} break; - case 182: /* sub ::= LP union RP ids */ + case 191: /* sub ::= LP union RP ids */ {yymsp[-3].minor.yy8 = addSubquery(NULL, yymsp[-2].minor.yy149, &yymsp[0].minor.yy0);} break; - case 183: /* sub ::= sub COMMA LP union RP ids */ + case 192: /* sub ::= sub COMMA LP union RP ids */ {yylhsminor.yy8 = addSubquery(yymsp[-5].minor.yy8, yymsp[-2].minor.yy149, &yymsp[0].minor.yy0);} yymsp[-5].minor.yy8 = yylhsminor.yy8; break; - case 184: /* tablelist ::= ids cpxName */ + case 193: /* tablelist ::= ids cpxName */ { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yylhsminor.yy8 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL); } yymsp[-1].minor.yy8 = yylhsminor.yy8; break; - case 185: /* tablelist ::= ids cpxName ids */ + case 194: /* tablelist ::= ids cpxName ids */ { yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; yylhsminor.yy8 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } yymsp[-2].minor.yy8 = yylhsminor.yy8; break; - case 186: /* tablelist ::= tablelist COMMA ids cpxName */ + case 195: /* tablelist ::= tablelist COMMA ids cpxName */ { yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yylhsminor.yy8 = setTableNameList(yymsp[-3].minor.yy8, &yymsp[-1].minor.yy0, NULL); } yymsp[-3].minor.yy8 = yylhsminor.yy8; break; - case 187: /* tablelist ::= tablelist COMMA ids cpxName ids */ + case 196: /* tablelist ::= tablelist COMMA ids cpxName ids */ { yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n; yylhsminor.yy8 = setTableNameList(yymsp[-4].minor.yy8, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } yymsp[-4].minor.yy8 = yylhsminor.yy8; break; - case 188: /* tmvar ::= VARIABLE */ + case 197: /* tmvar ::= VARIABLE */ {yylhsminor.yy0 = yymsp[0].minor.yy0;} yymsp[0].minor.yy0 = yylhsminor.yy0; break; - case 189: /* interval_option ::= intervalKey LP tmvar RP */ + case 198: /* 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 190: /* interval_option ::= intervalKey LP tmvar COMMA tmvar RP */ + case 199: /* 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 191: /* interval_option ::= */ + case 200: /* interval_option ::= */ {memset(&yymsp[1].minor.yy400, 0, sizeof(yymsp[1].minor.yy400));} break; - case 192: /* intervalKey ::= INTERVAL */ + case 201: /* intervalKey ::= INTERVAL */ {yymsp[0].minor.yy104 = TK_INTERVAL;} break; - case 193: /* intervalKey ::= EVERY */ + case 202: /* intervalKey ::= EVERY */ {yymsp[0].minor.yy104 = TK_EVERY; } break; - case 194: /* session_option ::= */ + case 203: /* session_option ::= */ {yymsp[1].minor.yy147.col.n = 0; yymsp[1].minor.yy147.gap.n = 0;} break; - case 195: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ + case 204: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; yymsp[-6].minor.yy147.col = yymsp[-4].minor.yy0; yymsp[-6].minor.yy147.gap = yymsp[-1].minor.yy0; } break; - case 196: /* windowstate_option ::= */ + case 205: /* windowstate_option ::= */ { yymsp[1].minor.yy40.col.n = 0; yymsp[1].minor.yy40.col.z = NULL;} break; - case 197: /* windowstate_option ::= STATE_WINDOW LP ids RP */ + case 206: /* windowstate_option ::= STATE_WINDOW LP ids RP */ { yymsp[-3].minor.yy40.col = yymsp[-1].minor.yy0; } break; - case 198: /* fill_opt ::= */ + case 207: /* fill_opt ::= */ { yymsp[1].minor.yy421 = 0; } break; - case 199: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ + case 208: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */ { SVariant A = {0}; toTSDBType(yymsp[-3].minor.yy0.type); @@ -2894,34 +2926,34 @@ static void yy_reduce( yymsp[-5].minor.yy421 = yymsp[-1].minor.yy421; } break; - case 200: /* fill_opt ::= FILL LP ID RP */ + case 209: /* fill_opt ::= FILL LP ID RP */ { toTSDBType(yymsp[-1].minor.yy0.type); yymsp[-3].minor.yy421 = tListItemAppendToken(NULL, &yymsp[-1].minor.yy0, -1); } break; - case 201: /* sliding_opt ::= SLIDING LP tmvar RP */ + case 210: /* sliding_opt ::= SLIDING LP tmvar RP */ {yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0; } break; - case 202: /* sliding_opt ::= */ + case 211: /* sliding_opt ::= */ {yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = NULL; yymsp[1].minor.yy0.type = 0; } break; - case 204: /* orderby_opt ::= ORDER BY sortlist */ + case 213: /* orderby_opt ::= ORDER BY sortlist */ {yymsp[-2].minor.yy421 = yymsp[0].minor.yy421;} break; - case 205: /* sortlist ::= sortlist COMMA item sortorder */ + case 214: /* sortlist ::= sortlist COMMA item sortorder */ { yylhsminor.yy421 = tListItemAppend(yymsp[-3].minor.yy421, &yymsp[-1].minor.yy69, yymsp[0].minor.yy96); } yymsp[-3].minor.yy421 = yylhsminor.yy421; break; - case 206: /* sortlist ::= item sortorder */ + case 215: /* sortlist ::= item sortorder */ { yylhsminor.yy421 = tListItemAppend(NULL, &yymsp[-1].minor.yy69, yymsp[0].minor.yy96); } yymsp[-1].minor.yy421 = yylhsminor.yy421; break; - case 207: /* item ::= ids cpxName */ + case 216: /* item ::= ids cpxName */ { toTSDBType(yymsp[-1].minor.yy0.type); yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; @@ -2930,235 +2962,235 @@ static void yy_reduce( } yymsp[-1].minor.yy69 = yylhsminor.yy69; break; - case 208: /* sortorder ::= ASC */ + case 217: /* sortorder ::= ASC */ { yymsp[0].minor.yy96 = TSDB_ORDER_ASC; } break; - case 209: /* sortorder ::= DESC */ + case 218: /* sortorder ::= DESC */ { yymsp[0].minor.yy96 = TSDB_ORDER_DESC;} break; - case 210: /* sortorder ::= */ + case 219: /* sortorder ::= */ { yymsp[1].minor.yy96 = TSDB_ORDER_ASC; } break; - case 211: /* groupby_opt ::= */ + case 220: /* groupby_opt ::= */ { yymsp[1].minor.yy421 = 0;} break; - case 212: /* groupby_opt ::= GROUP BY grouplist */ + case 221: /* groupby_opt ::= GROUP BY grouplist */ { yymsp[-2].minor.yy421 = yymsp[0].minor.yy421;} break; - case 213: /* grouplist ::= grouplist COMMA item */ + case 222: /* grouplist ::= grouplist COMMA item */ { yylhsminor.yy421 = tListItemAppend(yymsp[-2].minor.yy421, &yymsp[0].minor.yy69, -1); } yymsp[-2].minor.yy421 = yylhsminor.yy421; break; - case 214: /* grouplist ::= item */ + case 223: /* grouplist ::= item */ { yylhsminor.yy421 = tListItemAppend(NULL, &yymsp[0].minor.yy69, -1); } yymsp[0].minor.yy421 = yylhsminor.yy421; break; - case 215: /* having_opt ::= */ - case 225: /* where_opt ::= */ yytestcase(yyruleno==225); - case 269: /* expritem ::= */ yytestcase(yyruleno==269); + case 224: /* having_opt ::= */ + case 234: /* where_opt ::= */ yytestcase(yyruleno==234); + case 278: /* expritem ::= */ yytestcase(yyruleno==278); {yymsp[1].minor.yy439 = 0;} break; - case 216: /* having_opt ::= HAVING expr */ - case 226: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==226); + case 225: /* having_opt ::= HAVING expr */ + case 235: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==235); {yymsp[-1].minor.yy439 = yymsp[0].minor.yy439;} break; - case 217: /* limit_opt ::= */ - case 221: /* slimit_opt ::= */ yytestcase(yyruleno==221); + case 226: /* limit_opt ::= */ + case 230: /* slimit_opt ::= */ yytestcase(yyruleno==230); {yymsp[1].minor.yy231.limit = -1; yymsp[1].minor.yy231.offset = 0;} break; - case 218: /* limit_opt ::= LIMIT signed */ - case 222: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==222); + case 227: /* limit_opt ::= LIMIT signed */ + case 231: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==231); {yymsp[-1].minor.yy231.limit = yymsp[0].minor.yy325; yymsp[-1].minor.yy231.offset = 0;} break; - case 219: /* limit_opt ::= LIMIT signed OFFSET signed */ + case 228: /* limit_opt ::= LIMIT signed OFFSET signed */ { yymsp[-3].minor.yy231.limit = yymsp[-2].minor.yy325; yymsp[-3].minor.yy231.offset = yymsp[0].minor.yy325;} break; - case 220: /* limit_opt ::= LIMIT signed COMMA signed */ + case 229: /* limit_opt ::= LIMIT signed COMMA signed */ { yymsp[-3].minor.yy231.limit = yymsp[0].minor.yy325; yymsp[-3].minor.yy231.offset = yymsp[-2].minor.yy325;} break; - case 223: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ + case 232: /* slimit_opt ::= SLIMIT signed SOFFSET signed */ {yymsp[-3].minor.yy231.limit = yymsp[-2].minor.yy325; yymsp[-3].minor.yy231.offset = yymsp[0].minor.yy325;} break; - case 224: /* slimit_opt ::= SLIMIT signed COMMA signed */ + case 233: /* slimit_opt ::= SLIMIT signed COMMA signed */ {yymsp[-3].minor.yy231.limit = yymsp[0].minor.yy325; yymsp[-3].minor.yy231.offset = yymsp[-2].minor.yy325;} break; - case 227: /* expr ::= LP expr RP */ + case 236: /* 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 228: /* expr ::= ID */ + case 237: /* expr ::= ID */ { yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_ID);} yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 229: /* expr ::= ID DOT ID */ + case 238: /* 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 230: /* expr ::= ID DOT STAR */ + case 239: /* 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 231: /* expr ::= INTEGER */ + case 240: /* expr ::= INTEGER */ { yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_INTEGER);} yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 232: /* expr ::= MINUS INTEGER */ - case 233: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==233); + 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.yy439 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_INTEGER);} yymsp[-1].minor.yy439 = yylhsminor.yy439; break; - case 234: /* expr ::= FLOAT */ + case 243: /* expr ::= FLOAT */ { yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_FLOAT);} yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 235: /* expr ::= MINUS FLOAT */ - case 236: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==236); + 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.yy439 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_FLOAT);} yymsp[-1].minor.yy439 = yylhsminor.yy439; break; - case 237: /* expr ::= STRING */ + case 246: /* expr ::= STRING */ { yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_STRING);} yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 238: /* expr ::= NOW */ + case 247: /* expr ::= NOW */ { yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NOW); } yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 239: /* expr ::= VARIABLE */ + case 248: /* expr ::= VARIABLE */ { yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);} yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 240: /* expr ::= PLUS VARIABLE */ - case 241: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==241); + 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.yy439 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_VARIABLE);} yymsp[-1].minor.yy439 = yylhsminor.yy439; break; - case 242: /* expr ::= BOOL */ + case 251: /* expr ::= BOOL */ { yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);} yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 243: /* expr ::= NULL */ + case 252: /* expr ::= NULL */ { yylhsminor.yy439 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);} yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 244: /* expr ::= ID LP exprlist RP */ + case 253: /* expr ::= ID LP exprlist RP */ { tRecordFuncName(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 245: /* expr ::= ID LP STAR RP */ + case 254: /* expr ::= ID LP STAR RP */ { tRecordFuncName(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 246: /* expr ::= expr IS NULL */ + case 255: /* expr ::= expr IS NULL */ {yylhsminor.yy439 = tSqlExprCreate(yymsp[-2].minor.yy439, NULL, TK_ISNULL);} yymsp[-2].minor.yy439 = yylhsminor.yy439; break; - case 247: /* expr ::= expr IS NOT NULL */ + case 256: /* expr ::= expr IS NOT NULL */ {yylhsminor.yy439 = tSqlExprCreate(yymsp[-3].minor.yy439, NULL, TK_NOTNULL);} yymsp[-3].minor.yy439 = yylhsminor.yy439; break; - case 248: /* expr ::= expr LT expr */ + case 257: /* 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 249: /* expr ::= expr GT expr */ + case 258: /* 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 250: /* expr ::= expr LE expr */ + case 259: /* 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 251: /* expr ::= expr GE expr */ + case 260: /* 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 252: /* expr ::= expr NE expr */ + case 261: /* 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 253: /* expr ::= expr EQ expr */ + case 262: /* 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 254: /* expr ::= expr BETWEEN expr AND expr */ + case 263: /* 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 255: /* expr ::= expr AND expr */ + case 264: /* 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 256: /* expr ::= expr OR expr */ + case 265: /* 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 257: /* expr ::= expr PLUS expr */ + case 266: /* 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 258: /* expr ::= expr MINUS expr */ + case 267: /* 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 259: /* expr ::= expr STAR expr */ + case 268: /* 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 260: /* expr ::= expr SLASH expr */ + case 269: /* 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 261: /* expr ::= expr REM expr */ + case 270: /* 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 262: /* expr ::= expr LIKE expr */ + case 271: /* 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 263: /* expr ::= expr MATCH expr */ + case 272: /* 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 264: /* expr ::= expr NMATCH expr */ + case 273: /* 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 265: /* expr ::= expr IN LP exprlist RP */ + case 274: /* 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 266: /* exprlist ::= exprlist COMMA expritem */ + case 275: /* 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 267: /* exprlist ::= expritem */ + case 276: /* exprlist ::= expritem */ {yylhsminor.yy421 = tSqlExprListAppend(0,yymsp[0].minor.yy439,0, 0);} yymsp[0].minor.yy421 = yylhsminor.yy421; break; - case 268: /* expritem ::= expr */ + case 277: /* expritem ::= expr */ {yylhsminor.yy439 = yymsp[0].minor.yy439;} yymsp[0].minor.yy439 = yylhsminor.yy439; break; - case 270: /* cmd ::= RESET QUERY CACHE */ + case 279: /* cmd ::= RESET QUERY CACHE */ { setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);} break; - case 271: /* cmd ::= SYNCDB ids REPLICA */ + case 280: /* cmd ::= SYNCDB ids REPLICA */ { setDCLSqlElems(pInfo, TSDB_SQL_SYNC_DB_REPLICA, 1, &yymsp[-1].minor.yy0);} break; - case 272: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ + case 281: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 273: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ + case 282: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; toTSDBType(yymsp[0].minor.yy0.type); @@ -3167,21 +3199,21 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 274: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ + case 283: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 275: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ + case 284: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 276: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ + case 285: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3192,7 +3224,7 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 277: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ + case 286: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3206,7 +3238,7 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 278: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ + case 287: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */ { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; @@ -3218,21 +3250,21 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 279: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ + case 288: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 280: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ + case 289: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 281: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ + case 290: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3243,21 +3275,21 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 282: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ + case 291: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 283: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ + case 292: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 284: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ + case 293: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; @@ -3268,7 +3300,7 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 285: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ + case 294: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */ { yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n; @@ -3282,7 +3314,7 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 286: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ + case 295: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */ { yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n; @@ -3294,20 +3326,20 @@ static void yy_reduce( setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 287: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ + case 296: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */ { yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n; SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy421, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE); setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE); } break; - case 288: /* cmd ::= KILL CONNECTION INTEGER */ + case 297: /* cmd ::= KILL CONNECTION INTEGER */ {setKillSql(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);} break; - case 289: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */ + case 298: /* 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 290: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */ + case 299: /* 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/source/libs/parser/src/ttokenizer.c b/source/libs/parser/src/ttokenizer.c index 6f2b52498dd321216111aa82c9d858c79f68cfa6..7800e53f1c843cee2dd75f7a133d471fc0e39eb2 100644 --- a/source/libs/parser/src/ttokenizer.c +++ b/source/libs/parser/src/ttokenizer.c @@ -672,7 +672,7 @@ SToken tStrGetToken(const char* str, int32_t* i, bool isPrevOptr) { } } - t0.z = str + (*i); + t0.z = (char*) str + (*i); *i += t0.n; return t0;