Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
784975da
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
784975da
编写于
12月 23, 2021
作者:
S
Shengliang Guan
提交者:
GitHub
12月 23, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #9320 from taosdata/feature/3.0_liaohj
Feature/3.0 liaohj
上级
1ce9487f
3d2e4569
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
2071 addition
and
1998 deletion
+2071
-1998
include/common/taosmsg.h
include/common/taosmsg.h
+15
-6
include/libs/catalog/catalog.h
include/libs/catalog/catalog.h
+2
-2
include/libs/parser/parsenodes.h
include/libs/parser/parsenodes.h
+1
-1
include/libs/qcom/query.h
include/libs/qcom/query.h
+1
-1
source/client/inc/clientInt.h
source/client/inc/clientInt.h
+3
-4
source/client/src/clientEnv.c
source/client/src/clientEnv.c
+13
-4
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+48
-19
source/client/src/clientMsgHandler.c
source/client/src/clientMsgHandler.c
+40
-86
source/client/test/clientTests.cpp
source/client/test/clientTests.cpp
+211
-90
source/libs/catalog/inc/catalogInt.h
source/libs/catalog/inc/catalogInt.h
+0
-3
source/libs/catalog/src/catalog.c
source/libs/catalog/src/catalog.c
+3
-3
source/libs/catalog/test/catalogTests.cpp
source/libs/catalog/test/catalogTests.cpp
+1
-1
source/libs/parser/inc/astToMsg.h
source/libs/parser/inc/astToMsg.h
+2
-1
source/libs/parser/inc/sql.y
source/libs/parser/inc/sql.y
+13
-12
source/libs/parser/inc/ttokendef.h
source/libs/parser/inc/ttokendef.h
+82
-82
source/libs/parser/src/astToMsg.c
source/libs/parser/src/astToMsg.c
+41
-14
source/libs/parser/src/astValidate.c
source/libs/parser/src/astValidate.c
+54
-16
source/libs/parser/src/sql.c
source/libs/parser/src/sql.c
+1533
-1571
source/libs/parser/src/ttokenizer.c
source/libs/parser/src/ttokenizer.c
+1
-1
source/libs/qcom/src/querymsg.c
source/libs/qcom/src/querymsg.c
+1
-76
src/query/inc/sql.y
src/query/inc/sql.y
+6
-5
未找到文件。
include/common/taosmsg.h
浏览文件 @
784975da
...
...
@@ -308,17 +308,25 @@ typedef struct {
char
data
[];
}
SMDCreateTableMsg
;
//typedef struct {
// int32_t len; // one create table message
// char tableName[TSDB_TABLE_FNAME_LEN];
// int16_t numOfColumns;
// int16_t sqlLen; // the length of SQL, it starts after schema , sql is a null-terminated string
// int8_t igExists;
// int8_t rspMeta;
// int8_t reserved[16];
// char schema[];
//} SCreateTableMsg;
typedef
struct
{
int32_t
len
;
// one create table message
char
tableName
[
TSDB_TABLE_FNAME_LEN
];
int16_t
numOfTags
;
int16_t
numOfColumns
;
int16_t
sqlLen
;
// the length of SQL, it starts after schema , sql is a null-terminated string
int16_t
numOfTags
;
int8_t
igExists
;
int8_t
rspMeta
;
int8_t
reserved
[
16
];
char
schema
[];
}
SCreateTableMsg
;
}
SCreate
C
TableMsg
;
typedef
struct
{
char
name
[
TSDB_TABLE_FNAME_LEN
];
...
...
@@ -326,7 +334,7 @@ typedef struct {
int32_t
numOfTags
;
int32_t
numOfColumns
;
SSchema
pSchema
[];
}
SCreateStbMsg
;
}
SCreateStbMsg
,
SCreateTableMsg
;
typedef
struct
{
char
name
[
TSDB_TABLE_FNAME_LEN
];
...
...
@@ -369,6 +377,7 @@ typedef struct {
typedef
struct
{
SMsgHead
head
;
char
name
[
TSDB_TABLE_FNAME_LEN
];
int8_t
ignoreNotExists
;
}
SDropTableMsg
;
typedef
struct
{
...
...
include/libs/catalog/catalog.h
浏览文件 @
784975da
...
...
@@ -115,14 +115,14 @@ int32_t catalogGetTableDistVgroup(struct SCatalog* pCatalog, void *pRpc, const S
/**
* Get a table's vgroup from its name's hash value.
* @param pCatalog (input, got with catalogGetHandle)
* @param p
Rpc
(input, rpc object)
* @param p
Transporter
(input, rpc object)
* @param pMgmtEps (input, mnode EPs)
* @param pDBName (input, full db name)
* @param pTableName (input, table name, NOT including db name)
* @param vgInfo (output, vgroup info)
* @return error code
*/
int32_t
catalogGetTableHashVgroup
(
struct
SCatalog
*
pCatalog
,
void
*
pRpc
,
const
SEpSet
*
pMgmtEps
,
const
char
*
pDBName
,
const
char
*
pTableName
,
SVgroupInfo
*
vgInfo
);
int32_t
catalogGetTableHashVgroup
(
struct
SCatalog
*
pCatalog
,
void
*
pTransporter
,
const
SEpSet
*
pMgmtEps
,
const
char
*
pDBName
,
const
char
*
pTableName
,
SVgroupInfo
*
vgInfo
);
/**
...
...
include/libs/parser/parsenodes.h
浏览文件 @
784975da
...
...
@@ -40,7 +40,7 @@ typedef struct SQueryNode {
typedef
struct
SField
{
char
name
[
TSDB_COL_NAME_LEN
];
uint8_t
type
;
int
16
_t
bytes
;
int
32
_t
bytes
;
}
SField
;
typedef
struct
SParseBasicCtx
{
...
...
include/libs/qcom/query.h
浏览文件 @
784975da
...
...
@@ -107,7 +107,7 @@ int32_t cleanupTaskQueue();
int32_t
taosAsyncExec
(
__async_exec_fn_t
execFn
,
void
*
execParam
,
int32_t
*
code
);
SSchema
*
tGetTbnameColumnSchema
();
void
msgInit
();
void
initQueryModuleMsgHandle
();
extern
int32_t
(
*
queryBuildMsg
[
TSDB_MSG_TYPE_MAX
])(
void
*
input
,
char
**
msg
,
int32_t
msgSize
,
int32_t
*
msgLen
);
extern
int32_t
(
*
queryProcessMsgRsp
[
TSDB_MSG_TYPE_MAX
])(
void
*
output
,
char
*
msg
,
int32_t
msgSize
);
...
...
source/client/inc/clientInt.h
浏览文件 @
784975da
...
...
@@ -137,15 +137,14 @@ typedef struct SRequestMsgBody {
extern
SAppInfo
appInfo
;
extern
int32_t
tscReqRef
;
extern
void
*
tscQhandle
;
extern
int32_t
tscConnRef
;
extern
int
(
*
buildRequestMsgFp
[
TSDB_SQL_MAX
])(
SRequestObj
*
pRequest
,
SRequestMsgBody
*
pMsgBody
);
extern
int
(
*
handleRequestRspFp
[
TSDB_
SQL
_MAX
])(
SRequestObj
*
pRequest
,
const
char
*
pMsg
,
int32_t
msgLen
);
SRequestMsgBody
buildRequestMsgImpl
(
SRequestObj
*
pRequest
);
extern
int
(
*
handleRequestRspFp
[
TSDB_
MSG_TYPE
_MAX
])(
SRequestObj
*
pRequest
,
const
char
*
pMsg
,
int32_t
msgLen
);
int
taos_init
();
void
*
createTscObj
(
const
char
*
user
,
const
char
*
auth
,
const
char
*
ip
,
uint32_t
port
,
SAppInstInfo
*
pAppInfo
);
void
*
createTscObj
(
const
char
*
user
,
const
char
*
auth
,
const
char
*
db
,
SAppInstInfo
*
pAppInfo
);
void
destroyTscObj
(
void
*
pObj
);
void
*
createRequest
(
STscObj
*
pObj
,
__taos_async_fn_t
fp
,
void
*
param
,
int32_t
type
);
...
...
source/client/src/clientEnv.c
浏览文件 @
784975da
...
...
@@ -13,11 +13,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "os.h"
#include "taosmsg.h"
#include "query.h"
#include <catalog.h>
#include "clientInt.h"
#include "clientLog.h"
#include "os.h"
#include "query.h"
#include "taosmsg.h"
#include "tcache.h"
#include "tconfig.h"
#include "tglobal.h"
...
...
@@ -129,7 +130,7 @@ void destroyTscObj(void *pObj) {
tfree
(
pTscObj
);
}
void
*
createTscObj
(
const
char
*
user
,
const
char
*
auth
,
const
char
*
ip
,
uint32_t
port
,
SAppInstInfo
*
pAppInfo
)
{
void
*
createTscObj
(
const
char
*
user
,
const
char
*
auth
,
const
char
*
db
,
SAppInstInfo
*
pAppInfo
)
{
STscObj
*
pObj
=
(
STscObj
*
)
calloc
(
1
,
sizeof
(
STscObj
));
if
(
NULL
==
pObj
)
{
terrno
=
TSDB_CODE_TSC_OUT_OF_MEMORY
;
...
...
@@ -144,6 +145,10 @@ void* createTscObj(const char* user, const char* auth, const char *ip, uint32_t
tstrncpy
(
pObj
->
user
,
user
,
sizeof
(
pObj
->
user
));
memcpy
(
pObj
->
pass
,
auth
,
TSDB_PASSWORD_LEN
);
if
(
db
!=
NULL
)
{
tstrncpy
(
pObj
->
db
,
db
,
tListLen
(
pObj
->
db
));
}
pthread_mutex_init
(
&
pObj
->
mutex
,
NULL
);
pObj
->
id
=
taosAddRef
(
tscConnRef
,
pObj
);
...
...
@@ -220,9 +225,13 @@ void taos_init_imp(void) {
taosInitNotes
();
initMsgHandleFp
();
initQueryModuleMsgHandle
();
rpcInit
();
SCatalogCfg
cfg
=
{.
enableVgroupCache
=
true
,
.
maxDBCacheNum
=
100
,
.
maxTblCacheNum
=
100
};
catalogInit
(
&
cfg
);
tscDebug
(
"starting to initialize TAOS driver, local ep: %s"
,
tsLocalEp
);
taosSetCoreDump
(
true
);
...
...
source/client/src/clientImpl.c
浏览文件 @
784975da
...
...
@@ -154,17 +154,52 @@ TAOS_RES *taos_query_l(TAOS *taos, const char *sql, int sqlLen) {
SParseBasicCtx
c
=
{.
requestId
=
pRequest
->
requestId
,
.
acctId
=
pTscObj
->
acctId
,
.
db
=
getConnectionDB
(
pTscObj
)};
code
=
qParseQuerySql
(
pRequest
->
sqlstr
,
sqlLen
,
&
c
,
&
type
,
&
output
,
&
outputLen
,
pRequest
->
msgBuf
,
ERROR_MSG_BUF_DEFAULT_SIZE
);
if
(
type
==
TSDB_SQL_CREATE_USER
||
type
==
TSDB_SQL_SHOW
||
type
==
TSDB_SQL_DROP_USER
||
type
==
TSDB_SQL_DROP_ACCT
||
type
==
TSDB_SQL_CREATE_DB
||
type
==
TSDB_SQL_CREATE_ACCT
||
type
==
TSDB_SQL_CREATE_TABLE
||
type
==
TSDB_SQL_USE_DB
)
{
if
(
type
==
TSDB_MSG_TYPE_CREATE_USER
||
type
==
TSDB_MSG_TYPE_SHOW
||
type
==
TSDB_MSG_TYPE_DROP_USER
||
type
==
TSDB_MSG_TYPE_DROP_ACCT
||
type
==
TSDB_MSG_TYPE_CREATE_DB
||
type
==
TSDB_MSG_TYPE_CREATE_ACCT
||
type
==
TSDB_MSG_TYPE_CREATE_TABLE
||
type
==
TSDB_MSG_TYPE_CREATE_STB
||
type
==
TSDB_MSG_TYPE_USE_DB
||
type
==
TSDB_MSG_TYPE_DROP_DB
||
type
==
TSDB_MSG_TYPE_DROP_STB
)
{
pRequest
->
type
=
type
;
pRequest
->
body
.
requestMsg
=
(
SReqMsgInfo
){.
pMsg
=
output
,
.
len
=
outputLen
};
SRequestMsgBody
body
=
{
0
}
;
buildRequestMsgFp
[
type
](
pRequest
,
&
body
)
;
SRequestMsgBody
body
=
buildRequestMsgImpl
(
pRequest
)
;
SEpSet
*
pEpSet
=
&
pTscObj
->
pAppInfo
->
mgmtEp
.
epSet
;
int64_t
transporterId
=
0
;
sendMsgToServer
(
pTscObj
->
pTransporter
,
&
pTscObj
->
pAppInfo
->
mgmtEp
.
epSet
,
&
body
,
&
transporterId
);
if
(
type
==
TSDB_MSG_TYPE_CREATE_TABLE
)
{
struct
SCatalog
*
pCatalog
=
NULL
;
char
buf
[
12
]
=
{
0
};
sprintf
(
buf
,
"%d"
,
pTscObj
->
pAppInfo
->
clusterId
);
code
=
catalogGetHandle
(
buf
,
&
pCatalog
);
if
(
code
!=
0
)
{
pRequest
->
code
=
code
;
return
pRequest
;
}
SCreateTableMsg
*
pMsg
=
body
.
msgInfo
.
pMsg
;
SName
t
=
{
0
};
tNameFromString
(
&
t
,
pMsg
->
name
,
T_NAME_ACCT
|
T_NAME_DB
|
T_NAME_TABLE
);
char
db
[
TSDB_DB_NAME_LEN
+
TS_PATH_DELIMITER_LEN
+
TSDB_ACCT_ID_LEN
]
=
{
0
};
tNameGetFullDbName
(
&
t
,
db
);
SVgroupInfo
info
=
{
0
};
catalogGetTableHashVgroup
(
pCatalog
,
pTscObj
->
pTransporter
,
pEpSet
,
db
,
tNameGetTableName
(
&
t
),
&
info
);
int64_t
transporterId
=
0
;
SEpSet
ep
=
{
0
};
ep
.
inUse
=
info
.
inUse
;
ep
.
numOfEps
=
info
.
numOfEps
;
for
(
int32_t
i
=
0
;
i
<
ep
.
numOfEps
;
++
i
)
{
ep
.
port
[
i
]
=
info
.
epAddr
[
i
].
port
;
tstrncpy
(
ep
.
fqdn
[
i
],
info
.
epAddr
[
i
].
fqdn
,
tListLen
(
ep
.
fqdn
[
i
]));
}
sendMsgToServer
(
pTscObj
->
pTransporter
,
&
ep
,
&
body
,
&
transporterId
);
}
else
{
int64_t
transporterId
=
0
;
sendMsgToServer
(
pTscObj
->
pTransporter
,
pEpSet
,
&
body
,
&
transporterId
);
}
tsem_wait
(
&
pRequest
->
body
.
rspSem
);
destroyRequestMsgBody
(
&
body
);
...
...
@@ -220,13 +255,13 @@ int initEpSetFromCfg(const char *firstEp, const char *secondEp, SCorEpSet *pEpSe
}
STscObj
*
taosConnectImpl
(
const
char
*
ip
,
const
char
*
user
,
const
char
*
auth
,
const
char
*
db
,
uint16_t
port
,
__taos_async_fn_t
fp
,
void
*
param
,
SAppInstInfo
*
pAppInfo
)
{
STscObj
*
pTscObj
=
createTscObj
(
user
,
auth
,
ip
,
port
,
pAppInfo
);
STscObj
*
pTscObj
=
createTscObj
(
user
,
auth
,
db
,
pAppInfo
);
if
(
NULL
==
pTscObj
)
{
terrno
=
TSDB_CODE_TSC_OUT_OF_MEMORY
;
return
pTscObj
;
}
SRequestObj
*
pRequest
=
createRequest
(
pTscObj
,
fp
,
param
,
TSDB_
SQL
_CONNECT
);
SRequestObj
*
pRequest
=
createRequest
(
pTscObj
,
fp
,
param
,
TSDB_
MSG_TYPE
_CONNECT
);
if
(
pRequest
==
NULL
)
{
destroyTscObj
(
pTscObj
);
terrno
=
TSDB_CODE_TSC_OUT_OF_MEMORY
;
...
...
@@ -268,16 +303,11 @@ static int32_t buildConnectMsg(SRequestObj *pRequest, SRequestMsgBody* pMsgBody)
return
-
1
;
}
// TODO refactor full_name
char
*
db
;
// ugly code to move the space
STscObj
*
pObj
=
pRequest
->
pTscObj
;
pthread_mutex_lock
(
&
pObj
->
mutex
);
db
=
strstr
(
pObj
->
db
,
TS_PATH_DELIMITER
);
db
=
(
db
==
NULL
)
?
pObj
->
db
:
db
+
1
;
char
*
db
=
getConnectionDB
(
pObj
)
;
tstrncpy
(
pConnect
->
db
,
db
,
sizeof
(
pConnect
->
db
));
pthread_mutex_unlock
(
&
pObj
->
mutex
);
tfree
(
db
);
pConnect
->
pid
=
htonl
(
appInfo
.
pid
);
pConnect
->
startTime
=
htobe64
(
appInfo
.
startTime
);
...
...
@@ -395,10 +425,9 @@ void* doFetchRow(SRequestObj* pRequest) {
SReqResultInfo
*
pResultInfo
=
&
pRequest
->
body
.
resInfo
;
if
(
pResultInfo
->
pData
==
NULL
||
pResultInfo
->
current
>=
pResultInfo
->
numOfRows
)
{
pRequest
->
type
=
TSDB_
SQL_RETRIEVE_MNOD
E
;
pRequest
->
type
=
TSDB_
MSG_TYPE_SHOW_RETRIEV
E
;
SRequestMsgBody
body
=
{
0
};
buildRequestMsgFp
[
pRequest
->
type
](
pRequest
,
&
body
);
SRequestMsgBody
body
=
buildRequestMsgImpl
(
pRequest
);
int64_t
transporterId
=
0
;
STscObj
*
pTscObj
=
pRequest
->
pTscObj
;
...
...
source/client/src/clientMsgHandler.c
浏览文件 @
784975da
...
...
@@ -21,8 +21,7 @@
#include "tmsgtype.h"
#include "trpc.h"
int
(
*
buildRequestMsgFp
[
TSDB_SQL_MAX
])(
SRequestObj
*
pRequest
,
SRequestMsgBody
*
pMsgBody
)
=
{
0
};
int
(
*
handleRequestRspFp
[
TSDB_SQL_MAX
])(
SRequestObj
*
pRequest
,
const
char
*
pMsg
,
int32_t
msgLen
);
int
(
*
handleRequestRspFp
[
TSDB_MSG_TYPE_MAX
])(
SRequestObj
*
pRequest
,
const
char
*
pMsg
,
int32_t
msgLen
);
int32_t
buildConnectMsg
(
SRequestObj
*
pRequest
,
SRequestMsgBody
*
pMsgBody
)
{
pMsgBody
->
msgType
=
TSDB_MSG_TYPE_CONNECT
;
...
...
@@ -67,15 +66,6 @@ int processConnectRsp(SRequestObj *pRequest, const char* pMsg, int32_t msgLen) {
pConnect
->
epSet
.
port
[
i
]
=
htons
(
pConnect
->
epSet
.
port
[
i
]);
}
// TODO refactor
pthread_mutex_lock
(
&
pTscObj
->
mutex
);
char
temp
[
TSDB_TABLE_FNAME_LEN
*
2
]
=
{
0
};
int32_t
len
=
sprintf
(
temp
,
"%d%s%s"
,
pTscObj
->
acctId
,
TS_PATH_DELIMITER
,
pTscObj
->
db
);
assert
(
len
<=
sizeof
(
pTscObj
->
db
));
tstrncpy
(
pTscObj
->
db
,
temp
,
sizeof
(
pTscObj
->
db
));
pthread_mutex_unlock
(
&
pTscObj
->
mutex
);
if
(
!
isEpsetEqual
(
&
pTscObj
->
pAppInfo
->
mgmtEp
.
epSet
,
&
pConnect
->
epSet
))
{
updateEpSet_s
(
&
pTscObj
->
pAppInfo
->
mgmtEp
,
&
pConnect
->
epSet
);
}
...
...
@@ -96,47 +86,35 @@ int processConnectRsp(SRequestObj *pRequest, const char* pMsg, int32_t msgLen) {
return
0
;
}
int32_t
doBuildMsgSupp
(
SRequestObj
*
pRequest
,
SRequestMsgBody
*
pMsgBody
)
{
static
int32_t
buildRetrieveMnodeMsg
(
SRequestObj
*
pRequest
,
SRequestMsgBody
*
pMsgBody
)
{
pMsgBody
->
msgType
=
TSDB_MSG_TYPE_SHOW_RETRIEVE
;
pMsgBody
->
msgInfo
.
len
=
sizeof
(
SRetrieveTableMsg
);
pMsgBody
->
requestObjRefId
=
pRequest
->
self
;
pMsgBody
->
msgInfo
=
pRequest
->
body
.
requestMsg
;
switch
(
pRequest
->
type
)
{
case
TSDB_SQL_CREATE_USER
:
pMsgBody
->
msgType
=
TSDB_MSG_TYPE_CREATE_USER
;
break
;
case
TSDB_SQL_DROP_USER
:
pMsgBody
->
msgType
=
TSDB_MSG_TYPE_DROP_USER
;
break
;
case
TSDB_SQL_CREATE_ACCT
:
pMsgBody
->
msgType
=
TSDB_MSG_TYPE_CREATE_ACCT
;
break
;
case
TSDB_SQL_DROP_ACCT
:
pMsgBody
->
msgType
=
TSDB_MSG_TYPE_DROP_ACCT
;
break
;
case
TSDB_SQL_CREATE_DB
:
{
pMsgBody
->
msgType
=
TSDB_MSG_TYPE_CREATE_DB
;
SCreateDbMsg
*
pCreateMsg
=
pRequest
->
body
.
requestMsg
.
pMsg
;
SName
name
=
{
0
};
int32_t
ret
=
tNameSetDbName
(
&
name
,
pRequest
->
pTscObj
->
acctId
,
pCreateMsg
->
db
,
strnlen
(
pCreateMsg
->
db
,
tListLen
(
pCreateMsg
->
db
)));
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
return
-
1
;
}
tNameGetFullDbName
(
&
name
,
pCreateMsg
->
db
);
break
;
}
case
TSDB_SQL_USE_DB
:
{
pMsgBody
->
msgType
=
TSDB_MSG_TYPE_USE_DB
;
break
;
}
case
TSDB_SQL_CREATE_TABLE
:
{
pMsgBody
->
msgType
=
TSDB_MSG_TYPE_CREATE_STB
;
break
;
}
case
TSDB_SQL_SHOW
:
pMsgBody
->
msgType
=
TSDB_MSG_TYPE_SHOW
;
break
;
SRetrieveTableMsg
*
pRetrieveMsg
=
calloc
(
1
,
sizeof
(
SRetrieveTableMsg
));
if
(
pRetrieveMsg
==
NULL
)
{
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
}
pRetrieveMsg
->
showId
=
htonl
(
pRequest
->
body
.
execId
);
pMsgBody
->
msgInfo
.
pMsg
=
pRetrieveMsg
;
return
TSDB_CODE_SUCCESS
;
}
SRequestMsgBody
buildRequestMsgImpl
(
SRequestObj
*
pRequest
)
{
if
(
pRequest
->
type
==
TSDB_MSG_TYPE_SHOW_RETRIEVE
)
{
SRequestMsgBody
body
=
{
0
};
buildRetrieveMnodeMsg
(
pRequest
,
&
body
);
return
body
;
}
else
{
assert
(
pRequest
!=
NULL
);
SRequestMsgBody
body
=
{
.
requestObjRefId
=
pRequest
->
self
,
.
msgInfo
=
pRequest
->
body
.
requestMsg
,
.
msgType
=
pRequest
->
type
,
.
requestId
=
pRequest
->
requestId
,
};
return
body
;
}
}
...
...
@@ -175,18 +153,6 @@ int32_t processShowRsp(SRequestObj *pRequest, const char* pMsg, int32_t msgLen)
return
0
;
}
int
buildRetrieveMnodeMsg
(
SRequestObj
*
pRequest
,
SRequestMsgBody
*
pMsgBody
)
{
pMsgBody
->
msgType
=
TSDB_MSG_TYPE_SHOW_RETRIEVE
;
pMsgBody
->
msgInfo
.
len
=
sizeof
(
SRetrieveTableMsg
);
pMsgBody
->
requestObjRefId
=
pRequest
->
self
;
SRetrieveTableMsg
*
pRetrieveMsg
=
calloc
(
1
,
sizeof
(
SRetrieveTableMsg
));
pRetrieveMsg
->
showId
=
htonl
(
pRequest
->
body
.
execId
);
pMsgBody
->
msgInfo
.
pMsg
=
pRetrieveMsg
;
return
TSDB_CODE_SUCCESS
;
}
int32_t
processRetrieveMnodeRsp
(
SRequestObj
*
pRequest
,
const
char
*
pMsg
,
int32_t
msgLen
)
{
assert
(
msgLen
>=
sizeof
(
SRetrieveTableRsp
));
...
...
@@ -227,6 +193,10 @@ int32_t processCreateTableRsp(SRequestObj *pRequest, const char* pMsg, int32_t m
assert
(
pMsg
!=
NULL
);
}
int32_t
processDropDbRsp
(
SRequestObj
*
pRequest
,
const
char
*
pMsg
,
int32_t
msgLen
)
{
// todo: Remove cache in catalog cache.
}
void
initMsgHandleFp
()
{
#if 0
tscBuildMsg[TSDB_SQL_SELECT] = tscBuildQueryMsg;
...
...
@@ -303,27 +273,11 @@ void initMsgHandleFp() {
tscProcessMsgRsp[TSDB_SQL_SHOW_CREATE_DATABASE] = tscProcessShowCreateRsp;
#endif
buildRequestMsgFp
[
TSDB_SQL_CONNECT
]
=
buildConnectMsg
;
handleRequestRspFp
[
TSDB_SQL_CONNECT
]
=
processConnectRsp
;
buildRequestMsgFp
[
TSDB_SQL_CREATE_USER
]
=
doBuildMsgSupp
;
buildRequestMsgFp
[
TSDB_SQL_DROP_USER
]
=
doBuildMsgSupp
;
buildRequestMsgFp
[
TSDB_SQL_CREATE_ACCT
]
=
doBuildMsgSupp
;
buildRequestMsgFp
[
TSDB_SQL_DROP_ACCT
]
=
doBuildMsgSupp
;
buildRequestMsgFp
[
TSDB_SQL_SHOW
]
=
doBuildMsgSupp
;
handleRequestRspFp
[
TSDB_SQL_SHOW
]
=
processShowRsp
;
buildRequestMsgFp
[
TSDB_SQL_RETRIEVE_MNODE
]
=
buildRetrieveMnodeMsg
;
handleRequestRspFp
[
TSDB_SQL_RETRIEVE_MNODE
]
=
processRetrieveMnodeRsp
;
buildRequestMsgFp
[
TSDB_SQL_CREATE_DB
]
=
doBuildMsgSupp
;
handleRequestRspFp
[
TSDB_SQL_CREATE_DB
]
=
processCreateDbRsp
;
buildRequestMsgFp
[
TSDB_SQL_USE_DB
]
=
doBuildMsgSupp
;
handleRequestRspFp
[
TSDB_SQL_USE_DB
]
=
processUseDbRsp
;
buildRequestMsgFp
[
TSDB_SQL_CREATE_TABLE
]
=
doBuildMsgSupp
;
handleRequestRspFp
[
TSDB_SQL_CREATE_TABLE
]
=
processCreateTableRsp
;
handleRequestRspFp
[
TSDB_MSG_TYPE_CONNECT
]
=
processConnectRsp
;
handleRequestRspFp
[
TSDB_MSG_TYPE_SHOW
]
=
processShowRsp
;
handleRequestRspFp
[
TSDB_MSG_TYPE_SHOW_RETRIEVE
]
=
processRetrieveMnodeRsp
;
handleRequestRspFp
[
TSDB_MSG_TYPE_CREATE_DB
]
=
processCreateDbRsp
;
handleRequestRspFp
[
TSDB_MSG_TYPE_USE_DB
]
=
processUseDbRsp
;
handleRequestRspFp
[
TSDB_MSG_TYPE_CREATE_TABLE
]
=
processCreateTableRsp
;
handleRequestRspFp
[
TSDB_MSG_TYPE_DROP_DB
]
=
processDropDbRsp
;
}
\ No newline at end of file
source/client/test/clientTests.cpp
浏览文件 @
784975da
...
...
@@ -22,11 +22,24 @@
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wsign-compare"
#include "../inc/clientInt.h"
#include "taos.h"
#include "tglobal.h"
#include "../inc/clientInt.h"
namespace
{
void
showDB
(
TAOS
*
pConn
)
{
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"show databases"
);
TAOS_ROW
pRow
=
NULL
;
TAOS_FIELD
*
pFields
=
taos_fetch_fields
(
pRes
);
int32_t
numOfFields
=
taos_num_fields
(
pRes
);
char
str
[
512
]
=
{
0
};
while
((
pRow
=
taos_fetch_row
(
pRes
))
!=
NULL
)
{
int32_t
code
=
taos_print_row
(
str
,
pRow
,
pFields
,
numOfFields
);
printf
(
"%s
\n
"
,
str
);
}
}
}
// namespace
int
main
(
int
argc
,
char
**
argv
)
{
...
...
@@ -34,92 +47,208 @@ int main(int argc, char** argv) {
return
RUN_ALL_TESTS
();
}
TEST
(
testCase
,
driverInit_Test
)
{
taos_init
();
}
TEST
(
testCase
,
driverInit_Test
)
{
taos_init
();
}
TEST
(
testCase
,
connect_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"ubuntu"
,
"root"
,
"taosdata"
,
NULL
,
0
);
// TEST(testCase, connect_Test) {
// TAOS* pConn = taos_connect("ubuntu", "root", "taosdata", NULL, 0);
//// assert(pConn != NULL);
// taos_close(pConn);
//}
//
// TEST(testCase, create_user_Test) {
// TAOS* pConn = taos_connect("ubuntu", "root", "taosdata", NULL, 0);
// assert(pConn != NULL);
taos_close
(
pConn
);
}
TEST
(
testCase
,
create_user_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"ubuntu"
,
"root"
,
"taosdata"
,
NULL
,
0
);
//
// TAOS_RES* pRes = taos_query(pConn, "create user abc pass 'abc'");
// if (taos_errno(pRes) != TSDB_CODE_SUCCESS) {
// printf("failed to create user, reason:%s\n", taos_errstr(pRes));
// }
//
// taos_free_result(pRes);
// taos_close(pConn);
//}
//
// TEST(testCase, create_account_Test) {
// TAOS* pConn = taos_connect("ubuntu", "root", "taosdata", NULL, 0);
// assert(pConn != NULL);
//
// TAOS_RES* pRes = taos_query(pConn, "create account aabc pass 'abc'");
// if (taos_errno(pRes) != TSDB_CODE_SUCCESS) {
// printf("failed to create user, reason:%s\n", taos_errstr(pRes));
// }
//
// taos_free_result(pRes);
// taos_close(pConn);
//}
//
// TEST(testCase, drop_account_Test) {
// TAOS* pConn = taos_connect("ubuntu", "root", "taosdata", NULL, 0);
// assert(pConn != NULL);
//
// TAOS_RES* pRes = taos_query(pConn, "drop account aabc");
// if (taos_errno(pRes) != TSDB_CODE_SUCCESS) {
// printf("failed to create user, reason:%s\n", taos_errstr(pRes));
// }
//
// taos_free_result(pRes);
// taos_close(pConn);
//}
//
// TEST(testCase, show_user_Test) {
// TAOS* pConn = taos_connect("ubuntu", "root", "taosdata", NULL, 0);
//// assert(pConn != NULL);
//
// TAOS_RES* pRes = taos_query(pConn, "show users");
// TAOS_ROW pRow = NULL;
//
// TAOS_FIELD* pFields = taos_fetch_fields(pRes);
// int32_t numOfFields = taos_num_fields(pRes);
//
// char str[512] = {0};
// while((pRow = taos_fetch_row(pRes)) != NULL) {
// int32_t code = taos_print_row(str, pRow, pFields, numOfFields);
// printf("%s\n", str);
// }
//
// taos_close(pConn);
//}
//
// TEST(testCase, drop_user_Test) {
// TAOS* pConn = taos_connect("ubuntu", "root", "taosdata", NULL, 0);
// assert(pConn != NULL);
//
// TAOS_RES* pRes = taos_query(pConn, "drop user abc");
// if (taos_errno(pRes) != TSDB_CODE_SUCCESS) {
// printf("failed to create user, reason:%s\n", taos_errstr(pRes));
// }
//
// taos_free_result(pRes);
// taos_close(pConn);
//}
//
// TEST(testCase, show_db_Test) {
// TAOS* pConn = taos_connect("ubuntu", "root", "taosdata", NULL, 0);
//// assert(pConn != NULL);
//
// TAOS_RES* pRes = taos_query(pConn, "show databases");
// TAOS_ROW pRow = NULL;
//
// TAOS_FIELD* pFields = taos_fetch_fields(pRes);
// int32_t numOfFields = taos_num_fields(pRes);
//
// char str[512] = {0};
// while((pRow = taos_fetch_row(pRes)) != NULL) {
// int32_t code = taos_print_row(str, pRow, pFields, numOfFields);
// printf("%s\n", str);
// }
//
// taos_close(pConn);
//}
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"create user abc pass 'abc'"
);
if
(
taos_errno
(
pRes
)
!=
TSDB_CODE_SUCCESS
)
{
printf
(
"failed to create user, reason:%s
\n
"
,
taos_errstr
(
pRes
));
}
taos_free_result
(
pRes
);
taos_close
(
pConn
);
}
TEST
(
testCase
,
create_account_Test
)
{
TEST
(
testCase
,
create_db_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"ubuntu"
,
"root"
,
"taosdata"
,
NULL
,
0
);
assert
(
pConn
!=
NULL
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"create
account aabc pass 'abc'
"
);
if
(
taos_errno
(
pRes
)
!=
TSDB_CODE_SUCCESS
)
{
printf
(
"
failed to create user
, reason:%s
\n
"
,
taos_errstr
(
pRes
));
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"create
database abc1
"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"
error in create db
, reason:%s
\n
"
,
taos_errstr
(
pRes
));
}
taos_free_result
(
pRes
);
taos_close
(
pConn
);
}
TEST
(
testCase
,
drop_account_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"ubuntu"
,
"root"
,
"taosdata"
,
NULL
,
0
);
assert
(
pConn
!=
NULL
);
TAOS_FIELD
*
pFields
=
taos_fetch_fields
(
pRes
);
ASSERT_TRUE
(
pFields
==
NULL
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"drop account aabc"
);
if
(
taos_errno
(
pRes
)
!=
TSDB_CODE_SUCCESS
)
{
printf
(
"failed to create user, reason:%s
\n
"
,
taos_errstr
(
pRes
));
}
int32_t
numOfFields
=
taos_num_fields
(
pRes
);
ASSERT_EQ
(
numOfFields
,
0
);
taos_free_result
(
pRes
);
taos_close
(
pConn
);
}
TEST
(
testCase
,
show_user_T
est
)
{
TEST
(
testCase
,
use_db_t
est
)
{
TAOS
*
pConn
=
taos_connect
(
"ubuntu"
,
"root"
,
"taosdata"
,
NULL
,
0
);
//
assert(pConn != NULL);
assert
(
pConn
!=
NULL
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"show users"
);
TAOS_ROW
pRow
=
NULL
;
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"use abc1"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"error in use db, reason:%s
\n
"
,
taos_errstr
(
pRes
));
}
TAOS_FIELD
*
pFields
=
taos_fetch_fields
(
pRes
);
int32_t
numOfFields
=
taos_num_fields
(
pRes
);
ASSERT_TRUE
(
pFields
==
NULL
);
char
str
[
512
]
=
{
0
};
while
((
pRow
=
taos_fetch_row
(
pRes
))
!=
NULL
)
{
int32_t
code
=
taos_print_row
(
str
,
pRow
,
pFields
,
numOfFields
);
printf
(
"%s
\n
"
,
str
);
}
int32_t
numOfFields
=
taos_num_fields
(
pRes
);
ASSERT_EQ
(
numOfFields
,
0
);
taos_close
(
pConn
);
}
TEST
(
testCase
,
drop_
user_T
est
)
{
TEST
(
testCase
,
drop_
db_t
est
)
{
TAOS
*
pConn
=
taos_connect
(
"ubuntu"
,
"root"
,
"taosdata"
,
NULL
,
0
);
assert
(
pConn
!=
NULL
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"drop user abc"
);
if
(
taos_errno
(
pRes
)
!=
TSDB_CODE_SUCCESS
)
{
printf
(
"failed to create user, reason:%s
\n
"
,
taos_errstr
(
pRes
));
showDB
(
pConn
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"drop database abc1"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to drop db, reason:%s
\n
"
,
taos_errstr
(
pRes
));
}
taos_free_result
(
pRes
);
showDB
(
pConn
);
taos_close
(
pConn
);
}
TEST
(
testCase
,
show_db
_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"ubuntu"
,
"root"
,
"taosdata"
,
NULL
,
0
);
// TEST(testCase, create_stable
_Test) {
//
TAOS* pConn = taos_connect("ubuntu", "root", "taosdata", NULL, 0);
// assert(pConn != NULL);
//
// TAOS_RES* pRes = taos_query(pConn, "create database abc1");
// if (taos_errno(pRes) != 0) {
// printf("error in create db, reason:%s\n", taos_errstr(pRes));
// }
// taos_free_result(pRes);
//
// pRes = taos_query(pConn, "use abc1");
// if (taos_errno(pRes) != 0) {
// printf("error in use db, reason:%s\n", taos_errstr(pRes));
// }
// taos_free_result(pRes);
//
// pRes = taos_query(pConn, "create stable st1(ts timestamp, k int) tags(a int)");
// if (taos_errno(pRes) != 0) {
// printf("error in create stable, reason:%s\n", taos_errstr(pRes));
// }
//
// TAOS_FIELD* pFields = taos_fetch_fields(pRes);
// ASSERT_TRUE(pFields == NULL);
//
// int32_t numOfFields = taos_num_fields(pRes);
// ASSERT_EQ(numOfFields, 0);
//
// taos_free_result(pRes);
// taos_close(pConn);
//}
TEST
(
testCase
,
create_table_Test
)
{
// TAOS* pConn = taos_connect("ubuntu", "root", "taosdata", NULL, 0);
// assert(pConn != NULL);
//
// TAOS_RES* pRes = taos_query(pConn, "use abc1");
// taos_free_result(pRes);
//
// pRes = taos_query(pConn, "create table tm0(ts timestamp, k int)");
// taos_free_result(pRes);
//
// taos_close(pConn);
}
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"show databases"
);
TEST
(
testCase
,
create_ctable_Test
)
{}
TEST
(
testCase
,
show_stable_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"ubuntu"
,
"root"
,
"taosdata"
,
NULL
,
0
);
assert
(
pConn
!=
NULL
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"show stables"
);
TAOS_ROW
pRow
=
NULL
;
TAOS_FIELD
*
pFields
=
taos_fetch_fields
(
pRes
);
...
...
@@ -131,53 +260,45 @@ TEST(testCase, show_db_Test) {
printf
(
"%s
\n
"
,
str
);
}
taos_close
(
pConn
);
}
TEST
(
testCase
,
create_db_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"ubuntu"
,
"root"
,
"taosdata"
,
NULL
,
0
);
assert
(
pConn
!=
NULL
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"create database abc1"
);
TAOS_FIELD
*
pFields
=
taos_fetch_fields
(
pRes
);
ASSERT_TRUE
(
pFields
==
NULL
);
int32_t
numOfFields
=
taos_num_fields
(
pRes
);
ASSERT_EQ
(
numOfFields
,
0
);
taos_close
(
pConn
);
}
TEST
(
testCase
,
use_db_test
)
{
TAOS
*
pConn
=
taos_connect
(
"ubuntu"
,
"root"
,
"taosdata"
,
NULL
,
0
);
assert
(
pConn
!=
NULL
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"use abc1"
);
TAOS_FIELD
*
pFields
=
taos_fetch_fields
(
pRes
);
ASSERT_TRUE
(
pFields
==
NULL
);
int32_t
numOfFields
=
taos_num_fields
(
pRes
);
ASSERT_EQ
(
numOfFields
,
0
);
taos_free_result
(
pRes
);
taos_close
(
pConn
);
}
TEST
(
testCase
,
create
_stable_Test
)
{
TEST
(
testCase
,
drop
_stable_Test
)
{
TAOS
*
pConn
=
taos_connect
(
"ubuntu"
,
"root"
,
"taosdata"
,
NULL
,
0
);
assert
(
pConn
!=
NULL
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"use abc1"
);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"create database abc1"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"error in creating db, reason:%s
\n
"
,
taos_errstr
(
pRes
));
}
taos_free_result
(
pRes
);
pRes
=
taos_query
(
pConn
,
"create stable st1(ts timestamp, k int) tags(a int)"
);
TAOS_FIELD
*
pFields
=
taos_fetch_fields
(
pRes
);
ASSERT_TRUE
(
pFields
==
NULL
);
pRes
=
taos_query
(
pConn
,
"use abc1"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"error in using db, reason:%s
\n
"
,
taos_errstr
(
pRes
));
}
taos_free_result
(
pRes
);
int32_t
numOfFields
=
taos_num_fields
(
pRes
);
ASSERT_EQ
(
numOfFields
,
0
);
pRes
=
taos_query
(
pConn
,
"drop stable st1"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to drop stable, reason:%s
\n
"
,
taos_errstr
(
pRes
));
}
taos_free_result
(
pRes
);
taos_close
(
pConn
);
}
//TEST(testCase, show_table_Test) {
// TAOS* pConn = taos_connect("ubuntu", "root", "taosdata", NULL, 0);
// assert(pConn != NULL);
//
// TAOS_RES* pRes = taos_query(pConn, "use abc1");
// taos_free_result(pRes);
//
// pRes = taos_query(pConn, "show tables");
// taos_free_result(pRes);
//
// taos_close(pConn);
//}
source/libs/catalog/inc/catalogInt.h
浏览文件 @
784975da
...
...
@@ -59,8 +59,6 @@ typedef struct SCatalogMgmt {
typedef
uint32_t
(
*
tableNameHashFp
)(
const
char
*
,
uint32_t
);
extern
int32_t
ctgDebugFlag
;
#define ctgFatal(...) do { if (ctgDebugFlag & DEBUG_FATAL) { taosPrintLog("CTG FATAL ", ctgDebugFlag, __VA_ARGS__); }} while(0)
#define ctgError(...) do { if (ctgDebugFlag & DEBUG_ERROR) { taosPrintLog("CTG ERROR ", ctgDebugFlag, __VA_ARGS__); }} while(0)
#define ctgWarn(...) do { if (ctgDebugFlag & DEBUG_WARN) { taosPrintLog("CTG WARN ", ctgDebugFlag, __VA_ARGS__); }} while(0)
...
...
@@ -75,7 +73,6 @@ extern int32_t ctgDebugFlag;
#define CTG_ERR_LRET(c,...) do { int32_t _code = c; if (_code != TSDB_CODE_SUCCESS) { ctgError(__VA_ARGS__); terrno = _code; return _code; } } while (0)
#define CTG_ERR_JRET(c) do { code = c; if (code != TSDB_CODE_SUCCESS) { terrno = code; goto _return; } } while (0)
#ifdef __cplusplus
}
#endif
...
...
source/libs/catalog/src/catalog.c
浏览文件 @
784975da
...
...
@@ -371,7 +371,7 @@ int32_t catalogInit(SCatalogCfg *cfg) {
return
TSDB_CODE_SUCCESS
;
}
int32_t
catalogGetHandle
(
const
char
*
clusterId
,
struct
SCatalog
**
catalogHandle
)
{
int32_t
catalogGetHandle
(
const
char
*
clusterId
,
struct
SCatalog
**
catalogHandle
)
{
if
(
NULL
==
clusterId
||
NULL
==
catalogHandle
)
{
CTG_ERR_RET
(
TSDB_CODE_CTG_INVALID_INPUT
);
}
...
...
@@ -565,12 +565,12 @@ _return:
}
int32_t
catalogGetTableHashVgroup
(
struct
SCatalog
*
pCatalog
,
void
*
p
Rpc
,
const
SEpSet
*
pMgmtEps
,
const
char
*
pDBName
,
const
char
*
pTableName
,
SVgroupInfo
*
pVgroup
)
{
int32_t
catalogGetTableHashVgroup
(
struct
SCatalog
*
pCatalog
,
void
*
p
Transporter
,
const
SEpSet
*
pMgmtEps
,
const
char
*
pDBName
,
const
char
*
pTableName
,
SVgroupInfo
*
pVgroup
)
{
SDBVgroupInfo
dbInfo
=
{
0
};
int32_t
code
=
0
;
int32_t
vgId
=
0
;
CTG_ERR_RET
(
catalogGetDBVgroup
(
pCatalog
,
p
Rpc
,
pMgmtEps
,
pDBName
,
false
,
&
dbInfo
));
CTG_ERR_RET
(
catalogGetDBVgroup
(
pCatalog
,
p
Transporter
,
pMgmtEps
,
pDBName
,
false
,
&
dbInfo
));
if
(
dbInfo
.
vgVersion
<
0
||
NULL
==
dbInfo
.
vgInfo
)
{
ctgError
(
"db[%s] vgroup cache invalid, vgroup version:%d, vgInfo:%p"
,
pDBName
,
dbInfo
.
vgVersion
,
dbInfo
.
vgInfo
);
...
...
source/libs/catalog/test/catalogTests.cpp
浏览文件 @
784975da
...
...
@@ -99,7 +99,7 @@ TEST(testCase, normalCase) {
void
*
mockPointer
=
(
void
*
)
0x1
;
SVgroupInfo
vgInfo
=
{
0
};
msgInit
();
initQueryModuleMsgHandle
();
sendCreateDbMsg
(
pConn
->
pTransporter
,
&
pConn
->
pAppInfo
->
mgmtEp
.
epSet
);
...
...
source/libs/parser/inc/astToMsg.h
浏览文件 @
784975da
...
...
@@ -8,7 +8,8 @@ SCreateUserMsg* buildUserManipulationMsg(SSqlInfo* pInfo, int32_t* outputLen, in
SCreateAcctMsg
*
buildAcctManipulationMsg
(
SSqlInfo
*
pInfo
,
int32_t
*
outputLen
,
int64_t
id
,
char
*
msgBuf
,
int32_t
msgLen
);
SDropUserMsg
*
buildDropUserMsg
(
SSqlInfo
*
pInfo
,
int32_t
*
outputLen
,
int64_t
id
,
char
*
msgBuf
,
int32_t
msgLen
);
SShowMsg
*
buildShowMsg
(
SShowInfo
*
pShowInfo
,
int64_t
id
,
char
*
msgBuf
,
int32_t
msgLen
);
SCreateDbMsg
*
buildCreateDbMsg
(
SCreateDbInfo
*
pCreateDbInfo
,
char
*
msgBuf
,
int32_t
msgLen
);
SCreateDbMsg
*
buildCreateDbMsg
(
SCreateDbInfo
*
pCreateDbInfo
,
SParseBasicCtx
*
pCtx
,
SMsgBuf
*
pMsgBuf
);
SCreateStbMsg
*
buildCreateTableMsg
(
SCreateTableSql
*
pCreateTableSql
,
int32_t
*
len
,
SParseBasicCtx
*
pParseCtx
,
SMsgBuf
*
pMsgBuf
);
SDropTableMsg
*
buildDropTableMsg
(
SSqlInfo
*
pInfo
,
int32_t
*
len
,
SParseBasicCtx
*
pParseCtx
,
SMsgBuf
*
pMsgBuf
);
#endif // TDENGINE_ASTTOMSG_H
source/libs/parser/inc/sql.y
浏览文件 @
784975da
...
...
@@ -31,6 +31,7 @@
#include "ttoken.h"
#include "ttokendef.h"
#include "tvariant.h"
#include "parserInt.h"
}
%syntax_error {
...
...
@@ -173,7 +174,7 @@ cmd ::= ALTER DNODE ids(X) ids(Y) ids(Z). { setDCLSqlElems(pInfo, TSDB_SQL
cmd ::= ALTER LOCAL ids(X). { setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 1, &X); }
cmd ::= ALTER LOCAL ids(X) ids(Y). { setDCLSqlElems(pInfo, TSDB_SQL_CFG_LOCAL, 2, &X, &Y); }
cmd ::= ALTER DATABASE ids(X) alter_db_optr(Y). { SToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &X, &Y, &t);}
cmd ::= ALTER TOPIC ids(X) alter_topic_optr(Y). { SToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &X, &Y, &t);}
//
cmd ::= ALTER TOPIC ids(X) alter_topic_optr(Y). { SToken t = {0}; setCreateDbInfo(pInfo, TSDB_SQL_ALTER_DB, &X, &Y, &t);}
cmd ::= ALTER ACCOUNT ids(X) acct_optr(Z). { setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &X, NULL, &Z);}
cmd ::= ALTER ACCOUNT ids(X) PASS ids(Y) acct_optr(Z). { setCreateAcctSql(pInfo, TSDB_SQL_ALTER_ACCT, &X, &Y, &Z);}
...
...
@@ -203,7 +204,7 @@ cmd ::= CREATE DNODE ids(X). { setDCLSqlElems(pInfo, TSDB_SQL_CREATE_DNODE
cmd ::= CREATE ACCOUNT ids(X) PASS ids(Y) acct_optr(Z).
{ setCreateAcctSql(pInfo, TSDB_SQL_CREATE_ACCT, &X, &Y, &Z);}
cmd ::= CREATE DATABASE ifnotexists(Z) ids(X) db_optr(Y). { setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &X, &Y, &Z);}
cmd ::= CREATE TOPIC ifnotexists(Z) ids(X) topic_optr(Y). { setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &X, &Y, &Z);}
//
cmd ::= CREATE TOPIC ifnotexists(Z) ids(X) topic_optr(Y). { setCreateDbInfo(pInfo, TSDB_SQL_CREATE_DB, &X, &Y, &Z);}
cmd ::= CREATE FUNCTION ids(X) AS ids(Y) OUTPUTTYPE typename(Z) bufsize(B). { setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &X, &Y, &Z, &B, 1);}
cmd ::= CREATE AGGREGATE FUNCTION ids(X) AS ids(Y) OUTPUTTYPE typename(Z) bufsize(B). { setCreateFuncInfo(pInfo, TSDB_SQL_CREATE_FUNCTION, &X, &Y, &Z, &B, 2);}
cmd ::= CREATE USER ids(X) PASS ids(Y). { setCreateUserSql(pInfo, &X, &Y);}
...
...
@@ -278,10 +279,10 @@ comp(Y) ::= COMP INTEGER(X). { Y = X; }
prec(Y) ::= PRECISION STRING(X). { Y = X; }
update(Y) ::= UPDATE INTEGER(X). { Y = X; }
cachelast(Y) ::= CACHELAST INTEGER(X). { Y = X; }
partitions(Y) ::= PARTITIONS INTEGER(X). { Y = X; }
//
partitions(Y) ::= PARTITIONS INTEGER(X). { Y = X; }
%type db_optr {SCreateDbInfo}
db_optr(Y) ::= . {setDefaultCreateDbOption(&Y);
Y.dbType = TSDB_DB_TYPE_DEFAULT;
}
db_optr(Y) ::= . {setDefaultCreateDbOption(&Y);}
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); }
...
...
@@ -299,13 +300,13 @@ db_optr(Y) ::= db_optr(Z) keep(X). { Y = Z; Y.keep = X; }
db_optr(Y) ::= db_optr(Z) update(X). { Y = Z; Y.update = strtol(X.z, NULL, 10); }
db_optr(Y) ::= db_optr(Z) cachelast(X). { Y = Z; Y.cachelast = strtol(X.z, NULL, 10); }
%type topic_optr {SCreateDbInfo}
topic_optr(Y) ::= db_optr(Z). { Y = Z; Y.dbType = TSDB_DB_TYPE_TOPIC; }
topic_optr(Y) ::= topic_optr(Z) partitions(X). { Y = Z; Y.partitions = strtol(X.z, NULL, 10); }
//
%type topic_optr {SCreateDbInfo}
//
//
topic_optr(Y) ::= db_optr(Z). { Y = Z; Y.dbType = TSDB_DB_TYPE_TOPIC; }
//
topic_optr(Y) ::= topic_optr(Z) partitions(X). { Y = Z; Y.partitions = strtol(X.z, NULL, 10); }
%type alter_db_optr {SCreateDbInfo}
alter_db_optr(Y) ::= . { setDefaultCreateDbOption(&Y);
Y.dbType = TSDB_DB_TYPE_DEFAULT;
}
alter_db_optr(Y) ::= . { setDefaultCreateDbOption(&Y);}
alter_db_optr(Y) ::= alter_db_optr(Z) replica(X). { Y = Z; Y.replica = strtol(X.z, NULL, 10); }
alter_db_optr(Y) ::= alter_db_optr(Z) quorum(X). { Y = Z; Y.quorum = strtol(X.z, NULL, 10); }
...
...
@@ -319,10 +320,10 @@ alter_db_optr(Y) ::= alter_db_optr(Z) cachelast(X). { Y = Z; Y.cachelast = str
//alter_db_optr(Y) ::= alter_db_optr(Z) fsync(X). { Y = Z; Y.fsyncPeriod = strtol(X.z, NULL, 10); }
//alter_db_optr(Y) ::= alter_db_optr(Z) wal(X). { Y = Z; Y.walLevel = strtol(X.z, NULL, 10); } not support yet
%type alter_topic_optr {SCreateDbInfo}
//
%type alter_topic_optr {SCreateDbInfo}
alter_topic_optr(Y) ::= alter_db_optr(Z). { Y = Z; Y.dbType = TSDB_DB_TYPE_TOPIC; }
alter_topic_optr(Y) ::= alter_topic_optr(Z) partitions(X). { Y = Z; Y.partitions = strtol(X.z, NULL, 10); }
//
alter_topic_optr(Y) ::= alter_db_optr(Z). { Y = Z; Y.dbType = TSDB_DB_TYPE_TOPIC; }
//
alter_topic_optr(Y) ::= alter_topic_optr(Z) partitions(X). { Y = Z; Y.partitions = strtol(X.z, NULL, 10); }
%type typename {SField}
typename(A) ::= ids(X). {
...
...
source/libs/parser/inc/ttokendef.h
浏览文件 @
784975da
...
...
@@ -130,88 +130,88 @@
#define TK_PRECISION 112
#define TK_UPDATE 113
#define TK_CACHELAST 114
#define TK_
PARTITIONS
115
#define TK_
UNSIGNED
116
#define TK_
TAGS
117
#define TK_
USING
118
#define TK_N
ULL
119
#define TK_
NOW
120
#define TK_
SELECT
121
#define TK_
UNION
122
#define TK_
ALL
123
#define TK_
DISTINCT
124
#define TK_
FROM
125
#define TK_
VARIABLE
126
#define TK_
INTERVAL
127
#define TK_
EVERY
128
#define TK_S
ESSION
129
#define TK_
STATE_WINDOW
130
#define TK_
FILL
131
#define TK_
SLIDING
132
#define TK_
ORDER
133
#define TK_
BY
134
#define TK_
ASC
135
#define TK_
GROUP
136
#define TK_
HAVING
137
#define TK_
LIMIT
138
#define TK_
OFFSE
T 139
#define TK_S
LIMIT
140
#define TK_
SOFFSET
141
#define TK_
WHERE
142
#define TK_
RESET
143
#define TK_
QUERY
144
#define TK_
SYNCDB
145
#define TK_
ADD
146
#define TK_
COLUMN
147
#define TK_
MODIFY
148
#define TK_
TAG
149
#define TK_
CHANGE
150
#define TK_
SET
151
#define TK_
KILL
152
#define TK_
CONNECTION
153
#define TK_
STREAM
154
#define TK_
COLON
155
#define TK_A
BORT
156
#define TK_A
FTER
157
#define TK_
ATTACH
158
#define TK_BE
FORE
159
#define TK_
BEGIN
160
#define TK_C
ASCADE
161
#define TK_C
LUSTER
162
#define TK_CO
NFLICT
163
#define TK_
COPY
164
#define TK_DE
FERRED
165
#define TK_DE
LIMITERS
166
#define TK_
DETACH
167
#define TK_E
ACH
168
#define TK_E
ND
169
#define TK_
EXPLAIN
170
#define TK_F
AIL
171
#define TK_
FOR
172
#define TK_I
GNORE
173
#define TK_I
MMEDIATE
174
#define TK_IN
ITIALLY
175
#define TK_
INSTEAD
176
#define TK_
KEY
177
#define TK_
OF
178
#define TK_R
AISE
179
#define TK_RE
PLACE
180
#define TK_R
ESTRICT
181
#define TK_
ROW
182
#define TK_
STATEMENT
183
#define TK_
TRIGGER
184
#define TK_
VIEW
185
#define TK_
IPTOKEN
186
#define TK_
SEMI
187
#define TK_
NONE
188
#define TK_
PREV
189
#define TK_
LINEAR
190
#define TK_
IMPORT
191
#define TK_
TBNAME
192
#define TK_
JOIN
193
#define TK_IN
SERT
194
#define TK_
INTO
195
#define TK_VALUES 196
#define TK_
UNSIGNED
115
#define TK_
TAGS
116
#define TK_
USING
117
#define TK_
NULL
118
#define TK_N
OW
119
#define TK_
SELECT
120
#define TK_
UNION
121
#define TK_
ALL
122
#define TK_
DISTINCT
123
#define TK_
FROM
124
#define TK_
VARIABLE
125
#define TK_
INTERVAL
126
#define TK_
EVERY
127
#define TK_
SESSION
128
#define TK_S
TATE_WINDOW
129
#define TK_
FILL
130
#define TK_
SLIDING
131
#define TK_
ORDER
132
#define TK_
BY
133
#define TK_
ASC
134
#define TK_
GROUP
135
#define TK_
HAVING
136
#define TK_
LIMIT
137
#define TK_
OFFSET
138
#define TK_
SLIMI
T 139
#define TK_S
OFFSET
140
#define TK_
WHERE
141
#define TK_
RESET
142
#define TK_
QUERY
143
#define TK_
SYNCDB
144
#define TK_
ADD
145
#define TK_
COLUMN
146
#define TK_
MODIFY
147
#define TK_
TAG
148
#define TK_
CHANGE
149
#define TK_
SET
150
#define TK_
KILL
151
#define TK_
CONNECTION
152
#define TK_
STREAM
153
#define TK_
COLON
154
#define TK_
ABORT
155
#define TK_A
FTER
156
#define TK_A
TTACH
157
#define TK_
BEFORE
158
#define TK_BE
GIN
159
#define TK_
CASCADE
160
#define TK_C
LUSTER
161
#define TK_C
ONFLICT
162
#define TK_CO
PY
163
#define TK_
DEFERRED
164
#define TK_DE
LIMITERS
165
#define TK_DE
TACH
166
#define TK_
EACH
167
#define TK_E
ND
168
#define TK_E
XPLAIN
169
#define TK_
FAIL
170
#define TK_F
OR
171
#define TK_
IGNORE
172
#define TK_I
MMEDIATE
173
#define TK_I
NITIALLY
174
#define TK_IN
STEAD
175
#define TK_
KEY
176
#define TK_
OF
177
#define TK_
RAISE
178
#define TK_R
EPLACE
179
#define TK_RE
STRICT
180
#define TK_R
OW
181
#define TK_
STATEMENT
182
#define TK_
TRIGGER
183
#define TK_
VIEW
184
#define TK_
IPTOKEN
185
#define TK_
SEMI
186
#define TK_
NONE
187
#define TK_
PREV
188
#define TK_
LINEAR
189
#define TK_
IMPORT
190
#define TK_
TBNAME
191
#define TK_
JOIN
192
#define TK_
INSERT
193
#define TK_IN
TO
194
#define TK_
VALUES
195
#define TK_SPACE 300
...
...
source/libs/parser/src/astToMsg.c
浏览文件 @
784975da
...
...
@@ -207,17 +207,23 @@ int32_t setDbOptions(SCreateDbMsg* pCreateDbMsg, const SCreateDbInfo* pCreateDbS
return
TSDB_CODE_SUCCESS
;
}
SCreateDbMsg
*
buildCreateDbMsg
(
SCreateDbInfo
*
pCreateDbInfo
,
char
*
msgBuf
,
int32_t
msgLen
)
{
SCreateDbMsg
*
buildCreateDbMsg
(
SCreateDbInfo
*
pCreateDbInfo
,
SParseBasicCtx
*
pCtx
,
SMsgBuf
*
pMsgBuf
)
{
SCreateDbMsg
*
pCreateMsg
=
calloc
(
1
,
sizeof
(
SCreateDbMsg
));
SMsgBuf
msg
=
{.
buf
=
msgBuf
,
.
len
=
msgLen
};
if
(
setDbOptions
(
pCreateMsg
,
pCreateDbInfo
,
&
msg
)
!=
TSDB_CODE_SUCCESS
)
{
if
(
setDbOptions
(
pCreateMsg
,
pCreateDbInfo
,
pMsgBuf
)
!=
TSDB_CODE_SUCCESS
)
{
tfree
(
pCreateMsg
);
terrno
=
TSDB_CODE_TSC_INVALID_OPERATION
;
return
NULL
;
}
SName
name
=
{
0
};
int32_t
ret
=
tNameSetDbName
(
&
name
,
pCtx
->
acctId
,
pCreateDbInfo
->
dbname
.
z
,
pCreateDbInfo
->
dbname
.
n
);
if
(
ret
!=
TSDB_CODE_SUCCESS
)
{
terrno
=
ret
;
return
NULL
;
}
tNameGetFullDbName
(
&
name
,
pCreateMsg
->
db
);
return
pCreateMsg
;
}
...
...
@@ -263,14 +269,17 @@ int32_t createSName(SName* pName, SToken* pTableName, SParseBasicCtx* pParseCtx,
SCreateStbMsg
*
buildCreateTableMsg
(
SCreateTableSql
*
pCreateTableSql
,
int32_t
*
len
,
SParseBasicCtx
*
pParseCtx
,
SMsgBuf
*
pMsgBuf
)
{
SSchema
*
pSchema
;
int32_t
numOfTags
=
0
;
int32_t
numOfCols
=
(
int32_t
)
taosArrayGetSize
(
pCreateTableSql
->
colInfo
.
pColumns
);
int32_t
numOfTags
=
(
int32_t
)
taosArrayGetSize
(
pCreateTableSql
->
colInfo
.
pTagColumns
);
if
(
pCreateTableSql
->
colInfo
.
pTagColumns
!=
NULL
)
{
numOfTags
=
(
int32_t
)
taosArrayGetSize
(
pCreateTableSql
->
colInfo
.
pTagColumns
);
}
SCreateStbMsg
*
pCreateTableMsg
=
(
SCreateStbMsg
*
)
calloc
(
1
,
sizeof
(
SCreateStbMsg
)
+
(
numOfCols
+
numOfTags
)
*
sizeof
(
SSchema
));
char
*
pMsg
=
NULL
;
int
8_t
t
ype
=
pCreateTableSql
->
type
;
if
(
t
ype
==
TSQL_CREATE_
TABLE
)
{
// create by using super table, tags value
int
32_t
tableT
ype
=
pCreateTableSql
->
type
;
if
(
t
ableType
!=
TSQL_CREATE_TABLE
&&
tableType
!=
TSQL_CREATE_S
TABLE
)
{
// create by using super table, tags value
#if 0
SArray* list = pInfo->pCreateTableInfo->childTableInfo;
...
...
@@ -309,15 +318,13 @@ SCreateStbMsg* buildCreateTableMsg(SCreateTableSql* pCreateTableSql, int32_t* le
return
NULL
;
}
pCreateTableMsg
->
igExists
=
pCreateTableSql
->
existCheck
?
1
:
0
;
pCreateTableMsg
->
igExists
=
pCreateTableSql
->
existCheck
?
1
:
0
;
pCreateTableMsg
->
numOfColumns
=
htonl
(
numOfCols
);
pCreateTableMsg
->
numOfTags
=
htonl
(
numOfTags
);
pCreateTableMsg
->
numOfTags
=
htonl
(
numOfTags
);
pSchema
=
(
SSchema
*
)
pCreateTableMsg
->
pSchema
;
for
(
int
i
=
0
;
i
<
numOfCols
;
++
i
)
{
TAOS_FIELD
*
pField
=
taosArrayGet
(
pCreateTableSql
->
colInfo
.
pColumns
,
i
);
SField
*
pField
=
taosArrayGet
(
pCreateTableSql
->
colInfo
.
pColumns
,
i
);
pSchema
->
type
=
pField
->
type
;
pSchema
->
bytes
=
htonl
(
pField
->
bytes
);
strcpy
(
pSchema
->
name
,
pField
->
name
);
...
...
@@ -326,8 +333,7 @@ SCreateStbMsg* buildCreateTableMsg(SCreateTableSql* pCreateTableSql, int32_t* le
}
for
(
int32_t
i
=
0
;
i
<
numOfTags
;
++
i
)
{
TAOS_FIELD
*
pField
=
taosArrayGet
(
pCreateTableSql
->
colInfo
.
pTagColumns
,
i
);
SField
*
pField
=
taosArrayGet
(
pCreateTableSql
->
colInfo
.
pTagColumns
,
i
);
pSchema
->
type
=
pField
->
type
;
pSchema
->
bytes
=
htonl
(
pField
->
bytes
);
strcpy
(
pSchema
->
name
,
pField
->
name
);
...
...
@@ -343,3 +349,24 @@ SCreateStbMsg* buildCreateTableMsg(SCreateTableSql* pCreateTableSql, int32_t* le
return
pCreateTableMsg
;
}
SDropTableMsg
*
buildDropTableMsg
(
SSqlInfo
*
pInfo
,
int32_t
*
len
,
SParseBasicCtx
*
pParseCtx
,
SMsgBuf
*
pMsgBuf
)
{
SToken
*
tableName
=
taosArrayGet
(
pInfo
->
pMiscInfo
->
a
,
0
);
SName
name
=
{
0
};
int32_t
code
=
createSName
(
&
name
,
tableName
,
pParseCtx
,
pMsgBuf
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
terrno
=
buildInvalidOperationMsg
(
pMsgBuf
,
"invalid table name"
);
return
NULL
;
}
SDropTableMsg
*
pDropTableMsg
=
(
SDropTableMsg
*
)
calloc
(
1
,
sizeof
(
SDropTableMsg
));
code
=
tNameExtractFullName
(
&
name
,
pDropTableMsg
->
name
);
assert
(
code
==
TSDB_CODE_SUCCESS
&&
name
.
type
==
TSDB_TABLE_NAME_T
);
pDropTableMsg
->
ignoreNotExists
=
pInfo
->
pMiscInfo
->
existsCheck
?
1
:
0
;
*
len
=
sizeof
(
SDropTableMsg
);
return
pDropTableMsg
;
}
source/libs/parser/src/astValidate.c
浏览文件 @
784975da
...
...
@@ -4028,7 +4028,7 @@ int32_t qParserValidateSqlNode(struct SCatalog* pCatalog, SSqlInfo* pInfo, SQuer
}
// todo remove it
static
int32_t
setShowInfo
(
struct
SSqlInfo
*
pInfo
,
void
**
output
,
int32_t
*
msg
Len
,
SMsgBuf
*
pMsgBuf
)
{
static
int32_t
setShowInfo
(
SShowInfo
*
pShowInfo
,
SParseBasicCtx
*
pCtx
,
void
**
output
,
int32_t
*
output
Len
,
SMsgBuf
*
pMsgBuf
)
{
const
char
*
msg1
=
"invalid name"
;
const
char
*
msg2
=
"wildcard string should be less than %d characters"
;
const
char
*
msg3
=
"database name too long"
;
...
...
@@ -4040,9 +4040,8 @@ static int32_t setShowInfo(struct SSqlInfo* pInfo, void** output, int32_t* msgLe
* database prefix in pInfo->pMiscInfo->a[0]
* wildcard in like clause in pInfo->pMiscInfo->a[1]
*/
SShowInfo
*
pShowInfo
=
&
pInfo
->
pMiscInfo
->
showOpt
;
int16_t
showType
=
pShowInfo
->
showType
;
if
(
showType
==
TSDB_MGMT_TABLE_
TABLE
||
showType
==
TSDB_MGMT_TABLE_VGROUP
)
{
if
(
showType
==
TSDB_MGMT_TABLE_
STB
||
showType
==
TSDB_MGMT_TABLE_VGROUP
)
{
SToken
*
pDbPrefixToken
=
&
pShowInfo
->
prefix
;
if
(
pDbPrefixToken
->
type
!=
0
)
{
if
(
pDbPrefixToken
->
n
>=
TSDB_DB_NAME_LEN
)
{
// db name is too long
...
...
@@ -4091,8 +4090,8 @@ static int32_t setShowInfo(struct SSqlInfo* pInfo, void** output, int32_t* msgLe
}
}
*
output
=
buildShowMsg
(
pShowInfo
,
0
,
pMsgBuf
->
buf
,
pMsgBuf
->
len
);
*
msg
Len
=
sizeof
(
SShowMsg
)
/* + htons(pShowMsg->payloadLen)*/
;
*
output
=
buildShowMsg
(
pShowInfo
,
pCtx
->
requestId
,
pMsgBuf
->
buf
,
pMsgBuf
->
len
);
*
output
Len
=
sizeof
(
SShowMsg
)
/* + htons(pShowMsg->payloadLen)*/
;
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -4246,7 +4245,7 @@ static int32_t validateTableColumnInfo(SArray* pFieldList, SMsgBuf* pMsgBuf) {
const
char
*
msg8
=
"illegal number of columns"
;
// first column must be timestamp
TAOS_FIELD
*
pField
=
taosArrayGet
(
pFieldList
,
0
);
SField
*
pField
=
taosArrayGet
(
pFieldList
,
0
);
if
(
pField
->
type
!=
TSDB_DATA_TYPE_TIMESTAMP
)
{
return
buildInvalidOperationMsg
(
pMsgBuf
,
msg1
);
}
...
...
@@ -4274,7 +4273,7 @@ static int32_t validateTagParams(SArray* pTagsList, SArray* pFieldList, SMsgBuf*
// field name must be unique
for
(
int32_t
i
=
0
;
i
<
numOfTags
;
++
i
)
{
TAOS_FIELD
*
p
=
taosArrayGet
(
pTagsList
,
i
);
SField
*
p
=
taosArrayGet
(
pTagsList
,
i
);
if
(
has
(
pFieldList
,
0
,
p
->
name
)
==
true
)
{
return
buildInvalidOperationMsg
(
pMsgBuf
,
msg3
);
}
...
...
@@ -4295,7 +4294,6 @@ int32_t doCheckForCreateTable(SSqlInfo* pInfo, SMsgBuf* pMsgBuf) {
// if sql specifies db, use it, otherwise use default db
SToken
*
pzTableName
=
&
(
pCreateTable
->
name
);
bool
dbIncluded
=
false
;
if
(
parserValidateNameToken
(
pzTableName
)
!=
TSDB_CODE_SUCCESS
)
{
return
buildInvalidOperationMsg
(
pMsgBuf
,
msg1
);
}
...
...
@@ -4314,8 +4312,6 @@ int32_t qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseBasicCtx* pCtx, void**
SMsgBuf
m
=
{.
buf
=
msgBuf
,
.
len
=
msgBufLen
};
SMsgBuf
*
pMsgBuf
=
&
m
;
*
type
=
pInfo
->
type
;
switch
(
pInfo
->
type
)
{
case
TSDB_SQL_CREATE_USER
:
case
TSDB_SQL_ALTER_USER
:
{
...
...
@@ -4362,6 +4358,7 @@ int32_t qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseBasicCtx* pCtx, void**
}
*
output
=
buildUserManipulationMsg
(
pInfo
,
outputLen
,
pCtx
->
requestId
,
msgBuf
,
msgBufLen
);
*
type
=
(
pInfo
->
type
==
TSDB_SQL_CREATE_USER
)
?
TSDB_MSG_TYPE_CREATE_USER
:
TSDB_MSG_TYPE_ALTER_USER
;
break
;
}
...
...
@@ -4398,17 +4395,20 @@ int32_t qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseBasicCtx* pCtx, void**
}
*
output
=
buildAcctManipulationMsg
(
pInfo
,
outputLen
,
pCtx
->
requestId
,
msgBuf
,
msgBufLen
);
*
type
=
(
pInfo
->
type
==
TSDB_SQL_CREATE_ACCT
)
?
TSDB_MSG_TYPE_CREATE_ACCT
:
TSDB_MSG_TYPE_ALTER_ACCT
;
break
;
}
case
TSDB_SQL_DROP_ACCT
:
case
TSDB_SQL_DROP_USER
:
{
*
output
=
buildDropUserMsg
(
pInfo
,
outputLen
,
pCtx
->
requestId
,
msgBuf
,
msgBufLen
);
*
type
=
(
pInfo
->
type
==
TSDB_SQL_DROP_ACCT
)
?
TSDB_MSG_TYPE_DROP_ACCT
:
TSDB_MSG_TYPE_DROP_USER
;
break
;
}
case
TSDB_SQL_SHOW
:
{
code
=
setShowInfo
(
pInfo
,
output
,
outputLen
,
pMsgBuf
);
code
=
setShowInfo
(
&
pInfo
->
pMiscInfo
->
showOpt
,
pCtx
,
output
,
outputLen
,
pMsgBuf
);
*
type
=
TSDB_MSG_TYPE_SHOW
;
break
;
}
...
...
@@ -4429,8 +4429,9 @@ int32_t qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseBasicCtx* pCtx, void**
SUseDbMsg
*
pUseDbMsg
=
(
SUseDbMsg
*
)
calloc
(
1
,
sizeof
(
SUseDbMsg
));
tNameExtractFullName
(
&
n
,
pUseDbMsg
->
db
);
*
output
=
pUseDbMsg
;
*
output
=
pUseDbMsg
;
*
outputLen
=
sizeof
(
SUseDbMsg
);
*
type
=
TSDB_MSG_TYPE_USE_DB
;
break
;
}
...
...
@@ -4451,18 +4452,41 @@ int32_t qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseBasicCtx* pCtx, void**
return
buildInvalidOperationMsg
(
pMsgBuf
,
msg1
);
}
SCreateDbMsg
*
pCreateMsg
=
buildCreateDbMsg
(
pCreateDB
,
p
MsgBuf
->
buf
,
pMsgBuf
->
len
);
SCreateDbMsg
*
pCreateMsg
=
buildCreateDbMsg
(
pCreateDB
,
p
Ctx
,
pMsgBuf
);
if
(
doCheckDbOptions
(
pCreateMsg
,
pMsgBuf
)
!=
TSDB_CODE_SUCCESS
)
{
return
TSDB_CODE_TSC_INVALID_OPERATION
;
}
strncpy
(
pCreateMsg
->
db
,
token
.
z
,
token
.
n
);
*
output
=
pCreateMsg
;
*
output
=
pCreateMsg
;
*
outputLen
=
sizeof
(
SCreateDbMsg
);
*
type
=
(
pInfo
->
type
==
TSDB_SQL_CREATE_DB
)
?
TSDB_MSG_TYPE_CREATE_DB
:
TSDB_MSG_TYPE_ALTER_DB
;
break
;
}
case
TSDB_SQL_DROP_DB
:
{
const
char
*
msg1
=
"invalid database name"
;
assert
(
taosArrayGetSize
(
pInfo
->
pMiscInfo
->
a
)
==
1
);
SToken
*
dbName
=
taosArrayGet
(
pInfo
->
pMiscInfo
->
a
,
0
);
SName
name
=
{
0
};
code
=
tNameSetDbName
(
&
name
,
pCtx
->
acctId
,
dbName
->
z
,
dbName
->
n
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
buildInvalidOperationMsg
(
pMsgBuf
,
msg1
);
}
SDropDbMsg
*
pDropDbMsg
=
(
SDropDbMsg
*
)
calloc
(
1
,
sizeof
(
SDropDbMsg
));
code
=
tNameExtractFullName
(
&
name
,
pDropDbMsg
->
db
);
pDropDbMsg
->
ignoreNotExists
=
pInfo
->
pMiscInfo
->
existsCheck
?
1
:
0
;
assert
(
code
==
TSDB_CODE_SUCCESS
&&
name
.
type
==
TSDB_DB_NAME_T
);
*
type
=
TSDB_MSG_TYPE_DROP_DB
;
*
outputLen
=
sizeof
(
SDropDbMsg
);
*
output
=
pDropDbMsg
;
return
TSDB_CODE_SUCCESS
;
}
case
TSDB_SQL_CREATE_TABLE
:
{
SCreateTableSql
*
pCreateTable
=
pInfo
->
pCreateTableInfo
;
...
...
@@ -4470,7 +4494,9 @@ int32_t qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseBasicCtx* pCtx, void**
if
((
code
=
doCheckForCreateTable
(
pInfo
,
pMsgBuf
))
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
}
*
output
=
buildCreateTableMsg
(
pCreateTable
,
outputLen
,
pCtx
,
pMsgBuf
);
*
type
=
(
pCreateTable
->
type
==
TSQL_CREATE_TABLE
)
?
TSDB_MSG_TYPE_CREATE_TABLE
:
TSDB_MSG_TYPE_CREATE_STB
;
}
else
if
(
pCreateTable
->
type
==
TSQL_CREATE_CTABLE
)
{
// if ((code = doCheckForCreateFromStable(pSql, pInfo)) != TSDB_CODE_SUCCESS) {
// return code;
...
...
@@ -4483,6 +4509,18 @@ int32_t qParserValidateDclSqlNode(SSqlInfo* pInfo, SParseBasicCtx* pCtx, void**
break
;
}
case
TSDB_SQL_DROP_TABLE
:
{
*
output
=
buildDropTableMsg
(
pInfo
,
outputLen
,
pCtx
,
pMsgBuf
);
if
(
output
==
NULL
)
{
return
terrno
;
}
*
type
=
TSDB_MSG_TYPE_DROP_STB
;
return
TSDB_CODE_SUCCESS
;
break
;
}
default:
break
;
}
...
...
source/libs/parser/src/sql.c
浏览文件 @
784975da
...
...
@@ -31,11 +31,11 @@
#include <assert.h>
#include <stdbool.h>
#include "astGenerator.h"
#include "parserInt.h"
#include "tmsgtype.h"
#include "ttoken.h"
#include "ttokendef.h"
#include "tvariant.h"
#include "parserInt.h"
/**************** End of %include directives **********************************/
/* These constants specify the various numeric values for terminal symbols
** in a format understandable to "makeheaders". This section is blank unless
...
...
@@ -97,30 +97,30 @@
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned short int
#define YYNOCODE 2
80
#define YYNOCODE 2
76
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE SToken
typedef
union
{
int
yyinit
;
ParseTOKENTYPE
yy0
;
S
CreatedTableInfo
yy78
;
SCreate
TableSql
*
yy110
;
int
yy130
;
SArray
*
yy135
;
SIntervalVal
yy160
;
S
Variant
yy191
;
S
Limit
yy247
;
S
CreateDbInfo
yy256
;
S
WindowStateVal
yy258
;
int32_t
yy26
2
;
S
CreateAcctInfo
yy277
;
S
Field
yy304
;
SRelationInfo
*
yy46
0
;
S
SqlNode
*
yy488
;
SSessionWindowVal
yy511
;
tSqlExpr
*
yy526
;
int64_t
yy531
;
S
Subclause
*
yy551
;
S
SessionWindowVal
yy39
;
SCreate
DbInfo
yy42
;
SVariant
yy43
;
int
yy44
;
tSqlExpr
*
yy46
;
S
Limit
yy55
;
S
CreatedTableInfo
yy96
;
S
Array
*
yy131
;
S
SqlNode
*
yy256
;
SCreateTableSql
*
yy27
2
;
S
Field
yy290
;
S
Subclause
*
yy303
;
int32_t
yy31
0
;
S
CreateAcctInfo
yy341
;
int64_t
yy459
;
SIntervalVal
yy530
;
SWindowStateVal
yy538
;
S
RelationInfo
*
yy544
;
}
YYMINORTYPE
;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
...
...
@@ -130,17 +130,17 @@ typedef union {
#define ParseARG_FETCH SSqlInfo* pInfo = yypParser->pInfo
#define ParseARG_STORE yypParser->pInfo = pInfo
#define YYFALLBACK 1
#define YYNSTATE 3
6
8
#define YYNRULE 2
95
#define YYNTOKEN 19
7
#define YY_MAX_SHIFT 3
6
7
#define YY_MIN_SHIFTREDUCE 5
77
#define YY_MAX_SHIFTREDUCE 8
7
1
#define YY_ERROR_ACTION 8
7
2
#define YY_ACCEPT_ACTION 8
7
3
#define YY_NO_ACTION 8
7
4
#define YY_MIN_REDUCE 8
7
5
#define YY_MAX_REDUCE 11
69
#define YYNSTATE 3
5
8
#define YYNRULE 2
88
#define YYNTOKEN 19
6
#define YY_MAX_SHIFT 3
5
7
#define YY_MIN_SHIFTREDUCE 5
64
#define YY_MAX_SHIFTREDUCE 8
5
1
#define YY_ERROR_ACTION 8
5
2
#define YY_ACCEPT_ACTION 8
5
3
#define YY_NO_ACTION 8
5
4
#define YY_MIN_REDUCE 8
5
5
#define YY_MAX_REDUCE 11
42
/************* End control #defines *******************************************/
/* Define the yytestcase() macro to be a no-op if is not already defined
...
...
@@ -206,293 +206,287 @@ typedef union {
** yy_default[] Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (7
76
)
#define YY_ACTTAB_COUNT (7
62
)
static
const
YYACTIONTYPE
yy_action
[]
=
{
/* 0 */
23
,
629
,
366
,
236
,
1054
,
209
,
242
,
713
,
212
,
630
,
/* 10 */
1031
,
873
,
367
,
59
,
60
,
174
,
63
,
64
,
1044
,
1145
,
/* 20 */
256
,
53
,
52
,
51
,
629
,
62
,
324
,
67
,
65
,
68
,
/* 30 */
66
,
158
,
630
,
286
,
239
,
58
,
57
,
344
,
343
,
56
,
/* 40 */
55
,
54
,
59
,
60
,
248
,
63
,
64
,
253
,
1031
,
256
,
/* 50 */
53
,
52
,
51
,
665
,
62
,
324
,
67
,
65
,
68
,
66
,
/* 60 */
1001
,
1044
,
999
,
1000
,
58
,
57
,
210
,
1002
,
56
,
55
,
/* 70 */
54
,
1003
,
1051
,
1004
,
1005
,
58
,
57
,
278
,
216
,
56
,
/* 80 */
55
,
54
,
59
,
60
,
165
,
63
,
64
,
38
,
83
,
256
,
/* 90 */
53
,
52
,
51
,
89
,
62
,
324
,
67
,
65
,
68
,
66
,
/* 100 */
284
,
283
,
250
,
754
,
58
,
57
,
1031
,
212
,
56
,
55
,
/* 110 */
54
,
38
,
59
,
61
,
808
,
63
,
64
,
1044
,
1146
,
256
,
/* 120 */
53
,
52
,
51
,
629
,
62
,
324
,
67
,
65
,
68
,
66
,
/* 130 */
45
,
630
,
238
,
240
,
58
,
57
,
1028
,
165
,
56
,
55
,
/* 140 */
54
,
60
,
1025
,
63
,
64
,
773
,
774
,
256
,
53
,
52
,
/* 150 */
51
,
96
,
62
,
324
,
67
,
65
,
68
,
66
,
165
,
1093
,
/* 160 */
1027
,
296
,
58
,
57
,
89
,
84
,
56
,
55
,
54
,
578
,
/* 170 */
579
,
580
,
581
,
582
,
583
,
584
,
585
,
586
,
587
,
588
,
/* 180 */
589
,
590
,
591
,
156
,
322
,
237
,
63
,
64
,
758
,
249
,
/* 190 */
256
,
53
,
52
,
51
,
629
,
62
,
324
,
67
,
65
,
68
,
/* 200 */
66
,
45
,
630
,
88
,
1017
,
58
,
57
,
362
,
962
,
56
,
/* 210 */
55
,
54
,
1092
,
44
,
320
,
361
,
360
,
319
,
318
,
317
,
/* 220 */
359
,
316
,
315
,
314
,
358
,
313
,
357
,
356
,
155
,
153
,
/* 230 */
152
,
298
,
24
,
94
,
993
,
981
,
982
,
983
,
984
,
985
,
/* 240 */
986
,
987
,
988
,
989
,
990
,
991
,
992
,
994
,
995
,
215
,
/* 250 */
751
,
255
,
823
,
924
,
126
,
812
,
223
,
815
,
354
,
818
,
/* 260 */
193
,
98
,
140
,
139
,
138
,
222
,
354
,
255
,
823
,
329
,
/* 270 */
89
,
812
,
252
,
815
,
270
,
818
,
9
,
29
,
217
,
67
,
/* 280 */
65
,
68
,
66
,
274
,
273
,
234
,
235
,
58
,
57
,
325
,
/* 290 */
322
,
56
,
55
,
54
,
1014
,
1015
,
35
,
1018
,
814
,
218
,
/* 300 */
817
,
234
,
235
,
259
,
5
,
41
,
183
,
45
,
56
,
55
,
/* 310 */
54
,
182
,
107
,
112
,
103
,
111
,
38
,
264
,
737
,
38
,
/* 320 */
934
,
734
,
742
,
735
,
743
,
736
,
165
,
193
,
257
,
277
,
/* 330 */
309
,
81
,
212
,
38
,
69
,
124
,
118
,
129
,
230
,
813
,
/* 340 */
1140
,
816
,
128
,
1146
,
134
,
137
,
127
,
203
,
201
,
199
,
/* 350 */
69
,
261
,
262
,
131
,
198
,
144
,
143
,
142
,
141
,
38
,
/* 360 */
44
,
246
,
361
,
360
,
247
,
1028
,
101
,
359
,
1028
,
824
,
/* 370 */
819
,
358
,
38
,
357
,
356
,
38
,
820
,
38
,
333
,
260
,
/* 380 */
38
,
258
,
1028
,
332
,
331
,
824
,
819
,
790
,
212
,
365
,
/* 390 */
364
,
149
,
820
,
266
,
38
,
263
,
38
,
339
,
338
,
1146
,
/* 400 */
265
,
95
,
1019
,
14
,
334
,
265
,
82
,
97
,
1028
,
86
,
/* 410 */
77
,
179
,
265
,
3
,
194
,
87
,
180
,
335
,
326
,
821
,
/* 420 */
336
,
1028
,
340
,
1029
,
1028
,
341
,
1028
,
925
,
279
,
1028
,
/* 430 */
74
,
1
,
181
,
770
,
193
,
738
,
739
,
100
,
34
,
342
,
/* 440 */
1016
,
346
,
39
,
1028
,
789
,
1028
,
73
,
160
,
780
,
781
,
/* 450 */
78
,
723
,
73
,
301
,
725
,
303
,
724
,
810
,
254
,
846
,
/* 460 */
822
,
825
,
70
,
26
,
628
,
39
,
80
,
39
,
70
,
99
,
/* 470 */
70
,
304
,
75
,
25
,
16
,
25
,
15
,
1139
,
25
,
117
,
/* 480 */
6
,
116
,
18
,
1138
,
17
,
740
,
20
,
741
,
19
,
123
,
/* 490 */
232
,
122
,
22
,
233
,
21
,
811
,
136
,
135
,
712
,
213
,
/* 500 */
275
,
214
,
219
,
211
,
220
,
221
,
225
,
1030
,
226
,
227
,
/* 510 */
224
,
208
,
1165
,
1157
,
1103
,
1046
,
1102
,
244
,
1099
,
1098
,
/* 520 */
245
,
345
,
827
,
157
,
48
,
1053
,
1064
,
1085
,
1061
,
1062
,
/* 530 */
1045
,
1084
,
281
,
1066
,
1026
,
154
,
159
,
164
,
292
,
175
,
/* 540 */
176
,
1024
,
33
,
285
,
177
,
168
,
178
,
939
,
769
,
306
,
/* 550 */
307
,
308
,
311
,
312
,
1042
,
46
,
206
,
42
,
323
,
933
,
/* 560 */
330
,
1164
,
114
,
241
,
79
,
1163
,
287
,
1160
,
289
,
76
,
/* 570 */
166
,
299
,
184
,
337
,
167
,
1156
,
50
,
120
,
1155
,
297
,
/* 580 */
1152
,
185
,
295
,
959
,
43
,
40
,
47
,
207
,
921
,
130
,
/* 590 */
919
,
132
,
133
,
917
,
916
,
267
,
293
,
196
,
197
,
913
,
/* 600 */
912
,
911
,
910
,
291
,
909
,
908
,
907
,
200
,
202
,
904
,
/* 610 */
902
,
900
,
898
,
204
,
895
,
205
,
288
,
891
,
49
,
310
,
/* 620 */
280
,
85
,
90
,
290
,
355
,
1086
,
348
,
125
,
347
,
349
,
/* 630 */
350
,
351
,
231
,
352
,
251
,
305
,
353
,
363
,
871
,
269
,
/* 640 */
870
,
268
,
271
,
228
,
229
,
108
,
938
,
937
,
109
,
272
,
/* 650 */
869
,
852
,
276
,
851
,
73
,
10
,
915
,
300
,
282
,
914
,
/* 660 */
745
,
145
,
188
,
146
,
187
,
960
,
186
,
189
,
190
,
192
,
/* 670 */
191
,
906
,
905
,
961
,
147
,
997
,
2
,
30
,
148
,
897
,
/* 680 */
896
,
91
,
171
,
169
,
172
,
170
,
173
,
1007
,
771
,
4
,
/* 690 */
161
,
163
,
782
,
162
,
243
,
776
,
92
,
31
,
778
,
93
,
/* 700 */
294
,
11
,
12
,
32
,
13
,
27
,
302
,
28
,
100
,
102
,
/* 710 */
105
,
36
,
104
,
643
,
37
,
106
,
678
,
676
,
675
,
674
,
/* 720 */
672
,
671
,
670
,
667
,
633
,
321
,
110
,
7
,
327
,
328
,
/* 730 */
828
,
39
,
826
,
8
,
113
,
71
,
115
,
72
,
715
,
714
,
/* 740 */
119
,
711
,
659
,
121
,
657
,
649
,
655
,
651
,
653
,
647
,
/* 750 */
645
,
681
,
680
,
679
,
677
,
673
,
669
,
668
,
195
,
631
,
/* 760 */
595
,
875
,
874
,
874
,
874
,
874
,
874
,
874
,
874
,
874
,
/* 770 */
874
,
874
,
874
,
874
,
150
,
151
,
/* 0 */
94
,
615
,
233
,
244
,
356
,
227
,
1004
,
239
,
243
,
616
,
/* 10 */
615
,
1004
,
21
,
55
,
56
,
241
,
59
,
60
,
616
,
1004
,
/* 20 */
247
,
49
,
48
,
47
,
200
,
58
,
315
,
63
,
61
,
64
,
/* 30 */
62
,
987
,
988
,
33
,
991
,
54
,
53
,
853
,
357
,
52
,
/* 40 */
51
,
50
,
55
,
56
,
97
,
59
,
60
,
650
,
248
,
247
,
/* 50 */
49
,
48
,
47
,
201
,
58
,
315
,
63
,
61
,
64
,
62
,
/* 60 */
976
,
203
,
974
,
975
,
54
,
53
,
203
,
977
,
52
,
51
,
/* 70 */
50
,
978
,
1119
,
979
,
980
,
54
,
53
,
1119
,
992
,
52
,
/* 80 */
51
,
50
,
55
,
56
,
1017
,
59
,
60
,
159
,
79
,
247
,
/* 90 */
49
,
48
,
47
,
27
,
58
,
315
,
63
,
61
,
64
,
62
,
/* 100 */
269
,
313
,
693
,
990
,
54
,
53
,
203
,
998
,
52
,
51
,
/* 110 */
50
,
345
,
55
,
57
,
788
,
59
,
60
,
1119
,
36
,
247
,
/* 120 */
49
,
48
,
47
,
615
,
58
,
315
,
63
,
61
,
64
,
62
,
/* 130 */
1017
,
616
,
335
,
334
,
54
,
53
,
152
,
615
,
52
,
51
,
/* 140 */
50
,
56
,
36
,
59
,
60
,
616
,
230
,
247
,
49
,
48
,
/* 150 */
47
,
240
,
58
,
315
,
63
,
61
,
64
,
62
,
159
,
1066
,
/* 160 */
229
,
287
,
54
,
53
,
1001
,
73
,
52
,
51
,
50
,
565
,
/* 170 */
566
,
567
,
568
,
569
,
570
,
571
,
572
,
573
,
574
,
575
,
/* 180 */
576
,
577
,
578
,
150
,
237
,
228
,
59
,
60
,
1001
,
313
,
/* 190 */
247
,
49
,
48
,
47
,
250
,
58
,
315
,
63
,
61
,
64
,
/* 200 */
62
,
203
,
275
,
274
,
74
,
54
,
53
,
753
,
754
,
52
,
/* 210 */
51
,
50
,
1118
,
42
,
311
,
351
,
350
,
310
,
309
,
308
,
/* 220 */
349
,
307
,
306
,
305
,
348
,
304
,
347
,
346
,
289
,
22
,
/* 230 */
90
,
970
,
958
,
959
,
960
,
961
,
962
,
963
,
964
,
965
,
/* 240 */
966
,
967
,
968
,
969
,
971
,
972
,
212
,
1017
,
246
,
803
,
/* 250 */
36
,
36
,
792
,
213
,
795
,
36
,
798
,
168
,
36
,
134
,
/* 260 */
133
,
132
,
214
,
231
,
246
,
803
,
320
,
85
,
792
,
251
,
/* 270 */
795
,
249
,
798
,
323
,
322
,
277
,
63
,
61
,
64
,
62
,
/* 280 */
206
,
255
,
225
,
226
,
54
,
53
,
316
,
85
,
52
,
51
,
/* 290 */
50
,
12
,
238
,
324
,
85
,
93
,
1001
,
1001
,
225
,
226
,
/* 300 */
325
,
1000
,
717
,
43
,
1001
,
714
,
261
,
715
,
207
,
716
,
/* 310 */
194
,
192
,
190
,
159
,
1027
,
265
,
264
,
189
,
138
,
137
,
/* 320 */
136
,
135
,
36
,
43
,
96
,
268
,
42
,
77
,
351
,
350
,
/* 330 */
43
,
65
,
84
,
349
,
221
,
252
,
253
,
348
,
36
,
347
,
/* 340 */
346
,
3
,
39
,
175
,
119
,
113
,
123
,
65
,
36
,
103
,
/* 350 */
107
,
99
,
106
,
128
,
131
,
122
,
257
,
36
,
254
,
36
,
/* 360 */
330
,
329
,
125
,
159
,
326
,
804
,
799
,
300
,
1001
,
734
,
/* 370 */
36
,
121
,
800
,
52
,
51
,
50
,
794
,
256
,
797
,
1024
,
/* 380 */
327
,
804
,
799
,
345
,
1001
,
1065
,
173
,
793
,
800
,
796
,
/* 390 */
331
,
149
,
147
,
146
,
1001
,
355
,
354
,
143
,
256
,
332
,
/* 400 */
256
,
333
,
903
,
1001
,
770
,
1001
,
78
,
174
,
185
,
1002
,
/* 410 */
352
,
940
,
337
,
70
,
92
,
731
,
1001
,
913
,
718
,
719
,
/* 420 */
904
,
82
,
270
,
185
,
790
,
83
,
185
,
750
,
80
,
760
,
/* 430 */
761
,
703
,
292
,
705
,
294
,
91
,
37
,
704
,
989
,
32
,
/* 440 */
7
,
154
,
826
,
66
,
24
,
37
,
37
,
66
,
95
,
805
,
/* 450 */
245
,
66
,
317
,
738
,
71
,
614
,
23
,
69
,
76
,
208
,
/* 460 */
769
,
69
,
791
,
23
,
14
,
112
,
13
,
111
,
16
,
23
,
/* 470 */
15
,
295
,
4
,
722
,
720
,
723
,
721
,
18
,
118
,
17
,
/* 480 */
117
,
20
,
1113
,
19
,
130
,
129
,
1112
,
1111
,
223
,
692
,
/* 490 */
224
,
204
,
205
,
209
,
202
,
210
,
801
,
211
,
216
,
217
,
/* 500 */
218
,
215
,
199
,
1003
,
1138
,
1130
,
1019
,
802
,
1076
,
1075
,
/* 510 */
235
,
1072
,
1071
,
44
,
236
,
336
,
266
,
1058
,
169
,
151
,
/* 520 */
1026
,
148
,
1037
,
1034
,
1035
,
1018
,
272
,
1057
,
1039
,
999
,
/* 530 */
1015
,
276
,
153
,
232
,
278
,
280
,
31
,
158
,
283
,
163
,
/* 540 */
170
,
160
,
997
,
161
,
749
,
162
,
164
,
165
,
166
,
171
,
/* 550 */
172
,
301
,
917
,
297
,
290
,
807
,
284
,
298
,
299
,
302
,
/* 560 */
303
,
197
,
40
,
75
,
314
,
912
,
321
,
1137
,
109
,
72
,
/* 570 */
46
,
1136
,
1133
,
288
,
176
,
328
,
1129
,
115
,
1128
,
1125
,
/* 580 */
177
,
286
,
937
,
41
,
38
,
198
,
901
,
279
,
124
,
899
,
/* 590 */
126
,
127
,
897
,
896
,
258
,
187
,
188
,
893
,
892
,
891
,
/* 600 */
890
,
889
,
888
,
282
,
887
,
191
,
193
,
884
,
882
,
880
,
/* 610 */
878
,
195
,
875
,
196
,
871
,
45
,
120
,
271
,
81
,
86
,
/* 620 */
338
,
281
,
1059
,
339
,
340
,
341
,
222
,
343
,
342
,
242
,
/* 630 */
296
,
344
,
353
,
851
,
259
,
260
,
219
,
220
,
850
,
104
,
/* 640 */
916
,
915
,
262
,
263
,
849
,
832
,
895
,
894
,
831
,
267
,
/* 650 */
291
,
139
,
69
,
886
,
180
,
140
,
179
,
938
,
178
,
181
,
/* 660 */
182
,
184
,
183
,
939
,
141
,
885
,
8
,
142
,
877
,
2
,
/* 670 */
1
,
876
,
725
,
28
,
273
,
167
,
87
,
751
,
155
,
157
,
/* 680 */
762
,
156
,
234
,
756
,
88
,
29
,
758
,
89
,
285
,
9
,
/* 690 */
30
,
10
,
11
,
25
,
293
,
26
,
96
,
98
,
101
,
34
,
/* 700 */
100
,
628
,
35
,
102
,
663
,
661
,
660
,
659
,
657
,
656
,
/* 710 */
655
,
652
,
619
,
312
,
105
,
5
,
318
,
806
,
319
,
6
,
/* 720 */
808
,
108
,
110
,
67
,
68
,
695
,
37
,
694
,
691
,
114
,
/* 730 */
644
,
116
,
642
,
634
,
640
,
636
,
638
,
632
,
630
,
665
,
/* 740 */
664
,
662
,
658
,
654
,
653
,
186
,
617
,
144
,
582
,
855
,
/* 750 */
854
,
854
,
854
,
854
,
854
,
854
,
854
,
854
,
854
,
854
,
/* 760 */
854
,
145
,
};
static
const
YYCODETYPE
yy_lookahead
[]
=
{
/* 0 */
2
67
,
1
,
200
,
201
,
200
,
267
,
246
,
5
,
267
,
9
,
/* 10 */
250
,
198
,
199
,
13
,
14
,
254
,
16
,
17
,
248
,
278
,
/* 20 */
20
,
21
,
22
,
23
,
1
,
25
,
26
,
27
,
28
,
29
,
/* 30 */
30
,
2
00
,
9
,
272
,
264
,
35
,
36
,
35
,
36
,
39
,
/* 40 */
40
,
41
,
13
,
14
,
2
46
,
16
,
17
,
207
,
250
,
20
,
/* 50 */
21
,
22
,
23
,
5
,
25
,
26
,
27
,
28
,
29
,
30
,
/* 60 */
22
4
,
248
,
226
,
227
,
35
,
36
,
267
,
231
,
39
,
40
,
/* 70 */
41
,
23
5
,
268
,
237
,
238
,
35
,
36
,
264
,
267
,
39
,
/* 80 */
40
,
41
,
13
,
14
,
2
00
,
16
,
17
,
200
,
88
,
20
,
/* 0 */
2
06
,
1
,
242
,
205
,
199
,
200
,
246
,
242
,
205
,
9
,
/* 10 */
1
,
246
,
263
,
13
,
14
,
242
,
16
,
17
,
9
,
246
,
/* 20 */
20
,
21
,
22
,
23
,
263
,
25
,
26
,
27
,
28
,
29
,
/* 30 */
30
,
2
37
,
238
,
239
,
240
,
35
,
36
,
197
,
198
,
39
,
/* 40 */
40
,
41
,
13
,
14
,
2
06
,
16
,
17
,
5
,
205
,
20
,
/* 50 */
21
,
22
,
23
,
263
,
25
,
26
,
27
,
28
,
29
,
30
,
/* 60 */
22
1
,
263
,
223
,
224
,
35
,
36
,
263
,
228
,
39
,
40
,
/* 70 */
41
,
23
2
,
274
,
234
,
235
,
35
,
36
,
274
,
240
,
39
,
/* 80 */
40
,
41
,
13
,
14
,
2
44
,
16
,
17
,
199
,
88
,
20
,
/* 90 */
21
,
22
,
23
,
84
,
25
,
26
,
27
,
28
,
29
,
30
,
/* 100 */
26
9
,
270
,
246
,
39
,
35
,
36
,
250
,
267
,
39
,
40
,
/* 110 */
41
,
200
,
13
,
14
,
85
,
16
,
17
,
248
,
278
,
20
,
/* 100 */
26
0
,
86
,
5
,
0
,
35
,
36
,
263
,
199
,
39
,
40
,
/* 110 */
41
,
92
,
13
,
14
,
85
,
16
,
17
,
274
,
199
,
20
,
/* 120 */
21
,
22
,
23
,
1
,
25
,
26
,
27
,
28
,
29
,
30
,
/* 130 */
121
,
9
,
245
,
264
,
35
,
36
,
249
,
200
,
39
,
40
,
/* 140 */
41
,
14
,
200
,
16
,
17
,
127
,
128
,
20
,
21
,
22
,
/* 150 */
23
,
2
51
,
25
,
26
,
27
,
28
,
29
,
30
,
200
,
275
,
/* 160 */
24
9
,
277
,
35
,
36
,
84
,
265
,
39
,
40
,
41
,
47
,
/* 130 */
244
,
9
,
35
,
36
,
35
,
36
,
199
,
1
,
39
,
40
,
/* 140 */
41
,
14
,
199
,
16
,
17
,
9
,
260
,
20
,
21
,
22
,
/* 150 */
23
,
2
43
,
25
,
26
,
27
,
28
,
29
,
30
,
199
,
271
,
/* 160 */
24
1
,
273
,
35
,
36
,
245
,
99
,
39
,
40
,
41
,
47
,
/* 170 */
48
,
49
,
50
,
51
,
52
,
53
,
54
,
55
,
56
,
57
,
/* 180 */
58
,
59
,
60
,
61
,
86
,
63
,
16
,
17
,
124
,
247
,
/* 190 */
20
,
21
,
22
,
23
,
1
,
25
,
26
,
27
,
28
,
29
,
/* 200 */
30
,
121
,
9
,
123
,
0
,
35
,
36
,
222
,
223
,
39
,
/* 210 */
40
,
41
,
275
,
100
,
101
,
102
,
103
,
104
,
105
,
106
,
/* 220 */
107
,
108
,
109
,
110
,
111
,
112
,
113
,
114
,
64
,
65
,
/* 230 */
66
,
273
,
46
,
275
,
224
,
225
,
226
,
227
,
228
,
229
,
/* 240 */
230
,
231
,
232
,
233
,
234
,
235
,
236
,
237
,
238
,
63
,
/* 250 */
99
,
1
,
2
,
206
,
80
,
5
,
70
,
7
,
92
,
9
,
/* 260 */
213
,
208
,
76
,
77
,
78
,
79
,
92
,
1
,
2
,
83
,
/* 270 */
84
,
5
,
207
,
7
,
144
,
9
,
125
,
84
,
267
,
27
,
/* 280 */
28
,
29
,
30
,
153
,
154
,
35
,
36
,
35
,
36
,
39
,
/* 290 */
86
,
39
,
40
,
41
,
241
,
242
,
243
,
244
,
5
,
267
,
/* 300 */
7
,
35
,
36
,
70
,
64
,
65
,
66
,
121
,
39
,
40
,
/* 310 */
41
,
71
,
72
,
73
,
74
,
75
,
200
,
70
,
2
,
200
,
/* 320 */
206
,
5
,
5
,
7
,
7
,
9
,
200
,
213
,
207
,
143
,
/* 330 */
90
,
145
,
267
,
200
,
84
,
64
,
65
,
66
,
152
,
5
,
/* 340 */
267
,
7
,
71
,
278
,
73
,
74
,
75
,
64
,
65
,
66
,
/* 350 */
84
,
35
,
36
,
82
,
71
,
72
,
73
,
74
,
75
,
200
,
/* 360 */
100
,
245
,
102
,
103
,
245
,
249
,
208
,
107
,
249
,
119
,
/* 370 */
120
,
111
,
200
,
113
,
114
,
200
,
126
,
200
,
245
,
146
,
/* 380 */
200
,
148
,
249
,
150
,
151
,
119
,
120
,
78
,
267
,
67
,
/* 390 */
68
,
69
,
126
,
146
,
200
,
148
,
200
,
150
,
151
,
278
,
/* 400 */
200
,
275
,
244
,
84
,
245
,
200
,
208
,
88
,
249
,
85
,
/* 410 */
99
,
211
,
200
,
204
,
205
,
85
,
211
,
245
,
15
,
126
,
/* 420 */
245
,
249
,
245
,
211
,
249
,
245
,
249
,
206
,
85
,
249
,
/* 430 */
99
,
209
,
210
,
85
,
213
,
119
,
120
,
118
,
84
,
245
,
/* 440 */
242
,
245
,
99
,
249
,
135
,
249
,
122
,
99
,
85
,
85
,
/* 450 */
139
,
85
,
122
,
85
,
85
,
85
,
85
,
1
,
62
,
85
,
/* 460 */
126
,
85
,
99
,
99
,
85
,
99
,
84
,
99
,
99
,
99
,
/* 470 */
99
,
117
,
141
,
99
,
147
,
99
,
149
,
267
,
99
,
147
,
/* 480 */
84
,
149
,
147
,
267
,
149
,
5
,
147
,
7
,
149
,
147
,
/* 490 */
267
,
149
,
147
,
267
,
149
,
39
,
80
,
81
,
116
,
267
,
/* 500 */
200
,
267
,
267
,
267
,
267
,
267
,
267
,
250
,
267
,
267
,
/* 510 */
267
,
267
,
250
,
250
,
240
,
248
,
240
,
240
,
240
,
240
,
/* 520 */
240
,
240
,
119
,
200
,
266
,
200
,
200
,
276
,
200
,
200
,
/* 530 */
248
,
276
,
248
,
200
,
248
,
62
,
200
,
200
,
200
,
252
,
/* 540 */
200
,
200
,
253
,
271
,
200
,
260
,
200
,
200
,
126
,
200
,
/* 550 */
200
,
200
,
200
,
200
,
263
,
200
,
200
,
200
,
200
,
200
,
/* 560 */
200
,
200
,
200
,
271
,
138
,
200
,
271
,
200
,
271
,
140
,
/* 570 */
262
,
133
,
200
,
200
,
261
,
200
,
137
,
200
,
200
,
136
,
/* 580 */
200
,
200
,
131
,
200
,
200
,
200
,
200
,
200
,
200
,
200
,
/* 590 */
200
,
200
,
200
,
200
,
200
,
200
,
130
,
200
,
200
,
200
,
/* 600 */
200
,
200
,
200
,
129
,
200
,
200
,
200
,
200
,
200
,
200
,
/* 610 */
200
,
200
,
200
,
200
,
200
,
200
,
132
,
200
,
142
,
91
,
/* 620 */
202
,
202
,
202
,
202
,
115
,
202
,
53
,
98
,
97
,
94
,
/* 630 */
96
,
57
,
202
,
95
,
202
,
202
,
93
,
86
,
5
,
5
,
/* 640 */
5
,
155
,
155
,
202
,
202
,
208
,
212
,
212
,
208
,
5
,
/* 650 */
5
,
102
,
144
,
101
,
122
,
84
,
202
,
117
,
99
,
202
,
/* 660 */
85
,
203
,
215
,
203
,
219
,
221
,
220
,
218
,
216
,
214
,
/* 670 */
217
,
202
,
202
,
223
,
203
,
239
,
209
,
84
,
203
,
202
,
/* 680 */
202
,
99
,
257
,
259
,
256
,
258
,
255
,
239
,
85
,
204
,
/* 690 */
84
,
99
,
85
,
84
,
1
,
85
,
84
,
99
,
85
,
84
,
/* 700 */
84
,
134
,
134
,
99
,
84
,
84
,
117
,
84
,
118
,
80
,
/* 710 */
72
,
89
,
88
,
5
,
89
,
88
,
9
,
5
,
5
,
5
,
/* 720 */
5
,
5
,
5
,
5
,
87
,
15
,
80
,
84
,
26
,
61
,
/* 730 */
119
,
99
,
85
,
84
,
149
,
16
,
149
,
16
,
5
,
5
,
/* 740 */
149
,
85
,
5
,
149
,
5
,
5
,
5
,
5
,
5
,
5
,
/* 750 */
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
99
,
87
,
/* 760 */
62
,
0
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 770 */
279
,
279
,
279
,
279
,
21
,
21
,
279
,
279
,
279
,
279
,
/* 780 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 790 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 800 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 810 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 820 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 830 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 840 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 850 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 860 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 870 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 880 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 890 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 900 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 910 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 920 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 930 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 940 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 950 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 960 */
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
279
,
/* 970 */
279
,
279
,
279
,
/* 180 */
58
,
59
,
60
,
61
,
241
,
63
,
16
,
17
,
245
,
86
,
/* 190 */
20
,
21
,
22
,
23
,
70
,
25
,
26
,
27
,
28
,
29
,
/* 200 */
30
,
263
,
265
,
266
,
138
,
35
,
36
,
126
,
127
,
39
,
/* 210 */
40
,
41
,
274
,
100
,
101
,
102
,
103
,
104
,
105
,
106
,
/* 220 */
107
,
108
,
109
,
110
,
111
,
112
,
113
,
114
,
269
,
46
,
/* 230 */
271
,
221
,
222
,
223
,
224
,
225
,
226
,
227
,
228
,
229
,
/* 240 */
230
,
231
,
232
,
233
,
234
,
235
,
63
,
244
,
1
,
2
,
/* 250 */
199
,
199
,
5
,
70
,
7
,
199
,
9
,
250
,
199
,
76
,
/* 260 */
77
,
78
,
79
,
260
,
1
,
2
,
83
,
84
,
5
,
145
,
/* 270 */
7
,
147
,
9
,
149
,
150
,
268
,
27
,
28
,
29
,
30
,
/* 280 */
263
,
70
,
35
,
36
,
35
,
36
,
39
,
84
,
39
,
40
,
/* 290 */
41
,
84
,
241
,
241
,
84
,
88
,
245
,
245
,
35
,
36
,
/* 300 */
241
,
245
,
2
,
120
,
245
,
5
,
143
,
7
,
263
,
9
,
/* 310 */
64
,
65
,
66
,
199
,
199
,
152
,
153
,
71
,
72
,
73
,
/* 320 */
74
,
75
,
199
,
120
,
117
,
142
,
100
,
144
,
102
,
103
,
/* 330 */
120
,
84
,
122
,
107
,
151
,
35
,
36
,
111
,
199
,
113
,
/* 340 */
114
,
64
,
65
,
66
,
64
,
65
,
66
,
84
,
199
,
72
,
/* 350 */
73
,
74
,
75
,
73
,
74
,
75
,
145
,
199
,
147
,
199
,
/* 360 */
149
,
150
,
82
,
199
,
241
,
118
,
119
,
90
,
245
,
39
,
/* 370 */
199
,
80
,
125
,
39
,
40
,
41
,
5
,
199
,
7
,
264
,
/* 380 */
241
,
118
,
119
,
92
,
245
,
271
,
208
,
5
,
125
,
7
,
/* 390 */
241
,
64
,
65
,
66
,
245
,
67
,
68
,
69
,
199
,
241
,
/* 400 */
199
,
241
,
204
,
245
,
78
,
245
,
206
,
208
,
210
,
208
,
/* 410 */
219
,
220
,
241
,
99
,
247
,
99
,
245
,
204
,
118
,
119
,
/* 420 */
204
,
85
,
85
,
210
,
1
,
85
,
210
,
85
,
261
,
85
,
/* 430 */
85
,
85
,
85
,
85
,
85
,
271
,
99
,
85
,
238
,
84
,
/* 440 */
124
,
99
,
85
,
99
,
99
,
99
,
99
,
99
,
99
,
85
,
/* 450 */
62
,
99
,
15
,
123
,
140
,
85
,
99
,
121
,
84
,
263
,
/* 460 */
134
,
121
,
39
,
99
,
146
,
146
,
148
,
148
,
146
,
99
,
/* 470 */
148
,
116
,
84
,
5
,
5
,
7
,
7
,
146
,
146
,
148
,
/* 480 */
148
,
146
,
263
,
148
,
80
,
81
,
263
,
263
,
263
,
115
,
/* 490 */
263
,
263
,
263
,
263
,
263
,
263
,
125
,
263
,
263
,
263
,
/* 500 */
263
,
263
,
263
,
246
,
246
,
246
,
244
,
125
,
236
,
236
,
/* 510 */
236
,
236
,
236
,
262
,
236
,
236
,
199
,
272
,
248
,
199
,
/* 520 */
199
,
62
,
199
,
199
,
199
,
244
,
244
,
272
,
199
,
244
,
/* 530 */
259
,
267
,
199
,
267
,
267
,
267
,
249
,
199
,
199
,
255
,
/* 540 */
199
,
258
,
199
,
257
,
125
,
256
,
254
,
253
,
252
,
199
,
/* 550 */
199
,
91
,
199
,
199
,
132
,
118
,
129
,
199
,
199
,
199
,
/* 560 */
199
,
199
,
199
,
137
,
199
,
199
,
199
,
199
,
199
,
139
,
/* 570 */
136
,
199
,
199
,
135
,
199
,
199
,
199
,
199
,
199
,
199
,
/* 580 */
199
,
130
,
199
,
199
,
199
,
199
,
199
,
131
,
199
,
199
,
/* 590 */
199
,
199
,
199
,
199
,
199
,
199
,
199
,
199
,
199
,
199
,
/* 600 */
199
,
199
,
199
,
128
,
199
,
199
,
199
,
199
,
199
,
199
,
/* 610 */
199
,
199
,
199
,
199
,
199
,
141
,
98
,
201
,
201
,
201
,
/* 620 */
97
,
201
,
201
,
53
,
94
,
96
,
201
,
95
,
57
,
201
,
/* 630 */
201
,
93
,
86
,
5
,
154
,
5
,
201
,
201
,
5
,
206
,
/* 640 */
209
,
209
,
154
,
5
,
5
,
102
,
201
,
201
,
101
,
143
,
/* 650 */
116
,
202
,
121
,
201
,
212
,
202
,
216
,
218
,
217
,
215
,
/* 660 */
213
,
211
,
214
,
220
,
202
,
201
,
84
,
202
,
201
,
203
,
/* 670 */
207
,
201
,
85
,
84
,
99
,
251
,
99
,
85
,
84
,
99
,
/* 680 */
85
,
84
,
1
,
85
,
84
,
99
,
85
,
84
,
84
,
133
,
/* 690 */
99
,
133
,
84
,
84
,
116
,
84
,
117
,
80
,
72
,
89
,
/* 700 */
88
,
5
,
89
,
88
,
9
,
5
,
5
,
5
,
5
,
5
,
/* 710 */
5
,
5
,
87
,
15
,
80
,
84
,
26
,
85
,
61
,
84
,
/* 720 */
118
,
148
,
148
,
16
,
16
,
5
,
99
,
5
,
85
,
148
,
/* 730 */
5
,
148
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
/* 740 */
5
,
5
,
5
,
5
,
5
,
99
,
87
,
21
,
62
,
0
,
/* 750 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 760 */
275
,
21
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 770 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 780 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 790 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 800 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 810 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 820 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 830 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 840 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 850 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 860 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 870 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 880 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 890 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 900 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 910 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 920 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 930 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 940 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
/* 950 */
275
,
275
,
275
,
275
,
275
,
275
,
275
,
275
,
};
#define YY_SHIFT_COUNT (3
6
7)
#define YY_SHIFT_COUNT (3
5
7)
#define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (7
61
)
#define YY_SHIFT_MAX (7
49
)
static
const
unsigned
short
int
yy_shift_ofst
[]
=
{
/* 0 */
186
,
113
,
113
,
260
,
260
,
98
,
250
,
266
,
266
,
193
,
/* 10 */
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
/* 20 */
23
,
23
,
23
,
0
,
122
,
266
,
316
,
316
,
316
,
9
,
/* 30 */
9
,
23
,
23
,
18
,
23
,
204
,
23
,
23
,
23
,
23
,
/* 40 */
174
,
98
,
166
,
166
,
48
,
776
,
776
,
776
,
266
,
266
,
/* 50 */
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 60 */
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
266
,
/* 70 */
316
,
316
,
316
,
80
,
2
,
2
,
2
,
2
,
2
,
2
,
/* 80 */
2
,
23
,
23
,
23
,
64
,
23
,
23
,
23
,
9
,
9
,
/* 90 */
23
,
23
,
23
,
23
,
309
,
309
,
151
,
9
,
23
,
23
,
/* 100 */
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
/* 110 */
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
/* 120 */
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
/* 130 */
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
/* 140 */
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
23
,
/* 150 */
23
,
23
,
23
,
23
,
23
,
23
,
23
,
473
,
473
,
473
,
/* 160 */
422
,
422
,
422
,
422
,
473
,
473
,
426
,
429
,
438
,
439
,
/* 170 */
443
,
451
,
466
,
474
,
484
,
476
,
473
,
473
,
473
,
528
,
/* 180 */
528
,
509
,
98
,
98
,
473
,
473
,
529
,
531
,
573
,
535
,
/* 190 */
534
,
574
,
538
,
543
,
509
,
48
,
473
,
473
,
551
,
551
,
/* 200 */
473
,
551
,
473
,
551
,
473
,
473
,
776
,
776
,
29
,
69
,
/* 210 */
69
,
99
,
69
,
127
,
170
,
240
,
252
,
252
,
252
,
252
,
/* 220 */
252
,
252
,
271
,
283
,
40
,
40
,
40
,
40
,
233
,
247
,
/* 230 */
130
,
319
,
269
,
269
,
293
,
334
,
322
,
164
,
343
,
324
,
/* 240 */
330
,
348
,
363
,
364
,
331
,
311
,
366
,
368
,
369
,
370
,
/* 250 */
371
,
354
,
374
,
376
,
456
,
396
,
403
,
379
,
327
,
332
,
/* 260 */
335
,
317
,
480
,
339
,
342
,
382
,
345
,
416
,
633
,
486
,
/* 270 */
634
,
635
,
487
,
644
,
645
,
549
,
552
,
508
,
532
,
540
,
/* 280 */
571
,
575
,
593
,
559
,
582
,
603
,
606
,
607
,
609
,
610
,
/* 290 */
592
,
612
,
613
,
615
,
693
,
616
,
598
,
567
,
604
,
568
,
/* 300 */
620
,
540
,
621
,
589
,
623
,
590
,
629
,
622
,
624
,
638
,
/* 310 */
708
,
625
,
627
,
707
,
712
,
713
,
714
,
715
,
716
,
717
,
/* 320 */
718
,
637
,
710
,
646
,
643
,
647
,
611
,
649
,
702
,
668
,
/* 330 */
719
,
585
,
587
,
632
,
632
,
632
,
632
,
721
,
591
,
594
,
/* 340 */
632
,
632
,
632
,
733
,
734
,
656
,
632
,
737
,
739
,
740
,
/* 350 */
741
,
742
,
743
,
744
,
745
,
746
,
747
,
748
,
749
,
750
,
/* 360 */
751
,
752
,
659
,
672
,
753
,
754
,
698
,
761
,
/* 0 */
183
,
113
,
226
,
15
,
247
,
263
,
263
,
9
,
136
,
136
,
/* 10 */
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
/* 20 */
136
,
0
,
122
,
263
,
300
,
300
,
300
,
203
,
203
,
136
,
/* 30 */
136
,
81
,
136
,
103
,
136
,
136
,
136
,
136
,
291
,
15
,
/* 40 */
19
,
19
,
42
,
762
,
263
,
263
,
263
,
263
,
263
,
263
,
/* 50 */
263
,
263
,
263
,
263
,
263
,
263
,
263
,
263
,
263
,
263
,
/* 60 */
263
,
263
,
263
,
263
,
263
,
263
,
300
,
300
,
300
,
210
,
/* 70 */
97
,
97
,
97
,
97
,
97
,
97
,
97
,
136
,
136
,
136
,
/* 80 */
330
,
136
,
136
,
136
,
203
,
203
,
136
,
136
,
136
,
136
,
/* 90 */
326
,
326
,
316
,
203
,
136
,
136
,
136
,
136
,
136
,
136
,
/* 100 */
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
/* 110 */
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
/* 120 */
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
/* 130 */
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
/* 140 */
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
136
,
/* 150 */
136
,
459
,
459
,
459
,
419
,
419
,
419
,
419
,
459
,
459
,
/* 160 */
426
,
430
,
422
,
434
,
438
,
451
,
427
,
475
,
456
,
474
,
/* 170 */
459
,
459
,
459
,
460
,
460
,
15
,
459
,
459
,
518
,
523
,
/* 180 */
570
,
530
,
529
,
571
,
532
,
538
,
42
,
459
,
459
,
546
,
/* 190 */
546
,
459
,
546
,
459
,
546
,
459
,
459
,
762
,
762
,
29
,
/* 200 */
69
,
69
,
99
,
69
,
127
,
170
,
249
,
249
,
249
,
249
,
/* 210 */
249
,
249
,
277
,
246
,
280
,
40
,
40
,
40
,
40
,
124
,
/* 220 */
211
,
163
,
207
,
334
,
334
,
371
,
382
,
328
,
327
,
337
,
/* 230 */
336
,
340
,
342
,
344
,
345
,
314
,
66
,
346
,
347
,
348
,
/* 240 */
349
,
352
,
355
,
357
,
364
,
423
,
388
,
437
,
370
,
318
,
/* 250 */
319
,
322
,
468
,
469
,
331
,
332
,
374
,
335
,
404
,
628
,
/* 260 */
480
,
630
,
633
,
488
,
638
,
639
,
543
,
547
,
506
,
531
,
/* 270 */
534
,
582
,
587
,
589
,
575
,
577
,
592
,
594
,
595
,
597
,
/* 280 */
598
,
580
,
600
,
601
,
603
,
681
,
604
,
586
,
556
,
591
,
/* 290 */
558
,
608
,
534
,
609
,
578
,
611
,
579
,
617
,
610
,
612
,
/* 300 */
626
,
696
,
613
,
615
,
695
,
700
,
701
,
702
,
703
,
704
,
/* 310 */
705
,
706
,
625
,
698
,
634
,
631
,
632
,
602
,
635
,
690
,
/* 320 */
657
,
707
,
573
,
574
,
627
,
627
,
627
,
627
,
708
,
581
,
/* 330 */
583
,
627
,
627
,
627
,
720
,
722
,
643
,
627
,
725
,
727
,
/* 340 */
728
,
729
,
730
,
731
,
732
,
733
,
734
,
735
,
736
,
737
,
/* 350 */
738
,
739
,
646
,
659
,
726
,
740
,
686
,
749
,
};
#define YY_REDUCE_COUNT (
207
)
#define YY_REDUCE_MIN (-2
67
)
#define YY_REDUCE_MAX (4
85
)
#define YY_REDUCE_COUNT (
198
)
#define YY_REDUCE_MIN (-2
51
)
#define YY_REDUCE_MAX (4
70
)
static
const
short
yy_reduce_ofst
[]
=
{
/* 0 */
-
187
,
10
,
10
,
-
164
,
-
164
,
53
,
-
160
,
65
,
121
,
-
169
,
/* 10 */
-
113
,
-
116
,
-
42
,
116
,
119
,
133
,
159
,
172
,
175
,
177
,
/* 20 */
180
,
194
,
196
,
-
196
,
-
198
,
-
259
,
-
240
,
-
202
,
-
144
,
-
230
,
/* 30 */
-
131
,
-
63
,
126
,
-
239
,
-
58
,
158
,
200
,
205
,
212
,
-
89
,
/* 40 */
47
,
198
,
114
,
221
,
-
15
,
-
100
,
222
,
209
,
-
267
,
-
262
,
/* 50 */
-
201
,
-
189
,
11
,
32
,
73
,
210
,
216
,
223
,
226
,
232
,
/* 60 */
234
,
235
,
236
,
237
,
238
,
239
,
241
,
242
,
243
,
244
,
/* 70 */
257
,
262
,
263
,
267
,
274
,
276
,
277
,
278
,
279
,
280
,
/* 80 */
281
,
300
,
323
,
325
,
258
,
326
,
328
,
329
,
282
,
284
,
/* 90 */
333
,
336
,
337
,
338
,
251
,
255
,
287
,
286
,
340
,
341
,
/* 100 */
344
,
346
,
347
,
349
,
350
,
351
,
352
,
353
,
355
,
356
,
/* 110 */
357
,
358
,
359
,
360
,
361
,
362
,
365
,
367
,
372
,
373
,
/* 120 */
375
,
377
,
378
,
380
,
381
,
383
,
384
,
385
,
386
,
387
,
/* 130 */
388
,
389
,
390
,
391
,
392
,
393
,
394
,
395
,
397
,
398
,
/* 140 */
399
,
400
,
401
,
402
,
404
,
405
,
406
,
407
,
408
,
409
,
/* 150 */
410
,
411
,
412
,
413
,
414
,
415
,
417
,
418
,
419
,
420
,
/* 160 */
272
,
292
,
295
,
297
,
421
,
423
,
291
,
308
,
313
,
285
,
/* 170 */
424
,
427
,
425
,
428
,
431
,
289
,
430
,
432
,
433
,
434
,
/* 180 */
435
,
436
,
437
,
440
,
441
,
442
,
444
,
446
,
445
,
447
,
/* 190 */
449
,
452
,
453
,
455
,
448
,
450
,
454
,
457
,
458
,
460
,
/* 200 */
469
,
471
,
470
,
475
,
477
,
478
,
467
,
485
,
/* 0 */
-
160
,
10
,
-
161
,
-
206
,
-
202
,
-
197
,
-
157
,
-
63
,
-
81
,
-
112
,
/* 10 */
-
41
,
-
57
,
51
,
52
,
59
,
123
,
139
,
149
,
158
,
160
,
/* 20 */
171
,
115
,
-
195
,
-
62
,
-
240
,
-
235
,
-
227
,
-
114
,
3
,
114
,
/* 30 */
164
,
7
,
-
92
,
-
162
,
178
,
199
,
201
,
56
,
198
,
200
,
/* 40 */
213
,
216
,
191
,
167
,
-
251
,
-
239
,
-
210
,
17
,
45
,
196
,
/* 50 */
219
,
223
,
224
,
225
,
227
,
228
,
229
,
230
,
231
,
232
,
/* 60 */
234
,
235
,
236
,
237
,
238
,
239
,
257
,
258
,
259
,
262
,
/* 70 */
272
,
273
,
274
,
275
,
276
,
278
,
279
,
317
,
320
,
321
,
/* 80 */
251
,
323
,
324
,
325
,
281
,
282
,
329
,
333
,
338
,
339
,
/* 90 */
245
,
255
,
270
,
285
,
341
,
343
,
350
,
351
,
353
,
354
,
/* 100 */
358
,
359
,
360
,
361
,
362
,
363
,
365
,
366
,
367
,
368
,
/* 110 */
369
,
372
,
373
,
375
,
376
,
377
,
378
,
379
,
380
,
381
,
/* 120 */
383
,
384
,
385
,
386
,
387
,
389
,
390
,
391
,
392
,
393
,
/* 130 */
394
,
395
,
396
,
397
,
398
,
399
,
400
,
401
,
402
,
403
,
/* 140 */
405
,
406
,
407
,
408
,
409
,
410
,
411
,
412
,
413
,
414
,
/* 150 */
415
,
416
,
417
,
418
,
264
,
266
,
267
,
268
,
420
,
421
,
/* 160 */
271
,
283
,
286
,
289
,
284
,
292
,
294
,
296
,
424
,
287
,
/* 170 */
425
,
428
,
429
,
431
,
432
,
433
,
435
,
436
,
439
,
441
,
/* 180 */
440
,
442
,
444
,
447
,
448
,
450
,
443
,
445
,
446
,
449
,
/* 190 */
453
,
452
,
462
,
464
,
465
,
467
,
470
,
463
,
466
,
};
static
const
YYACTIONTYPE
yy_default
[]
=
{
/* 0 */
872
,
996
,
935
,
1006
,
922
,
932
,
1148
,
1148
,
1148
,
872
,
/* 10 */
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
/* 20 */
872
,
872
,
872
,
1055
,
892
,
1148
,
872
,
872
,
872
,
872
,
/* 30 */
872
,
872
,
872
,
1070
,
872
,
932
,
872
,
872
,
872
,
872
,
/* 40 */
942
,
932
,
942
,
942
,
872
,
1050
,
980
,
998
,
872
,
872
,
/* 50 */
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
/* 60 */
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
/* 70 */
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
/* 80 */
872
,
872
,
872
,
872
,
1057
,
1063
,
1060
,
872
,
872
,
872
,
/* 90 */
1065
,
872
,
872
,
872
,
1089
,
1089
,
1048
,
872
,
872
,
872
,
/* 100 */
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
/* 110 */
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
/* 120 */
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
/* 130 */
920
,
872
,
918
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
/* 140 */
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
903
,
/* 150 */
872
,
872
,
872
,
872
,
872
,
872
,
890
,
894
,
894
,
894
,
/* 160 */
872
,
872
,
872
,
872
,
894
,
894
,
1096
,
1100
,
1082
,
1094
,
/* 170 */
1090
,
1077
,
1075
,
1073
,
1081
,
1104
,
894
,
894
,
894
,
940
,
/* 180 */
940
,
936
,
932
,
932
,
894
,
894
,
958
,
956
,
954
,
946
,
/* 190 */
952
,
948
,
950
,
944
,
923
,
872
,
894
,
894
,
930
,
930
,
/* 200 */
894
,
930
,
894
,
930
,
894
,
894
,
980
,
998
,
872
,
1105
,
/* 210 */
1095
,
872
,
1147
,
1135
,
1134
,
872
,
1143
,
1142
,
1141
,
1133
,
/* 220 */
1132
,
1131
,
872
,
872
,
1127
,
1130
,
1129
,
1128
,
872
,
872
,
/* 230 */
872
,
872
,
1137
,
1136
,
872
,
872
,
872
,
872
,
872
,
872
,
/* 240 */
872
,
872
,
872
,
872
,
1101
,
1097
,
872
,
872
,
872
,
872
,
/* 250 */
872
,
872
,
872
,
872
,
872
,
1107
,
872
,
872
,
872
,
872
,
/* 260 */
872
,
872
,
872
,
872
,
872
,
1008
,
872
,
872
,
872
,
872
,
/* 270 */
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
1047
,
872
,
/* 280 */
872
,
872
,
872
,
1059
,
1058
,
872
,
872
,
872
,
872
,
872
,
/* 290 */
872
,
872
,
872
,
872
,
872
,
872
,
1091
,
872
,
1083
,
872
,
/* 300 */
872
,
1020
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
/* 310 */
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
/* 320 */
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
/* 330 */
872
,
872
,
872
,
1166
,
1161
,
1162
,
1159
,
872
,
872
,
872
,
/* 340 */
1158
,
1153
,
1154
,
872
,
872
,
872
,
1151
,
872
,
872
,
872
,
/* 350 */
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
872
,
/* 360 */
872
,
872
,
964
,
872
,
901
,
899
,
872
,
872
,
/* 0 */
852
,
914
,
902
,
911
,
1121
,
1121
,
1121
,
852
,
852
,
852
,
/* 10 */
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
/* 20 */
852
,
1028
,
872
,
1121
,
852
,
852
,
852
,
852
,
852
,
852
,
/* 30 */
852
,
1043
,
852
,
911
,
852
,
852
,
852
,
852
,
920
,
911
,
/* 40 */
920
,
920
,
852
,
1023
,
852
,
852
,
852
,
852
,
852
,
852
,
/* 50 */
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
/* 60 */
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
/* 70 */
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
/* 80 */
1030
,
1036
,
1033
,
852
,
852
,
852
,
1038
,
852
,
852
,
852
,
/* 90 */
1062
,
1062
,
1021
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
/* 100 */
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
/* 110 */
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
/* 120 */
852
,
852
,
852
,
852
,
900
,
852
,
898
,
852
,
852
,
852
,
/* 130 */
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
/* 140 */
852
,
852
,
852
,
883
,
852
,
852
,
852
,
852
,
852
,
852
,
/* 150 */
870
,
874
,
874
,
874
,
852
,
852
,
852
,
852
,
874
,
874
,
/* 160 */
1069
,
1073
,
1055
,
1067
,
1063
,
1050
,
1048
,
1046
,
1054
,
1077
,
/* 170 */
874
,
874
,
874
,
918
,
918
,
911
,
874
,
874
,
936
,
934
,
/* 180 */
932
,
924
,
930
,
926
,
928
,
922
,
852
,
874
,
874
,
909
,
/* 190 */
909
,
874
,
909
,
874
,
909
,
874
,
874
,
957
,
973
,
852
,
/* 200 */
1078
,
1068
,
852
,
1120
,
1108
,
1107
,
1116
,
1115
,
1114
,
1106
,
/* 210 */
1105
,
1104
,
852
,
852
,
852
,
1100
,
1103
,
1102
,
1101
,
852
,
/* 220 */
852
,
852
,
852
,
1110
,
1109
,
852
,
852
,
852
,
852
,
852
,
/* 230 */
852
,
852
,
852
,
852
,
852
,
1074
,
1070
,
852
,
852
,
852
,
/* 240 */
852
,
852
,
852
,
852
,
852
,
852
,
1080
,
852
,
852
,
852
,
/* 250 */
852
,
852
,
852
,
852
,
852
,
852
,
981
,
852
,
852
,
852
,
/* 260 */
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
1020
,
/* 270 */
852
,
852
,
852
,
852
,
1032
,
1031
,
852
,
852
,
852
,
852
,
/* 280 */
852
,
852
,
852
,
852
,
852
,
852
,
852
,
1064
,
852
,
1056
,
/* 290 */
852
,
852
,
993
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
/* 300 */
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
/* 310 */
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
/* 320 */
852
,
852
,
852
,
852
,
1139
,
1134
,
1135
,
1132
,
852
,
852
,
/* 330 */
852
,
1131
,
1126
,
1127
,
852
,
852
,
852
,
1124
,
852
,
852
,
/* 340 */
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
852
,
/* 350 */
852
,
852
,
942
,
852
,
881
,
879
,
852
,
852
,
};
/********** End of lemon-generated parsing tables *****************************/
...
...
@@ -627,7 +621,6 @@ static const YYCODETYPE yyFallback[] = {
0
,
/* PRECISION => nothing */
0
,
/* UPDATE => nothing */
0
,
/* CACHELAST => nothing */
0
,
/* PARTITIONS => nothing */
0
,
/* UNSIGNED => nothing */
0
,
/* TAGS => nothing */
0
,
/* USING => nothing */
...
...
@@ -910,170 +903,166 @@ static const char *const yyTokenName[] = {
/* 112 */
"PRECISION"
,
/* 113 */
"UPDATE"
,
/* 114 */
"CACHELAST"
,
/* 115 */
"PARTITIONS"
,
/* 116 */
"UNSIGNED"
,
/* 117 */
"TAGS"
,
/* 118 */
"USING"
,
/* 119 */
"NULL"
,
/* 120 */
"NOW"
,
/* 121 */
"SELECT"
,
/* 122 */
"UNION"
,
/* 123 */
"ALL"
,
/* 124 */
"DISTINCT"
,
/* 125 */
"FROM"
,
/* 126 */
"VARIABLE"
,
/* 127 */
"INTERVAL"
,
/* 128 */
"EVERY"
,
/* 129 */
"SESSION"
,
/* 130 */
"STATE_WINDOW"
,
/* 131 */
"FILL"
,
/* 132 */
"SLIDING"
,
/* 133 */
"ORDER"
,
/* 134 */
"BY"
,
/* 135 */
"ASC"
,
/* 136 */
"GROUP"
,
/* 137 */
"HAVING"
,
/* 138 */
"LIMIT"
,
/* 139 */
"OFFSET"
,
/* 140 */
"SLIMIT"
,
/* 141 */
"SOFFSET"
,
/* 142 */
"WHERE"
,
/* 143 */
"RESET"
,
/* 144 */
"QUERY"
,
/* 145 */
"SYNCDB"
,
/* 146 */
"ADD"
,
/* 147 */
"COLUMN"
,
/* 148 */
"MODIFY"
,
/* 149 */
"TAG"
,
/* 150 */
"CHANGE"
,
/* 151 */
"SET"
,
/* 152 */
"KILL"
,
/* 153 */
"CONNECTION"
,
/* 154 */
"STREAM"
,
/* 155 */
"COLON"
,
/* 156 */
"ABORT"
,
/* 157 */
"AFTER"
,
/* 158 */
"ATTACH"
,
/* 159 */
"BEFORE"
,
/* 160 */
"BEGIN"
,
/* 161 */
"CASCADE"
,
/* 162 */
"CLUSTER"
,
/* 163 */
"CONFLICT"
,
/* 164 */
"COPY"
,
/* 165 */
"DEFERRED"
,
/* 166 */
"DELIMITERS"
,
/* 167 */
"DETACH"
,
/* 168 */
"EACH"
,
/* 169 */
"END"
,
/* 170 */
"EXPLAIN"
,
/* 171 */
"FAIL"
,
/* 172 */
"FOR"
,
/* 173 */
"IGNORE"
,
/* 174 */
"IMMEDIATE"
,
/* 175 */
"INITIALLY"
,
/* 176 */
"INSTEAD"
,
/* 177 */
"KEY"
,
/* 178 */
"OF"
,
/* 179 */
"RAISE"
,
/* 180 */
"REPLACE"
,
/* 181 */
"RESTRICT"
,
/* 182 */
"ROW"
,
/* 183 */
"STATEMENT"
,
/* 184 */
"TRIGGER"
,
/* 185 */
"VIEW"
,
/* 186 */
"IPTOKEN"
,
/* 187 */
"SEMI"
,
/* 188 */
"NONE"
,
/* 189 */
"PREV"
,
/* 190 */
"LINEAR"
,
/* 191 */
"IMPORT"
,
/* 192 */
"TBNAME"
,
/* 193 */
"JOIN"
,
/* 194 */
"INSERT"
,
/* 195 */
"INTO"
,
/* 196 */
"VALUES"
,
/* 197 */
"error"
,
/* 198 */
"program"
,
/* 199 */
"cmd"
,
/* 200 */
"ids"
,
/* 201 */
"dbPrefix"
,
/* 202 */
"cpxName"
,
/* 203 */
"ifexists"
,
/* 204 */
"alter_db_optr"
,
/* 205 */
"alter_topic_optr"
,
/* 206 */
"acct_optr"
,
/* 207 */
"exprlist"
,
/* 208 */
"ifnotexists"
,
/* 209 */
"db_optr"
,
/* 210 */
"topic_optr"
,
/* 211 */
"typename"
,
/* 212 */
"bufsize"
,
/* 213 */
"pps"
,
/* 214 */
"tseries"
,
/* 215 */
"dbs"
,
/* 216 */
"streams"
,
/* 217 */
"storage"
,
/* 218 */
"qtime"
,
/* 219 */
"users"
,
/* 220 */
"conns"
,
/* 221 */
"state"
,
/* 222 */
"intitemlist"
,
/* 223 */
"intitem"
,
/* 224 */
"keep"
,
/* 225 */
"cache"
,
/* 226 */
"replica"
,
/* 227 */
"quorum"
,
/* 228 */
"days"
,
/* 229 */
"minrows"
,
/* 230 */
"maxrows"
,
/* 231 */
"blocks"
,
/* 232 */
"ctime"
,
/* 233 */
"wal"
,
/* 234 */
"fsync"
,
/* 235 */
"comp"
,
/* 236 */
"prec"
,
/* 237 */
"update"
,
/* 238 */
"cachelast"
,
/* 239 */
"partitions"
,
/* 240 */
"signed"
,
/* 241 */
"create_table_args"
,
/* 242 */
"create_stable_args"
,
/* 243 */
"create_table_list"
,
/* 244 */
"create_from_stable"
,
/* 245 */
"columnlist"
,
/* 246 */
"tagitemlist"
,
/* 247 */
"tagNamelist"
,
/* 248 */
"select"
,
/* 249 */
"column"
,
/* 250 */
"tagitem"
,
/* 251 */
"selcollist"
,
/* 252 */
"from"
,
/* 253 */
"where_opt"
,
/* 254 */
"interval_option"
,
/* 255 */
"sliding_opt"
,
/* 256 */
"session_option"
,
/* 257 */
"windowstate_option"
,
/* 258 */
"fill_opt"
,
/* 259 */
"groupby_opt"
,
/* 260 */
"having_opt"
,
/* 261 */
"orderby_opt"
,
/* 262 */
"slimit_opt"
,
/* 263 */
"limit_opt"
,
/* 264 */
"union"
,
/* 265 */
"sclp"
,
/* 266 */
"distinct"
,
/* 267 */
"expr"
,
/* 268 */
"as"
,
/* 269 */
"tablelist"
,
/* 270 */
"sub"
,
/* 271 */
"tmvar"
,
/* 272 */
"intervalKey"
,
/* 273 */
"sortlist"
,
/* 274 */
"sortitem"
,
/* 275 */
"item"
,
/* 276 */
"sortorder"
,
/* 277 */
"grouplist"
,
/* 278 */
"expritem"
,
/* 115 */
"UNSIGNED"
,
/* 116 */
"TAGS"
,
/* 117 */
"USING"
,
/* 118 */
"NULL"
,
/* 119 */
"NOW"
,
/* 120 */
"SELECT"
,
/* 121 */
"UNION"
,
/* 122 */
"ALL"
,
/* 123 */
"DISTINCT"
,
/* 124 */
"FROM"
,
/* 125 */
"VARIABLE"
,
/* 126 */
"INTERVAL"
,
/* 127 */
"EVERY"
,
/* 128 */
"SESSION"
,
/* 129 */
"STATE_WINDOW"
,
/* 130 */
"FILL"
,
/* 131 */
"SLIDING"
,
/* 132 */
"ORDER"
,
/* 133 */
"BY"
,
/* 134 */
"ASC"
,
/* 135 */
"GROUP"
,
/* 136 */
"HAVING"
,
/* 137 */
"LIMIT"
,
/* 138 */
"OFFSET"
,
/* 139 */
"SLIMIT"
,
/* 140 */
"SOFFSET"
,
/* 141 */
"WHERE"
,
/* 142 */
"RESET"
,
/* 143 */
"QUERY"
,
/* 144 */
"SYNCDB"
,
/* 145 */
"ADD"
,
/* 146 */
"COLUMN"
,
/* 147 */
"MODIFY"
,
/* 148 */
"TAG"
,
/* 149 */
"CHANGE"
,
/* 150 */
"SET"
,
/* 151 */
"KILL"
,
/* 152 */
"CONNECTION"
,
/* 153 */
"STREAM"
,
/* 154 */
"COLON"
,
/* 155 */
"ABORT"
,
/* 156 */
"AFTER"
,
/* 157 */
"ATTACH"
,
/* 158 */
"BEFORE"
,
/* 159 */
"BEGIN"
,
/* 160 */
"CASCADE"
,
/* 161 */
"CLUSTER"
,
/* 162 */
"CONFLICT"
,
/* 163 */
"COPY"
,
/* 164 */
"DEFERRED"
,
/* 165 */
"DELIMITERS"
,
/* 166 */
"DETACH"
,
/* 167 */
"EACH"
,
/* 168 */
"END"
,
/* 169 */
"EXPLAIN"
,
/* 170 */
"FAIL"
,
/* 171 */
"FOR"
,
/* 172 */
"IGNORE"
,
/* 173 */
"IMMEDIATE"
,
/* 174 */
"INITIALLY"
,
/* 175 */
"INSTEAD"
,
/* 176 */
"KEY"
,
/* 177 */
"OF"
,
/* 178 */
"RAISE"
,
/* 179 */
"REPLACE"
,
/* 180 */
"RESTRICT"
,
/* 181 */
"ROW"
,
/* 182 */
"STATEMENT"
,
/* 183 */
"TRIGGER"
,
/* 184 */
"VIEW"
,
/* 185 */
"IPTOKEN"
,
/* 186 */
"SEMI"
,
/* 187 */
"NONE"
,
/* 188 */
"PREV"
,
/* 189 */
"LINEAR"
,
/* 190 */
"IMPORT"
,
/* 191 */
"TBNAME"
,
/* 192 */
"JOIN"
,
/* 193 */
"INSERT"
,
/* 194 */
"INTO"
,
/* 195 */
"VALUES"
,
/* 196 */
"error"
,
/* 197 */
"program"
,
/* 198 */
"cmd"
,
/* 199 */
"ids"
,
/* 200 */
"dbPrefix"
,
/* 201 */
"cpxName"
,
/* 202 */
"ifexists"
,
/* 203 */
"alter_db_optr"
,
/* 204 */
"acct_optr"
,
/* 205 */
"exprlist"
,
/* 206 */
"ifnotexists"
,
/* 207 */
"db_optr"
,
/* 208 */
"typename"
,
/* 209 */
"bufsize"
,
/* 210 */
"pps"
,
/* 211 */
"tseries"
,
/* 212 */
"dbs"
,
/* 213 */
"streams"
,
/* 214 */
"storage"
,
/* 215 */
"qtime"
,
/* 216 */
"users"
,
/* 217 */
"conns"
,
/* 218 */
"state"
,
/* 219 */
"intitemlist"
,
/* 220 */
"intitem"
,
/* 221 */
"keep"
,
/* 222 */
"cache"
,
/* 223 */
"replica"
,
/* 224 */
"quorum"
,
/* 225 */
"days"
,
/* 226 */
"minrows"
,
/* 227 */
"maxrows"
,
/* 228 */
"blocks"
,
/* 229 */
"ctime"
,
/* 230 */
"wal"
,
/* 231 */
"fsync"
,
/* 232 */
"comp"
,
/* 233 */
"prec"
,
/* 234 */
"update"
,
/* 235 */
"cachelast"
,
/* 236 */
"signed"
,
/* 237 */
"create_table_args"
,
/* 238 */
"create_stable_args"
,
/* 239 */
"create_table_list"
,
/* 240 */
"create_from_stable"
,
/* 241 */
"columnlist"
,
/* 242 */
"tagitemlist"
,
/* 243 */
"tagNamelist"
,
/* 244 */
"select"
,
/* 245 */
"column"
,
/* 246 */
"tagitem"
,
/* 247 */
"selcollist"
,
/* 248 */
"from"
,
/* 249 */
"where_opt"
,
/* 250 */
"interval_option"
,
/* 251 */
"sliding_opt"
,
/* 252 */
"session_option"
,
/* 253 */
"windowstate_option"
,
/* 254 */
"fill_opt"
,
/* 255 */
"groupby_opt"
,
/* 256 */
"having_opt"
,
/* 257 */
"orderby_opt"
,
/* 258 */
"slimit_opt"
,
/* 259 */
"limit_opt"
,
/* 260 */
"union"
,
/* 261 */
"sclp"
,
/* 262 */
"distinct"
,
/* 263 */
"expr"
,
/* 264 */
"as"
,
/* 265 */
"tablelist"
,
/* 266 */
"sub"
,
/* 267 */
"tmvar"
,
/* 268 */
"intervalKey"
,
/* 269 */
"sortlist"
,
/* 270 */
"sortitem"
,
/* 271 */
"item"
,
/* 272 */
"sortorder"
,
/* 273 */
"grouplist"
,
/* 274 */
"expritem"
,
};
#endif
/* defined(YYCOVERAGE) || !defined(NDEBUG) */
...
...
@@ -1129,253 +1118,246 @@ static const char *const yyRuleName[] = {
/* 45 */
"cmd ::= ALTER LOCAL ids"
,
/* 46 */
"cmd ::= ALTER LOCAL ids ids"
,
/* 47 */
"cmd ::= ALTER DATABASE ids alter_db_optr"
,
/* 48 */
"cmd ::= ALTER TOPIC ids alter_topic_optr"
,
/* 49 */
"cmd ::= ALTER ACCOUNT ids acct_optr"
,
/* 50 */
"cmd ::= ALTER ACCOUNT ids PASS ids acct_optr"
,
/* 51 */
"cmd ::= COMPACT VNODES IN LP exprlist RP"
,
/* 52 */
"ids ::= ID"
,
/* 53 */
"ids ::= STRING"
,
/* 54 */
"ifexists ::= IF EXISTS"
,
/* 55 */
"ifexists ::="
,
/* 56 */
"ifnotexists ::= IF NOT EXISTS"
,
/* 57 */
"ifnotexists ::="
,
/* 58 */
"cmd ::= CREATE DNODE ids"
,
/* 59 */
"cmd ::= CREATE ACCOUNT ids PASS ids acct_optr"
,
/* 60 */
"cmd ::= CREATE DATABASE ifnotexists ids db_optr"
,
/* 61 */
"cmd ::= CREATE TOPIC ifnotexists ids topic_optr"
,
/* 62 */
"cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize"
,
/* 63 */
"cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize"
,
/* 64 */
"cmd ::= CREATE USER ids PASS ids"
,
/* 65 */
"bufsize ::="
,
/* 66 */
"bufsize ::= BUFSIZE INTEGER"
,
/* 67 */
"pps ::="
,
/* 68 */
"pps ::= PPS INTEGER"
,
/* 69 */
"tseries ::="
,
/* 70 */
"tseries ::= TSERIES INTEGER"
,
/* 71 */
"dbs ::="
,
/* 72 */
"dbs ::= DBS INTEGER"
,
/* 73 */
"streams ::="
,
/* 74 */
"streams ::= STREAMS INTEGER"
,
/* 75 */
"storage ::="
,
/* 76 */
"storage ::= STORAGE INTEGER"
,
/* 77 */
"qtime ::="
,
/* 78 */
"qtime ::= QTIME INTEGER"
,
/* 79 */
"users ::="
,
/* 80 */
"users ::= USERS INTEGER"
,
/* 81 */
"conns ::="
,
/* 82 */
"conns ::= CONNS INTEGER"
,
/* 83 */
"state ::="
,
/* 84 */
"state ::= STATE ids"
,
/* 85 */
"acct_optr ::= pps tseries storage streams qtime dbs users conns state"
,
/* 86 */
"intitemlist ::= intitemlist COMMA intitem"
,
/* 87 */
"intitemlist ::= intitem"
,
/* 88 */
"intitem ::= INTEGER"
,
/* 89 */
"keep ::= KEEP intitemlist"
,
/* 90 */
"cache ::= CACHE INTEGER"
,
/* 91 */
"replica ::= REPLICA INTEGER"
,
/* 92 */
"quorum ::= QUORUM INTEGER"
,
/* 93 */
"days ::= DAYS INTEGER"
,
/* 94 */
"minrows ::= MINROWS INTEGER"
,
/* 95 */
"maxrows ::= MAXROWS INTEGER"
,
/* 96 */
"blocks ::= BLOCKS INTEGER"
,
/* 97 */
"ctime ::= CTIME INTEGER"
,
/* 98 */
"wal ::= WAL INTEGER"
,
/* 99 */
"fsync ::= FSYNC INTEGER"
,
/* 100 */
"comp ::= COMP INTEGER"
,
/* 101 */
"prec ::= PRECISION STRING"
,
/* 102 */
"update ::= UPDATE INTEGER"
,
/* 103 */
"cachelast ::= CACHELAST INTEGER"
,
/* 104 */
"partitions ::= PARTITIONS INTEGER"
,
/* 105 */
"db_optr ::="
,
/* 106 */
"db_optr ::= db_optr cache"
,
/* 107 */
"db_optr ::= db_optr replica"
,
/* 108 */
"db_optr ::= db_optr quorum"
,
/* 109 */
"db_optr ::= db_optr days"
,
/* 110 */
"db_optr ::= db_optr minrows"
,
/* 111 */
"db_optr ::= db_optr maxrows"
,
/* 112 */
"db_optr ::= db_optr blocks"
,
/* 113 */
"db_optr ::= db_optr ctime"
,
/* 114 */
"db_optr ::= db_optr wal"
,
/* 115 */
"db_optr ::= db_optr fsync"
,
/* 116 */
"db_optr ::= db_optr comp"
,
/* 117 */
"db_optr ::= db_optr prec"
,
/* 118 */
"db_optr ::= db_optr keep"
,
/* 119 */
"db_optr ::= db_optr update"
,
/* 120 */
"db_optr ::= db_optr cachelast"
,
/* 121 */
"topic_optr ::= db_optr"
,
/* 122 */
"topic_optr ::= topic_optr partitions"
,
/* 123 */
"alter_db_optr ::="
,
/* 124 */
"alter_db_optr ::= alter_db_optr replica"
,
/* 125 */
"alter_db_optr ::= alter_db_optr quorum"
,
/* 126 */
"alter_db_optr ::= alter_db_optr keep"
,
/* 127 */
"alter_db_optr ::= alter_db_optr blocks"
,
/* 128 */
"alter_db_optr ::= alter_db_optr comp"
,
/* 129 */
"alter_db_optr ::= alter_db_optr update"
,
/* 130 */
"alter_db_optr ::= alter_db_optr cachelast"
,
/* 131 */
"alter_topic_optr ::= alter_db_optr"
,
/* 132 */
"alter_topic_optr ::= alter_topic_optr partitions"
,
/* 133 */
"typename ::= ids"
,
/* 134 */
"typename ::= ids LP signed RP"
,
/* 135 */
"typename ::= ids UNSIGNED"
,
/* 136 */
"signed ::= INTEGER"
,
/* 137 */
"signed ::= PLUS INTEGER"
,
/* 138 */
"signed ::= MINUS INTEGER"
,
/* 139 */
"cmd ::= CREATE TABLE create_table_args"
,
/* 140 */
"cmd ::= CREATE TABLE create_stable_args"
,
/* 141 */
"cmd ::= CREATE STABLE create_stable_args"
,
/* 142 */
"cmd ::= CREATE TABLE create_table_list"
,
/* 143 */
"create_table_list ::= create_from_stable"
,
/* 144 */
"create_table_list ::= create_table_list create_from_stable"
,
/* 145 */
"create_table_args ::= ifnotexists ids cpxName LP columnlist RP"
,
/* 146 */
"create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP"
,
/* 147 */
"create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP"
,
/* 148 */
"create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP"
,
/* 149 */
"tagNamelist ::= tagNamelist COMMA ids"
,
/* 150 */
"tagNamelist ::= ids"
,
/* 151 */
"create_table_args ::= ifnotexists ids cpxName AS select"
,
/* 152 */
"columnlist ::= columnlist COMMA column"
,
/* 153 */
"columnlist ::= column"
,
/* 154 */
"column ::= ids typename"
,
/* 155 */
"tagitemlist ::= tagitemlist COMMA tagitem"
,
/* 156 */
"tagitemlist ::= tagitem"
,
/* 157 */
"tagitem ::= INTEGER"
,
/* 158 */
"tagitem ::= FLOAT"
,
/* 159 */
"tagitem ::= STRING"
,
/* 160 */
"tagitem ::= BOOL"
,
/* 161 */
"tagitem ::= NULL"
,
/* 162 */
"tagitem ::= NOW"
,
/* 163 */
"tagitem ::= MINUS INTEGER"
,
/* 164 */
"tagitem ::= MINUS FLOAT"
,
/* 165 */
"tagitem ::= PLUS INTEGER"
,
/* 166 */
"tagitem ::= PLUS FLOAT"
,
/* 167 */
"select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt"
,
/* 168 */
"select ::= LP select RP"
,
/* 169 */
"union ::= select"
,
/* 170 */
"union ::= union UNION ALL select"
,
/* 171 */
"union ::= union UNION select"
,
/* 172 */
"cmd ::= union"
,
/* 173 */
"select ::= SELECT selcollist"
,
/* 174 */
"sclp ::= selcollist COMMA"
,
/* 175 */
"sclp ::="
,
/* 176 */
"selcollist ::= sclp distinct expr as"
,
/* 177 */
"selcollist ::= sclp STAR"
,
/* 178 */
"as ::= AS ids"
,
/* 179 */
"as ::= ids"
,
/* 180 */
"as ::="
,
/* 181 */
"distinct ::= DISTINCT"
,
/* 182 */
"distinct ::="
,
/* 183 */
"from ::= FROM tablelist"
,
/* 184 */
"from ::= FROM sub"
,
/* 185 */
"sub ::= LP union RP"
,
/* 186 */
"sub ::= LP union RP ids"
,
/* 187 */
"sub ::= sub COMMA LP union RP ids"
,
/* 188 */
"tablelist ::= ids cpxName"
,
/* 189 */
"tablelist ::= ids cpxName ids"
,
/* 190 */
"tablelist ::= tablelist COMMA ids cpxName"
,
/* 191 */
"tablelist ::= tablelist COMMA ids cpxName ids"
,
/* 192 */
"tmvar ::= VARIABLE"
,
/* 193 */
"interval_option ::= intervalKey LP tmvar RP"
,
/* 194 */
"interval_option ::= intervalKey LP tmvar COMMA tmvar RP"
,
/* 195 */
"interval_option ::="
,
/* 196 */
"intervalKey ::= INTERVAL"
,
/* 197 */
"intervalKey ::= EVERY"
,
/* 198 */
"session_option ::="
,
/* 199 */
"session_option ::= SESSION LP ids cpxName COMMA tmvar RP"
,
/* 200 */
"windowstate_option ::="
,
/* 201 */
"windowstate_option ::= STATE_WINDOW LP ids RP"
,
/* 202 */
"fill_opt ::="
,
/* 203 */
"fill_opt ::= FILL LP ID COMMA tagitemlist RP"
,
/* 204 */
"fill_opt ::= FILL LP ID RP"
,
/* 205 */
"sliding_opt ::= SLIDING LP tmvar RP"
,
/* 206 */
"sliding_opt ::="
,
/* 207 */
"orderby_opt ::="
,
/* 208 */
"orderby_opt ::= ORDER BY sortlist"
,
/* 209 */
"sortlist ::= sortlist COMMA item sortorder"
,
/* 210 */
"sortlist ::= item sortorder"
,
/* 211 */
"item ::= ids cpxName"
,
/* 212 */
"sortorder ::= ASC"
,
/* 213 */
"sortorder ::= DESC"
,
/* 214 */
"sortorder ::="
,
/* 215 */
"groupby_opt ::="
,
/* 216 */
"groupby_opt ::= GROUP BY grouplist"
,
/* 217 */
"grouplist ::= grouplist COMMA item"
,
/* 218 */
"grouplist ::= item"
,
/* 219 */
"having_opt ::="
,
/* 220 */
"having_opt ::= HAVING expr"
,
/* 221 */
"limit_opt ::="
,
/* 222 */
"limit_opt ::= LIMIT signed"
,
/* 223 */
"limit_opt ::= LIMIT signed OFFSET signed"
,
/* 224 */
"limit_opt ::= LIMIT signed COMMA signed"
,
/* 225 */
"slimit_opt ::="
,
/* 226 */
"slimit_opt ::= SLIMIT signed"
,
/* 227 */
"slimit_opt ::= SLIMIT signed SOFFSET signed"
,
/* 228 */
"slimit_opt ::= SLIMIT signed COMMA signed"
,
/* 229 */
"where_opt ::="
,
/* 230 */
"where_opt ::= WHERE expr"
,
/* 231 */
"expr ::= LP expr RP"
,
/* 232 */
"expr ::= ID"
,
/* 233 */
"expr ::= ID DOT ID"
,
/* 234 */
"expr ::= ID DOT STAR"
,
/* 235 */
"expr ::= INTEGER"
,
/* 236 */
"expr ::= MINUS INTEGER"
,
/* 237 */
"expr ::= PLUS INTEGER"
,
/* 238 */
"expr ::= FLOAT"
,
/* 239 */
"expr ::= MINUS FLOAT"
,
/* 240 */
"expr ::= PLUS FLOAT"
,
/* 241 */
"expr ::= STRING"
,
/* 242 */
"expr ::= NOW"
,
/* 243 */
"expr ::= VARIABLE"
,
/* 244 */
"expr ::= PLUS VARIABLE"
,
/* 245 */
"expr ::= MINUS VARIABLE"
,
/* 246 */
"expr ::= BOOL"
,
/* 247 */
"expr ::= NULL"
,
/* 248 */
"expr ::= ID LP exprlist RP"
,
/* 249 */
"expr ::= ID LP STAR RP"
,
/* 250 */
"expr ::= expr IS NULL"
,
/* 251 */
"expr ::= expr IS NOT NULL"
,
/* 252 */
"expr ::= expr LT expr"
,
/* 253 */
"expr ::= expr GT expr"
,
/* 254 */
"expr ::= expr LE expr"
,
/* 255 */
"expr ::= expr GE expr"
,
/* 256 */
"expr ::= expr NE expr"
,
/* 257 */
"expr ::= expr EQ expr"
,
/* 258 */
"expr ::= expr BETWEEN expr AND expr"
,
/* 259 */
"expr ::= expr AND expr"
,
/* 260 */
"expr ::= expr OR expr"
,
/* 261 */
"expr ::= expr PLUS expr"
,
/* 262 */
"expr ::= expr MINUS expr"
,
/* 263 */
"expr ::= expr STAR expr"
,
/* 264 */
"expr ::= expr SLASH expr"
,
/* 265 */
"expr ::= expr REM expr"
,
/* 266 */
"expr ::= expr LIKE expr"
,
/* 267 */
"expr ::= expr MATCH expr"
,
/* 268 */
"expr ::= expr NMATCH expr"
,
/* 269 */
"expr ::= expr IN LP exprlist RP"
,
/* 270 */
"exprlist ::= exprlist COMMA expritem"
,
/* 271 */
"exprlist ::= expritem"
,
/* 272 */
"expritem ::= expr"
,
/* 273 */
"expritem ::="
,
/* 274 */
"cmd ::= RESET QUERY CACHE"
,
/* 275 */
"cmd ::= SYNCDB ids REPLICA"
,
/* 276 */
"cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist"
,
/* 277 */
"cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids"
,
/* 278 */
"cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist"
,
/* 279 */
"cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist"
,
/* 280 */
"cmd ::= ALTER TABLE ids cpxName DROP TAG ids"
,
/* 281 */
"cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids"
,
/* 282 */
"cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 283 */
"cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist"
,
/* 284 */
"cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist"
,
/* 285 */
"cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids"
,
/* 286 */
"cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist"
,
/* 287 */
"cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist"
,
/* 288 */
"cmd ::= ALTER STABLE ids cpxName DROP TAG ids"
,
/* 289 */
"cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids"
,
/* 290 */
"cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 291 */
"cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist"
,
/* 292 */
"cmd ::= KILL CONNECTION INTEGER"
,
/* 293 */
"cmd ::= KILL STREAM INTEGER COLON INTEGER"
,
/* 294 */
"cmd ::= KILL QUERY INTEGER COLON INTEGER"
,
/* 48 */
"cmd ::= ALTER ACCOUNT ids acct_optr"
,
/* 49 */
"cmd ::= ALTER ACCOUNT ids PASS ids acct_optr"
,
/* 50 */
"cmd ::= COMPACT VNODES IN LP exprlist RP"
,
/* 51 */
"ids ::= ID"
,
/* 52 */
"ids ::= STRING"
,
/* 53 */
"ifexists ::= IF EXISTS"
,
/* 54 */
"ifexists ::="
,
/* 55 */
"ifnotexists ::= IF NOT EXISTS"
,
/* 56 */
"ifnotexists ::="
,
/* 57 */
"cmd ::= CREATE DNODE ids"
,
/* 58 */
"cmd ::= CREATE ACCOUNT ids PASS ids acct_optr"
,
/* 59 */
"cmd ::= CREATE DATABASE ifnotexists ids db_optr"
,
/* 60 */
"cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize"
,
/* 61 */
"cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize"
,
/* 62 */
"cmd ::= CREATE USER ids PASS ids"
,
/* 63 */
"bufsize ::="
,
/* 64 */
"bufsize ::= BUFSIZE INTEGER"
,
/* 65 */
"pps ::="
,
/* 66 */
"pps ::= PPS INTEGER"
,
/* 67 */
"tseries ::="
,
/* 68 */
"tseries ::= TSERIES INTEGER"
,
/* 69 */
"dbs ::="
,
/* 70 */
"dbs ::= DBS INTEGER"
,
/* 71 */
"streams ::="
,
/* 72 */
"streams ::= STREAMS INTEGER"
,
/* 73 */
"storage ::="
,
/* 74 */
"storage ::= STORAGE INTEGER"
,
/* 75 */
"qtime ::="
,
/* 76 */
"qtime ::= QTIME INTEGER"
,
/* 77 */
"users ::="
,
/* 78 */
"users ::= USERS INTEGER"
,
/* 79 */
"conns ::="
,
/* 80 */
"conns ::= CONNS INTEGER"
,
/* 81 */
"state ::="
,
/* 82 */
"state ::= STATE ids"
,
/* 83 */
"acct_optr ::= pps tseries storage streams qtime dbs users conns state"
,
/* 84 */
"intitemlist ::= intitemlist COMMA intitem"
,
/* 85 */
"intitemlist ::= intitem"
,
/* 86 */
"intitem ::= INTEGER"
,
/* 87 */
"keep ::= KEEP intitemlist"
,
/* 88 */
"cache ::= CACHE INTEGER"
,
/* 89 */
"replica ::= REPLICA INTEGER"
,
/* 90 */
"quorum ::= QUORUM INTEGER"
,
/* 91 */
"days ::= DAYS INTEGER"
,
/* 92 */
"minrows ::= MINROWS INTEGER"
,
/* 93 */
"maxrows ::= MAXROWS INTEGER"
,
/* 94 */
"blocks ::= BLOCKS INTEGER"
,
/* 95 */
"ctime ::= CTIME INTEGER"
,
/* 96 */
"wal ::= WAL INTEGER"
,
/* 97 */
"fsync ::= FSYNC INTEGER"
,
/* 98 */
"comp ::= COMP INTEGER"
,
/* 99 */
"prec ::= PRECISION STRING"
,
/* 100 */
"update ::= UPDATE INTEGER"
,
/* 101 */
"cachelast ::= CACHELAST INTEGER"
,
/* 102 */
"db_optr ::="
,
/* 103 */
"db_optr ::= db_optr cache"
,
/* 104 */
"db_optr ::= db_optr replica"
,
/* 105 */
"db_optr ::= db_optr quorum"
,
/* 106 */
"db_optr ::= db_optr days"
,
/* 107 */
"db_optr ::= db_optr minrows"
,
/* 108 */
"db_optr ::= db_optr maxrows"
,
/* 109 */
"db_optr ::= db_optr blocks"
,
/* 110 */
"db_optr ::= db_optr ctime"
,
/* 111 */
"db_optr ::= db_optr wal"
,
/* 112 */
"db_optr ::= db_optr fsync"
,
/* 113 */
"db_optr ::= db_optr comp"
,
/* 114 */
"db_optr ::= db_optr prec"
,
/* 115 */
"db_optr ::= db_optr keep"
,
/* 116 */
"db_optr ::= db_optr update"
,
/* 117 */
"db_optr ::= db_optr cachelast"
,
/* 118 */
"alter_db_optr ::="
,
/* 119 */
"alter_db_optr ::= alter_db_optr replica"
,
/* 120 */
"alter_db_optr ::= alter_db_optr quorum"
,
/* 121 */
"alter_db_optr ::= alter_db_optr keep"
,
/* 122 */
"alter_db_optr ::= alter_db_optr blocks"
,
/* 123 */
"alter_db_optr ::= alter_db_optr comp"
,
/* 124 */
"alter_db_optr ::= alter_db_optr update"
,
/* 125 */
"alter_db_optr ::= alter_db_optr cachelast"
,
/* 126 */
"typename ::= ids"
,
/* 127 */
"typename ::= ids LP signed RP"
,
/* 128 */
"typename ::= ids UNSIGNED"
,
/* 129 */
"signed ::= INTEGER"
,
/* 130 */
"signed ::= PLUS INTEGER"
,
/* 131 */
"signed ::= MINUS INTEGER"
,
/* 132 */
"cmd ::= CREATE TABLE create_table_args"
,
/* 133 */
"cmd ::= CREATE TABLE create_stable_args"
,
/* 134 */
"cmd ::= CREATE STABLE create_stable_args"
,
/* 135 */
"cmd ::= CREATE TABLE create_table_list"
,
/* 136 */
"create_table_list ::= create_from_stable"
,
/* 137 */
"create_table_list ::= create_table_list create_from_stable"
,
/* 138 */
"create_table_args ::= ifnotexists ids cpxName LP columnlist RP"
,
/* 139 */
"create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP"
,
/* 140 */
"create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP"
,
/* 141 */
"create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP"
,
/* 142 */
"tagNamelist ::= tagNamelist COMMA ids"
,
/* 143 */
"tagNamelist ::= ids"
,
/* 144 */
"create_table_args ::= ifnotexists ids cpxName AS select"
,
/* 145 */
"columnlist ::= columnlist COMMA column"
,
/* 146 */
"columnlist ::= column"
,
/* 147 */
"column ::= ids typename"
,
/* 148 */
"tagitemlist ::= tagitemlist COMMA tagitem"
,
/* 149 */
"tagitemlist ::= tagitem"
,
/* 150 */
"tagitem ::= INTEGER"
,
/* 151 */
"tagitem ::= FLOAT"
,
/* 152 */
"tagitem ::= STRING"
,
/* 153 */
"tagitem ::= BOOL"
,
/* 154 */
"tagitem ::= NULL"
,
/* 155 */
"tagitem ::= NOW"
,
/* 156 */
"tagitem ::= MINUS INTEGER"
,
/* 157 */
"tagitem ::= MINUS FLOAT"
,
/* 158 */
"tagitem ::= PLUS INTEGER"
,
/* 159 */
"tagitem ::= PLUS FLOAT"
,
/* 160 */
"select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt"
,
/* 161 */
"select ::= LP select RP"
,
/* 162 */
"union ::= select"
,
/* 163 */
"union ::= union UNION ALL select"
,
/* 164 */
"union ::= union UNION select"
,
/* 165 */
"cmd ::= union"
,
/* 166 */
"select ::= SELECT selcollist"
,
/* 167 */
"sclp ::= selcollist COMMA"
,
/* 168 */
"sclp ::="
,
/* 169 */
"selcollist ::= sclp distinct expr as"
,
/* 170 */
"selcollist ::= sclp STAR"
,
/* 171 */
"as ::= AS ids"
,
/* 172 */
"as ::= ids"
,
/* 173 */
"as ::="
,
/* 174 */
"distinct ::= DISTINCT"
,
/* 175 */
"distinct ::="
,
/* 176 */
"from ::= FROM tablelist"
,
/* 177 */
"from ::= FROM sub"
,
/* 178 */
"sub ::= LP union RP"
,
/* 179 */
"sub ::= LP union RP ids"
,
/* 180 */
"sub ::= sub COMMA LP union RP ids"
,
/* 181 */
"tablelist ::= ids cpxName"
,
/* 182 */
"tablelist ::= ids cpxName ids"
,
/* 183 */
"tablelist ::= tablelist COMMA ids cpxName"
,
/* 184 */
"tablelist ::= tablelist COMMA ids cpxName ids"
,
/* 185 */
"tmvar ::= VARIABLE"
,
/* 186 */
"interval_option ::= intervalKey LP tmvar RP"
,
/* 187 */
"interval_option ::= intervalKey LP tmvar COMMA tmvar RP"
,
/* 188 */
"interval_option ::="
,
/* 189 */
"intervalKey ::= INTERVAL"
,
/* 190 */
"intervalKey ::= EVERY"
,
/* 191 */
"session_option ::="
,
/* 192 */
"session_option ::= SESSION LP ids cpxName COMMA tmvar RP"
,
/* 193 */
"windowstate_option ::="
,
/* 194 */
"windowstate_option ::= STATE_WINDOW LP ids RP"
,
/* 195 */
"fill_opt ::="
,
/* 196 */
"fill_opt ::= FILL LP ID COMMA tagitemlist RP"
,
/* 197 */
"fill_opt ::= FILL LP ID RP"
,
/* 198 */
"sliding_opt ::= SLIDING LP tmvar RP"
,
/* 199 */
"sliding_opt ::="
,
/* 200 */
"orderby_opt ::="
,
/* 201 */
"orderby_opt ::= ORDER BY sortlist"
,
/* 202 */
"sortlist ::= sortlist COMMA item sortorder"
,
/* 203 */
"sortlist ::= item sortorder"
,
/* 204 */
"item ::= ids cpxName"
,
/* 205 */
"sortorder ::= ASC"
,
/* 206 */
"sortorder ::= DESC"
,
/* 207 */
"sortorder ::="
,
/* 208 */
"groupby_opt ::="
,
/* 209 */
"groupby_opt ::= GROUP BY grouplist"
,
/* 210 */
"grouplist ::= grouplist COMMA item"
,
/* 211 */
"grouplist ::= item"
,
/* 212 */
"having_opt ::="
,
/* 213 */
"having_opt ::= HAVING expr"
,
/* 214 */
"limit_opt ::="
,
/* 215 */
"limit_opt ::= LIMIT signed"
,
/* 216 */
"limit_opt ::= LIMIT signed OFFSET signed"
,
/* 217 */
"limit_opt ::= LIMIT signed COMMA signed"
,
/* 218 */
"slimit_opt ::="
,
/* 219 */
"slimit_opt ::= SLIMIT signed"
,
/* 220 */
"slimit_opt ::= SLIMIT signed SOFFSET signed"
,
/* 221 */
"slimit_opt ::= SLIMIT signed COMMA signed"
,
/* 222 */
"where_opt ::="
,
/* 223 */
"where_opt ::= WHERE expr"
,
/* 224 */
"expr ::= LP expr RP"
,
/* 225 */
"expr ::= ID"
,
/* 226 */
"expr ::= ID DOT ID"
,
/* 227 */
"expr ::= ID DOT STAR"
,
/* 228 */
"expr ::= INTEGER"
,
/* 229 */
"expr ::= MINUS INTEGER"
,
/* 230 */
"expr ::= PLUS INTEGER"
,
/* 231 */
"expr ::= FLOAT"
,
/* 232 */
"expr ::= MINUS FLOAT"
,
/* 233 */
"expr ::= PLUS FLOAT"
,
/* 234 */
"expr ::= STRING"
,
/* 235 */
"expr ::= NOW"
,
/* 236 */
"expr ::= VARIABLE"
,
/* 237 */
"expr ::= PLUS VARIABLE"
,
/* 238 */
"expr ::= MINUS VARIABLE"
,
/* 239 */
"expr ::= BOOL"
,
/* 240 */
"expr ::= NULL"
,
/* 241 */
"expr ::= ID LP exprlist RP"
,
/* 242 */
"expr ::= ID LP STAR RP"
,
/* 243 */
"expr ::= expr IS NULL"
,
/* 244 */
"expr ::= expr IS NOT NULL"
,
/* 245 */
"expr ::= expr LT expr"
,
/* 246 */
"expr ::= expr GT expr"
,
/* 247 */
"expr ::= expr LE expr"
,
/* 248 */
"expr ::= expr GE expr"
,
/* 249 */
"expr ::= expr NE expr"
,
/* 250 */
"expr ::= expr EQ expr"
,
/* 251 */
"expr ::= expr BETWEEN expr AND expr"
,
/* 252 */
"expr ::= expr AND expr"
,
/* 253 */
"expr ::= expr OR expr"
,
/* 254 */
"expr ::= expr PLUS expr"
,
/* 255 */
"expr ::= expr MINUS expr"
,
/* 256 */
"expr ::= expr STAR expr"
,
/* 257 */
"expr ::= expr SLASH expr"
,
/* 258 */
"expr ::= expr REM expr"
,
/* 259 */
"expr ::= expr LIKE expr"
,
/* 260 */
"expr ::= expr MATCH expr"
,
/* 261 */
"expr ::= expr NMATCH expr"
,
/* 262 */
"expr ::= expr IN LP exprlist RP"
,
/* 263 */
"exprlist ::= exprlist COMMA expritem"
,
/* 264 */
"exprlist ::= expritem"
,
/* 265 */
"expritem ::= expr"
,
/* 266 */
"expritem ::="
,
/* 267 */
"cmd ::= RESET QUERY CACHE"
,
/* 268 */
"cmd ::= SYNCDB ids REPLICA"
,
/* 269 */
"cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist"
,
/* 270 */
"cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids"
,
/* 271 */
"cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist"
,
/* 272 */
"cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist"
,
/* 273 */
"cmd ::= ALTER TABLE ids cpxName DROP TAG ids"
,
/* 274 */
"cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids"
,
/* 275 */
"cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 276 */
"cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist"
,
/* 277 */
"cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist"
,
/* 278 */
"cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids"
,
/* 279 */
"cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist"
,
/* 280 */
"cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist"
,
/* 281 */
"cmd ::= ALTER STABLE ids cpxName DROP TAG ids"
,
/* 282 */
"cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids"
,
/* 283 */
"cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 284 */
"cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist"
,
/* 285 */
"cmd ::= KILL CONNECTION INTEGER"
,
/* 286 */
"cmd ::= KILL STREAM INTEGER COLON INTEGER"
,
/* 287 */
"cmd ::= KILL QUERY INTEGER COLON INTEGER"
,
};
#endif
/* NDEBUG */
...
...
@@ -1496,60 +1478,60 @@ static void yy_destructor(
** inside the C code.
*/
/********* Begin destructor definitions ***************************************/
case
20
7
:
/* exprlist */
case
2
51
:
/* selcollist */
case
26
5
:
/* sclp */
case
20
5
:
/* exprlist */
case
2
47
:
/* selcollist */
case
26
1
:
/* sclp */
{
tSqlExprListDestroy
((
yypminor
->
yy13
5
));
tSqlExprListDestroy
((
yypminor
->
yy13
1
));
}
break
;
case
2
22
:
/* intitemlist */
case
22
4
:
/* keep */
case
24
5
:
/* columnlist */
case
24
6
:
/* tagitemlist */
case
24
7
:
/* tagNamelist */
case
25
8
:
/* fill_opt */
case
25
9
:
/* groupby_opt */
case
2
61
:
/* orderby_opt */
case
2
73
:
/* sortlist */
case
27
7
:
/* grouplist */
{
taosArrayDestroy
((
yypminor
->
yy13
5
));
case
2
19
:
/* intitemlist */
case
22
1
:
/* keep */
case
24
1
:
/* columnlist */
case
24
2
:
/* tagitemlist */
case
24
3
:
/* tagNamelist */
case
25
4
:
/* fill_opt */
case
25
5
:
/* groupby_opt */
case
2
57
:
/* orderby_opt */
case
2
69
:
/* sortlist */
case
27
3
:
/* grouplist */
{
taosArrayDestroy
((
yypminor
->
yy13
1
));
}
break
;
case
2
43
:
/* create_table_list */
case
2
39
:
/* create_table_list */
{
destroyCreateTableSql
((
yypminor
->
yy
110
));
destroyCreateTableSql
((
yypminor
->
yy
272
));
}
break
;
case
24
8
:
/* select */
case
24
4
:
/* select */
{
destroySqlNode
((
yypminor
->
yy
488
));
destroySqlNode
((
yypminor
->
yy
256
));
}
break
;
case
2
52
:
/* from */
case
26
9
:
/* tablelist */
case
2
70
:
/* sub */
case
2
48
:
/* from */
case
26
5
:
/* tablelist */
case
2
66
:
/* sub */
{
destroyRelationInfo
((
yypminor
->
yy
460
));
destroyRelationInfo
((
yypminor
->
yy
544
));
}
break
;
case
2
53
:
/* where_opt */
case
2
60
:
/* having_opt */
case
26
7
:
/* expr */
case
27
8
:
/* expritem */
case
2
49
:
/* where_opt */
case
2
56
:
/* having_opt */
case
26
3
:
/* expr */
case
27
4
:
/* expritem */
{
tSqlExprDestroy
((
yypminor
->
yy
52
6
));
tSqlExprDestroy
((
yypminor
->
yy
4
6
));
}
break
;
case
26
4
:
/* union */
case
26
0
:
/* union */
{
destroyAllSqlNode
((
yypminor
->
yy
551
));
destroyAllSqlNode
((
yypminor
->
yy
303
));
}
break
;
case
27
4
:
/* sortitem */
case
27
0
:
/* sortitem */
{
taosVariantDestroy
(
&
(
yypminor
->
yy
191
));
taosVariantDestroy
(
&
(
yypminor
->
yy
43
));
}
break
;
/********* End destructor definitions *****************************************/
...
...
@@ -1843,301 +1825,294 @@ static const struct {
YYCODETYPE
lhs
;
/* Symbol on the left-hand side of the rule */
signed
char
nrhs
;
/* Negative of the number of RHS symbols in the rule */
}
yyRuleInfo
[]
=
{
{
198
,
-
1
},
/* (0) program ::= cmd */
{
199
,
-
2
},
/* (1) cmd ::= SHOW DATABASES */
{
199
,
-
2
},
/* (2) cmd ::= SHOW TOPICS */
{
199
,
-
2
},
/* (3) cmd ::= SHOW FUNCTIONS */
{
199
,
-
2
},
/* (4) cmd ::= SHOW MNODES */
{
199
,
-
2
},
/* (5) cmd ::= SHOW DNODES */
{
199
,
-
2
},
/* (6) cmd ::= SHOW ACCOUNTS */
{
199
,
-
2
},
/* (7) cmd ::= SHOW USERS */
{
199
,
-
2
},
/* (8) cmd ::= SHOW MODULES */
{
199
,
-
2
},
/* (9) cmd ::= SHOW QUERIES */
{
199
,
-
2
},
/* (10) cmd ::= SHOW CONNECTIONS */
{
199
,
-
2
},
/* (11) cmd ::= SHOW STREAMS */
{
199
,
-
2
},
/* (12) cmd ::= SHOW VARIABLES */
{
199
,
-
2
},
/* (13) cmd ::= SHOW SCORES */
{
199
,
-
2
},
/* (14) cmd ::= SHOW GRANTS */
{
199
,
-
2
},
/* (15) cmd ::= SHOW VNODES */
{
199
,
-
3
},
/* (16) cmd ::= SHOW VNODES ids */
{
201
,
0
},
/* (17) dbPrefix ::= */
{
201
,
-
2
},
/* (18) dbPrefix ::= ids DOT */
{
202
,
0
},
/* (19) cpxName ::= */
{
202
,
-
2
},
/* (20) cpxName ::= DOT ids */
{
199
,
-
5
},
/* (21) cmd ::= SHOW CREATE TABLE ids cpxName */
{
199
,
-
5
},
/* (22) cmd ::= SHOW CREATE STABLE ids cpxName */
{
199
,
-
4
},
/* (23) cmd ::= SHOW CREATE DATABASE ids */
{
199
,
-
3
},
/* (24) cmd ::= SHOW dbPrefix TABLES */
{
199
,
-
5
},
/* (25) cmd ::= SHOW dbPrefix TABLES LIKE ids */
{
199
,
-
3
},
/* (26) cmd ::= SHOW dbPrefix STABLES */
{
199
,
-
5
},
/* (27) cmd ::= SHOW dbPrefix STABLES LIKE ids */
{
199
,
-
3
},
/* (28) cmd ::= SHOW dbPrefix VGROUPS */
{
199
,
-
4
},
/* (29) cmd ::= SHOW dbPrefix VGROUPS ids */
{
199
,
-
5
},
/* (30) cmd ::= DROP TABLE ifexists ids cpxName */
{
199
,
-
5
},
/* (31) cmd ::= DROP STABLE ifexists ids cpxName */
{
199
,
-
4
},
/* (32) cmd ::= DROP DATABASE ifexists ids */
{
199
,
-
4
},
/* (33) cmd ::= DROP TOPIC ifexists ids */
{
199
,
-
3
},
/* (34) cmd ::= DROP FUNCTION ids */
{
199
,
-
3
},
/* (35) cmd ::= DROP DNODE ids */
{
199
,
-
3
},
/* (36) cmd ::= DROP USER ids */
{
199
,
-
3
},
/* (37) cmd ::= DROP ACCOUNT ids */
{
199
,
-
2
},
/* (38) cmd ::= USE ids */
{
199
,
-
3
},
/* (39) cmd ::= DESCRIBE ids cpxName */
{
199
,
-
3
},
/* (40) cmd ::= DESC ids cpxName */
{
199
,
-
5
},
/* (41) cmd ::= ALTER USER ids PASS ids */
{
199
,
-
5
},
/* (42) cmd ::= ALTER USER ids PRIVILEGE ids */
{
199
,
-
4
},
/* (43) cmd ::= ALTER DNODE ids ids */
{
199
,
-
5
},
/* (44) cmd ::= ALTER DNODE ids ids ids */
{
199
,
-
3
},
/* (45) cmd ::= ALTER LOCAL ids */
{
199
,
-
4
},
/* (46) cmd ::= ALTER LOCAL ids ids */
{
199
,
-
4
},
/* (47) cmd ::= ALTER DATABASE ids alter_db_optr */
{
199
,
-
4
},
/* (48) cmd ::= ALTER TOPIC ids alter_topic_optr */
{
199
,
-
4
},
/* (49) cmd ::= ALTER ACCOUNT ids acct_optr */
{
199
,
-
6
},
/* (50) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
{
199
,
-
6
},
/* (51) cmd ::= COMPACT VNODES IN LP exprlist RP */
{
200
,
-
1
},
/* (52) ids ::= ID */
{
200
,
-
1
},
/* (53) ids ::= STRING */
{
203
,
-
2
},
/* (54) ifexists ::= IF EXISTS */
{
203
,
0
},
/* (55) ifexists ::= */
{
208
,
-
3
},
/* (56) ifnotexists ::= IF NOT EXISTS */
{
208
,
0
},
/* (57) ifnotexists ::= */
{
199
,
-
3
},
/* (58) cmd ::= CREATE DNODE ids */
{
199
,
-
6
},
/* (59) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
{
199
,
-
5
},
/* (60) cmd ::= CREATE DATABASE ifnotexists ids db_optr */
{
199
,
-
5
},
/* (61) cmd ::= CREATE TOPIC ifnotexists ids topic_optr */
{
199
,
-
8
},
/* (62) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
{
199
,
-
9
},
/* (63) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
{
199
,
-
5
},
/* (64) cmd ::= CREATE USER ids PASS ids */
{
212
,
0
},
/* (65) bufsize ::= */
{
212
,
-
2
},
/* (66) bufsize ::= BUFSIZE INTEGER */
{
213
,
0
},
/* (67) pps ::= */
{
213
,
-
2
},
/* (68) pps ::= PPS INTEGER */
{
214
,
0
},
/* (69) tseries ::= */
{
214
,
-
2
},
/* (70) tseries ::= TSERIES INTEGER */
{
215
,
0
},
/* (71) dbs ::= */
{
215
,
-
2
},
/* (72) dbs ::= DBS INTEGER */
{
216
,
0
},
/* (73) streams ::= */
{
216
,
-
2
},
/* (74) streams ::= STREAMS INTEGER */
{
217
,
0
},
/* (75) storage ::= */
{
217
,
-
2
},
/* (76) storage ::= STORAGE INTEGER */
{
218
,
0
},
/* (77) qtime ::= */
{
218
,
-
2
},
/* (78) qtime ::= QTIME INTEGER */
{
219
,
0
},
/* (79) users ::= */
{
219
,
-
2
},
/* (80) users ::= USERS INTEGER */
{
220
,
0
},
/* (81) conns ::= */
{
220
,
-
2
},
/* (82) conns ::= CONNS INTEGER */
{
221
,
0
},
/* (83) state ::= */
{
221
,
-
2
},
/* (84) state ::= STATE ids */
{
206
,
-
9
},
/* (85) acct_optr ::= pps tseries storage streams qtime dbs users conns state */
{
222
,
-
3
},
/* (86) intitemlist ::= intitemlist COMMA intitem */
{
222
,
-
1
},
/* (87) intitemlist ::= intitem */
{
223
,
-
1
},
/* (88) intitem ::= INTEGER */
{
224
,
-
2
},
/* (89) keep ::= KEEP intitemlist */
{
225
,
-
2
},
/* (90) cache ::= CACHE INTEGER */
{
226
,
-
2
},
/* (91) replica ::= REPLICA INTEGER */
{
227
,
-
2
},
/* (92) quorum ::= QUORUM INTEGER */
{
228
,
-
2
},
/* (93) days ::= DAYS INTEGER */
{
229
,
-
2
},
/* (94) minrows ::= MINROWS INTEGER */
{
230
,
-
2
},
/* (95) maxrows ::= MAXROWS INTEGER */
{
231
,
-
2
},
/* (96) blocks ::= BLOCKS INTEGER */
{
232
,
-
2
},
/* (97) ctime ::= CTIME INTEGER */
{
233
,
-
2
},
/* (98) wal ::= WAL INTEGER */
{
234
,
-
2
},
/* (99) fsync ::= FSYNC INTEGER */
{
235
,
-
2
},
/* (100) comp ::= COMP INTEGER */
{
236
,
-
2
},
/* (101) prec ::= PRECISION STRING */
{
237
,
-
2
},
/* (102) update ::= UPDATE INTEGER */
{
238
,
-
2
},
/* (103) cachelast ::= CACHELAST INTEGER */
{
239
,
-
2
},
/* (104) partitions ::= PARTITIONS INTEGER */
{
209
,
0
},
/* (105) db_optr ::= */
{
209
,
-
2
},
/* (106) db_optr ::= db_optr cache */
{
209
,
-
2
},
/* (107) db_optr ::= db_optr replica */
{
209
,
-
2
},
/* (108) db_optr ::= db_optr quorum */
{
209
,
-
2
},
/* (109) db_optr ::= db_optr days */
{
209
,
-
2
},
/* (110) db_optr ::= db_optr minrows */
{
209
,
-
2
},
/* (111) db_optr ::= db_optr maxrows */
{
209
,
-
2
},
/* (112) db_optr ::= db_optr blocks */
{
209
,
-
2
},
/* (113) db_optr ::= db_optr ctime */
{
209
,
-
2
},
/* (114) db_optr ::= db_optr wal */
{
209
,
-
2
},
/* (115) db_optr ::= db_optr fsync */
{
209
,
-
2
},
/* (116) db_optr ::= db_optr comp */
{
209
,
-
2
},
/* (117) db_optr ::= db_optr prec */
{
209
,
-
2
},
/* (118) db_optr ::= db_optr keep */
{
209
,
-
2
},
/* (119) db_optr ::= db_optr update */
{
209
,
-
2
},
/* (120) db_optr ::= db_optr cachelast */
{
210
,
-
1
},
/* (121) topic_optr ::= db_optr */
{
210
,
-
2
},
/* (122) topic_optr ::= topic_optr partitions */
{
204
,
0
},
/* (123) alter_db_optr ::= */
{
204
,
-
2
},
/* (124) alter_db_optr ::= alter_db_optr replica */
{
204
,
-
2
},
/* (125) alter_db_optr ::= alter_db_optr quorum */
{
204
,
-
2
},
/* (126) alter_db_optr ::= alter_db_optr keep */
{
204
,
-
2
},
/* (127) alter_db_optr ::= alter_db_optr blocks */
{
204
,
-
2
},
/* (128) alter_db_optr ::= alter_db_optr comp */
{
204
,
-
2
},
/* (129) alter_db_optr ::= alter_db_optr update */
{
204
,
-
2
},
/* (130) alter_db_optr ::= alter_db_optr cachelast */
{
205
,
-
1
},
/* (131) alter_topic_optr ::= alter_db_optr */
{
205
,
-
2
},
/* (132) alter_topic_optr ::= alter_topic_optr partitions */
{
211
,
-
1
},
/* (133) typename ::= ids */
{
211
,
-
4
},
/* (134) typename ::= ids LP signed RP */
{
211
,
-
2
},
/* (135) typename ::= ids UNSIGNED */
{
240
,
-
1
},
/* (136) signed ::= INTEGER */
{
240
,
-
2
},
/* (137) signed ::= PLUS INTEGER */
{
240
,
-
2
},
/* (138) signed ::= MINUS INTEGER */
{
199
,
-
3
},
/* (139) cmd ::= CREATE TABLE create_table_args */
{
199
,
-
3
},
/* (140) cmd ::= CREATE TABLE create_stable_args */
{
199
,
-
3
},
/* (141) cmd ::= CREATE STABLE create_stable_args */
{
199
,
-
3
},
/* (142) cmd ::= CREATE TABLE create_table_list */
{
243
,
-
1
},
/* (143) create_table_list ::= create_from_stable */
{
243
,
-
2
},
/* (144) create_table_list ::= create_table_list create_from_stable */
{
241
,
-
6
},
/* (145) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
{
242
,
-
10
},
/* (146) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
{
244
,
-
10
},
/* (147) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
{
244
,
-
13
},
/* (148) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */
{
247
,
-
3
},
/* (149) tagNamelist ::= tagNamelist COMMA ids */
{
247
,
-
1
},
/* (150) tagNamelist ::= ids */
{
241
,
-
5
},
/* (151) create_table_args ::= ifnotexists ids cpxName AS select */
{
245
,
-
3
},
/* (152) columnlist ::= columnlist COMMA column */
{
245
,
-
1
},
/* (153) columnlist ::= column */
{
249
,
-
2
},
/* (154) column ::= ids typename */
{
246
,
-
3
},
/* (155) tagitemlist ::= tagitemlist COMMA tagitem */
{
246
,
-
1
},
/* (156) tagitemlist ::= tagitem */
{
250
,
-
1
},
/* (157) tagitem ::= INTEGER */
{
250
,
-
1
},
/* (158) tagitem ::= FLOAT */
{
250
,
-
1
},
/* (159) tagitem ::= STRING */
{
250
,
-
1
},
/* (160) tagitem ::= BOOL */
{
250
,
-
1
},
/* (161) tagitem ::= NULL */
{
250
,
-
1
},
/* (162) tagitem ::= NOW */
{
250
,
-
2
},
/* (163) tagitem ::= MINUS INTEGER */
{
250
,
-
2
},
/* (164) tagitem ::= MINUS FLOAT */
{
250
,
-
2
},
/* (165) tagitem ::= PLUS INTEGER */
{
250
,
-
2
},
/* (166) tagitem ::= PLUS FLOAT */
{
248
,
-
14
},
/* (167) select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */
{
248
,
-
3
},
/* (168) select ::= LP select RP */
{
264
,
-
1
},
/* (169) union ::= select */
{
264
,
-
4
},
/* (170) union ::= union UNION ALL select */
{
264
,
-
3
},
/* (171) union ::= union UNION select */
{
199
,
-
1
},
/* (172) cmd ::= union */
{
248
,
-
2
},
/* (173) select ::= SELECT selcollist */
{
265
,
-
2
},
/* (174) sclp ::= selcollist COMMA */
{
265
,
0
},
/* (175) sclp ::= */
{
251
,
-
4
},
/* (176) selcollist ::= sclp distinct expr as */
{
251
,
-
2
},
/* (177) selcollist ::= sclp STAR */
{
268
,
-
2
},
/* (178) as ::= AS ids */
{
268
,
-
1
},
/* (179) as ::= ids */
{
268
,
0
},
/* (180) as ::= */
{
266
,
-
1
},
/* (181) distinct ::= DISTINCT */
{
266
,
0
},
/* (182) distinct ::= */
{
252
,
-
2
},
/* (183) from ::= FROM tablelist */
{
252
,
-
2
},
/* (184) from ::= FROM sub */
{
270
,
-
3
},
/* (185) sub ::= LP union RP */
{
270
,
-
4
},
/* (186) sub ::= LP union RP ids */
{
270
,
-
6
},
/* (187) sub ::= sub COMMA LP union RP ids */
{
269
,
-
2
},
/* (188) tablelist ::= ids cpxName */
{
269
,
-
3
},
/* (189) tablelist ::= ids cpxName ids */
{
269
,
-
4
},
/* (190) tablelist ::= tablelist COMMA ids cpxName */
{
269
,
-
5
},
/* (191) tablelist ::= tablelist COMMA ids cpxName ids */
{
271
,
-
1
},
/* (192) tmvar ::= VARIABLE */
{
254
,
-
4
},
/* (193) interval_option ::= intervalKey LP tmvar RP */
{
254
,
-
6
},
/* (194) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */
{
254
,
0
},
/* (195) interval_option ::= */
{
272
,
-
1
},
/* (196) intervalKey ::= INTERVAL */
{
272
,
-
1
},
/* (197) intervalKey ::= EVERY */
{
256
,
0
},
/* (198) session_option ::= */
{
256
,
-
7
},
/* (199) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
{
257
,
0
},
/* (200) windowstate_option ::= */
{
257
,
-
4
},
/* (201) windowstate_option ::= STATE_WINDOW LP ids RP */
{
258
,
0
},
/* (202) fill_opt ::= */
{
258
,
-
6
},
/* (203) fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
258
,
-
4
},
/* (204) fill_opt ::= FILL LP ID RP */
{
255
,
-
4
},
/* (205) sliding_opt ::= SLIDING LP tmvar RP */
{
255
,
0
},
/* (206) sliding_opt ::= */
{
261
,
0
},
/* (207) orderby_opt ::= */
{
261
,
-
3
},
/* (208) orderby_opt ::= ORDER BY sortlist */
{
273
,
-
4
},
/* (209) sortlist ::= sortlist COMMA item sortorder */
{
273
,
-
2
},
/* (210) sortlist ::= item sortorder */
{
275
,
-
2
},
/* (211) item ::= ids cpxName */
{
276
,
-
1
},
/* (212) sortorder ::= ASC */
{
276
,
-
1
},
/* (213) sortorder ::= DESC */
{
276
,
0
},
/* (214) sortorder ::= */
{
259
,
0
},
/* (215) groupby_opt ::= */
{
259
,
-
3
},
/* (216) groupby_opt ::= GROUP BY grouplist */
{
277
,
-
3
},
/* (217) grouplist ::= grouplist COMMA item */
{
277
,
-
1
},
/* (218) grouplist ::= item */
{
260
,
0
},
/* (219) having_opt ::= */
{
260
,
-
2
},
/* (220) having_opt ::= HAVING expr */
{
263
,
0
},
/* (221) limit_opt ::= */
{
263
,
-
2
},
/* (222) limit_opt ::= LIMIT signed */
{
263
,
-
4
},
/* (223) limit_opt ::= LIMIT signed OFFSET signed */
{
263
,
-
4
},
/* (224) limit_opt ::= LIMIT signed COMMA signed */
{
262
,
0
},
/* (225) slimit_opt ::= */
{
262
,
-
2
},
/* (226) slimit_opt ::= SLIMIT signed */
{
262
,
-
4
},
/* (227) slimit_opt ::= SLIMIT signed SOFFSET signed */
{
262
,
-
4
},
/* (228) slimit_opt ::= SLIMIT signed COMMA signed */
{
253
,
0
},
/* (229) where_opt ::= */
{
253
,
-
2
},
/* (230) where_opt ::= WHERE expr */
{
267
,
-
3
},
/* (231) expr ::= LP expr RP */
{
267
,
-
1
},
/* (232) expr ::= ID */
{
267
,
-
3
},
/* (233) expr ::= ID DOT ID */
{
267
,
-
3
},
/* (234) expr ::= ID DOT STAR */
{
267
,
-
1
},
/* (235) expr ::= INTEGER */
{
267
,
-
2
},
/* (236) expr ::= MINUS INTEGER */
{
267
,
-
2
},
/* (237) expr ::= PLUS INTEGER */
{
267
,
-
1
},
/* (238) expr ::= FLOAT */
{
267
,
-
2
},
/* (239) expr ::= MINUS FLOAT */
{
267
,
-
2
},
/* (240) expr ::= PLUS FLOAT */
{
267
,
-
1
},
/* (241) expr ::= STRING */
{
267
,
-
1
},
/* (242) expr ::= NOW */
{
267
,
-
1
},
/* (243) expr ::= VARIABLE */
{
267
,
-
2
},
/* (244) expr ::= PLUS VARIABLE */
{
267
,
-
2
},
/* (245) expr ::= MINUS VARIABLE */
{
267
,
-
1
},
/* (246) expr ::= BOOL */
{
267
,
-
1
},
/* (247) expr ::= NULL */
{
267
,
-
4
},
/* (248) expr ::= ID LP exprlist RP */
{
267
,
-
4
},
/* (249) expr ::= ID LP STAR RP */
{
267
,
-
3
},
/* (250) expr ::= expr IS NULL */
{
267
,
-
4
},
/* (251) expr ::= expr IS NOT NULL */
{
267
,
-
3
},
/* (252) expr ::= expr LT expr */
{
267
,
-
3
},
/* (253) expr ::= expr GT expr */
{
267
,
-
3
},
/* (254) expr ::= expr LE expr */
{
267
,
-
3
},
/* (255) expr ::= expr GE expr */
{
267
,
-
3
},
/* (256) expr ::= expr NE expr */
{
267
,
-
3
},
/* (257) expr ::= expr EQ expr */
{
267
,
-
5
},
/* (258) expr ::= expr BETWEEN expr AND expr */
{
267
,
-
3
},
/* (259) expr ::= expr AND expr */
{
267
,
-
3
},
/* (260) expr ::= expr OR expr */
{
267
,
-
3
},
/* (261) expr ::= expr PLUS expr */
{
267
,
-
3
},
/* (262) expr ::= expr MINUS expr */
{
267
,
-
3
},
/* (263) expr ::= expr STAR expr */
{
267
,
-
3
},
/* (264) expr ::= expr SLASH expr */
{
267
,
-
3
},
/* (265) expr ::= expr REM expr */
{
267
,
-
3
},
/* (266) expr ::= expr LIKE expr */
{
267
,
-
3
},
/* (267) expr ::= expr MATCH expr */
{
267
,
-
3
},
/* (268) expr ::= expr NMATCH expr */
{
267
,
-
5
},
/* (269) expr ::= expr IN LP exprlist RP */
{
207
,
-
3
},
/* (270) exprlist ::= exprlist COMMA expritem */
{
207
,
-
1
},
/* (271) exprlist ::= expritem */
{
278
,
-
1
},
/* (272) expritem ::= expr */
{
278
,
0
},
/* (273) expritem ::= */
{
199
,
-
3
},
/* (274) cmd ::= RESET QUERY CACHE */
{
199
,
-
3
},
/* (275) cmd ::= SYNCDB ids REPLICA */
{
199
,
-
7
},
/* (276) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{
199
,
-
7
},
/* (277) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
199
,
-
7
},
/* (278) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
{
199
,
-
7
},
/* (279) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{
199
,
-
7
},
/* (280) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
199
,
-
8
},
/* (281) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
199
,
-
9
},
/* (282) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{
199
,
-
7
},
/* (283) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
{
199
,
-
7
},
/* (284) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
{
199
,
-
7
},
/* (285) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
{
199
,
-
7
},
/* (286) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
{
199
,
-
7
},
/* (287) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
{
199
,
-
7
},
/* (288) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
{
199
,
-
8
},
/* (289) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
{
199
,
-
9
},
/* (290) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
{
199
,
-
7
},
/* (291) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
{
199
,
-
3
},
/* (292) cmd ::= KILL CONNECTION INTEGER */
{
199
,
-
5
},
/* (293) cmd ::= KILL STREAM INTEGER COLON INTEGER */
{
199
,
-
5
},
/* (294) cmd ::= KILL QUERY INTEGER COLON INTEGER */
{
197
,
-
1
},
/* (0) program ::= cmd */
{
198
,
-
2
},
/* (1) cmd ::= SHOW DATABASES */
{
198
,
-
2
},
/* (2) cmd ::= SHOW TOPICS */
{
198
,
-
2
},
/* (3) cmd ::= SHOW FUNCTIONS */
{
198
,
-
2
},
/* (4) cmd ::= SHOW MNODES */
{
198
,
-
2
},
/* (5) cmd ::= SHOW DNODES */
{
198
,
-
2
},
/* (6) cmd ::= SHOW ACCOUNTS */
{
198
,
-
2
},
/* (7) cmd ::= SHOW USERS */
{
198
,
-
2
},
/* (8) cmd ::= SHOW MODULES */
{
198
,
-
2
},
/* (9) cmd ::= SHOW QUERIES */
{
198
,
-
2
},
/* (10) cmd ::= SHOW CONNECTIONS */
{
198
,
-
2
},
/* (11) cmd ::= SHOW STREAMS */
{
198
,
-
2
},
/* (12) cmd ::= SHOW VARIABLES */
{
198
,
-
2
},
/* (13) cmd ::= SHOW SCORES */
{
198
,
-
2
},
/* (14) cmd ::= SHOW GRANTS */
{
198
,
-
2
},
/* (15) cmd ::= SHOW VNODES */
{
198
,
-
3
},
/* (16) cmd ::= SHOW VNODES ids */
{
200
,
0
},
/* (17) dbPrefix ::= */
{
200
,
-
2
},
/* (18) dbPrefix ::= ids DOT */
{
201
,
0
},
/* (19) cpxName ::= */
{
201
,
-
2
},
/* (20) cpxName ::= DOT ids */
{
198
,
-
5
},
/* (21) cmd ::= SHOW CREATE TABLE ids cpxName */
{
198
,
-
5
},
/* (22) cmd ::= SHOW CREATE STABLE ids cpxName */
{
198
,
-
4
},
/* (23) cmd ::= SHOW CREATE DATABASE ids */
{
198
,
-
3
},
/* (24) cmd ::= SHOW dbPrefix TABLES */
{
198
,
-
5
},
/* (25) cmd ::= SHOW dbPrefix TABLES LIKE ids */
{
198
,
-
3
},
/* (26) cmd ::= SHOW dbPrefix STABLES */
{
198
,
-
5
},
/* (27) cmd ::= SHOW dbPrefix STABLES LIKE ids */
{
198
,
-
3
},
/* (28) cmd ::= SHOW dbPrefix VGROUPS */
{
198
,
-
4
},
/* (29) cmd ::= SHOW dbPrefix VGROUPS ids */
{
198
,
-
5
},
/* (30) cmd ::= DROP TABLE ifexists ids cpxName */
{
198
,
-
5
},
/* (31) cmd ::= DROP STABLE ifexists ids cpxName */
{
198
,
-
4
},
/* (32) cmd ::= DROP DATABASE ifexists ids */
{
198
,
-
4
},
/* (33) cmd ::= DROP TOPIC ifexists ids */
{
198
,
-
3
},
/* (34) cmd ::= DROP FUNCTION ids */
{
198
,
-
3
},
/* (35) cmd ::= DROP DNODE ids */
{
198
,
-
3
},
/* (36) cmd ::= DROP USER ids */
{
198
,
-
3
},
/* (37) cmd ::= DROP ACCOUNT ids */
{
198
,
-
2
},
/* (38) cmd ::= USE ids */
{
198
,
-
3
},
/* (39) cmd ::= DESCRIBE ids cpxName */
{
198
,
-
3
},
/* (40) cmd ::= DESC ids cpxName */
{
198
,
-
5
},
/* (41) cmd ::= ALTER USER ids PASS ids */
{
198
,
-
5
},
/* (42) cmd ::= ALTER USER ids PRIVILEGE ids */
{
198
,
-
4
},
/* (43) cmd ::= ALTER DNODE ids ids */
{
198
,
-
5
},
/* (44) cmd ::= ALTER DNODE ids ids ids */
{
198
,
-
3
},
/* (45) cmd ::= ALTER LOCAL ids */
{
198
,
-
4
},
/* (46) cmd ::= ALTER LOCAL ids ids */
{
198
,
-
4
},
/* (47) cmd ::= ALTER DATABASE ids alter_db_optr */
{
198
,
-
4
},
/* (48) cmd ::= ALTER ACCOUNT ids acct_optr */
{
198
,
-
6
},
/* (49) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
{
198
,
-
6
},
/* (50) cmd ::= COMPACT VNODES IN LP exprlist RP */
{
199
,
-
1
},
/* (51) ids ::= ID */
{
199
,
-
1
},
/* (52) ids ::= STRING */
{
202
,
-
2
},
/* (53) ifexists ::= IF EXISTS */
{
202
,
0
},
/* (54) ifexists ::= */
{
206
,
-
3
},
/* (55) ifnotexists ::= IF NOT EXISTS */
{
206
,
0
},
/* (56) ifnotexists ::= */
{
198
,
-
3
},
/* (57) cmd ::= CREATE DNODE ids */
{
198
,
-
6
},
/* (58) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
{
198
,
-
5
},
/* (59) cmd ::= CREATE DATABASE ifnotexists ids db_optr */
{
198
,
-
8
},
/* (60) cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
{
198
,
-
9
},
/* (61) cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
{
198
,
-
5
},
/* (62) cmd ::= CREATE USER ids PASS ids */
{
209
,
0
},
/* (63) bufsize ::= */
{
209
,
-
2
},
/* (64) bufsize ::= BUFSIZE INTEGER */
{
210
,
0
},
/* (65) pps ::= */
{
210
,
-
2
},
/* (66) pps ::= PPS INTEGER */
{
211
,
0
},
/* (67) tseries ::= */
{
211
,
-
2
},
/* (68) tseries ::= TSERIES INTEGER */
{
212
,
0
},
/* (69) dbs ::= */
{
212
,
-
2
},
/* (70) dbs ::= DBS INTEGER */
{
213
,
0
},
/* (71) streams ::= */
{
213
,
-
2
},
/* (72) streams ::= STREAMS INTEGER */
{
214
,
0
},
/* (73) storage ::= */
{
214
,
-
2
},
/* (74) storage ::= STORAGE INTEGER */
{
215
,
0
},
/* (75) qtime ::= */
{
215
,
-
2
},
/* (76) qtime ::= QTIME INTEGER */
{
216
,
0
},
/* (77) users ::= */
{
216
,
-
2
},
/* (78) users ::= USERS INTEGER */
{
217
,
0
},
/* (79) conns ::= */
{
217
,
-
2
},
/* (80) conns ::= CONNS INTEGER */
{
218
,
0
},
/* (81) state ::= */
{
218
,
-
2
},
/* (82) state ::= STATE ids */
{
204
,
-
9
},
/* (83) acct_optr ::= pps tseries storage streams qtime dbs users conns state */
{
219
,
-
3
},
/* (84) intitemlist ::= intitemlist COMMA intitem */
{
219
,
-
1
},
/* (85) intitemlist ::= intitem */
{
220
,
-
1
},
/* (86) intitem ::= INTEGER */
{
221
,
-
2
},
/* (87) keep ::= KEEP intitemlist */
{
222
,
-
2
},
/* (88) cache ::= CACHE INTEGER */
{
223
,
-
2
},
/* (89) replica ::= REPLICA INTEGER */
{
224
,
-
2
},
/* (90) quorum ::= QUORUM INTEGER */
{
225
,
-
2
},
/* (91) days ::= DAYS INTEGER */
{
226
,
-
2
},
/* (92) minrows ::= MINROWS INTEGER */
{
227
,
-
2
},
/* (93) maxrows ::= MAXROWS INTEGER */
{
228
,
-
2
},
/* (94) blocks ::= BLOCKS INTEGER */
{
229
,
-
2
},
/* (95) ctime ::= CTIME INTEGER */
{
230
,
-
2
},
/* (96) wal ::= WAL INTEGER */
{
231
,
-
2
},
/* (97) fsync ::= FSYNC INTEGER */
{
232
,
-
2
},
/* (98) comp ::= COMP INTEGER */
{
233
,
-
2
},
/* (99) prec ::= PRECISION STRING */
{
234
,
-
2
},
/* (100) update ::= UPDATE INTEGER */
{
235
,
-
2
},
/* (101) cachelast ::= CACHELAST INTEGER */
{
207
,
0
},
/* (102) db_optr ::= */
{
207
,
-
2
},
/* (103) db_optr ::= db_optr cache */
{
207
,
-
2
},
/* (104) db_optr ::= db_optr replica */
{
207
,
-
2
},
/* (105) db_optr ::= db_optr quorum */
{
207
,
-
2
},
/* (106) db_optr ::= db_optr days */
{
207
,
-
2
},
/* (107) db_optr ::= db_optr minrows */
{
207
,
-
2
},
/* (108) db_optr ::= db_optr maxrows */
{
207
,
-
2
},
/* (109) db_optr ::= db_optr blocks */
{
207
,
-
2
},
/* (110) db_optr ::= db_optr ctime */
{
207
,
-
2
},
/* (111) db_optr ::= db_optr wal */
{
207
,
-
2
},
/* (112) db_optr ::= db_optr fsync */
{
207
,
-
2
},
/* (113) db_optr ::= db_optr comp */
{
207
,
-
2
},
/* (114) db_optr ::= db_optr prec */
{
207
,
-
2
},
/* (115) db_optr ::= db_optr keep */
{
207
,
-
2
},
/* (116) db_optr ::= db_optr update */
{
207
,
-
2
},
/* (117) db_optr ::= db_optr cachelast */
{
203
,
0
},
/* (118) alter_db_optr ::= */
{
203
,
-
2
},
/* (119) alter_db_optr ::= alter_db_optr replica */
{
203
,
-
2
},
/* (120) alter_db_optr ::= alter_db_optr quorum */
{
203
,
-
2
},
/* (121) alter_db_optr ::= alter_db_optr keep */
{
203
,
-
2
},
/* (122) alter_db_optr ::= alter_db_optr blocks */
{
203
,
-
2
},
/* (123) alter_db_optr ::= alter_db_optr comp */
{
203
,
-
2
},
/* (124) alter_db_optr ::= alter_db_optr update */
{
203
,
-
2
},
/* (125) alter_db_optr ::= alter_db_optr cachelast */
{
208
,
-
1
},
/* (126) typename ::= ids */
{
208
,
-
4
},
/* (127) typename ::= ids LP signed RP */
{
208
,
-
2
},
/* (128) typename ::= ids UNSIGNED */
{
236
,
-
1
},
/* (129) signed ::= INTEGER */
{
236
,
-
2
},
/* (130) signed ::= PLUS INTEGER */
{
236
,
-
2
},
/* (131) signed ::= MINUS INTEGER */
{
198
,
-
3
},
/* (132) cmd ::= CREATE TABLE create_table_args */
{
198
,
-
3
},
/* (133) cmd ::= CREATE TABLE create_stable_args */
{
198
,
-
3
},
/* (134) cmd ::= CREATE STABLE create_stable_args */
{
198
,
-
3
},
/* (135) cmd ::= CREATE TABLE create_table_list */
{
239
,
-
1
},
/* (136) create_table_list ::= create_from_stable */
{
239
,
-
2
},
/* (137) create_table_list ::= create_table_list create_from_stable */
{
237
,
-
6
},
/* (138) create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
{
238
,
-
10
},
/* (139) create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
{
240
,
-
10
},
/* (140) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
{
240
,
-
13
},
/* (141) create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */
{
243
,
-
3
},
/* (142) tagNamelist ::= tagNamelist COMMA ids */
{
243
,
-
1
},
/* (143) tagNamelist ::= ids */
{
237
,
-
5
},
/* (144) create_table_args ::= ifnotexists ids cpxName AS select */
{
241
,
-
3
},
/* (145) columnlist ::= columnlist COMMA column */
{
241
,
-
1
},
/* (146) columnlist ::= column */
{
245
,
-
2
},
/* (147) column ::= ids typename */
{
242
,
-
3
},
/* (148) tagitemlist ::= tagitemlist COMMA tagitem */
{
242
,
-
1
},
/* (149) tagitemlist ::= tagitem */
{
246
,
-
1
},
/* (150) tagitem ::= INTEGER */
{
246
,
-
1
},
/* (151) tagitem ::= FLOAT */
{
246
,
-
1
},
/* (152) tagitem ::= STRING */
{
246
,
-
1
},
/* (153) tagitem ::= BOOL */
{
246
,
-
1
},
/* (154) tagitem ::= NULL */
{
246
,
-
1
},
/* (155) tagitem ::= NOW */
{
246
,
-
2
},
/* (156) tagitem ::= MINUS INTEGER */
{
246
,
-
2
},
/* (157) tagitem ::= MINUS FLOAT */
{
246
,
-
2
},
/* (158) tagitem ::= PLUS INTEGER */
{
246
,
-
2
},
/* (159) tagitem ::= PLUS FLOAT */
{
244
,
-
14
},
/* (160) select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */
{
244
,
-
3
},
/* (161) select ::= LP select RP */
{
260
,
-
1
},
/* (162) union ::= select */
{
260
,
-
4
},
/* (163) union ::= union UNION ALL select */
{
260
,
-
3
},
/* (164) union ::= union UNION select */
{
198
,
-
1
},
/* (165) cmd ::= union */
{
244
,
-
2
},
/* (166) select ::= SELECT selcollist */
{
261
,
-
2
},
/* (167) sclp ::= selcollist COMMA */
{
261
,
0
},
/* (168) sclp ::= */
{
247
,
-
4
},
/* (169) selcollist ::= sclp distinct expr as */
{
247
,
-
2
},
/* (170) selcollist ::= sclp STAR */
{
264
,
-
2
},
/* (171) as ::= AS ids */
{
264
,
-
1
},
/* (172) as ::= ids */
{
264
,
0
},
/* (173) as ::= */
{
262
,
-
1
},
/* (174) distinct ::= DISTINCT */
{
262
,
0
},
/* (175) distinct ::= */
{
248
,
-
2
},
/* (176) from ::= FROM tablelist */
{
248
,
-
2
},
/* (177) from ::= FROM sub */
{
266
,
-
3
},
/* (178) sub ::= LP union RP */
{
266
,
-
4
},
/* (179) sub ::= LP union RP ids */
{
266
,
-
6
},
/* (180) sub ::= sub COMMA LP union RP ids */
{
265
,
-
2
},
/* (181) tablelist ::= ids cpxName */
{
265
,
-
3
},
/* (182) tablelist ::= ids cpxName ids */
{
265
,
-
4
},
/* (183) tablelist ::= tablelist COMMA ids cpxName */
{
265
,
-
5
},
/* (184) tablelist ::= tablelist COMMA ids cpxName ids */
{
267
,
-
1
},
/* (185) tmvar ::= VARIABLE */
{
250
,
-
4
},
/* (186) interval_option ::= intervalKey LP tmvar RP */
{
250
,
-
6
},
/* (187) interval_option ::= intervalKey LP tmvar COMMA tmvar RP */
{
250
,
0
},
/* (188) interval_option ::= */
{
268
,
-
1
},
/* (189) intervalKey ::= INTERVAL */
{
268
,
-
1
},
/* (190) intervalKey ::= EVERY */
{
252
,
0
},
/* (191) session_option ::= */
{
252
,
-
7
},
/* (192) session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
{
253
,
0
},
/* (193) windowstate_option ::= */
{
253
,
-
4
},
/* (194) windowstate_option ::= STATE_WINDOW LP ids RP */
{
254
,
0
},
/* (195) fill_opt ::= */
{
254
,
-
6
},
/* (196) fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
254
,
-
4
},
/* (197) fill_opt ::= FILL LP ID RP */
{
251
,
-
4
},
/* (198) sliding_opt ::= SLIDING LP tmvar RP */
{
251
,
0
},
/* (199) sliding_opt ::= */
{
257
,
0
},
/* (200) orderby_opt ::= */
{
257
,
-
3
},
/* (201) orderby_opt ::= ORDER BY sortlist */
{
269
,
-
4
},
/* (202) sortlist ::= sortlist COMMA item sortorder */
{
269
,
-
2
},
/* (203) sortlist ::= item sortorder */
{
271
,
-
2
},
/* (204) item ::= ids cpxName */
{
272
,
-
1
},
/* (205) sortorder ::= ASC */
{
272
,
-
1
},
/* (206) sortorder ::= DESC */
{
272
,
0
},
/* (207) sortorder ::= */
{
255
,
0
},
/* (208) groupby_opt ::= */
{
255
,
-
3
},
/* (209) groupby_opt ::= GROUP BY grouplist */
{
273
,
-
3
},
/* (210) grouplist ::= grouplist COMMA item */
{
273
,
-
1
},
/* (211) grouplist ::= item */
{
256
,
0
},
/* (212) having_opt ::= */
{
256
,
-
2
},
/* (213) having_opt ::= HAVING expr */
{
259
,
0
},
/* (214) limit_opt ::= */
{
259
,
-
2
},
/* (215) limit_opt ::= LIMIT signed */
{
259
,
-
4
},
/* (216) limit_opt ::= LIMIT signed OFFSET signed */
{
259
,
-
4
},
/* (217) limit_opt ::= LIMIT signed COMMA signed */
{
258
,
0
},
/* (218) slimit_opt ::= */
{
258
,
-
2
},
/* (219) slimit_opt ::= SLIMIT signed */
{
258
,
-
4
},
/* (220) slimit_opt ::= SLIMIT signed SOFFSET signed */
{
258
,
-
4
},
/* (221) slimit_opt ::= SLIMIT signed COMMA signed */
{
249
,
0
},
/* (222) where_opt ::= */
{
249
,
-
2
},
/* (223) where_opt ::= WHERE expr */
{
263
,
-
3
},
/* (224) expr ::= LP expr RP */
{
263
,
-
1
},
/* (225) expr ::= ID */
{
263
,
-
3
},
/* (226) expr ::= ID DOT ID */
{
263
,
-
3
},
/* (227) expr ::= ID DOT STAR */
{
263
,
-
1
},
/* (228) expr ::= INTEGER */
{
263
,
-
2
},
/* (229) expr ::= MINUS INTEGER */
{
263
,
-
2
},
/* (230) expr ::= PLUS INTEGER */
{
263
,
-
1
},
/* (231) expr ::= FLOAT */
{
263
,
-
2
},
/* (232) expr ::= MINUS FLOAT */
{
263
,
-
2
},
/* (233) expr ::= PLUS FLOAT */
{
263
,
-
1
},
/* (234) expr ::= STRING */
{
263
,
-
1
},
/* (235) expr ::= NOW */
{
263
,
-
1
},
/* (236) expr ::= VARIABLE */
{
263
,
-
2
},
/* (237) expr ::= PLUS VARIABLE */
{
263
,
-
2
},
/* (238) expr ::= MINUS VARIABLE */
{
263
,
-
1
},
/* (239) expr ::= BOOL */
{
263
,
-
1
},
/* (240) expr ::= NULL */
{
263
,
-
4
},
/* (241) expr ::= ID LP exprlist RP */
{
263
,
-
4
},
/* (242) expr ::= ID LP STAR RP */
{
263
,
-
3
},
/* (243) expr ::= expr IS NULL */
{
263
,
-
4
},
/* (244) expr ::= expr IS NOT NULL */
{
263
,
-
3
},
/* (245) expr ::= expr LT expr */
{
263
,
-
3
},
/* (246) expr ::= expr GT expr */
{
263
,
-
3
},
/* (247) expr ::= expr LE expr */
{
263
,
-
3
},
/* (248) expr ::= expr GE expr */
{
263
,
-
3
},
/* (249) expr ::= expr NE expr */
{
263
,
-
3
},
/* (250) expr ::= expr EQ expr */
{
263
,
-
5
},
/* (251) expr ::= expr BETWEEN expr AND expr */
{
263
,
-
3
},
/* (252) expr ::= expr AND expr */
{
263
,
-
3
},
/* (253) expr ::= expr OR expr */
{
263
,
-
3
},
/* (254) expr ::= expr PLUS expr */
{
263
,
-
3
},
/* (255) expr ::= expr MINUS expr */
{
263
,
-
3
},
/* (256) expr ::= expr STAR expr */
{
263
,
-
3
},
/* (257) expr ::= expr SLASH expr */
{
263
,
-
3
},
/* (258) expr ::= expr REM expr */
{
263
,
-
3
},
/* (259) expr ::= expr LIKE expr */
{
263
,
-
3
},
/* (260) expr ::= expr MATCH expr */
{
263
,
-
3
},
/* (261) expr ::= expr NMATCH expr */
{
263
,
-
5
},
/* (262) expr ::= expr IN LP exprlist RP */
{
205
,
-
3
},
/* (263) exprlist ::= exprlist COMMA expritem */
{
205
,
-
1
},
/* (264) exprlist ::= expritem */
{
274
,
-
1
},
/* (265) expritem ::= expr */
{
274
,
0
},
/* (266) expritem ::= */
{
198
,
-
3
},
/* (267) cmd ::= RESET QUERY CACHE */
{
198
,
-
3
},
/* (268) cmd ::= SYNCDB ids REPLICA */
{
198
,
-
7
},
/* (269) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{
198
,
-
7
},
/* (270) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
198
,
-
7
},
/* (271) cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
{
198
,
-
7
},
/* (272) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{
198
,
-
7
},
/* (273) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
198
,
-
8
},
/* (274) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
198
,
-
9
},
/* (275) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{
198
,
-
7
},
/* (276) cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
{
198
,
-
7
},
/* (277) cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
{
198
,
-
7
},
/* (278) cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
{
198
,
-
7
},
/* (279) cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
{
198
,
-
7
},
/* (280) cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
{
198
,
-
7
},
/* (281) cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
{
198
,
-
8
},
/* (282) cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
{
198
,
-
9
},
/* (283) cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
{
198
,
-
7
},
/* (284) cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
{
198
,
-
3
},
/* (285) cmd ::= KILL CONNECTION INTEGER */
{
198
,
-
5
},
/* (286) cmd ::= KILL STREAM INTEGER COLON INTEGER */
{
198
,
-
5
},
/* (287) cmd ::= KILL QUERY INTEGER COLON INTEGER */
};
static
void
yy_accept
(
yyParser
*
);
/* Forward Declaration */
...
...
@@ -2218,9 +2193,9 @@ static void yy_reduce(
/********** Begin reduce actions **********************************************/
YYMINORTYPE
yylhsminor
;
case
0
:
/* program ::= cmd */
case
13
9
:
/* cmd ::= CREATE TABLE create_table_args */
yytestcase
(
yyruleno
==
139
);
case
1
40
:
/* cmd ::= CREATE TABLE create_stable_args */
yytestcase
(
yyruleno
==
140
);
case
1
41
:
/* cmd ::= CREATE STABLE create_stable_args */
yytestcase
(
yyruleno
==
141
);
case
13
2
:
/* cmd ::= CREATE TABLE create_table_args */
yytestcase
(
yyruleno
==
132
);
case
1
33
:
/* cmd ::= CREATE TABLE create_stable_args */
yytestcase
(
yyruleno
==
133
);
case
1
34
:
/* cmd ::= CREATE STABLE create_stable_args */
yytestcase
(
yyruleno
==
134
);
{}
break
;
case
1
:
/* cmd ::= SHOW DATABASES */
...
...
@@ -2396,780 +2371,767 @@ static void yy_reduce(
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_CFG_LOCAL
,
2
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
47
:
/* cmd ::= ALTER DATABASE ids alter_db_optr */
case
48
:
/* cmd ::= ALTER TOPIC ids alter_topic_optr */
yytestcase
(
yyruleno
==
48
);
{
SToken
t
=
{
0
};
setCreateDbInfo
(
pInfo
,
TSDB_SQL_ALTER_DB
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy256
,
&
t
);}
{
SToken
t
=
{
0
};
setCreateDbInfo
(
pInfo
,
TSDB_SQL_ALTER_DB
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy42
,
&
t
);}
break
;
case
4
9
:
/* cmd ::= ALTER ACCOUNT ids acct_optr */
{
setCreateAcctSql
(
pInfo
,
TSDB_SQL_ALTER_ACCT
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
,
&
yymsp
[
0
].
minor
.
yy
277
);}
case
4
8
:
/* cmd ::= ALTER ACCOUNT ids acct_optr */
{
setCreateAcctSql
(
pInfo
,
TSDB_SQL_ALTER_ACCT
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
,
&
yymsp
[
0
].
minor
.
yy
341
);}
break
;
case
50
:
/* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
{
setCreateAcctSql
(
pInfo
,
TSDB_SQL_ALTER_ACCT
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy
277
);}
case
49
:
/* 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
.
yy
341
);}
break
;
case
5
1
:
/* cmd ::= COMPACT VNODES IN LP exprlist RP */
{
setCompactVnodeSql
(
pInfo
,
TSDB_SQL_COMPACT_VNODE
,
yymsp
[
-
1
].
minor
.
yy13
5
);}
case
5
0
:
/* cmd ::= COMPACT VNODES IN LP exprlist RP */
{
setCompactVnodeSql
(
pInfo
,
TSDB_SQL_COMPACT_VNODE
,
yymsp
[
-
1
].
minor
.
yy13
1
);}
break
;
case
5
2
:
/* ids ::= ID */
case
5
3
:
/* ids ::= STRING */
yytestcase
(
yyruleno
==
53
);
case
5
1
:
/* ids ::= ID */
case
5
2
:
/* ids ::= STRING */
yytestcase
(
yyruleno
==
52
);
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
break
;
case
5
4
:
/* ifexists ::= IF EXISTS */
case
5
3
:
/* ifexists ::= IF EXISTS */
{
yymsp
[
-
1
].
minor
.
yy0
.
n
=
1
;}
break
;
case
5
5
:
/* ifexists ::= */
case
5
7
:
/* ifnotexists ::= */
yytestcase
(
yyruleno
==
57
);
case
1
82
:
/* distinct ::= */
yytestcase
(
yyruleno
==
182
);
case
5
4
:
/* ifexists ::= */
case
5
6
:
/* ifnotexists ::= */
yytestcase
(
yyruleno
==
56
);
case
1
75
:
/* distinct ::= */
yytestcase
(
yyruleno
==
175
);
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;}
break
;
case
5
6
:
/* ifnotexists ::= IF NOT EXISTS */
case
5
5
:
/* ifnotexists ::= IF NOT EXISTS */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
=
1
;}
break
;
case
5
8
:
/* cmd ::= CREATE DNODE ids */
case
5
7
:
/* cmd ::= CREATE DNODE ids */
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_CREATE_DNODE
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
5
9
:
/* 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
.
yy
277
);}
case
5
8
:
/* 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
.
yy
341
);}
break
;
case
60
:
/* cmd ::= CREATE DATABASE ifnotexists ids db_optr */
case
61
:
/* cmd ::= CREATE TOPIC ifnotexists ids topic_optr */
yytestcase
(
yyruleno
==
61
);
{
setCreateDbInfo
(
pInfo
,
TSDB_SQL_CREATE_DB
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy256
,
&
yymsp
[
-
2
].
minor
.
yy0
);}
case
59
:
/* cmd ::= CREATE DATABASE ifnotexists ids db_optr */
{
setCreateDbInfo
(
pInfo
,
TSDB_SQL_CREATE_DB
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy42
,
&
yymsp
[
-
2
].
minor
.
yy0
);}
break
;
case
6
2
:
/* cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
{
setCreateFuncInfo
(
pInfo
,
TSDB_SQL_CREATE_FUNCTION
,
&
yymsp
[
-
5
].
minor
.
yy0
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy
304
,
&
yymsp
[
0
].
minor
.
yy0
,
1
);}
case
6
0
:
/* cmd ::= CREATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
{
setCreateFuncInfo
(
pInfo
,
TSDB_SQL_CREATE_FUNCTION
,
&
yymsp
[
-
5
].
minor
.
yy0
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy
290
,
&
yymsp
[
0
].
minor
.
yy0
,
1
);}
break
;
case
6
3
:
/* cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
{
setCreateFuncInfo
(
pInfo
,
TSDB_SQL_CREATE_FUNCTION
,
&
yymsp
[
-
5
].
minor
.
yy0
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy
304
,
&
yymsp
[
0
].
minor
.
yy0
,
2
);}
case
6
1
:
/* cmd ::= CREATE AGGREGATE FUNCTION ids AS ids OUTPUTTYPE typename bufsize */
{
setCreateFuncInfo
(
pInfo
,
TSDB_SQL_CREATE_FUNCTION
,
&
yymsp
[
-
5
].
minor
.
yy0
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy
290
,
&
yymsp
[
0
].
minor
.
yy0
,
2
);}
break
;
case
6
4
:
/* cmd ::= CREATE USER ids PASS ids */
case
6
2
:
/* cmd ::= CREATE USER ids PASS ids */
{
setCreateUserSql
(
pInfo
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
6
5
:
/* bufsize ::= */
case
6
7
:
/* pps ::= */
yytestcase
(
yyruleno
==
67
);
case
6
9
:
/* tseries ::= */
yytestcase
(
yyruleno
==
69
);
case
71
:
/* dbs ::= */
yytestcase
(
yyruleno
==
71
);
case
7
3
:
/* streams ::= */
yytestcase
(
yyruleno
==
73
);
case
7
5
:
/* storage ::= */
yytestcase
(
yyruleno
==
75
);
case
7
7
:
/* qtime ::= */
yytestcase
(
yyruleno
==
77
);
case
7
9
:
/* users ::= */
yytestcase
(
yyruleno
==
79
);
case
81
:
/* conns ::= */
yytestcase
(
yyruleno
==
81
);
case
8
3
:
/* state ::= */
yytestcase
(
yyruleno
==
83
);
case
6
3
:
/* bufsize ::= */
case
6
5
:
/* pps ::= */
yytestcase
(
yyruleno
==
65
);
case
6
7
:
/* tseries ::= */
yytestcase
(
yyruleno
==
67
);
case
69
:
/* dbs ::= */
yytestcase
(
yyruleno
==
69
);
case
7
1
:
/* streams ::= */
yytestcase
(
yyruleno
==
71
);
case
7
3
:
/* storage ::= */
yytestcase
(
yyruleno
==
73
);
case
7
5
:
/* qtime ::= */
yytestcase
(
yyruleno
==
75
);
case
7
7
:
/* users ::= */
yytestcase
(
yyruleno
==
77
);
case
79
:
/* conns ::= */
yytestcase
(
yyruleno
==
79
);
case
8
1
:
/* state ::= */
yytestcase
(
yyruleno
==
81
);
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
}
break
;
case
6
6
:
/* bufsize ::= BUFSIZE INTEGER */
case
6
8
:
/* pps ::= PPS INTEGER */
yytestcase
(
yyruleno
==
68
);
case
70
:
/* tseries ::= TSERIES INTEGER */
yytestcase
(
yyruleno
==
70
);
case
7
2
:
/* dbs ::= DBS INTEGER */
yytestcase
(
yyruleno
==
72
);
case
7
4
:
/* streams ::= STREAMS INTEGER */
yytestcase
(
yyruleno
==
74
);
case
7
6
:
/* storage ::= STORAGE INTEGER */
yytestcase
(
yyruleno
==
76
);
case
7
8
:
/* qtime ::= QTIME INTEGER */
yytestcase
(
yyruleno
==
78
);
case
80
:
/* users ::= USERS INTEGER */
yytestcase
(
yyruleno
==
80
);
case
8
2
:
/* conns ::= CONNS INTEGER */
yytestcase
(
yyruleno
==
82
);
case
8
4
:
/* state ::= STATE ids */
yytestcase
(
yyruleno
==
84
);
case
6
4
:
/* bufsize ::= BUFSIZE INTEGER */
case
6
6
:
/* pps ::= PPS INTEGER */
yytestcase
(
yyruleno
==
66
);
case
68
:
/* tseries ::= TSERIES INTEGER */
yytestcase
(
yyruleno
==
68
);
case
7
0
:
/* dbs ::= DBS INTEGER */
yytestcase
(
yyruleno
==
70
);
case
7
2
:
/* streams ::= STREAMS INTEGER */
yytestcase
(
yyruleno
==
72
);
case
7
4
:
/* storage ::= STORAGE INTEGER */
yytestcase
(
yyruleno
==
74
);
case
7
6
:
/* qtime ::= QTIME INTEGER */
yytestcase
(
yyruleno
==
76
);
case
78
:
/* users ::= USERS INTEGER */
yytestcase
(
yyruleno
==
78
);
case
8
0
:
/* conns ::= CONNS INTEGER */
yytestcase
(
yyruleno
==
80
);
case
8
2
:
/* state ::= STATE ids */
yytestcase
(
yyruleno
==
82
);
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
85
:
/* acct_optr ::= pps tseries storage streams qtime dbs users conns state */
{
yylhsminor
.
yy277
.
maxUsers
=
(
yymsp
[
-
2
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
2
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy277
.
maxDbs
=
(
yymsp
[
-
3
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
3
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy277
.
maxTimeSeries
=
(
yymsp
[
-
7
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
7
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy277
.
maxStreams
=
(
yymsp
[
-
5
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
5
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy277
.
maxPointsPerSecond
=
(
yymsp
[
-
8
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
8
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy277
.
maxStorage
=
(
yymsp
[
-
6
].
minor
.
yy0
.
n
>
0
)
?
strtoll
(
yymsp
[
-
6
].
minor
.
yy0
.
z
,
NULL
,
10
)
:-
1
;
yylhsminor
.
yy277
.
maxQueryTime
=
(
yymsp
[
-
4
].
minor
.
yy0
.
n
>
0
)
?
strtoll
(
yymsp
[
-
4
].
minor
.
yy0
.
z
,
NULL
,
10
)
:-
1
;
yylhsminor
.
yy277
.
maxConnections
=
(
yymsp
[
-
1
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
1
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy277
.
stat
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
-
8
].
minor
.
yy277
=
yylhsminor
.
yy277
;
break
;
case
86
:
/* intitemlist ::= intitemlist COMMA intitem */
case
155
:
/* tagitemlist ::= tagitemlist COMMA tagitem */
yytestcase
(
yyruleno
==
155
);
{
yylhsminor
.
yy135
=
tListItemAppend
(
yymsp
[
-
2
].
minor
.
yy135
,
&
yymsp
[
0
].
minor
.
yy191
,
-
1
);
}
yymsp
[
-
2
].
minor
.
yy135
=
yylhsminor
.
yy135
;
break
;
case
87
:
/* intitemlist ::= intitem */
case
156
:
/* tagitemlist ::= tagitem */
yytestcase
(
yyruleno
==
156
);
{
yylhsminor
.
yy135
=
tListItemAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy191
,
-
1
);
}
yymsp
[
0
].
minor
.
yy135
=
yylhsminor
.
yy135
;
break
;
case
88
:
/* intitem ::= INTEGER */
case
157
:
/* tagitem ::= INTEGER */
yytestcase
(
yyruleno
==
157
);
case
158
:
/* tagitem ::= FLOAT */
yytestcase
(
yyruleno
==
158
);
case
159
:
/* tagitem ::= STRING */
yytestcase
(
yyruleno
==
159
);
case
160
:
/* tagitem ::= BOOL */
yytestcase
(
yyruleno
==
160
);
{
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
taosVariantCreate
(
&
yylhsminor
.
yy191
,
yymsp
[
0
].
minor
.
yy0
.
z
,
yymsp
[
0
].
minor
.
yy0
.
n
,
yymsp
[
0
].
minor
.
yy0
.
type
);
}
yymsp
[
0
].
minor
.
yy191
=
yylhsminor
.
yy191
;
break
;
case
89
:
/* keep ::= KEEP intitemlist */
{
yymsp
[
-
1
].
minor
.
yy135
=
yymsp
[
0
].
minor
.
yy135
;
}
break
;
case
90
:
/* cache ::= CACHE INTEGER */
case
91
:
/* replica ::= REPLICA INTEGER */
yytestcase
(
yyruleno
==
91
);
case
92
:
/* quorum ::= QUORUM INTEGER */
yytestcase
(
yyruleno
==
92
);
case
93
:
/* days ::= DAYS INTEGER */
yytestcase
(
yyruleno
==
93
);
case
94
:
/* minrows ::= MINROWS INTEGER */
yytestcase
(
yyruleno
==
94
);
case
95
:
/* maxrows ::= MAXROWS INTEGER */
yytestcase
(
yyruleno
==
95
);
case
96
:
/* blocks ::= BLOCKS INTEGER */
yytestcase
(
yyruleno
==
96
);
case
97
:
/* ctime ::= CTIME INTEGER */
yytestcase
(
yyruleno
==
97
);
case
98
:
/* wal ::= WAL INTEGER */
yytestcase
(
yyruleno
==
98
);
case
99
:
/* fsync ::= FSYNC INTEGER */
yytestcase
(
yyruleno
==
99
);
case
100
:
/* comp ::= COMP INTEGER */
yytestcase
(
yyruleno
==
100
);
case
101
:
/* prec ::= PRECISION STRING */
yytestcase
(
yyruleno
==
101
);
case
102
:
/* update ::= UPDATE INTEGER */
yytestcase
(
yyruleno
==
102
);
case
103
:
/* cachelast ::= CACHELAST INTEGER */
yytestcase
(
yyruleno
==
103
);
case
104
:
/* partitions ::= PARTITIONS INTEGER */
yytestcase
(
yyruleno
==
104
);
case
83
:
/* acct_optr ::= pps tseries storage streams qtime dbs users conns state */
{
yylhsminor
.
yy341
.
maxUsers
=
(
yymsp
[
-
2
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
2
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy341
.
maxDbs
=
(
yymsp
[
-
3
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
3
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy341
.
maxTimeSeries
=
(
yymsp
[
-
7
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
7
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy341
.
maxStreams
=
(
yymsp
[
-
5
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
5
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy341
.
maxPointsPerSecond
=
(
yymsp
[
-
8
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
8
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy341
.
maxStorage
=
(
yymsp
[
-
6
].
minor
.
yy0
.
n
>
0
)
?
strtoll
(
yymsp
[
-
6
].
minor
.
yy0
.
z
,
NULL
,
10
)
:-
1
;
yylhsminor
.
yy341
.
maxQueryTime
=
(
yymsp
[
-
4
].
minor
.
yy0
.
n
>
0
)
?
strtoll
(
yymsp
[
-
4
].
minor
.
yy0
.
z
,
NULL
,
10
)
:-
1
;
yylhsminor
.
yy341
.
maxConnections
=
(
yymsp
[
-
1
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
1
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy341
.
stat
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
-
8
].
minor
.
yy341
=
yylhsminor
.
yy341
;
break
;
case
84
:
/* intitemlist ::= intitemlist COMMA intitem */
case
148
:
/* tagitemlist ::= tagitemlist COMMA tagitem */
yytestcase
(
yyruleno
==
148
);
{
yylhsminor
.
yy131
=
tListItemAppend
(
yymsp
[
-
2
].
minor
.
yy131
,
&
yymsp
[
0
].
minor
.
yy43
,
-
1
);
}
yymsp
[
-
2
].
minor
.
yy131
=
yylhsminor
.
yy131
;
break
;
case
85
:
/* intitemlist ::= intitem */
case
149
:
/* tagitemlist ::= tagitem */
yytestcase
(
yyruleno
==
149
);
{
yylhsminor
.
yy131
=
tListItemAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy43
,
-
1
);
}
yymsp
[
0
].
minor
.
yy131
=
yylhsminor
.
yy131
;
break
;
case
86
:
/* intitem ::= INTEGER */
case
150
:
/* tagitem ::= INTEGER */
yytestcase
(
yyruleno
==
150
);
case
151
:
/* tagitem ::= FLOAT */
yytestcase
(
yyruleno
==
151
);
case
152
:
/* tagitem ::= STRING */
yytestcase
(
yyruleno
==
152
);
case
153
:
/* tagitem ::= BOOL */
yytestcase
(
yyruleno
==
153
);
{
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
taosVariantCreate
(
&
yylhsminor
.
yy43
,
yymsp
[
0
].
minor
.
yy0
.
z
,
yymsp
[
0
].
minor
.
yy0
.
n
,
yymsp
[
0
].
minor
.
yy0
.
type
);
}
yymsp
[
0
].
minor
.
yy43
=
yylhsminor
.
yy43
;
break
;
case
87
:
/* keep ::= KEEP intitemlist */
{
yymsp
[
-
1
].
minor
.
yy131
=
yymsp
[
0
].
minor
.
yy131
;
}
break
;
case
88
:
/* cache ::= CACHE INTEGER */
case
89
:
/* replica ::= REPLICA INTEGER */
yytestcase
(
yyruleno
==
89
);
case
90
:
/* quorum ::= QUORUM INTEGER */
yytestcase
(
yyruleno
==
90
);
case
91
:
/* days ::= DAYS INTEGER */
yytestcase
(
yyruleno
==
91
);
case
92
:
/* minrows ::= MINROWS INTEGER */
yytestcase
(
yyruleno
==
92
);
case
93
:
/* maxrows ::= MAXROWS INTEGER */
yytestcase
(
yyruleno
==
93
);
case
94
:
/* blocks ::= BLOCKS INTEGER */
yytestcase
(
yyruleno
==
94
);
case
95
:
/* ctime ::= CTIME INTEGER */
yytestcase
(
yyruleno
==
95
);
case
96
:
/* wal ::= WAL INTEGER */
yytestcase
(
yyruleno
==
96
);
case
97
:
/* fsync ::= FSYNC INTEGER */
yytestcase
(
yyruleno
==
97
);
case
98
:
/* comp ::= COMP INTEGER */
yytestcase
(
yyruleno
==
98
);
case
99
:
/* prec ::= PRECISION STRING */
yytestcase
(
yyruleno
==
99
);
case
100
:
/* update ::= UPDATE INTEGER */
yytestcase
(
yyruleno
==
100
);
case
101
:
/* cachelast ::= CACHELAST INTEGER */
yytestcase
(
yyruleno
==
101
);
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
10
5
:
/* db_optr ::= */
{
setDefaultCreateDbOption
(
&
yymsp
[
1
].
minor
.
yy
256
);}
case
10
2
:
/* db_optr ::= */
{
setDefaultCreateDbOption
(
&
yymsp
[
1
].
minor
.
yy
42
);}
break
;
case
10
6
:
/* db_optr ::= db_optr cache */
{
yylhsminor
.
yy
256
=
yymsp
[
-
1
].
minor
.
yy256
;
yylhsminor
.
yy256
.
cacheBlockSize
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
256
=
yylhsminor
.
yy256
;
case
10
3
:
/* db_optr ::= db_optr cache */
{
yylhsminor
.
yy
42
=
yymsp
[
-
1
].
minor
.
yy42
;
yylhsminor
.
yy42
.
cacheBlockSize
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
42
=
yylhsminor
.
yy42
;
break
;
case
10
7
:
/* db_optr ::= db_optr replica */
case
1
24
:
/* alter_db_optr ::= alter_db_optr replica */
yytestcase
(
yyruleno
==
124
);
{
yylhsminor
.
yy
256
=
yymsp
[
-
1
].
minor
.
yy256
;
yylhsminor
.
yy256
.
replica
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
256
=
yylhsminor
.
yy256
;
case
10
4
:
/* db_optr ::= db_optr replica */
case
1
19
:
/* alter_db_optr ::= alter_db_optr replica */
yytestcase
(
yyruleno
==
119
);
{
yylhsminor
.
yy
42
=
yymsp
[
-
1
].
minor
.
yy42
;
yylhsminor
.
yy42
.
replica
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
42
=
yylhsminor
.
yy42
;
break
;
case
10
8
:
/* db_optr ::= db_optr quorum */
case
12
5
:
/* alter_db_optr ::= alter_db_optr quorum */
yytestcase
(
yyruleno
==
125
);
{
yylhsminor
.
yy
256
=
yymsp
[
-
1
].
minor
.
yy256
;
yylhsminor
.
yy256
.
quorum
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
256
=
yylhsminor
.
yy256
;
case
10
5
:
/* db_optr ::= db_optr quorum */
case
12
0
:
/* alter_db_optr ::= alter_db_optr quorum */
yytestcase
(
yyruleno
==
120
);
{
yylhsminor
.
yy
42
=
yymsp
[
-
1
].
minor
.
yy42
;
yylhsminor
.
yy42
.
quorum
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
42
=
yylhsminor
.
yy42
;
break
;
case
10
9
:
/* db_optr ::= db_optr days */
{
yylhsminor
.
yy
256
=
yymsp
[
-
1
].
minor
.
yy256
;
yylhsminor
.
yy256
.
daysPerFile
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
256
=
yylhsminor
.
yy256
;
case
10
6
:
/* db_optr ::= db_optr days */
{
yylhsminor
.
yy
42
=
yymsp
[
-
1
].
minor
.
yy42
;
yylhsminor
.
yy42
.
daysPerFile
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
42
=
yylhsminor
.
yy42
;
break
;
case
1
10
:
/* db_optr ::= db_optr minrows */
{
yylhsminor
.
yy
256
=
yymsp
[
-
1
].
minor
.
yy256
;
yylhsminor
.
yy256
.
minRowsPerBlock
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy
256
=
yylhsminor
.
yy256
;
case
1
07
:
/* db_optr ::= db_optr minrows */
{
yylhsminor
.
yy
42
=
yymsp
[
-
1
].
minor
.
yy42
;
yylhsminor
.
yy42
.
minRowsPerBlock
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy
42
=
yylhsminor
.
yy42
;
break
;
case
1
11
:
/* db_optr ::= db_optr maxrows */
{
yylhsminor
.
yy
256
=
yymsp
[
-
1
].
minor
.
yy256
;
yylhsminor
.
yy256
.
maxRowsPerBlock
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy
256
=
yylhsminor
.
yy256
;
case
1
08
:
/* db_optr ::= db_optr maxrows */
{
yylhsminor
.
yy
42
=
yymsp
[
-
1
].
minor
.
yy42
;
yylhsminor
.
yy42
.
maxRowsPerBlock
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy
42
=
yylhsminor
.
yy42
;
break
;
case
1
12
:
/* db_optr ::= db_optr blocks */
case
12
7
:
/* alter_db_optr ::= alter_db_optr blocks */
yytestcase
(
yyruleno
==
127
);
{
yylhsminor
.
yy
256
=
yymsp
[
-
1
].
minor
.
yy256
;
yylhsminor
.
yy256
.
numOfBlocks
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
256
=
yylhsminor
.
yy256
;
case
1
09
:
/* db_optr ::= db_optr blocks */
case
12
2
:
/* alter_db_optr ::= alter_db_optr blocks */
yytestcase
(
yyruleno
==
122
);
{
yylhsminor
.
yy
42
=
yymsp
[
-
1
].
minor
.
yy42
;
yylhsminor
.
yy42
.
numOfBlocks
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
42
=
yylhsminor
.
yy42
;
break
;
case
11
3
:
/* db_optr ::= db_optr ctime */
{
yylhsminor
.
yy
256
=
yymsp
[
-
1
].
minor
.
yy256
;
yylhsminor
.
yy256
.
commitTime
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
256
=
yylhsminor
.
yy256
;
case
11
0
:
/* db_optr ::= db_optr ctime */
{
yylhsminor
.
yy
42
=
yymsp
[
-
1
].
minor
.
yy42
;
yylhsminor
.
yy42
.
commitTime
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
42
=
yylhsminor
.
yy42
;
break
;
case
11
4
:
/* db_optr ::= db_optr wal */
{
yylhsminor
.
yy
256
=
yymsp
[
-
1
].
minor
.
yy256
;
yylhsminor
.
yy256
.
walLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
256
=
yylhsminor
.
yy256
;
case
11
1
:
/* db_optr ::= db_optr wal */
{
yylhsminor
.
yy
42
=
yymsp
[
-
1
].
minor
.
yy42
;
yylhsminor
.
yy42
.
walLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy
42
=
yylhsminor
.
yy42
;
break
;
case
115
:
/* db_optr ::= db_optr fsync */
{
yylhsminor
.
yy256
=
yymsp
[
-
1
].
minor
.
yy256
;
yylhsminor
.
yy256
.
fsyncPeriod
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy256
=
yylhsminor
.
yy256
;
break
;
case
116
:
/* db_optr ::= db_optr comp */
case
128
:
/* alter_db_optr ::= alter_db_optr comp */
yytestcase
(
yyruleno
==
128
);
{
yylhsminor
.
yy256
=
yymsp
[
-
1
].
minor
.
yy256
;
yylhsminor
.
yy256
.
compressionLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy256
=
yylhsminor
.
yy256
;
break
;
case
117
:
/* db_optr ::= db_optr prec */
{
yylhsminor
.
yy256
=
yymsp
[
-
1
].
minor
.
yy256
;
yylhsminor
.
yy256
.
precision
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
-
1
].
minor
.
yy256
=
yylhsminor
.
yy256
;
case
112
:
/* db_optr ::= db_optr fsync */
{
yylhsminor
.
yy42
=
yymsp
[
-
1
].
minor
.
yy42
;
yylhsminor
.
yy42
.
fsyncPeriod
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy42
=
yylhsminor
.
yy42
;
break
;
case
11
8
:
/* db_optr ::= db_optr kee
p */
case
12
6
:
/* alter_db_optr ::= alter_db_optr keep */
yytestcase
(
yyruleno
==
126
);
{
yylhsminor
.
yy
256
=
yymsp
[
-
1
].
minor
.
yy256
;
yylhsminor
.
yy256
.
keep
=
yymsp
[
0
].
minor
.
yy135
;
}
yymsp
[
-
1
].
minor
.
yy
256
=
yylhsminor
.
yy256
;
case
11
3
:
/* db_optr ::= db_optr com
p */
case
12
3
:
/* alter_db_optr ::= alter_db_optr comp */
yytestcase
(
yyruleno
==
123
);
{
yylhsminor
.
yy
42
=
yymsp
[
-
1
].
minor
.
yy42
;
yylhsminor
.
yy42
.
compressionLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
)
;
}
yymsp
[
-
1
].
minor
.
yy
42
=
yylhsminor
.
yy42
;
break
;
case
119
:
/* db_optr ::= db_optr update */
case
129
:
/* alter_db_optr ::= alter_db_optr update */
yytestcase
(
yyruleno
==
129
);
{
yylhsminor
.
yy256
=
yymsp
[
-
1
].
minor
.
yy256
;
yylhsminor
.
yy256
.
update
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy256
=
yylhsminor
.
yy256
;
case
114
:
/* db_optr ::= db_optr prec */
{
yylhsminor
.
yy42
=
yymsp
[
-
1
].
minor
.
yy42
;
yylhsminor
.
yy42
.
precision
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
-
1
].
minor
.
yy42
=
yylhsminor
.
yy42
;
break
;
case
1
20
:
/* db_optr ::= db_optr cachelast
*/
case
1
30
:
/* alter_db_optr ::= alter_db_optr cachelast */
yytestcase
(
yyruleno
==
130
);
{
yylhsminor
.
yy
256
=
yymsp
[
-
1
].
minor
.
yy256
;
yylhsminor
.
yy256
.
cachelast
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
)
;
}
yymsp
[
-
1
].
minor
.
yy
256
=
yylhsminor
.
yy256
;
case
1
15
:
/* db_optr ::= db_optr keep
*/
case
1
21
:
/* alter_db_optr ::= alter_db_optr keep */
yytestcase
(
yyruleno
==
121
);
{
yylhsminor
.
yy
42
=
yymsp
[
-
1
].
minor
.
yy42
;
yylhsminor
.
yy42
.
keep
=
yymsp
[
0
].
minor
.
yy131
;
}
yymsp
[
-
1
].
minor
.
yy
42
=
yylhsminor
.
yy42
;
break
;
case
1
21
:
/* topic_optr ::= db_optr
*/
case
1
31
:
/* alter_topic_optr ::= alter_db_optr */
yytestcase
(
yyruleno
==
131
);
{
yylhsminor
.
yy
256
=
yymsp
[
0
].
minor
.
yy256
;
}
yymsp
[
0
].
minor
.
yy256
=
yylhsminor
.
yy256
;
case
1
16
:
/* db_optr ::= db_optr update
*/
case
1
24
:
/* alter_db_optr ::= alter_db_optr update */
yytestcase
(
yyruleno
==
124
);
{
yylhsminor
.
yy
42
=
yymsp
[
-
1
].
minor
.
yy42
;
yylhsminor
.
yy42
.
update
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy42
=
yylhsminor
.
yy42
;
break
;
case
1
22
:
/* topic_optr ::= topic_optr partitions
*/
case
1
32
:
/* alter_topic_optr ::= alter_topic_optr partitions */
yytestcase
(
yyruleno
==
132
);
{
yylhsminor
.
yy
256
=
yymsp
[
-
1
].
minor
.
yy256
;
}
yymsp
[
-
1
].
minor
.
yy
256
=
yylhsminor
.
yy256
;
case
1
17
:
/* db_optr ::= db_optr cachelast
*/
case
1
25
:
/* alter_db_optr ::= alter_db_optr cachelast */
yytestcase
(
yyruleno
==
125
);
{
yylhsminor
.
yy
42
=
yymsp
[
-
1
].
minor
.
yy42
;
yylhsminor
.
yy42
.
cachelast
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
)
;
}
yymsp
[
-
1
].
minor
.
yy
42
=
yylhsminor
.
yy42
;
break
;
case
1
23
:
/* alter_db_optr ::= */
{
setDefaultCreateDbOption
(
&
yymsp
[
1
].
minor
.
yy
256
);
}
case
1
18
:
/* alter_db_optr ::= */
{
setDefaultCreateDbOption
(
&
yymsp
[
1
].
minor
.
yy
42
);
}
break
;
case
1
33
:
/* typename ::= ids */
case
1
26
:
/* typename ::= ids */
{
yymsp
[
0
].
minor
.
yy0
.
type
=
0
;
tSetColumnType
(
&
yylhsminor
.
yy
304
,
&
yymsp
[
0
].
minor
.
yy0
);
tSetColumnType
(
&
yylhsminor
.
yy
290
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
0
].
minor
.
yy
304
=
yylhsminor
.
yy304
;
yymsp
[
0
].
minor
.
yy
290
=
yylhsminor
.
yy290
;
break
;
case
1
34
:
/* typename ::= ids LP signed RP */
case
1
27
:
/* typename ::= ids LP signed RP */
{
if
(
yymsp
[
-
1
].
minor
.
yy
531
<=
0
)
{
if
(
yymsp
[
-
1
].
minor
.
yy
459
<=
0
)
{
yymsp
[
-
3
].
minor
.
yy0
.
type
=
0
;
tSetColumnType
(
&
yylhsminor
.
yy
304
,
&
yymsp
[
-
3
].
minor
.
yy0
);
tSetColumnType
(
&
yylhsminor
.
yy
290
,
&
yymsp
[
-
3
].
minor
.
yy0
);
}
else
{
yymsp
[
-
3
].
minor
.
yy0
.
type
=
-
yymsp
[
-
1
].
minor
.
yy
531
;
// negative value of name length
tSetColumnType
(
&
yylhsminor
.
yy
304
,
&
yymsp
[
-
3
].
minor
.
yy0
);
yymsp
[
-
3
].
minor
.
yy0
.
type
=
-
yymsp
[
-
1
].
minor
.
yy
459
;
// negative value of name length
tSetColumnType
(
&
yylhsminor
.
yy
290
,
&
yymsp
[
-
3
].
minor
.
yy0
);
}
}
yymsp
[
-
3
].
minor
.
yy
304
=
yylhsminor
.
yy304
;
yymsp
[
-
3
].
minor
.
yy
290
=
yylhsminor
.
yy290
;
break
;
case
1
35
:
/* typename ::= ids UNSIGNED */
case
1
28
:
/* 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
.
yy
304
,
&
yymsp
[
-
1
].
minor
.
yy0
);
tSetColumnType
(
&
yylhsminor
.
yy
290
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
yymsp
[
-
1
].
minor
.
yy
304
=
yylhsminor
.
yy304
;
yymsp
[
-
1
].
minor
.
yy
290
=
yylhsminor
.
yy290
;
break
;
case
1
36
:
/* signed ::= INTEGER */
{
yylhsminor
.
yy
531
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
0
].
minor
.
yy
531
=
yylhsminor
.
yy531
;
case
1
29
:
/* signed ::= INTEGER */
{
yylhsminor
.
yy
459
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
0
].
minor
.
yy
459
=
yylhsminor
.
yy459
;
break
;
case
13
7
:
/* signed ::= PLUS INTEGER */
{
yymsp
[
-
1
].
minor
.
yy
531
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
case
13
0
:
/* signed ::= PLUS INTEGER */
{
yymsp
[
-
1
].
minor
.
yy
459
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
case
13
8
:
/* signed ::= MINUS INTEGER */
{
yymsp
[
-
1
].
minor
.
yy
531
=
-
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);}
case
13
1
:
/* signed ::= MINUS INTEGER */
{
yymsp
[
-
1
].
minor
.
yy
459
=
-
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);}
break
;
case
1
42
:
/* cmd ::= CREATE TABLE create_table_list */
{
pInfo
->
type
=
TSDB_SQL_CREATE_TABLE
;
pInfo
->
pCreateTableInfo
=
yymsp
[
0
].
minor
.
yy
110
;}
case
1
35
:
/* cmd ::= CREATE TABLE create_table_list */
{
pInfo
->
type
=
TSDB_SQL_CREATE_TABLE
;
pInfo
->
pCreateTableInfo
=
yymsp
[
0
].
minor
.
yy
272
;}
break
;
case
1
43
:
/* create_table_list ::= create_from_stable */
case
1
36
:
/* create_table_list ::= create_from_stable */
{
SCreateTableSql
*
pCreateTable
=
calloc
(
1
,
sizeof
(
SCreateTableSql
));
pCreateTable
->
childTableInfo
=
taosArrayInit
(
4
,
sizeof
(
SCreatedTableInfo
));
taosArrayPush
(
pCreateTable
->
childTableInfo
,
&
yymsp
[
0
].
minor
.
yy
78
);
taosArrayPush
(
pCreateTable
->
childTableInfo
,
&
yymsp
[
0
].
minor
.
yy
96
);
pCreateTable
->
type
=
TSQL_CREATE_CTABLE
;
yylhsminor
.
yy
110
=
pCreateTable
;
yylhsminor
.
yy
272
=
pCreateTable
;
}
yymsp
[
0
].
minor
.
yy
110
=
yylhsminor
.
yy110
;
yymsp
[
0
].
minor
.
yy
272
=
yylhsminor
.
yy272
;
break
;
case
1
44
:
/* create_table_list ::= create_table_list create_from_stable */
case
1
37
:
/* create_table_list ::= create_table_list create_from_stable */
{
taosArrayPush
(
yymsp
[
-
1
].
minor
.
yy
110
->
childTableInfo
,
&
yymsp
[
0
].
minor
.
yy78
);
yylhsminor
.
yy
110
=
yymsp
[
-
1
].
minor
.
yy110
;
taosArrayPush
(
yymsp
[
-
1
].
minor
.
yy
272
->
childTableInfo
,
&
yymsp
[
0
].
minor
.
yy96
);
yylhsminor
.
yy
272
=
yymsp
[
-
1
].
minor
.
yy272
;
}
yymsp
[
-
1
].
minor
.
yy
110
=
yylhsminor
.
yy110
;
yymsp
[
-
1
].
minor
.
yy
272
=
yylhsminor
.
yy272
;
break
;
case
1
45
:
/* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
case
1
38
:
/* create_table_args ::= ifnotexists ids cpxName LP columnlist RP */
{
yylhsminor
.
yy
110
=
tSetCreateTableInfo
(
yymsp
[
-
1
].
minor
.
yy135
,
NULL
,
NULL
,
TSQL_CREATE_TABLE
);
setSqlInfo
(
pInfo
,
yylhsminor
.
yy
110
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
yylhsminor
.
yy
272
=
tSetCreateTableInfo
(
yymsp
[
-
1
].
minor
.
yy131
,
NULL
,
NULL
,
TSQL_CREATE_TABLE
);
setSqlInfo
(
pInfo
,
yylhsminor
.
yy
272
,
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
.
yy
110
=
yylhsminor
.
yy110
;
yymsp
[
-
5
].
minor
.
yy
272
=
yylhsminor
.
yy272
;
break
;
case
1
46
:
/* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
case
1
39
:
/* create_stable_args ::= ifnotexists ids cpxName LP columnlist RP TAGS LP columnlist RP */
{
yylhsminor
.
yy
110
=
tSetCreateTableInfo
(
yymsp
[
-
5
].
minor
.
yy135
,
yymsp
[
-
1
].
minor
.
yy135
,
NULL
,
TSQL_CREATE_STABLE
);
setSqlInfo
(
pInfo
,
yylhsminor
.
yy
110
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
yylhsminor
.
yy
272
=
tSetCreateTableInfo
(
yymsp
[
-
5
].
minor
.
yy131
,
yymsp
[
-
1
].
minor
.
yy131
,
NULL
,
TSQL_CREATE_STABLE
);
setSqlInfo
(
pInfo
,
yylhsminor
.
yy
272
,
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
.
yy
110
=
yylhsminor
.
yy110
;
yymsp
[
-
9
].
minor
.
yy
272
=
yylhsminor
.
yy272
;
break
;
case
14
7
:
/* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName TAGS LP tagitemlist RP */
case
14
0
:
/* 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
.
yy
78
=
createNewChildTableInfo
(
&
yymsp
[
-
5
].
minor
.
yy0
,
NULL
,
yymsp
[
-
1
].
minor
.
yy135
,
&
yymsp
[
-
8
].
minor
.
yy0
,
&
yymsp
[
-
9
].
minor
.
yy0
);
yylhsminor
.
yy
96
=
createNewChildTableInfo
(
&
yymsp
[
-
5
].
minor
.
yy0
,
NULL
,
yymsp
[
-
1
].
minor
.
yy131
,
&
yymsp
[
-
8
].
minor
.
yy0
,
&
yymsp
[
-
9
].
minor
.
yy0
);
}
yymsp
[
-
9
].
minor
.
yy
78
=
yylhsminor
.
yy78
;
yymsp
[
-
9
].
minor
.
yy
96
=
yylhsminor
.
yy96
;
break
;
case
14
8
:
/* create_from_stable ::= ifnotexists ids cpxName USING ids cpxName LP tagNamelist RP TAGS LP tagitemlist RP */
case
14
1
:
/* 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
.
yy
78
=
createNewChildTableInfo
(
&
yymsp
[
-
8
].
minor
.
yy0
,
yymsp
[
-
5
].
minor
.
yy135
,
yymsp
[
-
1
].
minor
.
yy135
,
&
yymsp
[
-
11
].
minor
.
yy0
,
&
yymsp
[
-
12
].
minor
.
yy0
);
yylhsminor
.
yy
96
=
createNewChildTableInfo
(
&
yymsp
[
-
8
].
minor
.
yy0
,
yymsp
[
-
5
].
minor
.
yy131
,
yymsp
[
-
1
].
minor
.
yy131
,
&
yymsp
[
-
11
].
minor
.
yy0
,
&
yymsp
[
-
12
].
minor
.
yy0
);
}
yymsp
[
-
12
].
minor
.
yy
78
=
yylhsminor
.
yy78
;
yymsp
[
-
12
].
minor
.
yy
96
=
yylhsminor
.
yy96
;
break
;
case
14
9
:
/* tagNamelist ::= tagNamelist COMMA ids */
{
taosArrayPush
(
yymsp
[
-
2
].
minor
.
yy13
5
,
&
yymsp
[
0
].
minor
.
yy0
);
yylhsminor
.
yy135
=
yymsp
[
-
2
].
minor
.
yy135
;
}
yymsp
[
-
2
].
minor
.
yy13
5
=
yylhsminor
.
yy135
;
case
14
2
:
/* tagNamelist ::= tagNamelist COMMA ids */
{
taosArrayPush
(
yymsp
[
-
2
].
minor
.
yy13
1
,
&
yymsp
[
0
].
minor
.
yy0
);
yylhsminor
.
yy131
=
yymsp
[
-
2
].
minor
.
yy131
;
}
yymsp
[
-
2
].
minor
.
yy13
1
=
yylhsminor
.
yy131
;
break
;
case
1
50
:
/* tagNamelist ::= ids */
{
yylhsminor
.
yy13
5
=
taosArrayInit
(
4
,
sizeof
(
SToken
));
taosArrayPush
(
yylhsminor
.
yy135
,
&
yymsp
[
0
].
minor
.
yy0
);}
yymsp
[
0
].
minor
.
yy13
5
=
yylhsminor
.
yy135
;
case
1
43
:
/* tagNamelist ::= ids */
{
yylhsminor
.
yy13
1
=
taosArrayInit
(
4
,
sizeof
(
SToken
));
taosArrayPush
(
yylhsminor
.
yy131
,
&
yymsp
[
0
].
minor
.
yy0
);}
yymsp
[
0
].
minor
.
yy13
1
=
yylhsminor
.
yy131
;
break
;
case
1
51
:
/* create_table_args ::= ifnotexists ids cpxName AS select */
case
1
44
:
/* create_table_args ::= ifnotexists ids cpxName AS select */
{
yylhsminor
.
yy
110
=
tSetCreateTableInfo
(
NULL
,
NULL
,
yymsp
[
0
].
minor
.
yy488
,
TSQL_CREATE_STREAM
);
setSqlInfo
(
pInfo
,
yylhsminor
.
yy
110
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
yylhsminor
.
yy
272
=
tSetCreateTableInfo
(
NULL
,
NULL
,
yymsp
[
0
].
minor
.
yy256
,
TSQL_CREATE_STREAM
);
setSqlInfo
(
pInfo
,
yylhsminor
.
yy
272
,
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
.
yy
110
=
yylhsminor
.
yy110
;
yymsp
[
-
4
].
minor
.
yy
272
=
yylhsminor
.
yy272
;
break
;
case
1
52
:
/* columnlist ::= columnlist COMMA column */
{
taosArrayPush
(
yymsp
[
-
2
].
minor
.
yy13
5
,
&
yymsp
[
0
].
minor
.
yy304
);
yylhsminor
.
yy135
=
yymsp
[
-
2
].
minor
.
yy135
;
}
yymsp
[
-
2
].
minor
.
yy13
5
=
yylhsminor
.
yy135
;
case
1
45
:
/* columnlist ::= columnlist COMMA column */
{
taosArrayPush
(
yymsp
[
-
2
].
minor
.
yy13
1
,
&
yymsp
[
0
].
minor
.
yy290
);
yylhsminor
.
yy131
=
yymsp
[
-
2
].
minor
.
yy131
;
}
yymsp
[
-
2
].
minor
.
yy13
1
=
yylhsminor
.
yy131
;
break
;
case
1
53
:
/* columnlist ::= column */
{
yylhsminor
.
yy13
5
=
taosArrayInit
(
4
,
sizeof
(
SField
));
taosArrayPush
(
yylhsminor
.
yy135
,
&
yymsp
[
0
].
minor
.
yy304
);}
yymsp
[
0
].
minor
.
yy13
5
=
yylhsminor
.
yy135
;
case
1
46
:
/* columnlist ::= column */
{
yylhsminor
.
yy13
1
=
taosArrayInit
(
4
,
sizeof
(
SField
));
taosArrayPush
(
yylhsminor
.
yy131
,
&
yymsp
[
0
].
minor
.
yy290
);}
yymsp
[
0
].
minor
.
yy13
1
=
yylhsminor
.
yy131
;
break
;
case
1
54
:
/* column ::= ids typename */
case
1
47
:
/* column ::= ids typename */
{
tSetColumnInfo
(
&
yylhsminor
.
yy
304
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy304
);
tSetColumnInfo
(
&
yylhsminor
.
yy
290
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy290
);
}
yymsp
[
-
1
].
minor
.
yy
304
=
yylhsminor
.
yy304
;
yymsp
[
-
1
].
minor
.
yy
290
=
yylhsminor
.
yy290
;
break
;
case
1
61
:
/* tagitem ::= NULL */
{
yymsp
[
0
].
minor
.
yy0
.
type
=
0
;
taosVariantCreate
(
&
yylhsminor
.
yy
191
,
yymsp
[
0
].
minor
.
yy0
.
z
,
yymsp
[
0
].
minor
.
yy0
.
n
,
yymsp
[
0
].
minor
.
yy0
.
type
);
}
yymsp
[
0
].
minor
.
yy
191
=
yylhsminor
.
yy191
;
case
1
54
:
/* tagitem ::= NULL */
{
yymsp
[
0
].
minor
.
yy0
.
type
=
0
;
taosVariantCreate
(
&
yylhsminor
.
yy
43
,
yymsp
[
0
].
minor
.
yy0
.
z
,
yymsp
[
0
].
minor
.
yy0
.
n
,
yymsp
[
0
].
minor
.
yy0
.
type
);
}
yymsp
[
0
].
minor
.
yy
43
=
yylhsminor
.
yy43
;
break
;
case
1
62
:
/* tagitem ::= NOW */
{
yymsp
[
0
].
minor
.
yy0
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
;
taosVariantCreate
(
&
yylhsminor
.
yy
191
,
yymsp
[
0
].
minor
.
yy0
.
z
,
yymsp
[
0
].
minor
.
yy0
.
n
,
yymsp
[
0
].
minor
.
yy0
.
type
);}
yymsp
[
0
].
minor
.
yy
191
=
yylhsminor
.
yy191
;
case
1
55
:
/* tagitem ::= NOW */
{
yymsp
[
0
].
minor
.
yy0
.
type
=
TSDB_DATA_TYPE_TIMESTAMP
;
taosVariantCreate
(
&
yylhsminor
.
yy
43
,
yymsp
[
0
].
minor
.
yy0
.
z
,
yymsp
[
0
].
minor
.
yy0
.
n
,
yymsp
[
0
].
minor
.
yy0
.
type
);}
yymsp
[
0
].
minor
.
yy
43
=
yylhsminor
.
yy43
;
break
;
case
1
63
:
/* tagitem ::= MINUS INTEGER */
case
1
64
:
/* tagitem ::= MINUS FLOAT */
yytestcase
(
yyruleno
==
164
);
case
1
65
:
/* tagitem ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
165
);
case
1
66
:
/* tagitem ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
166
);
case
1
56
:
/* tagitem ::= MINUS INTEGER */
case
1
57
:
/* tagitem ::= MINUS FLOAT */
yytestcase
(
yyruleno
==
157
);
case
1
58
:
/* tagitem ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
158
);
case
1
59
:
/* 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
);
taosVariantCreate
(
&
yylhsminor
.
yy
191
,
yymsp
[
-
1
].
minor
.
yy0
.
z
,
yymsp
[
-
1
].
minor
.
yy0
.
n
,
yymsp
[
-
1
].
minor
.
yy0
.
type
);
taosVariantCreate
(
&
yylhsminor
.
yy
43
,
yymsp
[
-
1
].
minor
.
yy0
.
z
,
yymsp
[
-
1
].
minor
.
yy0
.
n
,
yymsp
[
-
1
].
minor
.
yy0
.
type
);
}
yymsp
[
-
1
].
minor
.
yy
191
=
yylhsminor
.
yy191
;
yymsp
[
-
1
].
minor
.
yy
43
=
yylhsminor
.
yy43
;
break
;
case
16
7
:
/* select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */
case
16
0
:
/* select ::= SELECT selcollist from where_opt interval_option sliding_opt session_option windowstate_option fill_opt groupby_opt having_opt orderby_opt slimit_opt limit_opt */
{
yylhsminor
.
yy
488
=
tSetQuerySqlNode
(
&
yymsp
[
-
13
].
minor
.
yy0
,
yymsp
[
-
12
].
minor
.
yy135
,
yymsp
[
-
11
].
minor
.
yy460
,
yymsp
[
-
10
].
minor
.
yy526
,
yymsp
[
-
4
].
minor
.
yy135
,
yymsp
[
-
2
].
minor
.
yy135
,
&
yymsp
[
-
9
].
minor
.
yy160
,
&
yymsp
[
-
7
].
minor
.
yy511
,
&
yymsp
[
-
6
].
minor
.
yy258
,
&
yymsp
[
-
8
].
minor
.
yy0
,
yymsp
[
-
5
].
minor
.
yy135
,
&
yymsp
[
0
].
minor
.
yy247
,
&
yymsp
[
-
1
].
minor
.
yy247
,
yymsp
[
-
3
].
minor
.
yy52
6
);
yylhsminor
.
yy
256
=
tSetQuerySqlNode
(
&
yymsp
[
-
13
].
minor
.
yy0
,
yymsp
[
-
12
].
minor
.
yy131
,
yymsp
[
-
11
].
minor
.
yy544
,
yymsp
[
-
10
].
minor
.
yy46
,
yymsp
[
-
4
].
minor
.
yy131
,
yymsp
[
-
2
].
minor
.
yy131
,
&
yymsp
[
-
9
].
minor
.
yy530
,
&
yymsp
[
-
7
].
minor
.
yy39
,
&
yymsp
[
-
6
].
minor
.
yy538
,
&
yymsp
[
-
8
].
minor
.
yy0
,
yymsp
[
-
5
].
minor
.
yy131
,
&
yymsp
[
0
].
minor
.
yy55
,
&
yymsp
[
-
1
].
minor
.
yy55
,
yymsp
[
-
3
].
minor
.
yy4
6
);
}
yymsp
[
-
13
].
minor
.
yy
488
=
yylhsminor
.
yy488
;
yymsp
[
-
13
].
minor
.
yy
256
=
yylhsminor
.
yy256
;
break
;
case
16
8
:
/* select ::= LP select RP */
{
yymsp
[
-
2
].
minor
.
yy
488
=
yymsp
[
-
1
].
minor
.
yy488
;}
case
16
1
:
/* select ::= LP select RP */
{
yymsp
[
-
2
].
minor
.
yy
256
=
yymsp
[
-
1
].
minor
.
yy256
;}
break
;
case
16
9
:
/* union ::= select */
{
yylhsminor
.
yy
551
=
setSubclause
(
NULL
,
yymsp
[
0
].
minor
.
yy488
);
}
yymsp
[
0
].
minor
.
yy
551
=
yylhsminor
.
yy551
;
case
16
2
:
/* union ::= select */
{
yylhsminor
.
yy
303
=
setSubclause
(
NULL
,
yymsp
[
0
].
minor
.
yy256
);
}
yymsp
[
0
].
minor
.
yy
303
=
yylhsminor
.
yy303
;
break
;
case
1
70
:
/* union ::= union UNION ALL select */
{
yylhsminor
.
yy
551
=
appendSelectClause
(
yymsp
[
-
3
].
minor
.
yy551
,
SQL_TYPE_UNIONALL
,
yymsp
[
0
].
minor
.
yy488
);
}
yymsp
[
-
3
].
minor
.
yy
551
=
yylhsminor
.
yy551
;
case
1
63
:
/* union ::= union UNION ALL select */
{
yylhsminor
.
yy
303
=
appendSelectClause
(
yymsp
[
-
3
].
minor
.
yy303
,
SQL_TYPE_UNIONALL
,
yymsp
[
0
].
minor
.
yy256
);
}
yymsp
[
-
3
].
minor
.
yy
303
=
yylhsminor
.
yy303
;
break
;
case
1
71
:
/* union ::= union UNION select */
{
yylhsminor
.
yy
551
=
appendSelectClause
(
yymsp
[
-
2
].
minor
.
yy551
,
SQL_TYPE_UNION
,
yymsp
[
0
].
minor
.
yy488
);
}
yymsp
[
-
2
].
minor
.
yy
551
=
yylhsminor
.
yy551
;
case
1
64
:
/* union ::= union UNION select */
{
yylhsminor
.
yy
303
=
appendSelectClause
(
yymsp
[
-
2
].
minor
.
yy303
,
SQL_TYPE_UNION
,
yymsp
[
0
].
minor
.
yy256
);
}
yymsp
[
-
2
].
minor
.
yy
303
=
yylhsminor
.
yy303
;
break
;
case
1
72
:
/* cmd ::= union */
{
setSqlInfo
(
pInfo
,
yymsp
[
0
].
minor
.
yy
551
,
NULL
,
TSDB_SQL_SELECT
);
}
case
1
65
:
/* cmd ::= union */
{
setSqlInfo
(
pInfo
,
yymsp
[
0
].
minor
.
yy
303
,
NULL
,
TSDB_SQL_SELECT
);
}
break
;
case
1
73
:
/* select ::= SELECT selcollist */
case
1
66
:
/* select ::= SELECT selcollist */
{
yylhsminor
.
yy
488
=
tSetQuerySqlNode
(
&
yymsp
[
-
1
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy135
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
yylhsminor
.
yy
256
=
tSetQuerySqlNode
(
&
yymsp
[
-
1
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy131
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy
488
=
yylhsminor
.
yy488
;
yymsp
[
-
1
].
minor
.
yy
256
=
yylhsminor
.
yy256
;
break
;
case
1
74
:
/* sclp ::= selcollist COMMA */
{
yylhsminor
.
yy13
5
=
yymsp
[
-
1
].
minor
.
yy135
;}
yymsp
[
-
1
].
minor
.
yy13
5
=
yylhsminor
.
yy135
;
case
1
67
:
/* sclp ::= selcollist COMMA */
{
yylhsminor
.
yy13
1
=
yymsp
[
-
1
].
minor
.
yy131
;}
yymsp
[
-
1
].
minor
.
yy13
1
=
yylhsminor
.
yy131
;
break
;
case
1
75
:
/* sclp ::= */
case
20
7
:
/* orderby_opt ::= */
yytestcase
(
yyruleno
==
207
);
{
yymsp
[
1
].
minor
.
yy13
5
=
0
;}
case
1
68
:
/* sclp ::= */
case
20
0
:
/* orderby_opt ::= */
yytestcase
(
yyruleno
==
200
);
{
yymsp
[
1
].
minor
.
yy13
1
=
0
;}
break
;
case
1
76
:
/* selcollist ::= sclp distinct expr as */
case
1
69
:
/* selcollist ::= sclp distinct expr as */
{
yylhsminor
.
yy13
5
=
tSqlExprListAppend
(
yymsp
[
-
3
].
minor
.
yy135
,
yymsp
[
-
1
].
minor
.
yy52
6
,
yymsp
[
-
2
].
minor
.
yy0
.
n
?
&
yymsp
[
-
2
].
minor
.
yy0
:
0
,
yymsp
[
0
].
minor
.
yy0
.
n
?&
yymsp
[
0
].
minor
.
yy0
:
0
);
yylhsminor
.
yy13
1
=
tSqlExprListAppend
(
yymsp
[
-
3
].
minor
.
yy131
,
yymsp
[
-
1
].
minor
.
yy4
6
,
yymsp
[
-
2
].
minor
.
yy0
.
n
?
&
yymsp
[
-
2
].
minor
.
yy0
:
0
,
yymsp
[
0
].
minor
.
yy0
.
n
?&
yymsp
[
0
].
minor
.
yy0
:
0
);
}
yymsp
[
-
3
].
minor
.
yy13
5
=
yylhsminor
.
yy135
;
yymsp
[
-
3
].
minor
.
yy13
1
=
yylhsminor
.
yy131
;
break
;
case
17
7
:
/* selcollist ::= sclp STAR */
case
17
0
:
/* selcollist ::= sclp STAR */
{
tSqlExpr
*
pNode
=
tSqlExprCreateIdValue
(
NULL
,
TK_ALL
);
yylhsminor
.
yy13
5
=
tSqlExprListAppend
(
yymsp
[
-
1
].
minor
.
yy135
,
pNode
,
0
,
0
);
yylhsminor
.
yy13
1
=
tSqlExprListAppend
(
yymsp
[
-
1
].
minor
.
yy131
,
pNode
,
0
,
0
);
}
yymsp
[
-
1
].
minor
.
yy13
5
=
yylhsminor
.
yy135
;
yymsp
[
-
1
].
minor
.
yy13
1
=
yylhsminor
.
yy131
;
break
;
case
17
8
:
/* as ::= AS ids */
case
17
1
:
/* as ::= AS ids */
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
case
17
9
:
/* as ::= ids */
case
17
2
:
/* as ::= ids */
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
break
;
case
1
80
:
/* as ::= */
case
1
73
:
/* as ::= */
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
}
break
;
case
1
81
:
/* distinct ::= DISTINCT */
case
1
74
:
/* distinct ::= DISTINCT */
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
break
;
case
1
83
:
/* from ::= FROM tablelist */
case
1
84
:
/* from ::= FROM sub */
yytestcase
(
yyruleno
==
184
);
{
yymsp
[
-
1
].
minor
.
yy
460
=
yymsp
[
0
].
minor
.
yy460
;}
case
1
76
:
/* from ::= FROM tablelist */
case
1
77
:
/* from ::= FROM sub */
yytestcase
(
yyruleno
==
177
);
{
yymsp
[
-
1
].
minor
.
yy
544
=
yymsp
[
0
].
minor
.
yy544
;}
break
;
case
1
85
:
/* sub ::= LP union RP */
{
yymsp
[
-
2
].
minor
.
yy
460
=
addSubquery
(
NULL
,
yymsp
[
-
1
].
minor
.
yy551
,
NULL
);}
case
1
78
:
/* sub ::= LP union RP */
{
yymsp
[
-
2
].
minor
.
yy
544
=
addSubquery
(
NULL
,
yymsp
[
-
1
].
minor
.
yy303
,
NULL
);}
break
;
case
1
86
:
/* sub ::= LP union RP ids */
{
yymsp
[
-
3
].
minor
.
yy
460
=
addSubquery
(
NULL
,
yymsp
[
-
2
].
minor
.
yy551
,
&
yymsp
[
0
].
minor
.
yy0
);}
case
1
79
:
/* sub ::= LP union RP ids */
{
yymsp
[
-
3
].
minor
.
yy
544
=
addSubquery
(
NULL
,
yymsp
[
-
2
].
minor
.
yy303
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
18
7
:
/* sub ::= sub COMMA LP union RP ids */
{
yylhsminor
.
yy
460
=
addSubquery
(
yymsp
[
-
5
].
minor
.
yy460
,
yymsp
[
-
2
].
minor
.
yy551
,
&
yymsp
[
0
].
minor
.
yy0
);}
yymsp
[
-
5
].
minor
.
yy
460
=
yylhsminor
.
yy460
;
case
18
0
:
/* sub ::= sub COMMA LP union RP ids */
{
yylhsminor
.
yy
544
=
addSubquery
(
yymsp
[
-
5
].
minor
.
yy544
,
yymsp
[
-
2
].
minor
.
yy303
,
&
yymsp
[
0
].
minor
.
yy0
);}
yymsp
[
-
5
].
minor
.
yy
544
=
yylhsminor
.
yy544
;
break
;
case
18
8
:
/* tablelist ::= ids cpxName */
case
18
1
:
/* tablelist ::= ids cpxName */
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yylhsminor
.
yy
460
=
setTableNameList
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
);
yylhsminor
.
yy
544
=
setTableNameList
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy
460
=
yylhsminor
.
yy460
;
yymsp
[
-
1
].
minor
.
yy
544
=
yylhsminor
.
yy544
;
break
;
case
18
9
:
/* tablelist ::= ids cpxName ids */
case
18
2
:
/* tablelist ::= ids cpxName ids */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
yymsp
[
-
1
].
minor
.
yy0
.
n
;
yylhsminor
.
yy
460
=
setTableNameList
(
NULL
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
yylhsminor
.
yy
544
=
setTableNameList
(
NULL
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
-
2
].
minor
.
yy
460
=
yylhsminor
.
yy460
;
yymsp
[
-
2
].
minor
.
yy
544
=
yylhsminor
.
yy544
;
break
;
case
1
90
:
/* tablelist ::= tablelist COMMA ids cpxName */
case
1
83
:
/* tablelist ::= tablelist COMMA ids cpxName */
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yylhsminor
.
yy
460
=
setTableNameList
(
yymsp
[
-
3
].
minor
.
yy460
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
);
yylhsminor
.
yy
544
=
setTableNameList
(
yymsp
[
-
3
].
minor
.
yy544
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
);
}
yymsp
[
-
3
].
minor
.
yy
460
=
yylhsminor
.
yy460
;
yymsp
[
-
3
].
minor
.
yy
544
=
yylhsminor
.
yy544
;
break
;
case
1
91
:
/* tablelist ::= tablelist COMMA ids cpxName ids */
case
1
84
:
/* tablelist ::= tablelist COMMA ids cpxName ids */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
yymsp
[
-
1
].
minor
.
yy0
.
n
;
yylhsminor
.
yy
460
=
setTableNameList
(
yymsp
[
-
4
].
minor
.
yy460
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
yylhsminor
.
yy
544
=
setTableNameList
(
yymsp
[
-
4
].
minor
.
yy544
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
-
4
].
minor
.
yy
460
=
yylhsminor
.
yy460
;
yymsp
[
-
4
].
minor
.
yy
544
=
yylhsminor
.
yy544
;
break
;
case
1
92
:
/* tmvar ::= VARIABLE */
case
1
85
:
/* tmvar ::= VARIABLE */
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;}
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
break
;
case
1
93
:
/* interval_option ::= intervalKey LP tmvar RP */
{
yylhsminor
.
yy
160
.
interval
=
yymsp
[
-
1
].
minor
.
yy0
;
yylhsminor
.
yy160
.
offset
.
n
=
0
;
yylhsminor
.
yy160
.
token
=
yymsp
[
-
3
].
minor
.
yy262
;}
yymsp
[
-
3
].
minor
.
yy
160
=
yylhsminor
.
yy16
0
;
case
1
86
:
/* interval_option ::= intervalKey LP tmvar RP */
{
yylhsminor
.
yy
530
.
interval
=
yymsp
[
-
1
].
minor
.
yy0
;
yylhsminor
.
yy530
.
offset
.
n
=
0
;
yylhsminor
.
yy530
.
token
=
yymsp
[
-
3
].
minor
.
yy310
;}
yymsp
[
-
3
].
minor
.
yy
530
=
yylhsminor
.
yy53
0
;
break
;
case
1
94
:
/* interval_option ::= intervalKey LP tmvar COMMA tmvar RP */
{
yylhsminor
.
yy
160
.
interval
=
yymsp
[
-
3
].
minor
.
yy0
;
yylhsminor
.
yy160
.
offset
=
yymsp
[
-
1
].
minor
.
yy0
;
yylhsminor
.
yy160
.
token
=
yymsp
[
-
5
].
minor
.
yy262
;}
yymsp
[
-
5
].
minor
.
yy
160
=
yylhsminor
.
yy16
0
;
case
1
87
:
/* interval_option ::= intervalKey LP tmvar COMMA tmvar RP */
{
yylhsminor
.
yy
530
.
interval
=
yymsp
[
-
3
].
minor
.
yy0
;
yylhsminor
.
yy530
.
offset
=
yymsp
[
-
1
].
minor
.
yy0
;
yylhsminor
.
yy530
.
token
=
yymsp
[
-
5
].
minor
.
yy310
;}
yymsp
[
-
5
].
minor
.
yy
530
=
yylhsminor
.
yy53
0
;
break
;
case
1
95
:
/* interval_option ::= */
{
memset
(
&
yymsp
[
1
].
minor
.
yy
160
,
0
,
sizeof
(
yymsp
[
1
].
minor
.
yy16
0
));}
case
1
88
:
/* interval_option ::= */
{
memset
(
&
yymsp
[
1
].
minor
.
yy
530
,
0
,
sizeof
(
yymsp
[
1
].
minor
.
yy53
0
));}
break
;
case
1
96
:
/* intervalKey ::= INTERVAL */
{
yymsp
[
0
].
minor
.
yy
262
=
TK_INTERVAL
;}
case
1
89
:
/* intervalKey ::= INTERVAL */
{
yymsp
[
0
].
minor
.
yy
310
=
TK_INTERVAL
;}
break
;
case
19
7
:
/* intervalKey ::= EVERY */
{
yymsp
[
0
].
minor
.
yy
262
=
TK_EVERY
;
}
case
19
0
:
/* intervalKey ::= EVERY */
{
yymsp
[
0
].
minor
.
yy
310
=
TK_EVERY
;
}
break
;
case
19
8
:
/* session_option ::= */
{
yymsp
[
1
].
minor
.
yy
511
.
col
.
n
=
0
;
yymsp
[
1
].
minor
.
yy511
.
gap
.
n
=
0
;}
case
19
1
:
/* session_option ::= */
{
yymsp
[
1
].
minor
.
yy
39
.
col
.
n
=
0
;
yymsp
[
1
].
minor
.
yy39
.
gap
.
n
=
0
;}
break
;
case
19
9
:
/* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
case
19
2
:
/* session_option ::= SESSION LP ids cpxName COMMA tmvar RP */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
yymsp
[
-
6
].
minor
.
yy
511
.
col
=
yymsp
[
-
4
].
minor
.
yy0
;
yymsp
[
-
6
].
minor
.
yy
511
.
gap
=
yymsp
[
-
1
].
minor
.
yy0
;
yymsp
[
-
6
].
minor
.
yy
39
.
col
=
yymsp
[
-
4
].
minor
.
yy0
;
yymsp
[
-
6
].
minor
.
yy
39
.
gap
=
yymsp
[
-
1
].
minor
.
yy0
;
}
break
;
case
200
:
/* windowstate_option ::= */
{
yymsp
[
1
].
minor
.
yy
258
.
col
.
n
=
0
;
yymsp
[
1
].
minor
.
yy25
8
.
col
.
z
=
NULL
;}
case
193
:
/* windowstate_option ::= */
{
yymsp
[
1
].
minor
.
yy
538
.
col
.
n
=
0
;
yymsp
[
1
].
minor
.
yy53
8
.
col
.
z
=
NULL
;}
break
;
case
201
:
/* windowstate_option ::= STATE_WINDOW LP ids RP */
{
yymsp
[
-
3
].
minor
.
yy
25
8
.
col
=
yymsp
[
-
1
].
minor
.
yy0
;
}
case
194
:
/* windowstate_option ::= STATE_WINDOW LP ids RP */
{
yymsp
[
-
3
].
minor
.
yy
53
8
.
col
=
yymsp
[
-
1
].
minor
.
yy0
;
}
break
;
case
202
:
/* fill_opt ::= */
{
yymsp
[
1
].
minor
.
yy13
5
=
0
;
}
case
195
:
/* fill_opt ::= */
{
yymsp
[
1
].
minor
.
yy13
1
=
0
;
}
break
;
case
203
:
/* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
case
196
:
/* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
SVariant
A
=
{
0
};
toTSDBType
(
yymsp
[
-
3
].
minor
.
yy0
.
type
);
taosVariantCreate
(
&
A
,
yymsp
[
-
3
].
minor
.
yy0
.
z
,
yymsp
[
-
3
].
minor
.
yy0
.
n
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
tListItemInsert
(
yymsp
[
-
1
].
minor
.
yy13
5
,
&
A
,
-
1
,
0
);
yymsp
[
-
5
].
minor
.
yy13
5
=
yymsp
[
-
1
].
minor
.
yy135
;
tListItemInsert
(
yymsp
[
-
1
].
minor
.
yy13
1
,
&
A
,
-
1
,
0
);
yymsp
[
-
5
].
minor
.
yy13
1
=
yymsp
[
-
1
].
minor
.
yy131
;
}
break
;
case
204
:
/* fill_opt ::= FILL LP ID RP */
case
197
:
/* fill_opt ::= FILL LP ID RP */
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
3
].
minor
.
yy13
5
=
tListItemAppendToken
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
yymsp
[
-
3
].
minor
.
yy13
1
=
tListItemAppendToken
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
}
break
;
case
205
:
/* sliding_opt ::= SLIDING LP tmvar RP */
case
198
:
/* sliding_opt ::= SLIDING LP tmvar RP */
{
yymsp
[
-
3
].
minor
.
yy0
=
yymsp
[
-
1
].
minor
.
yy0
;
}
break
;
case
206
:
/* sliding_opt ::= */
case
199
:
/* sliding_opt ::= */
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
yymsp
[
1
].
minor
.
yy0
.
z
=
NULL
;
yymsp
[
1
].
minor
.
yy0
.
type
=
0
;
}
break
;
case
20
8
:
/* orderby_opt ::= ORDER BY sortlist */
{
yymsp
[
-
2
].
minor
.
yy13
5
=
yymsp
[
0
].
minor
.
yy135
;}
case
20
1
:
/* orderby_opt ::= ORDER BY sortlist */
{
yymsp
[
-
2
].
minor
.
yy13
1
=
yymsp
[
0
].
minor
.
yy131
;}
break
;
case
20
9
:
/* sortlist ::= sortlist COMMA item sortorder */
case
20
2
:
/* sortlist ::= sortlist COMMA item sortorder */
{
yylhsminor
.
yy13
5
=
tListItemAppend
(
yymsp
[
-
3
].
minor
.
yy135
,
&
yymsp
[
-
1
].
minor
.
yy191
,
yymsp
[
0
].
minor
.
yy130
);
yylhsminor
.
yy13
1
=
tListItemAppend
(
yymsp
[
-
3
].
minor
.
yy131
,
&
yymsp
[
-
1
].
minor
.
yy43
,
yymsp
[
0
].
minor
.
yy44
);
}
yymsp
[
-
3
].
minor
.
yy13
5
=
yylhsminor
.
yy135
;
yymsp
[
-
3
].
minor
.
yy13
1
=
yylhsminor
.
yy131
;
break
;
case
2
10
:
/* sortlist ::= item sortorder */
case
2
03
:
/* sortlist ::= item sortorder */
{
yylhsminor
.
yy13
5
=
tListItemAppend
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy191
,
yymsp
[
0
].
minor
.
yy130
);
yylhsminor
.
yy13
1
=
tListItemAppend
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy43
,
yymsp
[
0
].
minor
.
yy44
);
}
yymsp
[
-
1
].
minor
.
yy13
5
=
yylhsminor
.
yy135
;
yymsp
[
-
1
].
minor
.
yy13
1
=
yylhsminor
.
yy131
;
break
;
case
2
11
:
/* item ::= ids cpxName */
case
2
04
:
/* item ::= ids cpxName */
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
taosVariantCreate
(
&
yylhsminor
.
yy
191
,
yymsp
[
-
1
].
minor
.
yy0
.
z
,
yymsp
[
-
1
].
minor
.
yy0
.
n
,
yymsp
[
-
1
].
minor
.
yy0
.
type
);
taosVariantCreate
(
&
yylhsminor
.
yy
43
,
yymsp
[
-
1
].
minor
.
yy0
.
z
,
yymsp
[
-
1
].
minor
.
yy0
.
n
,
yymsp
[
-
1
].
minor
.
yy0
.
type
);
}
yymsp
[
-
1
].
minor
.
yy
191
=
yylhsminor
.
yy191
;
yymsp
[
-
1
].
minor
.
yy
43
=
yylhsminor
.
yy43
;
break
;
case
2
12
:
/* sortorder ::= ASC */
{
yymsp
[
0
].
minor
.
yy
130
=
TSDB_ORDER_ASC
;
}
case
2
05
:
/* sortorder ::= ASC */
{
yymsp
[
0
].
minor
.
yy
44
=
TSDB_ORDER_ASC
;
}
break
;
case
2
13
:
/* sortorder ::= DESC */
{
yymsp
[
0
].
minor
.
yy
130
=
TSDB_ORDER_DESC
;}
case
2
06
:
/* sortorder ::= DESC */
{
yymsp
[
0
].
minor
.
yy
44
=
TSDB_ORDER_DESC
;}
break
;
case
2
14
:
/* sortorder ::= */
{
yymsp
[
1
].
minor
.
yy
130
=
TSDB_ORDER_ASC
;
}
case
2
07
:
/* sortorder ::= */
{
yymsp
[
1
].
minor
.
yy
44
=
TSDB_ORDER_ASC
;
}
break
;
case
2
15
:
/* groupby_opt ::= */
{
yymsp
[
1
].
minor
.
yy13
5
=
0
;}
case
2
08
:
/* groupby_opt ::= */
{
yymsp
[
1
].
minor
.
yy13
1
=
0
;}
break
;
case
2
16
:
/* groupby_opt ::= GROUP BY grouplist */
{
yymsp
[
-
2
].
minor
.
yy13
5
=
yymsp
[
0
].
minor
.
yy135
;}
case
2
09
:
/* groupby_opt ::= GROUP BY grouplist */
{
yymsp
[
-
2
].
minor
.
yy13
1
=
yymsp
[
0
].
minor
.
yy131
;}
break
;
case
21
7
:
/* grouplist ::= grouplist COMMA item */
case
21
0
:
/* grouplist ::= grouplist COMMA item */
{
yylhsminor
.
yy13
5
=
tListItemAppend
(
yymsp
[
-
2
].
minor
.
yy135
,
&
yymsp
[
0
].
minor
.
yy191
,
-
1
);
yylhsminor
.
yy13
1
=
tListItemAppend
(
yymsp
[
-
2
].
minor
.
yy131
,
&
yymsp
[
0
].
minor
.
yy43
,
-
1
);
}
yymsp
[
-
2
].
minor
.
yy13
5
=
yylhsminor
.
yy135
;
yymsp
[
-
2
].
minor
.
yy13
1
=
yylhsminor
.
yy131
;
break
;
case
21
8
:
/* grouplist ::= item */
case
21
1
:
/* grouplist ::= item */
{
yylhsminor
.
yy13
5
=
tListItemAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy191
,
-
1
);
yylhsminor
.
yy13
1
=
tListItemAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy43
,
-
1
);
}
yymsp
[
0
].
minor
.
yy13
5
=
yylhsminor
.
yy135
;
yymsp
[
0
].
minor
.
yy13
1
=
yylhsminor
.
yy131
;
break
;
case
21
9
:
/* having_opt ::= */
case
22
9
:
/* where_opt ::= */
yytestcase
(
yyruleno
==
229
);
case
2
73
:
/* expritem ::= */
yytestcase
(
yyruleno
==
273
);
{
yymsp
[
1
].
minor
.
yy
52
6
=
0
;}
case
21
2
:
/* having_opt ::= */
case
22
2
:
/* where_opt ::= */
yytestcase
(
yyruleno
==
222
);
case
2
66
:
/* expritem ::= */
yytestcase
(
yyruleno
==
266
);
{
yymsp
[
1
].
minor
.
yy
4
6
=
0
;}
break
;
case
2
20
:
/* having_opt ::= HAVING expr */
case
2
30
:
/* where_opt ::= WHERE expr */
yytestcase
(
yyruleno
==
230
);
{
yymsp
[
-
1
].
minor
.
yy
526
=
yymsp
[
0
].
minor
.
yy52
6
;}
case
2
13
:
/* having_opt ::= HAVING expr */
case
2
23
:
/* where_opt ::= WHERE expr */
yytestcase
(
yyruleno
==
223
);
{
yymsp
[
-
1
].
minor
.
yy
46
=
yymsp
[
0
].
minor
.
yy4
6
;}
break
;
case
2
21
:
/* limit_opt ::= */
case
2
25
:
/* slimit_opt ::= */
yytestcase
(
yyruleno
==
225
);
{
yymsp
[
1
].
minor
.
yy
247
.
limit
=
-
1
;
yymsp
[
1
].
minor
.
yy247
.
offset
=
0
;}
case
2
14
:
/* limit_opt ::= */
case
2
18
:
/* slimit_opt ::= */
yytestcase
(
yyruleno
==
218
);
{
yymsp
[
1
].
minor
.
yy
55
.
limit
=
-
1
;
yymsp
[
1
].
minor
.
yy55
.
offset
=
0
;}
break
;
case
2
22
:
/* limit_opt ::= LIMIT signed */
case
2
26
:
/* slimit_opt ::= SLIMIT signed */
yytestcase
(
yyruleno
==
226
);
{
yymsp
[
-
1
].
minor
.
yy
247
.
limit
=
yymsp
[
0
].
minor
.
yy531
;
yymsp
[
-
1
].
minor
.
yy247
.
offset
=
0
;}
case
2
15
:
/* limit_opt ::= LIMIT signed */
case
2
19
:
/* slimit_opt ::= SLIMIT signed */
yytestcase
(
yyruleno
==
219
);
{
yymsp
[
-
1
].
minor
.
yy
55
.
limit
=
yymsp
[
0
].
minor
.
yy459
;
yymsp
[
-
1
].
minor
.
yy55
.
offset
=
0
;}
break
;
case
2
23
:
/* limit_opt ::= LIMIT signed OFFSET signed */
{
yymsp
[
-
3
].
minor
.
yy
247
.
limit
=
yymsp
[
-
2
].
minor
.
yy531
;
yymsp
[
-
3
].
minor
.
yy247
.
offset
=
yymsp
[
0
].
minor
.
yy531
;}
case
2
16
:
/* limit_opt ::= LIMIT signed OFFSET signed */
{
yymsp
[
-
3
].
minor
.
yy
55
.
limit
=
yymsp
[
-
2
].
minor
.
yy459
;
yymsp
[
-
3
].
minor
.
yy55
.
offset
=
yymsp
[
0
].
minor
.
yy459
;}
break
;
case
2
24
:
/* limit_opt ::= LIMIT signed COMMA signed */
{
yymsp
[
-
3
].
minor
.
yy
247
.
limit
=
yymsp
[
0
].
minor
.
yy531
;
yymsp
[
-
3
].
minor
.
yy247
.
offset
=
yymsp
[
-
2
].
minor
.
yy531
;}
case
2
17
:
/* limit_opt ::= LIMIT signed COMMA signed */
{
yymsp
[
-
3
].
minor
.
yy
55
.
limit
=
yymsp
[
0
].
minor
.
yy459
;
yymsp
[
-
3
].
minor
.
yy55
.
offset
=
yymsp
[
-
2
].
minor
.
yy459
;}
break
;
case
22
7
:
/* slimit_opt ::= SLIMIT signed SOFFSET signed */
{
yymsp
[
-
3
].
minor
.
yy
247
.
limit
=
yymsp
[
-
2
].
minor
.
yy531
;
yymsp
[
-
3
].
minor
.
yy247
.
offset
=
yymsp
[
0
].
minor
.
yy531
;}
case
22
0
:
/* slimit_opt ::= SLIMIT signed SOFFSET signed */
{
yymsp
[
-
3
].
minor
.
yy
55
.
limit
=
yymsp
[
-
2
].
minor
.
yy459
;
yymsp
[
-
3
].
minor
.
yy55
.
offset
=
yymsp
[
0
].
minor
.
yy459
;}
break
;
case
22
8
:
/* slimit_opt ::= SLIMIT signed COMMA signed */
{
yymsp
[
-
3
].
minor
.
yy
247
.
limit
=
yymsp
[
0
].
minor
.
yy531
;
yymsp
[
-
3
].
minor
.
yy247
.
offset
=
yymsp
[
-
2
].
minor
.
yy531
;}
case
22
1
:
/* slimit_opt ::= SLIMIT signed COMMA signed */
{
yymsp
[
-
3
].
minor
.
yy
55
.
limit
=
yymsp
[
0
].
minor
.
yy459
;
yymsp
[
-
3
].
minor
.
yy55
.
offset
=
yymsp
[
-
2
].
minor
.
yy459
;}
break
;
case
2
31
:
/* expr ::= LP expr RP */
{
yylhsminor
.
yy
526
=
yymsp
[
-
1
].
minor
.
yy526
;
yylhsminor
.
yy526
->
exprToken
.
z
=
yymsp
[
-
2
].
minor
.
yy0
.
z
;
yylhsminor
.
yy52
6
->
exprToken
.
n
=
(
yymsp
[
0
].
minor
.
yy0
.
z
-
yymsp
[
-
2
].
minor
.
yy0
.
z
+
1
);}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
24
:
/* expr ::= LP expr RP */
{
yylhsminor
.
yy
46
=
yymsp
[
-
1
].
minor
.
yy46
;
yylhsminor
.
yy46
->
exprToken
.
z
=
yymsp
[
-
2
].
minor
.
yy0
.
z
;
yylhsminor
.
yy4
6
->
exprToken
.
n
=
(
yymsp
[
0
].
minor
.
yy0
.
z
-
yymsp
[
-
2
].
minor
.
yy0
.
z
+
1
);}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
32
:
/* expr ::= ID */
{
yylhsminor
.
yy
52
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_ID
);}
yymsp
[
0
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
25
:
/* expr ::= ID */
{
yylhsminor
.
yy
4
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_ID
);}
yymsp
[
0
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
33
:
/* expr ::= ID DOT ID */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy
52
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ID
);}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
26
:
/* expr ::= ID DOT ID */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy
4
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ID
);}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
34
:
/* expr ::= ID DOT STAR */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy
52
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ALL
);}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
27
:
/* expr ::= ID DOT STAR */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy
4
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ALL
);}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
35
:
/* expr ::= INTEGER */
{
yylhsminor
.
yy
52
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_INTEGER
);}
yymsp
[
0
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
28
:
/* expr ::= INTEGER */
{
yylhsminor
.
yy
4
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_INTEGER
);}
yymsp
[
0
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
36
:
/* expr ::= MINUS INTEGER */
case
23
7
:
/* expr ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
237
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_INTEGER
;
yylhsminor
.
yy
52
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_INTEGER
);}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
29
:
/* expr ::= MINUS INTEGER */
case
23
0
:
/* expr ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
230
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_INTEGER
;
yylhsminor
.
yy
4
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_INTEGER
);}
yymsp
[
-
1
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
23
8
:
/* expr ::= FLOAT */
{
yylhsminor
.
yy
52
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_FLOAT
);}
yymsp
[
0
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
23
1
:
/* expr ::= FLOAT */
{
yylhsminor
.
yy
4
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_FLOAT
);}
yymsp
[
0
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
23
9
:
/* expr ::= MINUS FLOAT */
case
2
40
:
/* expr ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
240
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_FLOAT
;
yylhsminor
.
yy
52
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_FLOAT
);}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
23
2
:
/* expr ::= MINUS FLOAT */
case
2
33
:
/* expr ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
233
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_FLOAT
;
yylhsminor
.
yy
4
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_FLOAT
);}
yymsp
[
-
1
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
41
:
/* expr ::= STRING */
{
yylhsminor
.
yy
52
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_STRING
);}
yymsp
[
0
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
34
:
/* expr ::= STRING */
{
yylhsminor
.
yy
4
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_STRING
);}
yymsp
[
0
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
42
:
/* expr ::= NOW */
{
yylhsminor
.
yy
52
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_NOW
);
}
yymsp
[
0
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
35
:
/* expr ::= NOW */
{
yylhsminor
.
yy
4
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_NOW
);
}
yymsp
[
0
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
43
:
/* expr ::= VARIABLE */
{
yylhsminor
.
yy
52
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_VARIABLE
);}
yymsp
[
0
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
36
:
/* expr ::= VARIABLE */
{
yylhsminor
.
yy
4
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_VARIABLE
);}
yymsp
[
0
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
44
:
/* expr ::= PLUS VARIABLE */
case
2
45
:
/* expr ::= MINUS VARIABLE */
yytestcase
(
yyruleno
==
245
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_VARIABLE
;
yylhsminor
.
yy
52
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_VARIABLE
);}
yymsp
[
-
1
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
37
:
/* expr ::= PLUS VARIABLE */
case
2
38
:
/* expr ::= MINUS VARIABLE */
yytestcase
(
yyruleno
==
238
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_VARIABLE
;
yylhsminor
.
yy
4
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_VARIABLE
);}
yymsp
[
-
1
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
46
:
/* expr ::= BOOL */
{
yylhsminor
.
yy
52
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_BOOL
);}
yymsp
[
0
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
39
:
/* expr ::= BOOL */
{
yylhsminor
.
yy
4
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_BOOL
);}
yymsp
[
0
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
24
7
:
/* expr ::= NULL */
{
yylhsminor
.
yy
52
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_NULL
);}
yymsp
[
0
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
24
0
:
/* expr ::= NULL */
{
yylhsminor
.
yy
4
6
=
tSqlExprCreateIdValue
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_NULL
);}
yymsp
[
0
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
24
8
:
/* expr ::= ID LP exprlist RP */
{
tRecordFuncName
(
pInfo
->
funcs
,
&
yymsp
[
-
3
].
minor
.
yy0
);
yylhsminor
.
yy
526
=
tSqlExprCreateFunction
(
yymsp
[
-
1
].
minor
.
yy135
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
yymsp
[
-
3
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
24
1
:
/* expr ::= ID LP exprlist RP */
{
tRecordFuncName
(
pInfo
->
funcs
,
&
yymsp
[
-
3
].
minor
.
yy0
);
yylhsminor
.
yy
46
=
tSqlExprCreateFunction
(
yymsp
[
-
1
].
minor
.
yy131
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
yymsp
[
-
3
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
24
9
:
/* expr ::= ID LP STAR RP */
{
tRecordFuncName
(
pInfo
->
funcs
,
&
yymsp
[
-
3
].
minor
.
yy0
);
yylhsminor
.
yy
52
6
=
tSqlExprCreateFunction
(
NULL
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
yymsp
[
-
3
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
24
2
:
/* expr ::= ID LP STAR RP */
{
tRecordFuncName
(
pInfo
->
funcs
,
&
yymsp
[
-
3
].
minor
.
yy0
);
yylhsminor
.
yy
4
6
=
tSqlExprCreateFunction
(
NULL
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
yymsp
[
-
3
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
50
:
/* expr ::= expr IS NULL */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy52
6
,
NULL
,
TK_ISNULL
);}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
43
:
/* expr ::= expr IS NULL */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy4
6
,
NULL
,
TK_ISNULL
);}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
51
:
/* expr ::= expr IS NOT NULL */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
3
].
minor
.
yy52
6
,
NULL
,
TK_NOTNULL
);}
yymsp
[
-
3
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
44
:
/* expr ::= expr IS NOT NULL */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
3
].
minor
.
yy4
6
,
NULL
,
TK_NOTNULL
);}
yymsp
[
-
3
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
52
:
/* expr ::= expr LT expr */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy526
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_LT
);}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
45
:
/* expr ::= expr LT expr */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy46
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_LT
);}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
53
:
/* expr ::= expr GT expr */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy526
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_GT
);}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
46
:
/* expr ::= expr GT expr */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy46
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_GT
);}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
54
:
/* expr ::= expr LE expr */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy526
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_LE
);}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
47
:
/* expr ::= expr LE expr */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy46
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_LE
);}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
55
:
/* expr ::= expr GE expr */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy526
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_GE
);}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
48
:
/* expr ::= expr GE expr */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy46
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_GE
);}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
56
:
/* expr ::= expr NE expr */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy526
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_NE
);}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
49
:
/* expr ::= expr NE expr */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy46
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_NE
);}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
25
7
:
/* expr ::= expr EQ expr */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy526
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_EQ
);}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
25
0
:
/* expr ::= expr EQ expr */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy46
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_EQ
);}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
25
8
:
/* expr ::= expr BETWEEN expr AND expr */
{
tSqlExpr
*
X2
=
tSqlExprClone
(
yymsp
[
-
4
].
minor
.
yy
526
);
yylhsminor
.
yy526
=
tSqlExprCreate
(
tSqlExprCreate
(
yymsp
[
-
4
].
minor
.
yy526
,
yymsp
[
-
2
].
minor
.
yy526
,
TK_GE
),
tSqlExprCreate
(
X2
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_LE
),
TK_AND
);}
yymsp
[
-
4
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
25
1
:
/* expr ::= expr BETWEEN expr AND expr */
{
tSqlExpr
*
X2
=
tSqlExprClone
(
yymsp
[
-
4
].
minor
.
yy
46
);
yylhsminor
.
yy46
=
tSqlExprCreate
(
tSqlExprCreate
(
yymsp
[
-
4
].
minor
.
yy46
,
yymsp
[
-
2
].
minor
.
yy46
,
TK_GE
),
tSqlExprCreate
(
X2
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_LE
),
TK_AND
);}
yymsp
[
-
4
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
25
9
:
/* expr ::= expr AND expr */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy526
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_AND
);}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
25
2
:
/* expr ::= expr AND expr */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy46
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_AND
);}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
60
:
/* expr ::= expr OR expr */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy526
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_OR
);
}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
53
:
/* expr ::= expr OR expr */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy46
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_OR
);
}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
61
:
/* expr ::= expr PLUS expr */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy526
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_PLUS
);
}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
54
:
/* expr ::= expr PLUS expr */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy46
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_PLUS
);
}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
62
:
/* expr ::= expr MINUS expr */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy526
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_MINUS
);
}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
55
:
/* expr ::= expr MINUS expr */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy46
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_MINUS
);
}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
63
:
/* expr ::= expr STAR expr */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy526
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_STAR
);
}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
56
:
/* expr ::= expr STAR expr */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy46
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_STAR
);
}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
64
:
/* expr ::= expr SLASH expr */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy526
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_DIVIDE
);}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
57
:
/* expr ::= expr SLASH expr */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy46
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_DIVIDE
);}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
65
:
/* expr ::= expr REM expr */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy526
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_REM
);
}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
58
:
/* expr ::= expr REM expr */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy46
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_REM
);
}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
66
:
/* expr ::= expr LIKE expr */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy526
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_LIKE
);
}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
59
:
/* expr ::= expr LIKE expr */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy46
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_LIKE
);
}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
26
7
:
/* expr ::= expr MATCH expr */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy526
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_MATCH
);
}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
26
0
:
/* expr ::= expr MATCH expr */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy46
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_MATCH
);
}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
26
8
:
/* expr ::= expr NMATCH expr */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy526
,
yymsp
[
0
].
minor
.
yy52
6
,
TK_NMATCH
);
}
yymsp
[
-
2
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
26
1
:
/* expr ::= expr NMATCH expr */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
2
].
minor
.
yy46
,
yymsp
[
0
].
minor
.
yy4
6
,
TK_NMATCH
);
}
yymsp
[
-
2
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
26
9
:
/* expr ::= expr IN LP exprlist RP */
{
yylhsminor
.
yy
526
=
tSqlExprCreate
(
yymsp
[
-
4
].
minor
.
yy526
,
(
tSqlExpr
*
)
yymsp
[
-
1
].
minor
.
yy135
,
TK_IN
);
}
yymsp
[
-
4
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
26
2
:
/* expr ::= expr IN LP exprlist RP */
{
yylhsminor
.
yy
46
=
tSqlExprCreate
(
yymsp
[
-
4
].
minor
.
yy46
,
(
tSqlExpr
*
)
yymsp
[
-
1
].
minor
.
yy131
,
TK_IN
);
}
yymsp
[
-
4
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
70
:
/* exprlist ::= exprlist COMMA expritem */
{
yylhsminor
.
yy13
5
=
tSqlExprListAppend
(
yymsp
[
-
2
].
minor
.
yy135
,
yymsp
[
0
].
minor
.
yy52
6
,
0
,
0
);}
yymsp
[
-
2
].
minor
.
yy13
5
=
yylhsminor
.
yy135
;
case
2
63
:
/* exprlist ::= exprlist COMMA expritem */
{
yylhsminor
.
yy13
1
=
tSqlExprListAppend
(
yymsp
[
-
2
].
minor
.
yy131
,
yymsp
[
0
].
minor
.
yy4
6
,
0
,
0
);}
yymsp
[
-
2
].
minor
.
yy13
1
=
yylhsminor
.
yy131
;
break
;
case
2
71
:
/* exprlist ::= expritem */
{
yylhsminor
.
yy13
5
=
tSqlExprListAppend
(
0
,
yymsp
[
0
].
minor
.
yy52
6
,
0
,
0
);}
yymsp
[
0
].
minor
.
yy13
5
=
yylhsminor
.
yy135
;
case
2
64
:
/* exprlist ::= expritem */
{
yylhsminor
.
yy13
1
=
tSqlExprListAppend
(
0
,
yymsp
[
0
].
minor
.
yy4
6
,
0
,
0
);}
yymsp
[
0
].
minor
.
yy13
1
=
yylhsminor
.
yy131
;
break
;
case
2
72
:
/* expritem ::= expr */
{
yylhsminor
.
yy
526
=
yymsp
[
0
].
minor
.
yy52
6
;}
yymsp
[
0
].
minor
.
yy
526
=
yylhsminor
.
yy52
6
;
case
2
65
:
/* expritem ::= expr */
{
yylhsminor
.
yy
46
=
yymsp
[
0
].
minor
.
yy4
6
;}
yymsp
[
0
].
minor
.
yy
46
=
yylhsminor
.
yy4
6
;
break
;
case
2
74
:
/* cmd ::= RESET QUERY CACHE */
case
2
67
:
/* cmd ::= RESET QUERY CACHE */
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_RESET_CACHE
,
0
);}
break
;
case
2
75
:
/* cmd ::= SYNCDB ids REPLICA */
case
2
68
:
/* cmd ::= SYNCDB ids REPLICA */
{
setDCLSqlElems
(
pInfo
,
TSDB_SQL_SYNC_DB_REPLICA
,
1
,
&
yymsp
[
-
1
].
minor
.
yy0
);}
break
;
case
2
76
:
/* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
case
2
69
:
/* 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
.
yy13
5
,
NULL
,
TSDB_ALTER_TABLE_ADD_COLUMN
,
-
1
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy13
1
,
NULL
,
TSDB_ALTER_TABLE_ADD_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
27
7
:
/* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
case
27
0
:
/* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
...
...
@@ -3178,21 +3140,21 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
27
8
:
/* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
case
27
1
:
/* 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
.
yy13
5
,
NULL
,
TSDB_ALTER_TABLE_CHANGE_COLUMN
,
-
1
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy13
1
,
NULL
,
TSDB_ALTER_TABLE_CHANGE_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
27
9
:
/* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
case
27
2
:
/* 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
.
yy13
5
,
NULL
,
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
,
-
1
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy13
1
,
NULL
,
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
2
80
:
/* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
case
2
73
:
/* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -3203,7 +3165,7 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
2
81
:
/* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
case
2
74
:
/* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
...
...
@@ -3217,33 +3179,33 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
2
82
:
/* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
case
2
75
:
/* 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
=
tListItemAppendToken
(
NULL
,
&
yymsp
[
-
2
].
minor
.
yy0
,
-
1
);
A
=
tListItemAppend
(
A
,
&
yymsp
[
0
].
minor
.
yy
191
,
-
1
);
A
=
tListItemAppend
(
A
,
&
yymsp
[
0
].
minor
.
yy
43
,
-
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
2
83
:
/* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
case
2
76
:
/* 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
.
yy13
5
,
NULL
,
TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN
,
-
1
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy13
1
,
NULL
,
TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
2
84
:
/* cmd ::= ALTER STABLE ids cpxName ADD COLUMN columnlist */
case
2
77
:
/* 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
.
yy13
5
,
NULL
,
TSDB_ALTER_TABLE_ADD_COLUMN
,
TSDB_SUPER_TABLE
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy13
1
,
NULL
,
TSDB_ALTER_TABLE_ADD_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
2
85
:
/* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
case
2
78
:
/* cmd ::= ALTER STABLE ids cpxName DROP COLUMN ids */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -3254,21 +3216,21 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
2
86
:
/* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
case
2
79
:
/* 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
.
yy13
5
,
NULL
,
TSDB_ALTER_TABLE_CHANGE_COLUMN
,
TSDB_SUPER_TABLE
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy13
1
,
NULL
,
TSDB_ALTER_TABLE_CHANGE_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
28
7
:
/* cmd ::= ALTER STABLE ids cpxName ADD TAG columnlist */
case
28
0
:
/* 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
.
yy13
5
,
NULL
,
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
,
TSDB_SUPER_TABLE
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy13
1
,
NULL
,
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
28
8
:
/* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
case
28
1
:
/* cmd ::= ALTER STABLE ids cpxName DROP TAG ids */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
...
@@ -3279,7 +3241,7 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
28
9
:
/* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
case
28
2
:
/* cmd ::= ALTER STABLE ids cpxName CHANGE TAG ids ids */
{
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
...
...
@@ -3293,32 +3255,32 @@ static void yy_reduce(
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
2
90
:
/* cmd ::= ALTER STABLE ids cpxName SET TAG ids EQ tagitem */
case
2
83
:
/* 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
=
tListItemAppendToken
(
NULL
,
&
yymsp
[
-
2
].
minor
.
yy0
,
-
1
);
A
=
tListItemAppend
(
A
,
&
yymsp
[
0
].
minor
.
yy
191
,
-
1
);
A
=
tListItemAppend
(
A
,
&
yymsp
[
0
].
minor
.
yy
43
,
-
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
2
91
:
/* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
case
2
84
:
/* 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
.
yy13
5
,
NULL
,
TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN
,
TSDB_SUPER_TABLE
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy13
1
,
NULL
,
TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
case
2
92
:
/* cmd ::= KILL CONNECTION INTEGER */
case
2
85
:
/* cmd ::= KILL CONNECTION INTEGER */
{
setKillSql
(
pInfo
,
TSDB_SQL_KILL_CONNECTION
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
case
2
93
:
/* cmd ::= KILL STREAM INTEGER COLON INTEGER */
case
2
86
:
/* 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
2
94
:
/* cmd ::= KILL QUERY INTEGER COLON INTEGER */
case
2
87
:
/* 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:
...
...
source/libs/parser/src/ttokenizer.c
浏览文件 @
784975da
...
...
@@ -217,7 +217,7 @@ static SKeyword keywordTable[] = {
{
"UNION"
,
TK_UNION
},
{
"CACHELAST"
,
TK_CACHELAST
},
{
"DISTINCT"
,
TK_DISTINCT
},
{
"PARTITIONS"
,
TK_PARTITIONS
},
//
{"PARTITIONS", TK_PARTITIONS},
{
"TOPIC"
,
TK_TOPIC
},
{
"TOPICS"
,
TK_TOPICS
},
{
"COMPACT"
,
TK_COMPACT
},
...
...
source/libs/qcom/src/querymsg.c
浏览文件 @
784975da
...
...
@@ -263,87 +263,12 @@ int32_t queryProcessTableMetaRsp(void* output, char *msg, int32_t msgSize) {
}
void
msgInit
()
{
void
initQueryModuleMsgHandle
()
{
queryBuildMsg
[
TSDB_MSG_TYPE_TABLE_META
]
=
queryBuildTableMetaReqMsg
;
queryBuildMsg
[
TSDB_MSG_TYPE_USE_DB
]
=
queryBuildUseDbMsg
;
queryProcessMsgRsp
[
TSDB_MSG_TYPE_TABLE_META
]
=
queryProcessTableMetaRsp
;
queryProcessMsgRsp
[
TSDB_MSG_TYPE_USE_DB
]
=
queryProcessUseDBRsp
;
/*
tscBuildMsg[TSDB_SQL_SELECT] = tscBuildQueryMsg;
tscBuildMsg[TSDB_SQL_INSERT] = tscBuildSubmitMsg;
tscBuildMsg[TSDB_SQL_FETCH] = tscBuildFetchMsg;
tscBuildMsg[TSDB_SQL_CREATE_DB] = tscBuildCreateDbMsg;
tscBuildMsg[TSDB_SQL_CREATE_USER] = tscBuildUserMsg;
tscBuildMsg[TSDB_SQL_CREATE_FUNCTION] = tscBuildCreateFuncMsg;
tscBuildMsg[TSDB_SQL_CREATE_ACCT] = tscBuildAcctMsg;
tscBuildMsg[TSDB_SQL_ALTER_ACCT] = tscBuildAcctMsg;
tscBuildMsg[TSDB_SQL_CREATE_TABLE] = tscBuildCreateTableMsg;
tscBuildMsg[TSDB_SQL_DROP_USER] = tscBuildDropUserAcctMsg;
tscBuildMsg[TSDB_SQL_DROP_ACCT] = tscBuildDropUserAcctMsg;
tscBuildMsg[TSDB_SQL_DROP_DB] = tscBuildDropDbMsg;
tscBuildMsg[TSDB_SQL_DROP_FUNCTION] = tscBuildDropFuncMsg;
tscBuildMsg[TSDB_SQL_SYNC_DB_REPLICA] = tscBuildSyncDbReplicaMsg;
tscBuildMsg[TSDB_SQL_DROP_TABLE] = tscBuildDropTableMsg;
tscBuildMsg[TSDB_SQL_ALTER_USER] = tscBuildUserMsg;
tscBuildMsg[TSDB_SQL_CREATE_DNODE] = tscBuildCreateDnodeMsg;
tscBuildMsg[TSDB_SQL_DROP_DNODE] = tscBuildDropDnodeMsg;
tscBuildMsg[TSDB_SQL_CFG_DNODE] = tscBuildCfgDnodeMsg;
tscBuildMsg[TSDB_SQL_ALTER_TABLE] = tscBuildAlterTableMsg;
tscBuildMsg[TSDB_SQL_UPDATE_TAG_VAL] = tscBuildUpdateTagMsg;
tscBuildMsg[TSDB_SQL_ALTER_DB] = tscAlterDbMsg;
tscBuildMsg[TSDB_SQL_COMPACT_VNODE] = tscBuildCompactMsg;
tscBuildMsg[TSDB_SQL_CONNECT] = tscBuildConnectMsg;
tscBuildMsg[TSDB_SQL_USE_DB] = tscBuildUseDbMsg;
tscBuildMsg[TSDB_SQL_STABLEVGROUP] = tscBuildSTableVgroupMsg;
tscBuildMsg[TSDB_SQL_RETRIEVE_FUNC] = tscBuildRetrieveFuncMsg;
tscBuildMsg[TSDB_SQL_HB] = tscBuildHeartBeatMsg;
tscBuildMsg[TSDB_SQL_SHOW] = tscBuildShowMsg;
tscBuildMsg[TSDB_SQL_RETRIEVE_MNODE] = tscBuildRetrieveFromMgmtMsg;
tscBuildMsg[TSDB_SQL_KILL_QUERY] = tscBuildKillMsg;
tscBuildMsg[TSDB_SQL_KILL_STREAM] = tscBuildKillMsg;
tscBuildMsg[TSDB_SQL_KILL_CONNECTION] = tscBuildKillMsg;
tscProcessMsgRsp[TSDB_SQL_SELECT] = tscProcessQueryRsp;
tscProcessMsgRsp[TSDB_SQL_FETCH] = tscProcessRetrieveRspFromNode;
tscProcessMsgRsp[TSDB_SQL_DROP_DB] = tscProcessDropDbRsp;
tscProcessMsgRsp[TSDB_SQL_DROP_TABLE] = tscProcessDropTableRsp;
tscProcessMsgRsp[TSDB_SQL_CONNECT] = tscProcessConnectRsp;
tscProcessMsgRsp[TSDB_SQL_USE_DB] = tscProcessUseDbRsp;
tscProcessMsgRsp[TSDB_SQL_META] = tscProcessTableMetaRsp;
tscProcessMsgRsp[TSDB_SQL_STABLEVGROUP] = tscProcessSTableVgroupRsp;
tscProcessMsgRsp[TSDB_SQL_MULTI_META] = tscProcessMultiTableMetaRsp;
tscProcessMsgRsp[TSDB_SQL_RETRIEVE_FUNC] = tscProcessRetrieveFuncRsp;
tscProcessMsgRsp[TSDB_SQL_SHOW] = tscProcessShowRsp;
tscProcessMsgRsp[TSDB_SQL_RETRIEVE_MNODE] = tscProcessRetrieveRspFromNode; // rsp handled by same function.
tscProcessMsgRsp[TSDB_SQL_DESCRIBE_TABLE] = tscProcessDescribeTableRsp;
tscProcessMsgRsp[TSDB_SQL_CURRENT_DB] = tscProcessLocalRetrieveRsp;
tscProcessMsgRsp[TSDB_SQL_CURRENT_USER] = tscProcessLocalRetrieveRsp;
tscProcessMsgRsp[TSDB_SQL_SERV_VERSION] = tscProcessLocalRetrieveRsp;
tscProcessMsgRsp[TSDB_SQL_CLI_VERSION] = tscProcessLocalRetrieveRsp;
tscProcessMsgRsp[TSDB_SQL_SERV_STATUS] = tscProcessLocalRetrieveRsp;
tscProcessMsgRsp[TSDB_SQL_RETRIEVE_EMPTY_RESULT] = tscProcessEmptyResultRsp;
tscProcessMsgRsp[TSDB_SQL_RETRIEVE_GLOBALMERGE] = tscProcessRetrieveGlobalMergeRsp;
tscProcessMsgRsp[TSDB_SQL_ALTER_TABLE] = tscProcessAlterTableMsgRsp;
tscProcessMsgRsp[TSDB_SQL_ALTER_DB] = tscProcessAlterDbMsgRsp;
tscProcessMsgRsp[TSDB_SQL_COMPACT_VNODE] = tscProcessCompactRsp;
tscProcessMsgRsp[TSDB_SQL_SHOW_CREATE_TABLE] = tscProcessShowCreateRsp;
tscProcessMsgRsp[TSDB_SQL_SHOW_CREATE_STABLE] = tscProcessShowCreateRsp;
tscProcessMsgRsp[TSDB_SQL_SHOW_CREATE_DATABASE] = tscProcessShowCreateRsp;
*/
}
...
...
src/query/inc/sql.y
浏览文件 @
784975da
...
...
@@ -32,6 +32,7 @@
#include "ttokendef.h"
#include "tutil.h"
#include "tvariant.h"
#include "parserInt.h"
}
%syntax_error {
...
...
@@ -302,8 +303,8 @@ db_optr(Y) ::= db_optr(Z) cachelast(X). { Y = Z; Y.cachelast = strtol(X.z,
%type topic_optr {SCreateDbInfo}
topic_optr(Y) ::= db_optr(Z). { Y = Z; Y.dbType = TSDB_DB_TYPE_TOPIC; }
topic_optr(Y) ::= topic_optr(Z) partitions(X). { Y = Z; Y.partitions = strtol(X.z, NULL, 10); }
//
topic_optr(Y) ::= db_optr(Z). { Y = Z; Y.dbType = TSDB_DB_TYPE_TOPIC; }
//
topic_optr(Y) ::= topic_optr(Z) partitions(X). { Y = Z; Y.partitions = strtol(X.z, NULL, 10); }
%type alter_db_optr {SCreateDbInfo}
alter_db_optr(Y) ::= . { setDefaultCreateDbOption(&Y); Y.dbType = TSDB_DB_TYPE_DEFAULT;}
...
...
@@ -325,7 +326,7 @@ alter_db_optr(Y) ::= alter_db_optr(Z) cachelast(X). { Y = Z; Y.cachelast = str
alter_topic_optr(Y) ::= alter_db_optr(Z). { Y = Z; Y.dbType = TSDB_DB_TYPE_TOPIC; }
alter_topic_optr(Y) ::= alter_topic_optr(Z) partitions(X). { Y = Z; Y.partitions = strtol(X.z, NULL, 10); }
%type typename {
TAOS_FIELD
}
%type typename {
SField
}
typename(A) ::= ids(X). {
X.type = 0;
tSetColumnType (&A, &X);
...
...
@@ -425,11 +426,11 @@ create_table_args(A) ::= ifnotexists(U) ids(V) cpxName(Z) AS select(S). {
setCreatedTableName(pInfo, &V, &U);
}
%type column{
TAOS_FIELD
}
%type column{
SField
}
%type columnlist{SArray*}
%destructor columnlist {taosArrayDestroy($$);}
columnlist(A) ::= columnlist(X) COMMA column(Y). {taosArrayPush(X, &Y); A = X; }
columnlist(A) ::= column(X). {A = taosArrayInit(4, sizeof(
TAOS_FIELD
)); taosArrayPush(A, &X);}
columnlist(A) ::= column(X). {A = taosArrayInit(4, sizeof(
SField
)); taosArrayPush(A, &X);}
// The information used for a column is the name and type of column:
// tinyint smallint int bigint float double bool timestamp binary(x) nchar(x)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录