提交 23cbcfe0 编写于 作者: S slguan

Parameters can be out of order when creating a database

上级 139af8e4
......@@ -2331,7 +2331,8 @@ static void percentile_finalizer(SQLFunctionCtx *pCtx) {
tMemBucketDestroy((tMemBucket **)&(pCtx->intermediateBuf[1].pz));
tOrderDescDestroy(pCtx->intermediateBuf[2].pz);
assert(pCtx->intermediateBuf[1].pz == NULL);
pCtx->intermediateBuf[1].pz = NULL;
pCtx->intermediateBuf[2].pz = NULL;
}
static bool apercentile_function(SQLFunctionCtx *pCtx) {
......
......@@ -110,6 +110,7 @@ static bool hasTimestampForPointInterpQuery(SSqlCmd* pCmd);
static void updateTagColumnIndex(SSqlCmd* pCmd);
static int32_t setLimitOffsetValueInfo(SSqlObj* pSql, SQuerySQL* pQuerySql);
static void addRequiredTagColumn(SSqlCmd* pCmd, int32_t tagColIndex);
static int32_t parseCreateDBOptions(SCreateDBInfo* pCreateDbSql, SSqlCmd* pCmd);
static int32_t tscQueryOnlyMetricTags(SSqlCmd* pCmd, bool* queryOnMetricTags) {
assert(pCmd->metricQuery == 1);
......@@ -240,8 +241,6 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) {
case CREATE_DATABASE: {
char msg2[] = "name too long";
char msg3[] = "invalid db name";
char msg4[] = "invalid time precision";
int32_t STORAGE_LEVEL = 3;
if (pInfo->sqlType == ALTER_DATABASE) {
pCmd->command = TSDB_SQL_ALTER_DB;
......@@ -250,7 +249,7 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) {
pCmd->existsCheck = (pInfo->pDCLInfo->a[0].n == 1);
}
SCreateDBSQL* pCreateDB = &(pInfo->pDCLInfo->dbOpt);
SCreateDBInfo* pCreateDB = &(pInfo->pDCLInfo->dbOpt);
if (tscValidateName(&pCreateDB->dbname) != TSDB_CODE_SUCCESS) {
setErrMsg(pCmd, msg3, tListLen(msg3));
return TSDB_CODE_INVALID_SQL;
......@@ -262,57 +261,10 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) {
return ret;
}
/* in case of TSDB_SQL_ALTER_DB, other parameters will be ignore by mnode.*/
pCmd->defaultVal[0] = pCreateDB->nReplica;
pCmd->defaultVal[1] = pCreateDB->nDays;
pCmd->defaultVal[3] = pCreateDB->nRowsInFileBlock;
pCmd->defaultVal[4] = pCreateDB->nCacheBlockSize;
pCmd->defaultVal[5] = pCreateDB->numOfBlocksPerTable;
pCmd->defaultVal[6] = pCreateDB->nTablesPerVnode;
pCmd->defaultVal[7] = pCreateDB->commitTime;
pCmd->defaultVal[8] = pCreateDB->commitLog;
pCmd->defaultVal[9] = pCreateDB->compressionLevel;
*(double*)&(pCmd->defaultVal[10]) = pCreateDB->nCacheNumOfBlocks;
if (pCreateDB->keep != NULL) {
pCmd->defaultVal[11] = pCreateDB->keep->nExpr;
for (int32_t i = 0; i < STORAGE_LEVEL; ++i) {
if (i < pCreateDB->keep->nExpr) {
pCmd->defaultVal[12 + i] = pCreateDB->keep->a[i].pVar.i64Key;
} else {
pCmd->defaultVal[12 + i] = pCreateDB->keep->a[0].pVar.i64Key;
}
}
} else {
for (int32_t i = 0; i < STORAGE_LEVEL; ++i) {
pCmd->defaultVal[12 + i] = -1;
}
if (parseCreateDBOptions(pCreateDB, pCmd) != TSDB_CODE_SUCCESS) {
return TSDB_CODE_INVALID_SQL;
}
/* force to set 3 */
pCmd->defaultVal[11] = 3;
const int32_t TIME_PRECISION_INDEX = 15;
if (pCreateDB->precision.n > 0) {
if (strncmp(pCreateDB->precision.z, TSDB_TIME_PRECISION_MILLI_STR, pCreateDB->precision.n) == 0 &&
strlen(TSDB_TIME_PRECISION_MILLI_STR) == pCreateDB->precision.n) {
/*time precision for this db: million second */
pCmd->defaultVal[TIME_PRECISION_INDEX] = TSDB_TIME_PRECISION_MILLI;
} else if (strncmp(pCreateDB->precision.z, TSDB_TIME_PRECISION_MICRO_STR, pCreateDB->precision.n) == 0 &&
strlen(TSDB_TIME_PRECISION_MICRO_STR) == pCreateDB->precision.n) {
pCmd->defaultVal[TIME_PRECISION_INDEX] = TSDB_TIME_PRECISION_MICRO;
} else {
setErrMsg(pCmd, msg4, tListLen(msg4));
return TSDB_CODE_INVALID_SQL;
}
} else { // millisecond by default
pCmd->defaultVal[TIME_PRECISION_INDEX] = TSDB_TIME_PRECISION_MILLI;
}
break;
}
......@@ -3967,3 +3919,72 @@ int32_t setLimitOffsetValueInfo(SSqlObj* pSql, SQuerySQL* pQuerySql) {
return TSDB_CODE_SUCCESS;
}
static void setCreateDBOption(SCreateDbMsg* pMsg, SCreateDBInfo* pCreateDb) {
pMsg->precision = TSDB_TIME_PRECISION_MILLI; // millisecond by default
pMsg->daysToKeep = htonl(-1);
pMsg->daysToKeep1 = htonl(-1);
pMsg->daysToKeep2 = htonl(-1);
pMsg->blocksPerMeter = (pCreateDb->numOfBlocksPerTable == 0) ? htons(-1) : htons(pCreateDb->numOfBlocksPerTable);
pMsg->compression = (pCreateDb->compressionLevel == 0) ? -1 : pCreateDb->numOfAvgCacheBlocks;
pMsg->commitLog = (pCreateDb->commitLog == 0) ? -1 : pCreateDb->numOfAvgCacheBlocks;
pMsg->commitTime = (pCreateDb->commitTime == 0) ? htonl(-1) : htonl(pCreateDb->commitTime);
pMsg->maxSessions = (pCreateDb->tablesPerVnode == 0) ? htonl(-1) : htonl(pCreateDb->tablesPerVnode);
pMsg->cacheNumOfBlocks.fraction = (pCreateDb->numOfAvgCacheBlocks == 0) ? -1 : pCreateDb->numOfAvgCacheBlocks;
pMsg->cacheBlockSize = (pCreateDb->cacheBlockSize == 0) ? htonl(-1) : htonl(pCreateDb->cacheBlockSize);
pMsg->rowsInFileBlock = (pCreateDb->rowPerFileBlock == 0) ? htonl(-1) : htonl(pCreateDb->rowPerFileBlock);
pMsg->daysPerFile = (pCreateDb->daysPerFile == 0) ? htonl(-1) : htonl(pCreateDb->daysPerFile);
pMsg->replications = (pCreateDb->replica == 0) ? -1 : pCreateDb->replica;
}
int32_t parseCreateDBOptions(SCreateDBInfo* pCreateDbSql, SSqlCmd* pCmd) {
char msg0[] = "invalid number of options";
char msg1[] = "invalid time precision";
SCreateDbMsg *pMsg = (SCreateDbMsg *) (pCmd->payload + tsRpcHeadSize + sizeof(SMgmtHead));
setCreateDBOption(pMsg, pCreateDbSql);
if (pCreateDbSql->keep != NULL) {
switch (pCreateDbSql->keep->nExpr) {
case 1:pMsg->daysToKeep = htonl(pCreateDbSql->keep->a[0].pVar.i64Key);
break;
case 2: {
pMsg->daysToKeep = htonl(pCreateDbSql->keep->a[0].pVar.i64Key);
pMsg->daysToKeep1 = htonl(pCreateDbSql->keep->a[1].pVar.i64Key);
break;
}
case 3: {
pMsg->daysToKeep = htonl(pCreateDbSql->keep->a[0].pVar.i64Key);
pMsg->daysToKeep1 = htonl(pCreateDbSql->keep->a[1].pVar.i64Key);
pMsg->daysToKeep2 = htonl(pCreateDbSql->keep->a[2].pVar.i64Key);
break;
}
default: {
setErrMsg(pCmd, msg0, tListLen(msg0));
return TSDB_CODE_INVALID_SQL;
}
}
}
SSQLToken *pToken = &pCreateDbSql->precision;
if (pToken->n > 0) {
pToken->n = strdequote(pToken->z);
if (strncmp(pToken->z, TSDB_TIME_PRECISION_MILLI_STR, pToken->n) == 0 &&
strlen(TSDB_TIME_PRECISION_MILLI_STR) == pToken->n) {
// time precision for this db: million second
pMsg->precision = TSDB_TIME_PRECISION_MILLI;
} else if (strncmp(pToken->z, TSDB_TIME_PRECISION_MICRO_STR, pToken->n) == 0 &&
strlen(TSDB_TIME_PRECISION_MICRO_STR) == pToken->n) {
pMsg->precision = TSDB_TIME_PRECISION_MICRO;
} else {
setErrMsg(pCmd, msg1, tListLen(msg1));
return TSDB_CODE_INVALID_SQL;
}
}
return TSDB_CODE_SUCCESS;
}
\ No newline at end of file
......@@ -369,6 +369,26 @@ void tVariantListDestroy(tVariantList *pList) {
free(pList);
}
tVariantList *tVariantListAppendToken(tVariantList *pList, SSQLToken *pAliasToken, uint8_t sortOrder) {
if (pList == NULL) {
pList = calloc(1, sizeof(tVariantList));
}
if (tVariantListExpand(pList) == NULL) {
return pList;
}
if (pAliasToken) {
tVariant t = {0};
tVariantCreate(&t, pAliasToken);
tVariantListItem *pItem = &pList->a[pList->nExpr++];
memcpy(pItem, &t, sizeof(tVariant));
pItem->sortOrder = sortOrder;
}
return pList;
}
tFieldList *tFieldListAppend(tFieldList *pList, TAOS_FIELD *pField) {
if (pList == NULL) pList = calloc(1, sizeof(tFieldList));
......@@ -650,7 +670,7 @@ void setDCLSQLElems(SSqlInfo *pInfo, int32_t type, int32_t nParam, ...) {
va_end(va);
}
void setCreateDBSQL(SSqlInfo *pInfo, int32_t type, SSQLToken *pToken, SCreateDBSQL *pDB, SSQLToken *pIgExists) {
void setCreateDBSQL(SSqlInfo *pInfo, int32_t type, SSQLToken *pToken, SCreateDBInfo *pDB, SSQLToken *pIgExists) {
pInfo->sqlType = type;
if (pInfo->pDCLInfo == NULL) {
pInfo->pDCLInfo = calloc(1, sizeof(tDCLSQL));
......
......@@ -1362,39 +1362,6 @@ int tscBuildCreateDbMsg(SSqlObj *pSql) {
pCreateDbMsg = (SCreateDbMsg *)pMsg;
strcpy(pCreateDbMsg->db, pCmd->name);
pCreateDbMsg->replications = pCmd->defaultVal[0];
pCreateDbMsg->daysPerFile = htonl(pCmd->defaultVal[1]);
pCreateDbMsg->rowsInFileBlock = htonl(pCmd->defaultVal[3]);
pCreateDbMsg->cacheBlockSize = htonl(pCmd->defaultVal[4]);
pCreateDbMsg->blocksPerMeter = htons(pCmd->defaultVal[5]);
pCreateDbMsg->maxSessions = htonl(pCmd->defaultVal[6]);
pCreateDbMsg->commitTime = htonl(pCmd->defaultVal[7]);
pCreateDbMsg->commitLog = pCmd->defaultVal[8];
pCreateDbMsg->compression = pCmd->defaultVal[9];
pCreateDbMsg->cacheNumOfBlocks.fraction = *(double *)&(pCmd->defaultVal[10]);
int32_t n = pCmd->defaultVal[11];
switch (n) {
case 1:
pCreateDbMsg->daysToKeep = htonl(pCmd->defaultVal[12]);
break;
case 2: {
pCreateDbMsg->daysToKeep = htonl(pCmd->defaultVal[12]);
pCreateDbMsg->daysToKeep1 = htonl(pCmd->defaultVal[13]);
break;
}
case 3: {
pCreateDbMsg->daysToKeep = htonl(pCmd->defaultVal[12]);
pCreateDbMsg->daysToKeep1 = htonl(pCmd->defaultVal[13]);
pCreateDbMsg->daysToKeep2 = htonl(pCmd->defaultVal[14]);
break;
}
}
pCreateDbMsg->precision = pCmd->defaultVal[15];
pMsg += sizeof(SCreateDbMsg);
msgLen = pMsg - pStart;
......
......@@ -152,56 +152,39 @@ cmd ::= CREATE USER ids(X) PASS ids(Y). { setDCLSQLElems(pInfo, CREATE_USER,
%type keep {tVariantList*}
%destructor keep {tVariantListDestroy($$);}
keep(Y) ::= . {Y = 0; }
keep(Y) ::= KEEP tagitemlist(X). {Y = X; }
replica(Y) ::= . {Y.n = 0; }
replica(Y) ::= REPLICA INTEGER(X). {Y = X; }
day(Y) ::= . {Y.n = 0; }
day(Y) ::= DAYS INTEGER(X). {Y = X; }
rows(Y) ::= ROWS INTEGER(X). {Y = X; }
rows(Y) ::= . {Y.n = 0; }
cache(Y) ::= CACHE INTEGER(X). {Y = X; }
cache(Y) ::= . {Y.n = 0; }
ablocks(Y) ::= ABLOCKS ID(X). {Y = X; }
ablocks(Y) ::= . {Y.n = 0; }
tblocks(Y) ::= TBLOCKS INTEGER(X). {Y = X; }
tblocks(Y) ::= . {Y.n = 0; }
tables(Y) ::= TABLES INTEGER(X). {Y = X; }
tables(Y) ::= . {Y.n = 0; }
ctime(Y) ::= CTIME INTEGER(X). {Y = X; }
ctime(Y) ::= . {Y.n = 0; }
clog(Y) ::= CLOG INTEGER(X). {Y = X; }
clog(Y) ::= . {Y.n = 0; }
comp(Y) ::= COMP INTEGER(X). {Y = X; }
comp(Y) ::= . {Y.n = 0; }
prec(Y) ::= PRECISION ids(X). {Y = X; }
prec(Y) ::= . {Y.n = 0; }
%type db_optr {SCreateDBSQL}
db_optr(Y) ::= replica(A) day(B) keep(C) rows(D) cache(E) ablocks(F) tblocks(K) tables(G) ctime(H) clog(I) comp(J) prec(L). {
Y.nReplica = (A.n > 0)? atoi(A.z):-1;
Y.nDays = (B.n > 0)? atoi(B.z):-1;
Y.nRowsInFileBlock = (D.n > 0)? atoi(D.z):-1;
Y.nCacheBlockSize = (E.n > 0)? atoi(E.z):-1;
Y.nCacheNumOfBlocks = (F.n > 0)? strtod(F.z, NULL):-1;
Y.numOfBlocksPerTable = (K.n > 0)? atoi(K.z):-1;
Y.nTablesPerVnode = (G.n > 0)? atoi(G.z):-1;
Y.commitTime = (H.n > 0)? atoi(H.z):-1;
Y.commitLog = (I.n > 0)? atoi(I.z):-1;
Y.compressionLevel = (J.n > 0)? atoi(J.z):-1;
Y.keep = C;
Y.precision = L;
}
%type alter_db_optr {SCreateDBSQL}
alter_db_optr(Y) ::= replica(A). {
Y.nReplica = (A.n > 0)? atoi(A.z):0;
keep(Y) ::= KEEP tagitemlist(X). { Y = X; }
tables(Y) ::= TABLES INTEGER(X). { Y = X; }
cache(Y) ::= CACHE INTEGER(X). { Y = X; }
replica(Y) ::= REPLICA INTEGER(X). { Y = X; }
days(Y) ::= DAYS INTEGER(X). { Y = X; }
rows(Y) ::= ROWS INTEGER(X). { Y = X; }
ablocks(Y) ::= ABLOCKS ID(X). { Y = X; }
tblocks(Y) ::= TBLOCKS INTEGER(X). { Y = X; }
ctime(Y) ::= CTIME INTEGER(X). { Y = X; }
clog(Y) ::= CLOG INTEGER(X). { Y = X; }
comp(Y) ::= COMP INTEGER(X). { Y = X; }
prec(Y) ::= PRECISION STRING(X). { Y = X; }
%type db_optr {SCreateDBInfo}
db_optr ::= . {}
db_optr(Y) ::= db_optr(Z) tables(X). { Y = Z; Y.tablesPerVnode = strtol(X.z, NULL, 10); }
db_optr(Y) ::= db_optr(Z) cache(X). { Y = Z; Y.cacheBlockSize = strtol(X.z, NULL, 10); }
db_optr(Y) ::= db_optr(Z) replica(X). { Y = Z; Y.replica = strtol(X.z, NULL, 10); }
db_optr(Y) ::= db_optr(Z) days(X). { Y = Z; Y.daysPerFile = strtol(X.z, NULL, 10); }
db_optr(Y) ::= db_optr(Z) rows(X). { Y = Z; Y.rowPerFileBlock = strtol(X.z, NULL, 10); }
db_optr(Y) ::= db_optr(Z) ablocks(X). { Y = Z; Y.numOfAvgCacheBlocks = strtod(X.z, NULL); }
db_optr(Y) ::= db_optr(Z) tblocks(X). { Y = Z; Y.numOfBlocksPerTable = strtol(X.z, NULL, 10); }
db_optr(Y) ::= db_optr(Z) ctime(X). { Y = Z; Y.commitTime = strtol(X.z, NULL, 10); }
db_optr(Y) ::= db_optr(Z) clog(X). { Y = Z; Y.commitLog = strtol(X.z, NULL, 10); }
db_optr(Y) ::= db_optr(Z) comp(X). { Y = Z; Y.compressionLevel = strtol(X.z, NULL, 10); }
db_optr(Y) ::= db_optr(Z) prec(X). { Y = Z; Y.precision = X; }
db_optr(Y) ::= db_optr(Z) keep(X). { Y = Z; Y.keep = X; }
%type alter_db_optr {SCreateDBInfo}
alter_db_optr(Y) ::= REPLICA tagitem(A). {
Y.replica = A.i64Key;
}
%type typename {TAOS_FIELD}
......@@ -359,11 +342,8 @@ fill_opt(N) ::= FILL LP ID(Y) COMMA tagitemlist(X) RP. {
}
fill_opt(N) ::= FILL LP ID(Y) RP. {
tVariant A = {0};
toTSDBType(Y.type);
tVariantCreate(&A, &Y);
N = tVariantListAppend(NULL, &A, -1);
N = tVariantListAppendToken(NULL, &Y, -1);
}
%type sliding_opt {SSQLToken}
......@@ -386,13 +366,15 @@ sortlist(A) ::= sortlist(X) COMMA item(Y) sortorder(Z). {
A = tVariantListAppend(X, &Y, Z);
}
%type item {tVariant}
sortlist(A) ::= item(Y) sortorder(Z). {
A = tVariantListAppend(NULL, &Y, Z);
}
item(A) ::= ids(X). {
%type item {tVariant}
item(A) ::= ids(X) cpxName(Y). {
toTSDBType(X.type);
X.n += Y.n;
tVariantCreate(&A, &X);
}
......@@ -456,6 +438,7 @@ expr(A) ::= LP expr(X) RP. {A = X; }
expr(A) ::= ID(X). {A = tSQLExprIdValueCreate(&X, TK_ID);}
expr(A) ::= ID(X) DOT ID(Y). {X.n += (1+Y.n); A = tSQLExprIdValueCreate(&X, TK_ID);}
expr(A) ::= ID(X) DOT STAR(Y). {X.n += (1+Y.n); A = tSQLExprIdValueCreate(&X, TK_ALL);}
expr(A) ::= INTEGER(X). {A = tSQLExprIdValueCreate(&X, TK_INTEGER);}
expr(A) ::= MINUS(X) INTEGER(Y). {X.n += Y.n; X.type = TK_INTEGER; A = tSQLExprIdValueCreate(&X, TK_INTEGER);}
......@@ -547,11 +530,7 @@ cmd ::= ALTER TABLE ids(X) cpxName(F) DROP COLUMN ids(A). {
X.n += F.n;
toTSDBType(A.type);
tVariant V;
tVariantCreate(&V, &A);
tVariantList* K = tVariantListAppend(NULL, &V, -1);
tVariantList* K = tVariantListAppendToken(NULL, &A, -1);
SAlterTableSQL* pAlterTable = tAlterTableSQLElems(&X, NULL, K, ALTER_TABLE_DROP_COLUMN);
setSQLInfo(pInfo, pAlterTable, NULL, ALTER_TABLE_DROP_COLUMN);
......@@ -567,11 +546,7 @@ cmd ::= ALTER TABLE ids(X) cpxName(Z) DROP TAG ids(Y). {
X.n += Z.n;
toTSDBType(Y.type);
tVariant V;
tVariantCreate(&V, &Y);
tVariantList* A = tVariantListAppend(NULL, &V, -1);
tVariantList* A = tVariantListAppendToken(NULL, &Y, -1);
SAlterTableSQL* pAlterTable = tAlterTableSQLElems(&X, NULL, A, ALTER_TABLE_TAGS_DROP);
setSQLInfo(pInfo, pAlterTable, NULL, ALTER_TABLE_TAGS_DROP);
......@@ -580,15 +555,11 @@ cmd ::= ALTER TABLE ids(X) cpxName(Z) DROP TAG ids(Y). {
cmd ::= ALTER TABLE ids(X) cpxName(F) CHANGE TAG ids(Y) ids(Z). {
X.n += F.n;
tVariant V;
toTSDBType(Y.type);
tVariantCreate(&V, &Y);
tVariantList* A = tVariantListAppend(NULL, &V, -1);
tVariantList* A = tVariantListAppendToken(NULL, &Y, -1);
toTSDBType(Z.type);
tVariantCreate(&V, &Z);
A = tVariantListAppend(A, &V, -1);
A = tVariantListAppendToken(A, &Z, -1);
SAlterTableSQL* pAlterTable = tAlterTableSQLElems(&X, NULL, A, ALTER_TABLE_TAGS_CHG);
setSQLInfo(pInfo, pAlterTable, NULL, ALTER_TABLE_TAGS_CHG);
......@@ -597,11 +568,8 @@ cmd ::= ALTER TABLE ids(X) cpxName(F) CHANGE TAG ids(Y) ids(Z). {
cmd ::= ALTER TABLE ids(X) cpxName(F) SET ids(Y) EQ tagitem(Z). {
X.n += F.n;
tVariant V;
toTSDBType(Y.type);
tVariantCreate(&V, &Y);
tVariantList* A = tVariantListAppend(NULL, &V, -1);
tVariantList* A = tVariantListAppendToken(NULL, &Y, -1);
A = tVariantListAppend(A, &Z, -1);
SAlterTableSQL* pAlterTable = tAlterTableSQLElems(&X, NULL, A, ALTER_TABLE_TAGS_SET);
......
......@@ -197,23 +197,24 @@ typedef struct SInsertSQL {
struct tSQLExprListList *pValue;
} SInsertSQL;
typedef struct SCreateDBSQL {
typedef struct SCreateDBInfo {
SSQLToken dbname;
int32_t nReplica;
int32_t nDays;
int32_t replica;
int32_t cacheBlockSize;
int32_t tablesPerVnode;
int32_t daysPerFile;
int32_t rowPerFileBlock;
tVariantList *keep;
int32_t nRowsInFileBlock;
int32_t nCacheBlockSize;
float nCacheNumOfBlocks;
int32_t numOfBlocksPerTable;
float numOfAvgCacheBlocks;
int32_t numOfBlocksPerTable;
int32_t nTablesPerVnode;
int64_t commitTime;
int32_t commitLog;
int32_t compressionLevel;
SSQLToken precision; // time precision[ms by default/us]
} SCreateDBSQL;
SSQLToken precision;
tVariantList *keep;
} SCreateDBInfo;
typedef struct SCreateAcctSQL {
int32_t users;
......@@ -233,7 +234,7 @@ typedef struct tDCLSQL {
SSQLToken *a; /* one entry for element */
union {
SCreateDBSQL dbOpt;
SCreateDBInfo dbOpt;
SCreateAcctSQL acctOpt;
};
} tDCLSQL;
......@@ -326,6 +327,7 @@ void Parse(void *yyp, int yymajor, ParseTOKENTYPE yyminor, SSqlInfo *);
*/
void ParseFree(void *p, void (*freeProc)(void *));
tVariantList *tVariantListAppendToken(tVariantList *pList, SSQLToken *pAliasToken, uint8_t sortOrder);
tVariantList *tVariantListAppend(tVariantList *pList, tVariant *pVar, uint8_t sortOrder);
tVariantList *tVariantListInsert(tVariantList *pList, tVariant *pVar, uint8_t sortOrder, int32_t index);
......@@ -371,7 +373,7 @@ void setDCLSQLElems(SSqlInfo *pInfo, int32_t type, int32_t nParams, ...);
tDCLSQL *tTokenListAppend(tDCLSQL *pTokenList, SSQLToken *pToken);
void setCreateDBSQL(SSqlInfo *pInfo, int32_t type, SSQLToken *pToken, SCreateDBSQL *pDB, SSQLToken *pIgExists);
void setCreateDBSQL(SSqlInfo *pInfo, int32_t type, SSQLToken *pToken, SCreateDBInfo *pDB, SSQLToken *pIgExists);
void setCreateAcctSQL(SSqlInfo *pInfo, int32_t type, SSQLToken *pName, SSQLToken *pPwd, SCreateAcctSQL *pAcctInfo);
......
......@@ -91,10 +91,10 @@
#define TK_EXISTS 73
#define TK_CREATE 74
#define TK_KEEP 75
#define TK_REPLICA 76
#define TK_DAYS 77
#define TK_ROWS 78
#define TK_CACHE 79
#define TK_CACHE 76
#define TK_REPLICA 77
#define TK_DAYS 78
#define TK_ROWS 79
#define TK_ABLOCKS 80
#define TK_TBLOCKS 81
#define TK_CTIME 82
......
......@@ -99,7 +99,6 @@ typedef union {
int yyinit;
ParseTOKENTYPE yy0;
SQuerySQL* yy24;
SCreateDBSQL yy54;
tSQLExprList* yy98;
tFieldList* yy151;
tVariantList* yy216;
......@@ -110,6 +109,7 @@ typedef union {
tSQLExpr* yy370;
int yy412;
tSQLExprListList* yy434;
SCreateDBInfo yy478;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
......@@ -119,16 +119,16 @@ typedef union {
#define ParseARG_FETCH SSqlInfo* pInfo = yypParser->pInfo
#define ParseARG_STORE yypParser->pInfo = pInfo
#define YYFALLBACK 1
#define YYNSTATE 227
#define YYNRULE 180
#define YY_MAX_SHIFT 226
#define YY_MIN_SHIFTREDUCE 347
#define YY_MAX_SHIFTREDUCE 526
#define YY_MIN_REDUCE 527
#define YY_MAX_REDUCE 706
#define YY_ERROR_ACTION 707
#define YY_ACCEPT_ACTION 708
#define YY_NO_ACTION 709
#define YYNSTATE 220
#define YYNRULE 181
#define YY_MAX_SHIFT 219
#define YY_MIN_SHIFTREDUCE 350
#define YY_MAX_SHIFTREDUCE 530
#define YY_MIN_REDUCE 531
#define YY_MAX_REDUCE 711
#define YY_ERROR_ACTION 712
#define YY_ACCEPT_ACTION 713
#define YY_NO_ACTION 714
/************* End control #defines *******************************************/
/* The yyzerominor constant is used to initialize instances of
......@@ -200,178 +200,176 @@ static const YYMINORTYPE yyzerominor = { 0 };
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (472)
#define YY_ACTTAB_COUNT (480)
static const YYACTIONTYPE yy_action[] = {
/* 0 */ 379, 32, 31, 708, 226, 30, 29, 28, 380, 69,
/* 10 */ 70, 76, 39, 41, 513, 33, 34, 221, 25, 71,
/* 20 */ 27, 19, 124, 193, 37, 35, 38, 36, 220, 435,
/* 30 */ 150, 509, 32, 31, 142, 225, 30, 29, 28, 39,
/* 40 */ 41, 431, 33, 34, 428, 423, 429, 27, 430, 124,
/* 50 */ 193, 37, 35, 38, 36, 443, 458, 149, 509, 32,
/* 60 */ 31, 19, 124, 30, 29, 28, 39, 41, 160, 33,
/* 70 */ 34, 508, 9, 159, 27, 415, 379, 193, 37, 35,
/* 80 */ 38, 36, 458, 157, 380, 424, 32, 31, 379, 53,
/* 90 */ 30, 29, 28, 426, 439, 41, 380, 33, 34, 465,
/* 100 */ 45, 188, 27, 216, 215, 193, 37, 35, 38, 36,
/* 110 */ 102, 114, 61, 478, 32, 31, 121, 46, 30, 29,
/* 120 */ 28, 19, 19, 190, 161, 55, 123, 213, 64, 19,
/* 130 */ 147, 432, 348, 349, 350, 351, 352, 353, 354, 355,
/* 140 */ 356, 357, 358, 158, 214, 424, 424, 458, 427, 33,
/* 150 */ 34, 219, 6, 424, 27, 58, 99, 193, 37, 35,
/* 160 */ 38, 36, 30, 29, 28, 122, 32, 31, 128, 122,
/* 170 */ 30, 29, 28, 153, 490, 505, 143, 481, 10, 484,
/* 180 */ 144, 487, 504, 146, 490, 458, 167, 481, 218, 484,
/* 190 */ 464, 487, 503, 175, 141, 172, 459, 460, 78, 77,
/* 200 */ 135, 119, 117, 79, 156, 151, 152, 425, 140, 192,
/* 210 */ 224, 223, 367, 208, 138, 151, 152, 153, 490, 440,
/* 220 */ 480, 481, 427, 484, 139, 487, 385, 23, 56, 113,
/* 230 */ 378, 427, 514, 57, 437, 412, 25, 54, 450, 451,
/* 240 */ 145, 129, 43, 14, 24, 181, 194, 130, 177, 151,
/* 250 */ 152, 37, 35, 38, 36, 137, 441, 507, 40, 32,
/* 260 */ 31, 13, 491, 30, 29, 28, 13, 489, 40, 483,
/* 270 */ 1, 486, 482, 131, 485, 421, 1, 489, 48, 43,
/* 280 */ 132, 420, 488, 198, 433, 20, 434, 20, 68, 67,
/* 290 */ 8, 7, 488, 49, 75, 74, 133, 134, 523, 475,
/* 300 */ 126, 120, 40, 474, 127, 125, 154, 471, 470, 155,
/* 310 */ 217, 489, 418, 442, 87, 178, 457, 100, 456, 98,
/* 320 */ 101, 386, 199, 180, 81, 409, 488, 21, 212, 522,
/* 330 */ 446, 65, 521, 182, 519, 186, 115, 22, 377, 376,
/* 340 */ 72, 50, 436, 90, 374, 373, 162, 116, 371, 370,
/* 350 */ 369, 362, 118, 366, 364, 47, 85, 445, 42, 191,
/* 360 */ 91, 189, 183, 187, 26, 23, 185, 211, 196, 62,
/* 370 */ 200, 51, 201, 202, 203, 59, 206, 204, 205, 207,
/* 380 */ 16, 209, 222, 526, 163, 111, 63, 109, 105, 94,
/* 390 */ 92, 93, 422, 411, 95, 96, 97, 108, 103, 104,
/* 400 */ 110, 106, 107, 112, 136, 372, 164, 80, 368, 166,
/* 410 */ 82, 165, 525, 168, 169, 170, 171, 524, 174, 517,
/* 420 */ 11, 176, 173, 12, 179, 86, 148, 17, 447, 88,
/* 430 */ 184, 3, 452, 89, 480, 4, 60, 492, 2, 15,
/* 440 */ 18, 5, 195, 407, 197, 405, 403, 401, 399, 397,
/* 450 */ 395, 393, 43, 383, 392, 44, 66, 20, 417, 210,
/* 460 */ 416, 414, 52, 390, 73, 381, 360, 527, 83, 529,
/* 470 */ 529, 84,
/* 0 */ 382, 31, 30, 713, 219, 29, 28, 27, 383, 68,
/* 10 */ 69, 75, 38, 40, 382, 32, 33, 214, 440, 70,
/* 20 */ 26, 54, 383, 186, 36, 34, 37, 35, 133, 218,
/* 30 */ 438, 7, 31, 30, 58, 99, 29, 28, 27, 38,
/* 40 */ 40, 434, 32, 33, 431, 10, 432, 26, 433, 115,
/* 50 */ 186, 36, 34, 37, 35, 446, 89, 142, 513, 31,
/* 60 */ 30, 113, 115, 29, 28, 27, 38, 40, 152, 32,
/* 70 */ 33, 512, 134, 154, 26, 115, 45, 186, 36, 34,
/* 80 */ 37, 35, 89, 141, 513, 112, 31, 30, 382, 53,
/* 90 */ 29, 28, 27, 46, 442, 40, 383, 32, 33, 468,
/* 100 */ 89, 181, 26, 114, 139, 186, 36, 34, 37, 35,
/* 110 */ 102, 103, 61, 481, 31, 30, 430, 149, 29, 28,
/* 120 */ 27, 20, 20, 183, 153, 55, 89, 207, 63, 430,
/* 130 */ 119, 435, 351, 352, 353, 354, 355, 356, 357, 358,
/* 140 */ 359, 360, 361, 467, 150, 151, 427, 427, 212, 32,
/* 150 */ 33, 29, 28, 27, 26, 202, 160, 186, 36, 34,
/* 160 */ 37, 35, 487, 168, 490, 165, 31, 30, 428, 56,
/* 170 */ 29, 28, 27, 17, 201, 200, 199, 198, 197, 196,
/* 180 */ 195, 194, 193, 192, 414, 509, 403, 404, 405, 406,
/* 190 */ 407, 408, 409, 410, 411, 412, 413, 146, 494, 113,
/* 200 */ 203, 485, 11, 488, 48, 491, 20, 138, 494, 418,
/* 210 */ 135, 485, 430, 488, 57, 491, 462, 463, 132, 49,
/* 220 */ 508, 20, 77, 76, 126, 23, 429, 20, 507, 143,
/* 230 */ 144, 426, 131, 185, 109, 107, 78, 210, 209, 143,
/* 240 */ 144, 146, 494, 443, 208, 485, 427, 488, 129, 491,
/* 250 */ 213, 22, 427, 517, 217, 216, 370, 24, 518, 483,
/* 260 */ 625, 453, 24, 625, 137, 42, 454, 511, 483, 174,
/* 270 */ 15, 14, 170, 143, 144, 36, 34, 37, 35, 128,
/* 280 */ 145, 495, 39, 31, 30, 14, 424, 29, 28, 27,
/* 290 */ 42, 493, 39, 130, 2, 136, 423, 486, 190, 489,
/* 300 */ 21, 493, 21, 436, 484, 437, 492, 67, 66, 527,
/* 310 */ 2, 120, 9, 8, 74, 73, 492, 121, 122, 123,
/* 320 */ 124, 125, 117, 111, 118, 116, 39, 415, 478, 445,
/* 330 */ 477, 147, 474, 473, 148, 493, 421, 211, 86, 460,
/* 340 */ 459, 100, 98, 101, 389, 191, 110, 171, 173, 206,
/* 350 */ 492, 526, 64, 525, 523, 104, 80, 105, 380, 449,
/* 360 */ 379, 175, 71, 439, 179, 377, 376, 155, 106, 47,
/* 370 */ 50, 374, 373, 372, 365, 108, 369, 367, 41, 84,
/* 380 */ 448, 184, 461, 182, 180, 90, 178, 176, 25, 22,
/* 390 */ 205, 44, 215, 188, 530, 156, 157, 159, 158, 529,
/* 400 */ 161, 51, 162, 164, 163, 127, 59, 62, 381, 375,
/* 410 */ 528, 79, 371, 166, 81, 93, 91, 425, 1, 167,
/* 420 */ 95, 92, 94, 521, 96, 97, 169, 12, 13, 172,
/* 430 */ 450, 85, 87, 140, 177, 18, 4, 455, 88, 5,
/* 440 */ 496, 3, 19, 16, 187, 6, 189, 60, 401, 400,
/* 450 */ 399, 398, 397, 396, 395, 394, 393, 42, 392, 391,
/* 460 */ 386, 21, 420, 204, 419, 417, 72, 52, 384, 363,
/* 470 */ 531, 43, 65, 533, 533, 533, 533, 82, 533, 83,
};
static const YYCODETYPE yy_lookahead[] = {
/* 0 */ 1, 33, 34, 187, 188, 37, 38, 39, 9, 61,
/* 10 */ 62, 63, 13, 14, 87, 16, 17, 69, 91, 71,
/* 20 */ 21, 190, 228, 24, 25, 26, 27, 28, 76, 213,
/* 30 */ 236, 237, 33, 34, 189, 190, 37, 38, 39, 13,
/* 40 */ 14, 2, 16, 17, 5, 214, 7, 21, 9, 228,
/* 10 */ 62, 63, 13, 14, 1, 16, 17, 69, 91, 71,
/* 20 */ 21, 94, 9, 24, 25, 26, 27, 28, 189, 190,
/* 30 */ 214, 86, 33, 34, 89, 90, 37, 38, 39, 13,
/* 40 */ 14, 2, 16, 17, 5, 228, 7, 21, 9, 228,
/* 50 */ 24, 25, 26, 27, 28, 190, 190, 236, 237, 33,
/* 60 */ 34, 190, 228, 37, 38, 39, 13, 14, 60, 16,
/* 70 */ 17, 237, 228, 34, 21, 5, 1, 24, 25, 26,
/* 80 */ 27, 28, 190, 212, 9, 214, 33, 34, 1, 90,
/* 90 */ 37, 38, 39, 215, 229, 14, 9, 16, 17, 233,
/* 100 */ 91, 235, 21, 33, 34, 24, 25, 26, 27, 28,
/* 110 */ 61, 62, 63, 87, 33, 34, 228, 108, 37, 38,
/* 120 */ 39, 190, 190, 231, 116, 233, 228, 119, 120, 190,
/* 130 */ 197, 92, 45, 46, 47, 48, 49, 50, 51, 52,
/* 140 */ 53, 54, 55, 212, 212, 214, 214, 190, 215, 16,
/* 150 */ 17, 212, 86, 214, 21, 89, 90, 24, 25, 26,
/* 160 */ 27, 28, 37, 38, 39, 228, 33, 34, 228, 228,
/* 170 */ 37, 38, 39, 1, 2, 228, 239, 5, 44, 7,
/* 180 */ 239, 9, 228, 1, 2, 190, 115, 5, 190, 7,
/* 190 */ 233, 9, 228, 122, 60, 124, 101, 102, 64, 65,
/* 200 */ 66, 61, 62, 63, 197, 33, 34, 209, 74, 37,
/* 210 */ 57, 58, 59, 197, 228, 33, 34, 1, 2, 37,
/* 220 */ 1, 5, 215, 7, 228, 9, 195, 93, 233, 198,
/* 230 */ 193, 215, 87, 216, 91, 198, 91, 94, 87, 87,
/* 240 */ 56, 228, 91, 91, 227, 111, 56, 228, 114, 33,
/* 250 */ 34, 25, 26, 27, 28, 121, 37, 87, 86, 33,
/* 260 */ 34, 91, 87, 37, 38, 39, 91, 95, 86, 5,
/* 270 */ 86, 7, 5, 228, 7, 87, 86, 95, 91, 91,
/* 280 */ 228, 87, 110, 87, 5, 91, 7, 91, 117, 118,
/* 290 */ 117, 118, 110, 106, 67, 68, 228, 228, 215, 210,
/* 300 */ 228, 228, 86, 210, 228, 228, 210, 210, 210, 210,
/* 310 */ 210, 95, 211, 190, 190, 113, 234, 190, 234, 217,
/* 320 */ 190, 190, 190, 238, 56, 190, 110, 190, 190, 190,
/* 330 */ 95, 190, 190, 230, 190, 230, 190, 190, 190, 190,
/* 340 */ 190, 105, 226, 225, 190, 190, 190, 190, 190, 190,
/* 350 */ 190, 190, 190, 190, 190, 107, 191, 191, 104, 99,
/* 360 */ 224, 103, 96, 98, 109, 93, 97, 72, 191, 85,
/* 370 */ 84, 191, 83, 82, 57, 194, 79, 81, 80, 78,
/* 380 */ 75, 77, 72, 5, 123, 196, 194, 201, 205, 221,
/* 390 */ 223, 222, 213, 208, 220, 219, 218, 202, 207, 206,
/* 400 */ 200, 204, 203, 199, 191, 191, 5, 192, 191, 70,
/* 410 */ 192, 123, 5, 123, 5, 123, 70, 5, 70, 79,
/* 420 */ 86, 115, 123, 86, 113, 112, 1, 91, 87, 86,
/* 430 */ 86, 100, 87, 86, 1, 100, 67, 87, 86, 86,
/* 440 */ 91, 86, 88, 5, 88, 5, 5, 5, 5, 1,
/* 450 */ 5, 5, 91, 73, 5, 16, 118, 91, 5, 15,
/* 460 */ 5, 87, 86, 5, 70, 73, 56, 0, 21, 240,
/* 470 */ 240, 21,
/* 60 */ 34, 228, 228, 37, 38, 39, 13, 14, 60, 16,
/* 70 */ 17, 237, 239, 34, 21, 228, 91, 24, 25, 26,
/* 80 */ 27, 28, 190, 236, 237, 228, 33, 34, 1, 90,
/* 90 */ 37, 38, 39, 108, 229, 14, 9, 16, 17, 233,
/* 100 */ 190, 235, 21, 228, 197, 24, 25, 26, 27, 28,
/* 110 */ 61, 62, 63, 87, 33, 34, 209, 197, 37, 38,
/* 120 */ 39, 190, 190, 231, 116, 233, 190, 119, 120, 209,
/* 130 */ 228, 92, 45, 46, 47, 48, 49, 50, 51, 52,
/* 140 */ 53, 54, 55, 233, 213, 213, 215, 215, 190, 16,
/* 150 */ 17, 37, 38, 39, 21, 57, 115, 24, 25, 26,
/* 160 */ 27, 28, 5, 122, 7, 124, 33, 34, 210, 233,
/* 170 */ 37, 38, 39, 75, 76, 77, 78, 79, 80, 81,
/* 180 */ 82, 83, 84, 85, 196, 228, 198, 199, 200, 201,
/* 190 */ 202, 203, 204, 205, 206, 207, 208, 1, 2, 228,
/* 200 */ 197, 5, 44, 7, 91, 9, 190, 1, 2, 5,
/* 210 */ 239, 5, 209, 7, 216, 9, 101, 102, 60, 106,
/* 220 */ 228, 190, 64, 65, 66, 227, 209, 190, 228, 33,
/* 230 */ 34, 215, 74, 37, 61, 62, 63, 33, 34, 33,
/* 240 */ 34, 1, 2, 37, 213, 5, 215, 7, 228, 9,
/* 250 */ 213, 93, 215, 87, 57, 58, 59, 91, 87, 1,
/* 260 */ 91, 87, 91, 94, 56, 91, 87, 87, 1, 111,
/* 270 */ 91, 91, 114, 33, 34, 25, 26, 27, 28, 121,
/* 280 */ 56, 87, 86, 33, 34, 91, 87, 37, 38, 39,
/* 290 */ 91, 95, 86, 228, 86, 37, 87, 5, 87, 7,
/* 300 */ 91, 95, 91, 5, 37, 7, 110, 117, 118, 209,
/* 310 */ 86, 228, 117, 118, 67, 68, 110, 228, 228, 228,
/* 320 */ 228, 228, 228, 228, 228, 228, 86, 209, 211, 190,
/* 330 */ 211, 211, 211, 211, 211, 95, 212, 211, 190, 234,
/* 340 */ 234, 190, 217, 190, 190, 190, 190, 113, 238, 190,
/* 350 */ 110, 190, 190, 190, 190, 190, 56, 190, 190, 95,
/* 360 */ 190, 230, 190, 226, 230, 190, 190, 190, 190, 107,
/* 370 */ 105, 190, 190, 190, 190, 190, 190, 190, 104, 191,
/* 380 */ 191, 99, 191, 103, 98, 225, 97, 96, 109, 93,
/* 390 */ 72, 77, 72, 191, 5, 123, 5, 70, 123, 5,
/* 400 */ 123, 191, 5, 70, 123, 191, 194, 194, 193, 191,
/* 410 */ 5, 192, 191, 123, 192, 222, 224, 214, 195, 70,
/* 420 */ 220, 223, 221, 76, 219, 218, 115, 86, 86, 113,
/* 430 */ 87, 112, 86, 1, 86, 91, 100, 87, 86, 100,
/* 440 */ 87, 86, 91, 86, 88, 86, 88, 67, 9, 5,
/* 450 */ 5, 5, 5, 1, 5, 5, 5, 91, 5, 5,
/* 460 */ 73, 91, 5, 15, 5, 87, 70, 86, 73, 56,
/* 470 */ 0, 16, 118, 240, 240, 240, 240, 21, 240, 21,
};
#define YY_SHIFT_USE_DFLT (-74)
#define YY_SHIFT_COUNT (226)
#define YY_SHIFT_COUNT (219)
#define YY_SHIFT_MIN (-73)
#define YY_SHIFT_MAX (467)
#define YY_SHIFT_MAX (470)
static const short yy_shift_ofst[] = {
/* 0 */ 134, 172, 216, 75, 75, 75, 75, 75, 75, -1,
/* 10 */ 87, 216, 216, 216, 39, 39, 39, 75, 75, 75,
/* 20 */ 75, -48, -48, -74, 182, 216, 216, 216, 216, 216,
/* 30 */ 216, 216, 216, 216, 216, 216, 216, 216, 216, 216,
/* 40 */ 216, 216, 216, 39, 39, 70, 70, 70, 70, 70,
/* 50 */ 70, 66, 70, 75, 75, 95, 95, 143, 75, 75,
/* 60 */ 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
/* 70 */ 75, 75, 75, 75, 75, 75, 75, 75, 75, 75,
/* 80 */ 75, 75, 75, 75, 75, 202, 268, 268, 235, 235,
/* 90 */ 236, 248, 254, 260, 258, 265, 269, 266, 255, 272,
/* 100 */ 268, 268, 295, 284, 286, 289, 291, 317, 296, 298,
/* 110 */ 297, 301, 305, 304, 295, 268, 268, 310, 268, 310,
/* 120 */ 26, 53, 53, 53, 53, 53, 81, 133, 226, 226,
/* 130 */ 226, -32, -32, -32, -32, -52, 8, 71, 125, 125,
/* 140 */ 49, 140, 153, -73, 145, 219, 184, 151, 152, 170,
/* 150 */ 175, 264, 267, 190, 9, 187, 188, 194, 196, 279,
/* 160 */ 171, 173, 227, 378, 261, 401, 288, 339, 407, 290,
/* 170 */ 409, 292, 346, 412, 299, 348, 340, 306, 334, 337,
/* 180 */ 311, 313, 341, 343, 425, 344, 345, 347, 336, 331,
/* 190 */ 349, 335, 350, 352, 433, 353, 354, 355, 356, 369,
/* 200 */ 438, 440, 441, 442, 443, 448, 445, 446, 361, 449,
/* 210 */ 380, 444, 439, 338, 366, 453, 455, 374, 376, 366,
/* 220 */ 458, 394, 392, 447, 450, 410, 467,
/* 0 */ 158, 98, 196, 240, 13, 13, 13, 13, 13, 13,
/* 10 */ -1, 87, 240, 240, 240, 39, 39, 39, 13, 13,
/* 20 */ 13, 13, -74, 206, 240, 240, 240, 240, 240, 240,
/* 30 */ 240, 240, 240, 240, 240, 240, 240, 240, 240, 240,
/* 40 */ 240, 240, 39, 39, 39, 204, 204, 204, 204, 204,
/* 50 */ 204, -55, 204, 13, 13, 115, 115, -73, 13, 13,
/* 60 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
/* 70 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
/* 80 */ 13, 13, 13, 13, 234, 300, 300, 264, 264, 300,
/* 90 */ 265, 262, 274, 282, 280, 286, 289, 291, 279, 296,
/* 100 */ 300, 300, 318, 318, 300, 314, 300, 320, 300, 320,
/* 110 */ -74, 26, 53, 53, 53, 53, 53, 81, 133, 250,
/* 120 */ 250, 250, -32, -32, -32, -32, -52, 8, 41, 114,
/* 130 */ 114, 49, 173, 197, 166, 171, 169, 258, 208, 174,
/* 140 */ 179, 180, 194, 157, 292, 267, 224, -15, 113, 199,
/* 150 */ 209, 211, 190, 195, 298, 247, 389, 272, 391, 275,
/* 160 */ 327, 394, 277, 397, 281, 333, 405, 290, 349, 347,
/* 170 */ 311, 341, 342, 316, 319, 343, 346, 432, 348, 350,
/* 180 */ 352, 344, 336, 351, 339, 353, 355, 357, 356, 359,
/* 190 */ 358, 380, 439, 444, 445, 446, 447, 452, 449, 450,
/* 200 */ 451, 453, 454, 366, 387, 448, 455, 354, 370, 457,
/* 210 */ 459, 378, 381, 370, 396, 395, 456, 458, 413, 470,
};
#define YY_REDUCE_USE_DFLT (-207)
#define YY_REDUCE_COUNT (119)
#define YY_REDUCE_MIN (-206)
#define YY_REDUCE_MAX (218)
#define YY_REDUCE_USE_DFLT (-185)
#define YY_REDUCE_COUNT (110)
#define YY_REDUCE_MIN (-184)
#define YY_REDUCE_MAX (223)
static const short yy_reduce_ofst[] = {
/* 0 */ -184, -206, -179, -134, -108, -129, -69, -68, -61, -135,
/* 10 */ -155, -63, -59, -166, -67, 7, 16, -43, -5, -2,
/* 20 */ -169, 31, 37, 17, -156, -112, -102, -60, -53, -46,
/* 30 */ -36, -14, -4, 13, 19, 45, 52, 68, 69, 72,
/* 40 */ 73, 76, 77, -122, 83, 89, 93, 96, 97, 98,
/* 50 */ 99, 101, 100, 123, 124, 82, 84, 102, 127, 130,
/* 60 */ 131, 132, 135, 137, 138, 139, 141, 142, 144, 146,
/* 70 */ 147, 148, 149, 150, 154, 155, 156, 157, 158, 159,
/* 80 */ 160, 161, 162, 163, 164, 85, 165, 166, 103, 105,
/* 90 */ 116, 118, 136, 167, 169, 168, 174, 176, 178, 179,
/* 100 */ 177, 180, 181, 185, 191, 193, 183, 197, 199, 195,
/* 110 */ 186, 200, 189, 204, 192, 213, 214, 215, 217, 218,
/* 0 */ -184, -12, -179, -153, -134, -108, -69, -68, 31, 37,
/* 10 */ -135, -161, -167, -29, -166, -93, -80, 3, -90, -64,
/* 20 */ -42, 16, -2, -183, -143, -125, -98, -43, -8, 0,
/* 30 */ 20, 65, 83, 89, 90, 91, 92, 93, 94, 95,
/* 40 */ 96, 97, 17, 100, 118, 117, 119, 120, 121, 122,
/* 50 */ 123, 124, 126, 139, 148, 105, 106, 125, 151, 153,
/* 60 */ 154, 155, 156, 159, 161, 162, 163, 164, 165, 167,
/* 70 */ 168, 170, 172, 175, 176, 177, 178, 181, 182, 183,
/* 80 */ 184, 185, 186, 187, 110, 188, 189, 131, 134, 191,
/* 90 */ 137, 160, 192, 198, 193, 201, 200, 205, 207, 203,
/* 100 */ 202, 210, 212, 213, 214, 215, 218, 219, 221, 222,
/* 110 */ 223,
};
static const YYACTIONTYPE yy_default[] = {
/* 0 */ 707, 691, 691, 707, 707, 707, 707, 707, 707, 624,
/* 10 */ 539, 707, 707, 691, 707, 707, 707, 707, 707, 707,
/* 20 */ 707, 569, 569, 618, 707, 707, 707, 707, 707, 707,
/* 30 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
/* 40 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
/* 50 */ 707, 707, 707, 707, 707, 641, 641, 707, 707, 707,
/* 60 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
/* 70 */ 707, 707, 555, 707, 707, 707, 707, 707, 707, 707,
/* 80 */ 707, 707, 707, 707, 707, 707, 541, 541, 707, 707,
/* 90 */ 648, 652, 646, 634, 642, 633, 629, 628, 656, 707,
/* 100 */ 541, 541, 564, 590, 588, 586, 584, 582, 580, 578,
/* 110 */ 576, 574, 567, 571, 564, 541, 541, 562, 541, 562,
/* 120 */ 707, 695, 696, 657, 690, 647, 674, 673, 686, 680,
/* 130 */ 679, 678, 677, 676, 675, 707, 707, 707, 682, 681,
/* 140 */ 707, 707, 707, 707, 707, 707, 659, 707, 707, 707,
/* 150 */ 707, 707, 707, 659, 653, 649, 707, 707, 707, 707,
/* 160 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
/* 170 */ 707, 707, 707, 707, 707, 707, 707, 707, 707, 707,
/* 180 */ 692, 707, 707, 707, 707, 707, 707, 707, 643, 707,
/* 190 */ 635, 707, 707, 707, 707, 707, 707, 707, 599, 707,
/* 200 */ 707, 707, 707, 707, 707, 707, 707, 707, 568, 707,
/* 210 */ 707, 707, 707, 707, 700, 707, 707, 707, 593, 698,
/* 220 */ 707, 707, 707, 545, 543, 707, 707,
/* 0 */ 712, 569, 696, 696, 712, 712, 712, 712, 712, 712,
/* 10 */ 628, 543, 712, 712, 696, 712, 712, 712, 712, 712,
/* 20 */ 712, 712, 622, 712, 712, 712, 712, 712, 712, 712,
/* 30 */ 712, 712, 712, 712, 712, 712, 712, 712, 712, 712,
/* 40 */ 712, 712, 712, 712, 712, 712, 712, 712, 712, 712,
/* 50 */ 712, 712, 712, 712, 712, 645, 645, 712, 712, 712,
/* 60 */ 712, 712, 712, 712, 712, 712, 712, 712, 712, 712,
/* 70 */ 712, 559, 712, 712, 712, 712, 712, 712, 712, 712,
/* 80 */ 712, 712, 712, 712, 712, 545, 545, 712, 712, 545,
/* 90 */ 652, 656, 650, 638, 646, 637, 633, 632, 660, 712,
/* 100 */ 545, 545, 568, 568, 545, 712, 545, 566, 545, 566,
/* 110 */ 583, 712, 700, 701, 661, 695, 651, 679, 678, 691,
/* 120 */ 685, 684, 683, 682, 681, 680, 712, 712, 712, 687,
/* 130 */ 686, 712, 712, 712, 712, 712, 665, 712, 663, 712,
/* 140 */ 712, 712, 712, 712, 712, 712, 663, 657, 653, 712,
/* 150 */ 712, 712, 712, 712, 712, 712, 712, 712, 712, 712,
/* 160 */ 712, 712, 712, 712, 712, 712, 712, 712, 712, 712,
/* 170 */ 712, 712, 712, 697, 712, 712, 712, 712, 712, 712,
/* 180 */ 712, 647, 712, 639, 712, 712, 712, 712, 712, 712,
/* 190 */ 603, 712, 712, 712, 712, 712, 712, 712, 712, 712,
/* 200 */ 712, 712, 712, 571, 712, 712, 712, 712, 705, 712,
/* 210 */ 712, 712, 597, 703, 712, 712, 549, 547, 712, 712,
};
/********** End of lemon-generated parsing tables *****************************/
......@@ -467,10 +465,10 @@ static const YYCODETYPE yyFallback[] = {
0, /* EXISTS => nothing */
0, /* CREATE => nothing */
0, /* KEEP => nothing */
0, /* CACHE => nothing */
0, /* REPLICA => nothing */
0, /* DAYS => nothing */
0, /* ROWS => nothing */
0, /* CACHE => nothing */
0, /* ABLOCKS => nothing */
0, /* TBLOCKS => nothing */
0, /* CTIME => nothing */
......@@ -678,7 +676,7 @@ static const char *const yyTokenName[] = {
"USE", "DESCRIBE", "ALTER", "PASS",
"PRIVILEGE", "DNODE", "IP", "LOCAL",
"IF", "EXISTS", "CREATE", "KEEP",
"REPLICA", "DAYS", "ROWS", "CACHE",
"CACHE", "REPLICA", "DAYS", "ROWS",
"ABLOCKS", "TBLOCKS", "CTIME", "CLOG",
"COMP", "PRECISION", "LP", "RP",
"TAGS", "USING", "AS", "COMMA",
......@@ -708,11 +706,11 @@ static const char *const yyTokenName[] = {
"METRICS", "STABLE", "error", "program",
"cmd", "dbPrefix", "ids", "cpxName",
"ifexists", "alter_db_optr", "ifnotexists", "db_optr",
"keep", "tagitemlist", "replica", "day",
"rows", "cache", "ablocks", "tblocks",
"tables", "ctime", "clog", "comp",
"prec", "typename", "signed", "create_table_args",
"columnlist", "select", "column", "tagitem",
"keep", "tagitemlist", "tables", "cache",
"replica", "days", "rows", "ablocks",
"tblocks", "ctime", "clog", "comp",
"prec", "tagitem", "typename", "signed",
"create_table_args", "columnlist", "select", "column",
"selcollist", "from", "where_opt", "interval_opt",
"fill_opt", "sliding_opt", "groupby_opt", "orderby_opt",
"having_opt", "slimit_opt", "limit_opt", "sclp",
......@@ -766,32 +764,32 @@ static const char *const yyRuleName[] = {
/* 37 */ "ifnotexists ::=",
/* 38 */ "cmd ::= CREATE DATABASE ifnotexists ids db_optr",
/* 39 */ "cmd ::= CREATE USER ids PASS ids",
/* 40 */ "keep ::=",
/* 41 */ "keep ::= KEEP tagitemlist",
/* 42 */ "replica ::=",
/* 40 */ "keep ::= KEEP tagitemlist",
/* 41 */ "tables ::= TABLES INTEGER",
/* 42 */ "cache ::= CACHE INTEGER",
/* 43 */ "replica ::= REPLICA INTEGER",
/* 44 */ "day ::=",
/* 45 */ "day ::= DAYS INTEGER",
/* 46 */ "rows ::= ROWS INTEGER",
/* 47 */ "rows ::=",
/* 48 */ "cache ::= CACHE INTEGER",
/* 49 */ "cache ::=",
/* 50 */ "ablocks ::= ABLOCKS ID",
/* 51 */ "ablocks ::=",
/* 52 */ "tblocks ::= TBLOCKS INTEGER",
/* 53 */ "tblocks ::=",
/* 54 */ "tables ::= TABLES INTEGER",
/* 55 */ "tables ::=",
/* 56 */ "ctime ::= CTIME INTEGER",
/* 57 */ "ctime ::=",
/* 58 */ "clog ::= CLOG INTEGER",
/* 59 */ "clog ::=",
/* 60 */ "comp ::= COMP INTEGER",
/* 61 */ "comp ::=",
/* 62 */ "prec ::= PRECISION ids",
/* 63 */ "prec ::=",
/* 64 */ "db_optr ::= replica day keep rows cache ablocks tblocks tables ctime clog comp prec",
/* 65 */ "alter_db_optr ::= replica",
/* 44 */ "days ::= DAYS INTEGER",
/* 45 */ "rows ::= ROWS INTEGER",
/* 46 */ "ablocks ::= ABLOCKS ID",
/* 47 */ "tblocks ::= TBLOCKS INTEGER",
/* 48 */ "ctime ::= CTIME INTEGER",
/* 49 */ "clog ::= CLOG INTEGER",
/* 50 */ "comp ::= COMP INTEGER",
/* 51 */ "prec ::= PRECISION STRING",
/* 52 */ "db_optr ::=",
/* 53 */ "db_optr ::= db_optr tables",
/* 54 */ "db_optr ::= db_optr cache",
/* 55 */ "db_optr ::= db_optr replica",
/* 56 */ "db_optr ::= db_optr days",
/* 57 */ "db_optr ::= db_optr rows",
/* 58 */ "db_optr ::= db_optr ablocks",
/* 59 */ "db_optr ::= db_optr tblocks",
/* 60 */ "db_optr ::= db_optr ctime",
/* 61 */ "db_optr ::= db_optr clog",
/* 62 */ "db_optr ::= db_optr comp",
/* 63 */ "db_optr ::= db_optr prec",
/* 64 */ "db_optr ::= db_optr keep",
/* 65 */ "alter_db_optr ::= REPLICA tagitem",
/* 66 */ "typename ::= ids",
/* 67 */ "typename ::= ids LP signed RP",
/* 68 */ "signed ::= INTEGER",
......@@ -837,7 +835,7 @@ static const char *const yyRuleName[] = {
/* 108 */ "orderby_opt ::= ORDER BY sortlist",
/* 109 */ "sortlist ::= sortlist COMMA item sortorder",
/* 110 */ "sortlist ::= item sortorder",
/* 111 */ "item ::= ids",
/* 111 */ "item ::= ids cpxName",
/* 112 */ "sortorder ::= ASC",
/* 113 */ "sortorder ::= DESC",
/* 114 */ "sortorder ::=",
......@@ -860,52 +858,53 @@ static const char *const yyRuleName[] = {
/* 131 */ "expr ::= LP expr RP",
/* 132 */ "expr ::= ID",
/* 133 */ "expr ::= ID DOT ID",
/* 134 */ "expr ::= INTEGER",
/* 135 */ "expr ::= MINUS INTEGER",
/* 136 */ "expr ::= PLUS INTEGER",
/* 137 */ "expr ::= FLOAT",
/* 138 */ "expr ::= MINUS FLOAT",
/* 139 */ "expr ::= PLUS FLOAT",
/* 140 */ "expr ::= STRING",
/* 141 */ "expr ::= NOW",
/* 142 */ "expr ::= VARIABLE",
/* 143 */ "expr ::= BOOL",
/* 144 */ "expr ::= ID LP exprlist RP",
/* 145 */ "expr ::= ID LP STAR RP",
/* 146 */ "expr ::= expr AND expr",
/* 147 */ "expr ::= expr OR expr",
/* 148 */ "expr ::= expr LT expr",
/* 149 */ "expr ::= expr GT expr",
/* 150 */ "expr ::= expr LE expr",
/* 151 */ "expr ::= expr GE expr",
/* 152 */ "expr ::= expr NE expr",
/* 153 */ "expr ::= expr EQ expr",
/* 154 */ "expr ::= expr PLUS expr",
/* 155 */ "expr ::= expr MINUS expr",
/* 156 */ "expr ::= expr STAR expr",
/* 157 */ "expr ::= expr SLASH expr",
/* 158 */ "expr ::= expr REM expr",
/* 159 */ "expr ::= expr LIKE expr",
/* 160 */ "expr ::= expr IN LP exprlist RP",
/* 161 */ "exprlist ::= exprlist COMMA expritem",
/* 162 */ "exprlist ::= expritem",
/* 163 */ "expritem ::= expr",
/* 164 */ "expritem ::=",
/* 165 */ "cmd ::= INSERT INTO cpxName insert_value_list",
/* 166 */ "insert_value_list ::= VALUES LP itemlist RP",
/* 167 */ "insert_value_list ::= insert_value_list VALUES LP itemlist RP",
/* 168 */ "itemlist ::= itemlist COMMA expr",
/* 169 */ "itemlist ::= expr",
/* 170 */ "cmd ::= RESET QUERY CACHE",
/* 171 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist",
/* 172 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids",
/* 173 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist",
/* 174 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids",
/* 175 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids",
/* 176 */ "cmd ::= ALTER TABLE ids cpxName SET ids EQ tagitem",
/* 177 */ "cmd ::= KILL CONNECTION IP COLON INTEGER",
/* 178 */ "cmd ::= KILL STREAM IP COLON INTEGER COLON INTEGER",
/* 179 */ "cmd ::= KILL QUERY IP COLON INTEGER COLON INTEGER",
/* 134 */ "expr ::= ID DOT STAR",
/* 135 */ "expr ::= INTEGER",
/* 136 */ "expr ::= MINUS INTEGER",
/* 137 */ "expr ::= PLUS INTEGER",
/* 138 */ "expr ::= FLOAT",
/* 139 */ "expr ::= MINUS FLOAT",
/* 140 */ "expr ::= PLUS FLOAT",
/* 141 */ "expr ::= STRING",
/* 142 */ "expr ::= NOW",
/* 143 */ "expr ::= VARIABLE",
/* 144 */ "expr ::= BOOL",
/* 145 */ "expr ::= ID LP exprlist RP",
/* 146 */ "expr ::= ID LP STAR RP",
/* 147 */ "expr ::= expr AND expr",
/* 148 */ "expr ::= expr OR expr",
/* 149 */ "expr ::= expr LT expr",
/* 150 */ "expr ::= expr GT expr",
/* 151 */ "expr ::= expr LE expr",
/* 152 */ "expr ::= expr GE expr",
/* 153 */ "expr ::= expr NE expr",
/* 154 */ "expr ::= expr EQ expr",
/* 155 */ "expr ::= expr PLUS expr",
/* 156 */ "expr ::= expr MINUS expr",
/* 157 */ "expr ::= expr STAR expr",
/* 158 */ "expr ::= expr SLASH expr",
/* 159 */ "expr ::= expr REM expr",
/* 160 */ "expr ::= expr LIKE expr",
/* 161 */ "expr ::= expr IN LP exprlist RP",
/* 162 */ "exprlist ::= exprlist COMMA expritem",
/* 163 */ "exprlist ::= expritem",
/* 164 */ "expritem ::= expr",
/* 165 */ "expritem ::=",
/* 166 */ "cmd ::= INSERT INTO cpxName insert_value_list",
/* 167 */ "insert_value_list ::= VALUES LP itemlist RP",
/* 168 */ "insert_value_list ::= insert_value_list VALUES LP itemlist RP",
/* 169 */ "itemlist ::= itemlist COMMA expr",
/* 170 */ "itemlist ::= expr",
/* 171 */ "cmd ::= RESET QUERY CACHE",
/* 172 */ "cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist",
/* 173 */ "cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids",
/* 174 */ "cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist",
/* 175 */ "cmd ::= ALTER TABLE ids cpxName DROP TAG ids",
/* 176 */ "cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids",
/* 177 */ "cmd ::= ALTER TABLE ids cpxName SET ids EQ tagitem",
/* 178 */ "cmd ::= KILL CONNECTION IP COLON INTEGER",
/* 179 */ "cmd ::= KILL STREAM IP COLON INTEGER COLON INTEGER",
/* 180 */ "cmd ::= KILL QUERY IP COLON INTEGER COLON INTEGER",
};
#endif /* NDEBUG */
......@@ -1007,7 +1006,7 @@ static void yy_destructor(
tVariantListDestroy((yypminor->yy216));
}
break;
case 213: /* select */
case 214: /* select */
{
destroyQuerySql((yypminor->yy24));
}
......@@ -1311,56 +1310,56 @@ static const struct {
{ 194, 0 },
{ 188, 5 },
{ 188, 5 },
{ 196, 0 },
{ 196, 2 },
{ 198, 0 },
{ 198, 2 },
{ 199, 0 },
{ 199, 2 },
{ 200, 2 },
{ 200, 0 },
{ 201, 2 },
{ 201, 0 },
{ 202, 2 },
{ 202, 0 },
{ 203, 2 },
{ 203, 0 },
{ 204, 2 },
{ 204, 0 },
{ 205, 2 },
{ 205, 0 },
{ 206, 2 },
{ 206, 0 },
{ 207, 2 },
{ 207, 0 },
{ 208, 2 },
{ 208, 0 },
{ 195, 12 },
{ 193, 1 },
{ 209, 1 },
{ 209, 4 },
{ 195, 0 },
{ 195, 2 },
{ 195, 2 },
{ 195, 2 },
{ 195, 2 },
{ 195, 2 },
{ 195, 2 },
{ 195, 2 },
{ 195, 2 },
{ 195, 2 },
{ 195, 2 },
{ 195, 2 },
{ 195, 2 },
{ 193, 2 },
{ 210, 1 },
{ 210, 2 },
{ 210, 2 },
{ 188, 6 },
{ 211, 3 },
{ 211, 7 },
{ 211, 7 },
{ 210, 4 },
{ 211, 1 },
{ 211, 2 },
{ 211, 2 },
{ 188, 6 },
{ 212, 3 },
{ 212, 1 },
{ 214, 2 },
{ 212, 7 },
{ 212, 7 },
{ 212, 2 },
{ 213, 3 },
{ 213, 1 },
{ 215, 2 },
{ 197, 3 },
{ 197, 1 },
{ 215, 1 },
{ 215, 1 },
{ 215, 1 },
{ 215, 1 },
{ 215, 1 },
{ 215, 2 },
{ 215, 2 },
{ 209, 1 },
{ 209, 1 },
{ 209, 1 },
{ 209, 1 },
{ 209, 1 },
{ 209, 2 },
{ 209, 2 },
{ 188, 1 },
{ 213, 12 },
{ 214, 12 },
{ 227, 2 },
{ 227, 0 },
{ 216, 3 },
......@@ -1382,7 +1381,7 @@ static const struct {
{ 223, 3 },
{ 231, 4 },
{ 231, 2 },
{ 233, 1 },
{ 233, 2 },
{ 234, 1 },
{ 234, 1 },
{ 234, 0 },
......@@ -1405,6 +1404,7 @@ static const struct {
{ 228, 3 },
{ 228, 1 },
{ 228, 3 },
{ 228, 3 },
{ 228, 1 },
{ 228, 2 },
{ 228, 2 },
......@@ -1606,7 +1606,7 @@ static void yy_reduce(
{ setDCLSQLElems(pInfo, ALTER_LOCAL, 1, &yymsp[0].minor.yy0); }
break;
case 31: /* cmd ::= ALTER DATABASE ids alter_db_optr */
{ SSQLToken t = {0}; setCreateDBSQL(pInfo, ALTER_DATABASE, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy54, &t);}
{ SSQLToken t = {0}; setCreateDBSQL(pInfo, ALTER_DATABASE, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy478, &t);}
break;
case 32: /* ids ::= ID */
case 33: /* ids ::= STRING */ yytestcase(yyruleno==33);
......@@ -1617,67 +1617,67 @@ static void yy_reduce(
{yygotominor.yy0.n = 1;}
break;
case 38: /* cmd ::= CREATE DATABASE ifnotexists ids db_optr */
{ setCreateDBSQL(pInfo, CREATE_DATABASE, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy54, &yymsp[-2].minor.yy0);}
{ setCreateDBSQL(pInfo, CREATE_DATABASE, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy478, &yymsp[-2].minor.yy0);}
break;
case 39: /* cmd ::= CREATE USER ids PASS ids */
{ setDCLSQLElems(pInfo, CREATE_USER, 2, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);}
break;
case 40: /* keep ::= */
case 102: /* fill_opt ::= */ yytestcase(yyruleno==102);
{yygotominor.yy216 = 0; }
case 40: /* keep ::= KEEP tagitemlist */
{ yygotominor.yy216 = yymsp[0].minor.yy216; }
break;
case 41: /* keep ::= KEEP tagitemlist */
{yygotominor.yy216 = yymsp[0].minor.yy216; }
break;
case 42: /* replica ::= */
case 44: /* day ::= */ yytestcase(yyruleno==44);
case 47: /* rows ::= */ yytestcase(yyruleno==47);
case 49: /* cache ::= */ yytestcase(yyruleno==49);
case 51: /* ablocks ::= */ yytestcase(yyruleno==51);
case 53: /* tblocks ::= */ yytestcase(yyruleno==53);
case 55: /* tables ::= */ yytestcase(yyruleno==55);
case 57: /* ctime ::= */ yytestcase(yyruleno==57);
case 59: /* clog ::= */ yytestcase(yyruleno==59);
case 61: /* comp ::= */ yytestcase(yyruleno==61);
case 63: /* prec ::= */ yytestcase(yyruleno==63);
case 101: /* interval_opt ::= */ yytestcase(yyruleno==101);
case 106: /* sliding_opt ::= */ yytestcase(yyruleno==106);
{yygotominor.yy0.n = 0; }
case 41: /* tables ::= TABLES INTEGER */
case 42: /* cache ::= CACHE INTEGER */ yytestcase(yyruleno==42);
case 43: /* replica ::= REPLICA INTEGER */ yytestcase(yyruleno==43);
case 44: /* days ::= DAYS INTEGER */ yytestcase(yyruleno==44);
case 45: /* rows ::= ROWS INTEGER */ yytestcase(yyruleno==45);
case 46: /* ablocks ::= ABLOCKS ID */ yytestcase(yyruleno==46);
case 47: /* tblocks ::= TBLOCKS INTEGER */ yytestcase(yyruleno==47);
case 48: /* ctime ::= CTIME INTEGER */ yytestcase(yyruleno==48);
case 49: /* clog ::= CLOG INTEGER */ yytestcase(yyruleno==49);
case 50: /* comp ::= COMP INTEGER */ yytestcase(yyruleno==50);
case 51: /* prec ::= PRECISION STRING */ yytestcase(yyruleno==51);
case 52: /* db_optr ::= */ yytestcase(yyruleno==52);
{ yygotominor.yy0 = yymsp[0].minor.yy0; }
break;
case 43: /* replica ::= REPLICA INTEGER */
case 45: /* day ::= DAYS INTEGER */ yytestcase(yyruleno==45);
case 46: /* rows ::= ROWS INTEGER */ yytestcase(yyruleno==46);
case 48: /* cache ::= CACHE INTEGER */ yytestcase(yyruleno==48);
case 50: /* ablocks ::= ABLOCKS ID */ yytestcase(yyruleno==50);
case 52: /* tblocks ::= TBLOCKS INTEGER */ yytestcase(yyruleno==52);
case 54: /* tables ::= TABLES INTEGER */ yytestcase(yyruleno==54);
case 56: /* ctime ::= CTIME INTEGER */ yytestcase(yyruleno==56);
case 58: /* clog ::= CLOG INTEGER */ yytestcase(yyruleno==58);
case 60: /* comp ::= COMP INTEGER */ yytestcase(yyruleno==60);
case 62: /* prec ::= PRECISION ids */ yytestcase(yyruleno==62);
{yygotominor.yy0 = yymsp[0].minor.yy0; }
break;
case 64: /* db_optr ::= replica day keep rows cache ablocks tblocks tables ctime clog comp prec */
{
yygotominor.yy54.nReplica = (yymsp[-11].minor.yy0.n > 0)? atoi(yymsp[-11].minor.yy0.z):-1;
yygotominor.yy54.nDays = (yymsp[-10].minor.yy0.n > 0)? atoi(yymsp[-10].minor.yy0.z):-1;
yygotominor.yy54.nRowsInFileBlock = (yymsp[-8].minor.yy0.n > 0)? atoi(yymsp[-8].minor.yy0.z):-1;
yygotominor.yy54.nCacheBlockSize = (yymsp[-7].minor.yy0.n > 0)? atoi(yymsp[-7].minor.yy0.z):-1;
yygotominor.yy54.nCacheNumOfBlocks = (yymsp[-6].minor.yy0.n > 0)? strtod(yymsp[-6].minor.yy0.z, NULL):-1;
yygotominor.yy54.numOfBlocksPerTable = (yymsp[-5].minor.yy0.n > 0)? atoi(yymsp[-5].minor.yy0.z):-1;
yygotominor.yy54.nTablesPerVnode = (yymsp[-4].minor.yy0.n > 0)? atoi(yymsp[-4].minor.yy0.z):-1;
yygotominor.yy54.commitTime = (yymsp[-3].minor.yy0.n > 0)? atoi(yymsp[-3].minor.yy0.z):-1;
yygotominor.yy54.commitLog = (yymsp[-2].minor.yy0.n > 0)? atoi(yymsp[-2].minor.yy0.z):-1;
yygotominor.yy54.compressionLevel = (yymsp[-1].minor.yy0.n > 0)? atoi(yymsp[-1].minor.yy0.z):-1;
yygotominor.yy54.keep = yymsp[-9].minor.yy216;
yygotominor.yy54.precision = yymsp[0].minor.yy0;
}
case 53: /* db_optr ::= db_optr tables */
{ yygotominor.yy478 = yymsp[-1].minor.yy478; yygotominor.yy478.tablesPerVnode = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
break;
case 54: /* db_optr ::= db_optr cache */
{ yygotominor.yy478 = yymsp[-1].minor.yy478; yygotominor.yy478.cacheBlockSize = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
break;
case 55: /* db_optr ::= db_optr replica */
{ yygotominor.yy478 = yymsp[-1].minor.yy478; yygotominor.yy478.replica = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
break;
case 65: /* alter_db_optr ::= replica */
case 56: /* db_optr ::= db_optr days */
{ yygotominor.yy478 = yymsp[-1].minor.yy478; yygotominor.yy478.daysPerFile = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
break;
case 57: /* db_optr ::= db_optr rows */
{ yygotominor.yy478 = yymsp[-1].minor.yy478; yygotominor.yy478.rowPerFileBlock = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
break;
case 58: /* db_optr ::= db_optr ablocks */
{ yygotominor.yy478 = yymsp[-1].minor.yy478; yygotominor.yy478.numOfAvgCacheBlocks = strtod(yymsp[0].minor.yy0.z, NULL); }
break;
case 59: /* db_optr ::= db_optr tblocks */
{ yygotominor.yy478 = yymsp[-1].minor.yy478; yygotominor.yy478.numOfBlocksPerTable = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
break;
case 60: /* db_optr ::= db_optr ctime */
{ yygotominor.yy478 = yymsp[-1].minor.yy478; yygotominor.yy478.commitTime = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
break;
case 61: /* db_optr ::= db_optr clog */
{ yygotominor.yy478 = yymsp[-1].minor.yy478; yygotominor.yy478.commitLog = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
break;
case 62: /* db_optr ::= db_optr comp */
{ yygotominor.yy478 = yymsp[-1].minor.yy478; yygotominor.yy478.compressionLevel = strtol(yymsp[0].minor.yy0.z, NULL, 10); }
break;
case 63: /* db_optr ::= db_optr prec */
{ yygotominor.yy478 = yymsp[-1].minor.yy478; yygotominor.yy478.precision = yymsp[0].minor.yy0; }
break;
case 64: /* db_optr ::= db_optr keep */
{ yygotominor.yy478 = yymsp[-1].minor.yy478; yygotominor.yy478.keep = yymsp[0].minor.yy216; }
break;
case 65: /* alter_db_optr ::= REPLICA tagitem */
{
yygotominor.yy54.nReplica = (yymsp[0].minor.yy0.n > 0)? atoi(yymsp[0].minor.yy0.z):0;
yygotominor.yy478.replica = yymsp[0].minor.yy266.i64Key;
}
break;
case 66: /* typename ::= ids */
......@@ -1814,6 +1814,13 @@ static void yy_reduce(
case 105: /* sliding_opt ::= SLIDING LP tmvar RP */ yytestcase(yyruleno==105);
{yygotominor.yy0 = yymsp[-1].minor.yy0; }
break;
case 101: /* interval_opt ::= */
case 106: /* sliding_opt ::= */ yytestcase(yyruleno==106);
{yygotominor.yy0.n = 0; }
break;
case 102: /* fill_opt ::= */
{yygotominor.yy216 = 0; }
break;
case 103: /* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
tVariant A = {0};
......@@ -1826,11 +1833,8 @@ static void yy_reduce(
break;
case 104: /* fill_opt ::= FILL LP ID RP */
{
tVariant A = {0};
toTSDBType(yymsp[-1].minor.yy0.type);
tVariantCreate(&A, &yymsp[-1].minor.yy0);
yygotominor.yy216 = tVariantListAppend(NULL, &A, -1);
yygotominor.yy216 = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1);
}
break;
case 107: /* orderby_opt ::= */
......@@ -1851,10 +1855,12 @@ static void yy_reduce(
yygotominor.yy216 = tVariantListAppend(NULL, &yymsp[-1].minor.yy266, yymsp[0].minor.yy412);
}
break;
case 111: /* item ::= ids */
case 111: /* item ::= ids cpxName */
{
toTSDBType(yymsp[0].minor.yy0.type);
tVariantCreate(&yygotominor.yy266, &yymsp[0].minor.yy0);
toTSDBType(yymsp[-1].minor.yy0.type);
yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n;
tVariantCreate(&yygotominor.yy266, &yymsp[-1].minor.yy0);
}
break;
case 112: /* sortorder ::= ASC */
......@@ -1878,12 +1884,12 @@ static void yy_reduce(
break;
case 119: /* having_opt ::= */
case 129: /* where_opt ::= */ yytestcase(yyruleno==129);
case 164: /* expritem ::= */ yytestcase(yyruleno==164);
case 165: /* expritem ::= */ yytestcase(yyruleno==165);
{yygotominor.yy370 = 0;}
break;
case 120: /* having_opt ::= HAVING expr */
case 130: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==130);
case 163: /* expritem ::= expr */ yytestcase(yyruleno==163);
case 164: /* expritem ::= expr */ yytestcase(yyruleno==164);
{yygotominor.yy370 = yymsp[0].minor.yy370;}
break;
case 121: /* limit_opt ::= */
......@@ -1911,193 +1917,181 @@ static void yy_reduce(
case 133: /* expr ::= ID DOT ID */
{yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yygotominor.yy370 = tSQLExprIdValueCreate(&yymsp[-2].minor.yy0, TK_ID);}
break;
case 134: /* expr ::= INTEGER */
case 134: /* expr ::= ID DOT STAR */
{yymsp[-2].minor.yy0.n += (1+yymsp[0].minor.yy0.n); yygotominor.yy370 = tSQLExprIdValueCreate(&yymsp[-2].minor.yy0, TK_ALL);}
break;
case 135: /* expr ::= INTEGER */
{yygotominor.yy370 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_INTEGER);}
break;
case 135: /* expr ::= MINUS INTEGER */
case 136: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==136);
case 136: /* expr ::= MINUS INTEGER */
case 137: /* expr ::= PLUS INTEGER */ yytestcase(yyruleno==137);
{yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_INTEGER; yygotominor.yy370 = tSQLExprIdValueCreate(&yymsp[-1].minor.yy0, TK_INTEGER);}
break;
case 137: /* expr ::= FLOAT */
case 138: /* expr ::= FLOAT */
{yygotominor.yy370 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_FLOAT);}
break;
case 138: /* expr ::= MINUS FLOAT */
case 139: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==139);
case 139: /* expr ::= MINUS FLOAT */
case 140: /* expr ::= PLUS FLOAT */ yytestcase(yyruleno==140);
{yymsp[-1].minor.yy0.n += yymsp[0].minor.yy0.n; yymsp[-1].minor.yy0.type = TK_FLOAT; yygotominor.yy370 = tSQLExprIdValueCreate(&yymsp[-1].minor.yy0, TK_FLOAT);}
break;
case 140: /* expr ::= STRING */
case 141: /* expr ::= STRING */
{yygotominor.yy370 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_STRING);}
break;
case 141: /* expr ::= NOW */
case 142: /* expr ::= NOW */
{yygotominor.yy370 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_NOW); }
break;
case 142: /* expr ::= VARIABLE */
case 143: /* expr ::= VARIABLE */
{yygotominor.yy370 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_VARIABLE);}
break;
case 143: /* expr ::= BOOL */
case 144: /* expr ::= BOOL */
{yygotominor.yy370 = tSQLExprIdValueCreate(&yymsp[0].minor.yy0, TK_BOOL);}
break;
case 144: /* expr ::= ID LP exprlist RP */
case 145: /* expr ::= ID LP exprlist RP */
{
yygotominor.yy370 = tSQLExprCreateFunction(yymsp[-1].minor.yy98, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type);
}
break;
case 145: /* expr ::= ID LP STAR RP */
case 146: /* expr ::= ID LP STAR RP */
{
yygotominor.yy370 = tSQLExprCreateFunction(NULL, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0, yymsp[-3].minor.yy0.type);
}
break;
case 146: /* expr ::= expr AND expr */
case 147: /* expr ::= expr AND expr */
{yygotominor.yy370 = tSQLExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_AND);}
break;
case 147: /* expr ::= expr OR expr */
case 148: /* expr ::= expr OR expr */
{yygotominor.yy370 = tSQLExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_OR); }
break;
case 148: /* expr ::= expr LT expr */
case 149: /* expr ::= expr LT expr */
{yygotominor.yy370 = tSQLExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_LT);}
break;
case 149: /* expr ::= expr GT expr */
case 150: /* expr ::= expr GT expr */
{yygotominor.yy370 = tSQLExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_GT);}
break;
case 150: /* expr ::= expr LE expr */
case 151: /* expr ::= expr LE expr */
{yygotominor.yy370 = tSQLExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_LE);}
break;
case 151: /* expr ::= expr GE expr */
case 152: /* expr ::= expr GE expr */
{yygotominor.yy370 = tSQLExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_GE);}
break;
case 152: /* expr ::= expr NE expr */
case 153: /* expr ::= expr NE expr */
{yygotominor.yy370 = tSQLExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_NE);}
break;
case 153: /* expr ::= expr EQ expr */
case 154: /* expr ::= expr EQ expr */
{yygotominor.yy370 = tSQLExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_EQ);}
break;
case 154: /* expr ::= expr PLUS expr */
case 155: /* expr ::= expr PLUS expr */
{yygotominor.yy370 = tSQLExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_PLUS); }
break;
case 155: /* expr ::= expr MINUS expr */
case 156: /* expr ::= expr MINUS expr */
{yygotominor.yy370 = tSQLExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_MINUS); }
break;
case 156: /* expr ::= expr STAR expr */
case 157: /* expr ::= expr STAR expr */
{yygotominor.yy370 = tSQLExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_STAR); }
break;
case 157: /* expr ::= expr SLASH expr */
case 158: /* expr ::= expr SLASH expr */
{yygotominor.yy370 = tSQLExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_DIVIDE);}
break;
case 158: /* expr ::= expr REM expr */
case 159: /* expr ::= expr REM expr */
{yygotominor.yy370 = tSQLExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_REM); }
break;
case 159: /* expr ::= expr LIKE expr */
case 160: /* expr ::= expr LIKE expr */
{yygotominor.yy370 = tSQLExprCreate(yymsp[-2].minor.yy370, yymsp[0].minor.yy370, TK_LIKE); }
break;
case 160: /* expr ::= expr IN LP exprlist RP */
case 161: /* expr ::= expr IN LP exprlist RP */
{yygotominor.yy370 = tSQLExprCreate(yymsp[-4].minor.yy370, (tSQLExpr*)yymsp[-1].minor.yy98, TK_IN); }
break;
case 161: /* exprlist ::= exprlist COMMA expritem */
case 168: /* itemlist ::= itemlist COMMA expr */ yytestcase(yyruleno==168);
case 162: /* exprlist ::= exprlist COMMA expritem */
case 169: /* itemlist ::= itemlist COMMA expr */ yytestcase(yyruleno==169);
{yygotominor.yy98 = tSQLExprListAppend(yymsp[-2].minor.yy98,yymsp[0].minor.yy370,0);}
break;
case 162: /* exprlist ::= expritem */
case 169: /* itemlist ::= expr */ yytestcase(yyruleno==169);
case 163: /* exprlist ::= expritem */
case 170: /* itemlist ::= expr */ yytestcase(yyruleno==170);
{yygotominor.yy98 = tSQLExprListAppend(0,yymsp[0].minor.yy370,0);}
break;
case 165: /* cmd ::= INSERT INTO cpxName insert_value_list */
case 166: /* cmd ::= INSERT INTO cpxName insert_value_list */
{
tSetInsertSQLElems(pInfo, &yymsp[-1].minor.yy0, yymsp[0].minor.yy434);
}
break;
case 166: /* insert_value_list ::= VALUES LP itemlist RP */
case 167: /* insert_value_list ::= VALUES LP itemlist RP */
{yygotominor.yy434 = tSQLListListAppend(NULL, yymsp[-1].minor.yy98);}
break;
case 167: /* insert_value_list ::= insert_value_list VALUES LP itemlist RP */
case 168: /* insert_value_list ::= insert_value_list VALUES LP itemlist RP */
{yygotominor.yy434 = tSQLListListAppend(yymsp[-4].minor.yy434, yymsp[-1].minor.yy98);}
break;
case 170: /* cmd ::= RESET QUERY CACHE */
case 171: /* cmd ::= RESET QUERY CACHE */
{ setDCLSQLElems(pInfo, RESET_QUERY_CACHE, 0);}
break;
case 171: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
case 172: /* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableSQL* pAlterTable = tAlterTableSQLElems(&yymsp[-4].minor.yy0, yymsp[0].minor.yy151, NULL, ALTER_TABLE_ADD_COLUMN);
setSQLInfo(pInfo, pAlterTable, NULL, ALTER_TABLE_ADD_COLUMN);
}
break;
case 172: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
case 173: /* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
toTSDBType(yymsp[0].minor.yy0.type);
tVariant V;
tVariantCreate(&V, &yymsp[0].minor.yy0);
tVariantList* K = tVariantListAppend(NULL, &V, -1);
tVariantList* K = tVariantListAppendToken(NULL, &yymsp[0].minor.yy0, -1);
SAlterTableSQL* pAlterTable = tAlterTableSQLElems(&yymsp[-4].minor.yy0, NULL, K, ALTER_TABLE_DROP_COLUMN);
setSQLInfo(pInfo, pAlterTable, NULL, ALTER_TABLE_DROP_COLUMN);
}
break;
case 173: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
case 174: /* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
SAlterTableSQL* pAlterTable = tAlterTableSQLElems(&yymsp[-4].minor.yy0, yymsp[0].minor.yy151, NULL, ALTER_TABLE_TAGS_ADD);
setSQLInfo(pInfo, pAlterTable, NULL, ALTER_TABLE_TAGS_ADD);
}
break;
case 174: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
case 175: /* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
yymsp[-4].minor.yy0.n += yymsp[-3].minor.yy0.n;
toTSDBType(yymsp[0].minor.yy0.type);
tVariant V;
tVariantCreate(&V, &yymsp[0].minor.yy0);
tVariantList* A = tVariantListAppend(NULL, &V, -1);
tVariantList* A = tVariantListAppendToken(NULL, &yymsp[0].minor.yy0, -1);
SAlterTableSQL* pAlterTable = tAlterTableSQLElems(&yymsp[-4].minor.yy0, NULL, A, ALTER_TABLE_TAGS_DROP);
setSQLInfo(pInfo, pAlterTable, NULL, ALTER_TABLE_TAGS_DROP);
}
break;
case 175: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
case 176: /* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n;
tVariant V;
toTSDBType(yymsp[-1].minor.yy0.type);
tVariantCreate(&V, &yymsp[-1].minor.yy0);
tVariantList* A = tVariantListAppend(NULL, &V, -1);
tVariantList* A = tVariantListAppendToken(NULL, &yymsp[-1].minor.yy0, -1);
toTSDBType(yymsp[0].minor.yy0.type);
tVariantCreate(&V, &yymsp[0].minor.yy0);
A = tVariantListAppend(A, &V, -1);
A = tVariantListAppendToken(A, &yymsp[0].minor.yy0, -1);
SAlterTableSQL* pAlterTable = tAlterTableSQLElems(&yymsp[-5].minor.yy0, NULL, A, ALTER_TABLE_TAGS_CHG);
setSQLInfo(pInfo, pAlterTable, NULL, ALTER_TABLE_TAGS_CHG);
}
break;
case 176: /* cmd ::= ALTER TABLE ids cpxName SET ids EQ tagitem */
case 177: /* cmd ::= ALTER TABLE ids cpxName SET ids EQ tagitem */
{
yymsp[-5].minor.yy0.n += yymsp[-4].minor.yy0.n;
tVariant V;
toTSDBType(yymsp[-2].minor.yy0.type);
tVariantCreate(&V, &yymsp[-2].minor.yy0);
tVariantList* A = tVariantListAppend(NULL, &V, -1);
tVariantList* A = tVariantListAppendToken(NULL, &yymsp[-2].minor.yy0, -1);
A = tVariantListAppend(A, &yymsp[0].minor.yy266, -1);
SAlterTableSQL* pAlterTable = tAlterTableSQLElems(&yymsp[-5].minor.yy0, NULL, A, ALTER_TABLE_TAGS_SET);
setSQLInfo(pInfo, pAlterTable, NULL, ALTER_TABLE_TAGS_SET);
}
break;
case 177: /* cmd ::= KILL CONNECTION IP COLON INTEGER */
case 178: /* cmd ::= KILL CONNECTION IP COLON INTEGER */
{yymsp[-2].minor.yy0.n += (yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setDCLSQLElems(pInfo, KILL_CONNECTION, 1, &yymsp[-2].minor.yy0);}
break;
case 178: /* cmd ::= KILL STREAM IP COLON INTEGER COLON INTEGER */
case 179: /* cmd ::= KILL STREAM IP COLON INTEGER COLON INTEGER */
{yymsp[-4].minor.yy0.n += (yymsp[-3].minor.yy0.n + yymsp[-2].minor.yy0.n + yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setDCLSQLElems(pInfo, KILL_STREAM, 1, &yymsp[-4].minor.yy0);}
break;
case 179: /* cmd ::= KILL QUERY IP COLON INTEGER COLON INTEGER */
case 180: /* cmd ::= KILL QUERY IP COLON INTEGER COLON INTEGER */
{yymsp[-4].minor.yy0.n += (yymsp[-3].minor.yy0.n + yymsp[-2].minor.yy0.n + yymsp[-1].minor.yy0.n + yymsp[0].minor.yy0.n); setDCLSQLElems(pInfo, KILL_QUERY, 1, &yymsp[-4].minor.yy0);}
break;
default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册