提交 cb3185a9 编写于 作者: H Hongze Cheng

Merge branch '3.0' of https://github.com/taosdata/TDengine into feature/data_format

...@@ -51,6 +51,7 @@ extern int32_t tsVnodeShmSize; ...@@ -51,6 +51,7 @@ extern int32_t tsVnodeShmSize;
extern int32_t tsQnodeShmSize; extern int32_t tsQnodeShmSize;
extern int32_t tsSnodeShmSize; extern int32_t tsSnodeShmSize;
extern int32_t tsBnodeShmSize; extern int32_t tsBnodeShmSize;
extern int32_t tsNumOfShmThreads;
// queue & threads // queue & threads
extern int32_t tsNumOfRpcThreads; extern int32_t tsNumOfRpcThreads;
...@@ -67,6 +68,7 @@ extern int32_t tsNumOfQnodeQueryThreads; ...@@ -67,6 +68,7 @@ extern int32_t tsNumOfQnodeQueryThreads;
extern int32_t tsNumOfQnodeFetchThreads; extern int32_t tsNumOfQnodeFetchThreads;
extern int32_t tsNumOfSnodeSharedThreads; extern int32_t tsNumOfSnodeSharedThreads;
extern int32_t tsNumOfSnodeUniqueThreads; extern int32_t tsNumOfSnodeUniqueThreads;
extern int64_t tsRpcQueueMemoryAllowed;
// monitor // monitor
extern bool tsEnableMonitor; extern bool tsEnableMonitor;
......
...@@ -345,6 +345,7 @@ bool nodesIsUnaryOp(const SOperatorNode* pOp); ...@@ -345,6 +345,7 @@ bool nodesIsUnaryOp(const SOperatorNode* pOp);
bool nodesIsArithmeticOp(const SOperatorNode* pOp); bool nodesIsArithmeticOp(const SOperatorNode* pOp);
bool nodesIsComparisonOp(const SOperatorNode* pOp); bool nodesIsComparisonOp(const SOperatorNode* pOp);
bool nodesIsJsonOp(const SOperatorNode* pOp); bool nodesIsJsonOp(const SOperatorNode* pOp);
bool nodesIsRegularOp(const SOperatorNode* pOp);
bool nodesIsTimeorderQuery(const SNode* pQuery); bool nodesIsTimeorderQuery(const SNode* pQuery);
bool nodesIsTimelineQuery(const SNode* pQuery); bool nodesIsTimelineQuery(const SNode* pQuery);
......
...@@ -37,6 +37,7 @@ typedef int32_t TdUcs4; ...@@ -37,6 +37,7 @@ typedef int32_t TdUcs4;
#define wcstombs WCSTOMBS_FUNC_TAOS_FORBID #define wcstombs WCSTOMBS_FUNC_TAOS_FORBID
#define wcsncpy WCSNCPY_FUNC_TAOS_FORBID #define wcsncpy WCSNCPY_FUNC_TAOS_FORBID
#define wchar_t WCHAR_T_TYPE_TAOS_FORBID #define wchar_t WCHAR_T_TYPE_TAOS_FORBID
#define strcasestr STR_CASE_STR_FORBID
#endif #endif
#ifdef WINDOWS #ifdef WINDOWS
...@@ -69,6 +70,8 @@ int32_t taosMbsToWchars(TdWchar *pWchars, const char *pStrs, int32_t size); ...@@ -69,6 +70,8 @@ int32_t taosMbsToWchars(TdWchar *pWchars, const char *pStrs, int32_t size);
int32_t taosWcharToMb(char *pStr, TdWchar wchar); int32_t taosWcharToMb(char *pStr, TdWchar wchar);
int32_t taosWcharsToMbs(char *pStrs, TdWchar *pWchars, int32_t size); int32_t taosWcharsToMbs(char *pStrs, TdWchar *pWchars, int32_t size);
char *taosStrCaseStr(const char *str, const char *pattern);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
......
...@@ -89,6 +89,7 @@ int32_t* taosGetErrno(); ...@@ -89,6 +89,7 @@ int32_t* taosGetErrno();
#define TSDB_CODE_REPEAT_INIT TAOS_DEF_ERROR_CODE(0, 0x0115) #define TSDB_CODE_REPEAT_INIT TAOS_DEF_ERROR_CODE(0, 0x0115)
#define TSDB_CODE_DUP_KEY TAOS_DEF_ERROR_CODE(0, 0x0116) #define TSDB_CODE_DUP_KEY TAOS_DEF_ERROR_CODE(0, 0x0116)
#define TSDB_CODE_NEED_RETRY TAOS_DEF_ERROR_CODE(0, 0x0117) #define TSDB_CODE_NEED_RETRY TAOS_DEF_ERROR_CODE(0, 0x0117)
#define TSDB_CODE_OUT_OF_RPC_MEMORY_QUEUE TAOS_DEF_ERROR_CODE(0, 0x0118)
#define TSDB_CODE_REF_NO_MEMORY TAOS_DEF_ERROR_CODE(0, 0x0140) #define TSDB_CODE_REF_NO_MEMORY TAOS_DEF_ERROR_CODE(0, 0x0140)
#define TSDB_CODE_REF_FULL TAOS_DEF_ERROR_CODE(0, 0x0141) #define TSDB_CODE_REF_FULL TAOS_DEF_ERROR_CODE(0, 0x0141)
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#define _TD_UTIL_PROCESS_H_ #define _TD_UTIL_PROCESS_H_
#include "os.h" #include "os.h"
#include "tqueue.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -25,7 +26,7 @@ extern "C" { ...@@ -25,7 +26,7 @@ extern "C" {
typedef enum { PROC_FUNC_REQ = 1, PROC_FUNC_RSP, PROC_FUNC_REGIST, PROC_FUNC_RELEASE } EProcFuncType; typedef enum { PROC_FUNC_REQ = 1, PROC_FUNC_RSP, PROC_FUNC_REGIST, PROC_FUNC_RELEASE } EProcFuncType;
typedef struct SProcObj SProcObj; typedef struct SProcObj SProcObj;
typedef void *(*ProcMallocFp)(int32_t contLen); typedef void *(*ProcMallocFp)(int32_t contLen, EQItype itype);
typedef void *(*ProcFreeFp)(void *pCont); typedef void *(*ProcFreeFp)(void *pCont);
typedef void (*ProcConsumeFp)(void *parent, void *pHead, int16_t headLen, void *pBody, int32_t bodyLen, typedef void (*ProcConsumeFp)(void *parent, void *pHead, int16_t headLen, void *pBody, int32_t bodyLen,
EProcFuncType ftype); EProcFuncType ftype);
......
...@@ -48,18 +48,24 @@ typedef struct { ...@@ -48,18 +48,24 @@ typedef struct {
int32_t threadNum; int32_t threadNum;
} SQueueInfo; } SQueueInfo;
typedef enum {
DEF_QITEM = 0,
RPC_QITEM = 1,
} EQItype;
typedef void (*FItem)(SQueueInfo *pInfo, void *pItem); typedef void (*FItem)(SQueueInfo *pInfo, void *pItem);
typedef void (*FItems)(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfItems); typedef void (*FItems)(SQueueInfo *pInfo, STaosQall *qall, int32_t numOfItems);
STaosQueue *taosOpenQueue(); STaosQueue *taosOpenQueue();
void taosCloseQueue(STaosQueue *queue); void taosCloseQueue(STaosQueue *queue);
void taosSetQueueFp(STaosQueue *queue, FItem itemFp, FItems itemsFp); void taosSetQueueFp(STaosQueue *queue, FItem itemFp, FItems itemsFp);
void *taosAllocateQitem(int32_t size); void *taosAllocateQitem(int32_t size, EQItype itype);
void taosFreeQitem(void *pItem); void taosFreeQitem(void *pItem);
void taosWriteQitem(STaosQueue *queue, void *pItem); void taosWriteQitem(STaosQueue *queue, void *pItem);
int32_t taosReadQitem(STaosQueue *queue, void **ppItem); int32_t taosReadQitem(STaosQueue *queue, void **ppItem);
bool taosQueueEmpty(STaosQueue *queue); bool taosQueueEmpty(STaosQueue *queue);
int32_t taosQueueSize(STaosQueue *queue); int32_t taosQueueItemSize(STaosQueue *queue);
int64_t taosQueueMemorySize(STaosQueue *queue);
STaosQall *taosAllocateQall(); STaosQall *taosAllocateQall();
void taosFreeQall(STaosQall *qall); void taosFreeQall(STaosQall *qall);
...@@ -77,8 +83,8 @@ int32_t taosGetQueueNumber(STaosQset *qset); ...@@ -77,8 +83,8 @@ int32_t taosGetQueueNumber(STaosQset *qset);
int32_t taosReadQitemFromQset(STaosQset *qset, void **ppItem, void **ahandle, FItem *itemFp); int32_t taosReadQitemFromQset(STaosQset *qset, void **ppItem, void **ahandle, FItem *itemFp);
int32_t taosReadAllQitemsFromQset(STaosQset *qset, STaosQall *qall, void **ahandle, FItems *itemsFp); int32_t taosReadAllQitemsFromQset(STaosQset *qset, STaosQall *qall, void **ahandle, FItems *itemsFp);
void taosResetQsetThread(STaosQset *qset, void *pItem); void taosResetQsetThread(STaosQset *qset, void *pItem);
int32_t taosGetQueueItemsNumber(STaosQueue *queue);
int32_t taosGetQsetItemsNumber(STaosQset *qset); extern int64_t tsRpcQueueMemoryAllowed;
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -63,12 +63,12 @@ cp ${install_files} ${install_dir} ...@@ -63,12 +63,12 @@ cp ${install_files} ${install_dir}
header_files="${top_dir}/include/client/taos.h ${top_dir}/include/util/taoserror.h" header_files="${top_dir}/include/client/taos.h ${top_dir}/include/util/taoserror.h"
cp ${header_files} ${install_dir}/inc cp ${header_files} ${install_dir}/inc
bin_files="${compile_dir}/source/dnode/mgmt/taosd ${compile_dir}/tools/shell/taos ${compile_dir}/tests/test/c/create_table ${compile_dir}/tests/test/c/tmq_sim ${script_dir}/remove.sh ${compile_dir}/build/bin/taosBenchmark ${compile_dir}/build/bin/taosdump" bin_files="${compile_dir}/build/bin/taosd ${compile_dir}/build/bin/taos ${compile_dir}/build/bin/create_table ${compile_dir}/build/bin/tmq_sim ${script_dir}/remove.sh ${compile_dir}/build/bin/taosBenchmark ${compile_dir}/build/bin/taosdump"
cp -rf ${bin_files} ${install_dir}/bin && chmod a+x ${install_dir}/bin/* || : cp -rf ${bin_files} ${install_dir}/bin && chmod a+x ${install_dir}/bin/* || :
cp -rf ${compile_dir}/source/client/libtaos.so ${install_dir}/lib/ cp ${compile_dir}/build/lib/libtaos.so ${install_dir}/lib/
cp -rf ${compile_dir}/source/libs/tdb/libtdb.so ${install_dir}/lib/ cp ${compile_dir}/build/lib/libtdb.so ${install_dir}/lib/
cp -rf ${compile_dir}/build/lib/libavro* ${install_dir}/lib/ > /dev/null || echo -e "failed to copy avro libraries" cp ${compile_dir}/build/lib/libavro* ${install_dir}/lib/ > /dev/null || echo -e "failed to copy avro libraries"
cp -rf ${compile_dir}/build/lib/pkgconfig ${install_dir}/lib/ > /dev/null || echo -e "failed to copy pkgconfig directory" cp -rf ${compile_dir}/build/lib/pkgconfig ${install_dir}/lib/ > /dev/null || echo -e "failed to copy pkgconfig directory"
......
...@@ -439,7 +439,9 @@ static int32_t smlModifyDBSchemas(SSmlHandle* info) { ...@@ -439,7 +439,9 @@ static int32_t smlModifyDBSchemas(SSmlHandle* info) {
code = catalogGetSTableMeta(info->pCatalog, info->taos->pAppInfo->pTransporter, &ep, &pName, &pTableMeta); code = catalogGetSTableMeta(info->pCatalog, info->taos->pAppInfo->pTransporter, &ep, &pName, &pTableMeta);
if (code == TSDB_CODE_PAR_TABLE_NOT_EXIST || code == TSDB_CODE_MND_INVALID_STB) { if (code == TSDB_CODE_PAR_TABLE_NOT_EXIST || code == TSDB_CODE_MND_INVALID_STB) {
SSchemaAction schemaAction = { .action = SCHEMA_ACTION_CREATE_STABLE, .createSTable = {0}}; SSchemaAction schemaAction;
schemaAction.action = SCHEMA_ACTION_CREATE_STABLE;
memset(&schemaAction.createSTable, 0, sizeof(SCreateSTableActionInfo));
memcpy(schemaAction.createSTable.sTableName, superTable, superTableLen); memcpy(schemaAction.createSTable.sTableName, superTable, superTableLen);
schemaAction.createSTable.tags = sTableData->tags; schemaAction.createSTable.tags = sTableData->tags;
schemaAction.createSTable.fields = sTableData->cols; schemaAction.createSTable.fields = sTableData->cols;
...@@ -455,7 +457,8 @@ static int32_t smlModifyDBSchemas(SSmlHandle* info) { ...@@ -455,7 +457,8 @@ static int32_t smlModifyDBSchemas(SSmlHandle* info) {
taosHashPut(hashTmp, pTableMeta->schema[i].name, strlen(pTableMeta->schema[i].name), &i, SHORT_BYTES); taosHashPut(hashTmp, pTableMeta->schema[i].name, strlen(pTableMeta->schema[i].name), &i, SHORT_BYTES);
} }
SSchemaAction schemaAction = {.alterSTable = {0}}; SSchemaAction schemaAction;
memset(&schemaAction, 0, sizeof(SSchemaAction));
memcpy(schemaAction.createSTable.sTableName, superTable, superTableLen); memcpy(schemaAction.createSTable.sTableName, superTable, superTableLen);
code = smlProcessSchemaAction(info, pTableMeta->schema, hashTmp, sTableData->tags, &schemaAction, true); code = smlProcessSchemaAction(info, pTableMeta->schema, hashTmp, sTableData->tags, &schemaAction, true);
if (code != TSDB_CODE_SUCCESS) { if (code != TSDB_CODE_SUCCESS) {
......
...@@ -316,7 +316,7 @@ static int32_t tmqMakeTopicVgKey(char* dst, const char* topicName, int32_t vg) { ...@@ -316,7 +316,7 @@ static int32_t tmqMakeTopicVgKey(char* dst, const char* topicName, int32_t vg) {
void tmqAssignDelayedHbTask(void* param, void* tmrId) { void tmqAssignDelayedHbTask(void* param, void* tmrId) {
tmq_t* tmq = (tmq_t*)param; tmq_t* tmq = (tmq_t*)param;
int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t)); int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t), DEF_QITEM);
*pTaskType = TMQ_DELAYED_TASK__HB; *pTaskType = TMQ_DELAYED_TASK__HB;
taosWriteQitem(tmq->delayedTask, pTaskType); taosWriteQitem(tmq->delayedTask, pTaskType);
tsem_post(&tmq->rspSem); tsem_post(&tmq->rspSem);
...@@ -324,7 +324,7 @@ void tmqAssignDelayedHbTask(void* param, void* tmrId) { ...@@ -324,7 +324,7 @@ void tmqAssignDelayedHbTask(void* param, void* tmrId) {
void tmqAssignDelayedCommitTask(void* param, void* tmrId) { void tmqAssignDelayedCommitTask(void* param, void* tmrId) {
tmq_t* tmq = (tmq_t*)param; tmq_t* tmq = (tmq_t*)param;
int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t)); int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t), DEF_QITEM);
*pTaskType = TMQ_DELAYED_TASK__COMMIT; *pTaskType = TMQ_DELAYED_TASK__COMMIT;
taosWriteQitem(tmq->delayedTask, pTaskType); taosWriteQitem(tmq->delayedTask, pTaskType);
tsem_post(&tmq->rspSem); tsem_post(&tmq->rspSem);
...@@ -332,7 +332,7 @@ void tmqAssignDelayedCommitTask(void* param, void* tmrId) { ...@@ -332,7 +332,7 @@ void tmqAssignDelayedCommitTask(void* param, void* tmrId) {
void tmqAssignDelayedReportTask(void* param, void* tmrId) { void tmqAssignDelayedReportTask(void* param, void* tmrId) {
tmq_t* tmq = (tmq_t*)param; tmq_t* tmq = (tmq_t*)param;
int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t)); int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t), DEF_QITEM);
*pTaskType = TMQ_DELAYED_TASK__REPORT; *pTaskType = TMQ_DELAYED_TASK__REPORT;
taosWriteQitem(tmq->delayedTask, pTaskType); taosWriteQitem(tmq->delayedTask, pTaskType);
tsem_post(&tmq->rspSem); tsem_post(&tmq->rspSem);
...@@ -848,7 +848,7 @@ int32_t tmqPollCb(void* param, const SDataBuf* pMsg, int32_t code) { ...@@ -848,7 +848,7 @@ int32_t tmqPollCb(void* param, const SDataBuf* pMsg, int32_t code) {
tscWarn("mismatch rsp from vg %d, epoch %d, current epoch %d", pParam->vgId, msgEpoch, tmqEpoch); tscWarn("mismatch rsp from vg %d, epoch %d, current epoch %d", pParam->vgId, msgEpoch, tmqEpoch);
} }
SMqPollRspWrapper* pRspWrapper = taosAllocateQitem(sizeof(SMqPollRspWrapper)); SMqPollRspWrapper* pRspWrapper = taosAllocateQitem(sizeof(SMqPollRspWrapper), DEF_QITEM);
if (pRspWrapper == NULL) { if (pRspWrapper == NULL) {
tscWarn("msg discard from vg %d, epoch %d since out of memory", pParam->vgId, pParam->epoch); tscWarn("msg discard from vg %d, epoch %d since out of memory", pParam->vgId, pParam->epoch);
goto CREATE_MSG_FAIL; goto CREATE_MSG_FAIL;
...@@ -987,7 +987,7 @@ int32_t tmqAskEpCb(void* param, const SDataBuf* pMsg, int32_t code) { ...@@ -987,7 +987,7 @@ int32_t tmqAskEpCb(void* param, const SDataBuf* pMsg, int32_t code) {
tmqUpdateEp(tmq, head->epoch, &rsp); tmqUpdateEp(tmq, head->epoch, &rsp);
tDeleteSMqAskEpRsp(&rsp); tDeleteSMqAskEpRsp(&rsp);
} else { } else {
SMqAskEpRspWrapper* pWrapper = taosAllocateQitem(sizeof(SMqAskEpRspWrapper)); SMqAskEpRspWrapper* pWrapper = taosAllocateQitem(sizeof(SMqAskEpRspWrapper), DEF_QITEM);
if (pWrapper == NULL) { if (pWrapper == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY; terrno = TSDB_CODE_OUT_OF_MEMORY;
code = -1; code = -1;
......
...@@ -44,6 +44,7 @@ int32_t tsVnodeShmSize = TSDB_MAX_WAL_SIZE * 10 + 128; ...@@ -44,6 +44,7 @@ int32_t tsVnodeShmSize = TSDB_MAX_WAL_SIZE * 10 + 128;
int32_t tsQnodeShmSize = TSDB_MAX_WAL_SIZE * 4 + 128; int32_t tsQnodeShmSize = TSDB_MAX_WAL_SIZE * 4 + 128;
int32_t tsSnodeShmSize = TSDB_MAX_WAL_SIZE * 4 + 128; int32_t tsSnodeShmSize = TSDB_MAX_WAL_SIZE * 4 + 128;
int32_t tsBnodeShmSize = TSDB_MAX_WAL_SIZE * 4 + 128; int32_t tsBnodeShmSize = TSDB_MAX_WAL_SIZE * 4 + 128;
int32_t tsNumOfShmThreads = 1;
// queue & threads // queue & threads
int32_t tsNumOfRpcThreads = 1; int32_t tsNumOfRpcThreads = 1;
...@@ -375,6 +376,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { ...@@ -375,6 +376,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
if (cfgAddInt32(pCfg, "qnodeShmSize", tsQnodeShmSize, TSDB_MAX_WAL_SIZE + 128, INT32_MAX, 0) != 0) return -1; if (cfgAddInt32(pCfg, "qnodeShmSize", tsQnodeShmSize, TSDB_MAX_WAL_SIZE + 128, INT32_MAX, 0) != 0) return -1;
if (cfgAddInt32(pCfg, "snodeShmSize", tsSnodeShmSize, TSDB_MAX_WAL_SIZE + 128, INT32_MAX, 0) != 0) return -1; if (cfgAddInt32(pCfg, "snodeShmSize", tsSnodeShmSize, TSDB_MAX_WAL_SIZE + 128, INT32_MAX, 0) != 0) return -1;
if (cfgAddInt32(pCfg, "bnodeShmSize", tsBnodeShmSize, TSDB_MAX_WAL_SIZE + 128, INT32_MAX, 0) != 0) return -1; if (cfgAddInt32(pCfg, "bnodeShmSize", tsBnodeShmSize, TSDB_MAX_WAL_SIZE + 128, INT32_MAX, 0) != 0) return -1;
if (cfgAddInt32(pCfg, "mumOfShmThreads", tsNumOfShmThreads, 1, 1024, 0) != 0) return -1;
tsNumOfRpcThreads = tsNumOfCores / 2; tsNumOfRpcThreads = tsNumOfCores / 2;
tsNumOfRpcThreads = TRANGE(tsNumOfRpcThreads, 1, 4); tsNumOfRpcThreads = TRANGE(tsNumOfRpcThreads, 1, 4);
...@@ -428,6 +430,10 @@ static int32_t taosAddServerCfg(SConfig *pCfg) { ...@@ -428,6 +430,10 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
tsNumOfSnodeUniqueThreads = TRANGE(tsNumOfSnodeUniqueThreads, 2, 4); tsNumOfSnodeUniqueThreads = TRANGE(tsNumOfSnodeUniqueThreads, 2, 4);
if (cfgAddInt32(pCfg, "numOfSnodeUniqueThreads", tsNumOfSnodeUniqueThreads, 1, 1024, 0) != 0) return -1; if (cfgAddInt32(pCfg, "numOfSnodeUniqueThreads", tsNumOfSnodeUniqueThreads, 1, 1024, 0) != 0) return -1;
tsRpcQueueMemoryAllowed = tsTotalMemoryKB * 1024 * 0.1;
tsRpcQueueMemoryAllowed = TRANGE(tsRpcQueueMemoryAllowed, TSDB_MAX_WAL_SIZE * 10L, TSDB_MAX_WAL_SIZE * 10000L);
if (cfgAddInt64(pCfg, "rpcQueueMemoryAllowed", tsRpcQueueMemoryAllowed, 1, INT64_MAX, 0) != 0) return -1;
if (cfgAddBool(pCfg, "monitor", tsEnableMonitor, 0) != 0) return -1; if (cfgAddBool(pCfg, "monitor", tsEnableMonitor, 0) != 0) return -1;
if (cfgAddInt32(pCfg, "monitorInterval", tsMonitorInterval, 1, 200000, 0) != 0) return -1; if (cfgAddInt32(pCfg, "monitorInterval", tsMonitorInterval, 1, 200000, 0) != 0) return -1;
if (cfgAddString(pCfg, "monitorFqdn", tsMonitorFqdn, 0) != 0) return -1; if (cfgAddString(pCfg, "monitorFqdn", tsMonitorFqdn, 0) != 0) return -1;
...@@ -568,6 +574,7 @@ static int32_t taosSetServerCfg(SConfig *pCfg) { ...@@ -568,6 +574,7 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
tsNumOfQnodeFetchThreads = cfgGetItem(pCfg, "numOfQnodeFetchThreads")->i32; tsNumOfQnodeFetchThreads = cfgGetItem(pCfg, "numOfQnodeFetchThreads")->i32;
tsNumOfSnodeSharedThreads = cfgGetItem(pCfg, "numOfSnodeSharedThreads")->i32; tsNumOfSnodeSharedThreads = cfgGetItem(pCfg, "numOfSnodeSharedThreads")->i32;
tsNumOfSnodeUniqueThreads = cfgGetItem(pCfg, "numOfSnodeUniqueThreads")->i32; tsNumOfSnodeUniqueThreads = cfgGetItem(pCfg, "numOfSnodeUniqueThreads")->i32;
tsRpcQueueMemoryAllowed = cfgGetItem(pCfg, "rpcQueueMemoryAllowed")->i64;
tsEnableMonitor = cfgGetItem(pCfg, "monitor")->bval; tsEnableMonitor = cfgGetItem(pCfg, "monitor")->bval;
tsMonitorInterval = cfgGetItem(pCfg, "monitorInterval")->i32; tsMonitorInterval = cfgGetItem(pCfg, "monitorInterval")->i32;
......
...@@ -402,7 +402,8 @@ tDataTypeDescriptor tDataTypes[TSDB_DATA_TYPE_MAX] = { ...@@ -402,7 +402,8 @@ tDataTypeDescriptor tDataTypes[TSDB_DATA_TYPE_MAX] = {
{TSDB_DATA_TYPE_UINT, 12, INT_BYTES, "INT UNSIGNED", 0, UINT32_MAX, tsCompressInt, tsDecompressInt, getStatics_u32}, {TSDB_DATA_TYPE_UINT, 12, INT_BYTES, "INT UNSIGNED", 0, UINT32_MAX, tsCompressInt, tsDecompressInt, getStatics_u32},
{TSDB_DATA_TYPE_UBIGINT, 15, LONG_BYTES, "BIGINT UNSIGNED", 0, UINT64_MAX, tsCompressBigint, tsDecompressBigint, {TSDB_DATA_TYPE_UBIGINT, 15, LONG_BYTES, "BIGINT UNSIGNED", 0, UINT64_MAX, tsCompressBigint, tsDecompressBigint,
getStatics_u64}, getStatics_u64},
{TSDB_DATA_TYPE_JSON, 4, TSDB_MAX_JSON_TAG_LEN, "JSON", 0, 0, tsCompressString, tsDecompressString, getStatics_nchr}, {TSDB_DATA_TYPE_JSON, 4, TSDB_MAX_JSON_TAG_LEN, "JSON", 0, 0, tsCompressString, tsDecompressString,
getStatics_nchr},
}; };
char tTokenTypeSwitcher[13] = { char tTokenTypeSwitcher[13] = {
......
...@@ -104,7 +104,7 @@ int32_t mmPutNodeMsgToMonitorQueue(SMnodeMgmt *pMgmt, SNodeMsg *pMsg) { ...@@ -104,7 +104,7 @@ int32_t mmPutNodeMsgToMonitorQueue(SMnodeMgmt *pMgmt, SNodeMsg *pMsg) {
} }
static inline int32_t mmPutRpcMsgToWorker(SSingleWorker *pWorker, SRpcMsg *pRpc) { static inline int32_t mmPutRpcMsgToWorker(SSingleWorker *pWorker, SRpcMsg *pRpc) {
SNodeMsg *pMsg = taosAllocateQitem(sizeof(SNodeMsg)); SNodeMsg *pMsg = taosAllocateQitem(sizeof(SNodeMsg), RPC_QITEM);
if (pMsg == NULL) return -1; if (pMsg == NULL) return -1;
dTrace("msg:%p, is created and put into worker:%s, type:%s", pMsg, pWorker->name, TMSG_INFO(pRpc->msgType)); dTrace("msg:%p, is created and put into worker:%s, type:%s", pMsg, pWorker->name, TMSG_INFO(pRpc->msgType));
......
...@@ -102,7 +102,7 @@ int32_t qmPutNodeMsgToMonitorQueue(SQnodeMgmt *pMgmt, SNodeMsg *pMsg) { ...@@ -102,7 +102,7 @@ int32_t qmPutNodeMsgToMonitorQueue(SQnodeMgmt *pMgmt, SNodeMsg *pMsg) {
} }
static int32_t qmPutRpcMsgToWorker(SQnodeMgmt *pMgmt, SSingleWorker *pWorker, SRpcMsg *pRpc) { static int32_t qmPutRpcMsgToWorker(SQnodeMgmt *pMgmt, SSingleWorker *pWorker, SRpcMsg *pRpc) {
SNodeMsg *pMsg = taosAllocateQitem(sizeof(SNodeMsg)); SNodeMsg *pMsg = taosAllocateQitem(sizeof(SNodeMsg), RPC_QITEM);
if (pMsg == NULL) { if (pMsg == NULL) {
return -1; return -1;
} }
...@@ -126,10 +126,10 @@ int32_t qmGetQueueSize(SQnodeMgmt *pMgmt, int32_t vgId, EQueueType qtype) { ...@@ -126,10 +126,10 @@ int32_t qmGetQueueSize(SQnodeMgmt *pMgmt, int32_t vgId, EQueueType qtype) {
switch (qtype) { switch (qtype) {
case QUERY_QUEUE: case QUERY_QUEUE:
size = taosQueueSize(pMgmt->queryWorker.queue); size = taosQueueItemSize(pMgmt->queryWorker.queue);
break; break;
case FETCH_QUEUE: case FETCH_QUEUE:
size = taosQueueSize(pMgmt->fetchWorker.queue); size = taosQueueItemSize(pMgmt->fetchWorker.queue);
break; break;
default: default:
break; break;
......
...@@ -326,7 +326,7 @@ static int32_t vmPutRpcMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pRpc, EQueueType q ...@@ -326,7 +326,7 @@ static int32_t vmPutRpcMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pRpc, EQueueType q
SVnodeObj *pVnode = vmAcquireVnode(pMgmt, pHead->vgId); SVnodeObj *pVnode = vmAcquireVnode(pMgmt, pHead->vgId);
if (pVnode == NULL) return -1; if (pVnode == NULL) return -1;
SNodeMsg *pMsg = taosAllocateQitem(sizeof(SNodeMsg)); SNodeMsg *pMsg = taosAllocateQitem(sizeof(SNodeMsg), RPC_QITEM);
int32_t code = 0; int32_t code = 0;
if (pMsg != NULL) { if (pMsg != NULL) {
...@@ -397,22 +397,22 @@ int32_t vmGetQueueSize(SVnodeMgmt *pMgmt, int32_t vgId, EQueueType qtype) { ...@@ -397,22 +397,22 @@ int32_t vmGetQueueSize(SVnodeMgmt *pMgmt, int32_t vgId, EQueueType qtype) {
if (pVnode != NULL) { if (pVnode != NULL) {
switch (qtype) { switch (qtype) {
case WRITE_QUEUE: case WRITE_QUEUE:
size = taosQueueSize(pVnode->pWriteQ); size = taosQueueItemSize(pVnode->pWriteQ);
break; break;
case SYNC_QUEUE: case SYNC_QUEUE:
size = taosQueueSize(pVnode->pSyncQ); size = taosQueueItemSize(pVnode->pSyncQ);
break; break;
case APPLY_QUEUE: case APPLY_QUEUE:
size = taosQueueSize(pVnode->pApplyQ); size = taosQueueItemSize(pVnode->pApplyQ);
break; break;
case QUERY_QUEUE: case QUERY_QUEUE:
size = taosQueueSize(pVnode->pQueryQ); size = taosQueueItemSize(pVnode->pQueryQ);
break; break;
case FETCH_QUEUE: case FETCH_QUEUE:
size = taosQueueSize(pVnode->pFetchQ); size = taosQueueItemSize(pVnode->pFetchQ);
break; break;
case MERGE_QUEUE: case MERGE_QUEUE:
size = taosQueueSize(pVnode->pMergeQ); size = taosQueueItemSize(pVnode->pMergeQ);
break; break;
default: default:
break; break;
......
...@@ -79,7 +79,7 @@ static void dmProcessRpcMsg(SMgmtWrapper *pWrapper, SRpcMsg *pRpc, SEpSet *pEpSe ...@@ -79,7 +79,7 @@ static void dmProcessRpcMsg(SMgmtWrapper *pWrapper, SRpcMsg *pRpc, SEpSet *pEpSe
needRelease = true; needRelease = true;
if ((msgFp = dmGetMsgFp(pWrapper, pRpc)) == NULL) goto _OVER; if ((msgFp = dmGetMsgFp(pWrapper, pRpc)) == NULL) goto _OVER;
if ((pMsg = taosAllocateQitem(sizeof(SNodeMsg))) == NULL) goto _OVER; if ((pMsg = taosAllocateQitem(sizeof(SNodeMsg), RPC_QITEM)) == NULL) goto _OVER;
if (dmBuildMsg(pMsg, pRpc) != 0) goto _OVER; if (dmBuildMsg(pMsg, pRpc) != 0) goto _OVER;
if (pWrapper->procType != DND_PROC_PARENT) { if (pWrapper->procType != DND_PROC_PARENT) {
......
...@@ -66,11 +66,7 @@ static void mndPullupTrans(SMnode *pMnode) { ...@@ -66,11 +66,7 @@ static void mndPullupTrans(SMnode *pMnode) {
static void mndCalMqRebalance(SMnode *pMnode) { static void mndCalMqRebalance(SMnode *pMnode) {
int32_t contLen = 0; int32_t contLen = 0;
void *pReq = mndBuildTimerMsg(&contLen); void *pReq = mndBuildTimerMsg(&contLen);
SRpcMsg rpcMsg = { SRpcMsg rpcMsg = {.msgType = TDMT_MND_MQ_TIMER, .pCont = pReq, .contLen = contLen};
.msgType = TDMT_MND_MQ_TIMER,
.pCont = pReq,
.contLen = contLen,
};
tmsgPutToQueue(&pMnode->msgCb, READ_QUEUE, &rpcMsg); tmsgPutToQueue(&pMnode->msgCb, READ_QUEUE, &rpcMsg);
} }
......
...@@ -96,8 +96,10 @@ typedef struct { ...@@ -96,8 +96,10 @@ typedef struct {
#pragma pack(push, 1) #pragma pack(push, 1)
typedef struct { typedef struct {
tb_uid_t suid; tb_uid_t suid;
int16_t cid; int32_t cid;
char data[]; uint8_t isNull : 1;
uint8_t type : 7;
uint8_t data[]; // val + uid
} STagIdxKey; } STagIdxKey;
#pragma pack(pop) #pragma pack(pop)
......
...@@ -227,8 +227,7 @@ static int ctbIdxKeyCmpr(const void *pKey1, int kLen1, const void *pKey2, int kL ...@@ -227,8 +227,7 @@ static int ctbIdxKeyCmpr(const void *pKey1, int kLen1, const void *pKey2, int kL
static int tagIdxKeyCmpr(const void *pKey1, int kLen1, const void *pKey2, int kLen2) { static int tagIdxKeyCmpr(const void *pKey1, int kLen1, const void *pKey2, int kLen2) {
STagIdxKey *pTagIdxKey1 = (STagIdxKey *)pKey1; STagIdxKey *pTagIdxKey1 = (STagIdxKey *)pKey1;
STagIdxKey *pTagIdxKey2 = (STagIdxKey *)pKey2; STagIdxKey *pTagIdxKey2 = (STagIdxKey *)pKey2;
int8_t *p1, *p2; tb_uid_t uid1, uid2;
int8_t type;
int c; int c;
// compare suid // compare suid
...@@ -245,31 +244,34 @@ static int tagIdxKeyCmpr(const void *pKey1, int kLen1, const void *pKey2, int kL ...@@ -245,31 +244,34 @@ static int tagIdxKeyCmpr(const void *pKey1, int kLen1, const void *pKey2, int kL
return -1; return -1;
} }
// compare value ASSERT(pTagIdxKey1->type == pTagIdxKey2->type);
p1 = pTagIdxKey1->data;
p2 = pTagIdxKey2->data;
ASSERT(p1[0] == p2[0]);
type = p1[0];
p1++; // check NULL, NULL is always the smallest
p2++; if (pTagIdxKey1->isNull && !pTagIdxKey2->isNull) {
return -1;
c = doCompare(p1, p2, type, 0); } else if (!pTagIdxKey1->isNull && pTagIdxKey2->isNull) {
return 1;
} else if (!pTagIdxKey1->isNull && !pTagIdxKey2->isNull) {
// all not NULL, compr tag vals
c = doCompare(pTagIdxKey1->data, pTagIdxKey2->data, pTagIdxKey1->type, 0);
if (c) return c; if (c) return c;
if (IS_VAR_DATA_TYPE(type)) { if (IS_VAR_DATA_TYPE(pTagIdxKey1->type)) {
p1 = p1 + varDataTLen(p1); uid1 = *(tb_uid_t *)(pTagIdxKey1->data + varDataTLen(pTagIdxKey1->data));
p2 = p2 + varDataTLen(p2); uid2 = *(tb_uid_t *)(pTagIdxKey2->data + varDataTLen(pTagIdxKey2->data));
} else { } else {
p1 = p1 + tDataTypes[type].bytes; uid1 = *(tb_uid_t *)(pTagIdxKey1->data + tDataTypes[pTagIdxKey1->type].bytes);
p2 = p2 + tDataTypes[type].bytes; uid2 = *(tb_uid_t *)(pTagIdxKey2->data + tDataTypes[pTagIdxKey2->type].bytes);
}
} }
// compare suid // compare uid
if (*(tb_uid_t *)p1 > *(tb_uid_t *)p2) { if (uid1 < uid2) {
return 1;
} else if (*(tb_uid_t *)p1 < *(tb_uid_t *)p2) {
return -1; return -1;
} else if (uid1 > uid2) {
return 1;
} else {
return 0;
} }
return 0; return 0;
......
...@@ -22,7 +22,7 @@ static int metaUpdateNameIdx(SMeta *pMeta, const SMetaEntry *pME); ...@@ -22,7 +22,7 @@ static int metaUpdateNameIdx(SMeta *pMeta, const SMetaEntry *pME);
static int metaUpdateTtlIdx(SMeta *pMeta, const SMetaEntry *pME); static int metaUpdateTtlIdx(SMeta *pMeta, const SMetaEntry *pME);
static int metaSaveToSkmDb(SMeta *pMeta, const SMetaEntry *pME); static int metaSaveToSkmDb(SMeta *pMeta, const SMetaEntry *pME);
static int metaUpdateCtbIdx(SMeta *pMeta, const SMetaEntry *pME); static int metaUpdateCtbIdx(SMeta *pMeta, const SMetaEntry *pME);
static int metaUpdateTagIdx(SMeta *pMeta, const SMetaEntry *pME); static int metaUpdateTagIdx(SMeta *pMeta, const SMetaEntry *pCtbEntry);
int metaCreateSTable(SMeta *pMeta, int64_t version, SVCreateStbReq *pReq) { int metaCreateSTable(SMeta *pMeta, int64_t version, SVCreateStbReq *pReq) {
SMetaEntry me = {0}; SMetaEntry me = {0};
...@@ -389,8 +389,73 @@ static int metaUpdateCtbIdx(SMeta *pMeta, const SMetaEntry *pME) { ...@@ -389,8 +389,73 @@ static int metaUpdateCtbIdx(SMeta *pMeta, const SMetaEntry *pME) {
return tdbDbInsert(pMeta->pCtbIdx, &ctbIdxKey, sizeof(ctbIdxKey), NULL, 0, &pMeta->txn); return tdbDbInsert(pMeta->pCtbIdx, &ctbIdxKey, sizeof(ctbIdxKey), NULL, 0, &pMeta->txn);
} }
static int metaUpdateTagIdx(SMeta *pMeta, const SMetaEntry *pME) { static int metaCreateTagIdxKey(tb_uid_t suid, int32_t cid, const void *pTagData, int8_t type, tb_uid_t uid,
// TODO STagIdxKey **ppTagIdxKey, int32_t *nTagIdxKey) {
int32_t nTagData = 0;
if (pTagData) {
if (IS_VAR_DATA_TYPE(type)) {
nTagData = varDataTLen(pTagData);
} else {
nTagData = tDataTypes[type].bytes;
}
}
*nTagIdxKey = sizeof(STagIdxKey) + nTagData + sizeof(tb_uid_t);
*ppTagIdxKey = (STagIdxKey *)taosMemoryMalloc(*nTagIdxKey);
if (*ppTagIdxKey == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
return -1;
}
(*ppTagIdxKey)->suid = suid;
(*ppTagIdxKey)->cid = cid;
(*ppTagIdxKey)->isNull = (pTagData == NULL) ? 1 : 0;
(*ppTagIdxKey)->type = type;
if (nTagData) memcpy((*ppTagIdxKey)->data, pTagData, nTagData);
*(tb_uid_t *)((*ppTagIdxKey)->data + nTagData) = uid;
return 0;
}
static void metaDestroyTagIdxKey(STagIdxKey *pTagIdxKey) {
if (pTagIdxKey) taosMemoryFree(pTagIdxKey);
}
static int metaUpdateTagIdx(SMeta *pMeta, const SMetaEntry *pCtbEntry) {
void *pData = NULL;
int nData = 0;
STbDbKey tbDbKey = {0};
SMetaEntry stbEntry = {0};
STagIdxKey *pTagIdxKey = NULL;
int32_t nTagIdxKey;
const SSchema *pTagColumn; // = &stbEntry.stbEntry.schema.pSchema[0];
const void *pTagData = NULL; //
SDecoder dc = {0};
// get super table
tdbDbGet(pMeta->pUidIdx, &pCtbEntry->ctbEntry.suid, sizeof(tb_uid_t), &pData, &nData);
tbDbKey.uid = pCtbEntry->ctbEntry.suid;
tbDbKey.version = *(int64_t *)pData;
tdbDbGet(pMeta->pTbDb, &tbDbKey, sizeof(tbDbKey), &pData, &nData);
tDecoderInit(&dc, pData, nData);
metaDecodeEntry(&dc, &stbEntry);
pTagColumn = &stbEntry.stbEntry.schemaTag.pSchema[0];
pTagData = tdGetKVRowValOfCol((const SKVRow)pCtbEntry->ctbEntry.pTags, pTagColumn->colId);
// update tag index
if (metaCreateTagIdxKey(pCtbEntry->ctbEntry.suid, pTagColumn->colId, pTagData, pTagColumn->type, pCtbEntry->uid,
&pTagIdxKey, &nTagIdxKey) < 0) {
return -1;
}
tdbDbInsert(pMeta->pTagIdx, pTagIdxKey, nTagIdxKey, NULL, 0, &pMeta->txn);
metaDestroyTagIdxKey(pTagIdxKey);
tDecoderClear(&dc);
tdbFree(pData);
return 0; return 0;
} }
......
...@@ -88,9 +88,9 @@ static void toDataCacheEntry(const SDataDispatchHandle* pHandle, const SInputDat ...@@ -88,9 +88,9 @@ static void toDataCacheEntry(const SDataDispatchHandle* pHandle, const SInputDat
static bool allocBuf(SDataDispatchHandle* pDispatcher, const SInputData* pInput, SDataDispatchBuf* pBuf) { static bool allocBuf(SDataDispatchHandle* pDispatcher, const SInputData* pInput, SDataDispatchBuf* pBuf) {
uint32_t capacity = pDispatcher->pManager->cfg.maxDataBlockNumPerQuery; uint32_t capacity = pDispatcher->pManager->cfg.maxDataBlockNumPerQuery;
if (taosQueueSize(pDispatcher->pDataBlocks) > capacity) { if (taosQueueItemSize(pDispatcher->pDataBlocks) > capacity) {
qError("SinkNode queue is full, no capacity, max:%d, current:%d, no capacity", capacity, qError("SinkNode queue is full, no capacity, max:%d, current:%d, no capacity", capacity,
taosQueueSize(pDispatcher->pDataBlocks)); taosQueueItemSize(pDispatcher->pDataBlocks));
return false; return false;
} }
...@@ -106,7 +106,7 @@ static bool allocBuf(SDataDispatchHandle* pDispatcher, const SInputData* pInput, ...@@ -106,7 +106,7 @@ static bool allocBuf(SDataDispatchHandle* pDispatcher, const SInputData* pInput,
static int32_t updateStatus(SDataDispatchHandle* pDispatcher) { static int32_t updateStatus(SDataDispatchHandle* pDispatcher) {
taosThreadMutexLock(&pDispatcher->mutex); taosThreadMutexLock(&pDispatcher->mutex);
int32_t blockNums = taosQueueSize(pDispatcher->pDataBlocks); int32_t blockNums = taosQueueItemSize(pDispatcher->pDataBlocks);
int32_t status = int32_t status =
(0 == blockNums ? DS_BUF_EMPTY (0 == blockNums ? DS_BUF_EMPTY
: (blockNums < pDispatcher->pManager->cfg.maxDataBlockNumPerQuery ? DS_BUF_LOW : DS_BUF_FULL)); : (blockNums < pDispatcher->pManager->cfg.maxDataBlockNumPerQuery ? DS_BUF_LOW : DS_BUF_FULL));
...@@ -124,7 +124,7 @@ static int32_t getStatus(SDataDispatchHandle* pDispatcher) { ...@@ -124,7 +124,7 @@ static int32_t getStatus(SDataDispatchHandle* pDispatcher) {
static int32_t putDataBlock(SDataSinkHandle* pHandle, const SInputData* pInput, bool* pContinue) { static int32_t putDataBlock(SDataSinkHandle* pHandle, const SInputData* pInput, bool* pContinue) {
SDataDispatchHandle* pDispatcher = (SDataDispatchHandle*)pHandle; SDataDispatchHandle* pDispatcher = (SDataDispatchHandle*)pHandle;
SDataDispatchBuf* pBuf = taosAllocateQitem(sizeof(SDataDispatchBuf)); SDataDispatchBuf* pBuf = taosAllocateQitem(sizeof(SDataDispatchBuf), DEF_QITEM);
if (NULL == pBuf || !allocBuf(pDispatcher, pInput, pBuf)) { if (NULL == pBuf || !allocBuf(pDispatcher, pInput, pBuf)) {
return TSDB_CODE_QRY_OUT_OF_MEMORY; return TSDB_CODE_QRY_OUT_OF_MEMORY;
} }
......
...@@ -200,11 +200,37 @@ TEST(testCase, index_filter) { ...@@ -200,11 +200,37 @@ TEST(testCase, index_filter) {
doFilterTag(opNode, result); doFilterTag(opNode, result);
EXPECT_EQ(1, taosArrayGetSize(result)); EXPECT_EQ(1, taosArrayGetSize(result));
taosArrayDestroy(result);
nodesDestroyNode(res);
}
{
SNode *pLeft = NULL, *pRight = NULL, *opNode = NULL, *res = NULL;
sifMakeColumnNode(&pLeft, "test", "col", COLUMN_TYPE_TAG, TSDB_DATA_TYPE_INT);
sifMakeValueNode(&pRight, TSDB_DATA_TYPE_INT, &sifRightV);
sifMakeOpNode(&opNode, OP_TYPE_GREATER_THAN, TSDB_DATA_TYPE_INT, pLeft, pRight);
SArray *result = taosArrayInit(4, sizeof(uint64_t));
doFilterTag(opNode, result);
EXPECT_EQ(0, taosArrayGetSize(result));
taosArrayDestroy(result);
nodesDestroyNode(res);
}
{
SNode *pLeft = NULL, *pRight = NULL, *opNode = NULL, *res = NULL;
sifMakeColumnNode(&pLeft, "test", "col", COLUMN_TYPE_TAG, TSDB_DATA_TYPE_INT);
sifMakeValueNode(&pRight, TSDB_DATA_TYPE_INT, &sifRightV);
sifMakeOpNode(&opNode, OP_TYPE_GREATER_EQUAL, TSDB_DATA_TYPE_DOUBLE, pLeft, pRight);
SArray *result = taosArrayInit(4, sizeof(uint64_t));
doFilterTag(opNode, result);
EXPECT_EQ(0, taosArrayGetSize(result));
taosArrayDestroy(result); taosArrayDestroy(result);
nodesDestroyNode(res); nodesDestroyNode(res);
} }
} }
// add other greater/lower/equal/in compare func test
TEST(testCase, index_filter_varify) { TEST(testCase, index_filter_varify) {
{ {
SNode *pLeft = NULL, *pRight = NULL, *opNode = NULL, *res = NULL; SNode *pLeft = NULL, *pRight = NULL, *opNode = NULL, *res = NULL;
......
...@@ -31,6 +31,29 @@ ...@@ -31,6 +31,29 @@
void* indexQhandle = NULL; void* indexQhandle = NULL;
#define INDEX_DATA_BOOL_NULL 0x02
#define INDEX_DATA_TINYINT_NULL 0x80
#define INDEX_DATA_SMALLINT_NULL 0x8000
#define INDEX_DATA_INT_NULL 0x80000000L
#define INDEX_DATA_BIGINT_NULL 0x8000000000000000L
#define INDEX_DATA_TIMESTAMP_NULL TSDB_DATA_BIGINT_NULL
#define INDEX_DATA_FLOAT_NULL 0x7FF00000 // it is an NAN
#define INDEX_DATA_DOUBLE_NULL 0x7FFFFF0000000000L // an NAN
#define INDEX_DATA_NCHAR_NULL 0xFFFFFFFF
#define INDEX_DATA_BINARY_NULL 0xFF
#define INDEX_DATA_JSON_NULL 0xFFFFFFFF
#define INDEX_DATA_JSON_null 0xFFFFFFFE
#define INDEX_DATA_JSON_NOT_NULL 0x01
#define INDEX_DATA_UTINYINT_NULL 0xFF
#define INDEX_DATA_USMALLINT_NULL 0xFFFF
#define INDEX_DATA_UINT_NULL 0xFFFFFFFF
#define INDEX_DATA_UBIGINT_NULL 0xFFFFFFFFFFFFFFFFL
#define INDEX_DATA_NULL_STR "NULL"
#define INDEX_DATA_NULL_STR_L "null"
void indexInit() { void indexInit() {
// refactor later // refactor later
indexQhandle = taosInitScheduler(INDEX_QUEUE_SIZE, INDEX_NUM_OF_THREADS, "index"); indexQhandle = taosInitScheduler(INDEX_QUEUE_SIZE, INDEX_NUM_OF_THREADS, "index");
...@@ -67,12 +90,6 @@ int indexOpen(SIndexOpts* opts, const char* path, SIndex** index) { ...@@ -67,12 +90,6 @@ int indexOpen(SIndexOpts* opts, const char* path, SIndex** index) {
return -1; return -1;
} }
#ifdef USE_LUCENE
index_t* index = index_open(path);
sIdx->index = index;
#endif
#ifdef USE_INVERTED_INDEX
// sIdx->cache = (void*)indexCacheCreate(sIdx); // sIdx->cache = (void*)indexCacheCreate(sIdx);
sIdx->tindex = indexTFileCreate(path); sIdx->tindex = indexTFileCreate(path);
if (sIdx->tindex == NULL) { if (sIdx->tindex == NULL) {
...@@ -85,7 +102,6 @@ int indexOpen(SIndexOpts* opts, const char* path, SIndex** index) { ...@@ -85,7 +102,6 @@ int indexOpen(SIndexOpts* opts, const char* path, SIndex** index) {
taosThreadMutexInit(&sIdx->mtx, NULL); taosThreadMutexInit(&sIdx->mtx, NULL);
*index = sIdx; *index = sIdx;
return 0; return 0;
#endif
END: END:
if (sIdx != NULL) { if (sIdx != NULL) {
...@@ -97,12 +113,6 @@ END: ...@@ -97,12 +113,6 @@ END:
} }
void indexClose(SIndex* sIdx) { void indexClose(SIndex* sIdx) {
#ifdef USE_LUCENE
index_close(sIdex->index);
sIdx->index = NULL;
#endif
#ifdef USE_INVERTED_INDEX
void* iter = taosHashIterate(sIdx->colObj, NULL); void* iter = taosHashIterate(sIdx->colObj, NULL);
while (iter) { while (iter) {
IndexCache** pCache = iter; IndexCache** pCache = iter;
...@@ -114,31 +124,12 @@ void indexClose(SIndex* sIdx) { ...@@ -114,31 +124,12 @@ void indexClose(SIndex* sIdx) {
taosHashCleanup(sIdx->colObj); taosHashCleanup(sIdx->colObj);
taosThreadMutexDestroy(&sIdx->mtx); taosThreadMutexDestroy(&sIdx->mtx);
indexTFileDestroy(sIdx->tindex); indexTFileDestroy(sIdx->tindex);
#endif
taosMemoryFree(sIdx->path); taosMemoryFree(sIdx->path);
taosMemoryFree(sIdx); taosMemoryFree(sIdx);
return; return;
} }
int indexPut(SIndex* index, SIndexMultiTerm* fVals, uint64_t uid) { int indexPut(SIndex* index, SIndexMultiTerm* fVals, uint64_t uid) {
#ifdef USE_LUCENE
index_document_t* doc = index_document_create();
char buf[16] = {0};
sprintf(buf, "%d", uid);
for (int i = 0; i < taosArrayGetSize(fVals); i++) {
SIndexTerm* p = taosArrayGetP(fVals, i);
index_document_add(doc, (const char*)(p->key), p->nKey, (const char*)(p->val), p->nVal, 1);
}
index_document_add(doc, NULL, 0, buf, strlen(buf), 0);
index_put(index->index, doc);
index_document_destroy(doc);
#endif
#ifdef USE_INVERTED_INDEX
// TODO(yihao): reduce the lock range // TODO(yihao): reduce the lock range
taosThreadMutexLock(&index->mtx); taosThreadMutexLock(&index->mtx);
for (int i = 0; i < taosArrayGetSize(fVals); i++) { for (int i = 0; i < taosArrayGetSize(fVals); i++) {
...@@ -170,12 +161,9 @@ int indexPut(SIndex* index, SIndexMultiTerm* fVals, uint64_t uid) { ...@@ -170,12 +161,9 @@ int indexPut(SIndex* index, SIndexMultiTerm* fVals, uint64_t uid) {
return ret; return ret;
} }
} }
#endif
return 0; return 0;
} }
int indexSearch(SIndex* index, SIndexMultiTermQuery* multiQuerys, SArray* result) { int indexSearch(SIndex* index, SIndexMultiTermQuery* multiQuerys, SArray* result) {
#ifdef USE_INVERTED_INDEX
EIndexOperatorType opera = multiQuerys->opera; // relation of querys EIndexOperatorType opera = multiQuerys->opera; // relation of querys
SArray* iRslts = taosArrayInit(4, POINTER_BYTES); SArray* iRslts = taosArrayInit(4, POINTER_BYTES);
...@@ -188,35 +176,14 @@ int indexSearch(SIndex* index, SIndexMultiTermQuery* multiQuerys, SArray* result ...@@ -188,35 +176,14 @@ int indexSearch(SIndex* index, SIndexMultiTermQuery* multiQuerys, SArray* result
} }
indexMergeFinalResults(iRslts, opera, result); indexMergeFinalResults(iRslts, opera, result);
indexInterResultsDestroy(iRslts); indexInterResultsDestroy(iRslts);
#endif
return 0; return 0;
} }
int indexDelete(SIndex* index, SIndexMultiTermQuery* query) { int indexDelete(SIndex* index, SIndexMultiTermQuery* query) { return 1; }
#ifdef USE_INVERTED_INDEX int indexRebuild(SIndex* index, SIndexOpts* opts) { return 0; }
#endif
return 1;
}
int indexRebuild(SIndex* index, SIndexOpts* opts) {
#ifdef USE_INVERTED_INDEX
#endif
return 0; SIndexOpts* indexOptsCreate() { return NULL; }
} void indexOptsDestroy(SIndexOpts* opts) { return; }
SIndexOpts* indexOptsCreate() {
#ifdef USE_LUCENE
#endif
return NULL;
}
void indexOptsDestroy(SIndexOpts* opts) {
#ifdef USE_LUCENE
#endif
return;
}
/* /*
* @param: oper * @param: oper
* *
......
...@@ -403,6 +403,19 @@ TEST_F(JsonEnv, testWriteJsonTfileAndCache) { ...@@ -403,6 +403,19 @@ TEST_F(JsonEnv, testWriteJsonTfileAndCache) {
EXPECT_EQ(1000, taosArrayGetSize(result)); EXPECT_EQ(1000, taosArrayGetSize(result));
indexMultiTermQueryDestroy(mq); indexMultiTermQueryDestroy(mq);
} }
{
std::string colName("other_column");
std::string colVal("100");
SIndexTerm* term = indexTermCreate(1, ADD_VALUE, TSDB_DATA_TYPE_INT, colName.c_str(), colName.size(),
colVal.c_str(), colVal.size());
SIndexMultiTerm* terms = indexMultiTermCreate();
indexMultiTermAdd(terms, term);
for (size_t i = 0; i < 1000; i++) {
tIndexJsonPut(index, terms, i);
}
indexMultiTermDestroy(terms);
}
{ {
std::string colName("test1"); std::string colName("test1");
std::string colVal("10"); std::string colVal("10");
......
...@@ -1112,6 +1112,19 @@ bool nodesIsJsonOp(const SOperatorNode* pOp) { ...@@ -1112,6 +1112,19 @@ bool nodesIsJsonOp(const SOperatorNode* pOp) {
return false; return false;
} }
bool nodesIsRegularOp(const SOperatorNode* pOp) {
switch (pOp->opType) {
case OP_TYPE_LIKE:
case OP_TYPE_NOT_LIKE:
case OP_TYPE_MATCH:
case OP_TYPE_NMATCH:
return true;
default:
break;
}
return false;
}
bool nodesIsTimeorderQuery(const SNode* pQuery) { return false; } bool nodesIsTimeorderQuery(const SNode* pQuery) { return false; }
bool nodesIsTimelineQuery(const SNode* pQuery) { return false; } bool nodesIsTimelineQuery(const SNode* pQuery) { return false; }
......
...@@ -868,9 +868,9 @@ query_expression_body(A) ::= ...@@ -868,9 +868,9 @@ query_expression_body(A) ::=
query_expression_body(B) UNION query_expression_body(D). { A = createSetOperator(pCxt, SET_OP_TYPE_UNION, B, D); } query_expression_body(B) UNION query_expression_body(D). { A = createSetOperator(pCxt, SET_OP_TYPE_UNION, B, D); }
query_primary(A) ::= query_specification(B). { A = B; } query_primary(A) ::= query_specification(B). { A = B; }
//query_primary(A) ::= query_primary(A) ::=
// NK_LP query_expression_body(B) NK_LP query_expression_body(B)
// order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP. { A = B; } order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP. { A = B; }
%type order_by_clause_opt { SNodeList* } %type order_by_clause_opt { SNodeList* }
%destructor order_by_clause_opt { nodesDestroyList($$); } %destructor order_by_clause_opt { nodesDestroyList($$); }
......
...@@ -480,8 +480,8 @@ static EDealRes translateColumn(STranslateContext* pCxt, SColumnNode* pCol) { ...@@ -480,8 +480,8 @@ static EDealRes translateColumn(STranslateContext* pCxt, SColumnNode* pCol) {
return res; return res;
} }
static EDealRes translateValue(STranslateContext* pCxt, SValueNode* pVal) { static EDealRes translateValueImpl(STranslateContext* pCxt, SValueNode* pVal, SDataType targetDt) {
uint8_t precision = (NULL != pCxt->pCurrStmt ? pCxt->pCurrStmt->precision : pVal->node.resType.precision); uint8_t precision = (NULL != pCxt->pCurrStmt ? pCxt->pCurrStmt->precision : targetDt.precision);
pVal->node.resType.precision = precision; pVal->node.resType.precision = precision;
if (pVal->placeholderNo > 0) { if (pVal->placeholderNo > 0) {
return DEAL_RES_CONTINUE; return DEAL_RES_CONTINUE;
...@@ -493,7 +493,7 @@ static EDealRes translateValue(STranslateContext* pCxt, SValueNode* pVal) { ...@@ -493,7 +493,7 @@ static EDealRes translateValue(STranslateContext* pCxt, SValueNode* pVal) {
} }
*(int64_t*)&pVal->typeData = pVal->datum.i; *(int64_t*)&pVal->typeData = pVal->datum.i;
} else { } else {
switch (pVal->node.resType.type) { switch (targetDt.type) {
case TSDB_DATA_TYPE_NULL: case TSDB_DATA_TYPE_NULL:
break; break;
case TSDB_DATA_TYPE_BOOL: case TSDB_DATA_TYPE_BOOL:
...@@ -562,35 +562,54 @@ static EDealRes translateValue(STranslateContext* pCxt, SValueNode* pVal) { ...@@ -562,35 +562,54 @@ static EDealRes translateValue(STranslateContext* pCxt, SValueNode* pVal) {
} }
case TSDB_DATA_TYPE_VARCHAR: case TSDB_DATA_TYPE_VARCHAR:
case TSDB_DATA_TYPE_VARBINARY: { case TSDB_DATA_TYPE_VARBINARY: {
pVal->datum.p = taosMemoryCalloc(1, pVal->node.resType.bytes + VARSTR_HEADER_SIZE + 1); pVal->datum.p = taosMemoryCalloc(1, targetDt.bytes + VARSTR_HEADER_SIZE + 1);
if (NULL == pVal->datum.p) { if (NULL == pVal->datum.p) {
return generateDealNodeErrMsg(pCxt, TSDB_CODE_OUT_OF_MEMORY); return generateDealNodeErrMsg(pCxt, TSDB_CODE_OUT_OF_MEMORY);
} }
varDataSetLen(pVal->datum.p, pVal->node.resType.bytes); varDataSetLen(pVal->datum.p, targetDt.bytes);
strncpy(varDataVal(pVal->datum.p), pVal->literal, pVal->node.resType.bytes); strncpy(varDataVal(pVal->datum.p), pVal->literal, targetDt.bytes);
break; break;
} }
case TSDB_DATA_TYPE_TIMESTAMP: { case TSDB_DATA_TYPE_TIMESTAMP: {
if (taosParseTime(pVal->literal, &pVal->datum.i, pVal->node.resType.bytes, precision, tsDaylight) != if (taosParseTime(pVal->literal, &pVal->datum.i, targetDt.bytes, precision, tsDaylight) != TSDB_CODE_SUCCESS) {
TSDB_CODE_SUCCESS) {
return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_WRONG_VALUE_TYPE, pVal->literal); return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_WRONG_VALUE_TYPE, pVal->literal);
} }
*(int64_t*)&pVal->typeData = pVal->datum.i; *(int64_t*)&pVal->typeData = pVal->datum.i;
break; break;
} }
case TSDB_DATA_TYPE_NCHAR: case TSDB_DATA_TYPE_NCHAR: {
int32_t bytes = targetDt.bytes * TSDB_NCHAR_SIZE;
pVal->datum.p = taosMemoryCalloc(1, bytes + VARSTR_HEADER_SIZE + 1);
if (NULL == pVal->datum.p) {
return generateDealNodeErrMsg(pCxt, TSDB_CODE_OUT_OF_MEMORY);
;
}
int32_t output = 0;
if (!taosMbsToUcs4(pVal->literal, pVal->node.resType.bytes, (TdUcs4*)varDataVal(pVal->datum.p), bytes,
&output)) {
return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_WRONG_VALUE_TYPE, pVal->literal);
}
varDataSetLen(pVal->datum.p, output);
break;
}
case TSDB_DATA_TYPE_JSON: case TSDB_DATA_TYPE_JSON:
case TSDB_DATA_TYPE_DECIMAL: case TSDB_DATA_TYPE_DECIMAL:
case TSDB_DATA_TYPE_BLOB: case TSDB_DATA_TYPE_BLOB:
// todo return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_WRONG_VALUE_TYPE, pVal->literal);
default: default:
break; break;
} }
} }
pVal->node.resType = targetDt;
pVal->translate = true; pVal->translate = true;
return DEAL_RES_CONTINUE; return DEAL_RES_CONTINUE;
} }
static EDealRes translateValue(STranslateContext* pCxt, SValueNode* pVal) {
return translateValueImpl(pCxt, pVal, pVal->node.resType);
}
static EDealRes translateOperator(STranslateContext* pCxt, SOperatorNode* pOp) { static EDealRes translateOperator(STranslateContext* pCxt, SOperatorNode* pOp) {
if (nodesIsUnaryOp(pOp)) { if (nodesIsUnaryOp(pOp)) {
if (OP_TYPE_MINUS == pOp->opType) { if (OP_TYPE_MINUS == pOp->opType) {
...@@ -635,6 +654,14 @@ static EDealRes translateOperator(STranslateContext* pCxt, SOperatorNode* pOp) { ...@@ -635,6 +654,14 @@ static EDealRes translateOperator(STranslateContext* pCxt, SOperatorNode* pOp) {
if (OP_TYPE_IN == pOp->opType || OP_TYPE_NOT_IN == pOp->opType) { if (OP_TYPE_IN == pOp->opType || OP_TYPE_NOT_IN == pOp->opType) {
((SExprNode*)pOp->pRight)->resType = ((SExprNode*)pOp->pLeft)->resType; ((SExprNode*)pOp->pRight)->resType = ((SExprNode*)pOp->pLeft)->resType;
} }
if (nodesIsRegularOp(pOp)) {
if (!IS_STR_DATA_TYPE(((SExprNode*)(pOp->pLeft))->resType.type)) {
return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_WRONG_VALUE_TYPE, ((SExprNode*)(pOp->pLeft))->aliasName);
}
if (QUERY_NODE_VALUE != nodeType(pOp->pRight) || !IS_STR_DATA_TYPE(((SExprNode*)(pOp->pRight))->resType.type)) {
return generateDealNodeErrMsg(pCxt, TSDB_CODE_PAR_WRONG_VALUE_TYPE, ((SExprNode*)(pOp->pRight))->aliasName);
}
}
pOp->node.resType.type = TSDB_DATA_TYPE_BOOL; pOp->node.resType.type = TSDB_DATA_TYPE_BOOL;
pOp->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_BOOL].bytes; pOp->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_BOOL].bytes;
} else if (nodesIsJsonOp(pOp)) { } else if (nodesIsJsonOp(pOp)) {
...@@ -3844,7 +3871,7 @@ static int32_t addValToKVRow(STranslateContext* pCxt, SValueNode* pVal, const SS ...@@ -3844,7 +3871,7 @@ static int32_t addValToKVRow(STranslateContext* pCxt, SValueNode* pVal, const SS
if (pVal->node.resType.type == TSDB_DATA_TYPE_NULL) { if (pVal->node.resType.type == TSDB_DATA_TYPE_NULL) {
// todo // todo
} else { } else {
tdAddColToKVRow(pBuilder, pSchema->colId, &(pVal->datum.p), tdAddColToKVRow(pBuilder, pSchema->colId, nodesGetValueFromNode(pVal),
IS_VAR_DATA_TYPE(pSchema->type) ? varDataTLen(pVal->datum.p) : TYPE_BYTES[pSchema->type]); IS_VAR_DATA_TYPE(pSchema->type) ? varDataTLen(pVal->datum.p) : TYPE_BYTES[pSchema->type]);
} }
...@@ -3858,11 +3885,23 @@ static int32_t createValueFromFunction(STranslateContext* pCxt, SFunctionNode* p ...@@ -3858,11 +3885,23 @@ static int32_t createValueFromFunction(STranslateContext* pCxt, SFunctionNode* p
return scalarCalculateConstants((SNode*)pFunc, (SNode**)pVal); return scalarCalculateConstants((SNode*)pFunc, (SNode**)pVal);
} }
static int32_t translateTagVal(STranslateContext* pCxt, SNode* pNode, SValueNode** pVal) { static SDataType schemaToDataType(SSchema* pSchema) {
SDataType dt = {.type = pSchema->type, .bytes = pSchema->bytes, .precision = 0, .scale = 0};
if (TSDB_DATA_TYPE_VARCHAR == dt.type || TSDB_DATA_TYPE_BINARY == dt.type || TSDB_DATA_TYPE_VARBINARY == dt.type) {
dt.bytes -= VARSTR_HEADER_SIZE;
} else if (TSDB_DATA_TYPE_NCHAR == dt.type) {
dt.bytes = (dt.bytes - VARSTR_HEADER_SIZE) / TSDB_NCHAR_SIZE;
}
return dt;
}
static int32_t translateTagVal(STranslateContext* pCxt, SSchema* pSchema, SNode* pNode, SValueNode** pVal) {
if (QUERY_NODE_FUNCTION == nodeType(pNode)) { if (QUERY_NODE_FUNCTION == nodeType(pNode)) {
return createValueFromFunction(pCxt, (SFunctionNode*)pNode, pVal); return createValueFromFunction(pCxt, (SFunctionNode*)pNode, pVal);
} else if (QUERY_NODE_VALUE == nodeType(pNode)) { } else if (QUERY_NODE_VALUE == nodeType(pNode)) {
return (DEAL_RES_ERROR == translateValue(pCxt, (SValueNode*)pNode) ? pCxt->errCode : TSDB_CODE_SUCCESS); return (DEAL_RES_ERROR == translateValueImpl(pCxt, (SValueNode*)pNode, schemaToDataType(pSchema))
? pCxt->errCode
: TSDB_CODE_SUCCESS);
} else { } else {
return TSDB_CODE_FAILED; return TSDB_CODE_FAILED;
} }
...@@ -3891,7 +3930,7 @@ static int32_t buildKVRowForBindTags(STranslateContext* pCxt, SCreateSubTableCla ...@@ -3891,7 +3930,7 @@ static int32_t buildKVRowForBindTags(STranslateContext* pCxt, SCreateSubTableCla
return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TAG_NAME, pCol->colName); return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_TAG_NAME, pCol->colName);
} }
SValueNode* pVal = NULL; SValueNode* pVal = NULL;
int32_t code = translateTagVal(pCxt, pNode, &pVal); int32_t code = translateTagVal(pCxt, pSchema, pNode, &pVal);
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
if (NULL == pVal) { if (NULL == pVal) {
pVal = (SValueNode*)pNode; pVal = (SValueNode*)pNode;
...@@ -3921,7 +3960,7 @@ static int32_t buildKVRowForAllTags(STranslateContext* pCxt, SCreateSubTableClau ...@@ -3921,7 +3960,7 @@ static int32_t buildKVRowForAllTags(STranslateContext* pCxt, SCreateSubTableClau
int32_t index = 0; int32_t index = 0;
FOREACH(pNode, pStmt->pValsOfTags) { FOREACH(pNode, pStmt->pValsOfTags) {
SValueNode* pVal = NULL; SValueNode* pVal = NULL;
int32_t code = translateTagVal(pCxt, pNode, &pVal); int32_t code = translateTagVal(pCxt, pTagSchema + index, pNode, &pVal);
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
if (NULL == pVal) { if (NULL == pVal) {
pVal = (SValueNode*)pNode; pVal = (SValueNode*)pNode;
......
...@@ -134,17 +134,17 @@ typedef union { ...@@ -134,17 +134,17 @@ typedef union {
#define ParseCTX_FETCH #define ParseCTX_FETCH
#define ParseCTX_STORE #define ParseCTX_STORE
#define YYFALLBACK 1 #define YYFALLBACK 1
#define YYNSTATE 591 #define YYNSTATE 603
#define YYNRULE 450 #define YYNRULE 451
#define YYNTOKEN 238 #define YYNTOKEN 238
#define YY_MAX_SHIFT 590 #define YY_MAX_SHIFT 602
#define YY_MIN_SHIFTREDUCE 877 #define YY_MIN_SHIFTREDUCE 890
#define YY_MAX_SHIFTREDUCE 1326 #define YY_MAX_SHIFTREDUCE 1340
#define YY_ERROR_ACTION 1327 #define YY_ERROR_ACTION 1341
#define YY_ACCEPT_ACTION 1328 #define YY_ACCEPT_ACTION 1342
#define YY_NO_ACTION 1329 #define YY_NO_ACTION 1343
#define YY_MIN_REDUCE 1330 #define YY_MIN_REDUCE 1344
#define YY_MAX_REDUCE 1779 #define YY_MAX_REDUCE 1794
/************* End control #defines *******************************************/ /************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0]))) #define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
...@@ -211,219 +211,225 @@ typedef union { ...@@ -211,219 +211,225 @@ typedef union {
** yy_default[] Default action for each state. ** yy_default[] Default action for each state.
** **
*********** Begin parsing tables **********************************************/ *********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (2104) #define YY_ACTTAB_COUNT (2167)
static const YYACTIONTYPE yy_action[] = { static const YYACTIONTYPE yy_action[] = {
/* 0 */ 372, 72, 373, 1362, 380, 505, 373, 1362, 1613, 26, /* 0 */ 382, 76, 383, 1376, 390, 517, 383, 1376, 1627, 28,
/* 10 */ 211, 1449, 33, 31, 109, 1445, 332, 336, 1628, 1758, /* 10 */ 221, 1463, 35, 33, 113, 1459, 342, 346, 1642, 1772,
/* 20 */ 290, 1452, 1143, 1609, 1617, 1615, 34, 32, 30, 29, /* 20 */ 300, 1466, 1156, 1623, 1631, 1629, 36, 34, 32, 31,
/* 30 */ 28, 1710, 1757, 1460, 90, 508, 1755, 89, 88, 87, /* 30 */ 30, 1724, 1771, 1474, 94, 520, 1769, 93, 92, 91,
/* 40 */ 86, 85, 84, 83, 82, 81, 1644, 1141, 1505, 281, /* 40 */ 90, 89, 88, 87, 86, 85, 1658, 1154, 1519, 291,
/* 50 */ 30, 29, 28, 489, 280, 1707, 1758, 467, 12, 1503, /* 50 */ 32, 31, 30, 501, 290, 1721, 1772, 477, 14, 1517,
/* 60 */ 33, 31, 1268, 488, 1149, 504, 1613, 1599, 290, 140, /* 60 */ 35, 33, 1281, 500, 1162, 516, 1627, 1613, 300, 144,
/* 70 */ 1143, 1451, 263, 1755, 504, 34, 32, 30, 29, 28, /* 70 */ 1156, 348, 273, 1769, 397, 36, 34, 32, 31, 30,
/* 80 */ 1, 1609, 1616, 1615, 1656, 108, 22, 128, 1629, 491, /* 80 */ 1, 1623, 1630, 1629, 1670, 112, 24, 132, 1643, 503,
/* 90 */ 1631, 1632, 487, 508, 508, 1141, 34, 32, 30, 29, /* 90 */ 1645, 1646, 499, 520, 520, 1154, 36, 34, 32, 31,
/* 100 */ 28, 56, 587, 1230, 1644, 471, 12, 505, 33, 31, /* 100 */ 30, 61, 599, 1243, 270, 481, 14, 517, 35, 33,
/* 110 */ 1353, 489, 1149, 1142, 104, 504, 290, 1758, 1143, 100, /* 110 */ 595, 594, 1162, 1155, 108, 516, 300, 304, 1156, 104,
/* 120 */ 1599, 263, 1455, 106, 338, 36, 408, 126, 1, 1342, /* 120 */ 1178, 273, 1469, 110, 936, 128, 418, 130, 2, 1356,
/* 130 */ 1756, 472, 1771, 127, 1755, 1460, 505, 1417, 204, 1703, /* 130 */ 54, 482, 1786, 1476, 1772, 1474, 517, 69, 210, 1717,
/* 140 */ 466, 1330, 465, 1141, 1180, 1758, 371, 460, 100, 375, /* 140 */ 476, 1344, 475, 1154, 1193, 1772, 1772, 145, 104, 416,
/* 150 */ 587, 1165, 1230, 1231, 12, 413, 1144, 260, 140, 1599, /* 150 */ 599, 1769, 1243, 1244, 14, 423, 1157, 1467, 146, 1770,
/* 160 */ 1149, 1142, 1755, 556, 1460, 99, 98, 97, 96, 95, /* 160 */ 1162, 1155, 1769, 1769, 1474, 103, 102, 101, 100, 99,
/* 170 */ 94, 93, 92, 91, 1236, 36, 1, 540, 1147, 1148, /* 170 */ 98, 97, 96, 95, 1249, 38, 2, 552, 1160, 1161,
/* 180 */ 457, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 484, 506, /* 180 */ 54, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 496, 518,
/* 190 */ 1207, 1208, 1209, 1210, 1211, 1212, 539, 538, 587, 537, /* 190 */ 1220, 1221, 1222, 1223, 1224, 1225, 551, 550, 599, 549,
/* 200 */ 536, 535, 1231, 326, 1144, 331, 1292, 330, 141, 1142, /* 200 */ 548, 547, 1244, 493, 1157, 341, 1305, 340, 147, 1155,
/* 210 */ 25, 288, 1225, 1226, 1227, 1228, 1229, 1233, 1234, 1235, /* 210 */ 27, 298, 1238, 1239, 1240, 1241, 1242, 1246, 1247, 1248,
/* 220 */ 583, 582, 492, 1236, 1352, 293, 1147, 1148, 1550, 1193, /* 220 */ 131, 1180, 504, 1249, 1431, 303, 1160, 1161, 1564, 1206,
/* 230 */ 1194, 1195, 1196, 1197, 1198, 1199, 484, 506, 1207, 1208, /* 230 */ 1207, 1208, 1209, 1210, 1211, 1212, 496, 518, 1220, 1221,
/* 240 */ 1209, 1210, 1211, 1212, 1389, 454, 1290, 1291, 1293, 1294, /* 240 */ 1222, 1223, 1224, 1225, 1403, 464, 1303, 1304, 1306, 1307,
/* 250 */ 462, 458, 1144, 34, 32, 30, 29, 28, 141, 25, /* 250 */ 55, 54, 1157, 36, 34, 32, 31, 30, 147, 27,
/* 260 */ 288, 1225, 1226, 1227, 1228, 1229, 1233, 1234, 1235, 9, /* 260 */ 298, 1238, 1239, 1240, 1241, 1242, 1246, 1247, 1248, 63,
/* 270 */ 8, 467, 1438, 1599, 1147, 1148, 1328, 1193, 1194, 1195, /* 270 */ 288, 477, 554, 187, 1160, 1161, 1342, 1206, 1207, 1208,
/* 280 */ 1196, 1197, 1198, 1199, 484, 506, 1207, 1208, 1209, 1210, /* 280 */ 1209, 1210, 1211, 1212, 496, 518, 1220, 1221, 1222, 1223,
/* 290 */ 1211, 1212, 33, 31, 34, 32, 30, 29, 28, 108, /* 290 */ 1224, 1225, 35, 33, 36, 34, 32, 31, 30, 112,
/* 300 */ 290, 1436, 1143, 141, 563, 562, 561, 305, 907, 560, /* 300 */ 300, 1452, 1156, 147, 575, 574, 573, 315, 147, 572,
/* 310 */ 559, 558, 110, 553, 552, 551, 550, 549, 548, 547, /* 310 */ 571, 570, 114, 565, 564, 563, 562, 561, 560, 559,
/* 320 */ 546, 117, 1282, 1351, 1505, 302, 924, 1141, 923, 387, /* 320 */ 558, 121, 1295, 1235, 1519, 312, 54, 1154, 988, 1658,
/* 330 */ 295, 1628, 1541, 1543, 306, 1503, 1538, 106, 141, 141, /* 330 */ 305, 1642, 1555, 1557, 316, 1517, 501, 110, 138, 310,
/* 340 */ 33, 31, 1213, 149, 1149, 61, 911, 912, 290, 1244, /* 340 */ 35, 33, 1226, 471, 1162, 990, 920, 128, 300, 1513,
/* 350 */ 1143, 469, 136, 1703, 1704, 925, 1708, 24, 542, 1644, /* 350 */ 1156, 479, 140, 1717, 1718, 1476, 1722, 26, 397, 1658,
/* 360 */ 7, 34, 32, 30, 29, 28, 489, 34, 32, 30, /* 360 */ 8, 36, 34, 32, 31, 30, 501, 36, 34, 32,
/* 370 */ 29, 28, 1599, 1505, 1758, 1141, 488, 1392, 294, 301, /* 370 */ 31, 30, 470, 467, 1772, 1154, 500, 1406, 313, 147,
/* 380 */ 1599, 50, 587, 451, 1503, 1167, 124, 140, 33, 31, /* 380 */ 1613, 53, 599, 461, 924, 925, 128, 144, 35, 33,
/* 390 */ 323, 1755, 1149, 1142, 1462, 1350, 290, 1656, 1143, 461, /* 390 */ 333, 1769, 1162, 1155, 1476, 516, 300, 1670, 1156, 1182,
/* 400 */ 257, 1629, 491, 1631, 1632, 487, 379, 508, 7, 375, /* 400 */ 267, 1643, 503, 1645, 1646, 499, 381, 520, 9, 385,
/* 410 */ 325, 321, 1013, 531, 530, 529, 1017, 528, 1019, 1020, /* 410 */ 335, 331, 1026, 543, 542, 541, 1030, 540, 1032, 1033,
/* 420 */ 527, 1022, 524, 1141, 1028, 521, 1030, 1031, 518, 515, /* 420 */ 539, 1035, 536, 1154, 1041, 533, 1043, 1044, 530, 527,
/* 430 */ 587, 34, 32, 30, 29, 28, 1144, 422, 421, 300, /* 430 */ 599, 36, 34, 32, 31, 30, 1157, 432, 431, 128,
/* 440 */ 1149, 1142, 420, 1168, 1599, 105, 417, 124, 505, 416, /* 440 */ 1162, 1155, 430, 472, 468, 109, 427, 1477, 517, 426,
/* 450 */ 415, 414, 387, 58, 278, 1462, 7, 181, 1147, 1148, /* 450 */ 425, 424, 1183, 153, 147, 39, 9, 1724, 1160, 1161,
/* 460 */ 337, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 484, 506, /* 460 */ 347, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 496, 518,
/* 470 */ 1207, 1208, 1209, 1210, 1211, 1212, 1460, 1104, 587, 419, /* 470 */ 1220, 1221, 1222, 1223, 1224, 1225, 1474, 59, 599, 387,
/* 480 */ 418, 1232, 422, 421, 1144, 1106, 1349, 420, 141, 1142, /* 480 */ 58, 1720, 432, 431, 1157, 1178, 1465, 430, 147, 1155,
/* 490 */ 105, 417, 362, 436, 416, 415, 414, 1323, 377, 1588, /* 490 */ 109, 427, 1519, 446, 426, 425, 424, 1337, 311, 546,
/* 500 */ 1180, 1143, 1237, 542, 1165, 444, 1147, 1148, 298, 1193, /* 500 */ 1193, 1156, 1367, 1517, 372, 454, 1160, 1161, 308, 1206,
/* 510 */ 1194, 1195, 1196, 1197, 1198, 1199, 484, 506, 1207, 1208, /* 510 */ 1207, 1208, 1209, 1210, 1211, 1212, 496, 518, 1220, 1221,
/* 520 */ 1209, 1210, 1211, 1212, 147, 1613, 1141, 34, 32, 30, /* 520 */ 1222, 1223, 1224, 1225, 212, 1627, 1154, 36, 34, 32,
/* 530 */ 29, 28, 1144, 1758, 434, 1599, 151, 150, 23, 1348, /* 530 */ 31, 30, 1157, 1772, 389, 1613, 1519, 385, 504, 1366,
/* 540 */ 1609, 1616, 1615, 1149, 313, 1105, 140, 432, 54, 141, /* 540 */ 1623, 1630, 1629, 1162, 1565, 1365, 144, 1518, 157, 156,
/* 550 */ 1755, 53, 508, 445, 1147, 1148, 1628, 1193, 1194, 1195, /* 550 */ 1769, 1613, 520, 455, 1160, 1161, 1642, 1206, 1207, 1208,
/* 560 */ 1196, 1197, 1198, 1199, 484, 506, 1207, 1208, 1209, 1210, /* 560 */ 1209, 1210, 1211, 1212, 496, 518, 1220, 1221, 1222, 1223,
/* 570 */ 1211, 1212, 33, 31, 259, 71, 1165, 975, 1322, 303, /* 570 */ 1224, 1225, 35, 33, 269, 517, 1178, 198, 1336, 61,
/* 580 */ 290, 587, 1143, 355, 1644, 67, 367, 124, 1599, 134, /* 580 */ 300, 599, 1156, 365, 1658, 517, 377, 357, 1613, 429,
/* 590 */ 1169, 489, 1142, 1758, 977, 1462, 167, 1347, 1346, 1345, /* 590 */ 428, 501, 1155, 1772, 1613, 1364, 173, 514, 1363, 1362,
/* 600 */ 1499, 488, 473, 1344, 368, 1599, 140, 1141, 133, 505, /* 600 */ 1470, 500, 483, 1474, 378, 1613, 144, 1154, 137, 517,
/* 610 */ 1755, 471, 1341, 56, 404, 400, 396, 392, 166, 272, /* 610 */ 1769, 481, 1361, 1474, 414, 410, 406, 402, 172, 282,
/* 620 */ 1710, 347, 1656, 1267, 1149, 248, 1629, 491, 1631, 1632, /* 620 */ 1181, 358, 1670, 1280, 1162, 258, 1643, 503, 1645, 1646,
/* 630 */ 487, 505, 508, 124, 1456, 1144, 65, 1460, 467, 1710, /* 630 */ 499, 517, 520, 1117, 937, 1157, 936, 1474, 477, 1450,
/* 640 */ 1, 1463, 57, 348, 1706, 164, 1599, 1599, 1599, 557, /* 640 */ 2, 1119, 62, 396, 1613, 170, 1360, 1613, 1613, 569,
/* 650 */ 555, 1758, 1599, 1340, 1542, 1543, 1453, 1147, 1148, 1460, /* 650 */ 567, 1772, 1179, 11, 10, 1556, 1557, 1160, 1161, 1474,
/* 660 */ 123, 1599, 587, 1705, 140, 1339, 108, 273, 1755, 271, /* 660 */ 127, 1613, 599, 938, 146, 1359, 112, 283, 1769, 281,
/* 670 */ 270, 923, 410, 1142, 366, 1338, 412, 361, 360, 359, /* 670 */ 280, 7, 420, 1155, 376, 1358, 422, 371, 370, 369,
/* 680 */ 358, 357, 354, 353, 352, 351, 350, 346, 345, 344, /* 680 */ 368, 367, 364, 363, 362, 361, 360, 356, 355, 354,
/* 690 */ 343, 342, 341, 340, 339, 492, 406, 505, 505, 411, /* 690 */ 353, 352, 351, 350, 349, 1613, 554, 517, 517, 421,
/* 700 */ 505, 1551, 1599, 163, 106, 158, 1170, 160, 467, 386, /* 700 */ 517, 1118, 485, 169, 110, 164, 1451, 166, 477, 1471,
/* 710 */ 1457, 1505, 1579, 1337, 1599, 206, 1144, 1336, 1335, 137, /* 710 */ 1593, 1355, 515, 1245, 1613, 1354, 1157, 1353, 1352, 141,
/* 720 */ 1703, 1704, 1504, 1708, 1599, 1460, 1460, 156, 1460, 1334, /* 720 */ 1717, 1718, 444, 1722, 1613, 1474, 1474, 162, 1474, 1351,
/* 730 */ 1628, 1333, 235, 911, 912, 1490, 108, 1437, 1147, 1148, /* 730 */ 1642, 1350, 1349, 1257, 1250, 442, 112, 1348, 1160, 1161,
/* 740 */ 412, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 484, 506, /* 740 */ 422, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 496, 518,
/* 750 */ 1207, 1208, 1209, 1210, 1211, 1212, 505, 6, 1644, 505, /* 750 */ 1220, 1221, 1222, 1223, 1224, 1225, 517, 568, 1658, 517,
/* 760 */ 505, 1166, 1599, 411, 505, 489, 1599, 1599, 502, 1128, /* 760 */ 1613, 1347, 1552, 421, 1613, 501, 1613, 1613, 235, 155,
/* 770 */ 1129, 503, 225, 477, 106, 488, 304, 474, 1599, 1599, /* 770 */ 25, 314, 924, 925, 110, 500, 1729, 1276, 1613, 1613,
/* 780 */ 1599, 545, 544, 1432, 1460, 471, 1379, 1460, 1460, 138, /* 780 */ 1613, 1613, 1288, 1724, 1474, 481, 1613, 1474, 1180, 142,
/* 790 */ 1703, 1704, 1460, 1708, 1715, 1263, 1656, 43, 261, 75, /* 790 */ 1717, 1718, 245, 1722, 1602, 1504, 1670, 336, 552, 79,
/* 800 */ 1629, 491, 1631, 1632, 487, 1628, 508, 114, 423, 1696, /* 800 */ 1643, 503, 1645, 1646, 499, 1642, 520, 1719, 178, 1710,
/* 810 */ 1275, 1218, 172, 262, 1692, 170, 1167, 1167, 125, 174, /* 810 */ 1613, 176, 180, 272, 1706, 179, 182, 551, 550, 181,
/* 820 */ 9, 8, 173, 241, 1374, 1758, 481, 176, 1266, 540, /* 820 */ 549, 548, 547, 1393, 557, 1772, 1446, 184, 1279, 1231,
/* 830 */ 175, 192, 42, 1644, 1331, 239, 49, 1152, 140, 48, /* 830 */ 183, 1388, 118, 1658, 1386, 1180, 1141, 1142, 146, 323,
/* 840 */ 470, 178, 1755, 195, 177, 1372, 425, 446, 539, 538, /* 840 */ 501, 1276, 1769, 45, 129, 433, 201, 46, 271, 251,
/* 850 */ 488, 537, 536, 535, 1599, 90, 152, 1619, 89, 88, /* 850 */ 500, 11, 10, 435, 1613, 1633, 438, 1339, 1340, 37,
/* 860 */ 87, 86, 85, 84, 83, 82, 81, 428, 534, 1628, /* 860 */ 481, 249, 52, 488, 556, 51, 1642, 1461, 37, 1457,
/* 870 */ 1151, 1656, 1289, 35, 76, 1629, 491, 1631, 1632, 487, /* 870 */ 37, 1670, 456, 190, 79, 1643, 503, 1645, 1646, 499,
/* 880 */ 35, 508, 948, 197, 1696, 1325, 1326, 1447, 283, 1692, /* 880 */ 437, 520, 158, 1302, 1710, 224, 203, 486, 272, 1706,
/* 890 */ 135, 1443, 184, 1621, 35, 483, 590, 1644, 443, 949, /* 890 */ 116, 1635, 75, 117, 1658, 445, 495, 545, 1357, 1251,
/* 900 */ 533, 1343, 207, 1155, 489, 1418, 208, 214, 450, 1723, /* 900 */ 1772, 480, 71, 453, 118, 1165, 54, 1164, 1213, 186,
/* 910 */ 229, 437, 42, 1238, 488, 112, 1628, 74, 1599, 455, /* 910 */ 1112, 500, 45, 144, 216, 1613, 1449, 1769, 1432, 1642,
/* 920 */ 1200, 201, 101, 113, 1363, 405, 114, 1263, 579, 575, /* 920 */ 525, 440, 117, 465, 447, 226, 434, 118, 207, 1377,
/* 930 */ 571, 567, 228, 1500, 1099, 1656, 1154, 468, 128, 1629, /* 930 */ 509, 185, 1670, 232, 415, 80, 1643, 503, 1645, 1646,
/* 940 */ 491, 1631, 1632, 487, 1644, 508, 1222, 216, 52, 51, /* 940 */ 499, 119, 520, 78, 1019, 1710, 117, 1658, 1659, 293,
/* 950 */ 335, 470, 234, 146, 513, 497, 73, 113, 329, 223, /* 950 */ 1706, 139, 244, 1514, 501, 50, 1740, 478, 49, 215,
/* 960 */ 478, 488, 475, 222, 114, 1599, 1006, 1726, 1645, 2, /* 960 */ 1047, 961, 1051, 213, 500, 218, 220, 1058, 1613, 460,
/* 970 */ 258, 115, 113, 319, 210, 315, 311, 143, 1165, 308, /* 970 */ 1737, 1168, 1642, 1167, 57, 56, 345, 3, 962, 152,
/* 980 */ 312, 1628, 1656, 1772, 268, 76, 1629, 491, 1631, 1632, /* 980 */ 1178, 1056, 318, 322, 339, 1670, 120, 278, 262, 1643,
/* 990 */ 487, 975, 508, 501, 1034, 1696, 1112, 1038, 230, 283, /* 990 */ 503, 1645, 1646, 499, 988, 520, 268, 279, 359, 329,
/* 1000 */ 1692, 135, 269, 349, 1045, 148, 1540, 356, 141, 1644, /* 1000 */ 1658, 325, 321, 149, 240, 1125, 1554, 480, 552, 154,
/* 1010 */ 369, 1043, 116, 1171, 364, 363, 489, 370, 449, 378, /* 1010 */ 366, 374, 379, 1184, 380, 373, 388, 500, 375, 1187,
/* 1020 */ 1724, 188, 1174, 381, 365, 155, 488, 1173, 157, 384, /* 1020 */ 391, 1613, 161, 392, 1186, 163, 473, 551, 550, 393,
/* 1030 */ 1599, 382, 383, 159, 1172, 385, 162, 55, 165, 1120, /* 1030 */ 549, 548, 547, 165, 147, 394, 1185, 168, 1670, 1345,
/* 1040 */ 388, 183, 1628, 1435, 427, 1149, 407, 1656, 409, 277, /* 1040 */ 395, 80, 1643, 503, 1645, 1646, 499, 1642, 520, 60,
/* 1050 */ 76, 1629, 491, 1631, 1632, 487, 1450, 508, 169, 435, /* 1050 */ 489, 1710, 398, 417, 171, 293, 1706, 139, 419, 1464,
/* 1060 */ 1696, 1583, 1446, 171, 283, 1692, 1770, 118, 119, 80, /* 1060 */ 94, 175, 1460, 93, 92, 91, 90, 89, 88, 87,
/* 1070 */ 1644, 231, 232, 180, 1448, 1730, 1444, 489, 120, 121, /* 1070 */ 86, 85, 177, 84, 1162, 1658, 1738, 122, 123, 287,
/* 1080 */ 182, 438, 439, 1170, 185, 430, 456, 488, 187, 190, /* 1080 */ 1642, 188, 501, 1462, 241, 1458, 124, 1597, 125, 448,
/* 1090 */ 424, 1599, 447, 495, 442, 179, 1628, 1727, 448, 5, /* 1090 */ 1183, 191, 500, 452, 193, 449, 1613, 457, 196, 466,
/* 1100 */ 1737, 464, 1736, 193, 453, 200, 196, 282, 1656, 452, /* 1100 */ 1751, 1750, 507, 6, 1731, 206, 474, 242, 1658, 462,
/* 1110 */ 459, 76, 1629, 491, 1631, 1632, 487, 4, 508, 46, /* 1110 */ 463, 458, 5, 1670, 135, 501, 80, 1643, 503, 1645,
/* 1120 */ 202, 1696, 45, 107, 1644, 283, 1692, 1770, 1263, 1169, /* 1120 */ 1646, 499, 292, 520, 199, 500, 1710, 208, 202, 1613,
/* 1130 */ 1711, 489, 37, 284, 16, 540, 1753, 479, 1717, 476, /* 1130 */ 293, 1706, 1785, 111, 1276, 469, 1182, 1741, 40, 490,
/* 1140 */ 1549, 488, 493, 498, 131, 1599, 494, 500, 1548, 292, /* 1140 */ 487, 1744, 1642, 1725, 1788, 18, 1670, 294, 510, 80,
/* 1150 */ 1628, 1677, 203, 499, 539, 538, 218, 537, 536, 535, /* 1150 */ 1643, 503, 1645, 1646, 499, 1563, 520, 505, 506, 1710,
/* 1160 */ 233, 66, 1656, 220, 1461, 76, 1629, 491, 1631, 1632, /* 1160 */ 1562, 511, 512, 293, 1706, 1785, 228, 302, 209, 230,
/* 1170 */ 487, 64, 508, 511, 1433, 1696, 236, 227, 1644, 283, /* 1170 */ 1658, 243, 68, 1475, 1767, 70, 523, 501, 1691, 1447,
/* 1180 */ 1692, 1770, 1628, 1773, 44, 489, 586, 279, 1754, 130, /* 1180 */ 246, 237, 598, 47, 134, 252, 289, 500, 259, 248,
/* 1190 */ 1714, 209, 242, 240, 238, 488, 249, 243, 1593, 1599, /* 1190 */ 1768, 1613, 253, 214, 1607, 250, 1642, 1606, 484, 217,
/* 1200 */ 1628, 1592, 307, 1589, 309, 310, 1137, 1138, 144, 314, /* 1200 */ 317, 1603, 319, 320, 219, 1642, 491, 1150, 1670, 1151,
/* 1210 */ 1644, 1587, 316, 317, 1586, 318, 1656, 489, 320, 77, /* 1210 */ 150, 80, 1643, 503, 1645, 1646, 499, 324, 520, 1601,
/* 1220 */ 1629, 491, 1631, 1632, 487, 1585, 508, 488, 1644, 1696, /* 1220 */ 326, 1710, 327, 328, 1658, 293, 1706, 1785, 1600, 330,
/* 1230 */ 322, 1599, 1628, 1695, 1692, 489, 1584, 324, 1569, 327, /* 1230 */ 1599, 501, 332, 1658, 1598, 334, 1728, 1583, 151, 337,
/* 1240 */ 1115, 328, 145, 1114, 1563, 488, 1562, 333, 1656, 1599, /* 1240 */ 501, 500, 338, 1128, 1127, 1613, 343, 344, 1575, 1574,
/* 1250 */ 1628, 244, 1629, 491, 1631, 1632, 487, 334, 508, 1561, /* 1250 */ 500, 1577, 1576, 1095, 1613, 1547, 1546, 1545, 1544, 1642,
/* 1260 */ 1644, 1560, 1082, 1533, 1532, 1531, 1656, 486, 1530, 77, /* 1260 */ 481, 1543, 1670, 1542, 1541, 132, 1643, 503, 1645, 1646,
/* 1270 */ 1629, 491, 1631, 1632, 487, 1529, 508, 488, 1644, 1696, /* 1270 */ 499, 1670, 520, 1540, 258, 1643, 503, 1645, 1646, 499,
/* 1280 */ 1528, 1599, 1527, 480, 1692, 489, 1526, 1525, 1524, 1523, /* 1280 */ 1539, 520, 1538, 1537, 1536, 1535, 1534, 1658, 1533, 1532,
/* 1290 */ 1522, 1521, 1520, 1519, 1518, 488, 1517, 1628, 1656, 1599, /* 1290 */ 1531, 1530, 1529, 115, 501, 1528, 1527, 1526, 1525, 1642,
/* 1300 */ 1516, 256, 1629, 491, 1631, 1632, 487, 485, 508, 482, /* 1300 */ 1772, 1524, 1523, 1097, 500, 1522, 1521, 1520, 1613, 159,
/* 1310 */ 1668, 111, 1628, 1515, 1514, 1513, 1656, 1512, 1511, 77, /* 1310 */ 1787, 1405, 1373, 144, 106, 136, 384, 1769, 1642, 386,
/* 1320 */ 1629, 491, 1631, 1632, 487, 1644, 508, 1510, 1084, 1696, /* 1320 */ 1372, 1591, 927, 1585, 926, 1670, 1569, 1658, 81, 1643,
/* 1330 */ 1509, 1508, 489, 1507, 1693, 1506, 1391, 1359, 153, 102, /* 1330 */ 503, 1645, 1646, 499, 501, 520, 1560, 160, 1710, 400,
/* 1340 */ 1644, 374, 488, 914, 132, 376, 1599, 489, 913, 1358, /* 1340 */ 107, 167, 1709, 1706, 500, 1453, 1658, 1404, 1613, 1402,
/* 1350 */ 154, 1577, 1571, 103, 1555, 1546, 161, 488, 1439, 1390, /* 1350 */ 1400, 401, 955, 498, 405, 1398, 1396, 1385, 1384, 409,
/* 1360 */ 1388, 1599, 1386, 1656, 287, 391, 252, 1629, 491, 1631, /* 1360 */ 399, 404, 403, 500, 413, 1670, 407, 1613, 81, 1643,
/* 1370 */ 1632, 487, 389, 508, 1384, 395, 399, 390, 1656, 942, /* 1370 */ 503, 1645, 1646, 499, 1642, 520, 408, 411, 1710, 412,
/* 1380 */ 1382, 257, 1629, 491, 1631, 1632, 487, 1628, 508, 393, /* 1380 */ 1371, 1455, 492, 1706, 1670, 1062, 1454, 266, 1643, 503,
/* 1390 */ 394, 397, 398, 401, 403, 402, 1371, 1370, 1357, 1441, /* 1390 */ 1645, 1646, 499, 497, 520, 494, 1682, 1061, 987, 986,
/* 1400 */ 79, 1048, 1440, 1049, 463, 1380, 274, 1375, 168, 554, /* 1400 */ 985, 984, 1658, 602, 566, 1394, 568, 83, 981, 501,
/* 1410 */ 974, 973, 972, 971, 556, 1644, 968, 1628, 426, 967, /* 1410 */ 284, 174, 1389, 980, 979, 285, 436, 239, 1387, 500,
/* 1420 */ 1373, 1356, 486, 966, 429, 275, 276, 1355, 431, 78, /* 1420 */ 286, 439, 1370, 1613, 441, 1369, 443, 82, 1590, 105,
/* 1430 */ 433, 1576, 488, 1122, 1570, 122, 1599, 440, 1554, 1553, /* 1430 */ 1135, 1584, 48, 1642, 1568, 591, 587, 583, 579, 238,
/* 1440 */ 47, 1545, 3, 13, 441, 1644, 186, 59, 189, 14, /* 1440 */ 1670, 450, 192, 81, 1643, 503, 1645, 1646, 499, 1567,
/* 1450 */ 191, 35, 489, 1656, 40, 129, 256, 1629, 491, 1631, /* 1450 */ 520, 1559, 64, 1710, 195, 4, 37, 15, 1707, 200,
/* 1460 */ 1632, 487, 488, 508, 1628, 1669, 1599, 199, 194, 289, /* 1460 */ 1301, 1658, 43, 77, 205, 133, 233, 204, 501, 197,
/* 1470 */ 1288, 198, 20, 1628, 1281, 60, 1619, 21, 38, 205, /* 1470 */ 22, 1633, 1294, 451, 65, 10, 23, 16, 500, 42,
/* 1480 */ 8, 1260, 11, 1656, 39, 15, 257, 1629, 491, 1631, /* 1480 */ 1273, 1272, 1613, 211, 41, 297, 126, 1642, 143, 1330,
/* 1490 */ 1632, 487, 1644, 508, 139, 1259, 1311, 1316, 1310, 489, /* 1490 */ 1319, 307, 306, 17, 1325, 1324, 19, 295, 148, 1670,
/* 1500 */ 285, 1644, 1315, 1314, 286, 17, 1202, 142, 489, 488, /* 1500 */ 513, 1170, 267, 1643, 503, 1645, 1646, 499, 1329, 520,
/* 1510 */ 27, 212, 1188, 1599, 1544, 1159, 291, 10, 488, 219, /* 1510 */ 1328, 296, 29, 1236, 1215, 1658, 222, 1642, 1214, 1201,
/* 1520 */ 1628, 1223, 1599, 1201, 496, 18, 19, 215, 490, 213, /* 1520 */ 12, 20, 498, 502, 223, 459, 1163, 1299, 194, 1558,
/* 1530 */ 1656, 1618, 217, 257, 1629, 491, 1631, 1632, 487, 1656, /* 1530 */ 229, 1632, 500, 21, 234, 508, 1613, 225, 227, 66,
/* 1540 */ 508, 1286, 251, 1629, 491, 1631, 1632, 487, 1644, 508, /* 1540 */ 67, 231, 1673, 1162, 13, 1658, 1133, 1217, 189, 519,
/* 1550 */ 1628, 62, 221, 63, 224, 489, 67, 1659, 512, 510, /* 1550 */ 1642, 44, 501, 1670, 1172, 71, 266, 1643, 503, 1645,
/* 1560 */ 1204, 507, 299, 41, 514, 488, 1035, 1032, 516, 1599, /* 1560 */ 1646, 499, 500, 520, 524, 1683, 1613, 522, 309, 299,
/* 1570 */ 1029, 517, 519, 1023, 520, 522, 523, 525, 1644, 1021, /* 1570 */ 1048, 526, 528, 1045, 529, 531, 1042, 1036, 1658, 532,
/* 1580 */ 526, 1012, 1628, 68, 1027, 489, 1656, 532, 69, 253, /* 1580 */ 1642, 521, 534, 1670, 535, 501, 267, 1643, 503, 1645,
/* 1590 */ 1629, 491, 1631, 1632, 487, 488, 508, 1044, 70, 1599, /* 1590 */ 1646, 499, 1166, 520, 1034, 500, 537, 1025, 538, 1613,
/* 1600 */ 1041, 1026, 1040, 1025, 940, 1024, 541, 981, 226, 543, /* 1600 */ 544, 1057, 301, 72, 1040, 1054, 1039, 1038, 1658, 1037,
/* 1610 */ 1644, 962, 1628, 961, 957, 1042, 1656, 489, 960, 245, /* 1610 */ 1642, 73, 477, 74, 1053, 501, 1670, 994, 953, 267,
/* 1620 */ 1629, 491, 1631, 1632, 487, 959, 508, 488, 958, 956, /* 1620 */ 1643, 503, 1645, 1646, 499, 500, 520, 1055, 553, 1613,
/* 1630 */ 955, 1599, 978, 976, 952, 951, 950, 947, 946, 1387, /* 1630 */ 555, 236, 975, 974, 973, 1171, 972, 970, 1658, 1401,
/* 1640 */ 1644, 566, 945, 564, 565, 1385, 569, 489, 1656, 568, /* 1640 */ 112, 971, 969, 968, 991, 501, 1670, 989, 965, 254,
/* 1650 */ 570, 254, 1629, 491, 1631, 1632, 487, 488, 508, 1628, /* 1650 */ 1643, 503, 1645, 1646, 499, 500, 520, 1174, 964, 1613,
/* 1660 */ 1383, 1599, 572, 573, 574, 1381, 576, 577, 578, 1369, /* 1660 */ 481, 1642, 578, 963, 960, 959, 958, 576, 518, 1220,
/* 1670 */ 580, 581, 1368, 1354, 1628, 584, 585, 588, 1656, 1145, /* 1670 */ 1221, 1399, 577, 582, 581, 580, 1670, 1642, 110, 261,
/* 1680 */ 237, 246, 1629, 491, 1631, 1632, 487, 1644, 508, 1329, /* 1680 */ 1643, 503, 1645, 1646, 499, 1397, 520, 584, 585, 1658,
/* 1690 */ 589, 1329, 1329, 1329, 489, 1329, 1329, 1329, 1329, 1329, /* 1690 */ 586, 1395, 588, 210, 1717, 476, 501, 475, 590, 589,
/* 1700 */ 1329, 1329, 1644, 1329, 488, 1329, 1628, 1329, 1599, 489, /* 1700 */ 1772, 1383, 592, 593, 1382, 1658, 500, 1368, 596, 597,
/* 1710 */ 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 488, /* 1710 */ 1613, 1158, 501, 144, 247, 600, 601, 1769, 1343, 1343,
/* 1720 */ 1329, 1329, 1329, 1599, 1329, 1656, 1329, 1329, 255, 1629, /* 1720 */ 1343, 1343, 500, 1343, 1642, 1343, 1613, 1670, 1343, 1343,
/* 1730 */ 491, 1631, 1632, 487, 1644, 508, 1329, 1329, 1329, 1329, /* 1730 */ 263, 1643, 503, 1645, 1646, 499, 1343, 520, 1343, 1343,
/* 1740 */ 1656, 489, 1329, 247, 1629, 491, 1631, 1632, 487, 1329, /* 1740 */ 1343, 1343, 1642, 1670, 1343, 1343, 255, 1643, 503, 1645,
/* 1750 */ 508, 488, 1329, 1329, 1329, 1599, 1329, 1329, 1628, 1329, /* 1750 */ 1646, 499, 1658, 520, 1343, 1343, 1343, 1642, 1343, 501,
/* 1760 */ 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, /* 1760 */ 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 500,
/* 1770 */ 1329, 1329, 1656, 1329, 1329, 1640, 1629, 491, 1631, 1632, /* 1770 */ 1658, 1343, 1343, 1613, 1343, 1343, 1343, 501, 1343, 1343,
/* 1780 */ 487, 1329, 508, 1329, 1329, 1329, 1644, 1329, 1628, 1329, /* 1780 */ 1343, 1343, 1343, 1343, 1343, 1658, 1343, 500, 1343, 1343,
/* 1790 */ 1329, 1329, 1329, 489, 1329, 1329, 1329, 1329, 1329, 1329, /* 1790 */ 1670, 1613, 501, 264, 1643, 503, 1645, 1646, 499, 1343,
/* 1800 */ 1329, 1329, 1329, 488, 1329, 1329, 1329, 1599, 1329, 1329, /* 1800 */ 520, 1343, 500, 1343, 1642, 1343, 1613, 1343, 1670, 1343,
/* 1810 */ 1329, 1329, 1329, 1329, 1329, 1329, 1644, 1329, 1329, 1329, /* 1810 */ 1343, 256, 1643, 503, 1645, 1646, 499, 1343, 520, 1343,
/* 1820 */ 1628, 1329, 1329, 489, 1656, 1329, 1329, 1639, 1629, 491, /* 1820 */ 1642, 1343, 1343, 1670, 1343, 1343, 265, 1643, 503, 1645,
/* 1830 */ 1631, 1632, 487, 488, 508, 1628, 1329, 1599, 1329, 1329, /* 1830 */ 1646, 499, 1658, 520, 1343, 1343, 1343, 1343, 1343, 501,
/* 1840 */ 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1644, 1329, /* 1840 */ 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1658, 500,
/* 1850 */ 1329, 1329, 1329, 1329, 1656, 489, 1329, 1638, 1629, 491, /* 1850 */ 1343, 1343, 1343, 1613, 1343, 501, 1343, 1343, 1343, 1343,
/* 1860 */ 1631, 1632, 487, 1644, 508, 488, 1329, 1329, 1329, 1599, /* 1860 */ 1343, 1343, 1343, 1343, 1343, 500, 1343, 1642, 1343, 1613,
/* 1870 */ 489, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, /* 1870 */ 1670, 1343, 1343, 257, 1643, 503, 1645, 1646, 499, 1343,
/* 1880 */ 488, 1329, 1628, 1329, 1599, 1329, 1656, 1329, 1329, 266, /* 1880 */ 520, 1343, 1343, 1343, 1343, 1343, 1670, 1343, 1343, 1654,
/* 1890 */ 1629, 491, 1631, 1632, 487, 1628, 508, 1329, 1329, 1329, /* 1890 */ 1643, 503, 1645, 1646, 499, 1658, 520, 1642, 1343, 1343,
/* 1900 */ 1329, 1656, 1329, 1329, 265, 1629, 491, 1631, 1632, 487, /* 1900 */ 1343, 1343, 501, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
/* 1910 */ 1644, 508, 1329, 1329, 1329, 1329, 1329, 489, 1329, 1329, /* 1910 */ 1343, 1343, 500, 1343, 1343, 1343, 1613, 1343, 1343, 1343,
/* 1920 */ 1329, 1329, 1329, 1644, 297, 296, 1329, 488, 1329, 1329, /* 1920 */ 1343, 1343, 1343, 1343, 1343, 1658, 1343, 1343, 1343, 1343,
/* 1930 */ 489, 1599, 1329, 1329, 1157, 1329, 1329, 1329, 1329, 1329, /* 1930 */ 1343, 1343, 501, 1670, 1343, 1343, 1653, 1643, 503, 1645,
/* 1940 */ 488, 1329, 1329, 1329, 1599, 1329, 1628, 1329, 1656, 1329, /* 1940 */ 1646, 499, 500, 520, 1343, 1343, 1613, 1642, 1343, 1343,
/* 1950 */ 1329, 267, 1629, 491, 1631, 1632, 487, 1329, 508, 1150, /* 1950 */ 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
/* 1960 */ 1329, 1656, 1329, 1329, 264, 1629, 491, 1631, 1632, 487, /* 1960 */ 1343, 1343, 1343, 1670, 1343, 1343, 1652, 1643, 503, 1645,
/* 1970 */ 1329, 508, 1329, 1329, 1644, 1329, 1149, 1329, 1329, 1329, /* 1970 */ 1646, 499, 1343, 520, 1343, 1658, 1343, 1642, 1343, 1343,
/* 1980 */ 1329, 489, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, /* 1980 */ 1343, 1343, 501, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
/* 1990 */ 1329, 488, 1329, 1329, 1329, 1599, 1329, 1329, 1329, 1329, /* 1990 */ 1343, 1343, 500, 1343, 1343, 1343, 1613, 1343, 1343, 1343,
/* 2000 */ 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, /* 2000 */ 1343, 1343, 1343, 1343, 1343, 1658, 1343, 1343, 1343, 1343,
/* 2010 */ 1329, 1329, 1656, 1329, 509, 250, 1629, 491, 1631, 1632, /* 2010 */ 1343, 1343, 501, 1670, 1343, 1343, 276, 1643, 503, 1645,
/* 2020 */ 487, 1329, 508, 1329, 1329, 1153, 1329, 1329, 1329, 1329, /* 2020 */ 1646, 499, 500, 520, 1343, 1343, 1613, 1642, 1343, 1343,
/* 2030 */ 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, /* 2030 */ 1343, 1343, 1343, 1343, 1343, 1343, 1642, 1343, 1343, 1343,
/* 2040 */ 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, /* 2040 */ 1343, 1343, 1343, 1670, 1343, 1343, 275, 1643, 503, 1645,
/* 2050 */ 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, /* 2050 */ 1646, 499, 1343, 520, 1343, 1658, 1343, 1343, 1343, 1343,
/* 2060 */ 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1158, 1329, /* 2060 */ 1343, 1343, 501, 1343, 1658, 1343, 1343, 1343, 1343, 1343,
/* 2070 */ 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, /* 2070 */ 1343, 501, 500, 1343, 1343, 1343, 1613, 1343, 1343, 1343,
/* 2080 */ 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, /* 2080 */ 1343, 500, 1343, 1343, 1343, 1613, 1343, 1343, 1343, 1343,
/* 2090 */ 1161, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, 1329, /* 2090 */ 1642, 1343, 1343, 1670, 1343, 1343, 277, 1643, 503, 1645,
/* 2100 */ 1329, 506, 1207, 1208, /* 2100 */ 1646, 499, 1670, 520, 1343, 274, 1643, 503, 1645, 1646,
/* 2110 */ 499, 1343, 520, 1343, 1343, 1343, 1343, 1343, 1658, 1343,
/* 2120 */ 1343, 1343, 1343, 1343, 1343, 501, 1343, 1343, 1343, 1343,
/* 2130 */ 1343, 1343, 1343, 1343, 1343, 500, 1343, 1343, 1343, 1613,
/* 2140 */ 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343, 1343,
/* 2150 */ 1343, 1343, 1343, 1343, 1343, 1343, 1670, 1343, 1343, 260,
/* 2160 */ 1643, 503, 1645, 1646, 499, 1343, 520,
}; };
static const YYCODETYPE yy_lookahead[] = { static const YYCODETYPE yy_lookahead[] = {
/* 0 */ 244, 251, 246, 247, 244, 248, 246, 247, 290, 321, /* 0 */ 244, 251, 246, 247, 244, 248, 246, 247, 290, 321,
...@@ -433,372 +439,375 @@ static const YYCODETYPE yy_lookahead[] = { ...@@ -433,372 +439,375 @@ static const YYCODETYPE yy_lookahead[] = {
/* 40 */ 27, 28, 29, 30, 31, 32, 269, 47, 269, 273, /* 40 */ 27, 28, 29, 30, 31, 32, 269, 47, 269, 273,
/* 50 */ 14, 15, 16, 276, 275, 332, 336, 248, 58, 280, /* 50 */ 14, 15, 16, 276, 275, 332, 336, 248, 58, 280,
/* 60 */ 12, 13, 14, 286, 64, 20, 290, 290, 20, 349, /* 60 */ 12, 13, 14, 286, 64, 20, 290, 290, 20, 349,
/* 70 */ 22, 241, 58, 353, 20, 12, 13, 14, 15, 16, /* 70 */ 22, 248, 58, 353, 57, 12, 13, 14, 15, 16,
/* 80 */ 80, 305, 306, 307, 307, 276, 2, 310, 311, 312, /* 80 */ 80, 305, 306, 307, 307, 276, 2, 310, 311, 312,
/* 90 */ 313, 314, 315, 317, 317, 47, 12, 13, 14, 15, /* 90 */ 313, 314, 315, 317, 317, 47, 12, 13, 14, 15,
/* 100 */ 16, 253, 102, 89, 269, 296, 58, 248, 12, 13, /* 100 */ 16, 253, 102, 89, 281, 296, 58, 248, 12, 13,
/* 110 */ 241, 276, 64, 113, 266, 20, 20, 336, 22, 260, /* 110 */ 249, 250, 64, 113, 266, 20, 20, 261, 22, 260,
/* 120 */ 290, 58, 274, 314, 248, 80, 267, 240, 80, 242, /* 120 */ 20, 58, 274, 314, 22, 269, 267, 240, 80, 242,
/* 130 */ 349, 354, 355, 254, 353, 276, 248, 258, 329, 330, /* 130 */ 80, 354, 355, 277, 336, 276, 248, 251, 329, 330,
/* 140 */ 331, 0, 333, 47, 81, 336, 245, 312, 260, 248, /* 140 */ 331, 0, 333, 47, 81, 336, 336, 349, 260, 47,
/* 150 */ 102, 20, 89, 139, 58, 267, 156, 281, 349, 290, /* 150 */ 102, 353, 89, 139, 58, 267, 156, 271, 349, 349,
/* 160 */ 64, 113, 353, 41, 276, 24, 25, 26, 27, 28, /* 160 */ 64, 113, 353, 353, 276, 24, 25, 26, 27, 28,
/* 170 */ 29, 30, 31, 32, 160, 80, 80, 92, 178, 179, /* 170 */ 29, 30, 31, 32, 160, 80, 80, 92, 178, 179,
/* 180 */ 143, 181, 182, 183, 184, 185, 186, 187, 188, 189, /* 180 */ 80, 181, 182, 183, 184, 185, 186, 187, 188, 189,
/* 190 */ 190, 191, 192, 193, 194, 195, 111, 112, 102, 114, /* 190 */ 190, 191, 192, 193, 194, 195, 111, 112, 102, 114,
/* 200 */ 115, 116, 139, 81, 156, 155, 178, 157, 208, 113, /* 200 */ 115, 116, 139, 58, 156, 155, 178, 157, 208, 113,
/* 210 */ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, /* 210 */ 196, 197, 198, 199, 200, 201, 202, 203, 204, 205,
/* 220 */ 249, 250, 286, 160, 241, 289, 178, 179, 292, 181, /* 220 */ 254, 20, 286, 160, 258, 289, 178, 179, 292, 181,
/* 230 */ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, /* 230 */ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
/* 240 */ 192, 193, 194, 195, 0, 217, 218, 219, 220, 221, /* 240 */ 192, 193, 194, 195, 0, 217, 218, 219, 220, 221,
/* 250 */ 213, 214, 156, 12, 13, 14, 15, 16, 208, 196, /* 250 */ 4, 80, 156, 12, 13, 14, 15, 16, 208, 196,
/* 260 */ 197, 198, 199, 200, 201, 202, 203, 204, 205, 1, /* 260 */ 197, 198, 199, 200, 201, 202, 203, 204, 205, 165,
/* 270 */ 2, 248, 0, 290, 178, 179, 238, 181, 182, 183, /* 270 */ 166, 248, 57, 169, 178, 179, 238, 181, 182, 183,
/* 280 */ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, /* 280 */ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
/* 290 */ 194, 195, 12, 13, 12, 13, 14, 15, 16, 276, /* 290 */ 194, 195, 12, 13, 12, 13, 14, 15, 16, 276,
/* 300 */ 20, 0, 22, 208, 60, 61, 62, 63, 4, 65, /* 300 */ 20, 0, 22, 208, 60, 61, 62, 63, 208, 65,
/* 310 */ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, /* 310 */ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
/* 320 */ 76, 77, 81, 241, 269, 278, 20, 47, 22, 57, /* 320 */ 76, 77, 81, 178, 269, 278, 80, 47, 47, 269,
/* 330 */ 275, 241, 285, 286, 296, 280, 276, 314, 208, 208, /* 330 */ 275, 241, 285, 286, 296, 280, 276, 314, 268, 261,
/* 340 */ 12, 13, 14, 283, 64, 4, 42, 43, 20, 81, /* 340 */ 12, 13, 14, 20, 64, 64, 4, 269, 20, 279,
/* 350 */ 22, 328, 329, 330, 331, 49, 333, 2, 57, 269, /* 350 */ 22, 328, 329, 330, 331, 277, 333, 2, 57, 269,
/* 360 */ 80, 12, 13, 14, 15, 16, 276, 12, 13, 14, /* 360 */ 80, 12, 13, 14, 15, 16, 276, 12, 13, 14,
/* 370 */ 15, 16, 290, 269, 336, 47, 286, 0, 261, 275, /* 370 */ 15, 16, 312, 143, 336, 47, 286, 0, 261, 208,
/* 380 */ 290, 3, 102, 293, 280, 20, 269, 349, 12, 13, /* 380 */ 290, 3, 102, 293, 42, 43, 269, 349, 12, 13,
/* 390 */ 151, 353, 64, 113, 277, 241, 20, 307, 22, 20, /* 390 */ 151, 353, 64, 113, 277, 20, 20, 307, 22, 20,
/* 400 */ 310, 311, 312, 313, 314, 315, 245, 317, 80, 248, /* 400 */ 310, 311, 312, 313, 314, 315, 245, 317, 80, 248,
/* 410 */ 171, 172, 93, 94, 95, 96, 97, 98, 99, 100, /* 410 */ 171, 172, 93, 94, 95, 96, 97, 98, 99, 100,
/* 420 */ 101, 102, 103, 47, 105, 106, 107, 108, 109, 110, /* 420 */ 101, 102, 103, 47, 105, 106, 107, 108, 109, 110,
/* 430 */ 102, 12, 13, 14, 15, 16, 156, 60, 61, 261, /* 430 */ 102, 12, 13, 14, 15, 16, 156, 60, 61, 269,
/* 440 */ 64, 113, 65, 20, 290, 68, 69, 269, 248, 72, /* 440 */ 64, 113, 65, 213, 214, 68, 69, 277, 248, 72,
/* 450 */ 73, 74, 57, 165, 166, 277, 80, 169, 178, 179, /* 450 */ 73, 74, 20, 55, 208, 80, 80, 308, 178, 179,
/* 460 */ 260, 181, 182, 183, 184, 185, 186, 187, 188, 189, /* 460 */ 260, 181, 182, 183, 184, 185, 186, 187, 188, 189,
/* 470 */ 190, 191, 192, 193, 194, 195, 276, 79, 102, 255, /* 470 */ 190, 191, 192, 193, 194, 195, 276, 79, 102, 14,
/* 480 */ 256, 139, 60, 61, 156, 87, 241, 65, 208, 113, /* 480 */ 82, 332, 60, 61, 156, 20, 241, 65, 208, 113,
/* 490 */ 68, 69, 75, 296, 72, 73, 74, 148, 14, 0, /* 490 */ 68, 69, 269, 296, 72, 73, 74, 148, 275, 91,
/* 500 */ 81, 22, 160, 57, 20, 248, 178, 179, 273, 181, /* 500 */ 81, 22, 241, 280, 75, 248, 178, 179, 273, 181,
/* 510 */ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, /* 510 */ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
/* 520 */ 192, 193, 194, 195, 55, 290, 47, 12, 13, 14, /* 520 */ 192, 193, 194, 195, 145, 290, 47, 12, 13, 14,
/* 530 */ 15, 16, 156, 336, 21, 290, 119, 120, 196, 241, /* 530 */ 15, 16, 156, 336, 245, 290, 269, 248, 286, 241,
/* 540 */ 305, 306, 307, 64, 45, 147, 349, 34, 79, 208, /* 540 */ 305, 306, 307, 64, 292, 241, 349, 280, 119, 120,
/* 550 */ 353, 82, 317, 296, 178, 179, 241, 181, 182, 183, /* 550 */ 353, 290, 317, 296, 178, 179, 241, 181, 182, 183,
/* 560 */ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, /* 560 */ 184, 185, 186, 187, 188, 189, 190, 191, 192, 193,
/* 570 */ 194, 195, 12, 13, 18, 80, 20, 47, 229, 261, /* 570 */ 194, 195, 12, 13, 18, 248, 20, 145, 229, 253,
/* 580 */ 20, 102, 22, 27, 269, 90, 30, 269, 290, 268, /* 580 */ 20, 102, 22, 27, 269, 248, 30, 260, 290, 255,
/* 590 */ 20, 276, 113, 336, 64, 277, 33, 241, 241, 241, /* 590 */ 256, 276, 113, 336, 290, 241, 33, 260, 241, 241,
/* 600 */ 279, 286, 224, 241, 48, 290, 349, 47, 45, 248, /* 600 */ 274, 286, 224, 276, 48, 290, 349, 47, 45, 248,
/* 610 */ 353, 296, 241, 253, 51, 52, 53, 54, 55, 35, /* 610 */ 353, 296, 241, 276, 51, 52, 53, 54, 55, 35,
/* 620 */ 308, 260, 307, 4, 64, 310, 311, 312, 313, 314, /* 620 */ 20, 260, 307, 4, 64, 310, 311, 312, 313, 314,
/* 630 */ 315, 248, 317, 269, 274, 156, 251, 276, 248, 308, /* 630 */ 315, 248, 317, 79, 20, 156, 22, 276, 248, 0,
/* 640 */ 80, 277, 79, 260, 332, 82, 290, 290, 290, 255, /* 640 */ 80, 87, 79, 260, 290, 82, 241, 290, 290, 255,
/* 650 */ 256, 336, 290, 241, 285, 286, 271, 178, 179, 276, /* 650 */ 256, 336, 20, 1, 2, 285, 286, 178, 179, 276,
/* 660 */ 145, 290, 102, 332, 349, 241, 276, 83, 353, 85, /* 660 */ 145, 290, 102, 49, 349, 241, 276, 83, 353, 85,
/* 670 */ 86, 22, 88, 113, 118, 241, 92, 121, 122, 123, /* 670 */ 86, 37, 88, 113, 118, 241, 92, 121, 122, 123,
/* 680 */ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, /* 680 */ 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
/* 690 */ 134, 135, 136, 137, 138, 286, 47, 248, 248, 115, /* 690 */ 134, 135, 136, 137, 138, 290, 57, 248, 248, 115,
/* 700 */ 248, 292, 290, 140, 314, 142, 20, 144, 248, 260, /* 700 */ 248, 147, 41, 140, 314, 142, 0, 144, 248, 260,
/* 710 */ 260, 269, 260, 241, 290, 145, 156, 241, 241, 329, /* 710 */ 260, 241, 260, 139, 290, 241, 156, 241, 241, 329,
/* 720 */ 330, 331, 280, 333, 290, 276, 276, 164, 276, 241, /* 720 */ 330, 331, 21, 333, 290, 276, 276, 164, 276, 241,
/* 730 */ 241, 241, 262, 42, 43, 265, 276, 0, 178, 179, /* 730 */ 241, 241, 241, 81, 160, 34, 276, 241, 178, 179,
/* 740 */ 92, 181, 182, 183, 184, 185, 186, 187, 188, 189, /* 740 */ 92, 181, 182, 183, 184, 185, 186, 187, 188, 189,
/* 750 */ 190, 191, 192, 193, 194, 195, 248, 37, 269, 248, /* 750 */ 190, 191, 192, 193, 194, 195, 248, 41, 269, 248,
/* 760 */ 248, 20, 290, 115, 248, 276, 290, 290, 260, 167, /* 760 */ 290, 241, 276, 115, 290, 276, 290, 290, 260, 283,
/* 770 */ 168, 260, 260, 41, 314, 286, 260, 41, 290, 290, /* 770 */ 196, 260, 42, 43, 314, 286, 206, 207, 290, 290,
/* 780 */ 290, 257, 64, 259, 276, 296, 0, 276, 276, 329, /* 780 */ 290, 290, 14, 308, 276, 296, 290, 276, 20, 329,
/* 790 */ 330, 331, 276, 333, 206, 207, 307, 145, 146, 310, /* 790 */ 330, 331, 262, 333, 0, 265, 307, 81, 92, 310,
/* 800 */ 311, 312, 313, 314, 315, 241, 317, 41, 22, 320, /* 800 */ 311, 312, 313, 314, 315, 241, 317, 332, 84, 320,
/* 810 */ 14, 14, 84, 324, 325, 87, 20, 20, 18, 84, /* 810 */ 290, 87, 84, 324, 325, 87, 84, 111, 112, 87,
/* 820 */ 1, 2, 87, 23, 0, 336, 58, 84, 209, 92, /* 820 */ 114, 115, 116, 0, 257, 336, 259, 84, 209, 14,
/* 830 */ 87, 145, 41, 269, 0, 35, 36, 47, 349, 39, /* 830 */ 87, 0, 41, 269, 0, 20, 167, 168, 349, 45,
/* 840 */ 276, 84, 353, 41, 87, 0, 22, 81, 111, 112, /* 840 */ 276, 207, 353, 41, 18, 22, 41, 145, 146, 23,
/* 850 */ 286, 114, 115, 116, 290, 21, 56, 44, 24, 25, /* 850 */ 286, 1, 2, 22, 290, 44, 22, 193, 194, 41,
/* 860 */ 26, 27, 28, 29, 30, 31, 32, 22, 91, 241, /* 860 */ 296, 35, 36, 41, 64, 39, 241, 270, 41, 270,
/* 870 */ 47, 307, 81, 41, 310, 311, 312, 313, 314, 315, /* 870 */ 41, 307, 81, 270, 310, 311, 312, 313, 314, 315,
/* 880 */ 41, 317, 47, 81, 320, 193, 194, 270, 324, 325, /* 880 */ 4, 317, 56, 81, 320, 41, 81, 226, 324, 325,
/* 890 */ 326, 270, 270, 80, 41, 270, 19, 269, 299, 64, /* 890 */ 41, 80, 80, 41, 269, 19, 270, 270, 242, 81,
/* 900 */ 270, 242, 338, 113, 276, 258, 356, 41, 344, 345, /* 900 */ 336, 276, 90, 299, 41, 47, 80, 47, 81, 33,
/* 910 */ 33, 303, 41, 81, 286, 41, 241, 117, 290, 347, /* 910 */ 81, 286, 41, 349, 356, 290, 0, 353, 258, 241,
/* 920 */ 81, 341, 45, 41, 247, 249, 41, 207, 51, 52, /* 920 */ 41, 45, 41, 347, 303, 81, 50, 41, 341, 247,
/* 930 */ 53, 54, 55, 279, 81, 307, 113, 334, 310, 311, /* 930 */ 81, 55, 307, 81, 249, 310, 311, 312, 313, 314,
/* 940 */ 312, 313, 314, 315, 269, 317, 178, 81, 148, 149, /* 940 */ 315, 41, 317, 117, 81, 320, 41, 269, 269, 324,
/* 950 */ 150, 276, 81, 153, 41, 81, 79, 41, 158, 82, /* 950 */ 325, 326, 81, 279, 276, 79, 309, 334, 82, 350,
/* 960 */ 228, 286, 226, 81, 41, 290, 81, 309, 269, 337, /* 960 */ 81, 47, 81, 338, 286, 350, 350, 81, 290, 344,
/* 970 */ 170, 41, 41, 173, 350, 175, 176, 177, 20, 248, /* 970 */ 345, 113, 241, 113, 148, 149, 150, 337, 64, 153,
/* 980 */ 45, 241, 307, 355, 304, 310, 311, 312, 313, 314, /* 980 */ 20, 81, 248, 45, 158, 307, 81, 304, 310, 311,
/* 990 */ 315, 47, 317, 116, 81, 320, 154, 81, 297, 324, /* 990 */ 312, 313, 314, 315, 47, 317, 170, 255, 248, 173,
/* 1000 */ 325, 326, 255, 248, 81, 40, 248, 284, 208, 269, /* 1000 */ 269, 175, 176, 177, 297, 154, 248, 276, 92, 40,
/* 1010 */ 248, 81, 81, 20, 139, 282, 276, 243, 141, 243, /* 1010 */ 284, 139, 248, 20, 243, 282, 243, 286, 282, 20,
/* 1020 */ 345, 144, 20, 301, 282, 253, 286, 20, 253, 276, /* 1020 */ 301, 290, 253, 286, 20, 253, 348, 111, 112, 294,
/* 1030 */ 290, 286, 294, 253, 20, 287, 253, 253, 253, 162, /* 1030 */ 114, 115, 116, 253, 208, 276, 20, 253, 307, 0,
/* 1040 */ 248, 164, 241, 0, 4, 64, 243, 307, 269, 243, /* 1040 */ 287, 310, 311, 312, 313, 314, 315, 241, 317, 253,
/* 1050 */ 310, 311, 312, 313, 314, 315, 269, 317, 269, 19, /* 1050 */ 228, 320, 248, 243, 253, 324, 325, 326, 269, 269,
/* 1060 */ 320, 290, 269, 269, 324, 325, 326, 269, 269, 248, /* 1060 */ 21, 269, 269, 24, 25, 26, 27, 28, 29, 30,
/* 1070 */ 269, 301, 294, 33, 269, 335, 269, 276, 269, 269, /* 1070 */ 31, 32, 269, 248, 64, 269, 345, 269, 269, 243,
/* 1080 */ 251, 163, 300, 20, 251, 45, 216, 286, 251, 251, /* 1080 */ 241, 251, 276, 269, 301, 269, 269, 290, 269, 163,
/* 1090 */ 50, 290, 276, 215, 286, 55, 241, 309, 287, 223, /* 1090 */ 20, 251, 286, 286, 251, 300, 290, 276, 251, 216,
/* 1100 */ 346, 222, 346, 291, 290, 342, 291, 290, 307, 211, /* 1100 */ 346, 346, 215, 223, 343, 342, 222, 294, 269, 211,
/* 1110 */ 290, 310, 311, 312, 313, 314, 315, 210, 317, 79, /* 1110 */ 290, 287, 210, 307, 340, 276, 310, 311, 312, 313,
/* 1120 */ 339, 320, 82, 276, 269, 324, 325, 326, 207, 20, /* 1120 */ 314, 315, 290, 317, 291, 286, 320, 339, 291, 290,
/* 1130 */ 308, 276, 40, 230, 80, 92, 335, 227, 343, 225, /* 1130 */ 324, 325, 326, 276, 207, 290, 20, 309, 40, 227,
/* 1140 */ 291, 286, 290, 142, 340, 290, 290, 287, 291, 290, /* 1140 */ 225, 335, 241, 308, 357, 80, 307, 230, 142, 310,
/* 1150 */ 241, 323, 327, 288, 111, 112, 276, 114, 115, 116, /* 1150 */ 311, 312, 313, 314, 315, 291, 317, 290, 290, 320,
/* 1160 */ 265, 80, 307, 251, 276, 310, 311, 312, 313, 314, /* 1160 */ 291, 288, 287, 324, 325, 326, 276, 290, 327, 251,
/* 1170 */ 315, 251, 317, 272, 259, 320, 248, 251, 269, 324, /* 1170 */ 269, 265, 251, 276, 335, 80, 272, 276, 323, 259,
/* 1180 */ 325, 326, 241, 357, 298, 276, 243, 295, 352, 302, /* 1180 */ 248, 251, 243, 298, 302, 263, 295, 286, 263, 252,
/* 1190 */ 335, 351, 263, 239, 252, 286, 263, 263, 0, 290, /* 1190 */ 352, 290, 263, 351, 0, 239, 241, 0, 352, 351,
/* 1200 */ 241, 0, 72, 0, 47, 174, 47, 47, 47, 174, /* 1200 */ 72, 0, 47, 174, 351, 241, 352, 47, 307, 47,
/* 1210 */ 269, 0, 47, 47, 0, 174, 307, 276, 47, 310, /* 1210 */ 47, 310, 311, 312, 313, 314, 315, 174, 317, 0,
/* 1220 */ 311, 312, 313, 314, 315, 0, 317, 286, 269, 320, /* 1220 */ 47, 320, 47, 174, 269, 324, 325, 326, 0, 47,
/* 1230 */ 47, 290, 241, 324, 325, 276, 0, 47, 0, 160, /* 1230 */ 0, 276, 47, 269, 0, 47, 335, 0, 80, 160,
/* 1240 */ 113, 159, 80, 156, 0, 286, 0, 152, 307, 290, /* 1240 */ 276, 286, 159, 113, 156, 290, 152, 151, 0, 0,
/* 1250 */ 241, 310, 311, 312, 313, 314, 315, 151, 317, 0, /* 1250 */ 286, 0, 0, 44, 290, 0, 0, 0, 0, 241,
/* 1260 */ 269, 0, 44, 0, 0, 0, 307, 276, 0, 310, /* 1260 */ 296, 0, 307, 0, 0, 310, 311, 312, 313, 314,
/* 1270 */ 311, 312, 313, 314, 315, 0, 317, 286, 269, 320, /* 1270 */ 315, 307, 317, 0, 310, 311, 312, 313, 314, 315,
/* 1280 */ 0, 290, 0, 324, 325, 276, 0, 0, 0, 0, /* 1280 */ 0, 317, 0, 0, 0, 0, 0, 269, 0, 0,
/* 1290 */ 0, 0, 0, 0, 0, 286, 0, 241, 307, 290, /* 1290 */ 0, 0, 0, 40, 276, 0, 0, 0, 0, 241,
/* 1300 */ 0, 310, 311, 312, 313, 314, 315, 316, 317, 318, /* 1300 */ 336, 0, 0, 22, 286, 0, 0, 0, 290, 40,
/* 1310 */ 319, 40, 241, 0, 0, 0, 307, 0, 0, 310, /* 1310 */ 355, 0, 0, 349, 37, 41, 44, 353, 241, 44,
/* 1320 */ 311, 312, 313, 314, 315, 269, 317, 0, 22, 320, /* 1320 */ 0, 0, 14, 0, 14, 307, 0, 269, 310, 311,
/* 1330 */ 0, 0, 276, 0, 325, 0, 0, 0, 40, 37, /* 1330 */ 312, 313, 314, 315, 276, 317, 0, 38, 320, 45,
/* 1340 */ 269, 44, 286, 14, 41, 44, 290, 276, 14, 0, /* 1340 */ 37, 37, 324, 325, 286, 0, 269, 0, 290, 0,
/* 1350 */ 38, 0, 0, 37, 0, 0, 37, 286, 0, 0, /* 1350 */ 0, 37, 59, 276, 37, 0, 0, 0, 0, 37,
/* 1360 */ 0, 290, 0, 307, 293, 37, 310, 311, 312, 313, /* 1360 */ 47, 45, 47, 286, 37, 307, 47, 290, 310, 311,
/* 1370 */ 314, 315, 47, 317, 0, 37, 37, 45, 307, 59, /* 1370 */ 312, 313, 314, 315, 241, 317, 45, 47, 320, 45,
/* 1380 */ 0, 310, 311, 312, 313, 314, 315, 241, 317, 47, /* 1380 */ 0, 0, 324, 325, 307, 47, 0, 310, 311, 312,
/* 1390 */ 45, 47, 45, 47, 37, 45, 0, 0, 0, 0, /* 1390 */ 313, 314, 315, 316, 317, 318, 319, 22, 47, 47,
/* 1400 */ 89, 22, 0, 47, 348, 0, 22, 0, 87, 41, /* 1400 */ 47, 47, 269, 19, 41, 0, 41, 89, 47, 276,
/* 1410 */ 47, 47, 47, 47, 41, 269, 47, 241, 48, 47, /* 1410 */ 22, 87, 0, 47, 47, 22, 48, 33, 0, 286,
/* 1420 */ 0, 0, 276, 47, 47, 22, 22, 0, 22, 20, /* 1420 */ 22, 47, 0, 290, 22, 0, 22, 20, 0, 45,
/* 1430 */ 22, 0, 286, 47, 0, 161, 290, 22, 0, 0, /* 1430 */ 47, 0, 145, 241, 0, 51, 52, 53, 54, 55,
/* 1440 */ 145, 0, 41, 212, 145, 269, 142, 80, 37, 212, /* 1440 */ 307, 22, 142, 310, 311, 312, 313, 314, 315, 0,
/* 1450 */ 140, 41, 276, 307, 41, 80, 310, 311, 312, 313, /* 1450 */ 317, 0, 80, 320, 37, 41, 41, 212, 325, 81,
/* 1460 */ 314, 315, 286, 317, 241, 319, 290, 41, 81, 293, /* 1460 */ 81, 269, 41, 79, 41, 80, 82, 80, 276, 140,
/* 1470 */ 81, 80, 80, 241, 81, 80, 44, 41, 206, 44, /* 1470 */ 80, 44, 81, 145, 80, 2, 41, 212, 286, 41,
/* 1480 */ 2, 81, 212, 307, 41, 41, 310, 311, 312, 313, /* 1480 */ 81, 81, 290, 44, 206, 293, 161, 241, 44, 81,
/* 1490 */ 314, 315, 269, 317, 44, 81, 47, 81, 47, 276, /* 1490 */ 81, 12, 13, 41, 47, 47, 41, 47, 44, 307,
/* 1500 */ 47, 269, 47, 47, 47, 41, 81, 44, 276, 286, /* 1500 */ 116, 22, 310, 311, 312, 313, 314, 315, 47, 317,
/* 1510 */ 80, 44, 22, 290, 0, 22, 293, 80, 286, 37, /* 1510 */ 47, 47, 80, 178, 81, 269, 44, 241, 81, 22,
/* 1520 */ 241, 178, 290, 81, 143, 80, 80, 80, 180, 81, /* 1520 */ 80, 80, 276, 180, 81, 141, 47, 81, 144, 0,
/* 1530 */ 307, 44, 80, 310, 311, 312, 313, 314, 315, 307, /* 1530 */ 37, 44, 286, 80, 44, 143, 290, 80, 80, 80,
/* 1540 */ 317, 81, 310, 311, 312, 313, 314, 315, 269, 317, /* 1540 */ 80, 140, 80, 64, 212, 269, 162, 81, 164, 80,
/* 1550 */ 241, 80, 140, 80, 44, 276, 90, 80, 47, 91, /* 1550 */ 241, 80, 276, 307, 22, 90, 310, 311, 312, 313,
/* 1560 */ 81, 80, 47, 80, 80, 286, 81, 81, 47, 290, /* 1560 */ 314, 315, 286, 317, 47, 319, 290, 91, 47, 293,
/* 1570 */ 81, 80, 47, 81, 80, 47, 80, 47, 269, 81, /* 1570 */ 81, 80, 47, 81, 80, 47, 81, 81, 269, 80,
/* 1580 */ 80, 22, 241, 80, 104, 276, 307, 92, 80, 310, /* 1580 */ 241, 102, 47, 307, 80, 276, 310, 311, 312, 313,
/* 1590 */ 311, 312, 313, 314, 315, 286, 317, 47, 80, 290, /* 1590 */ 314, 315, 113, 317, 81, 286, 47, 22, 80, 290,
/* 1600 */ 47, 104, 22, 104, 59, 104, 58, 64, 41, 78, /* 1600 */ 92, 47, 293, 80, 104, 47, 104, 104, 269, 104,
/* 1610 */ 269, 47, 241, 47, 22, 113, 307, 276, 47, 310, /* 1610 */ 241, 80, 248, 80, 22, 276, 307, 64, 59, 310,
/* 1620 */ 311, 312, 313, 314, 315, 47, 317, 286, 47, 47, /* 1620 */ 311, 312, 313, 314, 315, 286, 317, 113, 58, 290,
/* 1630 */ 47, 290, 64, 47, 47, 47, 47, 47, 47, 0, /* 1630 */ 78, 41, 47, 47, 47, 156, 47, 22, 269, 0,
/* 1640 */ 269, 37, 47, 47, 45, 0, 45, 276, 307, 47, /* 1640 */ 276, 47, 47, 47, 64, 276, 307, 47, 47, 310,
/* 1650 */ 37, 310, 311, 312, 313, 314, 315, 286, 317, 241, /* 1650 */ 311, 312, 313, 314, 315, 286, 317, 178, 47, 290,
/* 1660 */ 0, 290, 47, 45, 37, 0, 47, 45, 37, 0, /* 1660 */ 296, 241, 37, 47, 47, 47, 47, 47, 189, 190,
/* 1670 */ 47, 46, 0, 0, 241, 22, 21, 21, 307, 22, /* 1670 */ 191, 0, 45, 37, 45, 47, 307, 241, 314, 310,
/* 1680 */ 22, 310, 311, 312, 313, 314, 315, 269, 317, 358, /* 1680 */ 311, 312, 313, 314, 315, 0, 317, 47, 45, 269,
/* 1690 */ 20, 358, 358, 358, 276, 358, 358, 358, 358, 358, /* 1690 */ 37, 0, 47, 329, 330, 331, 276, 333, 37, 45,
/* 1700 */ 358, 358, 269, 358, 286, 358, 241, 358, 290, 276, /* 1700 */ 336, 0, 47, 46, 0, 269, 286, 0, 22, 21,
/* 1710 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 286, /* 1710 */ 290, 22, 276, 349, 22, 21, 20, 353, 358, 358,
/* 1720 */ 358, 358, 358, 290, 358, 307, 358, 358, 310, 311, /* 1720 */ 358, 358, 286, 358, 241, 358, 290, 307, 358, 358,
/* 1730 */ 312, 313, 314, 315, 269, 317, 358, 358, 358, 358, /* 1730 */ 310, 311, 312, 313, 314, 315, 358, 317, 358, 358,
/* 1740 */ 307, 276, 358, 310, 311, 312, 313, 314, 315, 358, /* 1740 */ 358, 358, 241, 307, 358, 358, 310, 311, 312, 313,
/* 1750 */ 317, 286, 358, 358, 358, 290, 358, 358, 241, 358, /* 1750 */ 314, 315, 269, 317, 358, 358, 358, 241, 358, 276,
/* 1760 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, /* 1760 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 286,
/* 1770 */ 358, 358, 307, 358, 358, 310, 311, 312, 313, 314, /* 1770 */ 269, 358, 358, 290, 358, 358, 358, 276, 358, 358,
/* 1780 */ 315, 358, 317, 358, 358, 358, 269, 358, 241, 358, /* 1780 */ 358, 358, 358, 358, 358, 269, 358, 286, 358, 358,
/* 1790 */ 358, 358, 358, 276, 358, 358, 358, 358, 358, 358, /* 1790 */ 307, 290, 276, 310, 311, 312, 313, 314, 315, 358,
/* 1800 */ 358, 358, 358, 286, 358, 358, 358, 290, 358, 358, /* 1800 */ 317, 358, 286, 358, 241, 358, 290, 358, 307, 358,
/* 1810 */ 358, 358, 358, 358, 358, 358, 269, 358, 358, 358, /* 1810 */ 358, 310, 311, 312, 313, 314, 315, 358, 317, 358,
/* 1820 */ 241, 358, 358, 276, 307, 358, 358, 310, 311, 312, /* 1820 */ 241, 358, 358, 307, 358, 358, 310, 311, 312, 313,
/* 1830 */ 313, 314, 315, 286, 317, 241, 358, 290, 358, 358, /* 1830 */ 314, 315, 269, 317, 358, 358, 358, 358, 358, 276,
/* 1840 */ 358, 358, 358, 358, 358, 358, 358, 358, 269, 358, /* 1840 */ 358, 358, 358, 358, 358, 358, 358, 358, 269, 286,
/* 1850 */ 358, 358, 358, 358, 307, 276, 358, 310, 311, 312, /* 1850 */ 358, 358, 358, 290, 358, 276, 358, 358, 358, 358,
/* 1860 */ 313, 314, 315, 269, 317, 286, 358, 358, 358, 290, /* 1860 */ 358, 358, 358, 358, 358, 286, 358, 241, 358, 290,
/* 1870 */ 276, 358, 358, 358, 358, 358, 358, 358, 358, 358, /* 1870 */ 307, 358, 358, 310, 311, 312, 313, 314, 315, 358,
/* 1880 */ 286, 358, 241, 358, 290, 358, 307, 358, 358, 310, /* 1880 */ 317, 358, 358, 358, 358, 358, 307, 358, 358, 310,
/* 1890 */ 311, 312, 313, 314, 315, 241, 317, 358, 358, 358, /* 1890 */ 311, 312, 313, 314, 315, 269, 317, 241, 358, 358,
/* 1900 */ 358, 307, 358, 358, 310, 311, 312, 313, 314, 315, /* 1900 */ 358, 358, 276, 358, 358, 358, 358, 358, 358, 358,
/* 1910 */ 269, 317, 358, 358, 358, 358, 358, 276, 358, 358, /* 1910 */ 358, 358, 286, 358, 358, 358, 290, 358, 358, 358,
/* 1920 */ 358, 358, 358, 269, 12, 13, 358, 286, 358, 358, /* 1920 */ 358, 358, 358, 358, 358, 269, 358, 358, 358, 358,
/* 1930 */ 276, 290, 358, 358, 22, 358, 358, 358, 358, 358, /* 1930 */ 358, 358, 276, 307, 358, 358, 310, 311, 312, 313,
/* 1940 */ 286, 358, 358, 358, 290, 358, 241, 358, 307, 358, /* 1940 */ 314, 315, 286, 317, 358, 358, 290, 241, 358, 358,
/* 1950 */ 358, 310, 311, 312, 313, 314, 315, 358, 317, 47, /* 1950 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
/* 1960 */ 358, 307, 358, 358, 310, 311, 312, 313, 314, 315, /* 1960 */ 358, 358, 358, 307, 358, 358, 310, 311, 312, 313,
/* 1970 */ 358, 317, 358, 358, 269, 358, 64, 358, 358, 358, /* 1970 */ 314, 315, 358, 317, 358, 269, 358, 241, 358, 358,
/* 1980 */ 358, 276, 358, 358, 358, 358, 358, 358, 358, 358, /* 1980 */ 358, 358, 276, 358, 358, 358, 358, 358, 358, 358,
/* 1990 */ 358, 286, 358, 358, 358, 290, 358, 358, 358, 358, /* 1990 */ 358, 358, 286, 358, 358, 358, 290, 358, 358, 358,
/* 2000 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, /* 2000 */ 358, 358, 358, 358, 358, 269, 358, 358, 358, 358,
/* 2010 */ 358, 358, 307, 358, 102, 310, 311, 312, 313, 314, /* 2010 */ 358, 358, 276, 307, 358, 358, 310, 311, 312, 313,
/* 2020 */ 315, 358, 317, 358, 358, 113, 358, 358, 358, 358, /* 2020 */ 314, 315, 286, 317, 358, 358, 290, 241, 358, 358,
/* 2030 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, /* 2030 */ 358, 358, 358, 358, 358, 358, 241, 358, 358, 358,
/* 2040 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, /* 2040 */ 358, 358, 358, 307, 358, 358, 310, 311, 312, 313,
/* 2050 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, /* 2050 */ 314, 315, 358, 317, 358, 269, 358, 358, 358, 358,
/* 2060 */ 358, 358, 358, 358, 358, 358, 358, 358, 156, 358, /* 2060 */ 358, 358, 276, 358, 269, 358, 358, 358, 358, 358,
/* 2070 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, /* 2070 */ 358, 276, 286, 358, 358, 358, 290, 358, 358, 358,
/* 2080 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, /* 2080 */ 358, 286, 358, 358, 358, 290, 358, 358, 358, 358,
/* 2090 */ 178, 358, 358, 358, 358, 358, 358, 358, 358, 358, /* 2090 */ 241, 358, 358, 307, 358, 358, 310, 311, 312, 313,
/* 2100 */ 358, 189, 190, 191, 358, 358, 358, 358, 358, 358, /* 2100 */ 314, 315, 307, 317, 358, 310, 311, 312, 313, 314,
/* 2110 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, /* 2110 */ 315, 358, 317, 358, 358, 358, 358, 358, 269, 358,
/* 2120 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, /* 2120 */ 358, 358, 358, 358, 358, 276, 358, 358, 358, 358,
/* 2130 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, /* 2130 */ 358, 358, 358, 358, 358, 286, 358, 358, 358, 290,
/* 2140 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, /* 2140 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358,
/* 2150 */ 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, /* 2150 */ 358, 358, 358, 358, 358, 358, 307, 358, 358, 310,
/* 2160 */ 358, 358, 358, /* 2160 */ 311, 312, 313, 314, 315, 358, 317,
}; };
#define YY_SHIFT_COUNT (590) #define YY_SHIFT_COUNT (602)
#define YY_SHIFT_MIN (0) #define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (1912) #define YY_SHIFT_MAX (1707)
static const unsigned short int yy_shift_ofst[] = { static const unsigned short int yy_shift_ofst[] = {
/* 0 */ 800, 0, 48, 96, 96, 96, 96, 280, 96, 96, /* 0 */ 826, 0, 0, 48, 96, 96, 96, 96, 280, 280,
/* 10 */ 328, 376, 560, 376, 376, 376, 376, 376, 376, 376, /* 10 */ 96, 96, 328, 376, 560, 376, 376, 376, 376, 376,
/* 20 */ 376, 376, 376, 376, 376, 376, 376, 376, 376, 376, /* 20 */ 376, 376, 376, 376, 376, 376, 376, 376, 376, 376,
/* 30 */ 376, 376, 376, 376, 376, 376, 95, 45, 45, 45, /* 30 */ 376, 376, 376, 376, 376, 376, 376, 376, 95, 95,
/* 40 */ 1912, 1912, 1912, 131, 50, 54, 54, 130, 304, 304, /* 40 */ 375, 375, 375, 1479, 1479, 1479, 100, 50, 171, 45,
/* 50 */ 341, 54, 54, 54, 54, 54, 54, 395, 54, 365, /* 50 */ 45, 342, 342, 246, 171, 171, 45, 45, 45, 45,
/* 60 */ 379, 130, 423, 365, 54, 54, 365, 54, 365, 365, /* 60 */ 45, 45, 17, 45, 201, 323, 600, 201, 45, 45,
/* 70 */ 423, 365, 54, 446, 556, 63, 14, 14, 13, 479, /* 70 */ 201, 45, 201, 201, 600, 201, 45, 215, 556, 63,
/* 80 */ 422, 479, 479, 479, 479, 479, 479, 479, 479, 479, /* 80 */ 14, 14, 13, 479, 422, 479, 479, 479, 479, 479,
/* 90 */ 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, /* 90 */ 479, 479, 479, 479, 479, 479, 479, 479, 479, 479,
/* 100 */ 584, 306, 484, 484, 272, 530, 570, 570, 570, 301, /* 100 */ 479, 479, 479, 479, 584, 614, 465, 465, 301, 281,
/* 110 */ 530, 741, 423, 365, 365, 423, 777, 718, 319, 319, /* 110 */ 379, 379, 379, 639, 281, 632, 600, 201, 201, 600,
/* 120 */ 319, 319, 319, 319, 319, 877, 834, 377, 349, 28, /* 120 */ 408, 800, 319, 319, 319, 319, 319, 319, 319, 1384,
/* 130 */ 288, 37, 691, 649, 648, 686, 588, 720, 588, 796, /* 130 */ 1039, 377, 349, 28, 104, 230, 730, 102, 648, 432,
/* 140 */ 378, 619, 797, 958, 935, 944, 842, 958, 958, 965, /* 140 */ 570, 634, 570, 768, 378, 378, 378, 619, 815, 960,
/* 150 */ 875, 875, 958, 993, 993, 1002, 395, 423, 395, 1007, /* 150 */ 938, 947, 851, 960, 960, 969, 872, 872, 960, 993,
/* 160 */ 395, 741, 1014, 395, 395, 958, 395, 993, 365, 365, /* 160 */ 993, 999, 17, 600, 17, 1004, 17, 632, 1016, 17,
/* 170 */ 365, 365, 365, 365, 365, 365, 365, 365, 365, 958, /* 170 */ 17, 960, 17, 993, 201, 201, 201, 201, 201, 201,
/* 180 */ 993, 981, 1002, 446, 918, 423, 446, 1007, 446, 741, /* 180 */ 201, 201, 201, 201, 201, 960, 993, 1010, 999, 215,
/* 190 */ 1014, 446, 1063, 870, 878, 981, 870, 878, 981, 981, /* 190 */ 926, 600, 215, 1004, 215, 632, 1016, 215, 1070, 883,
/* 200 */ 876, 879, 898, 907, 921, 741, 1109, 1092, 903, 910, /* 200 */ 887, 1010, 883, 887, 1010, 1010, 880, 884, 898, 902,
/* 210 */ 914, 1054, 365, 878, 981, 981, 878, 981, 1001, 741, /* 210 */ 927, 632, 1116, 1098, 912, 915, 917, 912, 915, 912,
/* 220 */ 1014, 446, 777, 446, 741, 1081, 718, 958, 446, 993, /* 220 */ 915, 1065, 201, 887, 1010, 1010, 887, 1010, 1006, 632,
/* 230 */ 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 244, 563, /* 230 */ 1016, 215, 408, 215, 632, 1095, 800, 960, 215, 993,
/* 240 */ 141, 1040, 737, 1043, 241, 84, 355, 515, 419, 85, /* 240 */ 2167, 2167, 2167, 2167, 2167, 2167, 2167, 2167, 244, 563,
/* 250 */ 282, 282, 282, 282, 282, 282, 282, 282, 239, 469, /* 250 */ 141, 876, 706, 916, 241, 84, 355, 515, 419, 85,
/* 260 */ 417, 398, 268, 342, 36, 36, 36, 36, 499, 122, /* 260 */ 282, 282, 282, 282, 282, 282, 282, 282, 239, 398,
/* 270 */ 728, 735, 743, 757, 786, 824, 845, 513, 602, 652, /* 270 */ 429, 554, 652, 574, 36, 36, 36, 36, 794, 716,
/* 280 */ 766, 791, 802, 819, 692, 736, 732, 832, 768, 839, /* 280 */ 724, 728, 732, 743, 823, 831, 834, 701, 669, 702,
/* 290 */ 813, 853, 866, 874, 882, 885, 790, 823, 871, 913, /* 290 */ 791, 802, 805, 850, 664, 661, 822, 818, 145, 827,
/* 300 */ 916, 923, 930, 931, 495, 835, 1198, 1201, 1130, 1203, /* 300 */ 811, 829, 844, 849, 852, 863, 858, 860, 871, 879,
/* 310 */ 1157, 1031, 1159, 1160, 1161, 1035, 1211, 1165, 1166, 1041, /* 310 */ 881, 886, 900, 905, 812, 914, 1194, 1197, 1128, 1201,
/* 320 */ 1214, 1171, 1225, 1183, 1236, 1190, 1238, 1162, 1079, 1082, /* 320 */ 1155, 1029, 1160, 1162, 1163, 1043, 1219, 1173, 1175, 1049,
/* 330 */ 1127, 1087, 1244, 1246, 1095, 1106, 1259, 1261, 1218, 1263, /* 330 */ 1228, 1182, 1230, 1185, 1234, 1188, 1237, 1158, 1079, 1083,
/* 340 */ 1264, 1265, 1268, 1275, 1280, 1282, 1286, 1287, 1288, 1289, /* 340 */ 1130, 1088, 1251, 1252, 1094, 1096, 1248, 1249, 1209, 1255,
/* 350 */ 1290, 1291, 1292, 1293, 1294, 1296, 1300, 1271, 1313, 1314, /* 350 */ 1256, 1257, 1258, 1261, 1263, 1264, 1273, 1280, 1282, 1283,
/* 360 */ 1315, 1317, 1318, 1327, 1306, 1330, 1331, 1333, 1335, 1336, /* 360 */ 1284, 1285, 1286, 1288, 1289, 1290, 1291, 1253, 1292, 1295,
/* 370 */ 1337, 1298, 1302, 1303, 1329, 1297, 1334, 1301, 1349, 1312, /* 370 */ 1296, 1297, 1298, 1301, 1281, 1302, 1305, 1306, 1307, 1311,
/* 380 */ 1316, 1351, 1352, 1354, 1355, 1319, 1358, 1320, 1359, 1360, /* 380 */ 1312, 1269, 1277, 1274, 1308, 1272, 1310, 1275, 1320, 1299,
/* 390 */ 1325, 1332, 1328, 1362, 1342, 1345, 1338, 1374, 1344, 1347, /* 390 */ 1303, 1321, 1323, 1326, 1336, 1304, 1345, 1293, 1347, 1349,
/* 400 */ 1339, 1380, 1346, 1350, 1357, 1396, 1397, 1398, 1399, 1311, /* 400 */ 1313, 1294, 1314, 1350, 1315, 1316, 1317, 1355, 1319, 1331,
/* 410 */ 1321, 1356, 1379, 1402, 1363, 1364, 1365, 1366, 1368, 1373, /* 410 */ 1322, 1356, 1330, 1334, 1327, 1357, 1358, 1380, 1381, 1318,
/* 420 */ 1369, 1372, 1376, 1405, 1384, 1407, 1403, 1370, 1420, 1404, /* 420 */ 1324, 1338, 1375, 1386, 1351, 1352, 1353, 1354, 1363, 1365,
/* 430 */ 1377, 1421, 1406, 1427, 1408, 1409, 1431, 1295, 1386, 1434, /* 430 */ 1361, 1366, 1367, 1405, 1388, 1412, 1393, 1368, 1418, 1398,
/* 440 */ 1274, 1415, 1299, 1304, 1438, 1439, 1441, 1367, 1411, 1310, /* 440 */ 1374, 1422, 1402, 1425, 1404, 1407, 1428, 1287, 1383, 1431,
/* 450 */ 1401, 1410, 1231, 1387, 1413, 1389, 1375, 1391, 1392, 1393, /* 450 */ 1325, 1419, 1328, 1300, 1434, 1449, 1451, 1372, 1417, 1329,
/* 460 */ 1426, 1432, 1395, 1436, 1237, 1400, 1414, 1435, 1272, 1443, /* 460 */ 1414, 1415, 1245, 1378, 1421, 1379, 1385, 1387, 1390, 1391,
/* 470 */ 1450, 1416, 1444, 1270, 1449, 1451, 1453, 1455, 1456, 1457, /* 470 */ 1423, 1427, 1394, 1435, 1265, 1399, 1400, 1439, 1278, 1438,
/* 480 */ 1478, 1343, 1464, 1425, 1430, 1442, 1463, 1437, 1445, 1467, /* 480 */ 1444, 1408, 1452, 1332, 1409, 1447, 1448, 1450, 1461, 1463,
/* 490 */ 1490, 1348, 1446, 1448, 1460, 1447, 1452, 1381, 1471, 1514, /* 490 */ 1464, 1409, 1473, 1335, 1455, 1433, 1432, 1437, 1454, 1440,
/* 500 */ 1482, 1412, 1473, 1466, 1487, 1510, 1477, 1479, 1481, 1493, /* 500 */ 1441, 1472, 1497, 1343, 1453, 1443, 1446, 1457, 1458, 1392,
/* 510 */ 1483, 1468, 1485, 1511, 1515, 1484, 1486, 1521, 1491, 1489, /* 510 */ 1459, 1529, 1493, 1401, 1460, 1465, 1487, 1490, 1462, 1466,
/* 520 */ 1525, 1494, 1492, 1528, 1496, 1498, 1530, 1500, 1480, 1497, /* 520 */ 1469, 1532, 1471, 1476, 1489, 1517, 1521, 1491, 1492, 1525,
/* 530 */ 1499, 1501, 1559, 1495, 1503, 1508, 1550, 1518, 1502, 1553, /* 530 */ 1494, 1495, 1528, 1499, 1496, 1535, 1504, 1513, 1549, 1518,
/* 540 */ 1580, 1545, 1548, 1543, 1531, 1567, 1564, 1566, 1571, 1578, /* 540 */ 1500, 1502, 1503, 1505, 1575, 1508, 1523, 1531, 1554, 1533,
/* 550 */ 1581, 1592, 1582, 1583, 1568, 1368, 1586, 1373, 1587, 1588, /* 550 */ 1514, 1558, 1592, 1559, 1570, 1553, 1552, 1590, 1585, 1586,
/* 560 */ 1589, 1590, 1591, 1595, 1639, 1596, 1599, 1604, 1645, 1602, /* 560 */ 1587, 1589, 1594, 1615, 1595, 1596, 1580, 1363, 1600, 1365,
/* 570 */ 1601, 1613, 1660, 1615, 1618, 1627, 1665, 1619, 1622, 1631, /* 570 */ 1601, 1611, 1616, 1617, 1618, 1619, 1639, 1620, 1627, 1625,
/* 580 */ 1669, 1623, 1625, 1672, 1673, 1653, 1655, 1657, 1658, 1656, /* 580 */ 1671, 1628, 1629, 1636, 1685, 1640, 1643, 1653, 1691, 1645,
/* 590 */ 1670, /* 590 */ 1654, 1661, 1701, 1655, 1657, 1704, 1707, 1686, 1688, 1689,
/* 600 */ 1692, 1694, 1696,
}; };
#define YY_REDUCE_COUNT (237) #define YY_REDUCE_COUNT (247)
#define YY_REDUCE_MIN (-317) #define YY_REDUCE_MIN (-317)
#define YY_REDUCE_MAX (1705) #define YY_REDUCE_MAX (1849)
static const short yy_reduce_ofst[] = { static const short yy_reduce_ofst[] = {
/* 0 */ 38, 489, 564, 675, 740, 801, 855, 315, 909, 959, /* 0 */ 38, 489, 564, 625, 731, 806, 839, 901, 315, 964,
/* 10 */ 991, -223, 1009, 90, 1056, 628, 1071, 1146, 1176, 1223, /* 10 */ 1018, 1058, 1077, -223, 1133, 90, 678, 955, 1192, 1246,
/* 20 */ 941, 1232, 1279, 1309, 1341, 1371, 1418, 1433, 1465, 1517, /* 20 */ 1276, 1309, 1339, 1369, 1420, 1436, 1483, 1501, 1516, 1563,
/* 30 */ 1547, 1579, 1594, 1641, 1654, 1705, -191, 23, 390, 460, /* 30 */ 1579, 1626, 1656, 1706, 1736, 1786, 1795, 1849, -191, 1364,
/* 40 */ -224, 235, -282, 257, -280, -141, -112, 197, -244, -240, /* 40 */ 23, 390, 460, -224, 235, -282, 257, -280, 197, -141,
/* 50 */ -317, -243, 200, 361, 383, 449, 450, -152, 452, -221, /* 50 */ -112, -244, -240, -317, -202, -190, -243, 200, 327, 361,
/* 60 */ -165, -219, -64, 117, 508, 511, 55, 512, 178, 104, /* 60 */ 383, 449, -152, 450, -221, 60, -64, -144, 337, 452,
/* 70 */ 47, 318, 516, -250, -124, -312, -312, -312, -113, -170, /* 70 */ 55, 508, 78, 223, 47, 117, 511, -250, -177, -312,
/* 80 */ -121, -131, -17, 82, 154, 245, 298, 356, 357, 358, /* 80 */ -312, -312, -113, 245, -34, 261, 298, 304, 354, 357,
/* 90 */ 362, 371, 412, 424, 434, 472, 476, 477, 488, 490, /* 90 */ 358, 371, 405, 424, 434, 470, 474, 476, 477, 488,
/* 100 */ 321, -29, -99, 161, 360, 224, -277, 312, 331, 385, /* 100 */ 490, 491, 496, 520, 70, -139, 161, 289, 326, 334,
/* 110 */ 394, 60, 409, 364, 442, 369, 470, 524, -259, -255, /* 110 */ -277, 149, 475, -114, 394, 486, 252, 170, 267, 370,
/* 120 */ 617, 621, 622, 625, 630, 599, 659, 647, 550, 572, /* 120 */ 530, 567, -259, -255, 597, 599, 603, 626, 627, 604,
/* 130 */ 608, 580, 677, 676, 654, 658, 603, 603, 603, 699, /* 130 */ 656, 660, 558, 576, 621, 587, 682, 685, 674, 647,
/* 140 */ 624, 632, 699, 731, 680, 747, 701, 755, 758, 723, /* 140 */ 623, 623, 623, 679, 609, 615, 616, 640, 679, 734,
/* 150 */ 733, 742, 762, 774, 776, 722, 772, 745, 775, 738, /* 150 */ 683, 742, 707, 750, 758, 726, 733, 736, 764, 771,
/* 160 */ 780, 753, 748, 783, 784, 792, 785, 803, 779, 787, /* 160 */ 773, 719, 769, 737, 772, 735, 780, 759, 753, 784,
/* 170 */ 789, 793, 794, 798, 799, 805, 807, 809, 810, 821, /* 170 */ 796, 804, 801, 810, 789, 790, 792, 793, 803, 808,
/* 180 */ 806, 771, 770, 829, 782, 808, 833, 778, 837, 816, /* 180 */ 809, 814, 816, 817, 819, 825, 836, 797, 783, 830,
/* 190 */ 811, 838, 788, 754, 812, 814, 756, 815, 817, 820, /* 190 */ 795, 807, 840, 813, 843, 821, 824, 847, 828, 754,
/* 200 */ 795, 763, 804, 781, 603, 847, 822, 825, 826, 836, /* 200 */ 833, 820, 755, 837, 832, 845, 761, 763, 774, 788,
/* 210 */ 840, 828, 699, 849, 852, 856, 857, 859, 865, 880, /* 210 */ 623, 857, 835, 841, 838, 842, 787, 846, 848, 854,
/* 220 */ 860, 912, 895, 920, 888, 901, 915, 928, 926, 943, /* 220 */ 853, 855, 679, 864, 867, 868, 869, 877, 873, 890,
/* 230 */ 886, 887, 892, 929, 933, 934, 942, 954, /* 230 */ 875, 918, 906, 921, 897, 904, 920, 932, 930, 939,
/* 240 */ 885, 882, 891, 922, 925, 929, 937, 956,
}; };
static const YYACTIONTYPE yy_default[] = { static const YYACTIONTYPE yy_default[] = {
/* 0 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 0 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 10 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 10 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 20 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 20 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 30 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 30 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 40 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 40 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 50 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1396, 1327, 1327, /* 50 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 60 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 60 */ 1341, 1341, 1410, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 70 */ 1327, 1327, 1327, 1394, 1534, 1327, 1698, 1327, 1327, 1327, /* 70 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1408, 1548, 1341,
/* 80 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 80 */ 1712, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 90 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 90 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 100 */ 1327, 1327, 1327, 1327, 1396, 1327, 1709, 1709, 1709, 1394, /* 100 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1410, 1341,
/* 110 */ 1327, 1327, 1327, 1327, 1327, 1327, 1489, 1327, 1327, 1327, /* 110 */ 1723, 1723, 1723, 1408, 1341, 1341, 1341, 1341, 1341, 1341,
/* 120 */ 1327, 1327, 1327, 1327, 1327, 1572, 1327, 1327, 1774, 1327, /* 120 */ 1503, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1586,
/* 130 */ 1578, 1733, 1327, 1327, 1442, 1725, 1701, 1715, 1702, 1327, /* 130 */ 1341, 1341, 1789, 1341, 1592, 1747, 1341, 1341, 1456, 1739,
/* 140 */ 1759, 1718, 1327, 1327, 1327, 1327, 1564, 1327, 1327, 1539, /* 140 */ 1715, 1729, 1716, 1341, 1774, 1774, 1774, 1732, 1341, 1341,
/* 150 */ 1536, 1536, 1327, 1327, 1327, 1327, 1396, 1327, 1396, 1327, /* 150 */ 1341, 1341, 1578, 1341, 1341, 1553, 1550, 1550, 1341, 1341,
/* 160 */ 1396, 1327, 1327, 1396, 1396, 1327, 1396, 1327, 1327, 1327, /* 160 */ 1341, 1341, 1410, 1341, 1410, 1341, 1410, 1341, 1341, 1410,
/* 170 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 170 */ 1410, 1341, 1410, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 180 */ 1327, 1327, 1327, 1394, 1574, 1327, 1394, 1327, 1394, 1327, /* 180 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1408,
/* 190 */ 1327, 1394, 1327, 1740, 1738, 1327, 1740, 1738, 1327, 1327, /* 190 */ 1588, 1341, 1408, 1341, 1408, 1341, 1341, 1408, 1341, 1754,
/* 200 */ 1752, 1748, 1731, 1729, 1715, 1327, 1327, 1327, 1777, 1765, /* 200 */ 1752, 1341, 1754, 1752, 1341, 1341, 1766, 1762, 1745, 1743,
/* 210 */ 1761, 1327, 1327, 1738, 1327, 1327, 1738, 1327, 1547, 1327, /* 210 */ 1729, 1341, 1341, 1341, 1780, 1776, 1792, 1780, 1776, 1780,
/* 220 */ 1327, 1394, 1327, 1394, 1327, 1458, 1327, 1327, 1394, 1327, /* 220 */ 1776, 1341, 1341, 1752, 1341, 1341, 1752, 1341, 1561, 1341,
/* 230 */ 1566, 1580, 1556, 1492, 1492, 1492, 1397, 1332, 1327, 1327, /* 230 */ 1341, 1408, 1341, 1408, 1341, 1472, 1341, 1341, 1408, 1341,
/* 240 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1454, /* 240 */ 1580, 1594, 1570, 1506, 1506, 1506, 1411, 1346, 1341, 1341,
/* 250 */ 1643, 1751, 1750, 1674, 1673, 1672, 1670, 1642, 1327, 1327, /* 250 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1468,
/* 260 */ 1327, 1327, 1327, 1327, 1636, 1637, 1635, 1634, 1327, 1327, /* 260 */ 1657, 1765, 1764, 1688, 1687, 1686, 1684, 1656, 1341, 1341,
/* 270 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 270 */ 1341, 1341, 1341, 1341, 1650, 1651, 1649, 1648, 1341, 1341,
/* 280 */ 1327, 1327, 1327, 1699, 1327, 1762, 1766, 1327, 1327, 1327, /* 280 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 290 */ 1620, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 290 */ 1341, 1341, 1341, 1713, 1341, 1777, 1781, 1341, 1341, 1341,
/* 300 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 300 */ 1634, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 310 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 310 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 320 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 320 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 330 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 330 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 340 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 340 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 350 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 350 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 360 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 360 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 370 */ 1327, 1327, 1327, 1361, 1327, 1327, 1327, 1327, 1327, 1327, /* 370 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 380 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 380 */ 1341, 1341, 1341, 1375, 1341, 1341, 1341, 1341, 1341, 1341,
/* 390 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 390 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 400 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 400 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 410 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1423, 1422, /* 410 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 420 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 420 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1437, 1436,
/* 430 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 430 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 440 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 440 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 450 */ 1722, 1732, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 450 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 460 */ 1327, 1620, 1327, 1749, 1327, 1708, 1704, 1327, 1327, 1700, /* 460 */ 1736, 1746, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 470 */ 1327, 1327, 1760, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 470 */ 1341, 1634, 1341, 1763, 1341, 1722, 1718, 1341, 1341, 1714,
/* 480 */ 1694, 1327, 1667, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 480 */ 1341, 1341, 1775, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 490 */ 1327, 1630, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 490 */ 1341, 1341, 1708, 1341, 1681, 1341, 1341, 1341, 1341, 1341,
/* 500 */ 1327, 1327, 1327, 1327, 1619, 1327, 1658, 1327, 1327, 1327, /* 500 */ 1341, 1341, 1341, 1644, 1341, 1341, 1341, 1341, 1341, 1341,
/* 510 */ 1327, 1327, 1327, 1327, 1327, 1486, 1327, 1327, 1327, 1327, /* 510 */ 1341, 1341, 1341, 1341, 1341, 1341, 1633, 1341, 1672, 1341,
/* 520 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1471, 1469, /* 520 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1500, 1341, 1341,
/* 530 */ 1468, 1467, 1327, 1464, 1327, 1327, 1327, 1327, 1327, 1327, /* 530 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 540 */ 1327, 1327, 1327, 1327, 1327, 1416, 1327, 1327, 1327, 1327, /* 540 */ 1485, 1483, 1482, 1481, 1341, 1478, 1341, 1341, 1341, 1341,
/* 550 */ 1327, 1327, 1327, 1327, 1327, 1407, 1327, 1406, 1327, 1327, /* 550 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1430, 1341, 1341,
/* 560 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 560 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1421, 1341, 1420,
/* 570 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 570 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 580 */ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, /* 580 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 590 */ 1327, /* 590 */ 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341, 1341,
/* 600 */ 1341, 1341, 1341,
}; };
/********** End of lemon-generated parsing tables *****************************/ /********** End of lemon-generated parsing tables *****************************/
...@@ -1937,27 +1946,28 @@ static const char *const yyRuleName[] = { ...@@ -1937,27 +1946,28 @@ static const char *const yyRuleName[] = {
/* 426 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body", /* 426 */ "query_expression_body ::= query_expression_body UNION ALL query_expression_body",
/* 427 */ "query_expression_body ::= query_expression_body UNION query_expression_body", /* 427 */ "query_expression_body ::= query_expression_body UNION query_expression_body",
/* 428 */ "query_primary ::= query_specification", /* 428 */ "query_primary ::= query_specification",
/* 429 */ "order_by_clause_opt ::=", /* 429 */ "query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP",
/* 430 */ "order_by_clause_opt ::= ORDER BY sort_specification_list", /* 430 */ "order_by_clause_opt ::=",
/* 431 */ "slimit_clause_opt ::=", /* 431 */ "order_by_clause_opt ::= ORDER BY sort_specification_list",
/* 432 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER", /* 432 */ "slimit_clause_opt ::=",
/* 433 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER", /* 433 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER",
/* 434 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER", /* 434 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER",
/* 435 */ "limit_clause_opt ::=", /* 435 */ "slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER",
/* 436 */ "limit_clause_opt ::= LIMIT NK_INTEGER", /* 436 */ "limit_clause_opt ::=",
/* 437 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER", /* 437 */ "limit_clause_opt ::= LIMIT NK_INTEGER",
/* 438 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER", /* 438 */ "limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER",
/* 439 */ "subquery ::= NK_LP query_expression NK_RP", /* 439 */ "limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER",
/* 440 */ "search_condition ::= common_expression", /* 440 */ "subquery ::= NK_LP query_expression NK_RP",
/* 441 */ "sort_specification_list ::= sort_specification", /* 441 */ "search_condition ::= common_expression",
/* 442 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification", /* 442 */ "sort_specification_list ::= sort_specification",
/* 443 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt", /* 443 */ "sort_specification_list ::= sort_specification_list NK_COMMA sort_specification",
/* 444 */ "ordering_specification_opt ::=", /* 444 */ "sort_specification ::= expression ordering_specification_opt null_ordering_opt",
/* 445 */ "ordering_specification_opt ::= ASC", /* 445 */ "ordering_specification_opt ::=",
/* 446 */ "ordering_specification_opt ::= DESC", /* 446 */ "ordering_specification_opt ::= ASC",
/* 447 */ "null_ordering_opt ::=", /* 447 */ "ordering_specification_opt ::= DESC",
/* 448 */ "null_ordering_opt ::= NULLS FIRST", /* 448 */ "null_ordering_opt ::=",
/* 449 */ "null_ordering_opt ::= NULLS LAST", /* 449 */ "null_ordering_opt ::= NULLS FIRST",
/* 450 */ "null_ordering_opt ::= NULLS LAST",
}; };
#endif /* NDEBUG */ #endif /* NDEBUG */
...@@ -2979,27 +2989,28 @@ static const struct { ...@@ -2979,27 +2989,28 @@ static const struct {
{ 349, -4 }, /* (426) query_expression_body ::= query_expression_body UNION ALL query_expression_body */ { 349, -4 }, /* (426) query_expression_body ::= query_expression_body UNION ALL query_expression_body */
{ 349, -3 }, /* (427) query_expression_body ::= query_expression_body UNION query_expression_body */ { 349, -3 }, /* (427) query_expression_body ::= query_expression_body UNION query_expression_body */
{ 353, -1 }, /* (428) query_primary ::= query_specification */ { 353, -1 }, /* (428) query_primary ::= query_specification */
{ 350, 0 }, /* (429) order_by_clause_opt ::= */ { 353, -6 }, /* (429) query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */
{ 350, -3 }, /* (430) order_by_clause_opt ::= ORDER BY sort_specification_list */ { 350, 0 }, /* (430) order_by_clause_opt ::= */
{ 351, 0 }, /* (431) slimit_clause_opt ::= */ { 350, -3 }, /* (431) order_by_clause_opt ::= ORDER BY sort_specification_list */
{ 351, -2 }, /* (432) slimit_clause_opt ::= SLIMIT NK_INTEGER */ { 351, 0 }, /* (432) slimit_clause_opt ::= */
{ 351, -4 }, /* (433) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ { 351, -2 }, /* (433) slimit_clause_opt ::= SLIMIT NK_INTEGER */
{ 351, -4 }, /* (434) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ { 351, -4 }, /* (434) slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
{ 352, 0 }, /* (435) limit_clause_opt ::= */ { 351, -4 }, /* (435) slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
{ 352, -2 }, /* (436) limit_clause_opt ::= LIMIT NK_INTEGER */ { 352, 0 }, /* (436) limit_clause_opt ::= */
{ 352, -4 }, /* (437) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ { 352, -2 }, /* (437) limit_clause_opt ::= LIMIT NK_INTEGER */
{ 352, -4 }, /* (438) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ { 352, -4 }, /* (438) limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */
{ 314, -3 }, /* (439) subquery ::= NK_LP query_expression NK_RP */ { 352, -4 }, /* (439) limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */
{ 335, -1 }, /* (440) search_condition ::= common_expression */ { 314, -3 }, /* (440) subquery ::= NK_LP query_expression NK_RP */
{ 354, -1 }, /* (441) sort_specification_list ::= sort_specification */ { 335, -1 }, /* (441) search_condition ::= common_expression */
{ 354, -3 }, /* (442) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ { 354, -1 }, /* (442) sort_specification_list ::= sort_specification */
{ 355, -3 }, /* (443) sort_specification ::= expression ordering_specification_opt null_ordering_opt */ { 354, -3 }, /* (443) sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */
{ 356, 0 }, /* (444) ordering_specification_opt ::= */ { 355, -3 }, /* (444) sort_specification ::= expression ordering_specification_opt null_ordering_opt */
{ 356, -1 }, /* (445) ordering_specification_opt ::= ASC */ { 356, 0 }, /* (445) ordering_specification_opt ::= */
{ 356, -1 }, /* (446) ordering_specification_opt ::= DESC */ { 356, -1 }, /* (446) ordering_specification_opt ::= ASC */
{ 357, 0 }, /* (447) null_ordering_opt ::= */ { 356, -1 }, /* (447) ordering_specification_opt ::= DESC */
{ 357, -2 }, /* (448) null_ordering_opt ::= NULLS FIRST */ { 357, 0 }, /* (448) null_ordering_opt ::= */
{ 357, -2 }, /* (449) null_ordering_opt ::= NULLS LAST */ { 357, -2 }, /* (449) null_ordering_opt ::= NULLS FIRST */
{ 357, -2 }, /* (450) null_ordering_opt ::= NULLS LAST */
}; };
static void yy_accept(yyParser*); /* Forward Declaration */ static void yy_accept(yyParser*); /* Forward Declaration */
...@@ -3414,7 +3425,7 @@ static YYACTIONTYPE yy_reduce( ...@@ -3414,7 +3425,7 @@ static YYACTIONTYPE yy_reduce(
case 286: /* literal_list ::= signed_literal */ yytestcase(yyruleno==286); case 286: /* literal_list ::= signed_literal */ yytestcase(yyruleno==286);
case 338: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==338); case 338: /* other_para_list ::= star_func_para */ yytestcase(yyruleno==338);
case 393: /* select_sublist ::= select_item */ yytestcase(yyruleno==393); case 393: /* select_sublist ::= select_item */ yytestcase(yyruleno==393);
case 441: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==441); case 442: /* sort_specification_list ::= sort_specification */ yytestcase(yyruleno==442);
{ yylhsminor.yy60 = createNodeList(pCxt, yymsp[0].minor.yy172); } { yylhsminor.yy60 = createNodeList(pCxt, yymsp[0].minor.yy172); }
yymsp[0].minor.yy60 = yylhsminor.yy60; yymsp[0].minor.yy60 = yylhsminor.yy60;
break; break;
...@@ -3426,7 +3437,7 @@ static YYACTIONTYPE yy_reduce( ...@@ -3426,7 +3437,7 @@ static YYACTIONTYPE yy_reduce(
case 287: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==287); case 287: /* literal_list ::= literal_list NK_COMMA signed_literal */ yytestcase(yyruleno==287);
case 339: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==339); case 339: /* other_para_list ::= other_para_list NK_COMMA star_func_para */ yytestcase(yyruleno==339);
case 394: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==394); case 394: /* select_sublist ::= select_sublist NK_COMMA select_item */ yytestcase(yyruleno==394);
case 442: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==442); case 443: /* sort_specification_list ::= sort_specification_list NK_COMMA sort_specification */ yytestcase(yyruleno==443);
{ yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, yymsp[0].minor.yy172); } { yylhsminor.yy60 = addNodeToList(pCxt, yymsp[-2].minor.yy60, yymsp[0].minor.yy172); }
yymsp[-2].minor.yy60 = yylhsminor.yy60; yymsp[-2].minor.yy60 = yylhsminor.yy60;
break; break;
...@@ -3509,7 +3520,7 @@ static YYACTIONTYPE yy_reduce( ...@@ -3509,7 +3520,7 @@ static YYACTIONTYPE yy_reduce(
case 159: /* tags_def_opt ::= */ yytestcase(yyruleno==159); case 159: /* tags_def_opt ::= */ yytestcase(yyruleno==159);
case 401: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==401); case 401: /* partition_by_clause_opt ::= */ yytestcase(yyruleno==401);
case 418: /* group_by_clause_opt ::= */ yytestcase(yyruleno==418); case 418: /* group_by_clause_opt ::= */ yytestcase(yyruleno==418);
case 429: /* order_by_clause_opt ::= */ yytestcase(yyruleno==429); case 430: /* order_by_clause_opt ::= */ yytestcase(yyruleno==430);
{ yymsp[1].minor.yy60 = NULL; } { yymsp[1].minor.yy60 = NULL; }
break; break;
case 129: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */ case 129: /* specific_tags_opt ::= NK_LP col_name_list NK_RP */
...@@ -3750,8 +3761,8 @@ static YYACTIONTYPE yy_reduce( ...@@ -3750,8 +3761,8 @@ static YYACTIONTYPE yy_reduce(
case 408: /* sliding_opt ::= */ yytestcase(yyruleno==408); case 408: /* sliding_opt ::= */ yytestcase(yyruleno==408);
case 410: /* fill_opt ::= */ yytestcase(yyruleno==410); case 410: /* fill_opt ::= */ yytestcase(yyruleno==410);
case 422: /* having_clause_opt ::= */ yytestcase(yyruleno==422); case 422: /* having_clause_opt ::= */ yytestcase(yyruleno==422);
case 431: /* slimit_clause_opt ::= */ yytestcase(yyruleno==431); case 432: /* slimit_clause_opt ::= */ yytestcase(yyruleno==432);
case 435: /* limit_clause_opt ::= */ yytestcase(yyruleno==435); case 436: /* limit_clause_opt ::= */ yytestcase(yyruleno==436);
{ yymsp[1].minor.yy172 = NULL; } { yymsp[1].minor.yy172 = NULL; }
break; break;
case 207: /* like_pattern_opt ::= LIKE NK_STRING */ case 207: /* like_pattern_opt ::= LIKE NK_STRING */
...@@ -4001,7 +4012,7 @@ static YYACTIONTYPE yy_reduce( ...@@ -4001,7 +4012,7 @@ static YYACTIONTYPE yy_reduce(
case 285: /* signed_literal ::= literal_func */ yytestcase(yyruleno==285); case 285: /* signed_literal ::= literal_func */ yytestcase(yyruleno==285);
case 340: /* star_func_para ::= expression */ yytestcase(yyruleno==340); case 340: /* star_func_para ::= expression */ yytestcase(yyruleno==340);
case 395: /* select_item ::= common_expression */ yytestcase(yyruleno==395); case 395: /* select_item ::= common_expression */ yytestcase(yyruleno==395);
case 440: /* search_condition ::= common_expression */ yytestcase(yyruleno==440); case 441: /* search_condition ::= common_expression */ yytestcase(yyruleno==441);
{ yylhsminor.yy172 = releaseRawExprNode(pCxt, yymsp[0].minor.yy172); } { yylhsminor.yy172 = releaseRawExprNode(pCxt, yymsp[0].minor.yy172); }
yymsp[0].minor.yy172 = yylhsminor.yy172; yymsp[0].minor.yy172 = yylhsminor.yy172;
break; break;
...@@ -4295,7 +4306,7 @@ static YYACTIONTYPE yy_reduce( ...@@ -4295,7 +4306,7 @@ static YYACTIONTYPE yy_reduce(
break; break;
case 402: /* partition_by_clause_opt ::= PARTITION BY expression_list */ case 402: /* partition_by_clause_opt ::= PARTITION BY expression_list */
case 419: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==419); case 419: /* group_by_clause_opt ::= GROUP BY group_by_list */ yytestcase(yyruleno==419);
case 430: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==430); case 431: /* order_by_clause_opt ::= ORDER BY sort_specification_list */ yytestcase(yyruleno==431);
{ yymsp[-2].minor.yy60 = yymsp[0].minor.yy60; } { yymsp[-2].minor.yy60 = yymsp[0].minor.yy60; }
break; break;
case 404: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */ case 404: /* twindow_clause_opt ::= SESSION NK_LP column_reference NK_COMMA duration_literal NK_RP */
...@@ -4358,42 +4369,48 @@ static YYACTIONTYPE yy_reduce( ...@@ -4358,42 +4369,48 @@ static YYACTIONTYPE yy_reduce(
{ yylhsminor.yy172 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy172, yymsp[0].minor.yy172); } { yylhsminor.yy172 = createSetOperator(pCxt, SET_OP_TYPE_UNION, yymsp[-2].minor.yy172, yymsp[0].minor.yy172); }
yymsp[-2].minor.yy172 = yylhsminor.yy172; yymsp[-2].minor.yy172 = yylhsminor.yy172;
break; break;
case 432: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */ case 429: /* query_primary ::= NK_LP query_expression_body order_by_clause_opt slimit_clause_opt limit_clause_opt NK_RP */
case 436: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==436); { yymsp[-5].minor.yy172 = yymsp[-4].minor.yy172; }
yy_destructor(yypParser,350,&yymsp[-3].minor);
yy_destructor(yypParser,351,&yymsp[-2].minor);
yy_destructor(yypParser,352,&yymsp[-1].minor);
break;
case 433: /* slimit_clause_opt ::= SLIMIT NK_INTEGER */
case 437: /* limit_clause_opt ::= LIMIT NK_INTEGER */ yytestcase(yyruleno==437);
{ yymsp[-1].minor.yy172 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); } { yymsp[-1].minor.yy172 = createLimitNode(pCxt, &yymsp[0].minor.yy0, NULL); }
break; break;
case 433: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */ case 434: /* slimit_clause_opt ::= SLIMIT NK_INTEGER SOFFSET NK_INTEGER */
case 437: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==437); case 438: /* limit_clause_opt ::= LIMIT NK_INTEGER OFFSET NK_INTEGER */ yytestcase(yyruleno==438);
{ yymsp[-3].minor.yy172 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); } { yymsp[-3].minor.yy172 = createLimitNode(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0); }
break; break;
case 434: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */ case 435: /* slimit_clause_opt ::= SLIMIT NK_INTEGER NK_COMMA NK_INTEGER */
case 438: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==438); case 439: /* limit_clause_opt ::= LIMIT NK_INTEGER NK_COMMA NK_INTEGER */ yytestcase(yyruleno==439);
{ yymsp[-3].minor.yy172 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); } { yymsp[-3].minor.yy172 = createLimitNode(pCxt, &yymsp[0].minor.yy0, &yymsp[-2].minor.yy0); }
break; break;
case 439: /* subquery ::= NK_LP query_expression NK_RP */ case 440: /* subquery ::= NK_LP query_expression NK_RP */
{ yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy172); } { yylhsminor.yy172 = createRawExprNodeExt(pCxt, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0, yymsp[-1].minor.yy172); }
yymsp[-2].minor.yy172 = yylhsminor.yy172; yymsp[-2].minor.yy172 = yylhsminor.yy172;
break; break;
case 443: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */ case 444: /* sort_specification ::= expression ordering_specification_opt null_ordering_opt */
{ yylhsminor.yy172 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), yymsp[-1].minor.yy14, yymsp[0].minor.yy17); } { yylhsminor.yy172 = createOrderByExprNode(pCxt, releaseRawExprNode(pCxt, yymsp[-2].minor.yy172), yymsp[-1].minor.yy14, yymsp[0].minor.yy17); }
yymsp[-2].minor.yy172 = yylhsminor.yy172; yymsp[-2].minor.yy172 = yylhsminor.yy172;
break; break;
case 444: /* ordering_specification_opt ::= */ case 445: /* ordering_specification_opt ::= */
{ yymsp[1].minor.yy14 = ORDER_ASC; } { yymsp[1].minor.yy14 = ORDER_ASC; }
break; break;
case 445: /* ordering_specification_opt ::= ASC */ case 446: /* ordering_specification_opt ::= ASC */
{ yymsp[0].minor.yy14 = ORDER_ASC; } { yymsp[0].minor.yy14 = ORDER_ASC; }
break; break;
case 446: /* ordering_specification_opt ::= DESC */ case 447: /* ordering_specification_opt ::= DESC */
{ yymsp[0].minor.yy14 = ORDER_DESC; } { yymsp[0].minor.yy14 = ORDER_DESC; }
break; break;
case 447: /* null_ordering_opt ::= */ case 448: /* null_ordering_opt ::= */
{ yymsp[1].minor.yy17 = NULL_ORDER_DEFAULT; } { yymsp[1].minor.yy17 = NULL_ORDER_DEFAULT; }
break; break;
case 448: /* null_ordering_opt ::= NULLS FIRST */ case 449: /* null_ordering_opt ::= NULLS FIRST */
{ yymsp[-1].minor.yy17 = NULL_ORDER_FIRST; } { yymsp[-1].minor.yy17 = NULL_ORDER_FIRST; }
break; break;
case 449: /* null_ordering_opt ::= NULLS LAST */ case 450: /* null_ordering_opt ::= NULLS LAST */
{ yymsp[-1].minor.yy17 = NULL_ORDER_LAST; } { yymsp[-1].minor.yy17 = NULL_ORDER_LAST; }
break; break;
default: default:
......
...@@ -232,4 +232,12 @@ TEST_F(ParserSelectTest, semanticError) { ...@@ -232,4 +232,12 @@ TEST_F(ParserSelectTest, semanticError) {
PARSER_STAGE_TRANSLATE); PARSER_STAGE_TRANSLATE);
} }
TEST_F(ParserSelectTest, setOperator) {
useDb("root", "test");
run("SELECT * FROM t1 UNION ALL SELECT * FROM t1");
run("(SELECT * FROM t1) UNION ALL (SELECT * FROM t1)");
}
} // namespace ParserTest } // namespace ParserTest
...@@ -723,7 +723,10 @@ static int32_t opkGetScanNodesImpl(SLogicNode* pNode, bool* pNotOptimize, SNodeL ...@@ -723,7 +723,10 @@ static int32_t opkGetScanNodesImpl(SLogicNode* pNode, bool* pNotOptimize, SNodeL
switch (nodeType(pNode)) { switch (nodeType(pNode)) {
case QUERY_NODE_LOGIC_PLAN_SCAN: case QUERY_NODE_LOGIC_PLAN_SCAN:
if (TSDB_SUPER_TABLE != ((SScanLogicNode*)pNode)->pMeta->tableType) {
return nodesListMakeAppend(pScanNodes, pNode); return nodesListMakeAppend(pScanNodes, pNode);
}
break;
case QUERY_NODE_LOGIC_PLAN_JOIN: case QUERY_NODE_LOGIC_PLAN_JOIN:
code = opkGetScanNodesImpl(nodesListGetNode(pNode->pChildren, 0), pNotOptimize, pScanNodes); code = opkGetScanNodesImpl(nodesListGetNode(pNode->pChildren, 0), pNotOptimize, pScanNodes);
if (TSDB_CODE_SUCCESS == code) { if (TSDB_CODE_SUCCESS == code) {
...@@ -739,6 +742,7 @@ static int32_t opkGetScanNodesImpl(SLogicNode* pNode, bool* pNotOptimize, SNodeL ...@@ -739,6 +742,7 @@ static int32_t opkGetScanNodesImpl(SLogicNode* pNode, bool* pNotOptimize, SNodeL
if (1 != LIST_LENGTH(pNode->pChildren)) { if (1 != LIST_LENGTH(pNode->pChildren)) {
*pNotOptimize = true; *pNotOptimize = true;
return TSDB_CODE_SUCCESS;
} }
return opkGetScanNodesImpl(nodesListGetNode(pNode->pChildren, 0), pNotOptimize, pScanNodes); return opkGetScanNodesImpl(nodesListGetNode(pNode->pChildren, 0), pNotOptimize, pScanNodes);
......
...@@ -23,12 +23,15 @@ class PlanSubqeuryTest : public PlannerTestBase {}; ...@@ -23,12 +23,15 @@ class PlanSubqeuryTest : public PlannerTestBase {};
TEST_F(PlanSubqeuryTest, basic) { TEST_F(PlanSubqeuryTest, basic) {
useDb("root", "test"); useDb("root", "test");
run("select * from (select * from t1)"); run("SELECT * FROM (SELECT * FROM t1)");
// run("SELECT LAST(c1) FROM ( SELECT * FROM t1)");
} }
TEST_F(PlanSubqeuryTest, doubleGroupBy) { TEST_F(PlanSubqeuryTest, doubleGroupBy) {
useDb("root", "test"); useDb("root", "test");
run("select count(*) from (select c1 + c3 a, c1 + count(*) b from t1 where c2 = 'abc' group by c1, c3) where a > 100 " run("SELECT COUNT(*) FROM ("
"group by b"); "SELECT c1 + c3 a, c1 + COUNT(*) b FROM t1 WHERE c2 = 'abc' GROUP BY c1, c3) "
"WHERE a > 100 GROUP BY b");
} }
...@@ -27,6 +27,7 @@ void sclConvertToTsValueNode(int8_t precision, SValueNode* valueNode) { ...@@ -27,6 +27,7 @@ void sclConvertToTsValueNode(int8_t precision, SValueNode* valueNode) {
valueNode->datum.i = 0; valueNode->datum.i = 0;
} }
taosMemoryFree(timeStr); taosMemoryFree(timeStr);
valueNode->typeData = valueNode->datum.i;
valueNode->node.resType.type = TSDB_DATA_TYPE_TIMESTAMP; valueNode->node.resType.type = TSDB_DATA_TYPE_TIMESTAMP;
valueNode->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_TIMESTAMP].bytes; valueNode->node.resType.bytes = tDataTypes[TSDB_DATA_TYPE_TIMESTAMP].bytes;
......
...@@ -92,7 +92,7 @@ int32_t syncIOEqMsg(void *queue, SRpcMsg *pMsg) { ...@@ -92,7 +92,7 @@ int32_t syncIOEqMsg(void *queue, SRpcMsg *pMsg) {
syncRpcMsgLog2((char *)"==syncIOEqMsg==", pMsg); syncRpcMsgLog2((char *)"==syncIOEqMsg==", pMsg);
SRpcMsg *pTemp; SRpcMsg *pTemp;
pTemp = taosAllocateQitem(sizeof(SRpcMsg)); pTemp = taosAllocateQitem(sizeof(SRpcMsg), DEF_QITEM);
memcpy(pTemp, pMsg, sizeof(SRpcMsg)); memcpy(pTemp, pMsg, sizeof(SRpcMsg));
STaosQueue *pMsgQ = queue; STaosQueue *pMsgQ = queue;
...@@ -360,7 +360,7 @@ static void syncIOProcessRequest(void *pParent, SRpcMsg *pMsg, SEpSet *pEpSet) { ...@@ -360,7 +360,7 @@ static void syncIOProcessRequest(void *pParent, SRpcMsg *pMsg, SEpSet *pEpSet) {
syncRpcMsgLog2((char *)"==syncIOProcessRequest==", pMsg); syncRpcMsgLog2((char *)"==syncIOProcessRequest==", pMsg);
SSyncIO *io = pParent; SSyncIO *io = pParent;
SRpcMsg *pTemp; SRpcMsg *pTemp;
pTemp = taosAllocateQitem(sizeof(SRpcMsg)); pTemp = taosAllocateQitem(sizeof(SRpcMsg), DEF_QITEM);
memcpy(pTemp, pMsg, sizeof(SRpcMsg)); memcpy(pTemp, pMsg, sizeof(SRpcMsg));
taosWriteQitem(io->pMsgQ, pTemp); taosWriteQitem(io->pMsgQ, pTemp);
} }
...@@ -420,7 +420,7 @@ static void syncIOTickQ(void *param, void *tmrId) { ...@@ -420,7 +420,7 @@ static void syncIOTickQ(void *param, void *tmrId) {
SRpcMsg rpcMsg; SRpcMsg rpcMsg;
syncPingReply2RpcMsg(pMsg, &rpcMsg); syncPingReply2RpcMsg(pMsg, &rpcMsg);
SRpcMsg *pTemp; SRpcMsg *pTemp;
pTemp = taosAllocateQitem(sizeof(SRpcMsg)); pTemp = taosAllocateQitem(sizeof(SRpcMsg), DEF_QITEM);
memcpy(pTemp, &rpcMsg, sizeof(SRpcMsg)); memcpy(pTemp, &rpcMsg, sizeof(SRpcMsg));
syncRpcMsgLog2((char *)"==syncIOTickQ==", &rpcMsg); syncRpcMsgLog2((char *)"==syncIOTickQ==", &rpcMsg);
taosWriteQitem(io->pMsgQ, pTemp); taosWriteQitem(io->pMsgQ, pTemp);
......
# tdb # tdb
add_library(tdb STATIC "") add_library(tdb SHARED "")
target_sources(tdb target_sources(tdb
PRIVATE PRIVATE
"src/db/tdbPCache.c" "src/db/tdbPCache.c"
......
...@@ -114,7 +114,7 @@ int retrieveAuthInfo(void *parent, char *meterId, char *spi, char *encrypt, char ...@@ -114,7 +114,7 @@ int retrieveAuthInfo(void *parent, char *meterId, char *spi, char *encrypt, char
void processRequestMsg(void *pParent, SRpcMsg *pMsg, SEpSet *pEpSet) { void processRequestMsg(void *pParent, SRpcMsg *pMsg, SEpSet *pEpSet) {
SRpcMsg *pTemp; SRpcMsg *pTemp;
pTemp = taosAllocateQitem(sizeof(SRpcMsg)); pTemp = taosAllocateQitem(sizeof(SRpcMsg), DEF_QITEM);
memcpy(pTemp, pMsg, sizeof(SRpcMsg)); memcpy(pTemp, pMsg, sizeof(SRpcMsg));
tDebug("request is received, type:%d, contLen:%d, item:%p", pMsg->msgType, pMsg->contLen, pTemp); tDebug("request is received, type:%d, contLen:%d, item:%p", pMsg->msgType, pMsg->contLen, pTemp);
......
...@@ -103,7 +103,7 @@ int retrieveAuthInfo(void *parent, char *meterId, char *spi, char *encrypt, char ...@@ -103,7 +103,7 @@ int retrieveAuthInfo(void *parent, char *meterId, char *spi, char *encrypt, char
void processRequestMsg(void *pParent, SRpcMsg *pMsg, SEpSet *pEpSet) { void processRequestMsg(void *pParent, SRpcMsg *pMsg, SEpSet *pEpSet) {
SRpcMsg *pTemp; SRpcMsg *pTemp;
pTemp = taosAllocateQitem(sizeof(SRpcMsg)); pTemp = taosAllocateQitem(sizeof(SRpcMsg), DEF_QITEM);
memcpy(pTemp, pMsg, sizeof(SRpcMsg)); memcpy(pTemp, pMsg, sizeof(SRpcMsg));
tDebug("request is received, type:%d, contLen:%d, item:%p", pMsg->msgType, pMsg->contLen, pTemp); tDebug("request is received, type:%d, contLen:%d, item:%p", pMsg->msgType, pMsg->contLen, pTemp);
......
...@@ -236,3 +236,22 @@ int32_t taosMbsToWchars(TdWchar *pWchars, const char *pStrs, int32_t size) { ret ...@@ -236,3 +236,22 @@ int32_t taosMbsToWchars(TdWchar *pWchars, const char *pStrs, int32_t size) { ret
int32_t taosWcharToMb(char *pStr, TdWchar wchar) { return wctomb(pStr, wchar); } int32_t taosWcharToMb(char *pStr, TdWchar wchar) { return wctomb(pStr, wchar); }
int32_t taosWcharsToMbs(char *pStrs, TdWchar *pWchars, int32_t size) { return wcstombs(pStrs, pWchars, size); } int32_t taosWcharsToMbs(char *pStrs, TdWchar *pWchars, int32_t size) { return wcstombs(pStrs, pWchars, size); }
char *taosStrCaseStr(const char *str, const char *pattern) {
size_t i;
if (!*pattern)
return (char*)str;
for (; *str; str++) {
if (toupper(*str) == toupper(*pattern)) {
for (i = 1;; i++) {
if (!pattern[i])
return (char*)str;
if (toupper(str[i]) != toupper(pattern[i]))
break;
}
}
}
return NULL;
}
\ No newline at end of file
...@@ -95,6 +95,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_CFG_NOT_FOUND, "Config not found") ...@@ -95,6 +95,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_CFG_NOT_FOUND, "Config not found")
TAOS_DEFINE_ERROR(TSDB_CODE_REPEAT_INIT, "Repeat initialization") TAOS_DEFINE_ERROR(TSDB_CODE_REPEAT_INIT, "Repeat initialization")
TAOS_DEFINE_ERROR(TSDB_CODE_DUP_KEY, "Cannot add duplicate keys to hash") TAOS_DEFINE_ERROR(TSDB_CODE_DUP_KEY, "Cannot add duplicate keys to hash")
TAOS_DEFINE_ERROR(TSDB_CODE_NEED_RETRY, "Retry needed") TAOS_DEFINE_ERROR(TSDB_CODE_NEED_RETRY, "Retry needed")
TAOS_DEFINE_ERROR(TSDB_CODE_OUT_OF_RPC_MEMORY_QUEUE, "Out of memory in rpc queue")
TAOS_DEFINE_ERROR(TSDB_CODE_REF_NO_MEMORY, "Ref out of memory") TAOS_DEFINE_ERROR(TSDB_CODE_REF_NO_MEMORY, "Ref out of memory")
TAOS_DEFINE_ERROR(TSDB_CODE_REF_FULL, "too many Ref Objs") TAOS_DEFINE_ERROR(TSDB_CODE_REF_FULL, "too many Ref Objs")
......
...@@ -258,8 +258,8 @@ static int32_t taosProcQueuePop(SProcQueue *pQueue, void **ppHead, int16_t *pHea ...@@ -258,8 +258,8 @@ static int32_t taosProcQueuePop(SProcQueue *pQueue, void **ppHead, int16_t *pHea
int16_t headLen = CEIL8(rawHeadLen); int16_t headLen = CEIL8(rawHeadLen);
int32_t bodyLen = CEIL8(rawBodyLen); int32_t bodyLen = CEIL8(rawBodyLen);
void *pHead = (*mallocHeadFp)(headLen); void *pHead = (*mallocHeadFp)(headLen, RPC_QITEM);
void *pBody = (*mallocBodyFp)(bodyLen); void *pBody = (*mallocBodyFp)(bodyLen, RPC_QITEM);
if (pHead == NULL || pBody == NULL) { if (pHead == NULL || pBody == NULL) {
taosThreadMutexUnlock(&pQueue->mutex); taosThreadMutexUnlock(&pQueue->mutex);
tsem_post(&pQueue->sem); tsem_post(&pQueue->sem);
......
...@@ -18,18 +18,21 @@ ...@@ -18,18 +18,21 @@
#include "taoserror.h" #include "taoserror.h"
#include "tlog.h" #include "tlog.h"
int64_t tsRpcQueueMemoryAllowed = 0;
int64_t tsRpcQueueMemoryUsed = 0;
typedef struct STaosQnode STaosQnode; typedef struct STaosQnode STaosQnode;
typedef struct STaosQnode { typedef struct STaosQnode {
STaosQnode *next; STaosQnode *next;
STaosQueue *queue; STaosQueue *queue;
int32_t size;
int8_t itype;
int8_t reserved[3];
char item[]; char item[];
} STaosQnode; } STaosQnode;
typedef struct STaosQueue { typedef struct STaosQueue {
int32_t itemSize;
int32_t numOfItems;
int32_t threadId;
STaosQnode *head; STaosQnode *head;
STaosQnode *tail; STaosQnode *tail;
STaosQueue *next; // for queue set STaosQueue *next; // for queue set
...@@ -38,21 +41,22 @@ typedef struct STaosQueue { ...@@ -38,21 +41,22 @@ typedef struct STaosQueue {
FItem itemFp; FItem itemFp;
FItems itemsFp; FItems itemsFp;
TdThreadMutex mutex; TdThreadMutex mutex;
int64_t memOfItems;
int32_t numOfItems;
} STaosQueue; } STaosQueue;
typedef struct STaosQset { typedef struct STaosQset {
STaosQueue *head; STaosQueue *head;
STaosQueue *current; STaosQueue *current;
TdThreadMutex mutex; TdThreadMutex mutex;
tsem_t sem;
int32_t numOfQueues; int32_t numOfQueues;
int32_t numOfItems; int32_t numOfItems;
tsem_t sem;
} STaosQset; } STaosQset;
typedef struct STaosQall { typedef struct STaosQall {
STaosQnode *current; STaosQnode *current;
STaosQnode *start; STaosQnode *start;
int32_t itemSize;
int32_t numOfItems; int32_t numOfItems;
} STaosQall; } STaosQall;
...@@ -118,32 +122,61 @@ bool taosQueueEmpty(STaosQueue *queue) { ...@@ -118,32 +122,61 @@ bool taosQueueEmpty(STaosQueue *queue) {
return empty; return empty;
} }
int32_t taosQueueSize(STaosQueue *queue) { int32_t taosQueueItemSize(STaosQueue *queue) {
if (queue == NULL) return 0;
taosThreadMutexLock(&queue->mutex); taosThreadMutexLock(&queue->mutex);
int32_t numOfItems = queue->numOfItems; int32_t numOfItems = queue->numOfItems;
taosThreadMutexUnlock(&queue->mutex); taosThreadMutexUnlock(&queue->mutex);
return numOfItems; return numOfItems;
} }
void *taosAllocateQitem(int32_t size) { int64_t taosQueueMemorySize(STaosQueue *queue) {
if (queue == NULL) return 0;
taosThreadMutexLock(&queue->mutex);
int64_t memOfItems = queue->memOfItems;
taosThreadMutexUnlock(&queue->mutex);
return memOfItems;
}
void *taosAllocateQitem(int32_t size, EQItype itype) {
STaosQnode *pNode = taosMemoryCalloc(1, sizeof(STaosQnode) + size); STaosQnode *pNode = taosMemoryCalloc(1, sizeof(STaosQnode) + size);
pNode->size = size;
pNode->itype = itype;
if (pNode == NULL) { if (pNode == NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY; terrno = TSDB_CODE_OUT_OF_MEMORY;
return NULL; return NULL;
} }
if (itype == RPC_QITEM) {
int64_t alloced = atomic_add_fetch_64(&tsRpcQueueMemoryUsed, size);
if (alloced > tsRpcQueueMemoryUsed) {
taosMemoryFree(pNode);
terrno = TSDB_CODE_OUT_OF_RPC_MEMORY_QUEUE;
return NULL;
}
uTrace("item:%p, node:%p is allocated, alloc:%" PRId64, pNode->item, pNode, alloced);
} else {
uTrace("item:%p, node:%p is allocated", pNode->item, pNode); uTrace("item:%p, node:%p is allocated", pNode->item, pNode);
}
return (void *)pNode->item; return (void *)pNode->item;
} }
void taosFreeQitem(void *pItem) { void taosFreeQitem(void *pItem) {
if (pItem == NULL) return; if (pItem == NULL) return;
char *temp = pItem; STaosQnode *pNode = (STaosQnode *)((char *)pItem - sizeof(STaosQnode));
temp -= sizeof(STaosQnode); if (pNode->itype > 0) {
uTrace("item:%p, node:%p is freed", pItem, temp); int64_t alloced = atomic_sub_fetch_64(&tsRpcQueueMemoryUsed, pNode->size);
taosMemoryFree(temp); uTrace("item:%p, node:%p is freed, alloc:%" PRId64, pItem, pNode, alloced);
} else {
uTrace("item:%p, node:%p is freed", pItem, pNode);
}
taosMemoryFree(pNode);
} }
void taosWriteQitem(STaosQueue *queue, void *pItem) { void taosWriteQitem(STaosQueue *queue, void *pItem) {
...@@ -161,8 +194,9 @@ void taosWriteQitem(STaosQueue *queue, void *pItem) { ...@@ -161,8 +194,9 @@ void taosWriteQitem(STaosQueue *queue, void *pItem) {
} }
queue->numOfItems++; queue->numOfItems++;
queue->memOfItems += pNode->size;
if (queue->qset) atomic_add_fetch_32(&queue->qset->numOfItems, 1); if (queue->qset) atomic_add_fetch_32(&queue->qset->numOfItems, 1);
uTrace("item:%p is put into queue:%p, items:%d", pItem, queue, queue->numOfItems); uTrace("item:%p is put into queue:%p, items:%d mem:%" PRId64, pItem, queue, queue->numOfItems, queue->memOfItems);
taosThreadMutexUnlock(&queue->mutex); taosThreadMutexUnlock(&queue->mutex);
...@@ -181,9 +215,11 @@ int32_t taosReadQitem(STaosQueue *queue, void **ppItem) { ...@@ -181,9 +215,11 @@ int32_t taosReadQitem(STaosQueue *queue, void **ppItem) {
queue->head = pNode->next; queue->head = pNode->next;
if (queue->head == NULL) queue->tail = NULL; if (queue->head == NULL) queue->tail = NULL;
queue->numOfItems--; queue->numOfItems--;
queue->memOfItems -= pNode->size;
if (queue->qset) atomic_sub_fetch_32(&queue->qset->numOfItems, 1); if (queue->qset) atomic_sub_fetch_32(&queue->qset->numOfItems, 1);
code = 1; code = 1;
uTrace("item:%p is read out from queue:%p, items:%d", *ppItem, queue, queue->numOfItems); uTrace("item:%p is read out from queue:%p, items:%d mem:%" PRId64, *ppItem, queue, queue->numOfItems,
queue->memOfItems);
} }
taosThreadMutexUnlock(&queue->mutex); taosThreadMutexUnlock(&queue->mutex);
...@@ -191,7 +227,13 @@ int32_t taosReadQitem(STaosQueue *queue, void **ppItem) { ...@@ -191,7 +227,13 @@ int32_t taosReadQitem(STaosQueue *queue, void **ppItem) {
return code; return code;
} }
STaosQall *taosAllocateQall() { return taosMemoryCalloc(1, sizeof(STaosQall)); } STaosQall *taosAllocateQall() {
STaosQall *qall = taosMemoryCalloc(1, sizeof(STaosQall));
if (qall != NULL) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
}
return qall;
}
void taosFreeQall(STaosQall *qall) { taosMemoryFree(qall); } void taosFreeQall(STaosQall *qall) { taosMemoryFree(qall); }
...@@ -207,12 +249,12 @@ int32_t taosReadAllQitems(STaosQueue *queue, STaosQall *qall) { ...@@ -207,12 +249,12 @@ int32_t taosReadAllQitems(STaosQueue *queue, STaosQall *qall) {
qall->current = queue->head; qall->current = queue->head;
qall->start = queue->head; qall->start = queue->head;
qall->numOfItems = queue->numOfItems; qall->numOfItems = queue->numOfItems;
qall->itemSize = queue->itemSize;
code = qall->numOfItems; code = qall->numOfItems;
queue->head = NULL; queue->head = NULL;
queue->tail = NULL; queue->tail = NULL;
queue->numOfItems = 0; queue->numOfItems = 0;
queue->memOfItems = 0;
if (queue->qset) atomic_sub_fetch_32(&queue->qset->numOfItems, qall->numOfItems); if (queue->qset) atomic_sub_fetch_32(&queue->qset->numOfItems, qall->numOfItems);
} }
...@@ -377,9 +419,11 @@ int32_t taosReadQitemFromQset(STaosQset *qset, void **ppItem, void **ahandle, FI ...@@ -377,9 +419,11 @@ int32_t taosReadQitemFromQset(STaosQset *qset, void **ppItem, void **ahandle, FI
queue->head = pNode->next; queue->head = pNode->next;
if (queue->head == NULL) queue->tail = NULL; if (queue->head == NULL) queue->tail = NULL;
queue->numOfItems--; queue->numOfItems--;
queue->memOfItems -= pNode->size;
atomic_sub_fetch_32(&qset->numOfItems, 1); atomic_sub_fetch_32(&qset->numOfItems, 1);
code = 1; code = 1;
uTrace("item:%p is read out from queue:%p, items:%d", *ppItem, queue, queue->numOfItems); uTrace("item:%p is read out from queue:%p, items:%d mem:%" PRId64, *ppItem, queue, queue->numOfItems,
queue->memOfItems);
} }
taosThreadMutexUnlock(&queue->mutex); taosThreadMutexUnlock(&queue->mutex);
...@@ -411,7 +455,6 @@ int32_t taosReadAllQitemsFromQset(STaosQset *qset, STaosQall *qall, void **ahand ...@@ -411,7 +455,6 @@ int32_t taosReadAllQitemsFromQset(STaosQset *qset, STaosQall *qall, void **ahand
qall->current = queue->head; qall->current = queue->head;
qall->start = queue->head; qall->start = queue->head;
qall->numOfItems = queue->numOfItems; qall->numOfItems = queue->numOfItems;
qall->itemSize = queue->itemSize;
code = qall->numOfItems; code = qall->numOfItems;
if (ahandle) *ahandle = queue->ahandle; if (ahandle) *ahandle = queue->ahandle;
if (itemsFp) *itemsFp = queue->itemsFp; if (itemsFp) *itemsFp = queue->itemsFp;
...@@ -419,6 +462,7 @@ int32_t taosReadAllQitemsFromQset(STaosQset *qset, STaosQall *qall, void **ahand ...@@ -419,6 +462,7 @@ int32_t taosReadAllQitemsFromQset(STaosQset *qset, STaosQall *qall, void **ahand
queue->head = NULL; queue->head = NULL;
queue->tail = NULL; queue->tail = NULL;
queue->numOfItems = 0; queue->numOfItems = 0;
queue->memOfItems = 0;
atomic_sub_fetch_32(&qset->numOfItems, qall->numOfItems); atomic_sub_fetch_32(&qset->numOfItems, qall->numOfItems);
for (int32_t j = 1; j < qall->numOfItems; ++j) { for (int32_t j = 1; j < qall->numOfItems; ++j) {
tsem_wait(&qset->sem); tsem_wait(&qset->sem);
...@@ -444,23 +488,3 @@ void taosResetQsetThread(STaosQset *qset, void *pItem) { ...@@ -444,23 +488,3 @@ void taosResetQsetThread(STaosQset *qset, void *pItem) {
} }
taosThreadMutexUnlock(&qset->mutex); taosThreadMutexUnlock(&qset->mutex);
} }
int32_t taosGetQueueItemsNumber(STaosQueue *queue) {
if (!queue) return 0;
int32_t num;
taosThreadMutexLock(&queue->mutex);
num = queue->numOfItems;
taosThreadMutexUnlock(&queue->mutex);
return num;
}
int32_t taosGetQsetItemsNumber(STaosQset *qset) {
if (!qset) return 0;
int32_t num = 0;
taosThreadMutexLock(&qset->mutex);
num = qset->numOfItems;
taosThreadMutexUnlock(&qset->mutex);
return num;
}
...@@ -49,7 +49,38 @@ class TDTestCase: ...@@ -49,7 +49,38 @@ class TDTestCase:
print(cur) print(cur)
return cur return cur
def startTmqSimProcess(self,buildPath,cfgPath,pollDelay,dbName,showMsg,showRow,cdbName,valgrind=0): def initConsumerTable(self,cdbName='cdb'):
tdLog.info("create consume database, and consume info table, and consume result table")
tdSql.query("create database if not exists %s vgroups 1"%(cdbName))
tdSql.query("drop table if exists %s.consumeinfo "%(cdbName))
tdSql.query("drop table if exists %s.consumeresult "%(cdbName))
tdSql.query("create table %s.consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int, ifmanualcommit int)"%cdbName)
tdSql.query("create table %s.consumeresult (ts timestamp, consumerid int, consummsgcnt bigint, consumrowcnt bigint, checkresult int)"%cdbName)
def insertConsumerInfo(self,consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifmanualcommit,cdbName='cdb'):
sql = "insert into %s.consumeinfo values "%cdbName
sql += "(now, %d, '%s', '%s', %d, %d, %d)"%(consumerId, topicList, keyList, expectrowcnt, ifcheckdata, ifmanualcommit)
tdLog.info("consume info sql: %s"%sql)
tdSql.query(sql)
def selectConsumeResult(self,expectRows,cdbName='cdb'):
resultList=[]
while 1:
tdSql.query("select * from %s.consumeresult"%cdbName)
#tdLog.info("row: %d, %l64d, %l64d"%(tdSql.getData(0, 1),tdSql.getData(0, 2),tdSql.getData(0, 3))
if tdSql.getRows() == expectRows:
break
else:
time.sleep(5)
for i in range(expectRows):
tdLog.info ("consume id: %d, consume msgs: %d, consume rows: %d"%(tdSql.getData(i , 1), tdSql.getData(i , 2), tdSql.getData(i , 3)))
resultList.append(tdSql.getData(i , 3))
return resultList
def startTmqSimProcess(self,buildPath,cfgPath,pollDelay,dbName,showMsg=1,showRow=1,cdbName='cdb',valgrind=0):
shellCmd = 'nohup ' shellCmd = 'nohup '
if valgrind == 1: if valgrind == 1:
logFile = cfgPath + '/../log/valgrind-tmq.log' logFile = cfgPath + '/../log/valgrind-tmq.log'
...@@ -87,6 +118,8 @@ class TDTestCase: ...@@ -87,6 +118,8 @@ class TDTestCase:
pre_insert = "insert into " pre_insert = "insert into "
sql = pre_insert sql = pre_insert
t = time.time()
startTs = int(round(t * 1000))
#tdLog.debug("doing insert data into stable:%s rows:%d ..."%(stbName, allRows)) #tdLog.debug("doing insert data into stable:%s rows:%d ..."%(stbName, allRows))
for i in range(ctbNum): for i in range(ctbNum):
sql += " %s_%d values "%(stbName,i) sql += " %s_%d values "%(stbName,i)
...@@ -127,7 +160,7 @@ class TDTestCase: ...@@ -127,7 +160,7 @@ class TDTestCase:
return return
def tmqCase1(self, cfgPath, buildPath): def tmqCase1(self, cfgPath, buildPath):
tdLog.printNoPrefix("======== test case 1: Produce while one consume to subscribe one db") tdLog.printNoPrefix("======== test case 1: Produce while one consume to subscribe one db, inclue 1 stb")
tdLog.info("step 1: create database, stb, ctb and insert data") tdLog.info("step 1: create database, stb, ctb and insert data")
# create and start thread # create and start thread
parameterDict = {'cfg': '', \ parameterDict = {'cfg': '', \
...@@ -135,11 +168,13 @@ class TDTestCase: ...@@ -135,11 +168,13 @@ class TDTestCase:
'vgroups': 4, \ 'vgroups': 4, \
'stbName': 'stb', \ 'stbName': 'stb', \
'ctbNum': 10, \ 'ctbNum': 10, \
'rowsPerTbl': 100000, \ 'rowsPerTbl': 10000, \
'batchNum': 200, \ 'batchNum': 100, \
'startTs': 1640966400000} # 2022-01-01 00:00:00.000 'startTs': 1640966400000} # 2022-01-01 00:00:00.000
parameterDict['cfg'] = cfgPath parameterDict['cfg'] = cfgPath
self.initConsumerTable()
tdSql.execute("create database if not exists %s vgroups %d" %(parameterDict['dbName'], parameterDict['vgroups'])) tdSql.execute("create database if not exists %s vgroups %d" %(parameterDict['dbName'], parameterDict['vgroups']))
prepareEnvThread = threading.Thread(target=self.prepareEnv, kwargs=parameterDict) prepareEnvThread = threading.Thread(target=self.prepareEnv, kwargs=parameterDict)
...@@ -149,23 +184,16 @@ class TDTestCase: ...@@ -149,23 +184,16 @@ class TDTestCase:
topicName1 = 'topic_db1' topicName1 = 'topic_db1'
tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName'])) tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName']))
tdLog.info("create consume info table and consume result table")
cdbName = parameterDict["dbName"]
tdSql.query("create table %s.consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int)"%cdbName)
tdSql.query("create table %s.consumeresult (ts timestamp, consumerid int, consummsgcnt bigint, consumrowcnt bigint, checkresult int)"%cdbName)
consumerId = 0 consumerId = 0
expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"]
topicList = topicName1 topicList = topicName1
ifcheckdata = 0 ifcheckdata = 0
ifManualCommit = 0
keyList = 'group.id:cgrp1,\ keyList = 'group.id:cgrp1,\
enable.auto.commit:false,\ enable.auto.commit:false,\
auto.commit.interval.ms:6000,\ auto.commit.interval.ms:6000,\
auto.offset.reset:earliest' auto.offset.reset:earliest'
sql = "insert into %s.consumeinfo values "%cdbName self.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit)
sql += "(now, %d, '%s', '%s', %d, %d)"%(consumerId, topicList, keyList, expectrowcnt, ifcheckdata)
tdSql.query(sql)
event.wait() event.wait()
...@@ -173,32 +201,28 @@ class TDTestCase: ...@@ -173,32 +201,28 @@ class TDTestCase:
pollDelay = 5 pollDelay = 5
showMsg = 1 showMsg = 1
showRow = 1 showRow = 1
self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow, cdbName) self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow)
# wait for data ready # wait for data ready
prepareEnvThread.join() prepareEnvThread.join()
tdLog.info("insert process end, and start to check consume result") tdLog.info("insert process end, and start to check consume result")
while 1: expectRows = 1
tdSql.query("select * from %s.consumeresult"%cdbName) resultList = self.selectConsumeResult(expectRows)
#tdLog.info("row: %d, %l64d, %l64d"%(tdSql.getData(0, 1),tdSql.getData(0, 2),tdSql.getData(0, 3)) totalConsumeRows = 0
if tdSql.getRows() == 1: for i in range(expectRows):
break totalConsumeRows += resultList[i]
else:
time.sleep(5) if totalConsumeRows != expectrowcnt:
tdLog.info("act consume rows: %d, expect consume rows: %d"%(totalConsumeRows, expectrowcnt))
tdLog.info("consumer result: %d, %d"%(tdSql.getData(0 , 2), tdSql.getData(0 , 3))) tdLog.exit("tmq consume rows error!")
tdSql.checkData(0 , 1, consumerId)
# mulit rows and mulit tables in one sql, this num of msg is not sure
#tdSql.checkData(0 , 2, expectmsgcnt)
tdSql.checkData(0 , 3, expectrowcnt+1)
tdSql.query("drop topic %s"%topicName1) tdSql.query("drop topic %s"%topicName1)
tdLog.printNoPrefix("======== test case 1 end ...... ") tdLog.printNoPrefix("======== test case 1 end ...... ")
def tmqCase2(self, cfgPath, buildPath): def tmqCase2(self, cfgPath, buildPath):
tdLog.printNoPrefix("======== test case 2: Produce while two consumers to subscribe one db") tdLog.printNoPrefix("======== test case 2: Produce while two consumers to subscribe one db, inclue 1 stb")
tdLog.info("step 1: create database, stb, ctb and insert data") tdLog.info("step 1: create database, stb, ctb and insert data")
# create and start thread # create and start thread
parameterDict = {'cfg': '', \ parameterDict = {'cfg': '', \
...@@ -206,11 +230,13 @@ class TDTestCase: ...@@ -206,11 +230,13 @@ class TDTestCase:
'vgroups': 4, \ 'vgroups': 4, \
'stbName': 'stb', \ 'stbName': 'stb', \
'ctbNum': 10, \ 'ctbNum': 10, \
'rowsPerTbl': 100000, \ 'rowsPerTbl': 10000, \
'batchNum': 100, \ 'batchNum': 100, \
'startTs': 1640966400000} # 2022-01-01 00:00:00.000 'startTs': 1640966400000} # 2022-01-01 00:00:00.000
parameterDict['cfg'] = cfgPath parameterDict['cfg'] = cfgPath
self.initConsumerTable()
tdSql.execute("create database if not exists %s vgroups %d" %(parameterDict['dbName'], parameterDict['vgroups'])) tdSql.execute("create database if not exists %s vgroups %d" %(parameterDict['dbName'], parameterDict['vgroups']))
prepareEnvThread = threading.Thread(target=self.prepareEnv, kwargs=parameterDict) prepareEnvThread = threading.Thread(target=self.prepareEnv, kwargs=parameterDict)
...@@ -221,27 +247,19 @@ class TDTestCase: ...@@ -221,27 +247,19 @@ class TDTestCase:
tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName'])) tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName']))
tdLog.info("create consume info table and consume result table")
cdbName = parameterDict["dbName"]
tdSql.query("create table %s.consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int)"%cdbName)
tdSql.query("create table %s.consumeresult (ts timestamp, consumerid int, consummsgcnt bigint, consumrowcnt bigint, checkresult int)"%cdbName)
consumerId = 0 consumerId = 0
expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"]
topicList = topicName1 topicList = topicName1
ifcheckdata = 0 ifcheckdata = 0
ifManualCommit = 0
keyList = 'group.id:cgrp1,\ keyList = 'group.id:cgrp1,\
enable.auto.commit:false,\ enable.auto.commit:false,\
auto.commit.interval.ms:6000,\ auto.commit.interval.ms:6000,\
auto.offset.reset:earliest' auto.offset.reset:earliest'
sql = "insert into %s.consumeinfo values "%cdbName self.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit)
sql += "(now, %d, '%s', '%s', %d, %d)"%(consumerId, topicList, keyList, expectrowcnt, ifcheckdata)
tdSql.query(sql)
consumerId = 1 consumerId = 1
sql = "insert into %s.consumeinfo values "%cdbName self.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit)
sql += "(now, %d, '%s', '%s', %d, %d)"%(consumerId, topicList, keyList, expectrowcnt, ifcheckdata)
tdSql.query(sql)
event.wait() event.wait()
...@@ -249,30 +267,20 @@ class TDTestCase: ...@@ -249,30 +267,20 @@ class TDTestCase:
pollDelay = 5 pollDelay = 5
showMsg = 1 showMsg = 1
showRow = 1 showRow = 1
self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow, cdbName) self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow)
# wait for data ready # wait for data ready
prepareEnvThread.join() prepareEnvThread.join()
tdLog.info("insert process end, and start to check consume result") tdLog.info("insert process end, and start to check consume result")
while 1: expectRows = 2
tdSql.query("select * from %s.consumeresult"%cdbName) resultList = self.selectConsumeResult(expectRows)
#tdLog.info("row: %d, %l64d, %l64d"%(tdSql.getData(0, 1),tdSql.getData(0, 2),tdSql.getData(0, 3)) totalConsumeRows = 0
if tdSql.getRows() == 2: for i in range(expectRows):
break totalConsumeRows += resultList[i]
else:
time.sleep(5) if totalConsumeRows != expectrowcnt:
tdLog.info("act consume rows: %d, expect consume rows: %d"%(totalConsumeRows, expectrowcnt))
consumerId0 = tdSql.getData(0 , 1)
consumerId1 = tdSql.getData(1 , 1)
actConsumeRows0 = tdSql.getData(0 , 3)
actConsumeRows1 = tdSql.getData(1 , 3)
tdLog.info("consumer %d rows: %d"%(consumerId0, actConsumeRows0))
tdLog.info("consumer %d rows: %d"%(consumerId1, actConsumeRows1))
totalConsumeRows = actConsumeRows0 + actConsumeRows1
if totalConsumeRows != expectrowcnt + 2:
tdLog.exit("tmq consume rows error!") tdLog.exit("tmq consume rows error!")
tdSql.query("drop topic %s"%topicName1) tdSql.query("drop topic %s"%topicName1)
...@@ -288,11 +296,13 @@ class TDTestCase: ...@@ -288,11 +296,13 @@ class TDTestCase:
'vgroups': 4, \ 'vgroups': 4, \
'stbName': 'stb', \ 'stbName': 'stb', \
'ctbNum': 10, \ 'ctbNum': 10, \
'rowsPerTbl': 100000, \ 'rowsPerTbl': 10000, \
'batchNum': 100, \ 'batchNum': 100, \
'startTs': 1640966400000} # 2022-01-01 00:00:00.000 'startTs': 1640966400000} # 2022-01-01 00:00:00.000
parameterDict['cfg'] = cfgPath parameterDict['cfg'] = cfgPath
self.initConsumerTable()
tdSql.execute("create database if not exists %s vgroups %d" %(parameterDict['dbName'], parameterDict['vgroups'])) tdSql.execute("create database if not exists %s vgroups %d" %(parameterDict['dbName'], parameterDict['vgroups']))
prepareEnvThread = threading.Thread(target=self.prepareEnv, kwargs=parameterDict) prepareEnvThread = threading.Thread(target=self.prepareEnv, kwargs=parameterDict)
...@@ -303,7 +313,7 @@ class TDTestCase: ...@@ -303,7 +313,7 @@ class TDTestCase:
'vgroups': 4, \ 'vgroups': 4, \
'stbName': 'stb2', \ 'stbName': 'stb2', \
'ctbNum': 10, \ 'ctbNum': 10, \
'rowsPerTbl': 100000, \ 'rowsPerTbl': 10000, \
'batchNum': 100, \ 'batchNum': 100, \
'startTs': 1640966400000} # 2022-01-01 00:00:00.000 'startTs': 1640966400000} # 2022-01-01 00:00:00.000
parameterDict['cfg'] = cfgPath parameterDict['cfg'] = cfgPath
...@@ -316,27 +326,19 @@ class TDTestCase: ...@@ -316,27 +326,19 @@ class TDTestCase:
tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName'])) tdSql.execute("create topic %s as %s" %(topicName1, parameterDict['dbName']))
tdLog.info("create consume info table and consume result table")
cdbName = parameterDict["dbName"]
tdSql.query("create table %s.consumeinfo (ts timestamp, consumerid int, topiclist binary(1024), keylist binary(1024), expectmsgcnt bigint, ifcheckdata int)"%cdbName)
tdSql.query("create table %s.consumeresult (ts timestamp, consumerid int, consummsgcnt bigint, consumrowcnt bigint, checkresult int)"%cdbName)
consumerId = 0 consumerId = 0
expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] + parameterDict2["rowsPerTbl"] * parameterDict2["ctbNum"] expectrowcnt = parameterDict["rowsPerTbl"] * parameterDict["ctbNum"] + parameterDict2["rowsPerTbl"] * parameterDict2["ctbNum"]
topicList = topicName1 topicList = topicName1
ifcheckdata = 0 ifcheckdata = 0
ifManualCommit = 0
keyList = 'group.id:cgrp1,\ keyList = 'group.id:cgrp1,\
enable.auto.commit:false,\ enable.auto.commit:false,\
auto.commit.interval.ms:6000,\ auto.commit.interval.ms:6000,\
auto.offset.reset:earliest' auto.offset.reset:earliest'
sql = "insert into %s.consumeinfo values "%cdbName self.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit)
sql += "(now, %d, '%s', '%s', %d, %d)"%(consumerId, topicList, keyList, expectrowcnt, ifcheckdata)
tdSql.query(sql)
# consumerId = 1 # consumerId = 1
# sql = "insert into %s.consumeinfo values "%cdbName # self.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit)
# sql += "(now, %d, '%s', '%s', %d, %d)"%(consumerId, topicList, keyList, expectrowcnt, ifcheckdata)
# tdSql.query(sql)
event.wait() event.wait()
...@@ -344,31 +346,21 @@ class TDTestCase: ...@@ -344,31 +346,21 @@ class TDTestCase:
pollDelay = 5 pollDelay = 5
showMsg = 1 showMsg = 1
showRow = 1 showRow = 1
self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow, cdbName) self.startTmqSimProcess(buildPath,cfgPath,pollDelay,parameterDict["dbName"],showMsg, showRow)
# wait for data ready # wait for data ready
prepareEnvThread.join() prepareEnvThread.join()
prepareEnvThread2.join() prepareEnvThread2.join()
tdLog.info("insert process end, and start to check consume result") tdLog.info("insert process end, and start to check consume result")
while 1: expectRows = 1
tdSql.query("select * from %s.consumeresult"%cdbName) resultList = self.selectConsumeResult(expectRows)
#tdLog.info("row: %d, %l64d, %l64d"%(tdSql.getData(0, 1),tdSql.getData(0, 2),tdSql.getData(0, 3)) totalConsumeRows = 0
if tdSql.getRows() == 1: for i in range(expectRows):
break totalConsumeRows += resultList[i]
else:
time.sleep(5) if totalConsumeRows != expectrowcnt:
tdLog.info("act consume rows: %d, expect consume rows: %d"%(totalConsumeRows, expectrowcnt))
consumerId0 = tdSql.getData(0 , 1)
#consumerId1 = tdSql.getData(1 , 1)
actConsumeRows0 = tdSql.getData(0 , 3)
#actConsumeRows1 = tdSql.getData(1 , 3)
tdLog.info("consumer %d rows: %d"%(consumerId0, actConsumeRows0))
#tdLog.info("consumer %d rows: %d"%(consumerId1, actConsumeRows1))
#totalConsumeRows = actConsumeRows0 + actConsumeRows1
if actConsumeRows0 != expectrowcnt + 1:
tdLog.exit("tmq consume rows error!") tdLog.exit("tmq consume rows error!")
tdSql.query("drop topic %s"%topicName1) tdSql.query("drop topic %s"%topicName1)
...@@ -386,9 +378,9 @@ class TDTestCase: ...@@ -386,9 +378,9 @@ class TDTestCase:
cfgPath = buildPath + "/../sim/psim/cfg" cfgPath = buildPath + "/../sim/psim/cfg"
tdLog.info("cfgPath: %s" % cfgPath) tdLog.info("cfgPath: %s" % cfgPath)
#self.tmqCase1(cfgPath, buildPath) self.tmqCase1(cfgPath, buildPath)
self.tmqCase2(cfgPath, buildPath) #self.tmqCase2(cfgPath, buildPath)
#self.tmqCase3(cfgPath, buildPath) self.tmqCase3(cfgPath, buildPath)
def stop(self): def stop(self):
tdSql.close() tdSql.close()
......
...@@ -509,7 +509,7 @@ void shellPrintField(const char *val, TAOS_FIELD *field, int32_t width, int32_t ...@@ -509,7 +509,7 @@ void shellPrintField(const char *val, TAOS_FIELD *field, int32_t width, int32_t
bool shellIsLimitQuery(const char *sql) { bool shellIsLimitQuery(const char *sql) {
//todo refactor //todo refactor
if (strcasestr(sql, " limit ") != NULL) { if (taosStrCaseStr(sql, " limit ") != NULL) {
return true; return true;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册