提交 d74684fa 编写于 作者: S Shengliang Guan

Merge remote-tracking branch 'origin/develop' into feature/m2d

......@@ -2331,8 +2331,10 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col
}
if (info.precision == TSDB_TIME_PRECISION_MILLI) {
tickPerSec /= 1000000;
} else if (info.precision == TSDB_TIME_PRECISION_MICRO) {
tickPerSec /= 1000;
}
}
if (tickPerSec <= 0 || tickPerSec < TSDB_TICK_PER_SECOND(info.precision)) {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg10);
......@@ -5937,48 +5939,40 @@ int32_t validateLimitNode(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SSqlNode* pSqlN
}
static int32_t setKeepOption(SSqlCmd* pCmd, SCreateDbMsg* pMsg, SCreateDbInfo* pCreateDb) {
const char* msg = "invalid number of options";
const char* msg1 = "invalid number of keep options";
const char* msg2 = "invalid keep value";
const char* msg3 = "invalid keep value, should be keep0 <= keep1 <= keep2";
pMsg->daysToKeep = htonl(-1);
pMsg->daysToKeep0 = htonl(-1);
pMsg->daysToKeep1 = htonl(-1);
pMsg->daysToKeep2 = htonl(-1);
SArray* pKeep = pCreateDb->keep;
if (pKeep != NULL) {
size_t s = taosArrayGetSize(pKeep);
#ifdef _STORAGE
if (s >= 4 ||s <= 0) {
#else
if (s != 1) {
#endif
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1);
}
tVariantListItem* p0 = taosArrayGet(pKeep, 0);
switch (s) {
case 1: {
if ((int32_t)p0->pVar.i64 <= 0) {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg);
}
pMsg->daysToKeep = htonl((int32_t)p0->pVar.i64);
}
break;
case 2: {
tVariantListItem* p1 = taosArrayGet(pKeep, 1);
if ((int32_t)p0->pVar.i64 <= 0 || (int32_t)p1->pVar.i64 <= 0) {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg);
}
pMsg->daysToKeep = htonl((int32_t)p0->pVar.i64);
pMsg->daysToKeep1 = htonl((int32_t)p1->pVar.i64);
break;
}
case 3: {
tVariantListItem* p1 = taosArrayGet(pKeep, 1);
tVariantListItem* p2 = taosArrayGet(pKeep, 2);
tVariantListItem* p1 = (s > 1) ? taosArrayGet(pKeep, 1) : p0;
tVariantListItem* p2 = (s > 2) ? taosArrayGet(pKeep, 2) : p1;
if ((int32_t)p0->pVar.i64 <= 0 || (int32_t)p1->pVar.i64 <= 0 || (int32_t)p2->pVar.i64 <= 0) {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg2);
}
if (!(((int32_t)p0->pVar.i64 <= (int32_t)p1->pVar.i64) && ((int32_t)p1->pVar.i64 <= (int32_t)p2->pVar.i64))) {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg3);
}
if ((int32_t)p0->pVar.i64 <= 0 || (int32_t)p1->pVar.i64 <= 0 || (int32_t)p2->pVar.i64 <= 0) {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg);
}
pMsg->daysToKeep0 = htonl((int32_t)p0->pVar.i64);
pMsg->daysToKeep1 = htonl((int32_t)p1->pVar.i64);
pMsg->daysToKeep2 = htonl((int32_t)p2->pVar.i64);
pMsg->daysToKeep = htonl((int32_t)p0->pVar.i64);
pMsg->daysToKeep1 = htonl((int32_t)p1->pVar.i64);
pMsg->daysToKeep2 = htonl((int32_t)p2->pVar.i64);
break;
}
default: { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg); }
}
}
return TSDB_CODE_SUCCESS;
......
......@@ -548,7 +548,7 @@ typedef struct {
int32_t totalBlocks;
int32_t maxTables;
int32_t daysPerFile;
int32_t daysToKeep;
int32_t daysToKeep0;
int32_t daysToKeep1;
int32_t daysToKeep2;
int32_t minRowsPerFileBlock;
......
......@@ -104,28 +104,28 @@
#define TK_QTIME 85
#define TK_CONNS 86
#define TK_STATE 87
#define TK_KEEP 88
#define TK_CACHE 89
#define TK_REPLICA 90
#define TK_QUORUM 91
#define TK_DAYS 92
#define TK_MINROWS 93
#define TK_MAXROWS 94
#define TK_BLOCKS 95
#define TK_CTIME 96
#define TK_WAL 97
#define TK_FSYNC 98
#define TK_COMP 99
#define TK_PRECISION 100
#define TK_UPDATE 101
#define TK_CACHELAST 102
#define TK_PARTITIONS 103
#define TK_LP 104
#define TK_RP 105
#define TK_UNSIGNED 106
#define TK_TAGS 107
#define TK_USING 108
#define TK_COMMA 109
#define TK_COMMA 88
#define TK_KEEP 89
#define TK_CACHE 90
#define TK_REPLICA 91
#define TK_QUORUM 92
#define TK_DAYS 93
#define TK_MINROWS 94
#define TK_MAXROWS 95
#define TK_BLOCKS 96
#define TK_CTIME 97
#define TK_WAL 98
#define TK_FSYNC 99
#define TK_COMP 100
#define TK_PRECISION 101
#define TK_UPDATE 102
#define TK_CACHELAST 103
#define TK_PARTITIONS 104
#define TK_LP 105
#define TK_RP 106
#define TK_UNSIGNED 107
#define TK_TAGS 108
#define TK_USING 109
#define TK_AS 110
#define TK_NULL 111
#define TK_SELECT 112
......@@ -212,7 +212,6 @@
#define TK_SPACE 300
#define TK_COMMENT 301
#define TK_ILLEGAL 302
......
......@@ -161,7 +161,7 @@ typedef struct {
int32_t totalBlocks;
int32_t maxTables;
int32_t daysPerFile;
int32_t daysToKeep;
int32_t daysToKeep0;
int32_t daysToKeep1;
int32_t daysToKeep2;
int32_t minRowsPerFileBlock;
......
......@@ -261,26 +261,27 @@ static int32_t mnodeCheckDbCfg(SDbCfg *pCfg) {
return TSDB_CODE_MND_INVALID_DB_OPTION_DAYS;
}
if (pCfg->daysToKeep < TSDB_MIN_KEEP || pCfg->daysToKeep > TSDB_MAX_KEEP) {
mError("invalid db option daysToKeep:%d valid range: [%d, %d]", pCfg->daysToKeep, TSDB_MIN_KEEP, TSDB_MAX_KEEP);
if (pCfg->daysToKeep0 < TSDB_MIN_KEEP || pCfg->daysToKeep0 > TSDB_MAX_KEEP) {
mError("invalid db option daysToKeep:%d valid range: [%d, %d]", pCfg->daysToKeep0, TSDB_MIN_KEEP, TSDB_MAX_KEEP);
return TSDB_CODE_MND_INVALID_DB_OPTION_KEEP;
}
if (pCfg->daysToKeep < pCfg->daysPerFile) {
mError("invalid db option daysToKeep:%d should larger than daysPerFile:%d", pCfg->daysToKeep, pCfg->daysPerFile);
if (pCfg->daysToKeep0 < pCfg->daysPerFile) {
mError("invalid db option daysToKeep:%d should larger than daysPerFile:%d", pCfg->daysToKeep0, pCfg->daysPerFile);
return TSDB_CODE_MND_INVALID_DB_OPTION_KEEP;
}
if (pCfg->daysToKeep2 < TSDB_MIN_KEEP || pCfg->daysToKeep2 > pCfg->daysToKeep) {
mError("invalid db option daysToKeep2:%d valid range: [%d, %d]", pCfg->daysToKeep2, TSDB_MIN_KEEP, pCfg->daysToKeep);
if (pCfg->daysToKeep1 < pCfg->daysToKeep0 || pCfg->daysToKeep1 > TSDB_MAX_KEEP) {
mError("invalid db option daysToKeep1:%d valid range: [%d, %d]", pCfg->daysToKeep1, pCfg->daysToKeep0, TSDB_MAX_KEEP);
return TSDB_CODE_MND_INVALID_DB_OPTION_KEEP;
}
if (pCfg->daysToKeep1 < TSDB_MIN_KEEP || pCfg->daysToKeep1 > pCfg->daysToKeep2) {
mError("invalid db option daysToKeep1:%d valid range: [%d, %d]", pCfg->daysToKeep1, TSDB_MIN_KEEP, pCfg->daysToKeep2);
if (pCfg->daysToKeep2 < pCfg->daysToKeep1 || pCfg->daysToKeep2 > TSDB_MAX_KEEP) {
mError("invalid db option daysToKeep2:%d valid range: [%d, %d]", pCfg->daysToKeep2, pCfg->daysToKeep1, TSDB_MAX_KEEP);
return TSDB_CODE_MND_INVALID_DB_OPTION_KEEP;
}
if (pCfg->maxRowsPerFileBlock < TSDB_MIN_MAX_ROW_FBLOCK || pCfg->maxRowsPerFileBlock > TSDB_MAX_MAX_ROW_FBLOCK) {
mError("invalid db option maxRowsPerFileBlock:%d valid range: [%d, %d]", pCfg->maxRowsPerFileBlock,
TSDB_MIN_MAX_ROW_FBLOCK, TSDB_MAX_MAX_ROW_FBLOCK);
......@@ -378,9 +379,9 @@ static void mnodeSetDefaultDbCfg(SDbCfg *pCfg) {
if (pCfg->totalBlocks < 0) pCfg->totalBlocks = tsBlocksPerVnode;
if (pCfg->maxTables < 0) pCfg->maxTables = tsMaxTablePerVnode;
if (pCfg->daysPerFile < 0) pCfg->daysPerFile = tsDaysPerFile;
if (pCfg->daysToKeep < 0) pCfg->daysToKeep = tsDaysToKeep;
if (pCfg->daysToKeep1 < 0) pCfg->daysToKeep1 = pCfg->daysToKeep;
if (pCfg->daysToKeep2 < 0) pCfg->daysToKeep2 = pCfg->daysToKeep;
if (pCfg->daysToKeep2 < 0) pCfg->daysToKeep2 = tsDaysToKeep;
if (pCfg->daysToKeep1 < 0) pCfg->daysToKeep1 = pCfg->daysToKeep2;
if (pCfg->daysToKeep0 < 0) pCfg->daysToKeep0 = pCfg->daysToKeep1;
if (pCfg->minRowsPerFileBlock < 0) pCfg->minRowsPerFileBlock = tsMinRowsInFileBlock;
if (pCfg->maxRowsPerFileBlock < 0) pCfg->maxRowsPerFileBlock = tsMaxRowsInFileBlock;
if (pCfg->fsyncPeriod <0) pCfg->fsyncPeriod = tsFsyncPeriod;
......@@ -435,7 +436,7 @@ static int32_t mnodeCreateDb(SAcctObj *pAcct, SCreateDbMsg *pCreate, SMnodeMsg *
.totalBlocks = pCreate->totalBlocks,
.maxTables = pCreate->maxTables,
.daysPerFile = pCreate->daysPerFile,
.daysToKeep = pCreate->daysToKeep,
.daysToKeep0 = pCreate->daysToKeep0,
.daysToKeep1 = pCreate->daysToKeep1,
.daysToKeep2 = pCreate->daysToKeep2,
.minRowsPerFileBlock = pCreate->minRowsPerFileBlock,
......@@ -611,7 +612,12 @@ static int32_t mnodeGetDbMeta(STableMetaMsg *pMeta, SShowObj *pShow, void *pConn
pShow->bytes[cols] = 24 + VARSTR_HEADER_SIZE;
pSchema[cols].type = TSDB_DATA_TYPE_BINARY;
strcpy(pSchema[cols].name, "keep0,keep1,keep(D)");
#ifdef _STORAGE
strcpy(pSchema[cols].name, "keep0,keep1,keep2");
#else
strcpy(pSchema[cols].name, "keep");
#endif
pSchema[cols].bytes = htons(pShow->bytes[cols]);
cols++;
......@@ -777,7 +783,15 @@ static int32_t mnodeRetrieveDbs(SShowObj *pShow, char *data, int32_t rows, void
pWrite = data + pShow->offset[cols] * rows + pShow->bytes[cols] * numOfRows;
char tmp[128] = {0};
sprintf(tmp, "%d,%d,%d", pDb->cfg.daysToKeep1, pDb->cfg.daysToKeep2, pDb->cfg.daysToKeep);
#ifdef _STORAGE
if (pDb->cfg.daysToKeep0 > pDb->cfg.daysToKeep1 || pDb->cfg.daysToKeep0 > pDb->cfg.daysToKeep2) {
sprintf(tmp, "%d,%d,%d", pDb->cfg.daysToKeep1, pDb->cfg.daysToKeep2, pDb->cfg.daysToKeep0);
} else {
sprintf(tmp, "%d,%d,%d", pDb->cfg.daysToKeep0, pDb->cfg.daysToKeep1, pDb->cfg.daysToKeep2);
}
#else
sprintf(tmp, "%d", pDb->cfg.daysToKeep2);
#endif
STR_WITH_SIZE_TO_VARSTR(pWrite, tmp, strlen(tmp));
cols++;
......@@ -895,7 +909,7 @@ static int32_t mnodeProcessCreateDbMsg(SMnodeMsg *pMsg) {
pCreate->cacheBlockSize = htonl(pCreate->cacheBlockSize);
pCreate->totalBlocks = htonl(pCreate->totalBlocks);
pCreate->daysPerFile = htonl(pCreate->daysPerFile);
pCreate->daysToKeep = htonl(pCreate->daysToKeep);
pCreate->daysToKeep0 = htonl(pCreate->daysToKeep0);
pCreate->daysToKeep1 = htonl(pCreate->daysToKeep1);
pCreate->daysToKeep2 = htonl(pCreate->daysToKeep2);
pCreate->commitTime = htonl(pCreate->commitTime);
......@@ -922,7 +936,7 @@ static SDbCfg mnodeGetAlterDbOption(SDbObj *pDb, SAlterDbMsg *pAlter) {
int32_t cacheBlockSize = htonl(pAlter->cacheBlockSize);
int32_t totalBlocks = htonl(pAlter->totalBlocks);
int32_t daysPerFile = htonl(pAlter->daysPerFile);
int32_t daysToKeep = htonl(pAlter->daysToKeep);
int32_t daysToKeep0 = htonl(pAlter->daysToKeep0);
int32_t daysToKeep1 = htonl(pAlter->daysToKeep1);
int32_t daysToKeep2 = htonl(pAlter->daysToKeep2);
int32_t minRows = htonl(pAlter->minRowsPerFileBlock);
......@@ -941,6 +955,14 @@ static SDbCfg mnodeGetAlterDbOption(SDbObj *pDb, SAlterDbMsg *pAlter) {
terrno = TSDB_CODE_SUCCESS;
//UPGRATE FROM LOW VERSION, reorder it
if (pDb->cfg.daysToKeep0 > pDb->cfg.daysToKeep1 || pDb->cfg.daysToKeep0 > pDb->cfg.daysToKeep2) {
int32_t t = pDb->cfg.daysToKeep0;
newCfg.daysToKeep0 = pDb->cfg.daysToKeep1;
newCfg.daysToKeep1 = pDb->cfg.daysToKeep2;
newCfg.daysToKeep2 = t;
}
if (cacheBlockSize > 0 && cacheBlockSize != pDb->cfg.cacheBlockSize) {
mError("db:%s, can't alter cache option", pDb->name);
terrno = TSDB_CODE_MND_INVALID_DB_OPTION;
......@@ -965,17 +987,17 @@ static SDbCfg mnodeGetAlterDbOption(SDbObj *pDb, SAlterDbMsg *pAlter) {
terrno = TSDB_CODE_MND_INVALID_DB_OPTION;
}
if (daysToKeep > 0 && daysToKeep != pDb->cfg.daysToKeep) {
mDebug("db:%s, daysToKeep:%d change to %d", pDb->name, pDb->cfg.daysToKeep, daysToKeep);
newCfg.daysToKeep = daysToKeep;
if (daysToKeep0 > 0 && (daysToKeep0 != pDb->cfg.daysToKeep0 || newCfg.daysToKeep0 != pDb->cfg.daysToKeep0)) {
mDebug("db:%s, daysToKeep:%d change to %d", pDb->name, pDb->cfg.daysToKeep0, daysToKeep0);
newCfg.daysToKeep0 = daysToKeep0;
}
if (daysToKeep1 > 0 && daysToKeep1 != pDb->cfg.daysToKeep1) {
if (daysToKeep1 > 0 && (daysToKeep1 != pDb->cfg.daysToKeep1 || newCfg.daysToKeep1 != pDb->cfg.daysToKeep1)) {
mDebug("db:%s, daysToKeep1:%d change to %d", pDb->name, pDb->cfg.daysToKeep1, daysToKeep1);
newCfg.daysToKeep1 = daysToKeep1;
}
if (daysToKeep2 > 0 && daysToKeep2 != pDb->cfg.daysToKeep2) {
if (daysToKeep2 > 0 && (daysToKeep2 != pDb->cfg.daysToKeep2 || newCfg.daysToKeep2 != pDb->cfg.daysToKeep2)) {
mDebug("db:%s, daysToKeep2:%d change to %d", pDb->name, pDb->cfg.daysToKeep2, daysToKeep2);
newCfg.daysToKeep2 = daysToKeep2;
}
......@@ -1068,8 +1090,8 @@ static SDbCfg mnodeGetAlterDbOption(SDbObj *pDb, SAlterDbMsg *pAlter) {
// community version can only change daysToKeep
// but enterprise version can change all daysToKeep options
#ifndef _STORAGE
newCfg.daysToKeep1 = newCfg.daysToKeep;
newCfg.daysToKeep2 = newCfg.daysToKeep;
newCfg.daysToKeep1 = newCfg.daysToKeep0;
newCfg.daysToKeep2 = newCfg.daysToKeep0;
#endif
return newCfg;
......@@ -1309,4 +1331,4 @@ int32_t mnodeCompactDbs() {
mInfo("end to compact dbs table...");
return 0;
}
\ No newline at end of file
}
......@@ -894,9 +894,9 @@ static SCreateVnodeMsg *mnodeBuildVnodeMsg(SVgObj *pVgroup) {
pCfg->totalBlocks = htonl(pDb->cfg.totalBlocks);
pCfg->maxTables = htonl(maxTables + 1);
pCfg->daysPerFile = htonl(pDb->cfg.daysPerFile);
pCfg->daysToKeep = htonl(pDb->cfg.daysToKeep);
pCfg->daysToKeep1 = htonl(pDb->cfg.daysToKeep1);
pCfg->daysToKeep2 = htonl(pDb->cfg.daysToKeep2);
pCfg->daysToKeep = htonl(pDb->cfg.daysToKeep2); //FROM DB TO VNODE MAP:
pCfg->daysToKeep1 = htonl(pDb->cfg.daysToKeep0); //keep0,keep1,keep2 in SQL is mapped to keep1,keep2,keep in vnode
pCfg->daysToKeep2 = htonl(pDb->cfg.daysToKeep1); //user,client,mnode use keep0,keep1,keep2; vnode use keep1,keep2,keep
pCfg->minRowsPerFileBlock = htonl(pDb->cfg.minRowsPerFileBlock);
pCfg->maxRowsPerFileBlock = htonl(pDb->cfg.maxRowsPerFileBlock);
pCfg->fsyncPeriod = htonl(pDb->cfg.fsyncPeriod);
......
......@@ -184,11 +184,17 @@ static void *monThreadFunc(void *param) {
static void monBuildMonitorSql(char *sql, int32_t cmd) {
memset(sql, 0, SQL_LENGTH);
#ifdef _STORAGE
char *keepValue = "30,30,30";
#else
char *keepValue = "30";
#endif
if (cmd == MON_CMD_CREATE_DB) {
snprintf(sql, SQL_LENGTH,
"create database if not exists %s replica 1 days 10 keep 30 cache %d "
"create database if not exists %s replica 1 days 10 keep %s cache %d "
"blocks %d precision 'us'",
tsMonitorDbName, TSDB_MIN_CACHE_BLOCK_SIZE, TSDB_MIN_TOTAL_BLOCKS);
tsMonitorDbName, keepValue, TSDB_MIN_CACHE_BLOCK_SIZE, TSDB_MIN_TOTAL_BLOCKS);
} else if (cmd == MON_CMD_CREATE_MT_DN) {
snprintf(sql, SQL_LENGTH,
"create table if not exists %s.dn(ts timestamp"
......
......@@ -238,9 +238,18 @@ acct_optr(Y) ::= pps(C) tseries(D) storage(P) streams(F) qtime(Q) dbs(E) users(K
Y.stat = M;
}
%type intitemlist {SArray*}
%destructor intitemlist {taosArrayDestroy($$);}
%type intitem {tVariant}
intitemlist(A) ::= intitemlist(X) COMMA intitem(Y). { A = tVariantListAppend(X, &Y, -1); }
intitemlist(A) ::= intitem(X). { A = tVariantListAppend(NULL, &X, -1); }
intitem(A) ::= INTEGER(X). { toTSDBType(X.type); tVariantCreate(&A, &X); }
%type keep {SArray*}
%destructor keep {taosArrayDestroy($$);}
keep(Y) ::= KEEP tagitemlist(X). { Y = X; }
keep(Y) ::= KEEP intitemlist(X). { Y = X; }
cache(Y) ::= CACHE INTEGER(X). { Y = X; }
replica(Y) ::= REPLICA INTEGER(X). { Y = X; }
......
......@@ -97,28 +97,28 @@
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned short int
#define YYNOCODE 268
#define YYNOCODE 270
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE SStrToken
typedef union {
int yyinit;
ParseTOKENTYPE yy0;
SArray* yy15;
SWindowStateVal yy96;
SSqlNode* yy134;
SLimitVal yy150;
SSessionWindowVal yy151;
SRelationInfo* yy160;
int yy250;
tSqlExpr* yy328;
tVariant yy380;
SCreatedTableInfo yy390;
SCreateAcctInfo yy397;
SCreateDbInfo yy454;
SCreateTableSql* yy482;
int64_t yy489;
SIntervalVal yy496;
TAOS_FIELD yy505;
SSessionWindowVal yy15;
SIntervalVal yy42;
tSqlExpr* yy68;
SCreateAcctInfo yy77;
SArray* yy93;
int yy150;
SSqlNode* yy224;
SWindowStateVal yy274;
int64_t yy279;
SLimitVal yy284;
TAOS_FIELD yy325;
SRelationInfo* yy330;
SCreateDbInfo yy372;
tVariant yy518;
SCreatedTableInfo yy528;
SCreateTableSql* yy532;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
......@@ -128,17 +128,17 @@ typedef union {
#define ParseARG_FETCH SSqlInfo* pInfo = yypParser->pInfo
#define ParseARG_STORE yypParser->pInfo = pInfo
#define YYFALLBACK 1
#define YYNSTATE 341
#define YYNRULE 280
#define YYNSTATE 342
#define YYNRULE 283
#define YYNTOKEN 189
#define YY_MAX_SHIFT 340
#define YY_MIN_SHIFTREDUCE 538
#define YY_MAX_SHIFTREDUCE 817
#define YY_ERROR_ACTION 818
#define YY_ACCEPT_ACTION 819
#define YY_NO_ACTION 820
#define YY_MIN_REDUCE 821
#define YY_MAX_REDUCE 1100
#define YY_MAX_SHIFT 341
#define YY_MIN_SHIFTREDUCE 542
#define YY_MAX_SHIFTREDUCE 824
#define YY_ERROR_ACTION 825
#define YY_ACCEPT_ACTION 826
#define YY_NO_ACTION 827
#define YY_MIN_REDUCE 828
#define YY_MAX_REDUCE 1110
/************* End control #defines *******************************************/
/* Define the yytestcase() macro to be a no-op if is not already defined
......@@ -204,276 +204,277 @@ typedef union {
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (721)
#define YY_ACTTAB_COUNT (725)
static const YYACTIONTYPE yy_action[] = {
/* 0 */ 989, 586, 217, 338, 954, 22, 223, 192, 194, 587,
/* 10 */ 819, 340, 198, 52, 53, 151, 56, 57, 226, 1077,
/* 20 */ 229, 46, 1073, 55, 282, 60, 58, 62, 59, 1072,
/* 30 */ 665, 194, 968, 51, 50, 194, 234, 49, 48, 47,
/* 40 */ 52, 53, 1076, 56, 57, 225, 1077, 229, 46, 586,
/* 50 */ 55, 282, 60, 58, 62, 59, 980, 587, 314, 313,
/* 60 */ 51, 50, 968, 986, 49, 48, 47, 53, 35, 56,
/* 70 */ 57, 144, 258, 229, 46, 75, 55, 282, 60, 58,
/* 80 */ 62, 59, 279, 298, 87, 867, 51, 50, 94, 178,
/* 90 */ 49, 48, 47, 539, 540, 541, 542, 543, 544, 545,
/* 100 */ 546, 547, 548, 549, 550, 551, 339, 953, 298, 218,
/* 110 */ 76, 586, 964, 52, 53, 35, 56, 57, 324, 587,
/* 120 */ 229, 46, 956, 55, 282, 60, 58, 62, 59, 49,
/* 130 */ 48, 47, 756, 51, 50, 265, 264, 49, 48, 47,
/* 140 */ 52, 54, 980, 56, 57, 1071, 980, 229, 46, 586,
/* 150 */ 55, 282, 60, 58, 62, 59, 219, 587, 220, 965,
/* 160 */ 51, 50, 221, 212, 49, 48, 47, 28, 296, 333,
/* 170 */ 332, 295, 294, 293, 331, 292, 330, 329, 328, 291,
/* 180 */ 327, 326, 928, 35, 916, 917, 918, 919, 920, 921,
/* 190 */ 922, 923, 924, 925, 926, 927, 929, 930, 56, 57,
/* 200 */ 151, 213, 229, 46, 151, 55, 282, 60, 58, 62,
/* 210 */ 59, 962, 23, 91, 29, 51, 50, 243, 196, 49,
/* 220 */ 48, 47, 228, 771, 232, 197, 760, 965, 763, 203,
/* 230 */ 766, 228, 771, 151, 13, 760, 204, 763, 93, 766,
/* 240 */ 90, 128, 127, 202, 951, 952, 34, 955, 60, 58,
/* 250 */ 62, 59, 966, 235, 214, 215, 51, 50, 281, 1096,
/* 260 */ 49, 48, 47, 214, 215, 337, 336, 136, 28, 1025,
/* 270 */ 333, 332, 82, 88, 250, 331, 704, 330, 329, 328,
/* 280 */ 41, 327, 326, 254, 253, 936, 35, 199, 934, 935,
/* 290 */ 142, 140, 139, 937, 876, 939, 940, 938, 178, 941,
/* 300 */ 942, 82, 1026, 257, 277, 74, 113, 107, 118, 41,
/* 310 */ 236, 334, 211, 117, 123, 126, 116, 239, 762, 193,
/* 320 */ 765, 35, 120, 242, 761, 61, 764, 233, 689, 1088,
/* 330 */ 965, 686, 772, 687, 61, 688, 968, 968, 768, 200,
/* 340 */ 115, 772, 5, 38, 168, 324, 283, 768, 79, 167,
/* 350 */ 101, 96, 100, 868, 708, 767, 261, 178, 35, 245,
/* 360 */ 246, 201, 303, 35, 767, 965, 186, 184, 182, 35,
/* 370 */ 35, 35, 89, 181, 131, 130, 129, 51, 50, 35,
/* 380 */ 35, 49, 48, 47, 1, 166, 77, 240, 967, 238,
/* 390 */ 259, 302, 301, 244, 36, 241, 701, 309, 308, 304,
/* 400 */ 3, 179, 965, 8, 305, 758, 227, 965, 737, 738,
/* 410 */ 306, 310, 311, 965, 965, 965, 67, 80, 207, 70,
/* 420 */ 312, 316, 720, 965, 965, 261, 146, 728, 729, 792,
/* 430 */ 769, 66, 25, 24, 773, 1036, 770, 690, 24, 68,
/* 440 */ 71, 759, 775, 675, 285, 208, 33, 36, 36, 288,
/* 450 */ 6, 206, 677, 287, 676, 255, 66, 92, 66, 73,
/* 460 */ 15, 664, 14, 693, 106, 694, 105, 17, 691, 16,
/* 470 */ 692, 19, 112, 18, 111, 21, 1035, 20, 125, 124,
/* 480 */ 191, 205, 195, 230, 143, 1032, 1031, 231, 315, 988,
/* 490 */ 44, 999, 996, 997, 1001, 145, 981, 262, 149, 271,
/* 500 */ 1018, 1017, 963, 162, 163, 141, 932, 961, 164, 165,
/* 510 */ 719, 879, 266, 290, 325, 160, 158, 276, 153, 978,
/* 520 */ 42, 152, 63, 189, 222, 72, 268, 39, 299, 275,
/* 530 */ 875, 69, 280, 300, 1095, 278, 103, 154, 1094, 155,
/* 540 */ 156, 274, 157, 1091, 169, 307, 1087, 109, 272, 1086,
/* 550 */ 1083, 170, 897, 40, 37, 43, 190, 864, 119, 862,
/* 560 */ 121, 122, 860, 859, 247, 180, 857, 856, 855, 854,
/* 570 */ 853, 852, 183, 185, 849, 847, 845, 843, 187, 840,
/* 580 */ 188, 270, 260, 78, 83, 269, 1019, 267, 45, 114,
/* 590 */ 317, 318, 319, 216, 321, 237, 320, 289, 322, 323,
/* 600 */ 335, 209, 817, 248, 97, 98, 210, 249, 816, 252,
/* 610 */ 815, 251, 798, 797, 256, 858, 261, 132, 173, 133,
/* 620 */ 898, 175, 171, 172, 174, 176, 177, 851, 4, 134,
/* 630 */ 850, 2, 135, 842, 841, 284, 9, 81, 696, 161,
/* 640 */ 159, 30, 147, 263, 84, 944, 224, 721, 724, 85,
/* 650 */ 10, 726, 86, 148, 273, 11, 730, 150, 31, 774,
/* 660 */ 7, 32, 12, 26, 286, 27, 776, 95, 93, 628,
/* 670 */ 624, 622, 621, 620, 617, 590, 297, 99, 64, 36,
/* 680 */ 102, 667, 666, 663, 612, 610, 65, 602, 104, 608,
/* 690 */ 604, 606, 600, 598, 631, 630, 629, 627, 626, 625,
/* 700 */ 623, 619, 618, 108, 110, 66, 588, 555, 553, 821,
/* 710 */ 820, 820, 820, 820, 820, 820, 820, 820, 820, 137,
/* 720 */ 138,
/* 0 */ 224, 590, 235, 999, 978, 144, 978, 590, 195, 591,
/* 10 */ 964, 826, 341, 52, 53, 591, 56, 57, 227, 1087,
/* 20 */ 230, 46, 246, 55, 283, 60, 58, 62, 59, 218,
/* 30 */ 339, 622, 237, 51, 50, 195, 978, 49, 48, 47,
/* 40 */ 52, 53, 34, 56, 57, 226, 1087, 230, 46, 590,
/* 50 */ 55, 283, 60, 58, 62, 59, 151, 591, 976, 990,
/* 60 */ 51, 50, 228, 151, 49, 48, 47, 53, 996, 56,
/* 70 */ 57, 266, 265, 230, 46, 259, 55, 283, 60, 58,
/* 80 */ 62, 59, 299, 75, 220, 151, 51, 50, 975, 299,
/* 90 */ 49, 48, 47, 543, 544, 545, 546, 547, 548, 549,
/* 100 */ 550, 551, 552, 553, 554, 555, 340, 6, 94, 219,
/* 110 */ 76, 52, 53, 82, 56, 57, 963, 195, 230, 46,
/* 120 */ 41, 55, 283, 60, 58, 62, 59, 1036, 1086, 278,
/* 130 */ 325, 51, 50, 763, 1035, 49, 48, 47, 52, 54,
/* 140 */ 22, 56, 57, 966, 990, 230, 46, 35, 55, 283,
/* 150 */ 60, 58, 62, 59, 280, 193, 87, 874, 51, 50,
/* 160 */ 221, 178, 49, 48, 47, 260, 40, 297, 334, 333,
/* 170 */ 296, 295, 294, 332, 293, 331, 330, 329, 292, 328,
/* 180 */ 327, 938, 926, 927, 928, 929, 930, 931, 932, 933,
/* 190 */ 934, 935, 936, 937, 939, 940, 56, 57, 146, 990,
/* 200 */ 230, 46, 199, 55, 283, 60, 58, 62, 59, 49,
/* 210 */ 48, 47, 23, 51, 50, 222, 727, 49, 48, 47,
/* 220 */ 229, 778, 972, 883, 767, 115, 770, 178, 773, 204,
/* 230 */ 325, 229, 778, 335, 907, 767, 205, 770, 769, 773,
/* 240 */ 772, 128, 127, 203, 338, 337, 136, 15, 40, 14,
/* 250 */ 334, 333, 215, 216, 151, 332, 282, 331, 330, 329,
/* 260 */ 977, 328, 327, 215, 216, 946, 236, 944, 945, 590,
/* 270 */ 1083, 34, 947, 82, 949, 950, 948, 591, 951, 952,
/* 280 */ 41, 60, 58, 62, 59, 34, 768, 251, 771, 51,
/* 290 */ 50, 1, 166, 49, 48, 47, 255, 254, 34, 113,
/* 300 */ 107, 118, 1082, 258, 240, 74, 117, 123, 126, 116,
/* 310 */ 245, 696, 212, 233, 693, 120, 694, 975, 695, 5,
/* 320 */ 37, 168, 91, 672, 61, 88, 167, 101, 96, 100,
/* 330 */ 779, 974, 711, 51, 50, 61, 775, 49, 48, 47,
/* 340 */ 234, 779, 242, 243, 975, 34, 34, 775, 34, 284,
/* 350 */ 776, 315, 314, 774, 961, 962, 33, 965, 187, 185,
/* 360 */ 183, 89, 34, 34, 774, 182, 131, 130, 129, 34,
/* 370 */ 34, 34, 1081, 28, 241, 77, 239, 1106, 303, 302,
/* 380 */ 247, 700, 244, 701, 310, 309, 708, 304, 305, 875,
/* 390 */ 306, 975, 975, 178, 975, 13, 3, 179, 777, 93,
/* 400 */ 90, 142, 140, 139, 307, 311, 1098, 64, 975, 975,
/* 410 */ 715, 312, 313, 317, 8, 975, 975, 975, 744, 745,
/* 420 */ 697, 79, 80, 25, 24, 735, 24, 765, 262, 262,
/* 430 */ 67, 70, 35, 35, 64, 92, 64, 32, 125, 124,
/* 440 */ 289, 736, 799, 213, 780, 782, 106, 17, 105, 16,
/* 450 */ 682, 286, 684, 288, 683, 698, 19, 699, 18, 112,
/* 460 */ 73, 111, 671, 766, 21, 214, 20, 197, 198, 200,
/* 470 */ 194, 201, 202, 71, 68, 208, 1046, 209, 207, 192,
/* 480 */ 206, 196, 1045, 231, 1042, 1041, 991, 256, 232, 316,
/* 490 */ 143, 44, 998, 1028, 1009, 1006, 1007, 1011, 263, 145,
/* 500 */ 973, 141, 267, 149, 272, 1027, 162, 163, 223, 726,
/* 510 */ 269, 276, 155, 152, 971, 164, 165, 886, 988, 291,
/* 520 */ 42, 190, 38, 300, 882, 72, 301, 63, 69, 153,
/* 530 */ 1105, 281, 154, 103, 1104, 277, 279, 156, 275, 157,
/* 540 */ 273, 271, 1101, 169, 308, 1097, 109, 1096, 268, 1093,
/* 550 */ 170, 904, 39, 36, 43, 161, 191, 871, 119, 869,
/* 560 */ 121, 122, 867, 866, 248, 181, 864, 863, 862, 45,
/* 570 */ 861, 860, 859, 184, 186, 856, 854, 852, 850, 188,
/* 580 */ 847, 189, 326, 261, 78, 83, 114, 270, 1029, 318,
/* 590 */ 319, 320, 321, 322, 323, 217, 238, 290, 324, 336,
/* 600 */ 824, 210, 249, 250, 97, 98, 211, 823, 252, 253,
/* 610 */ 822, 257, 805, 804, 262, 264, 9, 285, 177, 172,
/* 620 */ 905, 175, 173, 171, 132, 865, 174, 176, 133, 858,
/* 630 */ 4, 857, 942, 134, 135, 703, 906, 849, 848, 81,
/* 640 */ 2, 158, 29, 159, 160, 84, 148, 728, 147, 225,
/* 650 */ 731, 954, 85, 30, 733, 86, 274, 10, 737, 150,
/* 660 */ 31, 781, 11, 95, 7, 12, 26, 783, 27, 635,
/* 670 */ 287, 631, 629, 93, 628, 627, 624, 594, 298, 99,
/* 680 */ 65, 35, 674, 102, 66, 673, 104, 108, 670, 616,
/* 690 */ 110, 614, 606, 612, 608, 610, 604, 602, 638, 637,
/* 700 */ 636, 634, 633, 632, 630, 626, 625, 180, 592, 559,
/* 710 */ 557, 828, 827, 827, 827, 827, 827, 827, 827, 827,
/* 720 */ 827, 827, 827, 137, 138,
};
static const YYCODETYPE yy_lookahead[] = {
/* 0 */ 193, 1, 192, 193, 0, 255, 212, 255, 255, 9,
/* 10 */ 190, 191, 255, 13, 14, 193, 16, 17, 265, 266,
/* 20 */ 20, 21, 255, 23, 24, 25, 26, 27, 28, 255,
/* 30 */ 5, 255, 238, 33, 34, 255, 212, 37, 38, 39,
/* 40 */ 13, 14, 266, 16, 17, 265, 266, 20, 21, 1,
/* 50 */ 23, 24, 25, 26, 27, 28, 236, 9, 33, 34,
/* 60 */ 33, 34, 238, 256, 37, 38, 39, 14, 193, 16,
/* 70 */ 17, 193, 252, 20, 21, 199, 23, 24, 25, 26,
/* 80 */ 27, 28, 260, 79, 262, 198, 33, 34, 199, 202,
/* 0 */ 236, 1, 236, 193, 240, 193, 240, 1, 257, 9,
/* 10 */ 0, 190, 191, 13, 14, 9, 16, 17, 267, 268,
/* 20 */ 20, 21, 193, 23, 24, 25, 26, 27, 28, 192,
/* 30 */ 193, 5, 236, 33, 34, 257, 240, 37, 38, 39,
/* 40 */ 13, 14, 193, 16, 17, 267, 268, 20, 21, 1,
/* 50 */ 23, 24, 25, 26, 27, 28, 193, 9, 229, 238,
/* 60 */ 33, 34, 60, 193, 37, 38, 39, 14, 258, 16,
/* 70 */ 17, 259, 260, 20, 21, 254, 23, 24, 25, 26,
/* 80 */ 27, 28, 79, 199, 235, 193, 33, 34, 239, 79,
/* 90 */ 37, 38, 39, 45, 46, 47, 48, 49, 50, 51,
/* 100 */ 52, 53, 54, 55, 56, 57, 58, 231, 79, 61,
/* 110 */ 110, 1, 237, 13, 14, 193, 16, 17, 81, 9,
/* 120 */ 20, 21, 233, 23, 24, 25, 26, 27, 28, 37,
/* 130 */ 38, 39, 105, 33, 34, 257, 258, 37, 38, 39,
/* 140 */ 13, 14, 236, 16, 17, 255, 236, 20, 21, 1,
/* 150 */ 23, 24, 25, 26, 27, 28, 234, 9, 252, 237,
/* 160 */ 33, 34, 252, 255, 37, 38, 39, 88, 89, 90,
/* 170 */ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
/* 180 */ 101, 102, 211, 193, 213, 214, 215, 216, 217, 218,
/* 190 */ 219, 220, 221, 222, 223, 224, 225, 226, 16, 17,
/* 200 */ 193, 255, 20, 21, 193, 23, 24, 25, 26, 27,
/* 210 */ 28, 193, 44, 199, 104, 33, 34, 193, 255, 37,
/* 220 */ 38, 39, 1, 2, 234, 255, 5, 237, 7, 61,
/* 230 */ 9, 1, 2, 193, 104, 5, 68, 7, 108, 9,
/* 240 */ 110, 73, 74, 75, 230, 231, 232, 233, 25, 26,
/* 250 */ 27, 28, 228, 235, 33, 34, 33, 34, 37, 238,
/* 260 */ 37, 38, 39, 33, 34, 65, 66, 67, 88, 262,
/* 270 */ 90, 91, 104, 262, 136, 95, 37, 97, 98, 99,
/* 280 */ 112, 101, 102, 145, 146, 211, 193, 255, 214, 215,
/* 290 */ 62, 63, 64, 219, 198, 221, 222, 223, 202, 225,
/* 300 */ 226, 104, 262, 135, 264, 137, 62, 63, 64, 112,
/* 310 */ 212, 212, 144, 69, 70, 71, 72, 68, 5, 255,
/* 320 */ 7, 193, 78, 68, 5, 104, 7, 234, 2, 238,
/* 330 */ 237, 5, 111, 7, 104, 9, 238, 238, 117, 255,
/* 340 */ 76, 111, 62, 63, 64, 81, 15, 117, 105, 69,
/* 350 */ 70, 71, 72, 198, 115, 134, 113, 202, 193, 33,
/* 360 */ 34, 255, 234, 193, 134, 237, 62, 63, 64, 193,
/* 370 */ 193, 193, 239, 69, 70, 71, 72, 33, 34, 193,
/* 380 */ 193, 37, 38, 39, 200, 201, 253, 138, 238, 140,
/* 390 */ 105, 142, 143, 138, 109, 140, 109, 142, 143, 234,
/* 400 */ 196, 197, 237, 116, 234, 1, 60, 237, 125, 126,
/* 410 */ 234, 234, 234, 237, 237, 237, 109, 105, 255, 109,
/* 420 */ 234, 234, 105, 237, 237, 113, 109, 105, 105, 105,
/* 430 */ 117, 109, 109, 109, 105, 229, 117, 111, 109, 132,
/* 440 */ 130, 37, 111, 105, 105, 255, 104, 109, 109, 107,
/* 450 */ 104, 255, 105, 105, 105, 193, 109, 109, 109, 104,
/* 460 */ 139, 106, 141, 5, 139, 7, 141, 139, 5, 141,
/* 470 */ 7, 139, 139, 141, 141, 139, 229, 141, 76, 77,
/* 480 */ 255, 255, 255, 229, 193, 229, 229, 229, 229, 193,
/* 490 */ 254, 193, 193, 193, 193, 193, 236, 236, 193, 193,
/* 500 */ 263, 263, 236, 240, 193, 60, 227, 193, 193, 193,
/* 510 */ 117, 193, 259, 193, 103, 242, 244, 122, 249, 251,
/* 520 */ 193, 250, 128, 193, 259, 129, 259, 193, 193, 259,
/* 530 */ 193, 131, 123, 193, 193, 127, 193, 248, 193, 247,
/* 540 */ 246, 121, 245, 193, 193, 193, 193, 193, 120, 193,
/* 550 */ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
/* 560 */ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
/* 100 */ 52, 53, 54, 55, 56, 57, 58, 105, 199, 61,
/* 110 */ 110, 13, 14, 105, 16, 17, 232, 257, 20, 21,
/* 120 */ 112, 23, 24, 25, 26, 27, 28, 264, 268, 266,
/* 130 */ 81, 33, 34, 106, 264, 37, 38, 39, 13, 14,
/* 140 */ 257, 16, 17, 234, 238, 20, 21, 88, 23, 24,
/* 150 */ 25, 26, 27, 28, 262, 257, 264, 198, 33, 34,
/* 160 */ 254, 202, 37, 38, 39, 106, 89, 90, 91, 92,
/* 170 */ 93, 94, 95, 96, 97, 98, 99, 100, 101, 102,
/* 180 */ 103, 213, 214, 215, 216, 217, 218, 219, 220, 221,
/* 190 */ 222, 223, 224, 225, 226, 227, 16, 17, 88, 238,
/* 200 */ 20, 21, 257, 23, 24, 25, 26, 27, 28, 37,
/* 210 */ 38, 39, 44, 33, 34, 254, 106, 37, 38, 39,
/* 220 */ 1, 2, 193, 198, 5, 76, 7, 202, 9, 61,
/* 230 */ 81, 1, 2, 211, 212, 5, 68, 7, 5, 9,
/* 240 */ 7, 73, 74, 75, 65, 66, 67, 139, 89, 141,
/* 250 */ 91, 92, 33, 34, 193, 96, 37, 98, 99, 100,
/* 260 */ 240, 102, 103, 33, 34, 213, 237, 215, 216, 1,
/* 270 */ 257, 193, 220, 105, 222, 223, 224, 9, 226, 227,
/* 280 */ 112, 25, 26, 27, 28, 193, 5, 136, 7, 33,
/* 290 */ 34, 200, 201, 37, 38, 39, 145, 146, 193, 62,
/* 300 */ 63, 64, 257, 135, 68, 137, 69, 70, 71, 72,
/* 310 */ 68, 2, 144, 235, 5, 78, 7, 239, 9, 62,
/* 320 */ 63, 64, 199, 5, 105, 264, 69, 70, 71, 72,
/* 330 */ 111, 239, 37, 33, 34, 105, 117, 37, 38, 39,
/* 340 */ 235, 111, 33, 34, 239, 193, 193, 117, 193, 15,
/* 350 */ 117, 33, 34, 134, 231, 232, 233, 234, 62, 63,
/* 360 */ 64, 241, 193, 193, 134, 69, 70, 71, 72, 193,
/* 370 */ 193, 193, 257, 105, 138, 255, 140, 240, 142, 143,
/* 380 */ 138, 5, 140, 7, 142, 143, 88, 235, 235, 198,
/* 390 */ 235, 239, 239, 202, 239, 105, 196, 197, 117, 109,
/* 400 */ 110, 62, 63, 64, 235, 235, 240, 88, 239, 239,
/* 410 */ 115, 235, 235, 235, 116, 239, 239, 239, 125, 126,
/* 420 */ 111, 106, 106, 88, 88, 106, 88, 1, 113, 113,
/* 430 */ 88, 88, 88, 88, 88, 88, 88, 105, 76, 77,
/* 440 */ 108, 106, 106, 257, 106, 111, 139, 139, 141, 141,
/* 450 */ 106, 106, 106, 106, 106, 5, 139, 7, 141, 139,
/* 460 */ 105, 141, 107, 37, 139, 257, 141, 257, 257, 257,
/* 470 */ 257, 257, 257, 130, 132, 257, 230, 257, 257, 257,
/* 480 */ 257, 257, 230, 230, 230, 230, 238, 193, 230, 230,
/* 490 */ 193, 256, 193, 265, 193, 193, 193, 193, 238, 193,
/* 500 */ 238, 60, 261, 193, 193, 265, 242, 193, 261, 117,
/* 510 */ 261, 261, 249, 252, 193, 193, 193, 193, 253, 193,
/* 520 */ 193, 193, 193, 193, 193, 129, 193, 128, 131, 251,
/* 530 */ 193, 123, 250, 193, 193, 122, 127, 248, 121, 247,
/* 540 */ 120, 119, 193, 193, 193, 193, 193, 193, 118, 193,
/* 550 */ 193, 193, 193, 193, 193, 243, 193, 193, 193, 193,
/* 560 */ 193, 193, 193, 193, 193, 193, 193, 193, 193, 133,
/* 570 */ 193, 193, 193, 193, 193, 193, 193, 193, 193, 193,
/* 580 */ 193, 119, 194, 194, 194, 194, 194, 118, 133, 87,
/* 590 */ 86, 50, 83, 194, 54, 194, 85, 194, 84, 82,
/* 600 */ 79, 194, 5, 147, 199, 199, 194, 5, 5, 5,
/* 610 */ 5, 147, 90, 89, 136, 194, 113, 195, 204, 195,
/* 620 */ 210, 205, 209, 208, 207, 206, 203, 194, 196, 195,
/* 630 */ 194, 200, 195, 194, 194, 107, 104, 114, 105, 241,
/* 640 */ 243, 104, 104, 109, 109, 227, 1, 105, 105, 104,
/* 650 */ 124, 105, 104, 109, 104, 124, 105, 104, 109, 105,
/* 660 */ 104, 109, 104, 104, 107, 104, 111, 76, 108, 9,
/* 670 */ 5, 5, 5, 5, 5, 80, 15, 76, 16, 109,
/* 680 */ 141, 5, 5, 105, 5, 5, 16, 5, 141, 5,
/* 690 */ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
/* 700 */ 5, 5, 5, 141, 141, 109, 80, 60, 59, 0,
/* 710 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 21,
/* 720 */ 21, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 730 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 740 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 750 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 760 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 770 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 780 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 790 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 800 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 810 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 820 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 830 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 840 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 850 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 860 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 870 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 880 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 890 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 900 */ 267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
/* 580 */ 193, 193, 104, 194, 194, 194, 87, 194, 194, 86,
/* 590 */ 50, 83, 85, 54, 84, 194, 194, 194, 82, 79,
/* 600 */ 5, 194, 147, 5, 199, 199, 194, 5, 147, 5,
/* 610 */ 5, 136, 91, 90, 113, 88, 105, 108, 203, 208,
/* 620 */ 210, 205, 204, 209, 195, 194, 207, 206, 195, 194,
/* 630 */ 196, 194, 228, 195, 195, 106, 212, 194, 194, 114,
/* 640 */ 200, 246, 105, 245, 244, 88, 88, 106, 105, 1,
/* 650 */ 106, 228, 105, 88, 106, 105, 105, 124, 106, 105,
/* 660 */ 88, 106, 124, 76, 105, 105, 105, 111, 105, 9,
/* 670 */ 108, 5, 5, 109, 5, 5, 5, 80, 15, 76,
/* 680 */ 16, 88, 5, 141, 16, 5, 141, 141, 106, 5,
/* 690 */ 141, 5, 5, 5, 5, 5, 5, 5, 5, 5,
/* 700 */ 5, 5, 5, 5, 5, 5, 5, 88, 80, 60,
/* 710 */ 59, 0, 269, 269, 269, 269, 269, 269, 269, 269,
/* 720 */ 269, 269, 269, 21, 21, 269, 269, 269, 269, 269,
/* 730 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 740 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 750 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 760 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 770 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 780 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 790 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 800 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 810 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 820 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 830 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 840 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 850 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 860 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 870 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 880 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 890 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 900 */ 269, 269, 269, 269, 269, 269, 269, 269, 269, 269,
/* 910 */ 269, 269, 269, 269,
};
#define YY_SHIFT_COUNT (340)
#define YY_SHIFT_COUNT (341)
#define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (709)
#define YY_SHIFT_MAX (711)
static const unsigned short int yy_shift_ofst[] = {
/* 0 */ 168, 79, 79, 180, 180, 29, 221, 230, 110, 148,
/* 10 */ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
/* 20 */ 148, 148, 0, 48, 230, 326, 326, 326, 326, 197,
/* 30 */ 197, 148, 148, 148, 4, 148, 148, 264, 29, 37,
/* 40 */ 37, 721, 721, 721, 230, 230, 230, 230, 230, 230,
/* 0 */ 168, 77, 77, 159, 159, 3, 219, 230, 268, 6,
/* 10 */ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
/* 20 */ 6, 6, 0, 48, 230, 309, 309, 309, 8, 8,
/* 30 */ 6, 6, 6, 10, 6, 6, 149, 3, 49, 49,
/* 40 */ 26, 725, 725, 725, 230, 230, 230, 230, 230, 230,
/* 50 */ 230, 230, 230, 230, 230, 230, 230, 230, 230, 230,
/* 60 */ 230, 230, 230, 230, 326, 326, 326, 25, 25, 25,
/* 70 */ 25, 25, 25, 25, 148, 148, 148, 239, 148, 148,
/* 80 */ 148, 197, 197, 148, 148, 148, 148, 283, 283, 287,
/* 90 */ 197, 148, 148, 148, 148, 148, 148, 148, 148, 148,
/* 100 */ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
/* 110 */ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
/* 120 */ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
/* 130 */ 148, 148, 148, 148, 148, 148, 148, 148, 148, 148,
/* 140 */ 148, 148, 148, 445, 445, 445, 393, 393, 393, 445,
/* 150 */ 393, 445, 396, 400, 394, 409, 408, 395, 420, 428,
/* 160 */ 462, 469, 455, 445, 445, 445, 411, 29, 29, 445,
/* 170 */ 445, 502, 504, 541, 509, 511, 540, 514, 517, 411,
/* 180 */ 445, 521, 521, 445, 521, 445, 521, 445, 445, 721,
/* 190 */ 721, 27, 100, 127, 100, 100, 53, 182, 223, 223,
/* 200 */ 223, 223, 244, 280, 304, 344, 344, 344, 344, 249,
/* 210 */ 255, 138, 92, 92, 313, 319, 130, 200, 228, 285,
/* 220 */ 243, 312, 317, 322, 323, 324, 329, 404, 346, 331,
/* 230 */ 307, 310, 338, 339, 347, 348, 349, 342, 321, 325,
/* 240 */ 328, 332, 333, 355, 336, 458, 463, 402, 597, 456,
/* 250 */ 602, 603, 464, 604, 605, 522, 524, 478, 503, 528,
/* 260 */ 532, 523, 533, 537, 534, 535, 542, 538, 543, 544,
/* 270 */ 545, 546, 548, 645, 550, 551, 553, 549, 526, 552,
/* 280 */ 531, 554, 556, 555, 558, 528, 559, 557, 561, 560,
/* 290 */ 591, 660, 665, 666, 667, 668, 669, 595, 661, 601,
/* 300 */ 662, 539, 547, 570, 570, 570, 570, 670, 562, 563,
/* 310 */ 570, 570, 570, 676, 677, 578, 570, 679, 680, 682,
/* 320 */ 684, 685, 686, 687, 688, 689, 690, 691, 692, 693,
/* 330 */ 694, 695, 696, 697, 596, 626, 698, 699, 647, 649,
/* 340 */ 709,
/* 60 */ 230, 230, 230, 230, 309, 309, 309, 318, 318, 318,
/* 70 */ 318, 318, 318, 318, 6, 6, 6, 295, 6, 6,
/* 80 */ 6, 8, 8, 6, 6, 6, 6, 293, 293, 298,
/* 90 */ 8, 6, 6, 6, 6, 6, 6, 6, 6, 6,
/* 100 */ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
/* 110 */ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
/* 120 */ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
/* 130 */ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
/* 140 */ 6, 6, 6, 441, 441, 441, 392, 392, 392, 441,
/* 150 */ 392, 441, 396, 397, 399, 408, 409, 413, 417, 420,
/* 160 */ 422, 430, 436, 441, 441, 441, 478, 3, 3, 441,
/* 170 */ 441, 499, 503, 540, 508, 507, 539, 510, 516, 478,
/* 180 */ 26, 441, 520, 520, 441, 520, 441, 520, 441, 441,
/* 190 */ 725, 725, 27, 98, 125, 98, 98, 53, 180, 256,
/* 200 */ 256, 256, 256, 237, 257, 296, 300, 300, 300, 300,
/* 210 */ 236, 242, 151, 172, 172, 233, 281, 290, 179, 339,
/* 220 */ 59, 315, 316, 110, 319, 335, 336, 338, 426, 2,
/* 230 */ 334, 342, 343, 344, 345, 346, 347, 348, 332, 108,
/* 240 */ 307, 308, 376, 450, 317, 320, 355, 325, 362, 595,
/* 250 */ 455, 598, 602, 461, 604, 605, 521, 523, 475, 501,
/* 260 */ 509, 511, 525, 529, 537, 527, 557, 541, 543, 544,
/* 270 */ 558, 547, 548, 550, 648, 551, 552, 554, 565, 533,
/* 280 */ 572, 538, 555, 559, 556, 560, 509, 561, 562, 563,
/* 290 */ 564, 587, 660, 666, 667, 669, 670, 671, 597, 663,
/* 300 */ 603, 664, 542, 545, 593, 593, 593, 593, 668, 546,
/* 310 */ 549, 593, 593, 593, 677, 680, 582, 593, 684, 686,
/* 320 */ 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
/* 330 */ 697, 698, 699, 700, 701, 619, 628, 702, 703, 649,
/* 340 */ 651, 711,
};
#define YY_REDUCE_COUNT (190)
#define YY_REDUCE_MIN (-250)
#define YY_REDUCE_MAX (440)
#define YY_REDUCE_COUNT (191)
#define YY_REDUCE_MIN (-249)
#define YY_REDUCE_MAX (444)
static const short yy_reduce_ofst[] = {
/* 0 */ -180, -29, -29, 74, 74, 14, -247, -220, -122, -78,
/* 10 */ 40, -178, -10, 93, 128, 165, 170, 176, 177, 178,
/* 20 */ 186, 187, -193, -190, -224, -206, -176, 98, 99, -94,
/* 30 */ -90, 7, 11, 18, -111, 24, -125, -113, -124, 96,
/* 40 */ 155, 133, 184, 204, -250, -248, -243, -233, -226, -110,
/* 50 */ -92, -54, -37, -30, 32, 64, 84, 106, 163, 190,
/* 60 */ 196, 225, 226, 227, 21, 91, 150, 206, 247, 254,
/* 70 */ 256, 257, 258, 259, 262, 291, 296, 236, 298, 299,
/* 80 */ 300, 260, 261, 301, 302, 305, 306, 237, 238, 263,
/* 90 */ 266, 311, 314, 315, 316, 318, 320, 327, 330, 334,
/* 100 */ 335, 337, 340, 341, 343, 345, 350, 351, 352, 353,
/* 110 */ 354, 356, 357, 358, 359, 360, 361, 362, 363, 364,
/* 0 */ -179, -32, -32, 52, 52, 123, -249, -222, -188, -151,
/* 10 */ -137, -108, 78, 105, 152, 153, 155, 169, 170, 176,
/* 20 */ 177, 178, -190, -163, -140, -236, -234, -204, -94, -39,
/* 30 */ -130, 61, 29, -91, -171, 92, -41, -116, 25, 191,
/* 40 */ 22, 120, 91, 200, -117, -102, -55, 13, 45, 115,
/* 50 */ 186, 208, 210, 211, 212, 213, 214, 215, 218, 220,
/* 60 */ 221, 222, 223, 224, 20, 137, 166, 246, 252, 253,
/* 70 */ 254, 255, 258, 259, 294, 297, 299, 235, 301, 302,
/* 80 */ 303, 248, 260, 304, 306, 310, 311, 228, 240, 264,
/* 90 */ 262, 314, 321, 322, 323, 324, 326, 327, 328, 329,
/* 100 */ 330, 331, 333, 337, 340, 341, 349, 350, 351, 352,
/* 110 */ 353, 354, 356, 357, 358, 359, 360, 361, 363, 364,
/* 120 */ 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
/* 130 */ 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
/* 140 */ 385, 386, 387, 388, 389, 390, 253, 265, 267, 391,
/* 150 */ 270, 392, 268, 271, 269, 289, 292, 294, 297, 272,
/* 160 */ 397, 273, 398, 399, 401, 403, 279, 405, 406, 407,
/* 170 */ 412, 410, 413, 415, 414, 417, 416, 419, 423, 418,
/* 180 */ 421, 422, 424, 433, 434, 436, 437, 439, 440, 431,
/* 190 */ 432,
/* 130 */ 375, 377, 378, 379, 380, 381, 382, 383, 384, 385,
/* 140 */ 386, 387, 388, 389, 390, 391, 241, 247, 249, 393,
/* 150 */ 250, 394, 265, 261, 278, 282, 263, 289, 292, 395,
/* 160 */ 398, 400, 312, 401, 402, 403, 404, 405, 406, 407,
/* 170 */ 412, 410, 414, 411, 418, 419, 416, 421, 415, 423,
/* 180 */ 424, 431, 429, 433, 435, 438, 437, 439, 443, 444,
/* 190 */ 440, 434,
};
static const YYACTIONTYPE yy_default[] = {
/* 0 */ 818, 931, 877, 943, 865, 874, 1079, 1079, 818, 818,
/* 10 */ 818, 818, 818, 818, 818, 818, 818, 818, 818, 818,
/* 20 */ 818, 818, 990, 837, 1079, 818, 818, 818, 818, 818,
/* 30 */ 818, 818, 818, 818, 874, 818, 818, 880, 874, 880,
/* 40 */ 880, 985, 915, 933, 818, 818, 818, 818, 818, 818,
/* 50 */ 818, 818, 818, 818, 818, 818, 818, 818, 818, 818,
/* 60 */ 818, 818, 818, 818, 818, 818, 818, 818, 818, 818,
/* 70 */ 818, 818, 818, 818, 818, 818, 818, 992, 998, 995,
/* 80 */ 818, 818, 818, 1000, 818, 818, 818, 1022, 1022, 983,
/* 90 */ 818, 818, 818, 818, 818, 818, 818, 818, 818, 818,
/* 100 */ 818, 818, 818, 818, 818, 818, 818, 818, 818, 818,
/* 110 */ 818, 818, 818, 818, 818, 818, 818, 818, 818, 863,
/* 120 */ 818, 861, 818, 818, 818, 818, 818, 818, 818, 818,
/* 130 */ 818, 818, 818, 818, 818, 818, 848, 818, 818, 818,
/* 140 */ 818, 818, 818, 839, 839, 839, 818, 818, 818, 839,
/* 150 */ 818, 839, 1029, 1033, 1027, 1015, 1023, 1014, 1010, 1008,
/* 160 */ 1006, 1005, 1037, 839, 839, 839, 878, 874, 874, 839,
/* 170 */ 839, 896, 894, 892, 884, 890, 886, 888, 882, 866,
/* 180 */ 839, 872, 872, 839, 872, 839, 872, 839, 839, 915,
/* 190 */ 933, 818, 1038, 818, 1078, 1028, 1068, 1067, 1074, 1066,
/* 200 */ 1065, 1064, 818, 818, 818, 1060, 1061, 1063, 1062, 818,
/* 210 */ 818, 818, 1070, 1069, 818, 818, 818, 818, 818, 818,
/* 220 */ 818, 818, 818, 818, 818, 818, 818, 818, 1040, 818,
/* 230 */ 1034, 1030, 818, 818, 818, 818, 818, 818, 818, 818,
/* 240 */ 818, 818, 818, 945, 818, 818, 818, 818, 818, 818,
/* 250 */ 818, 818, 818, 818, 818, 818, 818, 818, 982, 818,
/* 260 */ 818, 818, 818, 818, 994, 993, 818, 818, 818, 818,
/* 270 */ 818, 818, 818, 818, 818, 818, 818, 1024, 818, 1016,
/* 280 */ 818, 818, 818, 818, 818, 957, 818, 818, 818, 818,
/* 290 */ 818, 818, 818, 818, 818, 818, 818, 818, 818, 818,
/* 300 */ 818, 818, 818, 1097, 1092, 1093, 1090, 818, 818, 818,
/* 310 */ 1089, 1084, 1085, 818, 818, 818, 1082, 818, 818, 818,
/* 320 */ 818, 818, 818, 818, 818, 818, 818, 818, 818, 818,
/* 330 */ 818, 818, 818, 818, 899, 818, 846, 844, 818, 835,
/* 340 */ 818,
/* 0 */ 825, 941, 884, 953, 872, 881, 1089, 1089, 825, 825,
/* 10 */ 825, 825, 825, 825, 825, 825, 825, 825, 825, 825,
/* 20 */ 825, 825, 1000, 844, 1089, 825, 825, 825, 825, 825,
/* 30 */ 825, 825, 825, 881, 825, 825, 887, 881, 887, 887,
/* 40 */ 825, 995, 925, 943, 825, 825, 825, 825, 825, 825,
/* 50 */ 825, 825, 825, 825, 825, 825, 825, 825, 825, 825,
/* 60 */ 825, 825, 825, 825, 825, 825, 825, 825, 825, 825,
/* 70 */ 825, 825, 825, 825, 825, 825, 825, 1002, 1008, 1005,
/* 80 */ 825, 825, 825, 1010, 825, 825, 825, 1032, 1032, 993,
/* 90 */ 825, 825, 825, 825, 825, 825, 825, 825, 825, 825,
/* 100 */ 825, 825, 825, 825, 825, 825, 825, 825, 825, 825,
/* 110 */ 825, 825, 825, 825, 825, 825, 825, 825, 825, 870,
/* 120 */ 825, 868, 825, 825, 825, 825, 825, 825, 825, 825,
/* 130 */ 825, 825, 825, 825, 825, 825, 855, 825, 825, 825,
/* 140 */ 825, 825, 825, 846, 846, 846, 825, 825, 825, 846,
/* 150 */ 825, 846, 1039, 1043, 1037, 1025, 1033, 1024, 1020, 1018,
/* 160 */ 1016, 1015, 1047, 846, 846, 846, 885, 881, 881, 846,
/* 170 */ 846, 903, 901, 899, 891, 897, 893, 895, 889, 873,
/* 180 */ 825, 846, 879, 879, 846, 879, 846, 879, 846, 846,
/* 190 */ 925, 943, 825, 1048, 825, 1088, 1038, 1078, 1077, 1084,
/* 200 */ 1076, 1075, 1074, 825, 825, 825, 1070, 1071, 1073, 1072,
/* 210 */ 825, 825, 825, 1080, 1079, 825, 825, 825, 825, 825,
/* 220 */ 825, 825, 825, 825, 825, 825, 825, 825, 825, 1050,
/* 230 */ 825, 1044, 1040, 825, 825, 825, 825, 825, 825, 825,
/* 240 */ 825, 825, 825, 825, 825, 825, 955, 825, 825, 825,
/* 250 */ 825, 825, 825, 825, 825, 825, 825, 825, 825, 992,
/* 260 */ 825, 825, 825, 825, 825, 1004, 1003, 825, 825, 825,
/* 270 */ 825, 825, 825, 825, 825, 825, 825, 825, 1034, 825,
/* 280 */ 1026, 825, 825, 825, 825, 825, 967, 825, 825, 825,
/* 290 */ 825, 825, 825, 825, 825, 825, 825, 825, 825, 825,
/* 300 */ 825, 825, 825, 825, 1107, 1102, 1103, 1100, 825, 825,
/* 310 */ 825, 1099, 1094, 1095, 825, 825, 825, 1092, 825, 825,
/* 320 */ 825, 825, 825, 825, 825, 825, 825, 825, 825, 825,
/* 330 */ 825, 825, 825, 825, 825, 909, 825, 853, 851, 825,
/* 340 */ 842, 825,
};
/********** End of lemon-generated parsing tables *****************************/
......@@ -581,6 +582,7 @@ static const YYCODETYPE yyFallback[] = {
0, /* QTIME => nothing */
0, /* CONNS => nothing */
0, /* STATE => nothing */
0, /* COMMA => nothing */
0, /* KEEP => nothing */
0, /* CACHE => nothing */
0, /* REPLICA => nothing */
......@@ -602,7 +604,6 @@ static const YYCODETYPE yyFallback[] = {
0, /* UNSIGNED => nothing */
0, /* TAGS => nothing */
0, /* USING => nothing */
0, /* COMMA => nothing */
0, /* AS => nothing */
1, /* NULL => ID */
0, /* SELECT => nothing */
......@@ -856,28 +857,28 @@ static const char *const yyTokenName[] = {
/* 85 */ "QTIME",
/* 86 */ "CONNS",
/* 87 */ "STATE",
/* 88 */ "KEEP",
/* 89 */ "CACHE",
/* 90 */ "REPLICA",
/* 91 */ "QUORUM",
/* 92 */ "DAYS",
/* 93 */ "MINROWS",
/* 94 */ "MAXROWS",
/* 95 */ "BLOCKS",
/* 96 */ "CTIME",
/* 97 */ "WAL",
/* 98 */ "FSYNC",
/* 99 */ "COMP",
/* 100 */ "PRECISION",
/* 101 */ "UPDATE",
/* 102 */ "CACHELAST",
/* 103 */ "PARTITIONS",
/* 104 */ "LP",
/* 105 */ "RP",
/* 106 */ "UNSIGNED",
/* 107 */ "TAGS",
/* 108 */ "USING",
/* 109 */ "COMMA",
/* 88 */ "COMMA",
/* 89 */ "KEEP",
/* 90 */ "CACHE",
/* 91 */ "REPLICA",
/* 92 */ "QUORUM",
/* 93 */ "DAYS",
/* 94 */ "MINROWS",
/* 95 */ "MAXROWS",
/* 96 */ "BLOCKS",
/* 97 */ "CTIME",
/* 98 */ "WAL",
/* 99 */ "FSYNC",
/* 100 */ "COMP",
/* 101 */ "PRECISION",
/* 102 */ "UPDATE",
/* 103 */ "CACHELAST",
/* 104 */ "PARTITIONS",
/* 105 */ "LP",
/* 106 */ "RP",
/* 107 */ "UNSIGNED",
/* 108 */ "TAGS",
/* 109 */ "USING",
/* 110 */ "AS",
/* 111 */ "NULL",
/* 112 */ "SELECT",
......@@ -979,62 +980,64 @@ static const char *const yyTokenName[] = {
/* 208 */ "users",
/* 209 */ "conns",
/* 210 */ "state",
/* 211 */ "keep",
/* 212 */ "tagitemlist",
/* 213 */ "cache",
/* 214 */ "replica",
/* 215 */ "quorum",
/* 216 */ "days",
/* 217 */ "minrows",
/* 218 */ "maxrows",
/* 219 */ "blocks",
/* 220 */ "ctime",
/* 221 */ "wal",
/* 222 */ "fsync",
/* 223 */ "comp",
/* 224 */ "prec",
/* 225 */ "update",
/* 226 */ "cachelast",
/* 227 */ "partitions",
/* 228 */ "typename",
/* 229 */ "signed",
/* 230 */ "create_table_args",
/* 231 */ "create_stable_args",
/* 232 */ "create_table_list",
/* 233 */ "create_from_stable",
/* 234 */ "columnlist",
/* 235 */ "tagNamelist",
/* 236 */ "select",
/* 237 */ "column",
/* 238 */ "tagitem",
/* 239 */ "selcollist",
/* 240 */ "from",
/* 241 */ "where_opt",
/* 242 */ "interval_opt",
/* 243 */ "session_option",
/* 244 */ "windowstate_option",
/* 245 */ "fill_opt",
/* 246 */ "sliding_opt",
/* 247 */ "groupby_opt",
/* 248 */ "orderby_opt",
/* 249 */ "having_opt",
/* 250 */ "slimit_opt",
/* 251 */ "limit_opt",
/* 252 */ "union",
/* 253 */ "sclp",
/* 254 */ "distinct",
/* 255 */ "expr",
/* 256 */ "as",
/* 257 */ "tablelist",
/* 258 */ "sub",
/* 259 */ "tmvar",
/* 260 */ "sortlist",
/* 261 */ "sortitem",
/* 262 */ "item",
/* 263 */ "sortorder",
/* 264 */ "grouplist",
/* 265 */ "exprlist",
/* 266 */ "expritem",
/* 211 */ "intitemlist",
/* 212 */ "intitem",
/* 213 */ "keep",
/* 214 */ "cache",
/* 215 */ "replica",
/* 216 */ "quorum",
/* 217 */ "days",
/* 218 */ "minrows",
/* 219 */ "maxrows",
/* 220 */ "blocks",
/* 221 */ "ctime",
/* 222 */ "wal",
/* 223 */ "fsync",
/* 224 */ "comp",
/* 225 */ "prec",
/* 226 */ "update",
/* 227 */ "cachelast",
/* 228 */ "partitions",
/* 229 */ "typename",
/* 230 */ "signed",
/* 231 */ "create_table_args",
/* 232 */ "create_stable_args",
/* 233 */ "create_table_list",
/* 234 */ "create_from_stable",
/* 235 */ "columnlist",
/* 236 */ "tagitemlist",
/* 237 */ "tagNamelist",
/* 238 */ "select",
/* 239 */ "column",
/* 240 */ "tagitem",
/* 241 */ "selcollist",
/* 242 */ "from",
/* 243 */ "where_opt",
/* 244 */ "interval_opt",
/* 245 */ "session_option",
/* 246 */ "windowstate_option",
/* 247 */ "fill_opt",
/* 248 */ "sliding_opt",
/* 249 */ "groupby_opt",
/* 250 */ "orderby_opt",
/* 251 */ "having_opt",
/* 252 */ "slimit_opt",
/* 253 */ "limit_opt",
/* 254 */ "union",
/* 255 */ "sclp",
/* 256 */ "distinct",
/* 257 */ "expr",
/* 258 */ "as",
/* 259 */ "tablelist",
/* 260 */ "sub",
/* 261 */ "tmvar",
/* 262 */ "sortlist",
/* 263 */ "sortitem",
/* 264 */ "item",
/* 265 */ "sortorder",
/* 266 */ "grouplist",
/* 267 */ "exprlist",
/* 268 */ "expritem",
};
#endif /* defined(YYCOVERAGE) || !defined(NDEBUG) */
......@@ -1120,208 +1123,211 @@ static const char *const yyRuleName[] = {
/* 75 */ "state ::=",
/* 76 */ "state ::= STATE ids",
/* 77 */ "acct_optr ::= pps tseries storage streams qtime dbs users conns state",
/* 78 */ "keep ::= KEEP tagitemlist",
/* 79 */ "cache ::= CACHE INTEGER",
/* 80 */ "replica ::= REPLICA INTEGER",
/* 81 */ "quorum ::= QUORUM INTEGER",
/* 82 */ "days ::= DAYS INTEGER",
/* 83 */ "minrows ::= MINROWS INTEGER",
/* 84 */ "maxrows ::= MAXROWS INTEGER",
/* 85 */ "blocks ::= BLOCKS INTEGER",
/* 86 */ "ctime ::= CTIME INTEGER",
/* 87 */ "wal ::= WAL INTEGER",
/* 88 */ "fsync ::= FSYNC INTEGER",
/* 89 */ "comp ::= COMP INTEGER",
/* 90 */ "prec ::= PRECISION STRING",
/* 91 */ "update ::= UPDATE INTEGER",
/* 92 */ "cachelast ::= CACHELAST INTEGER",
/* 93 */ "partitions ::= PARTITIONS INTEGER",
/* 94 */ "db_optr ::=",
/* 95 */ "db_optr ::= db_optr cache",
/* 96 */ "db_optr ::= db_optr replica",
/* 97 */ "db_optr ::= db_optr quorum",
/* 98 */ "db_optr ::= db_optr days",
/* 99 */ "db_optr ::= db_optr minrows",
/* 100 */ "db_optr ::= db_optr maxrows",
/* 101 */ "db_optr ::= db_optr blocks",
/* 102 */ "db_optr ::= db_optr ctime",
/* 103 */ "db_optr ::= db_optr wal",
/* 104 */ "db_optr ::= db_optr fsync",
/* 105 */ "db_optr ::= db_optr comp",
/* 106 */ "db_optr ::= db_optr prec",
/* 107 */ "db_optr ::= db_optr keep",
/* 108 */ "db_optr ::= db_optr update",
/* 109 */ "db_optr ::= db_optr cachelast",
/* 110 */ "topic_optr ::= db_optr",
/* 111 */ "topic_optr ::= topic_optr partitions",
/* 112 */ "alter_db_optr ::=",
/* 113 */ "alter_db_optr ::= alter_db_optr replica",
/* 114 */ "alter_db_optr ::= alter_db_optr quorum",
/* 115 */ "alter_db_optr ::= alter_db_optr keep",
/* 116 */ "alter_db_optr ::= alter_db_optr blocks",
/* 117 */ "alter_db_optr ::= alter_db_optr comp",
/* 118 */ "alter_db_optr ::= alter_db_optr wal",
/* 119 */ "alter_db_optr ::= alter_db_optr fsync",
/* 120 */ "alter_db_optr ::= alter_db_optr update",
/* 121 */ "alter_db_optr ::= alter_db_optr cachelast",
/* 122 */ "alter_topic_optr ::= alter_db_optr",
/* 123 */ "alter_topic_optr ::= alter_topic_optr partitions",
/* 124 */ "typename ::= ids",
/* 125 */ "typename ::= ids LP signed RP",
/* 126 */ "typename ::= ids UNSIGNED",
/* 127 */ "signed ::= INTEGER",
/* 128 */ "signed ::= PLUS INTEGER",
/* 129 */ "signed ::= MINUS INTEGER",
/* 130 */ "cmd ::= CREATE TABLE create_table_args",
/* 131 */ "cmd ::= CREATE TABLE create_stable_args",
/* 132 */ "cmd ::= CREATE STABLE create_stable_args",
/* 133 */ "cmd ::= CREATE TABLE create_table_list",
/* 134 */ "create_table_list ::= create_from_stable",
/* 135 */ "create_table_list ::= create_table_list create_from_stable",
/* 136 */ "create_table_args ::= ifnotexists ids cpxName LP columnlist RP",
/* 137 */ "create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP",
/* 138 */ "create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP",
/* 139 */ "create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP",
/* 140 */ "tagNamelist ::= tagNamelist COMMA ids",
/* 141 */ "tagNamelist ::= ids",
/* 142 */ "create_table_args ::= ifnotexists ids cpxName AS select",
/* 143 */ "columnlist ::= columnlist COMMA column",
/* 144 */ "columnlist ::= column",
/* 145 */ "column ::= ids typename",
/* 146 */ "tagitemlist ::= tagitemlist COMMA tagitem",
/* 147 */ "tagitemlist ::= tagitem",
/* 148 */ "tagitem ::= INTEGER",
/* 149 */ "tagitem ::= FLOAT",
/* 150 */ "tagitem ::= STRING",
/* 151 */ "tagitem ::= BOOL",
/* 152 */ "tagitem ::= NULL",
/* 153 */ "tagitem ::= MINUS INTEGER",
/* 154 */ "tagitem ::= MINUS FLOAT",
/* 155 */ "tagitem ::= PLUS INTEGER",
/* 156 */ "tagitem ::= PLUS FLOAT",
/* 157 */ "select ::= SELECT selcollist from where_opt interval_opt session_option windowstate_option fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt",
/* 158 */ "select ::= LP select RP",
/* 159 */ "union ::= select",
/* 160 */ "union ::= union UNION ALL select",
/* 161 */ "cmd ::= union",
/* 162 */ "select ::= SELECT selcollist",
/* 163 */ "sclp ::= selcollist COMMA",
/* 164 */ "sclp ::=",
/* 165 */ "selcollist ::= sclp distinct expr as",
/* 166 */ "selcollist ::= sclp STAR",
/* 167 */ "as ::= AS ids",
/* 168 */ "as ::= ids",
/* 169 */ "as ::=",
/* 170 */ "distinct ::= DISTINCT",
/* 171 */ "distinct ::=",
/* 172 */ "from ::= FROM tablelist",
/* 173 */ "from ::= FROM sub",
/* 174 */ "sub ::= LP union RP",
/* 175 */ "sub ::= LP union RP ids",
/* 176 */ "sub ::= sub COMMA LP union RP ids",
/* 177 */ "tablelist ::= ids cpxName",
/* 178 */ "tablelist ::= ids cpxName ids",
/* 179 */ "tablelist ::= tablelist COMMA ids cpxName",
/* 180 */ "tablelist ::= tablelist COMMA ids cpxName ids",
/* 181 */ "tmvar ::= VARIABLE",
/* 182 */ "interval_opt ::= INTERVAL LP tmvar RP",
/* 183 */ "interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP",
/* 184 */ "interval_opt ::=",
/* 185 */ "session_option ::=",
/* 186 */ "session_option ::= SESSION LP ids cpxName COMMA tmvar RP",
/* 187 */ "windowstate_option ::=",
/* 188 */ "windowstate_option ::= STATE_WINDOW LP ids RP",
/* 189 */ "fill_opt ::=",
/* 190 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP",
/* 191 */ "fill_opt ::= FILL LP ID RP",
/* 192 */ "sliding_opt ::= SLIDING LP tmvar RP",
/* 193 */ "sliding_opt ::=",
/* 194 */ "orderby_opt ::=",
/* 195 */ "orderby_opt ::= ORDER BY sortlist",
/* 196 */ "sortlist ::= sortlist COMMA item sortorder",
/* 197 */ "sortlist ::= item sortorder",
/* 198 */ "item ::= ids cpxName",
/* 199 */ "sortorder ::= ASC",
/* 200 */ "sortorder ::= DESC",
/* 201 */ "sortorder ::=",
/* 202 */ "groupby_opt ::=",
/* 203 */ "groupby_opt ::= GROUP BY grouplist",
/* 204 */ "grouplist ::= grouplist COMMA item",
/* 205 */ "grouplist ::= item",
/* 206 */ "having_opt ::=",
/* 207 */ "having_opt ::= HAVING expr",
/* 208 */ "limit_opt ::=",
/* 209 */ "limit_opt ::= LIMIT signed",
/* 210 */ "limit_opt ::= LIMIT signed OFFSET signed",
/* 211 */ "limit_opt ::= LIMIT signed COMMA signed",
/* 212 */ "slimit_opt ::=",
/* 213 */ "slimit_opt ::= SLIMIT signed",
/* 214 */ "slimit_opt ::= SLIMIT signed SOFFSET signed",
/* 215 */ "slimit_opt ::= SLIMIT signed COMMA signed",
/* 216 */ "where_opt ::=",
/* 217 */ "where_opt ::= WHERE expr",
/* 218 */ "expr ::= LP expr RP",
/* 219 */ "expr ::= ID",
/* 220 */ "expr ::= ID DOT ID",
/* 221 */ "expr ::= ID DOT STAR",
/* 222 */ "expr ::= INTEGER",
/* 223 */ "expr ::= MINUS INTEGER",
/* 224 */ "expr ::= PLUS INTEGER",
/* 225 */ "expr ::= FLOAT",
/* 226 */ "expr ::= MINUS FLOAT",
/* 227 */ "expr ::= PLUS FLOAT",
/* 228 */ "expr ::= STRING",
/* 229 */ "expr ::= NOW",
/* 230 */ "expr ::= VARIABLE",
/* 231 */ "expr ::= PLUS VARIABLE",
/* 232 */ "expr ::= MINUS VARIABLE",
/* 233 */ "expr ::= BOOL",
/* 234 */ "expr ::= NULL",
/* 235 */ "expr ::= ID LP exprlist RP",
/* 236 */ "expr ::= ID LP STAR RP",
/* 237 */ "expr ::= expr IS NULL",
/* 238 */ "expr ::= expr IS NOT NULL",
/* 239 */ "expr ::= expr LT expr",
/* 240 */ "expr ::= expr GT expr",
/* 241 */ "expr ::= expr LE expr",
/* 242 */ "expr ::= expr GE expr",
/* 243 */ "expr ::= expr NE expr",
/* 244 */ "expr ::= expr EQ expr",
/* 245 */ "expr ::= expr BETWEEN expr AND expr",
/* 246 */ "expr ::= expr AND expr",
/* 247 */ "expr ::= expr OR expr",
/* 248 */ "expr ::= expr PLUS expr",
/* 249 */ "expr ::= expr MINUS expr",
/* 250 */ "expr ::= expr STAR expr",
/* 251 */ "expr ::= expr SLASH expr",
/* 252 */ "expr ::= expr REM expr",
/* 253 */ "expr ::= expr LIKE expr",
/* 254 */ "expr ::= expr IN LP exprlist RP",
/* 255 */ "exprlist ::= exprlist COMMA expritem",
/* 256 */ "exprlist ::= expritem",
/* 257 */ "expritem ::= expr",
/* 258 */ "expritem ::=",
/* 259 */ "cmd ::= RESET QUERY CACHE",
/* 260 */ "cmd ::= SYNCDB ids REPLICA",
/* 261 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist",
/* 262 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids",
/* 263 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist",
/* 264 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist",
/* 265 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids",
/* 266 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids",
/* 267 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem",
/* 268 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist",
/* 269 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist",
/* 270 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids",
/* 271 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist",
/* 272 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist",
/* 273 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids",
/* 274 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids",
/* 275 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem",
/* 276 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist",
/* 277 */ "cmd ::= KILL CONNECTION INTEGER",
/* 278 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER",
/* 279 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER",
/* 78 */ "intitemlist ::= intitemlist COMMA intitem",
/* 79 */ "intitemlist ::= intitem",
/* 80 */ "intitem ::= INTEGER",
/* 81 */ "keep ::= KEEP intitemlist",
/* 82 */ "cache ::= CACHE INTEGER",
/* 83 */ "replica ::= REPLICA INTEGER",
/* 84 */ "quorum ::= QUORUM INTEGER",
/* 85 */ "days ::= DAYS INTEGER",
/* 86 */ "minrows ::= MINROWS INTEGER",
/* 87 */ "maxrows ::= MAXROWS INTEGER",
/* 88 */ "blocks ::= BLOCKS INTEGER",
/* 89 */ "ctime ::= CTIME INTEGER",
/* 90 */ "wal ::= WAL INTEGER",
/* 91 */ "fsync ::= FSYNC INTEGER",
/* 92 */ "comp ::= COMP INTEGER",
/* 93 */ "prec ::= PRECISION STRING",
/* 94 */ "update ::= UPDATE INTEGER",
/* 95 */ "cachelast ::= CACHELAST INTEGER",
/* 96 */ "partitions ::= PARTITIONS INTEGER",
/* 97 */ "db_optr ::=",
/* 98 */ "db_optr ::= db_optr cache",
/* 99 */ "db_optr ::= db_optr replica",
/* 100 */ "db_optr ::= db_optr quorum",
/* 101 */ "db_optr ::= db_optr days",
/* 102 */ "db_optr ::= db_optr minrows",
/* 103 */ "db_optr ::= db_optr maxrows",
/* 104 */ "db_optr ::= db_optr blocks",
/* 105 */ "db_optr ::= db_optr ctime",
/* 106 */ "db_optr ::= db_optr wal",
/* 107 */ "db_optr ::= db_optr fsync",
/* 108 */ "db_optr ::= db_optr comp",
/* 109 */ "db_optr ::= db_optr prec",
/* 110 */ "db_optr ::= db_optr keep",
/* 111 */ "db_optr ::= db_optr update",
/* 112 */ "db_optr ::= db_optr cachelast",
/* 113 */ "topic_optr ::= db_optr",
/* 114 */ "topic_optr ::= topic_optr partitions",
/* 115 */ "alter_db_optr ::=",
/* 116 */ "alter_db_optr ::= alter_db_optr replica",
/* 117 */ "alter_db_optr ::= alter_db_optr quorum",
/* 118 */ "alter_db_optr ::= alter_db_optr keep",
/* 119 */ "alter_db_optr ::= alter_db_optr blocks",
/* 120 */ "alter_db_optr ::= alter_db_optr comp",
/* 121 */ "alter_db_optr ::= alter_db_optr wal",
/* 122 */ "alter_db_optr ::= alter_db_optr fsync",
/* 123 */ "alter_db_optr ::= alter_db_optr update",
/* 124 */ "alter_db_optr ::= alter_db_optr cachelast",
/* 125 */ "alter_topic_optr ::= alter_db_optr",
/* 126 */ "alter_topic_optr ::= alter_topic_optr partitions",
/* 127 */ "typename ::= ids",
/* 128 */ "typename ::= ids LP signed RP",
/* 129 */ "typename ::= ids UNSIGNED",
/* 130 */ "signed ::= INTEGER",
/* 131 */ "signed ::= PLUS INTEGER",
/* 132 */ "signed ::= MINUS INTEGER",
/* 133 */ "cmd ::= CREATE TABLE create_table_args",
/* 134 */ "cmd ::= CREATE TABLE create_stable_args",
/* 135 */ "cmd ::= CREATE STABLE create_stable_args",
/* 136 */ "cmd ::= CREATE TABLE create_table_list",
/* 137 */ "create_table_list ::= create_from_stable",
/* 138 */ "create_table_list ::= create_table_list create_from_stable",
/* 139 */ "create_table_args ::= ifnotexists ids cpxName LP columnlist RP",
/* 140 */ "create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP",
/* 141 */ "create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP",
/* 142 */ "create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP",
/* 143 */ "tagNamelist ::= tagNamelist COMMA ids",
/* 144 */ "tagNamelist ::= ids",
/* 145 */ "create_table_args ::= ifnotexists ids cpxName AS select",
/* 146 */ "columnlist ::= columnlist COMMA column",
/* 147 */ "columnlist ::= column",
/* 148 */ "column ::= ids typename",
/* 149 */ "tagitemlist ::= tagitemlist COMMA tagitem",
/* 150 */ "tagitemlist ::= tagitem",
/* 151 */ "tagitem ::= INTEGER",
/* 152 */ "tagitem ::= FLOAT",
/* 153 */ "tagitem ::= STRING",
/* 154 */ "tagitem ::= BOOL",
/* 155 */ "tagitem ::= NULL",
/* 156 */ "tagitem ::= MINUS INTEGER",
/* 157 */ "tagitem ::= MINUS FLOAT",
/* 158 */ "tagitem ::= PLUS INTEGER",
/* 159 */ "tagitem ::= PLUS FLOAT",
/* 160 */ "select ::= SELECT selcollist from where_opt interval_opt session_option windowstate_option fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt",
/* 161 */ "select ::= LP select RP",
/* 162 */ "union ::= select",
/* 163 */ "union ::= union UNION ALL select",
/* 164 */ "cmd ::= union",
/* 165 */ "select ::= SELECT selcollist",
/* 166 */ "sclp ::= selcollist COMMA",
/* 167 */ "sclp ::=",
/* 168 */ "selcollist ::= sclp distinct expr as",
/* 169 */ "selcollist ::= sclp STAR",
/* 170 */ "as ::= AS ids",
/* 171 */ "as ::= ids",
/* 172 */ "as ::=",
/* 173 */ "distinct ::= DISTINCT",
/* 174 */ "distinct ::=",
/* 175 */ "from ::= FROM tablelist",
/* 176 */ "from ::= FROM sub",
/* 177 */ "sub ::= LP union RP",
/* 178 */ "sub ::= LP union RP ids",
/* 179 */ "sub ::= sub COMMA LP union RP ids",
/* 180 */ "tablelist ::= ids cpxName",
/* 181 */ "tablelist ::= ids cpxName ids",
/* 182 */ "tablelist ::= tablelist COMMA ids cpxName",
/* 183 */ "tablelist ::= tablelist COMMA ids cpxName ids",
/* 184 */ "tmvar ::= VARIABLE",
/* 185 */ "interval_opt ::= INTERVAL LP tmvar RP",
/* 186 */ "interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP",
/* 187 */ "interval_opt ::=",
/* 188 */ "session_option ::=",
/* 189 */ "session_option ::= SESSION LP ids cpxName COMMA tmvar RP",
/* 190 */ "windowstate_option ::=",
/* 191 */ "windowstate_option ::= STATE_WINDOW LP ids RP",
/* 192 */ "fill_opt ::=",
/* 193 */ "fill_opt ::= FILL LP ID COMMA tagitemlist RP",
/* 194 */ "fill_opt ::= FILL LP ID RP",
/* 195 */ "sliding_opt ::= SLIDING LP tmvar RP",
/* 196 */ "sliding_opt ::=",
/* 197 */ "orderby_opt ::=",
/* 198 */ "orderby_opt ::= ORDER BY sortlist",
/* 199 */ "sortlist ::= sortlist COMMA item sortorder",
/* 200 */ "sortlist ::= item sortorder",
/* 201 */ "item ::= ids cpxName",
/* 202 */ "sortorder ::= ASC",
/* 203 */ "sortorder ::= DESC",
/* 204 */ "sortorder ::=",
/* 205 */ "groupby_opt ::=",
/* 206 */ "groupby_opt ::= GROUP BY grouplist",
/* 207 */ "grouplist ::= grouplist COMMA item",
/* 208 */ "grouplist ::= item",
/* 209 */ "having_opt ::=",
/* 210 */ "having_opt ::= HAVING expr",
/* 211 */ "limit_opt ::=",
/* 212 */ "limit_opt ::= LIMIT signed",
/* 213 */ "limit_opt ::= LIMIT signed OFFSET signed",
/* 214 */ "limit_opt ::= LIMIT signed COMMA signed",
/* 215 */ "slimit_opt ::=",
/* 216 */ "slimit_opt ::= SLIMIT signed",
/* 217 */ "slimit_opt ::= SLIMIT signed SOFFSET signed",
/* 218 */ "slimit_opt ::= SLIMIT signed COMMA signed",
/* 219 */ "where_opt ::=",
/* 220 */ "where_opt ::= WHERE expr",
/* 221 */ "expr ::= LP expr RP",
/* 222 */ "expr ::= ID",
/* 223 */ "expr ::= ID DOT ID",
/* 224 */ "expr ::= ID DOT STAR",
/* 225 */ "expr ::= INTEGER",
/* 226 */ "expr ::= MINUS INTEGER",
/* 227 */ "expr ::= PLUS INTEGER",
/* 228 */ "expr ::= FLOAT",
/* 229 */ "expr ::= MINUS FLOAT",
/* 230 */ "expr ::= PLUS FLOAT",
/* 231 */ "expr ::= STRING",
/* 232 */ "expr ::= NOW",
/* 233 */ "expr ::= VARIABLE",
/* 234 */ "expr ::= PLUS VARIABLE",
/* 235 */ "expr ::= MINUS VARIABLE",
/* 236 */ "expr ::= BOOL",
/* 237 */ "expr ::= NULL",
/* 238 */ "expr ::= ID LP exprlist RP",
/* 239 */ "expr ::= ID LP STAR RP",
/* 240 */ "expr ::= expr IS NULL",
/* 241 */ "expr ::= expr IS NOT NULL",
/* 242 */ "expr ::= expr LT expr",
/* 243 */ "expr ::= expr GT expr",
/* 244 */ "expr ::= expr LE expr",
/* 245 */ "expr ::= expr GE expr",
/* 246 */ "expr ::= expr NE expr",
/* 247 */ "expr ::= expr EQ expr",
/* 248 */ "expr ::= expr BETWEEN expr AND expr",
/* 249 */ "expr ::= expr AND expr",
/* 250 */ "expr ::= expr OR expr",
/* 251 */ "expr ::= expr PLUS expr",
/* 252 */ "expr ::= expr MINUS expr",
/* 253 */ "expr ::= expr STAR expr",
/* 254 */ "expr ::= expr SLASH expr",
/* 255 */ "expr ::= expr REM expr",
/* 256 */ "expr ::= expr LIKE expr",
/* 257 */ "expr ::= expr IN LP exprlist RP",
/* 258 */ "exprlist ::= exprlist COMMA expritem",
/* 259 */ "exprlist ::= expritem",
/* 260 */ "expritem ::= expr",
/* 261 */ "expritem ::=",
/* 262 */ "cmd ::= RESET QUERY CACHE",
/* 263 */ "cmd ::= SYNCDB ids REPLICA",
/* 264 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist",
/* 265 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids",
/* 266 */ "cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist",
/* 267 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist",
/* 268 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids",
/* 269 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids",
/* 270 */ "cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem",
/* 271 */ "cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist",
/* 272 */ "cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist",
/* 273 */ "cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids",
/* 274 */ "cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist",
/* 275 */ "cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist",
/* 276 */ "cmd ::= ALTER STABLE ids cpxName DROP TAG ids",
/* 277 */ "cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids",
/* 278 */ "cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem",
/* 279 */ "cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist",
/* 280 */ "cmd ::= KILL CONNECTION INTEGER",
/* 281 */ "cmd ::= KILL STREAM INTEGER COLON INTEGER",
/* 282 */ "cmd ::= KILL QUERY INTEGER COLON INTEGER",
};
#endif /* NDEBUG */
......@@ -1442,59 +1448,60 @@ static void yy_destructor(
** inside the C code.
*/
/********* Begin destructor definitions ***************************************/
case 211: /* keep */
case 212: /* tagitemlist */
case 234: /* columnlist */
case 235: /* tagNamelist */
case 245: /* fill_opt */
case 247: /* groupby_opt */
case 248: /* orderby_opt */
case 260: /* sortlist */
case 264: /* grouplist */
{
taosArrayDestroy((yypminor->yy15));
case 211: /* intitemlist */
case 213: /* keep */
case 235: /* columnlist */
case 236: /* tagitemlist */
case 237: /* tagNamelist */
case 247: /* fill_opt */
case 249: /* groupby_opt */
case 250: /* orderby_opt */
case 262: /* sortlist */
case 266: /* grouplist */
{
taosArrayDestroy((yypminor->yy93));
}
break;
case 232: /* create_table_list */
case 233: /* create_table_list */
{
destroyCreateTableSql((yypminor->yy482));
destroyCreateTableSql((yypminor->yy532));
}
break;
case 236: /* select */
case 238: /* select */
{
destroySqlNode((yypminor->yy134));
destroySqlNode((yypminor->yy224));
}
break;
case 239: /* selcollist */
case 253: /* sclp */
case 265: /* exprlist */
case 241: /* selcollist */
case 255: /* sclp */
case 267: /* exprlist */
{
tSqlExprListDestroy((yypminor->yy15));
tSqlExprListDestroy((yypminor->yy93));
}
break;
case 240: /* from */
case 257: /* tablelist */
case 258: /* sub */
case 242: /* from */
case 259: /* tablelist */
case 260: /* sub */
{
destroyRelationInfo((yypminor->yy160));
destroyRelationInfo((yypminor->yy330));
}
break;
case 241: /* where_opt */
case 249: /* having_opt */
case 255: /* expr */
case 266: /* expritem */
case 243: /* where_opt */
case 251: /* having_opt */
case 257: /* expr */
case 268: /* expritem */
{
tSqlExprDestroy((yypminor->yy328));
tSqlExprDestroy((yypminor->yy68));
}
break;
case 252: /* union */
case 254: /* union */
{
destroyAllSqlNode((yypminor->yy15));
destroyAllSqlNode((yypminor->yy93));
}
break;
case 261: /* sortitem */
case 263: /* sortitem */
{
tVariantDestroy(&(yypminor->yy380));
tVariantDestroy(&(yypminor->yy518));
}
break;
/********* End destructor definitions *****************************************/
......@@ -1866,208 +1873,211 @@ static const struct {
{ 210, 0 }, /* (75) state ::= */
{ 210, -2 }, /* (76) state ::= STATE ids */
{ 198, -9 }, /* (77) acct_optr ::= pps tseries storage streams qtime dbs users conns state */
{ 211, -2 }, /* (78) keep ::= KEEP tagitemlist */
{ 213, -2 }, /* (79) cache ::= CACHE INTEGER */
{ 214, -2 }, /* (80) replica ::= REPLICA INTEGER */
{ 215, -2 }, /* (81) quorum ::= QUORUM INTEGER */
{ 216, -2 }, /* (82) days ::= DAYS INTEGER */
{ 217, -2 }, /* (83) minrows ::= MINROWS INTEGER */
{ 218, -2 }, /* (84) maxrows ::= MAXROWS INTEGER */
{ 219, -2 }, /* (85) blocks ::= BLOCKS INTEGER */
{ 220, -2 }, /* (86) ctime ::= CTIME INTEGER */
{ 221, -2 }, /* (87) wal ::= WAL INTEGER */
{ 222, -2 }, /* (88) fsync ::= FSYNC INTEGER */
{ 223, -2 }, /* (89) comp ::= COMP INTEGER */
{ 224, -2 }, /* (90) prec ::= PRECISION STRING */
{ 225, -2 }, /* (91) update ::= UPDATE INTEGER */
{ 226, -2 }, /* (92) cachelast ::= CACHELAST INTEGER */
{ 227, -2 }, /* (93) partitions ::= PARTITIONS INTEGER */
{ 200, 0 }, /* (94) db_optr ::= */
{ 200, -2 }, /* (95) db_optr ::= db_optr cache */
{ 200, -2 }, /* (96) db_optr ::= db_optr replica */
{ 200, -2 }, /* (97) db_optr ::= db_optr quorum */
{ 200, -2 }, /* (98) db_optr ::= db_optr days */
{ 200, -2 }, /* (99) db_optr ::= db_optr minrows */
{ 200, -2 }, /* (100) db_optr ::= db_optr maxrows */
{ 200, -2 }, /* (101) db_optr ::= db_optr blocks */
{ 200, -2 }, /* (102) db_optr ::= db_optr ctime */
{ 200, -2 }, /* (103) db_optr ::= db_optr wal */
{ 200, -2 }, /* (104) db_optr ::= db_optr fsync */
{ 200, -2 }, /* (105) db_optr ::= db_optr comp */
{ 200, -2 }, /* (106) db_optr ::= db_optr prec */
{ 200, -2 }, /* (107) db_optr ::= db_optr keep */
{ 200, -2 }, /* (108) db_optr ::= db_optr update */
{ 200, -2 }, /* (109) db_optr ::= db_optr cachelast */
{ 201, -1 }, /* (110) topic_optr ::= db_optr */
{ 201, -2 }, /* (111) topic_optr ::= topic_optr partitions */
{ 196, 0 }, /* (112) alter_db_optr ::= */
{ 196, -2 }, /* (113) alter_db_optr ::= alter_db_optr replica */
{ 196, -2 }, /* (114) alter_db_optr ::= alter_db_optr quorum */
{ 196, -2 }, /* (115) alter_db_optr ::= alter_db_optr keep */
{ 196, -2 }, /* (116) alter_db_optr ::= alter_db_optr blocks */
{ 196, -2 }, /* (117) alter_db_optr ::= alter_db_optr comp */
{ 196, -2 }, /* (118) alter_db_optr ::= alter_db_optr wal */
{ 196, -2 }, /* (119) alter_db_optr ::= alter_db_optr fsync */
{ 196, -2 }, /* (120) alter_db_optr ::= alter_db_optr update */
{ 196, -2 }, /* (121) alter_db_optr ::= alter_db_optr cachelast */
{ 197, -1 }, /* (122) alter_topic_optr ::= alter_db_optr */
{ 197, -2 }, /* (123) alter_topic_optr ::= alter_topic_optr partitions */
{ 228, -1 }, /* (124) typename ::= ids */
{ 228, -4 }, /* (125) typename ::= ids LP signed RP */
{ 228, -2 }, /* (126) typename ::= ids UNSIGNED */
{ 229, -1 }, /* (127) signed ::= INTEGER */
{ 229, -2 }, /* (128) signed ::= PLUS INTEGER */
{ 229, -2 }, /* (129) signed ::= MINUS INTEGER */
{ 191, -3 }, /* (130) cmd ::= CREATE TABLE create_table_args */
{ 191, -3 }, /* (131) cmd ::= CREATE TABLE create_stable_args */
{ 191, -3 }, /* (132) cmd ::= CREATE STABLE create_stable_args */
{ 191, -3 }, /* (133) cmd ::= CREATE TABLE create_table_list */
{ 232, -1 }, /* (134) create_table_list ::= create_from_stable */
{ 232, -2 }, /* (135) create_table_list ::= create_table_list create_from_stable */
{ 230, -6 }, /* (136) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
{ 231, -10 }, /* (137) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
{ 233, -10 }, /* (138) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
{ 233, -13 }, /* (139) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */
{ 235, -3 }, /* (140) tagNamelist ::= tagNamelist COMMA ids */
{ 235, -1 }, /* (141) tagNamelist ::= ids */
{ 230, -5 }, /* (142) create_table_args ::= ifnotexists ids cpxName AS select */
{ 234, -3 }, /* (143) columnlist ::= columnlist COMMA column */
{ 234, -1 }, /* (144) columnlist ::= column */
{ 237, -2 }, /* (145) column ::= ids typename */
{ 212, -3 }, /* (146) tagitemlist ::= tagitemlist COMMA tagitem */
{ 212, -1 }, /* (147) tagitemlist ::= tagitem */
{ 238, -1 }, /* (148) tagitem ::= INTEGER */
{ 238, -1 }, /* (149) tagitem ::= FLOAT */
{ 238, -1 }, /* (150) tagitem ::= STRING */
{ 238, -1 }, /* (151) tagitem ::= BOOL */
{ 238, -1 }, /* (152) tagitem ::= NULL */
{ 238, -2 }, /* (153) tagitem ::= MINUS INTEGER */
{ 238, -2 }, /* (154) tagitem ::= MINUS FLOAT */
{ 238, -2 }, /* (155) tagitem ::= PLUS INTEGER */
{ 238, -2 }, /* (156) tagitem ::= PLUS FLOAT */
{ 236, -14 }, /* (157) select ::= SELECT selcollist from where_opt interval_opt session_option windowstate_option fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
{ 236, -3 }, /* (158) select ::= LP select RP */
{ 252, -1 }, /* (159) union ::= select */
{ 252, -4 }, /* (160) union ::= union UNION ALL select */
{ 191, -1 }, /* (161) cmd ::= union */
{ 236, -2 }, /* (162) select ::= SELECT selcollist */
{ 253, -2 }, /* (163) sclp ::= selcollist COMMA */
{ 253, 0 }, /* (164) sclp ::= */
{ 239, -4 }, /* (165) selcollist ::= sclp distinct expr as */
{ 239, -2 }, /* (166) selcollist ::= sclp STAR */
{ 256, -2 }, /* (167) as ::= AS ids */
{ 256, -1 }, /* (168) as ::= ids */
{ 256, 0 }, /* (169) as ::= */
{ 254, -1 }, /* (170) distinct ::= DISTINCT */
{ 254, 0 }, /* (171) distinct ::= */
{ 240, -2 }, /* (172) from ::= FROM tablelist */
{ 240, -2 }, /* (173) from ::= FROM sub */
{ 258, -3 }, /* (174) sub ::= LP union RP */
{ 258, -4 }, /* (175) sub ::= LP union RP ids */
{ 258, -6 }, /* (176) sub ::= sub COMMA LP union RP ids */
{ 257, -2 }, /* (177) tablelist ::= ids cpxName */
{ 257, -3 }, /* (178) tablelist ::= ids cpxName ids */
{ 257, -4 }, /* (179) tablelist ::= tablelist COMMA ids cpxName */
{ 257, -5 }, /* (180) tablelist ::= tablelist COMMA ids cpxName ids */
{ 259, -1 }, /* (181) tmvar ::= VARIABLE */
{ 242, -4 }, /* (182) interval_opt ::= INTERVAL LP tmvar RP */
{ 242, -6 }, /* (183) interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
{ 242, 0 }, /* (184) interval_opt ::= */
{ 243, 0 }, /* (185) session_option ::= */
{ 243, -7 }, /* (186) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
{ 244, 0 }, /* (187) windowstate_option ::= */
{ 244, -4 }, /* (188) windowstate_option ::= STATE_WINDOW LP ids RP */
{ 245, 0 }, /* (189) fill_opt ::= */
{ 245, -6 }, /* (190) fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{ 245, -4 }, /* (191) fill_opt ::= FILL LP ID RP */
{ 246, -4 }, /* (192) sliding_opt ::= SLIDING LP tmvar RP */
{ 246, 0 }, /* (193) sliding_opt ::= */
{ 248, 0 }, /* (194) orderby_opt ::= */
{ 248, -3 }, /* (195) orderby_opt ::= ORDER BY sortlist */
{ 260, -4 }, /* (196) sortlist ::= sortlist COMMA item sortorder */
{ 260, -2 }, /* (197) sortlist ::= item sortorder */
{ 262, -2 }, /* (198) item ::= ids cpxName */
{ 263, -1 }, /* (199) sortorder ::= ASC */
{ 263, -1 }, /* (200) sortorder ::= DESC */
{ 263, 0 }, /* (201) sortorder ::= */
{ 247, 0 }, /* (202) groupby_opt ::= */
{ 247, -3 }, /* (203) groupby_opt ::= GROUP BY grouplist */
{ 264, -3 }, /* (204) grouplist ::= grouplist COMMA item */
{ 264, -1 }, /* (205) grouplist ::= item */
{ 249, 0 }, /* (206) having_opt ::= */
{ 249, -2 }, /* (207) having_opt ::= HAVING expr */
{ 251, 0 }, /* (208) limit_opt ::= */
{ 251, -2 }, /* (209) limit_opt ::= LIMIT signed */
{ 251, -4 }, /* (210) limit_opt ::= LIMIT signed OFFSET signed */
{ 251, -4 }, /* (211) limit_opt ::= LIMIT signed COMMA signed */
{ 250, 0 }, /* (212) slimit_opt ::= */
{ 250, -2 }, /* (213) slimit_opt ::= SLIMIT signed */
{ 250, -4 }, /* (214) slimit_opt ::= SLIMIT signed SOFFSET signed */
{ 250, -4 }, /* (215) slimit_opt ::= SLIMIT signed COMMA signed */
{ 241, 0 }, /* (216) where_opt ::= */
{ 241, -2 }, /* (217) where_opt ::= WHERE expr */
{ 255, -3 }, /* (218) expr ::= LP expr RP */
{ 255, -1 }, /* (219) expr ::= ID */
{ 255, -3 }, /* (220) expr ::= ID DOT ID */
{ 255, -3 }, /* (221) expr ::= ID DOT STAR */
{ 255, -1 }, /* (222) expr ::= INTEGER */
{ 255, -2 }, /* (223) expr ::= MINUS INTEGER */
{ 255, -2 }, /* (224) expr ::= PLUS INTEGER */
{ 255, -1 }, /* (225) expr ::= FLOAT */
{ 255, -2 }, /* (226) expr ::= MINUS FLOAT */
{ 255, -2 }, /* (227) expr ::= PLUS FLOAT */
{ 255, -1 }, /* (228) expr ::= STRING */
{ 255, -1 }, /* (229) expr ::= NOW */
{ 255, -1 }, /* (230) expr ::= VARIABLE */
{ 255, -2 }, /* (231) expr ::= PLUS VARIABLE */
{ 255, -2 }, /* (232) expr ::= MINUS VARIABLE */
{ 255, -1 }, /* (233) expr ::= BOOL */
{ 255, -1 }, /* (234) expr ::= NULL */
{ 255, -4 }, /* (235) expr ::= ID LP exprlist RP */
{ 255, -4 }, /* (236) expr ::= ID LP STAR RP */
{ 255, -3 }, /* (237) expr ::= expr IS NULL */
{ 255, -4 }, /* (238) expr ::= expr IS NOT NULL */
{ 255, -3 }, /* (239) expr ::= expr LT expr */
{ 255, -3 }, /* (240) expr ::= expr GT expr */
{ 255, -3 }, /* (241) expr ::= expr LE expr */
{ 255, -3 }, /* (242) expr ::= expr GE expr */
{ 255, -3 }, /* (243) expr ::= expr NE expr */
{ 255, -3 }, /* (244) expr ::= expr EQ expr */
{ 255, -5 }, /* (245) expr ::= expr BETWEEN expr AND expr */
{ 255, -3 }, /* (246) expr ::= expr AND expr */
{ 255, -3 }, /* (247) expr ::= expr OR expr */
{ 255, -3 }, /* (248) expr ::= expr PLUS expr */
{ 255, -3 }, /* (249) expr ::= expr MINUS expr */
{ 255, -3 }, /* (250) expr ::= expr STAR expr */
{ 255, -3 }, /* (251) expr ::= expr SLASH expr */
{ 255, -3 }, /* (252) expr ::= expr REM expr */
{ 255, -3 }, /* (253) expr ::= expr LIKE expr */
{ 255, -5 }, /* (254) expr ::= expr IN LP exprlist RP */
{ 265, -3 }, /* (255) exprlist ::= exprlist COMMA expritem */
{ 265, -1 }, /* (256) exprlist ::= expritem */
{ 266, -1 }, /* (257) expritem ::= expr */
{ 266, 0 }, /* (258) expritem ::= */
{ 191, -3 }, /* (259) cmd ::= RESET QUERY CACHE */
{ 191, -3 }, /* (260) cmd ::= SYNCDB ids REPLICA */
{ 191, -7 }, /* (261) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{ 191, -7 }, /* (262) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{ 191, -7 }, /* (263) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
{ 191, -7 }, /* (264) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{ 191, -7 }, /* (265) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{ 191, -8 }, /* (266) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{ 191, -9 }, /* (267) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{ 191, -7 }, /* (268) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
{ 191, -7 }, /* (269) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
{ 191, -7 }, /* (270) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
{ 191, -7 }, /* (271) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
{ 191, -7 }, /* (272) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
{ 191, -7 }, /* (273) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
{ 191, -8 }, /* (274) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
{ 191, -9 }, /* (275) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
{ 191, -7 }, /* (276) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
{ 191, -3 }, /* (277) cmd ::= KILL CONNECTION INTEGER */
{ 191, -5 }, /* (278) cmd ::= KILL STREAM INTEGER COLON INTEGER */
{ 191, -5 }, /* (279) cmd ::= KILL QUERY INTEGER COLON INTEGER */
{ 211, -3 }, /* (78) intitemlist ::= intitemlist COMMA intitem */
{ 211, -1 }, /* (79) intitemlist ::= intitem */
{ 212, -1 }, /* (80) intitem ::= INTEGER */
{ 213, -2 }, /* (81) keep ::= KEEP intitemlist */
{ 214, -2 }, /* (82) cache ::= CACHE INTEGER */
{ 215, -2 }, /* (83) replica ::= REPLICA INTEGER */
{ 216, -2 }, /* (84) quorum ::= QUORUM INTEGER */
{ 217, -2 }, /* (85) days ::= DAYS INTEGER */
{ 218, -2 }, /* (86) minrows ::= MINROWS INTEGER */
{ 219, -2 }, /* (87) maxrows ::= MAXROWS INTEGER */
{ 220, -2 }, /* (88) blocks ::= BLOCKS INTEGER */
{ 221, -2 }, /* (89) ctime ::= CTIME INTEGER */
{ 222, -2 }, /* (90) wal ::= WAL INTEGER */
{ 223, -2 }, /* (91) fsync ::= FSYNC INTEGER */
{ 224, -2 }, /* (92) comp ::= COMP INTEGER */
{ 225, -2 }, /* (93) prec ::= PRECISION STRING */
{ 226, -2 }, /* (94) update ::= UPDATE INTEGER */
{ 227, -2 }, /* (95) cachelast ::= CACHELAST INTEGER */
{ 228, -2 }, /* (96) partitions ::= PARTITIONS INTEGER */
{ 200, 0 }, /* (97) db_optr ::= */
{ 200, -2 }, /* (98) db_optr ::= db_optr cache */
{ 200, -2 }, /* (99) db_optr ::= db_optr replica */
{ 200, -2 }, /* (100) db_optr ::= db_optr quorum */
{ 200, -2 }, /* (101) db_optr ::= db_optr days */
{ 200, -2 }, /* (102) db_optr ::= db_optr minrows */
{ 200, -2 }, /* (103) db_optr ::= db_optr maxrows */
{ 200, -2 }, /* (104) db_optr ::= db_optr blocks */
{ 200, -2 }, /* (105) db_optr ::= db_optr ctime */
{ 200, -2 }, /* (106) db_optr ::= db_optr wal */
{ 200, -2 }, /* (107) db_optr ::= db_optr fsync */
{ 200, -2 }, /* (108) db_optr ::= db_optr comp */
{ 200, -2 }, /* (109) db_optr ::= db_optr prec */
{ 200, -2 }, /* (110) db_optr ::= db_optr keep */
{ 200, -2 }, /* (111) db_optr ::= db_optr update */
{ 200, -2 }, /* (112) db_optr ::= db_optr cachelast */
{ 201, -1 }, /* (113) topic_optr ::= db_optr */
{ 201, -2 }, /* (114) topic_optr ::= topic_optr partitions */
{ 196, 0 }, /* (115) alter_db_optr ::= */
{ 196, -2 }, /* (116) alter_db_optr ::= alter_db_optr replica */
{ 196, -2 }, /* (117) alter_db_optr ::= alter_db_optr quorum */
{ 196, -2 }, /* (118) alter_db_optr ::= alter_db_optr keep */
{ 196, -2 }, /* (119) alter_db_optr ::= alter_db_optr blocks */
{ 196, -2 }, /* (120) alter_db_optr ::= alter_db_optr comp */
{ 196, -2 }, /* (121) alter_db_optr ::= alter_db_optr wal */
{ 196, -2 }, /* (122) alter_db_optr ::= alter_db_optr fsync */
{ 196, -2 }, /* (123) alter_db_optr ::= alter_db_optr update */
{ 196, -2 }, /* (124) alter_db_optr ::= alter_db_optr cachelast */
{ 197, -1 }, /* (125) alter_topic_optr ::= alter_db_optr */
{ 197, -2 }, /* (126) alter_topic_optr ::= alter_topic_optr partitions */
{ 229, -1 }, /* (127) typename ::= ids */
{ 229, -4 }, /* (128) typename ::= ids LP signed RP */
{ 229, -2 }, /* (129) typename ::= ids UNSIGNED */
{ 230, -1 }, /* (130) signed ::= INTEGER */
{ 230, -2 }, /* (131) signed ::= PLUS INTEGER */
{ 230, -2 }, /* (132) signed ::= MINUS INTEGER */
{ 191, -3 }, /* (133) cmd ::= CREATE TABLE create_table_args */
{ 191, -3 }, /* (134) cmd ::= CREATE TABLE create_stable_args */
{ 191, -3 }, /* (135) cmd ::= CREATE STABLE create_stable_args */
{ 191, -3 }, /* (136) cmd ::= CREATE TABLE create_table_list */
{ 233, -1 }, /* (137) create_table_list ::= create_from_stable */
{ 233, -2 }, /* (138) create_table_list ::= create_table_list create_from_stable */
{ 231, -6 }, /* (139) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
{ 232, -10 }, /* (140) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
{ 234, -10 }, /* (141) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
{ 234, -13 }, /* (142) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */
{ 237, -3 }, /* (143) tagNamelist ::= tagNamelist COMMA ids */
{ 237, -1 }, /* (144) tagNamelist ::= ids */
{ 231, -5 }, /* (145) create_table_args ::= ifnotexists ids cpxName AS select */
{ 235, -3 }, /* (146) columnlist ::= columnlist COMMA column */
{ 235, -1 }, /* (147) columnlist ::= column */
{ 239, -2 }, /* (148) column ::= ids typename */
{ 236, -3 }, /* (149) tagitemlist ::= tagitemlist COMMA tagitem */
{ 236, -1 }, /* (150) tagitemlist ::= tagitem */
{ 240, -1 }, /* (151) tagitem ::= INTEGER */
{ 240, -1 }, /* (152) tagitem ::= FLOAT */
{ 240, -1 }, /* (153) tagitem ::= STRING */
{ 240, -1 }, /* (154) tagitem ::= BOOL */
{ 240, -1 }, /* (155) tagitem ::= NULL */
{ 240, -2 }, /* (156) tagitem ::= MINUS INTEGER */
{ 240, -2 }, /* (157) tagitem ::= MINUS FLOAT */
{ 240, -2 }, /* (158) tagitem ::= PLUS INTEGER */
{ 240, -2 }, /* (159) tagitem ::= PLUS FLOAT */
{ 238, -14 }, /* (160) select ::= SELECT selcollist from where_opt interval_opt session_option windowstate_option fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
{ 238, -3 }, /* (161) select ::= LP select RP */
{ 254, -1 }, /* (162) union ::= select */
{ 254, -4 }, /* (163) union ::= union UNION ALL select */
{ 191, -1 }, /* (164) cmd ::= union */
{ 238, -2 }, /* (165) select ::= SELECT selcollist */
{ 255, -2 }, /* (166) sclp ::= selcollist COMMA */
{ 255, 0 }, /* (167) sclp ::= */
{ 241, -4 }, /* (168) selcollist ::= sclp distinct expr as */
{ 241, -2 }, /* (169) selcollist ::= sclp STAR */
{ 258, -2 }, /* (170) as ::= AS ids */
{ 258, -1 }, /* (171) as ::= ids */
{ 258, 0 }, /* (172) as ::= */
{ 256, -1 }, /* (173) distinct ::= DISTINCT */
{ 256, 0 }, /* (174) distinct ::= */
{ 242, -2 }, /* (175) from ::= FROM tablelist */
{ 242, -2 }, /* (176) from ::= FROM sub */
{ 260, -3 }, /* (177) sub ::= LP union RP */
{ 260, -4 }, /* (178) sub ::= LP union RP ids */
{ 260, -6 }, /* (179) sub ::= sub COMMA LP union RP ids */
{ 259, -2 }, /* (180) tablelist ::= ids cpxName */
{ 259, -3 }, /* (181) tablelist ::= ids cpxName ids */
{ 259, -4 }, /* (182) tablelist ::= tablelist COMMA ids cpxName */
{ 259, -5 }, /* (183) tablelist ::= tablelist COMMA ids cpxName ids */
{ 261, -1 }, /* (184) tmvar ::= VARIABLE */
{ 244, -4 }, /* (185) interval_opt ::= INTERVAL LP tmvar RP */
{ 244, -6 }, /* (186) interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
{ 244, 0 }, /* (187) interval_opt ::= */
{ 245, 0 }, /* (188) session_option ::= */
{ 245, -7 }, /* (189) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
{ 246, 0 }, /* (190) windowstate_option ::= */
{ 246, -4 }, /* (191) windowstate_option ::= STATE_WINDOW LP ids RP */
{ 247, 0 }, /* (192) fill_opt ::= */
{ 247, -6 }, /* (193) fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{ 247, -4 }, /* (194) fill_opt ::= FILL LP ID RP */
{ 248, -4 }, /* (195) sliding_opt ::= SLIDING LP tmvar RP */
{ 248, 0 }, /* (196) sliding_opt ::= */
{ 250, 0 }, /* (197) orderby_opt ::= */
{ 250, -3 }, /* (198) orderby_opt ::= ORDER BY sortlist */
{ 262, -4 }, /* (199) sortlist ::= sortlist COMMA item sortorder */
{ 262, -2 }, /* (200) sortlist ::= item sortorder */
{ 264, -2 }, /* (201) item ::= ids cpxName */
{ 265, -1 }, /* (202) sortorder ::= ASC */
{ 265, -1 }, /* (203) sortorder ::= DESC */
{ 265, 0 }, /* (204) sortorder ::= */
{ 249, 0 }, /* (205) groupby_opt ::= */
{ 249, -3 }, /* (206) groupby_opt ::= GROUP BY grouplist */
{ 266, -3 }, /* (207) grouplist ::= grouplist COMMA item */
{ 266, -1 }, /* (208) grouplist ::= item */
{ 251, 0 }, /* (209) having_opt ::= */
{ 251, -2 }, /* (210) having_opt ::= HAVING expr */
{ 253, 0 }, /* (211) limit_opt ::= */
{ 253, -2 }, /* (212) limit_opt ::= LIMIT signed */
{ 253, -4 }, /* (213) limit_opt ::= LIMIT signed OFFSET signed */
{ 253, -4 }, /* (214) limit_opt ::= LIMIT signed COMMA signed */
{ 252, 0 }, /* (215) slimit_opt ::= */
{ 252, -2 }, /* (216) slimit_opt ::= SLIMIT signed */
{ 252, -4 }, /* (217) slimit_opt ::= SLIMIT signed SOFFSET signed */
{ 252, -4 }, /* (218) slimit_opt ::= SLIMIT signed COMMA signed */
{ 243, 0 }, /* (219) where_opt ::= */
{ 243, -2 }, /* (220) where_opt ::= WHERE expr */
{ 257, -3 }, /* (221) expr ::= LP expr RP */
{ 257, -1 }, /* (222) expr ::= ID */
{ 257, -3 }, /* (223) expr ::= ID DOT ID */
{ 257, -3 }, /* (224) expr ::= ID DOT STAR */
{ 257, -1 }, /* (225) expr ::= INTEGER */
{ 257, -2 }, /* (226) expr ::= MINUS INTEGER */
{ 257, -2 }, /* (227) expr ::= PLUS INTEGER */
{ 257, -1 }, /* (228) expr ::= FLOAT */
{ 257, -2 }, /* (229) expr ::= MINUS FLOAT */
{ 257, -2 }, /* (230) expr ::= PLUS FLOAT */
{ 257, -1 }, /* (231) expr ::= STRING */
{ 257, -1 }, /* (232) expr ::= NOW */
{ 257, -1 }, /* (233) expr ::= VARIABLE */
{ 257, -2 }, /* (234) expr ::= PLUS VARIABLE */
{ 257, -2 }, /* (235) expr ::= MINUS VARIABLE */
{ 257, -1 }, /* (236) expr ::= BOOL */
{ 257, -1 }, /* (237) expr ::= NULL */
{ 257, -4 }, /* (238) expr ::= ID LP exprlist RP */
{ 257, -4 }, /* (239) expr ::= ID LP STAR RP */
{ 257, -3 }, /* (240) expr ::= expr IS NULL */
{ 257, -4 }, /* (241) expr ::= expr IS NOT NULL */
{ 257, -3 }, /* (242) expr ::= expr LT expr */
{ 257, -3 }, /* (243) expr ::= expr GT expr */
{ 257, -3 }, /* (244) expr ::= expr LE expr */
{ 257, -3 }, /* (245) expr ::= expr GE expr */
{ 257, -3 }, /* (246) expr ::= expr NE expr */
{ 257, -3 }, /* (247) expr ::= expr EQ expr */
{ 257, -5 }, /* (248) expr ::= expr BETWEEN expr AND expr */
{ 257, -3 }, /* (249) expr ::= expr AND expr */
{ 257, -3 }, /* (250) expr ::= expr OR expr */
{ 257, -3 }, /* (251) expr ::= expr PLUS expr */
{ 257, -3 }, /* (252) expr ::= expr MINUS expr */
{ 257, -3 }, /* (253) expr ::= expr STAR expr */
{ 257, -3 }, /* (254) expr ::= expr SLASH expr */
{ 257, -3 }, /* (255) expr ::= expr REM expr */
{ 257, -3 }, /* (256) expr ::= expr LIKE expr */
{ 257, -5 }, /* (257) expr ::= expr IN LP exprlist RP */
{ 267, -3 }, /* (258) exprlist ::= exprlist COMMA expritem */
{ 267, -1 }, /* (259) exprlist ::= expritem */
{ 268, -1 }, /* (260) expritem ::= expr */
{ 268, 0 }, /* (261) expritem ::= */
{ 191, -3 }, /* (262) cmd ::= RESET QUERY CACHE */
{ 191, -3 }, /* (263) cmd ::= SYNCDB ids REPLICA */
{ 191, -7 }, /* (264) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{ 191, -7 }, /* (265) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{ 191, -7 }, /* (266) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
{ 191, -7 }, /* (267) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{ 191, -7 }, /* (268) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{ 191, -8 }, /* (269) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{ 191, -9 }, /* (270) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{ 191, -7 }, /* (271) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
{ 191, -7 }, /* (272) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
{ 191, -7 }, /* (273) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
{ 191, -7 }, /* (274) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
{ 191, -7 }, /* (275) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
{ 191, -7 }, /* (276) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
{ 191, -8 }, /* (277) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
{ 191, -9 }, /* (278) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
{ 191, -7 }, /* (279) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
{ 191, -3 }, /* (280) cmd ::= KILL CONNECTION INTEGER */
{ 191, -5 }, /* (281) cmd ::= KILL STREAM INTEGER COLON INTEGER */
{ 191, -5 }, /* (282) cmd ::= KILL QUERY INTEGER COLON INTEGER */
};
static void yy_accept(yyParser*); /* Forward Declaration */
......@@ -2148,9 +2158,9 @@ static void yy_reduce(
/********** Begin reduce actions **********************************************/
YYMINORTYPE yylhsminor;
case 0: /* program ::= cmd */
case 130: /* cmd ::= CREATE TABLE create_table_args */ yytestcase(yyruleno==130);
case 131: /* cmd ::= CREATE TABLE create_stable_args */ yytestcase(yyruleno==131);
case 132: /* cmd ::= CREATE STABLE create_stable_args */ yytestcase(yyruleno==132);
case 133: /* cmd ::= CREATE TABLE create_table_args */ yytestcase(yyruleno==133);
case 134: /* cmd ::= CREATE TABLE create_stable_args */ yytestcase(yyruleno==134);
case 135: /* cmd ::= CREATE STABLE create_stable_args */ yytestcase(yyruleno==135);
{}
break;
case 1: /* cmd ::= SHOW DATABASES */
......@@ -2320,13 +2330,13 @@ static void yy_reduce(
break;
case 44: /* cmd ::= ALTER DATABASE ids alter_db_optr */
case 45: /* cmd ::= ALTER TOPIC ids alter_topic_optr */ yytestcase(yyruleno==45);
{ SStrToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy454, &t);}
{ SStrToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy372, &t);}
break;
case 46: /* cmd ::= ALTER ACCOUNT ids acct_optr */
{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy397);}
{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-1].minor.yy0, NULL, &yymsp[0].minor.yy77);}
break;
case 47: /* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy397);}
{ setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy77);}
break;
case 48: /* ids ::= ID */
case 49: /* ids ::= STRING */ yytestcase(yyruleno==49);
......@@ -2338,7 +2348,7 @@ static void yy_reduce(
break;
case 51: /* ifexists ::= */
case 53: /* ifnotexists ::= */ yytestcase(yyruleno==53);
case 171: /* distinct ::= */ yytestcase(yyruleno==171);
case 174: /* distinct ::= */ yytestcase(yyruleno==174);
{ yymsp[1].minor.yy0.n = 0;}
break;
case 52: /* ifnotexists ::= IF NOT EXISTS */
......@@ -2348,11 +2358,11 @@ static void yy_reduce(
{ setDCLSqlElems(pInfo, TSDB_SQL_CREATE_DNODE, 1, &yymsp[0].minor.yy0);}
break;
case 55: /* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
{ setCreateAcctSql(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy397);}
{ setCreateAcctSql(pInfo, TSDB_SQL_CREATE_ACCT, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy77);}
break;
case 56: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */
case 57: /* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */ yytestcase(yyruleno==57);
{ setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy454, &yymsp[-2].minor.yy0);}
{ setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy372, &yymsp[-2].minor.yy0);}
break;
case 58: /* cmd ::= CREATE USER ids PASS ids */
{ setCreateUserSql(pInfo, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);}
......@@ -2381,682 +2391,685 @@ static void yy_reduce(
break;
case 77: /* acct_optr ::= pps tseries storage streams qtime dbs users conns state */
{
yylhsminor.yy397.maxUsers = (yymsp[-2].minor.yy0.n>0)?atoi(yymsp[-2].minor.yy0.z):-1;
yylhsminor.yy397.maxDbs = (yymsp[-3].minor.yy0.n>0)?atoi(yymsp[-3].minor.yy0.z):-1;
yylhsminor.yy397.maxTimeSeries = (yymsp[-7].minor.yy0.n>0)?atoi(yymsp[-7].minor.yy0.z):-1;
yylhsminor.yy397.maxStreams = (yymsp[-5].minor.yy0.n>0)?atoi(yymsp[-5].minor.yy0.z):-1;
yylhsminor.yy397.maxPointsPerSecond = (yymsp[-8].minor.yy0.n>0)?atoi(yymsp[-8].minor.yy0.z):-1;
yylhsminor.yy397.maxStorage = (yymsp[-6].minor.yy0.n>0)?strtoll(yymsp[-6].minor.yy0.z, NULL, 10):-1;
yylhsminor.yy397.maxQueryTime = (yymsp[-4].minor.yy0.n>0)?strtoll(yymsp[-4].minor.yy0.z, NULL, 10):-1;
yylhsminor.yy397.maxConnections = (yymsp[-1].minor.yy0.n>0)?atoi(yymsp[-1].minor.yy0.z):-1;
yylhsminor.yy397.stat = yymsp[0].minor.yy0;
}
yymsp[-8].minor.yy397 = yylhsminor.yy397;
break;
case 78: /* keep ::= KEEP tagitemlist */
{ yymsp[-1].minor.yy15 = yymsp[0].minor.yy15; }
break;
case 79: /* cache ::= CACHE INTEGER */
case 80: /* replica ::= REPLICA INTEGER */ yytestcase(yyruleno==80);
case 81: /* quorum ::= QUORUM INTEGER */ yytestcase(yyruleno==81);
case 82: /* days ::= DAYS INTEGER */ yytestcase(yyruleno==82);
case 83: /* minrows ::= MINROWS INTEGER */ yytestcase(yyruleno==83);
case 84: /* maxrows ::= MAXROWS INTEGER */ yytestcase(yyruleno==84);
case 85: /* blocks ::= BLOCKS INTEGER */ yytestcase(yyruleno==85);
case 86: /* ctime ::= CTIME INTEGER */ yytestcase(yyruleno==86);
case 87: /* wal ::= WAL INTEGER */ yytestcase(yyruleno==87);
case 88: /* fsync ::= FSYNC INTEGER */ yytestcase(yyruleno==88);
case 89: /* comp ::= COMP INTEGER */ yytestcase(yyruleno==89);
case 90: /* prec ::= PRECISION STRING */ yytestcase(yyruleno==90);
case 91: /* update ::= UPDATE INTEGER */ yytestcase(yyruleno==91);
case 92: /* cachelast ::= CACHELAST INTEGER */ yytestcase(yyruleno==92);
case 93: /* partitions ::= PARTITIONS INTEGER */ yytestcase(yyruleno==93);
yylhsminor.yy77.maxUsers = (yymsp[-2].minor.yy0.n>0)?atoi(yymsp[-2].minor.yy0.z):-1;
yylhsminor.yy77.maxDbs = (yymsp[-3].minor.yy0.n>0)?atoi(yymsp[-3].minor.yy0.z):-1;
yylhsminor.yy77.maxTimeSeries = (yymsp[-7].minor.yy0.n>0)?atoi(yymsp[-7].minor.yy0.z):-1;
yylhsminor.yy77.maxStreams = (yymsp[-5].minor.yy0.n>0)?atoi(yymsp[-5].minor.yy0.z):-1;
yylhsminor.yy77.maxPointsPerSecond = (yymsp[-8].minor.yy0.n>0)?atoi(yymsp[-8].minor.yy0.z):-1;
yylhsminor.yy77.maxStorage = (yymsp[-6].minor.yy0.n>0)?strtoll(yymsp[-6].minor.yy0.z, NULL, 10):-1;
yylhsminor.yy77.maxQueryTime = (yymsp[-4].minor.yy0.n>0)?strtoll(yymsp[-4].minor.yy0.z, NULL, 10):-1;
yylhsminor.yy77.maxConnections = (yymsp[-1].minor.yy0.n>0)?atoi(yymsp[-1].minor.yy0.z):-1;
yylhsminor.yy77.stat = yymsp[0].minor.yy0;
}
yymsp[-8].minor.yy77 = yylhsminor.yy77;
break;
case 78: /* intitemlist ::= intitemlist COMMA intitem */
case 149: /* tagitemlist ::= tagitemlist COMMA tagitem */ yytestcase(yyruleno==149);
{ yylhsminor.yy93 = tVariantListAppend(yymsp[-2].minor.yy93, &yymsp[0].minor.yy518, -1); }
yymsp[-2].minor.yy93 = yylhsminor.yy93;
break;
case 79: /* intitemlist ::= intitem */
case 150: /* tagitemlist ::= tagitem */ yytestcase(yyruleno==150);
{ yylhsminor.yy93 = tVariantListAppend(NULL, &yymsp[0].minor.yy518, -1); }
yymsp[0].minor.yy93 = yylhsminor.yy93;
break;
case 80: /* intitem ::= INTEGER */
case 151: /* tagitem ::= INTEGER */ yytestcase(yyruleno==151);
case 152: /* tagitem ::= FLOAT */ yytestcase(yyruleno==152);
case 153: /* tagitem ::= STRING */ yytestcase(yyruleno==153);
case 154: /* tagitem ::= BOOL */ yytestcase(yyruleno==154);
{ toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy518, &yymsp[0].minor.yy0); }
yymsp[0].minor.yy518 = yylhsminor.yy518;
break;
case 81: /* keep ::= KEEP intitemlist */
{ yymsp[-1].minor.yy93 = yymsp[0].minor.yy93; }
break;
case 82: /* cache ::= CACHE INTEGER */
case 83: /* replica ::= REPLICA INTEGER */ yytestcase(yyruleno==83);
case 84: /* quorum ::= QUORUM INTEGER */ yytestcase(yyruleno==84);
case 85: /* days ::= DAYS INTEGER */ yytestcase(yyruleno==85);
case 86: /* minrows ::= MINROWS INTEGER */ yytestcase(yyruleno==86);
case 87: /* maxrows ::= MAXROWS INTEGER */ yytestcase(yyruleno==87);
case 88: /* blocks ::= BLOCKS INTEGER */ yytestcase(yyruleno==88);
case 89: /* ctime ::= CTIME INTEGER */ yytestcase(yyruleno==89);
case 90: /* wal ::= WAL INTEGER */ yytestcase(yyruleno==90);
case 91: /* fsync ::= FSYNC INTEGER */ yytestcase(yyruleno==91);
case 92: /* comp ::= COMP INTEGER */ yytestcase(yyruleno==92);
case 93: /* prec ::= PRECISION STRING */ yytestcase(yyruleno==93);
case 94: /* update ::= UPDATE INTEGER */ yytestcase(yyruleno==94);
case 95: /* cachelast ::= CACHELAST INTEGER */ yytestcase(yyruleno==95);
case 96: /* partitions ::= PARTITIONS INTEGER */ yytestcase(yyruleno==96);
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
break;
case 94: /* db_optr ::= */
{setDefaultCreateDbOption(&yymsp[1].minor.yy454); yymsp[1].minor.yy454.dbType = TSDB_DB_TYPE_DEFAULT;}
break;
case 95: /* db_optr ::= db_optr cache */
{ yylhsminor.yy454 = yymsp[-1].minor.yy454; yylhsminor.yy454.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy454 = yylhsminor.yy454;
break;
case 96: /* db_optr ::= db_optr replica */
case 113: /* alter_db_optr ::= alter_db_optr replica */ yytestcase(yyruleno==113);
{ yylhsminor.yy454 = yymsp[-1].minor.yy454; yylhsminor.yy454.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy454 = yylhsminor.yy454;
break;
case 97: /* db_optr ::= db_optr quorum */
case 114: /* alter_db_optr ::= alter_db_optr quorum */ yytestcase(yyruleno==114);
{ yylhsminor.yy454 = yymsp[-1].minor.yy454; yylhsminor.yy454.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy454 = yylhsminor.yy454;
break;
case 98: /* db_optr ::= db_optr days */
{ yylhsminor.yy454 = yymsp[-1].minor.yy454; yylhsminor.yy454.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy454 = yylhsminor.yy454;
break;
case 99: /* db_optr ::= db_optr minrows */
{ yylhsminor.yy454 = yymsp[-1].minor.yy454; yylhsminor.yy454.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); }
yymsp[-1].minor.yy454 = yylhsminor.yy454;
break;
case 100: /* db_optr ::= db_optr maxrows */
{ yylhsminor.yy454 = yymsp[-1].minor.yy454; yylhsminor.yy454.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); }
yymsp[-1].minor.yy454 = yylhsminor.yy454;
break;
case 101: /* db_optr ::= db_optr blocks */
case 116: /* alter_db_optr ::= alter_db_optr blocks */ yytestcase(yyruleno==116);
{ yylhsminor.yy454 = yymsp[-1].minor.yy454; yylhsminor.yy454.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy454 = yylhsminor.yy454;
break;
case 102: /* db_optr ::= db_optr ctime */
{ yylhsminor.yy454 = yymsp[-1].minor.yy454; yylhsminor.yy454.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy454 = yylhsminor.yy454;
break;
case 103: /* db_optr ::= db_optr wal */
case 118: /* alter_db_optr ::= alter_db_optr wal */ yytestcase(yyruleno==118);
{ yylhsminor.yy454 = yymsp[-1].minor.yy454; yylhsminor.yy454.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy454 = yylhsminor.yy454;
break;
case 104: /* db_optr ::= db_optr fsync */
case 119: /* alter_db_optr ::= alter_db_optr fsync */ yytestcase(yyruleno==119);
{ yylhsminor.yy454 = yymsp[-1].minor.yy454; yylhsminor.yy454.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy454 = yylhsminor.yy454;
break;
case 105: /* db_optr ::= db_optr comp */
case 117: /* alter_db_optr ::= alter_db_optr comp */ yytestcase(yyruleno==117);
{ yylhsminor.yy454 = yymsp[-1].minor.yy454; yylhsminor.yy454.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy454 = yylhsminor.yy454;
break;
case 106: /* db_optr ::= db_optr prec */
{ yylhsminor.yy454 = yymsp[-1].minor.yy454; yylhsminor.yy454.precision = yymsp[0].minor.yy0; }
yymsp[-1].minor.yy454 = yylhsminor.yy454;
break;
case 107: /* db_optr ::= db_optr keep */
case 115: /* alter_db_optr ::= alter_db_optr keep */ yytestcase(yyruleno==115);
{ yylhsminor.yy454 = yymsp[-1].minor.yy454; yylhsminor.yy454.keep = yymsp[0].minor.yy15; }
yymsp[-1].minor.yy454 = yylhsminor.yy454;
break;
case 108: /* db_optr ::= db_optr update */
case 120: /* alter_db_optr ::= alter_db_optr update */ yytestcase(yyruleno==120);
{ yylhsminor.yy454 = yymsp[-1].minor.yy454; yylhsminor.yy454.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy454 = yylhsminor.yy454;
break;
case 109: /* db_optr ::= db_optr cachelast */
case 121: /* alter_db_optr ::= alter_db_optr cachelast */ yytestcase(yyruleno==121);
{ yylhsminor.yy454 = yymsp[-1].minor.yy454; yylhsminor.yy454.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy454 = yylhsminor.yy454;
break;
case 110: /* topic_optr ::= db_optr */
case 122: /* alter_topic_optr ::= alter_db_optr */ yytestcase(yyruleno==122);
{ yylhsminor.yy454 = yymsp[0].minor.yy454; yylhsminor.yy454.dbType = TSDB_DB_TYPE_TOPIC; }
yymsp[0].minor.yy454 = yylhsminor.yy454;
break;
case 111: /* topic_optr ::= topic_optr partitions */
case 123: /* alter_topic_optr ::= alter_topic_optr partitions */ yytestcase(yyruleno==123);
{ yylhsminor.yy454 = yymsp[-1].minor.yy454; yylhsminor.yy454.partitions = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy454 = yylhsminor.yy454;
break;
case 112: /* alter_db_optr ::= */
{ setDefaultCreateDbOption(&yymsp[1].minor.yy454); yymsp[1].minor.yy454.dbType = TSDB_DB_TYPE_DEFAULT;}
break;
case 124: /* typename ::= ids */
case 97: /* db_optr ::= */
{setDefaultCreateDbOption(&yymsp[1].minor.yy372); yymsp[1].minor.yy372.dbType = TSDB_DB_TYPE_DEFAULT;}
break;
case 98: /* db_optr ::= db_optr cache */
{ yylhsminor.yy372 = yymsp[-1].minor.yy372; yylhsminor.yy372.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy372 = yylhsminor.yy372;
break;
case 99: /* db_optr ::= db_optr replica */
case 116: /* alter_db_optr ::= alter_db_optr replica */ yytestcase(yyruleno==116);
{ yylhsminor.yy372 = yymsp[-1].minor.yy372; yylhsminor.yy372.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy372 = yylhsminor.yy372;
break;
case 100: /* db_optr ::= db_optr quorum */
case 117: /* alter_db_optr ::= alter_db_optr quorum */ yytestcase(yyruleno==117);
{ yylhsminor.yy372 = yymsp[-1].minor.yy372; yylhsminor.yy372.quorum = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy372 = yylhsminor.yy372;
break;
case 101: /* db_optr ::= db_optr days */
{ yylhsminor.yy372 = yymsp[-1].minor.yy372; yylhsminor.yy372.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy372 = yylhsminor.yy372;
break;
case 102: /* db_optr ::= db_optr minrows */
{ yylhsminor.yy372 = yymsp[-1].minor.yy372; yylhsminor.yy372.minRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); }
yymsp[-1].minor.yy372 = yylhsminor.yy372;
break;
case 103: /* db_optr ::= db_optr maxrows */
{ yylhsminor.yy372 = yymsp[-1].minor.yy372; yylhsminor.yy372.maxRowsPerBlock = strtod(yymsp[0].minor.yy0.z, NULL); }
yymsp[-1].minor.yy372 = yylhsminor.yy372;
break;
case 104: /* db_optr ::= db_optr blocks */
case 119: /* alter_db_optr ::= alter_db_optr blocks */ yytestcase(yyruleno==119);
{ yylhsminor.yy372 = yymsp[-1].minor.yy372; yylhsminor.yy372.numOfBlocks = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy372 = yylhsminor.yy372;
break;
case 105: /* db_optr ::= db_optr ctime */
{ yylhsminor.yy372 = yymsp[-1].minor.yy372; yylhsminor.yy372.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy372 = yylhsminor.yy372;
break;
case 106: /* db_optr ::= db_optr wal */
case 121: /* alter_db_optr ::= alter_db_optr wal */ yytestcase(yyruleno==121);
{ yylhsminor.yy372 = yymsp[-1].minor.yy372; yylhsminor.yy372.walLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy372 = yylhsminor.yy372;
break;
case 107: /* db_optr ::= db_optr fsync */
case 122: /* alter_db_optr ::= alter_db_optr fsync */ yytestcase(yyruleno==122);
{ yylhsminor.yy372 = yymsp[-1].minor.yy372; yylhsminor.yy372.fsyncPeriod = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy372 = yylhsminor.yy372;
break;
case 108: /* db_optr ::= db_optr comp */
case 120: /* alter_db_optr ::= alter_db_optr comp */ yytestcase(yyruleno==120);
{ yylhsminor.yy372 = yymsp[-1].minor.yy372; yylhsminor.yy372.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy372 = yylhsminor.yy372;
break;
case 109: /* db_optr ::= db_optr prec */
{ yylhsminor.yy372 = yymsp[-1].minor.yy372; yylhsminor.yy372.precision = yymsp[0].minor.yy0; }
yymsp[-1].minor.yy372 = yylhsminor.yy372;
break;
case 110: /* db_optr ::= db_optr keep */
case 118: /* alter_db_optr ::= alter_db_optr keep */ yytestcase(yyruleno==118);
{ yylhsminor.yy372 = yymsp[-1].minor.yy372; yylhsminor.yy372.keep = yymsp[0].minor.yy93; }
yymsp[-1].minor.yy372 = yylhsminor.yy372;
break;
case 111: /* db_optr ::= db_optr update */
case 123: /* alter_db_optr ::= alter_db_optr update */ yytestcase(yyruleno==123);
{ yylhsminor.yy372 = yymsp[-1].minor.yy372; yylhsminor.yy372.update = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy372 = yylhsminor.yy372;
break;
case 112: /* db_optr ::= db_optr cachelast */
case 124: /* alter_db_optr ::= alter_db_optr cachelast */ yytestcase(yyruleno==124);
{ yylhsminor.yy372 = yymsp[-1].minor.yy372; yylhsminor.yy372.cachelast = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy372 = yylhsminor.yy372;
break;
case 113: /* topic_optr ::= db_optr */
case 125: /* alter_topic_optr ::= alter_db_optr */ yytestcase(yyruleno==125);
{ yylhsminor.yy372 = yymsp[0].minor.yy372; yylhsminor.yy372.dbType = TSDB_DB_TYPE_TOPIC; }
yymsp[0].minor.yy372 = yylhsminor.yy372;
break;
case 114: /* topic_optr ::= topic_optr partitions */
case 126: /* alter_topic_optr ::= alter_topic_optr partitions */ yytestcase(yyruleno==126);
{ yylhsminor.yy372 = yymsp[-1].minor.yy372; yylhsminor.yy372.partitions = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[-1].minor.yy372 = yylhsminor.yy372;
break;
case 115: /* alter_db_optr ::= */
{ setDefaultCreateDbOption(&yymsp[1].minor.yy372); yymsp[1].minor.yy372.dbType = TSDB_DB_TYPE_DEFAULT;}
break;
case 127: /* typename ::= ids */
{
yymsp[0].minor.yy0.type = 0;
tSetColumnType (&yylhsminor.yy505, &yymsp[0].minor.yy0);
tSetColumnType (&yylhsminor.yy325, &yymsp[0].minor.yy0);
}
yymsp[0].minor.yy505 = yylhsminor.yy505;
yymsp[0].minor.yy325 = yylhsminor.yy325;
break;
case 125: /* typename ::= ids LP signed RP */
case 128: /* typename ::= ids LP signed RP */
{
if (yymsp[-1].minor.yy489 <= 0) {
if (yymsp[-1].minor.yy279 <= 0) {
yymsp[-3].minor.yy0.type = 0;
tSetColumnType(&yylhsminor.yy505, &yymsp[-3].minor.yy0);
tSetColumnType(&yylhsminor.yy325, &yymsp[-3].minor.yy0);
} else {
yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy489; // negative value of name length
tSetColumnType(&yylhsminor.yy505, &yymsp[-3].minor.yy0);
yymsp[-3].minor.yy0.type = -yymsp[-1].minor.yy279; // negative value of name length
tSetColumnType(&yylhsminor.yy325, &yymsp[-3].minor.yy0);
}
}
yymsp[-3].minor.yy505 = yylhsminor.yy505;
yymsp[-3].minor.yy325 = yylhsminor.yy325;
break;
case 126: /* typename ::= ids UNSIGNED */
case 129: /* typename ::= ids UNSIGNED */
{
yymsp[-1].minor.yy0.type = 0;
yymsp[-1].minor.yy0.n = ((yymsp[0].minor.yy0.z + yymsp[0].minor.yy0.n) - yymsp[-1].minor.yy0.z);
tSetColumnType (&yylhsminor.yy505, &yymsp[-1].minor.yy0);
tSetColumnType (&yylhsminor.yy325, &yymsp[-1].minor.yy0);
}
yymsp[-1].minor.yy505 = yylhsminor.yy505;
yymsp[-1].minor.yy325 = yylhsminor.yy325;
break;
case 127: /* signed ::= INTEGER */
{ yylhsminor.yy489 = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[0].minor.yy489 = yylhsminor.yy489;
case 130: /* signed ::= INTEGER */
{ yylhsminor.yy279 = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
yymsp[0].minor.yy279 = yylhsminor.yy279;
break;
case 128: /* signed ::= PLUS INTEGER */
{ yymsp[-1].minor.yy489 = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
case 131: /* signed ::= PLUS INTEGER */
{ yymsp[-1].minor.yy279 = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
break;
case 129: /* signed ::= MINUS INTEGER */
{ yymsp[-1].minor.yy489 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);}
case 132: /* signed ::= MINUS INTEGER */
{ yymsp[-1].minor.yy279 = -strtol(yymsp[0].minor.yy0.z, NULL, 10);}
break;
case 133: /* cmd ::= CREATE TABLE create_table_list */
{ pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy482;}
case 136: /* cmd ::= CREATE TABLE create_table_list */
{ pInfo->type = TSDB_SQL_CREATE_TABLE; pInfo->pCreateTableInfo = yymsp[0].minor.yy532;}
break;
case 134: /* create_table_list ::= create_from_stable */
case 137: /* create_table_list ::= create_from_stable */
{
SCreateTableSql* pCreateTable = calloc(1, sizeof(SCreateTableSql));
pCreateTable->childTableInfo = taosArrayInit(4, sizeof(SCreatedTableInfo));
taosArrayPush(pCreateTable->childTableInfo, &yymsp[0].minor.yy390);
taosArrayPush(pCreateTable->childTableInfo, &yymsp[0].minor.yy528);
pCreateTable->type = TSQL_CREATE_TABLE_FROM_STABLE;
yylhsminor.yy482 = pCreateTable;
yylhsminor.yy532 = pCreateTable;
}
yymsp[0].minor.yy482 = yylhsminor.yy482;
yymsp[0].minor.yy532 = yylhsminor.yy532;
break;
case 135: /* create_table_list ::= create_table_list create_from_stable */
case 138: /* create_table_list ::= create_table_list create_from_stable */
{
taosArrayPush(yymsp[-1].minor.yy482->childTableInfo, &yymsp[0].minor.yy390);
yylhsminor.yy482 = yymsp[-1].minor.yy482;
taosArrayPush(yymsp[-1].minor.yy532->childTableInfo, &yymsp[0].minor.yy528);
yylhsminor.yy532 = yymsp[-1].minor.yy532;
}
yymsp[-1].minor.yy482 = yylhsminor.yy482;
yymsp[-1].minor.yy532 = yylhsminor.yy532;
break;
case 136: /* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
case 139: /* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
{
yylhsminor.yy482 = tSetCreateTableInfo(yymsp[-1].minor.yy15, NULL, NULL, TSQL_CREATE_TABLE);
setSqlInfo(pInfo, yylhsminor.yy482, NULL, TSDB_SQL_CREATE_TABLE);
yylhsminor.yy532 = tSetCreateTableInfo(yymsp[-1].minor.yy93, NULL, NULL, TSQL_CREATE_TABLE);
setSqlInfo(pInfo, yylhsminor.yy532, NULL, TSDB_SQL_CREATE_TABLE);
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
setCreatedTableName(pInfo, &yymsp[-4].minor.yy0, &yymsp[-5].minor.yy0);
}
yymsp[-5].minor.yy482 = yylhsminor.yy482;
yymsp[-5].minor.yy532 = yylhsminor.yy532;
break;
case 137: /* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
case 140: /* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
{
yylhsminor.yy482 = tSetCreateTableInfo(yymsp[-5].minor.yy15, yymsp[-1].minor.yy15, NULL, TSQL_CREATE_STABLE);
setSqlInfo(pInfo, yylhsminor.yy482, NULL, TSDB_SQL_CREATE_TABLE);
yylhsminor.yy532 = tSetCreateTableInfo(yymsp[-5].minor.yy93, yymsp[-1].minor.yy93, NULL, TSQL_CREATE_STABLE);
setSqlInfo(pInfo, yylhsminor.yy532, NULL, TSDB_SQL_CREATE_TABLE);
yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n;
setCreatedTableName(pInfo, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0);
}
yymsp[-9].minor.yy482 = yylhsminor.yy482;
yymsp[-9].minor.yy532 = yylhsminor.yy532;
break;
case 138: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
case 141: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
{
yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n;
yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n;
yylhsminor.yy390 = createNewChildTableInfo(&yymsp[-5].minor.yy0, NULL, yymsp[-1].minor.yy15, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0);
yylhsminor.yy528 = createNewChildTableInfo(&yymsp[-5].minor.yy0, NULL, yymsp[-1].minor.yy93, &yymsp[-8].minor.yy0, &yymsp[-9].minor.yy0);
}
yymsp[-9].minor.yy390 = yylhsminor.yy390;
yymsp[-9].minor.yy528 = yylhsminor.yy528;
break;
case 139: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */
case 142: /* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */
{
yymsp[-8].minor.yy0.n += yymsp[-7].minor.yy0.n;
yymsp[-11].minor.yy0.n += yymsp[-10].minor.yy0.n;
yylhsminor.yy390 = createNewChildTableInfo(&yymsp[-8].minor.yy0, yymsp[-5].minor.yy15, yymsp[-1].minor.yy15, &yymsp[-11].minor.yy0, &yymsp[-12].minor.yy0);
yylhsminor.yy528 = createNewChildTableInfo(&yymsp[-8].minor.yy0, yymsp[-5].minor.yy93, yymsp[-1].minor.yy93, &yymsp[-11].minor.yy0, &yymsp[-12].minor.yy0);
}
yymsp[-12].minor.yy390 = yylhsminor.yy390;
yymsp[-12].minor.yy528 = yylhsminor.yy528;
break;
case 140: /* tagNamelist ::= tagNamelist COMMA ids */
{taosArrayPush(yymsp[-2].minor.yy15, &yymsp[0].minor.yy0); yylhsminor.yy15 = yymsp[-2].minor.yy15; }
yymsp[-2].minor.yy15 = yylhsminor.yy15;
case 143: /* tagNamelist ::= tagNamelist COMMA ids */
{taosArrayPush(yymsp[-2].minor.yy93, &yymsp[0].minor.yy0); yylhsminor.yy93 = yymsp[-2].minor.yy93; }
yymsp[-2].minor.yy93 = yylhsminor.yy93;
break;
case 141: /* tagNamelist ::= ids */
{yylhsminor.yy15 = taosArrayInit(4, sizeof(SStrToken)); taosArrayPush(yylhsminor.yy15, &yymsp[0].minor.yy0);}
yymsp[0].minor.yy15 = yylhsminor.yy15;
case 144: /* tagNamelist ::= ids */
{yylhsminor.yy93 = taosArrayInit(4, sizeof(SStrToken)); taosArrayPush(yylhsminor.yy93, &yymsp[0].minor.yy0);}
yymsp[0].minor.yy93 = yylhsminor.yy93;
break;
case 142: /* create_table_args ::= ifnotexists ids cpxName AS select */
case 145: /* create_table_args ::= ifnotexists ids cpxName AS select */
{
yylhsminor.yy482 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy134, TSQL_CREATE_STREAM);
setSqlInfo(pInfo, yylhsminor.yy482, NULL, TSDB_SQL_CREATE_TABLE);
yylhsminor.yy532 = tSetCreateTableInfo(NULL, NULL, yymsp[0].minor.yy224, TSQL_CREATE_STREAM);
setSqlInfo(pInfo, yylhsminor.yy532, NULL, TSDB_SQL_CREATE_TABLE);
yymsp[-3].minor.yy0.n += yymsp[-2].minor.yy0.n;
setCreatedTableName(pInfo, &yymsp[-3].minor.yy0, &yymsp[-4].minor.yy0);
}
yymsp[-4].minor.yy482 = yylhsminor.yy482;
yymsp[-4].minor.yy532 = yylhsminor.yy532;
break;
case 143: /* columnlist ::= columnlist COMMA column */
{taosArrayPush(yymsp[-2].minor.yy15, &yymsp[0].minor.yy505); yylhsminor.yy15 = yymsp[-2].minor.yy15; }
yymsp[-2].minor.yy15 = yylhsminor.yy15;
case 146: /* columnlist ::= columnlist COMMA column */
{taosArrayPush(yymsp[-2].minor.yy93, &yymsp[0].minor.yy325); yylhsminor.yy93 = yymsp[-2].minor.yy93; }
yymsp[-2].minor.yy93 = yylhsminor.yy93;
break;
case 144: /* columnlist ::= column */
{yylhsminor.yy15 = taosArrayInit(4, sizeof(TAOS_FIELD)); taosArrayPush(yylhsminor.yy15, &yymsp[0].minor.yy505);}
yymsp[0].minor.yy15 = yylhsminor.yy15;
case 147: /* columnlist ::= column */
{yylhsminor.yy93 = taosArrayInit(4, sizeof(TAOS_FIELD)); taosArrayPush(yylhsminor.yy93, &yymsp[0].minor.yy325);}
yymsp[0].minor.yy93 = yylhsminor.yy93;
break;
case 145: /* column ::= ids typename */
case 148: /* column ::= ids typename */
{
tSetColumnInfo(&yylhsminor.yy505, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy505);
tSetColumnInfo(&yylhsminor.yy325, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy325);
}
yymsp[-1].minor.yy505 = yylhsminor.yy505;
break;
case 146: /* tagitemlist ::= tagitemlist COMMA tagitem */
{ yylhsminor.yy15 = tVariantListAppend(yymsp[-2].minor.yy15, &yymsp[0].minor.yy380, -1); }
yymsp[-2].minor.yy15 = yylhsminor.yy15;
break;
case 147: /* tagitemlist ::= tagitem */
{ yylhsminor.yy15 = tVariantListAppend(NULL, &yymsp[0].minor.yy380, -1); }
yymsp[0].minor.yy15 = yylhsminor.yy15;
break;
case 148: /* tagitem ::= INTEGER */
case 149: /* tagitem ::= FLOAT */ yytestcase(yyruleno==149);
case 150: /* tagitem ::= STRING */ yytestcase(yyruleno==150);
case 151: /* tagitem ::= BOOL */ yytestcase(yyruleno==151);
{ toTSDBType(yymsp[0].minor.yy0.type); tVariantCreate(&yylhsminor.yy380, &yymsp[0].minor.yy0); }
yymsp[0].minor.yy380 = yylhsminor.yy380;
yymsp[-1].minor.yy325 = yylhsminor.yy325;
break;
case 152: /* tagitem ::= NULL */
{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy380, &yymsp[0].minor.yy0); }
yymsp[0].minor.yy380 = yylhsminor.yy380;
case 155: /* tagitem ::= NULL */
{ yymsp[0].minor.yy0.type = 0; tVariantCreate(&yylhsminor.yy518, &yymsp[0].minor.yy0); }
yymsp[0].minor.yy518 = yylhsminor.yy518;
break;
case 153: /* tagitem ::= MINUS INTEGER */
case 154: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==154);
case 155: /* tagitem ::= PLUS INTEGER */ yytestcase(yyruleno==155);
case 156: /* tagitem ::= PLUS FLOAT */ yytestcase(yyruleno==156);
case 156: /* tagitem ::= MINUS INTEGER */
case 157: /* tagitem ::= MINUS FLOAT */ yytestcase(yyruleno==157);
case 158: /* tagitem ::= PLUS INTEGER */ yytestcase(yyruleno==158);
case 159: /* tagitem ::= PLUS FLOAT */ yytestcase(yyruleno==159);
{
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
yymsp[-1].minor.yy0.type = yymsp[0].minor.yy0.type;
toTSDBType(yymsp[-1].minor.yy0.type);
tVariantCreate(&yylhsminor.yy380, &yymsp[-1].minor.yy0);
tVariantCreate(&yylhsminor.yy518, &yymsp[-1].minor.yy0);
}
yymsp[-1].minor.yy380 = yylhsminor.yy380;
yymsp[-1].minor.yy518 = yylhsminor.yy518;
break;
case 157: /* select ::= SELECT selcollist from where_opt interval_opt session_option windowstate_option fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
case 160: /* select ::= SELECT selcollist from where_opt interval_opt session_option windowstate_option fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
{
yylhsminor.yy134 = tSetQuerySqlNode(&yymsp[-13].minor.yy0, yymsp[-12].minor.yy15, yymsp[-11].minor.yy160, yymsp[-10].minor.yy328, yymsp[-4].minor.yy15, yymsp[-3].minor.yy15, &yymsp[-9].minor.yy496, &yymsp[-8].minor.yy151, &yymsp[-7].minor.yy96, &yymsp[-5].minor.yy0, yymsp[-6].minor.yy15, &yymsp[0].minor.yy150, &yymsp[-1].minor.yy150, yymsp[-2].minor.yy328);
yylhsminor.yy224 = tSetQuerySqlNode(&yymsp[-13].minor.yy0, yymsp[-12].minor.yy93, yymsp[-11].minor.yy330, yymsp[-10].minor.yy68, yymsp[-4].minor.yy93, yymsp[-3].minor.yy93, &yymsp[-9].minor.yy42, &yymsp[-8].minor.yy15, &yymsp[-7].minor.yy274, &yymsp[-5].minor.yy0, yymsp[-6].minor.yy93, &yymsp[0].minor.yy284, &yymsp[-1].minor.yy284, yymsp[-2].minor.yy68);
}
yymsp[-13].minor.yy134 = yylhsminor.yy134;
yymsp[-13].minor.yy224 = yylhsminor.yy224;
break;
case 158: /* select ::= LP select RP */
{yymsp[-2].minor.yy134 = yymsp[-1].minor.yy134;}
case 161: /* select ::= LP select RP */
{yymsp[-2].minor.yy224 = yymsp[-1].minor.yy224;}
break;
case 159: /* union ::= select */
{ yylhsminor.yy15 = setSubclause(NULL, yymsp[0].minor.yy134); }
yymsp[0].minor.yy15 = yylhsminor.yy15;
case 162: /* union ::= select */
{ yylhsminor.yy93 = setSubclause(NULL, yymsp[0].minor.yy224); }
yymsp[0].minor.yy93 = yylhsminor.yy93;
break;
case 160: /* union ::= union UNION ALL select */
{ yylhsminor.yy15 = appendSelectClause(yymsp[-3].minor.yy15, yymsp[0].minor.yy134); }
yymsp[-3].minor.yy15 = yylhsminor.yy15;
case 163: /* union ::= union UNION ALL select */
{ yylhsminor.yy93 = appendSelectClause(yymsp[-3].minor.yy93, yymsp[0].minor.yy224); }
yymsp[-3].minor.yy93 = yylhsminor.yy93;
break;
case 161: /* cmd ::= union */
{ setSqlInfo(pInfo, yymsp[0].minor.yy15, NULL, TSDB_SQL_SELECT); }
case 164: /* cmd ::= union */
{ setSqlInfo(pInfo, yymsp[0].minor.yy93, NULL, TSDB_SQL_SELECT); }
break;
case 162: /* select ::= SELECT selcollist */
case 165: /* select ::= SELECT selcollist */
{
yylhsminor.yy134 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy15, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
yylhsminor.yy224 = tSetQuerySqlNode(&yymsp[-1].minor.yy0, yymsp[0].minor.yy93, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
}
yymsp[-1].minor.yy134 = yylhsminor.yy134;
yymsp[-1].minor.yy224 = yylhsminor.yy224;
break;
case 163: /* sclp ::= selcollist COMMA */
{yylhsminor.yy15 = yymsp[-1].minor.yy15;}
yymsp[-1].minor.yy15 = yylhsminor.yy15;
case 166: /* sclp ::= selcollist COMMA */
{yylhsminor.yy93 = yymsp[-1].minor.yy93;}
yymsp[-1].minor.yy93 = yylhsminor.yy93;
break;
case 164: /* sclp ::= */
case 194: /* orderby_opt ::= */ yytestcase(yyruleno==194);
{yymsp[1].minor.yy15 = 0;}
case 167: /* sclp ::= */
case 197: /* orderby_opt ::= */ yytestcase(yyruleno==197);
{yymsp[1].minor.yy93 = 0;}
break;
case 165: /* selcollist ::= sclp distinct expr as */
case 168: /* selcollist ::= sclp distinct expr as */
{
yylhsminor.yy15 = tSqlExprListAppend(yymsp[-3].minor.yy15, yymsp[-1].minor.yy328, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0);
yylhsminor.yy93 = tSqlExprListAppend(yymsp[-3].minor.yy93, yymsp[-1].minor.yy68, yymsp[-2].minor.yy0.n? &yymsp[-2].minor.yy0:0, yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0);
}
yymsp[-3].minor.yy15 = yylhsminor.yy15;
yymsp[-3].minor.yy93 = yylhsminor.yy93;
break;
case 166: /* selcollist ::= sclp STAR */
case 169: /* selcollist ::= sclp STAR */
{
tSqlExpr *pNode = tSqlExprCreateIdValue(NULL, TK_ALL);
yylhsminor.yy15 = tSqlExprListAppend(yymsp[-1].minor.yy15, pNode, 0, 0);
yylhsminor.yy93 = tSqlExprListAppend(yymsp[-1].minor.yy93, pNode, 0, 0);
}
yymsp[-1].minor.yy15 = yylhsminor.yy15;
yymsp[-1].minor.yy93 = yylhsminor.yy93;
break;
case 167: /* as ::= AS ids */
case 170: /* as ::= AS ids */
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
break;
case 168: /* as ::= ids */
case 171: /* as ::= ids */
{ yylhsminor.yy0 = yymsp[0].minor.yy0; }
yymsp[0].minor.yy0 = yylhsminor.yy0;
break;
case 169: /* as ::= */
case 172: /* as ::= */
{ yymsp[1].minor.yy0.n = 0; }
break;
case 170: /* distinct ::= DISTINCT */
case 173: /* distinct ::= DISTINCT */
{ yylhsminor.yy0 = yymsp[0].minor.yy0; }
yymsp[0].minor.yy0 = yylhsminor.yy0;
break;
case 172: /* from ::= FROM tablelist */
case 173: /* from ::= FROM sub */ yytestcase(yyruleno==173);
{yymsp[-1].minor.yy160 = yymsp[0].minor.yy160;}
case 175: /* from ::= FROM tablelist */
case 176: /* from ::= FROM sub */ yytestcase(yyruleno==176);
{yymsp[-1].minor.yy330 = yymsp[0].minor.yy330;}
break;
case 174: /* sub ::= LP union RP */
{yymsp[-2].minor.yy160 = addSubqueryElem(NULL, yymsp[-1].minor.yy15, NULL);}
case 177: /* sub ::= LP union RP */
{yymsp[-2].minor.yy330 = addSubqueryElem(NULL, yymsp[-1].minor.yy93, NULL);}
break;
case 175: /* sub ::= LP union RP ids */
{yymsp[-3].minor.yy160 = addSubqueryElem(NULL, yymsp[-2].minor.yy15, &yymsp[0].minor.yy0);}
case 178: /* sub ::= LP union RP ids */
{yymsp[-3].minor.yy330 = addSubqueryElem(NULL, yymsp[-2].minor.yy93, &yymsp[0].minor.yy0);}
break;
case 176: /* sub ::= sub COMMA LP union RP ids */
{yylhsminor.yy160 = addSubqueryElem(yymsp[-5].minor.yy160, yymsp[-2].minor.yy15, &yymsp[0].minor.yy0);}
yymsp[-5].minor.yy160 = yylhsminor.yy160;
case 179: /* sub ::= sub COMMA LP union RP ids */
{yylhsminor.yy330 = addSubqueryElem(yymsp[-5].minor.yy330, yymsp[-2].minor.yy93, &yymsp[0].minor.yy0);}
yymsp[-5].minor.yy330 = yylhsminor.yy330;
break;
case 177: /* tablelist ::= ids cpxName */
case 180: /* tablelist ::= ids cpxName */
{
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
yylhsminor.yy160 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL);
yylhsminor.yy330 = setTableNameList(NULL, &yymsp[-1].minor.yy0, NULL);
}
yymsp[-1].minor.yy160 = yylhsminor.yy160;
yymsp[-1].minor.yy330 = yylhsminor.yy330;
break;
case 178: /* tablelist ::= ids cpxName ids */
case 181: /* tablelist ::= ids cpxName ids */
{
yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n;
yylhsminor.yy160 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
yylhsminor.yy330 = setTableNameList(NULL, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
}
yymsp[-2].minor.yy160 = yylhsminor.yy160;
yymsp[-2].minor.yy330 = yylhsminor.yy330;
break;
case 179: /* tablelist ::= tablelist COMMA ids cpxName */
case 182: /* tablelist ::= tablelist COMMA ids cpxName */
{
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
yylhsminor.yy160 = setTableNameList(yymsp[-3].minor.yy160, &yymsp[-1].minor.yy0, NULL);
yylhsminor.yy330 = setTableNameList(yymsp[-3].minor.yy330, &yymsp[-1].minor.yy0, NULL);
}
yymsp[-3].minor.yy160 = yylhsminor.yy160;
yymsp[-3].minor.yy330 = yylhsminor.yy330;
break;
case 180: /* tablelist ::= tablelist COMMA ids cpxName ids */
case 183: /* tablelist ::= tablelist COMMA ids cpxName ids */
{
yymsp[-2].minor.yy0.n += yymsp[-1].minor.yy0.n;
yylhsminor.yy160 = setTableNameList(yymsp[-4].minor.yy160, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
yylhsminor.yy330 = setTableNameList(yymsp[-4].minor.yy330, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
}
yymsp[-4].minor.yy160 = yylhsminor.yy160;
yymsp[-4].minor.yy330 = yylhsminor.yy330;
break;
case 181: /* tmvar ::= VARIABLE */
case 184: /* tmvar ::= VARIABLE */
{yylhsminor.yy0 = yymsp[0].minor.yy0;}
yymsp[0].minor.yy0 = yylhsminor.yy0;
break;
case 182: /* interval_opt ::= INTERVAL LP tmvar RP */
{yymsp[-3].minor.yy496.interval = yymsp[-1].minor.yy0; yymsp[-3].minor.yy496.offset.n = 0;}
case 185: /* interval_opt ::= INTERVAL LP tmvar RP */
{yymsp[-3].minor.yy42.interval = yymsp[-1].minor.yy0; yymsp[-3].minor.yy42.offset.n = 0;}
break;
case 183: /* interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
{yymsp[-5].minor.yy496.interval = yymsp[-3].minor.yy0; yymsp[-5].minor.yy496.offset = yymsp[-1].minor.yy0;}
case 186: /* interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
{yymsp[-5].minor.yy42.interval = yymsp[-3].minor.yy0; yymsp[-5].minor.yy42.offset = yymsp[-1].minor.yy0;}
break;
case 184: /* interval_opt ::= */
{memset(&yymsp[1].minor.yy496, 0, sizeof(yymsp[1].minor.yy496));}
case 187: /* interval_opt ::= */
{memset(&yymsp[1].minor.yy42, 0, sizeof(yymsp[1].minor.yy42));}
break;
case 185: /* session_option ::= */
{yymsp[1].minor.yy151.col.n = 0; yymsp[1].minor.yy151.gap.n = 0;}
case 188: /* session_option ::= */
{yymsp[1].minor.yy15.col.n = 0; yymsp[1].minor.yy15.gap.n = 0;}
break;
case 186: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
case 189: /* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
yymsp[-6].minor.yy151.col = yymsp[-4].minor.yy0;
yymsp[-6].minor.yy151.gap = yymsp[-1].minor.yy0;
yymsp[-6].minor.yy15.col = yymsp[-4].minor.yy0;
yymsp[-6].minor.yy15.gap = yymsp[-1].minor.yy0;
}
break;
case 187: /* windowstate_option ::= */
{ yymsp[1].minor.yy96.col.n = 0; yymsp[1].minor.yy96.col.z = NULL;}
case 190: /* windowstate_option ::= */
{ yymsp[1].minor.yy274.col.n = 0; yymsp[1].minor.yy274.col.z = NULL;}
break;
case 188: /* windowstate_option ::= STATE_WINDOW LP ids RP */
{ yymsp[-3].minor.yy96.col = yymsp[-1].minor.yy0; }
case 191: /* windowstate_option ::= STATE_WINDOW LP ids RP */
{ yymsp[-3].minor.yy274.col = yymsp[-1].minor.yy0; }
break;
case 189: /* fill_opt ::= */
{ yymsp[1].minor.yy15 = 0; }
case 192: /* fill_opt ::= */
{ yymsp[1].minor.yy93 = 0; }
break;
case 190: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
case 193: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
tVariant A = {0};
toTSDBType(yymsp[-3].minor.yy0.type);
tVariantCreate(&A, &yymsp[-3].minor.yy0);
tVariantListInsert(yymsp[-1].minor.yy15, &A, -1, 0);
yymsp[-5].minor.yy15 = yymsp[-1].minor.yy15;
tVariantListInsert(yymsp[-1].minor.yy93, &A, -1, 0);
yymsp[-5].minor.yy93 = yymsp[-1].minor.yy93;
}
break;
case 191: /* fill_opt ::= FILL LP ID RP */
case 194: /* fill_opt ::= FILL LP ID RP */
{
toTSDBType(yymsp[-1].minor.yy0.type);
yymsp[-3].minor.yy15 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1);
yymsp[-3].minor.yy93 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1);
}
break;
case 192: /* sliding_opt ::= SLIDING LP tmvar RP */
case 195: /* sliding_opt ::= SLIDING LP tmvar RP */
{yymsp[-3].minor.yy0 = yymsp[-1].minor.yy0; }
break;
case 193: /* sliding_opt ::= */
case 196: /* sliding_opt ::= */
{yymsp[1].minor.yy0.n = 0; yymsp[1].minor.yy0.z = NULL; yymsp[1].minor.yy0.type = 0; }
break;
case 195: /* orderby_opt ::= ORDER BY sortlist */
{yymsp[-2].minor.yy15 = yymsp[0].minor.yy15;}
case 198: /* orderby_opt ::= ORDER BY sortlist */
{yymsp[-2].minor.yy93 = yymsp[0].minor.yy93;}
break;
case 196: /* sortlist ::= sortlist COMMA item sortorder */
case 199: /* sortlist ::= sortlist COMMA item sortorder */
{
yylhsminor.yy15 = tVariantListAppend(yymsp[-3].minor.yy15, &yymsp[-1].minor.yy380, yymsp[0].minor.yy250);
yylhsminor.yy93 = tVariantListAppend(yymsp[-3].minor.yy93, &yymsp[-1].minor.yy518, yymsp[0].minor.yy150);
}
yymsp[-3].minor.yy15 = yylhsminor.yy15;
yymsp[-3].minor.yy93 = yylhsminor.yy93;
break;
case 197: /* sortlist ::= item sortorder */
case 200: /* sortlist ::= item sortorder */
{
yylhsminor.yy15 = tVariantListAppend(NULL, &yymsp[-1].minor.yy380, yymsp[0].minor.yy250);
yylhsminor.yy93 = tVariantListAppend(NULL, &yymsp[-1].minor.yy518, yymsp[0].minor.yy150);
}
yymsp[-1].minor.yy15 = yylhsminor.yy15;
yymsp[-1].minor.yy93 = yylhsminor.yy93;
break;
case 198: /* item ::= ids cpxName */
case 201: /* item ::= ids cpxName */
{
toTSDBType(yymsp[-1].minor.yy0.type);
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
tVariantCreate(&yylhsminor.yy380, &yymsp[-1].minor.yy0);
tVariantCreate(&yylhsminor.yy518, &yymsp[-1].minor.yy0);
}
yymsp[-1].minor.yy380 = yylhsminor.yy380;
yymsp[-1].minor.yy518 = yylhsminor.yy518;
break;
case 199: /* sortorder ::= ASC */
{ yymsp[0].minor.yy250 = TSDB_ORDER_ASC; }
case 202: /* sortorder ::= ASC */
{ yymsp[0].minor.yy150 = TSDB_ORDER_ASC; }
break;
case 200: /* sortorder ::= DESC */
{ yymsp[0].minor.yy250 = TSDB_ORDER_DESC;}
case 203: /* sortorder ::= DESC */
{ yymsp[0].minor.yy150 = TSDB_ORDER_DESC;}
break;
case 201: /* sortorder ::= */
{ yymsp[1].minor.yy250 = TSDB_ORDER_ASC; }
case 204: /* sortorder ::= */
{ yymsp[1].minor.yy150 = TSDB_ORDER_ASC; }
break;
case 202: /* groupby_opt ::= */
{ yymsp[1].minor.yy15 = 0;}
case 205: /* groupby_opt ::= */
{ yymsp[1].minor.yy93 = 0;}
break;
case 203: /* groupby_opt ::= GROUP BY grouplist */
{ yymsp[-2].minor.yy15 = yymsp[0].minor.yy15;}
case 206: /* groupby_opt ::= GROUP BY grouplist */
{ yymsp[-2].minor.yy93 = yymsp[0].minor.yy93;}
break;
case 204: /* grouplist ::= grouplist COMMA item */
case 207: /* grouplist ::= grouplist COMMA item */
{
yylhsminor.yy15 = tVariantListAppend(yymsp[-2].minor.yy15, &yymsp[0].minor.yy380, -1);
yylhsminor.yy93 = tVariantListAppend(yymsp[-2].minor.yy93, &yymsp[0].minor.yy518, -1);
}
yymsp[-2].minor.yy15 = yylhsminor.yy15;
yymsp[-2].minor.yy93 = yylhsminor.yy93;
break;
case 205: /* grouplist ::= item */
case 208: /* grouplist ::= item */
{
yylhsminor.yy15 = tVariantListAppend(NULL, &yymsp[0].minor.yy380, -1);
yylhsminor.yy93 = tVariantListAppend(NULL, &yymsp[0].minor.yy518, -1);
}
yymsp[0].minor.yy15 = yylhsminor.yy15;
yymsp[0].minor.yy93 = yylhsminor.yy93;
break;
case 206: /* having_opt ::= */
case 216: /* where_opt ::= */ yytestcase(yyruleno==216);
case 258: /* expritem ::= */ yytestcase(yyruleno==258);
{yymsp[1].minor.yy328 = 0;}
case 209: /* having_opt ::= */
case 219: /* where_opt ::= */ yytestcase(yyruleno==219);
case 261: /* expritem ::= */ yytestcase(yyruleno==261);
{yymsp[1].minor.yy68 = 0;}
break;
case 207: /* having_opt ::= HAVING expr */
case 217: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==217);
{yymsp[-1].minor.yy328 = yymsp[0].minor.yy328;}
case 210: /* having_opt ::= HAVING expr */
case 220: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==220);
{yymsp[-1].minor.yy68 = yymsp[0].minor.yy68;}
break;
case 208: /* limit_opt ::= */
case 212: /* slimit_opt ::= */ yytestcase(yyruleno==212);
{yymsp[1].minor.yy150.limit = -1; yymsp[1].minor.yy150.offset = 0;}
case 211: /* limit_opt ::= */
case 215: /* slimit_opt ::= */ yytestcase(yyruleno==215);
{yymsp[1].minor.yy284.limit = -1; yymsp[1].minor.yy284.offset = 0;}
break;
case 209: /* limit_opt ::= LIMIT signed */
case 213: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==213);
{yymsp[-1].minor.yy150.limit = yymsp[0].minor.yy489; yymsp[-1].minor.yy150.offset = 0;}
case 212: /* limit_opt ::= LIMIT signed */
case 216: /* slimit_opt ::= SLIMIT signed */ yytestcase(yyruleno==216);
{yymsp[-1].minor.yy284.limit = yymsp[0].minor.yy279; yymsp[-1].minor.yy284.offset = 0;}
break;
case 210: /* limit_opt ::= LIMIT signed OFFSET signed */
{ yymsp[-3].minor.yy150.limit = yymsp[-2].minor.yy489; yymsp[-3].minor.yy150.offset = yymsp[0].minor.yy489;}
case 213: /* limit_opt ::= LIMIT signed OFFSET signed */
{ yymsp[-3].minor.yy284.limit = yymsp[-2].minor.yy279; yymsp[-3].minor.yy284.offset = yymsp[0].minor.yy279;}
break;
case 211: /* limit_opt ::= LIMIT signed COMMA signed */
{ yymsp[-3].minor.yy150.limit = yymsp[0].minor.yy489; yymsp[-3].minor.yy150.offset = yymsp[-2].minor.yy489;}
case 214: /* limit_opt ::= LIMIT signed COMMA signed */
{ yymsp[-3].minor.yy284.limit = yymsp[0].minor.yy279; yymsp[-3].minor.yy284.offset = yymsp[-2].minor.yy279;}
break;
case 214: /* slimit_opt ::= SLIMIT signed SOFFSET signed */
{yymsp[-3].minor.yy150.limit = yymsp[-2].minor.yy489; yymsp[-3].minor.yy150.offset = yymsp[0].minor.yy489;}
case 217: /* slimit_opt ::= SLIMIT signed SOFFSET signed */
{yymsp[-3].minor.yy284.limit = yymsp[-2].minor.yy279; yymsp[-3].minor.yy284.offset = yymsp[0].minor.yy279;}
break;
case 215: /* slimit_opt ::= SLIMIT signed COMMA signed */
{yymsp[-3].minor.yy150.limit = yymsp[0].minor.yy489; yymsp[-3].minor.yy150.offset = yymsp[-2].minor.yy489;}
case 218: /* slimit_opt ::= SLIMIT signed COMMA signed */
{yymsp[-3].minor.yy284.limit = yymsp[0].minor.yy279; yymsp[-3].minor.yy284.offset = yymsp[-2].minor.yy279;}
break;
case 218: /* expr ::= LP expr RP */
{yylhsminor.yy328 = yymsp[-1].minor.yy328; yylhsminor.yy328->token.z = yymsp[-2].minor.yy0.z; yylhsminor.yy328->token.n = (yymsp[0].minor.yy0.z - yymsp[-2].minor.yy0.z + 1);}
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 221: /* expr ::= LP expr RP */
{yylhsminor.yy68 = yymsp[-1].minor.yy68; yylhsminor.yy68->token.z = yymsp[-2].minor.yy0.z; yylhsminor.yy68->token.n = (yymsp[0].minor.yy0.z - yymsp[-2].minor.yy0.z + 1);}
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 219: /* expr ::= ID */
{ yylhsminor.yy328 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_ID);}
yymsp[0].minor.yy328 = yylhsminor.yy328;
case 222: /* expr ::= ID */
{ yylhsminor.yy68 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_ID);}
yymsp[0].minor.yy68 = yylhsminor.yy68;
break;
case 220: /* expr ::= ID DOT ID */
{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy328 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ID);}
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 223: /* expr ::= ID DOT ID */
{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy68 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ID);}
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 221: /* expr ::= ID DOT STAR */
{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy328 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ALL);}
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 224: /* expr ::= ID DOT STAR */
{ yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yylhsminor.yy68 = tSqlExprCreateIdValue(&yymsp[-2].minor.yy0, TK_ALL);}
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 222: /* expr ::= INTEGER */
{ yylhsminor.yy328 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_INTEGER);}
yymsp[0].minor.yy328 = yylhsminor.yy328;
case 225: /* expr ::= INTEGER */
{ yylhsminor.yy68 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_INTEGER);}
yymsp[0].minor.yy68 = yylhsminor.yy68;
break;
case 223: /* expr ::= MINUS INTEGER */
case 224: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==224);
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy328 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_INTEGER);}
yymsp[-1].minor.yy328 = yylhsminor.yy328;
case 226: /* expr ::= MINUS INTEGER */
case 227: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==227);
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yylhsminor.yy68 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_INTEGER);}
yymsp[-1].minor.yy68 = yylhsminor.yy68;
break;
case 225: /* expr ::= FLOAT */
{ yylhsminor.yy328 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_FLOAT);}
yymsp[0].minor.yy328 = yylhsminor.yy328;
case 228: /* expr ::= FLOAT */
{ yylhsminor.yy68 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_FLOAT);}
yymsp[0].minor.yy68 = yylhsminor.yy68;
break;
case 226: /* expr ::= MINUS FLOAT */
case 227: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==227);
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy328 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_FLOAT);}
yymsp[-1].minor.yy328 = yylhsminor.yy328;
case 229: /* expr ::= MINUS FLOAT */
case 230: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==230);
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yylhsminor.yy68 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_FLOAT);}
yymsp[-1].minor.yy68 = yylhsminor.yy68;
break;
case 228: /* expr ::= STRING */
{ yylhsminor.yy328 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_STRING);}
yymsp[0].minor.yy328 = yylhsminor.yy328;
case 231: /* expr ::= STRING */
{ yylhsminor.yy68 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_STRING);}
yymsp[0].minor.yy68 = yylhsminor.yy68;
break;
case 229: /* expr ::= NOW */
{ yylhsminor.yy328 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NOW); }
yymsp[0].minor.yy328 = yylhsminor.yy328;
case 232: /* expr ::= NOW */
{ yylhsminor.yy68 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NOW); }
yymsp[0].minor.yy68 = yylhsminor.yy68;
break;
case 230: /* expr ::= VARIABLE */
{ yylhsminor.yy328 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);}
yymsp[0].minor.yy328 = yylhsminor.yy328;
case 233: /* expr ::= VARIABLE */
{ yylhsminor.yy68 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_VARIABLE);}
yymsp[0].minor.yy68 = yylhsminor.yy68;
break;
case 231: /* expr ::= PLUS VARIABLE */
case 232: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==232);
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy328 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_VARIABLE);}
yymsp[-1].minor.yy328 = yylhsminor.yy328;
case 234: /* expr ::= PLUS VARIABLE */
case 235: /* expr ::= MINUS VARIABLE */ yytestcase(yyruleno==235);
{ yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_VARIABLE; yylhsminor.yy68 = tSqlExprCreateIdValue(&yymsp[-1].minor.yy0, TK_VARIABLE);}
yymsp[-1].minor.yy68 = yylhsminor.yy68;
break;
case 233: /* expr ::= BOOL */
{ yylhsminor.yy328 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);}
yymsp[0].minor.yy328 = yylhsminor.yy328;
case 236: /* expr ::= BOOL */
{ yylhsminor.yy68 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_BOOL);}
yymsp[0].minor.yy68 = yylhsminor.yy68;
break;
case 234: /* expr ::= NULL */
{ yylhsminor.yy328 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);}
yymsp[0].minor.yy328 = yylhsminor.yy328;
case 237: /* expr ::= NULL */
{ yylhsminor.yy68 = tSqlExprCreateIdValue(&yymsp[0].minor.yy0, TK_NULL);}
yymsp[0].minor.yy68 = yylhsminor.yy68;
break;
case 235: /* expr ::= ID LP exprlist RP */
{ yylhsminor.yy328 = tSqlExprCreateFunction(yymsp[-1].minor.yy15, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); }
yymsp[-3].minor.yy328 = yylhsminor.yy328;
case 238: /* expr ::= ID LP exprlist RP */
{ yylhsminor.yy68 = tSqlExprCreateFunction(yymsp[-1].minor.yy93, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); }
yymsp[-3].minor.yy68 = yylhsminor.yy68;
break;
case 236: /* expr ::= ID LP STAR RP */
{ yylhsminor.yy328 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); }
yymsp[-3].minor.yy328 = yylhsminor.yy328;
case 239: /* expr ::= ID LP STAR RP */
{ yylhsminor.yy68 = tSqlExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type); }
yymsp[-3].minor.yy68 = yylhsminor.yy68;
break;
case 237: /* expr ::= expr IS NULL */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-2].minor.yy328, NULL, TK_ISNULL);}
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 240: /* expr ::= expr IS NULL */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-2].minor.yy68, NULL, TK_ISNULL);}
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 238: /* expr ::= expr IS NOT NULL */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-3].minor.yy328, NULL, TK_NOTNULL);}
yymsp[-3].minor.yy328 = yylhsminor.yy328;
case 241: /* expr ::= expr IS NOT NULL */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-3].minor.yy68, NULL, TK_NOTNULL);}
yymsp[-3].minor.yy68 = yylhsminor.yy68;
break;
case 239: /* expr ::= expr LT expr */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-2].minor.yy328, yymsp[0].minor.yy328, TK_LT);}
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 242: /* expr ::= expr LT expr */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-2].minor.yy68, yymsp[0].minor.yy68, TK_LT);}
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 240: /* expr ::= expr GT expr */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-2].minor.yy328, yymsp[0].minor.yy328, TK_GT);}
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 243: /* expr ::= expr GT expr */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-2].minor.yy68, yymsp[0].minor.yy68, TK_GT);}
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 241: /* expr ::= expr LE expr */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-2].minor.yy328, yymsp[0].minor.yy328, TK_LE);}
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 244: /* expr ::= expr LE expr */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-2].minor.yy68, yymsp[0].minor.yy68, TK_LE);}
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 242: /* expr ::= expr GE expr */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-2].minor.yy328, yymsp[0].minor.yy328, TK_GE);}
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 245: /* expr ::= expr GE expr */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-2].minor.yy68, yymsp[0].minor.yy68, TK_GE);}
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 243: /* expr ::= expr NE expr */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-2].minor.yy328, yymsp[0].minor.yy328, TK_NE);}
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 246: /* expr ::= expr NE expr */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-2].minor.yy68, yymsp[0].minor.yy68, TK_NE);}
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 244: /* expr ::= expr EQ expr */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-2].minor.yy328, yymsp[0].minor.yy328, TK_EQ);}
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 247: /* expr ::= expr EQ expr */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-2].minor.yy68, yymsp[0].minor.yy68, TK_EQ);}
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 245: /* expr ::= expr BETWEEN expr AND expr */
{ tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy328); yylhsminor.yy328 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy328, yymsp[-2].minor.yy328, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy328, TK_LE), TK_AND);}
yymsp[-4].minor.yy328 = yylhsminor.yy328;
case 248: /* expr ::= expr BETWEEN expr AND expr */
{ tSqlExpr* X2 = tSqlExprClone(yymsp[-4].minor.yy68); yylhsminor.yy68 = tSqlExprCreate(tSqlExprCreate(yymsp[-4].minor.yy68, yymsp[-2].minor.yy68, TK_GE), tSqlExprCreate(X2, yymsp[0].minor.yy68, TK_LE), TK_AND);}
yymsp[-4].minor.yy68 = yylhsminor.yy68;
break;
case 246: /* expr ::= expr AND expr */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-2].minor.yy328, yymsp[0].minor.yy328, TK_AND);}
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 249: /* expr ::= expr AND expr */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-2].minor.yy68, yymsp[0].minor.yy68, TK_AND);}
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 247: /* expr ::= expr OR expr */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-2].minor.yy328, yymsp[0].minor.yy328, TK_OR); }
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 250: /* expr ::= expr OR expr */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-2].minor.yy68, yymsp[0].minor.yy68, TK_OR); }
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 248: /* expr ::= expr PLUS expr */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-2].minor.yy328, yymsp[0].minor.yy328, TK_PLUS); }
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 251: /* expr ::= expr PLUS expr */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-2].minor.yy68, yymsp[0].minor.yy68, TK_PLUS); }
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 249: /* expr ::= expr MINUS expr */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-2].minor.yy328, yymsp[0].minor.yy328, TK_MINUS); }
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 252: /* expr ::= expr MINUS expr */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-2].minor.yy68, yymsp[0].minor.yy68, TK_MINUS); }
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 250: /* expr ::= expr STAR expr */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-2].minor.yy328, yymsp[0].minor.yy328, TK_STAR); }
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 253: /* expr ::= expr STAR expr */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-2].minor.yy68, yymsp[0].minor.yy68, TK_STAR); }
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 251: /* expr ::= expr SLASH expr */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-2].minor.yy328, yymsp[0].minor.yy328, TK_DIVIDE);}
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 254: /* expr ::= expr SLASH expr */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-2].minor.yy68, yymsp[0].minor.yy68, TK_DIVIDE);}
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 252: /* expr ::= expr REM expr */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-2].minor.yy328, yymsp[0].minor.yy328, TK_REM); }
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 255: /* expr ::= expr REM expr */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-2].minor.yy68, yymsp[0].minor.yy68, TK_REM); }
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 253: /* expr ::= expr LIKE expr */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-2].minor.yy328, yymsp[0].minor.yy328, TK_LIKE); }
yymsp[-2].minor.yy328 = yylhsminor.yy328;
case 256: /* expr ::= expr LIKE expr */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-2].minor.yy68, yymsp[0].minor.yy68, TK_LIKE); }
yymsp[-2].minor.yy68 = yylhsminor.yy68;
break;
case 254: /* expr ::= expr IN LP exprlist RP */
{yylhsminor.yy328 = tSqlExprCreate(yymsp[-4].minor.yy328, (tSqlExpr*)yymsp[-1].minor.yy15, TK_IN); }
yymsp[-4].minor.yy328 = yylhsminor.yy328;
case 257: /* expr ::= expr IN LP exprlist RP */
{yylhsminor.yy68 = tSqlExprCreate(yymsp[-4].minor.yy68, (tSqlExpr*)yymsp[-1].minor.yy93, TK_IN); }
yymsp[-4].minor.yy68 = yylhsminor.yy68;
break;
case 255: /* exprlist ::= exprlist COMMA expritem */
{yylhsminor.yy15 = tSqlExprListAppend(yymsp[-2].minor.yy15,yymsp[0].minor.yy328,0, 0);}
yymsp[-2].minor.yy15 = yylhsminor.yy15;
case 258: /* exprlist ::= exprlist COMMA expritem */
{yylhsminor.yy93 = tSqlExprListAppend(yymsp[-2].minor.yy93,yymsp[0].minor.yy68,0, 0);}
yymsp[-2].minor.yy93 = yylhsminor.yy93;
break;
case 256: /* exprlist ::= expritem */
{yylhsminor.yy15 = tSqlExprListAppend(0,yymsp[0].minor.yy328,0, 0);}
yymsp[0].minor.yy15 = yylhsminor.yy15;
case 259: /* exprlist ::= expritem */
{yylhsminor.yy93 = tSqlExprListAppend(0,yymsp[0].minor.yy68,0, 0);}
yymsp[0].minor.yy93 = yylhsminor.yy93;
break;
case 257: /* expritem ::= expr */
{yylhsminor.yy328 = yymsp[0].minor.yy328;}
yymsp[0].minor.yy328 = yylhsminor.yy328;
case 260: /* expritem ::= expr */
{yylhsminor.yy68 = yymsp[0].minor.yy68;}
yymsp[0].minor.yy68 = yylhsminor.yy68;
break;
case 259: /* cmd ::= RESET QUERY CACHE */
case 262: /* cmd ::= RESET QUERY CACHE */
{ setDCLSqlElems(pInfo, TSDB_SQL_RESET_CACHE, 0);}
break;
case 260: /* cmd ::= SYNCDB ids REPLICA */
case 263: /* cmd ::= SYNCDB ids REPLICA */
{ setDCLSqlElems(pInfo, TSDB_SQL_SYNC_DB_REPLICA, 1, &yymsp[-1].minor.yy0);}
break;
case 261: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
case 264: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy15, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy93, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 262: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
case 265: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
......@@ -3067,21 +3080,21 @@ static void yy_reduce(
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 263: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
case 266: /* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy15, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy93, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 264: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
case 267: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy15, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy93, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 265: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
case 268: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
......@@ -3092,7 +3105,7 @@ static void yy_reduce(
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 266: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
case 269: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n;
......@@ -3106,33 +3119,33 @@ static void yy_reduce(
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 267: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
case 270: /* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{
yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n;
toTSDBType(yymsp[-2].minor.yy0.type);
SArray* A = tVariantListAppendToken(NULL, &yymsp[-2].minor.yy0, -1);
A = tVariantListAppend(A, &yymsp[0].minor.yy380, -1);
A = tVariantListAppend(A, &yymsp[0].minor.yy518, -1);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 268: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
case 271: /* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy15, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy93, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 269: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
case 272: /* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy15, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy93, NULL, TSDB_ALTER_TABLE_ADD_COLUMN, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 270: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
case 273: /* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
......@@ -3143,21 +3156,21 @@ static void yy_reduce(
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 271: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
case 274: /* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy15, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy93, NULL, TSDB_ALTER_TABLE_CHANGE_COLUMN, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 272: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
case 275: /* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy15, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy93, NULL, TSDB_ALTER_TABLE_ADD_TAG_COLUMN, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 273: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
case 276: /* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
......@@ -3168,7 +3181,7 @@ static void yy_reduce(
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 274: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
case 277: /* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
{
yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n;
......@@ -3182,32 +3195,32 @@ static void yy_reduce(
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 275: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
case 278: /* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
{
yymsp[-6].minor.yy0.n += yymsp[-5].minor.yy0.n;
toTSDBType(yymsp[-2].minor.yy0.type);
SArray* A = tVariantListAppendToken(NULL, &yymsp[-2].minor.yy0, -1);
A = tVariantListAppend(A, &yymsp[0].minor.yy380, -1);
A = tVariantListAppend(A, &yymsp[0].minor.yy518, -1);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-6].minor.yy0, NULL, A, TSDB_ALTER_TABLE_UPDATE_TAG_VAL, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 276: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
case 279: /* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy15, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&yymsp[-4].minor.yy0, yymsp[0].minor.yy93, NULL, TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
break;
case 277: /* cmd ::= KILL CONNECTION INTEGER */
case 280: /* cmd ::= KILL CONNECTION INTEGER */
{setKillSql(pInfo, TSDB_SQL_KILL_CONNECTION, &yymsp[0].minor.yy0);}
break;
case 278: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */
case 281: /* cmd ::= KILL STREAM INTEGER COLON INTEGER */
{yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_STREAM, &yymsp[-2].minor.yy0);}
break;
case 279: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */
case 282: /* cmd ::= KILL QUERY INTEGER COLON INTEGER */
{yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setKillSql(pInfo, TSDB_SQL_KILL_QUERY, &yymsp[-2].minor.yy0);}
break;
default:
......
......@@ -193,7 +193,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_DB_IN_DROPPING, "Database not availabl
TAOS_DEFINE_ERROR(TSDB_CODE_MND_VGROUP_NOT_READY, "Database unsynced")
TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_DB_OPTION_DAYS, "Invalid database option: days out of range")
TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_DB_OPTION_KEEP, "Invalid database option: keep >= keep1 >= keep0 >= days")
TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_DB_OPTION_KEEP, "Invalid database option: keep2 >= keep1 >= keep0 >= days")
TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_TOPIC, "Invalid topic name")
TAOS_DEFINE_ERROR(TSDB_CODE_MND_INVALID_TOPIC_OPTION, "Invalid topic option")
......
......@@ -72,9 +72,9 @@ class TDTestCase:
tdSql.query('show databases')
tdSql.checkData(0,7,'3650,3650,3650')
tdSql.error('alter database db keep 10')
tdSql.execute('alter database db keep 10')
tdSql.query('show databases')
tdSql.checkData(0,7,'3650,3650,3650')
tdSql.checkData(0,7,'10,10,10')
## the order for altering keep is keep(D), keep0, keep1.
## if the order is changed, please modify the following test
......@@ -84,17 +84,17 @@ class TDTestCase:
tdSql.query('show databases')
tdSql.checkData(0,7,'10,10,10')
tdSql.execute('alter database db keep 100, 98 ,99')
tdSql.error('alter database db keep 100, 98 ,99')
tdSql.query('show databases')
tdSql.checkData(0,7,'98,99,100')
tdSql.checkData(0,7,'10,10,10')
tdSql.execute('alter database db keep 200, 200 ,200')
tdSql.query('show databases')
tdSql.checkData(0,7,'200,200,200')
tdSql.error('alter database db keep 198, 199 ,200')
tdSql.execute('alter database db keep 198, 199 ,200')
tdSql.query('show databases')
tdSql.checkData(0,7,'200,200,200')
tdSql.checkData(0,7,'198,199,200')
# tdSql.execute('alter database db keep 3650,3650,3650')
# tdSql.error('alter database db keep 4000,3640')
......
......@@ -112,21 +112,21 @@ endi
sql alter database db keep 30
sql show databases
print keep $data7_db
if $data7_db != 20,20,30 then
if $data7_db != 30,30,30 then
return -1
endi
sql alter database db keep 40
sql show databases
print keep $data7_db
if $data7_db != 20,20,40 then
if $data7_db != 40,40,40 then
return -1
endi
sql alter database db keep 40
sql alter database db keep 30
sql alter database db keep 40,50
sql alter database db keep 30,31
sql alter database db keep 20
sql_error alter database db keep 10
sql_error alter database db keep 10.0
sql_error alter database db keep 9
sql_error alter database db keep 1
sql_error alter database db keep 0
......
......@@ -367,7 +367,7 @@ sql_error topic db keep 30
sql alter database db keep 30
sql show databases
print keep $data7_db
if $data7_db != 20,20,30 then
if $data7_db != 30,30,30 then
return -1
endi
......@@ -375,14 +375,14 @@ sql_error alter topic db keep 40
sql alter database db keep 40
sql show databases
print keep $data7_db
if $data7_db != 20,20,40 then
if $data7_db != 40,40,40 then
return -1
endi
sql alter database db keep 40
sql alter database db keep 30
sql alter database db keep 20
sql_error alter database db keep 10
sql_error alter database db keep 10.0
sql_error alter database db keep 9
sql_error alter database db keep 1
sql_error alter database db keep 0
......
......@@ -88,7 +88,7 @@ print =============== step2 - no db
#11
system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'show databases' 127.0.0.1:7111/rest/sql
print 11-> $system_content
if $system_content != @{"status":"succ","head":["name","created_time","ntables","vgroups","replica","quorum","days","keep0,keep1,keep(D)","cache(MB)","blocks","minrows","maxrows","wallevel","fsync","comp","cachelast","precision","update","status"],"column_meta":[["name",8,32],["created_time",9,8],["ntables",4,4],["vgroups",4,4],["replica",3,2],["quorum",3,2],["days",3,2],["keep0,keep1,keep(D)",8,24],["cache(MB)",4,4],["blocks",4,4],["minrows",4,4],["maxrows",4,4],["wallevel",2,1],["fsync",4,4],["comp",2,1],["cachelast",2,1],["precision",8,3],["update",2,1],["status",8,10]],"data":[],"rows":0}@ then
if $system_content != @{"status":"succ","head":["name","created_time","ntables","vgroups","replica","quorum","days","keep0,keep1,keep2","cache(MB)","blocks","minrows","maxrows","wallevel","fsync","comp","cachelast","precision","update","status"],"column_meta":[["name",8,32],["created_time",9,8],["ntables",4,4],["vgroups",4,4],["replica",3,2],["quorum",3,2],["days",3,2],["keep0,keep1,keep2",8,24],["cache(MB)",4,4],["blocks",4,4],["minrows",4,4],["maxrows",4,4],["wallevel",2,1],["fsync",4,4],["comp",2,1],["cachelast",2,1],["precision",8,3],["update",2,1],["status",8,10]],"data":[],"rows":0}@ then
return -1
endi
......
......@@ -20,8 +20,82 @@ $db = $dbPrefix . $i
$mt = $mtPrefix . $i
sql drop database if exists $db
sql create database $db
sql create database $db days 10 keep 20,20,20
sql use $db
sql_error alter database $db keep "20"
sql_error alter database $db keep "20","20","20"
sql_error alter database $db keep 20,19
sql_error alter database $db keep 20.0
sql_error alter database $db keep 20.0,20.0,20.0
sql_error alter database $db keep 0,0,0
sql_error alter database $db keep -1,-1,-1
sql_error alter database $db keep 9,20
sql_error alter database $db keep 9,9,9
sql_error alter database $db keep 20,20,19
sql_error alter database $db keep 20,19,20
sql_error alter database $db keep 20,19,19
sql_error alter database $db keep 20,19,18
sql_error alter database $db keep 20,20,20,20
sql_error alter database $db keep 365001,365001,365001
sql alter database $db keep 21
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 21,21,21 then
return -1
endi
sql alter database $db keep 11,12
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11,12,12 then
return -1
endi
sql alter database $db keep 20,20,20
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 20,20,20 then
return -1
endi
sql alter database $db keep 10,10,10
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 10,10,10 then
return -1
endi
sql alter database $db keep 10,10,11
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 10,10,11 then
return -1
endi
sql alter database $db keep 11,12,13
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11,12,13 then
return -1
endi
sql alter database $db keep 365000,365000,365000
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 365000,365000,365000 then
return -1
endi
##### alter table test, simeplest case
sql create table tb (ts timestamp, c1 int, c2 int, c3 int)
sql insert into tb values (now, 1, 1, 1)
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 100
sql connect
$dbPrefix = m_alt_db
$tbPrefix = m_alt_tb
$mtPrefix = m_alt_mt
$tbNum = 10
$rowNum = 5
$totalNum = $tbNum * $rowNum
$ts0 = 1537146000000
$delta = 600000
print ========== alter.sim
$i = 0
$db = $dbPrefix . $i
$mt = $mtPrefix . $i
sql drop database if exists $db
sql create database $db days 10 keep 20
sql use $db
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 20 then
return -1
endi
sql_error alter database $db keep "20"
sql_error alter database $db keep "20","20","20"
sql_error alter database $db keep 0
sql_error alter database $db keep 20.0
sql_error alter database $db keep 20.0,20.0,20.0
sql_error alter database $db keep 0,0,0
sql_error alter database $db keep 3
sql_error alter database $db keep -1,-1,-1
sql_error alter database $db keep 20,20
sql_error alter database $db keep 9,9,9
sql_error alter database $db keep 20,20,19
sql_error alter database $db keep 20,19,20
sql_error alter database $db keep 20,19,19
sql_error alter database $db keep 20,19,18
sql_error alter database $db keep 20,20,20,20
sql_error alter database $db keep 365001,365001,365001
sql_error alter database $db keep 365001
sql alter database $db keep 20
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 20 then
return -1
endi
sql alter database $db keep 10
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 10 then
return -1
endi
sql alter database $db keep 11
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11 then
return -1
endi
sql alter database $db keep 13
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 13 then
return -1
endi
sql alter database $db keep 365000
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 365000 then
return -1
endi
##### alter table test, simeplest case
sql create table tb (ts timestamp, c1 int, c2 int, c3 int)
sql insert into tb values (now, 1, 1, 1)
sql select * from tb order by ts desc
if $rows != 1 then
return -1
endi
sql alter table tb drop column c3
sql select * from tb order by ts desc
if $data01 != 1 then
return -1
endi
if $data02 != 1 then
return -1
endi
if $data03 != null then
return -1
endi
sql alter table tb add column c3 nchar(4)
sql select * from tb order by ts desc
if $rows != 1 then
return -1
endi
if $data03 != NULL then
return -1
endi
sql insert into tb values (now, 2, 2, 'taos')
sql select * from tb order by ts desc
if $rows != 2 then
return -1
endi
print data03 = $data03
if $data03 != taos then
print expect taos, actual: $data03
return -1
endi
sql drop table tb
##### alter metric test, simplest case
sql create table mt (ts timestamp, c1 int, c2 int, c3 int) tags (t1 int)
sql create table tb using mt tags(1)
sql insert into tb values (now, 1, 1, 1)
sql alter table mt drop column c3
sql select * from tb order by ts desc
if $data01 != 1 then
return -1
endi
if $data02 != 1 then
return -1
endi
if $data03 != null then
return -1
endi
sql alter table mt add column c3 nchar(4)
sql select * from tb order by ts desc
if $data03 != NULL then
return -1
endi
sql insert into tb values (now, 2, 2, 'taos')
sql select * from tb order by ts desc
if $rows != 2 then
return -1
endi
if $data03 != taos then
return -1
endi
if $data13 != NULL then
return -1
endi
sql drop table tb
sql drop table mt
## [TBASE272]
sql create table tb (ts timestamp, c1 int, c2 int, c3 int)
sql insert into tb values (now, 1, 1, 1)
sql alter table tb drop column c3
sql alter table tb add column c3 nchar(5)
sql insert into tb values(now, 2, 2, 'taos')
sql drop table tb
sql create table mt (ts timestamp, c1 int, c2 int, c3 int) tags (t1 int)
sql create table tb using mt tags(1)
sql insert into tb values (now, 1, 1, 1)
sql alter table mt drop column c3
sql select * from tb order by ts desc
if $rows != 1 then
return -1
endi
sql drop table tb
sql drop table mt
sleep 100
### ALTER TABLE WHILE STREAMING [TBASE271]
#sql create table tb1 (ts timestamp, c1 int, c2 nchar(5), c3 int)
#sql create table strm as select count(*), avg(c1), first(c2), sum(c3) from tb1 interval(2s)
#sql select * from strm
#if $rows != 0 then
# return -1
#endi
##sleep 12000
#sql insert into tb1 values (now, 1, 'taos', 1)
#sleep 20000
#sql select * from strm
#print rows = $rows
#if $rows != 1 then
# return -1
#endi
#if $data04 != 1 then
# return -1
#endi
#sql alter table tb1 drop column c3
#sleep 500
#sql insert into tb1 values (now, 2, 'taos')
#sleep 30000
#sql select * from strm
#if $rows != 2 then
# return -1
#endi
#if $data04 != 1 then
# return -1
#endi
#sql alter table tb1 add column c3 int
#sleep 500
#sql insert into tb1 values (now, 3, 'taos', 3);
#sleep 100
#sql select * from strm
#if $rows != 3 then
# return -1
#endi
#if $data04 != 1 then
# return -1
#endi
## ALTER TABLE AND INSERT BY COLUMNS
sql create table mt (ts timestamp, c1 int, c2 int) tags(t1 int)
sql create table tb using mt tags(0)
sql insert into tb values (now-1m, 1, 1)
sql alter table mt drop column c2
sql_error insert into tb (ts, c1, c2) values (now, 2, 2)
sql insert into tb (ts, c1) values (now, 2)
sql select * from tb order by ts desc
if $rows != 2 then
return -1
endi
if $data01 != 2 then
return -1
endi
if $data02 != null then
return -1
endi
sql alter table mt add column c2 int
sql insert into tb (ts, c2) values (now, 3)
sql select * from tb order by ts desc
if $data02 != 3 then
return -1
endi
## ALTER TABLE AND IMPORT
sql drop database $db
sql create database $db
sql use $db
sql create table mt (ts timestamp, c1 int, c2 nchar(7), c3 int) tags (t1 int)
sql create table tb using mt tags(1)
sleep 100
sql insert into tb values ('2018-11-01 16:30:00.000', 1, 'insert', 1)
sql alter table mt drop column c3
sql insert into tb values ('2018-11-01 16:29:59.000', 1, 'insert')
sql import into tb values ('2018-11-01 16:29:59.000', 1, 'import')
sql select * from tb order by ts desc
if $data01 != 1 then
return -1
endi
if $data02 != insert then
return -1
endi
sql alter table mt add column c3 nchar(4)
sql select * from tb order by ts desc
if $data03 != NULL then
return -1
endi
print ============================>TD-3366 TD-3486
sql insert into td_3366(ts, c3, c1) using mt(t1) tags(911) values('2018-1-1 11:11:11', 'new1', 12);
sql insert into td_3486(ts, c3, c1) using mt(t1) tags(-12) values('2018-1-1 11:11:11', 'new1', 12);
sql insert into ttxu(ts, c3, c1) using mt(t1) tags('-121') values('2018-1-1 11:11:11', 'new1', 12);
sql insert into tb(ts, c1, c3) using mt(t1) tags(123) values('2018-11-01 16:29:58.000', 2, 'port')
sql insert into tb values ('2018-11-01 16:29:58.000', 2, 'import', 3)
sql import into tb values ('2018-11-01 16:29:58.000', 2, 'import', 3)
sql import into tb values ('2018-11-01 16:39:58.000', 2, 'import', 3)
sql select * from tb order by ts desc
if $rows != 4 then
return -1
endi
if $data03 != 3 then
return -1
endi
##### ILLEGAL OPERATIONS
# try dropping columns that are defined in metric
sql_error alter table tb drop column c1;
# try dropping primary key
sql_error alter table mt drop column ts;
# try modifying two columns in a single statement
sql_error alter table mt add column c5 nchar(3) c6 nchar(4)
# duplicate columns
sql_error alter table mt add column c1 int
# drop non-existing columns
sql_error alter table mt drop column c9
#sql drop database $db
#sql show databases
#if $rows != 0 then
# return -1
#endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
......@@ -102,7 +102,7 @@ print create_db.sim case5: db_meta_data test
# cfg params
$replica = 1 # max=3
$days = 10
$keep = 365
$keep = 365,365,365
$rows_db = 1000
$cache = 16 # 16MB
$ablocks = 100
......@@ -150,6 +150,73 @@ sql_error create database $db day 3651
# keep [1, infinity]
sql_error create database $db keep 0
sql_error create database $db keep 0,0,0
sql_error create database $db keep 3,3,3
sql_error create database $db keep 11.0
sql_error create database $db keep 11.0,11.0,11.0
sql_error create database $db keep "11","11","11"
sql_error create database $db keep "11"
sql_error create database $db keep 13,12,11
sql_error create database $db keep 11,12,11
sql_error create database $db keep 12,11,12
sql_error create database $db keep 8
sql_error create database $db keep 12,11
sql_error create database $db keep 365001,365001,365001
sql create database dbk0 keep 19
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 19,19,19 then
return -1
endi
sql drop database dbk0
sql create database dbka keep 19,20
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 19,20,20 then
return -1
endi
sql drop database dbka
sql create database dbk1 keep 11,11,11
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11,11,11 then
return -1
endi
sql drop database dbk1
sql create database dbk2 keep 11,12,13
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11,12,13 then
return -1
endi
sql drop database dbk2
sql create database dbk3 keep 11,11,13
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11,11,13 then
return -1
endi
sql drop database dbk3
sql create database dbk4 keep 11,13,13
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11,13,13 then
return -1
endi
sql drop database dbk4
#sql_error create database $db keep 3651
# rows [200, 10000]
......
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start
sleep 100
sql connect
print ======================== dnode1 start
$dbPrefix = fi_in_db
$tbPrefix = fi_in_tb
$mtPrefix = fi_in_mt
$tbNum = 10
$rowNum = 20
$totalNum = 200
print excuting test script create_db.sim
print =============== set up
$i = 0
$db = $dbPrefix . $i
$mt = $mtPrefix . $i
sql_error createdatabase $db
sql create database $db
sql use $db
sql show databases
if $rows != 1 then
return -1
endi
if $data00 != $db then
return -1
endi
sql drop database $db
# case1: case_insensitivity test
print =========== create_db.sim case1: case insensitivity test
sql_error CREATEDATABASE $db
sql CREATE DATABASE $db
sql use $db
sql show databases
if $rows != 1 then
return -1
endi
if $data00 != $db then
return -1
endi
sql drop database $db
print case_insensitivity test passed
# case2: illegal_db_name test
print =========== create_db.sim case2: illegal_db_name test
$illegal_db1 = 1db
$illegal_db2 = d@b
sql_error create database $illegal_db1
sql_error create database $illegal_db2
print illegal_db_name test passed
# case3: chinese_char_in_db_name test
print ========== create_db.sim case3: chinese_char_in_db_name test
$CN_db1 = 数据库
$CN_db2 = 数据库1
$CN_db3 = db数据库1
sql_error create database $CN_db1
sql_error create database $CN_db2
sql_error create database $CN_db3
#sql show databases
#if $rows != 3 then
# return -1
#endi
#if $data00 != $CN_db1 then
# return -1
#endi
#if $data10 != $CN_db2 then
# return -1
#endi
#if $data20 != $CN_db3 then
# return -1
#endi
#sql drop database $CN_db1
#sql drop database $CN_db2
#sql drop database $CN_db3
print case_chinese_char_in_db_name test passed
# case4: db_already_exists
print create_db.sim case4: db_already_exists
sql create database db0
sql create database db0
sql show databases
if $rows != 1 then
return -1
endi
sql drop database db0
print db_already_exists test passed
# case5: db_meta_data
print create_db.sim case5: db_meta_data test
# cfg params
$replica = 1 # max=3
$days = 10
$keep = 365
$rows_db = 1000
$cache = 16 # 16MB
$ablocks = 100
$tblocks = 32 # max=512, automatically trimmed when exceeding
$ctime = 36000 # 10 hours
$wal = 1 # valid value is 1, 2
$comp = 1 # max=32, automatically trimmed when exceeding
sql create database $db replica $replica days $days keep $keep maxrows $rows_db cache $cache blocks 4 ctime $ctime wal $wal comp $comp
sql show databases
if $rows != 1 then
return -1
endi
if $data00 != $db then
return -1
endi
if $data04 != $replica then
return -1
endi
if $data06 != $days then
return -1
endi
if $data07 != 365 then
return -1
endi
print data08 = $data07
if $data08 != $cache then
print expect $cache, actual:$data08
return -1
endi
if $data09 != 4 then
return -1
endi
sql drop database $db
## param range tests
# replica [1,3]
#sql_error create database $db replica 0
sql_error create database $db replica 4
# day [1, 3650]
sql_error create database $db day 0
sql_error create database $db day 3651
# keep [1, infinity]
sql_error create database $db keep 0
sql_error create database $db keep 0,0,0
sql_error create database $db keep 3,3,3
sql_error create database $db keep 3
sql_error create database $db keep 11.0
sql_error create database $db keep 11.0,11.0,11.0
sql_error create database $db keep "11","11","11"
sql_error create database $db keep "11"
sql_error create database $db keep 13,12,11
sql_error create database $db keep 11,12,11
sql_error create database $db keep 12,11,12
sql_error create database $db keep 11,12,13
sql_error create database $db keep 11,12,13,14
sql_error create database $db keep 11,11
sql_error create database $db keep 365001,365001,365001
sql_error create database $db keep 365001
sql create database dbk1 keep 11
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11 then
return -1
endi
sql drop database dbk1
sql create database dbk2 keep 12
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 12 then
return -1
endi
sql drop database dbk2
sql create database dbk3 keep 11
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 11 then
return -1
endi
sql drop database dbk3
sql create database dbk4 keep 13
sql show databases
if $rows != 1 then
return -1
endi
if $data07 != 13 then
return -1
endi
sql drop database dbk4
#sql_error create database $db keep 3651
# rows [200, 10000]
sql_error create database $db maxrows 199
#sql_error create database $db maxrows 10001
# cache [100, 10485760]
sql_error create database $db cache 0
#sql_error create database $db cache 10485761
# blocks [32, 4096 overwriten by 4096 if exceeds, Note added:2018-10-24]
#sql_error create database $db tblocks 31
#sql_error create database $db tblocks 4097
# ctime [30, 40960]
sql_error create database $db ctime 29
sql_error create database $db ctime 40961
# wal {0, 2}
#sql_error create database $db wal 0
sql_error create database $db wal -1
sql_error create database $db wal 3
# comp {0, 1, 2}
sql_error create database $db comp -1
sql_error create database $db comp 3
sql_error drop database $db
sql show databases
if $rows != 0 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
......@@ -124,4 +124,4 @@ if $rows != 10000 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
......@@ -367,4 +367,4 @@ if $data35 != 5 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
......@@ -902,4 +902,4 @@ sql_error select first(c1), count(*), t2, t1, tbname from select_tags_mt0 group
#sql select count(c1) from select_tags_mt0 where c1=99 group by tbname;
#sql select count(*),tbname from select_tags_mt0 group by tbname
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
......@@ -175,7 +175,7 @@ if $data21 != 2.10000 then
endi
print =====================td-1302 case
sql create database t1 keep 36500;
sql create database t1 keep 36500
sql use t1;
sql create table test(ts timestamp, k int);
sql insert into test values(29999, 1)(70000, 2)(80000, 3)
......@@ -194,7 +194,7 @@ if $rows != 3 then
endi
print ==============>td-1308
sql create database db keep 36500;
sql create database db keep 36500
sql use db;
sql create table stb (ts timestamp, c1 int, c2 binary(10)) tags(t1 binary(10));
......@@ -377,4 +377,4 @@ sql_error select * from ttm2 where k<>null
sql_error select * from ttm2 where k like null
sql_error select * from ttm2 where k<null
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
......@@ -424,6 +424,10 @@ cd ../../../debug; make
./test.sh -f general/parser/stableOp.sim
./test.sh -f general/parser/timestamp.sim
./test.sh -f general/parser/sliding.sim
./test.sh -f general/parser/having.sim
./test.sh -f general/parser/having_child.sim
./test.sh -f general/parser/between_and.sim
./test.sh -f general/parser/last_cache.sim
./test.sh -f unique/big/balance.sim
#======================b7-end===============
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册