Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小楼昨夜-听风雨
TDengine
提交
95426ffd
T
TDengine
项目概览
小楼昨夜-听风雨
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
95426ffd
编写于
9月 22, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/develop' into feature/crash
上级
7281a678
95430216
变更
19
显示空白变更内容
内联
并排
Showing
19 changed file
with
2134 addition
and
1621 deletion
+2134
-1621
src/client/inc/tsclient.h
src/client/inc/tsclient.h
+1
-0
src/client/src/tscLocal.c
src/client/src/tscLocal.c
+555
-26
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+33
-0
src/client/src/tscSchemaUtil.c
src/client/src/tscSchemaUtil.c
+1
-0
src/client/src/tscServer.c
src/client/src/tscServer.c
+7
-0
src/client/src/tscSql.c
src/client/src/tscSql.c
+2
-0
src/client/src/tscStream.c
src/client/src/tscStream.c
+7
-12
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+1
-0
src/common/inc/tcmdtype.h
src/common/inc/tcmdtype.h
+3
-0
src/inc/taosmsg.h
src/inc/taosmsg.h
+1
-0
src/inc/ttokendef.h
src/inc/ttokendef.h
+19
-19
src/mnode/src/mnodeTable.c
src/mnode/src/mnodeTable.c
+3
-0
src/query/inc/sql.y
src/query/inc/sql.y
+10
-0
src/query/src/sql.c
src/query/src/sql.c
+1306
-1564
tests/pytest/fulltest.sh
tests/pytest/fulltest.sh
+1
-0
tests/pytest/stream/history.py
tests/pytest/stream/history.py
+63
-0
tests/script/fullGeneralSuite.sim
tests/script/fullGeneralSuite.sim
+2
-0
tests/script/general/db/show_create_db.sim
tests/script/general/db/show_create_db.sim
+32
-0
tests/script/general/db/show_create_table.sim
tests/script/general/db/show_create_table.sim
+87
-0
未找到文件。
src/client/inc/tsclient.h
浏览文件 @
95426ffd
...
@@ -99,6 +99,7 @@ typedef struct STableMeta {
...
@@ -99,6 +99,7 @@ typedef struct STableMeta {
uint8_t
tableType
;
uint8_t
tableType
;
int16_t
sversion
;
int16_t
sversion
;
int16_t
tversion
;
int16_t
tversion
;
char
sTableId
[
TSDB_TABLE_FNAME_LEN
];
SCMVgroupInfo
vgroupInfo
;
SCMVgroupInfo
vgroupInfo
;
SCMCorVgroupInfo
corVgroupInfo
;
SCMCorVgroupInfo
corVgroupInfo
;
STableId
id
;
STableId
id
;
...
...
src/client/src/tscLocal.c
浏览文件 @
95426ffd
...
@@ -23,7 +23,30 @@
...
@@ -23,7 +23,30 @@
#include "tscUtil.h"
#include "tscUtil.h"
#include "tschemautil.h"
#include "tschemautil.h"
#include "tsclient.h"
#include "tsclient.h"
#include "taos.h"
#include "tscSubquery.h"
#define STR_NOCASE_EQUAL(str1, len1, str2, len2) ((len1 == len2) && 0 == strncasecmp(str1, str2, len1))
typedef
enum
BuildType
{
SCREATE_BUILD_TABLE
=
1
,
SCREATE_BUILD_DB
=
2
,
}
BuildType
;
typedef
enum
Stage
{
SCREATE_CALLBACK_QUERY
=
1
,
SCREATE_CALLBACK_RETRIEVE
=
2
,
}
Stage
;
// support 'show create table'
typedef
struct
SCreateBuilder
{
char
sTableName
[
TSDB_TABLE_FNAME_LEN
];
char
buf
[
TSDB_TABLE_FNAME_LEN
];
SSqlObj
*
pParentSql
;
SSqlObj
*
pInterSql
;
int32_t
(
*
fp
)(
void
*
para
,
char
*
result
);
Stage
callStage
;
}
SCreateBuilder
;
static
void
tscSetLocalQueryResult
(
SSqlObj
*
pSql
,
const
char
*
val
,
const
char
*
columnName
,
int16_t
type
,
size_t
valueLength
);
static
void
tscSetLocalQueryResult
(
SSqlObj
*
pSql
,
const
char
*
val
,
const
char
*
columnName
,
int16_t
type
,
size_t
valueLength
);
static
int32_t
getToStringLength
(
const
char
*
pData
,
int32_t
length
,
int32_t
type
)
{
static
int32_t
getToStringLength
(
const
char
*
pData
,
int32_t
length
,
int32_t
type
)
{
...
@@ -272,7 +295,504 @@ static int32_t tscProcessDescribeTable(SSqlObj *pSql) {
...
@@ -272,7 +295,504 @@ static int32_t tscProcessDescribeTable(SSqlObj *pSql) {
tscFieldInfoUpdateOffset
(
pQueryInfo
);
tscFieldInfoUpdateOffset
(
pQueryInfo
);
return
tscSetValueToResObj
(
pSql
,
rowLen
);
return
tscSetValueToResObj
(
pSql
,
rowLen
);
}
}
static
int32_t
tscGetNthFieldResult
(
TAOS_ROW
row
,
TAOS_FIELD
*
fields
,
int
*
lengths
,
int
idx
,
char
*
result
)
{
const
char
*
val
=
row
[
idx
];
if
(
val
==
NULL
)
{
sprintf
(
result
,
"%s"
,
TSDB_DATA_NULL_STR
);
return
-
1
;
}
uint8_t
type
=
fields
[
idx
].
type
;
int32_t
length
=
lengths
[
idx
];
switch
(
type
)
{
case
TSDB_DATA_TYPE_BOOL
:
sprintf
(
result
,
"%s"
,
((((
int
)(
*
((
char
*
)
val
)))
==
1
)
?
"true"
:
"false"
));
break
;
case
TSDB_DATA_TYPE_TINYINT
:
sprintf
(
result
,
"%d"
,
(
int
)(
*
((
char
*
)
val
)));
break
;
case
TSDB_DATA_TYPE_SMALLINT
:
sprintf
(
result
,
"%d"
,
(
int
)(
*
((
short
*
)
val
)));
break
;
case
TSDB_DATA_TYPE_INT
:
sprintf
(
result
,
"%d"
,
*
((
int
*
)
val
));
break
;
case
TSDB_DATA_TYPE_BIGINT
:
sprintf
(
result
,
"%"
PRId64
,
*
((
int64_t
*
)
val
));
break
;
case
TSDB_DATA_TYPE_FLOAT
:
sprintf
(
result
,
"%f"
,
GET_FLOAT_VAL
(
val
));
break
;
case
TSDB_DATA_TYPE_DOUBLE
:
sprintf
(
result
,
"%f"
,
GET_DOUBLE_VAL
(
val
));
break
;
case
TSDB_DATA_TYPE_NCHAR
:
case
TSDB_DATA_TYPE_BINARY
:
memcpy
(
result
,
val
,
length
);
break
;
case
TSDB_DATA_TYPE_TIMESTAMP
:
///formatTimestamp(buf, *(int64_t*)val, TSDB_TIME_PRECISION_MICRO);
//memcpy(result, val, strlen(buf));
sprintf
(
result
,
"%"
PRId64
,
*
((
int64_t
*
)
val
));
break
;
default:
break
;
}
return
0
;
}
void
tscSCreateCallBack
(
void
*
param
,
TAOS_RES
*
tres
,
int
code
)
{
if
(
param
==
NULL
||
tres
==
NULL
)
{
return
;
}
SCreateBuilder
*
builder
=
(
SCreateBuilder
*
)(
param
);
SSqlObj
*
pParentSql
=
builder
->
pParentSql
;
SSqlObj
*
pSql
=
(
SSqlObj
*
)
tres
;
SSqlRes
*
pRes
=
&
pParentSql
->
res
;
pRes
->
code
=
taos_errno
(
pSql
);
if
(
pRes
->
code
!=
TSDB_CODE_SUCCESS
)
{
taos_free_result
(
pSql
);
free
(
builder
);
tscQueueAsyncRes
(
pParentSql
);
return
;
}
if
(
builder
->
callStage
==
SCREATE_CALLBACK_QUERY
)
{
taos_fetch_rows_a
(
tres
,
tscSCreateCallBack
,
param
);
builder
->
callStage
=
SCREATE_CALLBACK_RETRIEVE
;
}
else
{
char
*
result
=
calloc
(
1
,
TSDB_MAX_BINARY_LEN
);
pRes
->
code
=
builder
->
fp
(
builder
,
result
);
taos_free_result
(
pSql
);
free
(
builder
);
free
(
result
);
if
(
pRes
->
code
==
TSDB_CODE_SUCCESS
)
{
(
*
pParentSql
->
fp
)(
pParentSql
->
param
,
pParentSql
,
code
);
}
else
{
tscQueueAsyncRes
(
pParentSql
);
}
}
}
TAOS_ROW
tscFetchRow
(
void
*
param
)
{
SCreateBuilder
*
builder
=
(
SCreateBuilder
*
)
param
;
if
(
builder
==
NULL
)
{
return
NULL
;
}
SSqlObj
*
pSql
=
builder
->
pInterSql
;
if
(
pSql
==
NULL
||
pSql
->
signature
!=
pSql
)
{
terrno
=
TSDB_CODE_TSC_DISCONNECTED
;
return
NULL
;
}
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
SSqlRes
*
pRes
=
&
pSql
->
res
;
if
(
pRes
->
qhandle
==
0
||
pCmd
->
command
==
TSDB_SQL_RETRIEVE_EMPTY_RESULT
||
pCmd
->
command
==
TSDB_SQL_INSERT
)
{
return
NULL
;
}
// set the sql object owner
tscSetSqlOwner
(
pSql
);
// current data set are exhausted, fetch more data from node
if
(
pRes
->
row
>=
pRes
->
numOfRows
&&
(
pRes
->
completed
!=
true
||
hasMoreVnodesToTry
(
pSql
)
||
hasMoreClauseToTry
(
pSql
))
&&
(
pCmd
->
command
==
TSDB_SQL_RETRIEVE
||
pCmd
->
command
==
TSDB_SQL_RETRIEVE_LOCALMERGE
||
pCmd
->
command
==
TSDB_SQL_TABLE_JOIN_RETRIEVE
||
pCmd
->
command
==
TSDB_SQL_FETCH
||
pCmd
->
command
==
TSDB_SQL_SHOW
||
pCmd
->
command
==
TSDB_SQL_SHOW_CREATE_TABLE
||
pCmd
->
command
==
TSDB_SQL_SHOW_CREATE_DATABASE
||
pCmd
->
command
==
TSDB_SQL_SELECT
||
pCmd
->
command
==
TSDB_SQL_DESCRIBE_TABLE
||
pCmd
->
command
==
TSDB_SQL_SERV_STATUS
||
pCmd
->
command
==
TSDB_SQL_CURRENT_DB
||
pCmd
->
command
==
TSDB_SQL_SERV_VERSION
||
pCmd
->
command
==
TSDB_SQL_CLI_VERSION
||
pCmd
->
command
==
TSDB_SQL_CURRENT_USER
))
{
taos_fetch_rows_a
(
pSql
,
tscSCreateCallBack
,
param
);
return
NULL
;
}
void
*
data
=
doSetResultRowData
(
pSql
,
true
);
tscClearSqlOwner
(
pSql
);
return
data
;
}
static
int32_t
tscGetTableTagValue
(
SCreateBuilder
*
builder
,
char
*
result
)
{
TAOS_ROW
row
=
tscFetchRow
(
builder
);
SSqlObj
*
pSql
=
builder
->
pInterSql
;
if
(
row
==
NULL
)
{
return
TSDB_CODE_MND_INVALID_TABLE_NAME
;
}
int32_t
*
lengths
=
taos_fetch_lengths
(
pSql
);
int
num_fields
=
taos_num_fields
(
pSql
);
TAOS_FIELD
*
fields
=
taos_fetch_fields
(
pSql
);
char
buf
[
TSDB_COL_NAME_LEN
+
16
];
for
(
int
i
=
0
;
i
<
num_fields
;
i
++
)
{
memset
(
buf
,
0
,
sizeof
(
buf
));
int32_t
ret
=
tscGetNthFieldResult
(
row
,
fields
,
lengths
,
i
,
buf
);
if
(
i
==
0
)
{
snprintf
(
result
+
strlen
(
result
),
TSDB_MAX_BINARY_LEN
-
strlen
(
result
),
"%s"
,
"("
);
}
if
((
fields
[
i
].
type
==
TSDB_DATA_TYPE_NCHAR
||
fields
[
i
].
type
==
TSDB_DATA_TYPE_BINARY
||
fields
[
i
].
type
==
TSDB_DATA_TYPE_TIMESTAMP
)
&&
0
==
ret
)
{
snprintf
(
result
+
strlen
(
result
),
TSDB_MAX_BINARY_LEN
-
strlen
(
result
),
"
\"
%s
\"
,"
,
buf
);
}
else
{
snprintf
(
result
+
strlen
(
result
),
TSDB_MAX_BINARY_LEN
-
strlen
(
result
),
"%s,"
,
buf
);
}
if
(
i
==
num_fields
-
1
)
{
sprintf
(
result
+
strlen
(
result
)
-
1
,
"%s"
,
")"
);
}
}
if
(
0
==
strlen
(
result
))
{
return
TSDB_CODE_MND_INVALID_TABLE_NAME
;
}
return
TSDB_CODE_SUCCESS
;
}
// build 'show create table/database' result fields
static
int32_t
tscSCreateBuildResultFields
(
SSqlObj
*
pSql
,
BuildType
type
,
const
char
*
ddl
)
{
int32_t
rowLen
=
0
;
int16_t
ddlLen
=
(
int16_t
)
strlen
(
ddl
);
SColumnIndex
index
=
{
0
};
pSql
->
cmd
.
numOfCols
=
2
;
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
&
pSql
->
cmd
,
0
);
pQueryInfo
->
order
.
order
=
TSDB_ORDER_ASC
;
TAOS_FIELD
f
;
if
(
type
==
SCREATE_BUILD_TABLE
)
{
f
.
type
=
TSDB_DATA_TYPE_BINARY
;
f
.
bytes
=
(
TSDB_COL_NAME_LEN
-
1
)
+
VARSTR_HEADER_SIZE
;
tstrncpy
(
f
.
name
,
"Table"
,
sizeof
(
f
.
name
));
}
else
{
f
.
type
=
TSDB_DATA_TYPE_BINARY
;
f
.
bytes
=
(
TSDB_DB_NAME_LEN
-
1
)
+
VARSTR_HEADER_SIZE
;
tstrncpy
(
f
.
name
,
"Database"
,
sizeof
(
f
.
name
));
}
SFieldSupInfo
*
pInfo
=
tscFieldInfoAppend
(
&
pQueryInfo
->
fieldsInfo
,
&
f
);
pInfo
->
pSqlExpr
=
tscSqlExprAppend
(
pQueryInfo
,
TSDB_FUNC_TS_DUMMY
,
&
index
,
TSDB_DATA_TYPE_BINARY
,
f
.
bytes
,
f
.
bytes
-
VARSTR_HEADER_SIZE
,
false
);
rowLen
+=
f
.
bytes
;
f
.
bytes
=
(
int16_t
)(
ddlLen
+
VARSTR_HEADER_SIZE
);
f
.
type
=
TSDB_DATA_TYPE_BINARY
;
if
(
type
==
SCREATE_BUILD_TABLE
)
{
tstrncpy
(
f
.
name
,
"Create Table"
,
sizeof
(
f
.
name
));
}
else
{
tstrncpy
(
f
.
name
,
"Create Database"
,
sizeof
(
f
.
name
));
}
pInfo
=
tscFieldInfoAppend
(
&
pQueryInfo
->
fieldsInfo
,
&
f
);
pInfo
->
pSqlExpr
=
tscSqlExprAppend
(
pQueryInfo
,
TSDB_FUNC_TS_DUMMY
,
&
index
,
TSDB_DATA_TYPE_BINARY
,
(
int16_t
)(
ddlLen
+
VARSTR_HEADER_SIZE
),
ddlLen
,
false
);
rowLen
+=
ddlLen
+
VARSTR_HEADER_SIZE
;
return
rowLen
;
}
static
int32_t
tscSCreateSetValueToResObj
(
SSqlObj
*
pSql
,
int32_t
rowLen
,
const
char
*
tableName
,
const
char
*
ddl
)
{
SSqlRes
*
pRes
=
&
pSql
->
res
;
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
&
pSql
->
cmd
,
0
);
int32_t
numOfRows
=
1
;
if
(
strlen
(
ddl
)
==
0
)
{
}
tscInitResObjForLocalQuery
(
pSql
,
numOfRows
,
rowLen
);
TAOS_FIELD
*
pField
=
tscFieldInfoGetField
(
&
pQueryInfo
->
fieldsInfo
,
0
);
char
*
dst
=
pRes
->
data
+
tscFieldInfoGetOffset
(
pQueryInfo
,
0
)
*
numOfRows
;
STR_WITH_MAXSIZE_TO_VARSTR
(
dst
,
tableName
,
pField
->
bytes
);
pField
=
tscFieldInfoGetField
(
&
pQueryInfo
->
fieldsInfo
,
1
);
dst
=
pRes
->
data
+
tscFieldInfoGetOffset
(
pQueryInfo
,
1
)
*
numOfRows
;
STR_WITH_MAXSIZE_TO_VARSTR
(
dst
,
ddl
,
pField
->
bytes
);
return
0
;
}
static
int32_t
tscSCreateBuildResult
(
SSqlObj
*
pSql
,
BuildType
type
,
const
char
*
str
,
const
char
*
result
)
{
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
&
pSql
->
cmd
,
0
);
int32_t
rowLen
=
tscSCreateBuildResultFields
(
pSql
,
type
,
result
);
tscFieldInfoUpdateOffset
(
pQueryInfo
);
return
tscSCreateSetValueToResObj
(
pSql
,
rowLen
,
str
,
result
);
}
int32_t
tscRebuildCreateTableStatement
(
void
*
param
,
char
*
result
)
{
SCreateBuilder
*
builder
=
(
SCreateBuilder
*
)
param
;
int32_t
code
=
TSDB_CODE_SUCCESS
;
char
*
buf
=
calloc
(
1
,
TSDB_MAX_BINARY_LEN
);
if
(
buf
==
NULL
)
{
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
}
code
=
tscGetTableTagValue
(
builder
,
buf
);
if
(
code
==
TSDB_CODE_SUCCESS
)
{
snprintf
(
result
+
strlen
(
result
),
TSDB_MAX_BINARY_LEN
-
strlen
(
result
),
"CREATE TABLE %s USING %s TAGS %s"
,
builder
->
buf
,
builder
->
sTableName
,
buf
);
code
=
tscSCreateBuildResult
(
builder
->
pParentSql
,
SCREATE_BUILD_TABLE
,
builder
->
buf
,
result
);
}
free
(
buf
);
return
code
;
}
static
int32_t
tscGetDBInfo
(
SCreateBuilder
*
builder
,
char
*
result
)
{
TAOS_ROW
row
=
tscFetchRow
(
builder
);
if
(
row
==
NULL
)
{
return
TSDB_CODE_MND_DB_NOT_SELECTED
;
}
const
char
*
showColumns
[]
=
{
"REPLICA"
,
"QUORUM"
,
"DAYS"
,
"KEEP"
,
"BLOCKS"
,
NULL
};
SSqlObj
*
pSql
=
builder
->
pInterSql
;
TAOS_FIELD
*
fields
=
taos_fetch_fields
(
pSql
);
int
num_fields
=
taos_num_fields
(
pSql
);
char
buf
[
TSDB_DB_NAME_LEN
+
64
]
=
{
0
};
do
{
int32_t
*
lengths
=
taos_fetch_lengths
(
pSql
);
int32_t
ret
=
tscGetNthFieldResult
(
row
,
fields
,
lengths
,
0
,
buf
);
if
(
0
==
ret
&&
STR_NOCASE_EQUAL
(
buf
,
strlen
(
buf
),
builder
->
buf
,
strlen
(
builder
->
buf
)))
{
snprintf
(
result
+
strlen
(
result
),
TSDB_MAX_BINARY_LEN
-
strlen
(
result
),
"CREATE DATABASE %s"
,
buf
);
for
(
int
i
=
1
;
i
<
num_fields
;
i
++
)
{
for
(
int
j
=
0
;
showColumns
[
j
]
!=
NULL
;
j
++
)
{
if
(
STR_NOCASE_EQUAL
(
fields
[
i
].
name
,
strlen
(
fields
[
i
].
name
),
showColumns
[
j
],
strlen
(
showColumns
[
j
])))
{
memset
(
buf
,
0
,
sizeof
(
buf
));
ret
=
tscGetNthFieldResult
(
row
,
fields
,
lengths
,
i
,
buf
);
if
(
ret
==
0
)
{
snprintf
(
result
+
strlen
(
result
),
TSDB_MAX_BINARY_LEN
-
strlen
(
result
),
" %s %s"
,
showColumns
[
j
],
buf
);
}
}
}
}
break
;
}
row
=
tscFetchRow
(
builder
);
}
while
(
row
!=
NULL
);
if
(
0
==
strlen
(
result
))
{
return
TSDB_CODE_MND_DB_NOT_SELECTED
;
}
return
TSDB_CODE_SUCCESS
;
}
int32_t
tscRebuildCreateDBStatement
(
void
*
param
,
char
*
result
)
{
SCreateBuilder
*
builder
=
(
SCreateBuilder
*
)
param
;
int32_t
code
=
TSDB_CODE_SUCCESS
;
char
*
buf
=
calloc
(
1
,
TSDB_MAX_BINARY_LEN
);
if
(
buf
==
NULL
)
{
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
}
code
=
tscGetDBInfo
(
param
,
buf
);
if
(
code
==
TSDB_CODE_SUCCESS
)
{
code
=
tscSCreateBuildResult
(
builder
->
pParentSql
,
SCREATE_BUILD_DB
,
builder
->
buf
,
buf
);
}
free
(
buf
);
return
code
;
}
static
int32_t
tscGetTableTagColumnName
(
SSqlObj
*
pSql
,
char
**
result
)
{
char
*
buf
=
(
char
*
)
malloc
(
TSDB_MAX_BINARY_LEN
);
if
(
buf
==
NULL
)
{
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
}
buf
[
0
]
=
0
;
STableMeta
*
pMeta
=
tscGetTableMetaInfoFromCmd
(
&
pSql
->
cmd
,
0
,
0
)
->
pTableMeta
;
if
(
pMeta
->
tableType
==
TSDB_SUPER_TABLE
||
pMeta
->
tableType
==
TSDB_NORMAL_TABLE
||
pMeta
->
tableType
==
TSDB_STREAM_TABLE
)
{
free
(
buf
);
return
TSDB_CODE_TSC_INVALID_VALUE
;
}
SSchema
*
pTagsSchema
=
tscGetTableTagSchema
(
pMeta
);
int32_t
numOfTags
=
tscGetNumOfTags
(
pMeta
);
for
(
int32_t
i
=
0
;
i
<
numOfTags
;
i
++
)
{
if
(
i
!=
numOfTags
-
1
)
{
snprintf
(
buf
+
strlen
(
buf
),
TSDB_MAX_BINARY_LEN
-
strlen
(
buf
),
"%s,"
,
pTagsSchema
[
i
].
name
);
}
else
{
snprintf
(
buf
+
strlen
(
buf
),
TSDB_MAX_BINARY_LEN
-
strlen
(
buf
),
"%s"
,
pTagsSchema
[
i
].
name
);
}
}
*
result
=
buf
;
return
TSDB_CODE_SUCCESS
;
}
static
int32_t
tscRebuildDDLForSubTable
(
SSqlObj
*
pSql
,
const
char
*
tableName
,
char
*
ddl
)
{
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
&
pSql
->
cmd
,
0
);
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
STableMeta
*
pMeta
=
pTableMetaInfo
->
pTableMeta
;
SSqlObj
*
pInterSql
=
(
SSqlObj
*
)
calloc
(
1
,
sizeof
(
SSqlObj
));
if
(
pInterSql
==
NULL
)
{
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
}
SCreateBuilder
*
param
=
(
SCreateBuilder
*
)
malloc
(
sizeof
(
SCreateBuilder
));
if
(
param
==
NULL
)
{
free
(
pInterSql
);
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
}
char
fullName
[
TSDB_TABLE_FNAME_LEN
]
=
{
0
};
extractDBName
(
pTableMetaInfo
->
name
,
fullName
);
extractTableName
(
pMeta
->
sTableId
,
param
->
sTableName
);
snprintf
(
fullName
+
strlen
(
fullName
),
TSDB_TABLE_FNAME_LEN
-
strlen
(
fullName
),
".%s"
,
param
->
sTableName
);
extractTableName
(
pTableMetaInfo
->
name
,
param
->
buf
);
param
->
pParentSql
=
pSql
;
param
->
pInterSql
=
pInterSql
;
param
->
fp
=
tscRebuildCreateTableStatement
;
param
->
callStage
=
SCREATE_CALLBACK_QUERY
;
char
*
query
=
(
char
*
)
calloc
(
1
,
TSDB_MAX_BINARY_LEN
);
if
(
query
==
NULL
)
{
free
(
param
);
free
(
pInterSql
);
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
}
char
*
columns
=
NULL
;
int32_t
code
=
tscGetTableTagColumnName
(
pSql
,
&
columns
)
;
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
free
(
param
);
free
(
pInterSql
);
free
(
query
);
return
code
;
}
snprintf
(
query
+
strlen
(
query
),
TSDB_MAX_BINARY_LEN
-
strlen
(
query
),
"SELECT %s FROM %s WHERE TBNAME IN(
\'
%s
\'
)"
,
columns
,
fullName
,
param
->
buf
);
doAsyncQuery
(
pSql
->
pTscObj
,
pInterSql
,
tscSCreateCallBack
,
param
,
query
,
strlen
(
query
));
free
(
query
);
free
(
columns
);
return
TSDB_CODE_TSC_ACTION_IN_PROGRESS
;
}
static
int32_t
tscRebuildDDLForNormalTable
(
SSqlObj
*
pSql
,
const
char
*
tableName
,
char
*
ddl
)
{
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
&
pSql
->
cmd
,
0
);
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
STableMeta
*
pMeta
=
pTableMetaInfo
->
pTableMeta
;
int32_t
numOfRows
=
tscGetNumOfColumns
(
pMeta
);
SSchema
*
pSchema
=
tscGetTableSchema
(
pMeta
);
char
*
result
=
ddl
;
sprintf
(
result
,
"create table %s ("
,
tableName
);
for
(
int32_t
i
=
0
;
i
<
numOfRows
;
++
i
)
{
uint8_t
type
=
pSchema
[
i
].
type
;
if
(
type
==
TSDB_DATA_TYPE_BINARY
||
type
==
TSDB_DATA_TYPE_NCHAR
)
{
snprintf
(
result
+
strlen
(
result
),
TSDB_MAX_BINARY_LEN
-
strlen
(
result
),
"%s %s(%d),"
,
pSchema
[
i
].
name
,
tDataTypeDesc
[
pSchema
[
i
].
type
].
aName
,
pSchema
->
bytes
);
}
else
{
snprintf
(
result
+
strlen
(
result
),
TSDB_MAX_BINARY_LEN
-
strlen
(
result
),
"%s %s,"
,
pSchema
[
i
].
name
,
tDataTypeDesc
[
pSchema
[
i
].
type
].
aName
);
}
}
sprintf
(
result
+
strlen
(
result
)
-
1
,
"%s"
,
")"
);
return
TSDB_CODE_SUCCESS
;
}
static
int32_t
tscRebuildDDLForSuperTable
(
SSqlObj
*
pSql
,
const
char
*
tableName
,
char
*
ddl
)
{
char
*
result
=
ddl
;
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
&
pSql
->
cmd
,
0
);
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
STableMeta
*
pMeta
=
pTableMetaInfo
->
pTableMeta
;
int32_t
numOfRows
=
tscGetNumOfColumns
(
pMeta
);
int32_t
totalRows
=
numOfRows
+
tscGetNumOfTags
(
pMeta
);
SSchema
*
pSchema
=
tscGetTableSchema
(
pMeta
);
sprintf
(
result
,
"create table %s ("
,
tableName
);
for
(
int32_t
i
=
0
;
i
<
numOfRows
;
++
i
)
{
uint8_t
type
=
pSchema
[
i
].
type
;
if
(
type
==
TSDB_DATA_TYPE_BINARY
||
type
==
TSDB_DATA_TYPE_NCHAR
)
{
snprintf
(
result
+
strlen
(
result
),
TSDB_MAX_BINARY_LEN
-
strlen
(
result
),
"%s %s(%d),"
,
pSchema
[
i
].
name
,
tDataTypeDesc
[
pSchema
[
i
].
type
].
aName
,
pSchema
->
bytes
);
}
else
{
snprintf
(
result
+
strlen
(
result
),
TSDB_MAX_BINARY_LEN
-
strlen
(
result
),
"%s %s,"
,
pSchema
[
i
].
name
,
tDataTypeDesc
[
type
].
aName
);
}
}
snprintf
(
result
+
strlen
(
result
)
-
1
,
TSDB_MAX_BINARY_LEN
-
strlen
(
result
),
"%s %s"
,
")"
,
"TAGS ("
);
for
(
int32_t
i
=
numOfRows
;
i
<
totalRows
;
i
++
)
{
uint8_t
type
=
pSchema
[
i
].
type
;
if
(
type
==
TSDB_DATA_TYPE_BINARY
||
type
==
TSDB_DATA_TYPE_NCHAR
)
{
snprintf
(
result
+
strlen
(
result
),
TSDB_MAX_BINARY_LEN
-
strlen
(
result
),
"%s %s(%d),"
,
pSchema
[
i
].
name
,
tDataTypeDesc
[
pSchema
[
i
].
type
].
aName
,
pSchema
->
bytes
);
}
else
{
snprintf
(
result
+
strlen
(
result
),
TSDB_MAX_BINARY_LEN
-
strlen
(
result
),
"%s %s,"
,
pSchema
[
i
].
name
,
tDataTypeDesc
[
type
].
aName
);
}
}
sprintf
(
result
+
strlen
(
result
)
-
1
,
"%s"
,
")"
);
return
TSDB_CODE_SUCCESS
;
}
static
int32_t
tscProcessShowCreateTable
(
SSqlObj
*
pSql
)
{
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
&
pSql
->
cmd
,
0
);
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
assert
(
pTableMetaInfo
->
pTableMeta
!=
NULL
);
char
tableName
[
TSDB_TABLE_NAME_LEN
]
=
{
0
};
extractTableName
(
pTableMetaInfo
->
name
,
tableName
);
char
*
result
=
(
char
*
)
calloc
(
1
,
TSDB_MAX_BINARY_LEN
);
int32_t
code
=
TSDB_CODE_SUCCESS
;
if
(
UTIL_TABLE_IS_SUPER_TABLE
(
pTableMetaInfo
))
{
code
=
tscRebuildDDLForSuperTable
(
pSql
,
tableName
,
result
);
}
else
if
(
UTIL_TABLE_IS_NORMAL_TABLE
(
pTableMetaInfo
))
{
code
=
tscRebuildDDLForNormalTable
(
pSql
,
tableName
,
result
);
}
else
if
(
UTIL_TABLE_IS_CHILD_TABLE
(
pTableMetaInfo
))
{
code
=
tscRebuildDDLForSubTable
(
pSql
,
tableName
,
result
);
}
else
{
code
=
TSDB_CODE_TSC_INVALID_VALUE
;
}
if
(
code
==
TSDB_CODE_SUCCESS
)
{
code
=
tscSCreateBuildResult
(
pSql
,
SCREATE_BUILD_TABLE
,
tableName
,
result
);
}
free
(
result
);
return
code
;
}
static
int32_t
tscProcessShowCreateDatabase
(
SSqlObj
*
pSql
)
{
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
&
pSql
->
cmd
,
0
);
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
SSqlObj
*
pInterSql
=
(
SSqlObj
*
)
calloc
(
1
,
sizeof
(
SSqlObj
));
if
(
pInterSql
==
NULL
)
{
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
}
SCreateBuilder
*
param
=
(
SCreateBuilder
*
)
malloc
(
sizeof
(
SCreateBuilder
));
if
(
param
==
NULL
)
{
free
(
pInterSql
);
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
}
extractTableName
(
pTableMetaInfo
->
name
,
param
->
buf
);
param
->
pParentSql
=
pSql
;
param
->
pInterSql
=
pInterSql
;
param
->
fp
=
tscRebuildCreateDBStatement
;
param
->
callStage
=
SCREATE_CALLBACK_QUERY
;
const
char
*
query
=
"show databases"
;
doAsyncQuery
(
pSql
->
pTscObj
,
pInterSql
,
tscSCreateCallBack
,
param
,
query
,
strlen
(
query
));
return
TSDB_CODE_TSC_ACTION_IN_PROGRESS
;
}
static
int32_t
tscProcessCurrentUser
(
SSqlObj
*
pSql
)
{
static
int32_t
tscProcessCurrentUser
(
SSqlObj
*
pSql
)
{
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
&
pSql
->
cmd
,
0
);
SQueryInfo
*
pQueryInfo
=
tscGetQueryInfoDetail
(
&
pSql
->
cmd
,
0
);
...
@@ -336,6 +856,7 @@ static int32_t tscProcessServerVer(SSqlObj *pSql) {
...
@@ -336,6 +856,7 @@ static int32_t tscProcessServerVer(SSqlObj *pSql) {
char
*
vx
=
calloc
(
1
,
pExpr
->
resBytes
);
char
*
vx
=
calloc
(
1
,
pExpr
->
resBytes
);
if
(
vx
==
NULL
)
{
if
(
vx
==
NULL
)
{
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
}
}
STR_WITH_SIZE_TO_VARSTR
(
vx
,
v
,
(
VarDataLenT
)
t
);
STR_WITH_SIZE_TO_VARSTR
(
vx
,
v
,
(
VarDataLenT
)
t
);
...
@@ -343,6 +864,7 @@ static int32_t tscProcessServerVer(SSqlObj *pSql) {
...
@@ -343,6 +864,7 @@ static int32_t tscProcessServerVer(SSqlObj *pSql) {
free
(
vx
);
free
(
vx
);
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
static
int32_t
tscProcessClientVer
(
SSqlObj
*
pSql
)
{
static
int32_t
tscProcessClientVer
(
SSqlObj
*
pSql
)
{
...
@@ -357,6 +879,7 @@ static int32_t tscProcessClientVer(SSqlObj *pSql) {
...
@@ -357,6 +879,7 @@ static int32_t tscProcessClientVer(SSqlObj *pSql) {
char
*
v
=
calloc
(
1
,
pExpr
->
resBytes
);
char
*
v
=
calloc
(
1
,
pExpr
->
resBytes
);
if
(
v
==
NULL
)
{
if
(
v
==
NULL
)
{
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
return
TSDB_CODE_TSC_OUT_OF_MEMORY
;
}
}
STR_WITH_SIZE_TO_VARSTR
(
v
,
version
,
(
VarDataLenT
)
t
);
STR_WITH_SIZE_TO_VARSTR
(
v
,
version
,
(
VarDataLenT
)
t
);
...
@@ -364,6 +887,7 @@ static int32_t tscProcessClientVer(SSqlObj *pSql) {
...
@@ -364,6 +887,7 @@ static int32_t tscProcessClientVer(SSqlObj *pSql) {
free
(
v
);
free
(
v
);
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
static
int32_t
tscProcessServStatus
(
SSqlObj
*
pSql
)
{
static
int32_t
tscProcessServStatus
(
SSqlObj
*
pSql
)
{
...
@@ -428,6 +952,10 @@ int tscProcessLocalCmd(SSqlObj *pSql) {
...
@@ -428,6 +952,10 @@ int tscProcessLocalCmd(SSqlObj *pSql) {
*/
*/
pRes
->
qhandle
=
0x1
;
pRes
->
qhandle
=
0x1
;
pRes
->
numOfRows
=
0
;
pRes
->
numOfRows
=
0
;
}
else
if
(
pCmd
->
command
==
TSDB_SQL_SHOW_CREATE_TABLE
)
{
pRes
->
code
=
tscProcessShowCreateTable
(
pSql
);
}
else
if
(
pCmd
->
command
==
TSDB_SQL_SHOW_CREATE_DATABASE
)
{
pRes
->
code
=
tscProcessShowCreateDatabase
(
pSql
);
}
else
if
(
pCmd
->
command
==
TSDB_SQL_RESET_CACHE
)
{
}
else
if
(
pCmd
->
command
==
TSDB_SQL_RESET_CACHE
)
{
taosCacheEmpty
(
tscMetaCache
);
taosCacheEmpty
(
tscMetaCache
);
pRes
->
code
=
TSDB_CODE_SUCCESS
;
pRes
->
code
=
TSDB_CODE_SUCCESS
;
...
@@ -447,12 +975,13 @@ int tscProcessLocalCmd(SSqlObj *pSql) {
...
@@ -447,12 +975,13 @@ int tscProcessLocalCmd(SSqlObj *pSql) {
}
}
// keep the code in local variable in order to avoid invalid read in case of async query
// keep the code in local variable in order to avoid invalid read in case of async query
int32_t
code
=
pRes
->
code
;
int32_t
code
=
pRes
->
code
;
if
(
code
==
TSDB_CODE_SUCCESS
)
{
if
(
code
==
TSDB_CODE_SUCCESS
)
{
(
*
pSql
->
fp
)(
pSql
->
param
,
pSql
,
code
);
(
*
pSql
->
fp
)(
pSql
->
param
,
pSql
,
code
);
}
else
if
(
code
==
TSDB_CODE_TSC_ACTION_IN_PROGRESS
){
}
else
{
}
else
{
tscQueueAsyncRes
(
pSql
);
tscQueueAsyncRes
(
pSql
);
}
}
return
code
;
return
code
;
}
}
src/client/src/tscSQLParser.c
浏览文件 @
95426ffd
...
@@ -368,7 +368,40 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) {
...
@@ -368,7 +368,40 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) {
return
tscGetTableMeta
(
pSql
,
pTableMetaInfo
);
return
tscGetTableMeta
(
pSql
,
pTableMetaInfo
);
}
}
case
TSDB_SQL_SHOW_CREATE_TABLE
:
{
SStrToken
*
pToken
=
&
pInfo
->
pDCLInfo
->
a
[
0
];
const
char
*
msg1
=
"invalid table name"
;
const
char
*
msg2
=
"table name is too long"
;
if
(
tscValidateName
(
pToken
)
!=
TSDB_CODE_SUCCESS
)
{
return
invalidSqlErrMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg1
);
}
if
(
!
tscValidateTableNameLength
(
pToken
->
n
))
{
return
invalidSqlErrMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg2
);
}
if
(
tscSetTableFullName
(
pTableMetaInfo
,
pToken
,
pSql
)
!=
TSDB_CODE_SUCCESS
)
{
return
invalidSqlErrMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg2
);
}
return
tscGetTableMeta
(
pSql
,
pTableMetaInfo
);
}
case
TSDB_SQL_SHOW_CREATE_DATABASE
:
{
const
char
*
msg1
=
"invalid database name"
;
const
char
*
msg2
=
"table name is too long"
;
SStrToken
*
pToken
=
&
pInfo
->
pDCLInfo
->
a
[
0
];
if
(
tscValidateName
(
pToken
)
!=
TSDB_CODE_SUCCESS
)
{
return
invalidSqlErrMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg1
);
}
if
(
pToken
->
n
>
TSDB_DB_NAME_LEN
)
{
return
invalidSqlErrMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg1
);
}
if
(
tscSetTableFullName
(
pTableMetaInfo
,
pToken
,
pSql
)
!=
TSDB_CODE_SUCCESS
)
{
return
invalidSqlErrMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg2
);
}
return
TSDB_CODE_SUCCESS
;
}
case
TSDB_SQL_CFG_DNODE
:
{
case
TSDB_SQL_CFG_DNODE
:
{
const
char
*
msg2
=
"invalid configure options or values, such as resetlog / debugFlag 135 / balance 'vnode:2-dnode:2' / monitor 1 "
;
const
char
*
msg2
=
"invalid configure options or values, such as resetlog / debugFlag 135 / balance 'vnode:2-dnode:2' / monitor 1 "
;
const
char
*
msg3
=
"invalid dnode ep"
;
const
char
*
msg3
=
"invalid dnode ep"
;
...
...
src/client/src/tscSchemaUtil.c
浏览文件 @
95426ffd
...
@@ -170,6 +170,7 @@ STableMeta* tscCreateTableMetaFromMsg(STableMetaMsg* pTableMetaMsg, size_t* size
...
@@ -170,6 +170,7 @@ STableMeta* tscCreateTableMetaFromMsg(STableMetaMsg* pTableMetaMsg, size_t* size
pTableMeta
->
sversion
=
pTableMetaMsg
->
sversion
;
pTableMeta
->
sversion
=
pTableMetaMsg
->
sversion
;
pTableMeta
->
tversion
=
pTableMetaMsg
->
tversion
;
pTableMeta
->
tversion
=
pTableMetaMsg
->
tversion
;
tstrncpy
(
pTableMeta
->
sTableId
,
pTableMetaMsg
->
sTableId
,
TSDB_TABLE_FNAME_LEN
);
memcpy
(
pTableMeta
->
schema
,
pTableMetaMsg
->
schema
,
schemaSize
);
memcpy
(
pTableMeta
->
schema
,
pTableMetaMsg
->
schema
,
schemaSize
);
...
...
src/client/src/tscServer.c
浏览文件 @
95426ffd
...
@@ -2093,6 +2093,9 @@ int tscProcessAlterDbMsgRsp(SSqlObj *pSql) {
...
@@ -2093,6 +2093,9 @@ int tscProcessAlterDbMsgRsp(SSqlObj *pSql) {
UNUSED
(
pSql
);
UNUSED
(
pSql
);
return
0
;
return
0
;
}
}
int
tscProcessShowCreateRsp
(
SSqlObj
*
pSql
)
{
return
tscLocalResultCommonBuilder
(
pSql
,
1
);
}
int
tscProcessQueryRsp
(
SSqlObj
*
pSql
)
{
int
tscProcessQueryRsp
(
SSqlObj
*
pSql
)
{
SSqlRes
*
pRes
=
&
pSql
->
res
;
SSqlRes
*
pRes
=
&
pSql
->
res
;
...
@@ -2379,6 +2382,10 @@ void tscInitMsgsFp() {
...
@@ -2379,6 +2382,10 @@ void tscInitMsgsFp() {
tscProcessMsgRsp
[
TSDB_SQL_ALTER_TABLE
]
=
tscProcessAlterTableMsgRsp
;
tscProcessMsgRsp
[
TSDB_SQL_ALTER_TABLE
]
=
tscProcessAlterTableMsgRsp
;
tscProcessMsgRsp
[
TSDB_SQL_ALTER_DB
]
=
tscProcessAlterDbMsgRsp
;
tscProcessMsgRsp
[
TSDB_SQL_ALTER_DB
]
=
tscProcessAlterDbMsgRsp
;
tscProcessMsgRsp
[
TSDB_SQL_SHOW_CREATE_TABLE
]
=
tscProcessShowCreateRsp
;
tscProcessMsgRsp
[
TSDB_SQL_SHOW_CREATE_DATABASE
]
=
tscProcessShowCreateRsp
;
tscKeepConn
[
TSDB_SQL_SHOW
]
=
1
;
tscKeepConn
[
TSDB_SQL_SHOW
]
=
1
;
tscKeepConn
[
TSDB_SQL_RETRIEVE
]
=
1
;
tscKeepConn
[
TSDB_SQL_RETRIEVE
]
=
1
;
tscKeepConn
[
TSDB_SQL_SELECT
]
=
1
;
tscKeepConn
[
TSDB_SQL_SELECT
]
=
1
;
...
...
src/client/src/tscSql.c
浏览文件 @
95426ffd
...
@@ -477,6 +477,8 @@ TAOS_ROW taos_fetch_row(TAOS_RES *res) {
...
@@ -477,6 +477,8 @@ TAOS_ROW taos_fetch_row(TAOS_RES *res) {
pCmd
->
command
==
TSDB_SQL_TABLE_JOIN_RETRIEVE
||
pCmd
->
command
==
TSDB_SQL_TABLE_JOIN_RETRIEVE
||
pCmd
->
command
==
TSDB_SQL_FETCH
||
pCmd
->
command
==
TSDB_SQL_FETCH
||
pCmd
->
command
==
TSDB_SQL_SHOW
||
pCmd
->
command
==
TSDB_SQL_SHOW
||
pCmd
->
command
==
TSDB_SQL_SHOW_CREATE_TABLE
||
pCmd
->
command
==
TSDB_SQL_SHOW_CREATE_DATABASE
||
pCmd
->
command
==
TSDB_SQL_SELECT
||
pCmd
->
command
==
TSDB_SQL_SELECT
||
pCmd
->
command
==
TSDB_SQL_DESCRIBE_TABLE
||
pCmd
->
command
==
TSDB_SQL_DESCRIBE_TABLE
||
pCmd
->
command
==
TSDB_SQL_SERV_STATUS
||
pCmd
->
command
==
TSDB_SQL_SERV_STATUS
||
...
...
src/client/src/tscStream.c
浏览文件 @
95426ffd
...
@@ -136,7 +136,6 @@ static void tscProcessStreamTimer(void *handle, void *tmrId) {
...
@@ -136,7 +136,6 @@ static void tscProcessStreamTimer(void *handle, void *tmrId) {
etime
=
pStream
->
stime
+
(
etime
-
pStream
->
stime
)
/
pStream
->
interval
.
interval
*
pStream
->
interval
.
interval
;
etime
=
pStream
->
stime
+
(
etime
-
pStream
->
stime
)
/
pStream
->
interval
.
interval
*
pStream
->
interval
.
interval
;
}
else
{
}
else
{
etime
=
taosTimeTruncate
(
etime
,
&
pStream
->
interval
,
pStream
->
precision
);
etime
=
taosTimeTruncate
(
etime
,
&
pStream
->
interval
,
pStream
->
precision
);
//etime = taosGetIntervalStartTimestamp(etime, pStream->interval.sliding, pStream->interval.sliding, pStream->interval.slidingUnit, pStream->precision);
}
}
pQueryInfo
->
window
.
ekey
=
etime
;
pQueryInfo
->
window
.
ekey
=
etime
;
if
(
pQueryInfo
->
window
.
skey
>=
pQueryInfo
->
window
.
ekey
)
{
if
(
pQueryInfo
->
window
.
skey
>=
pQueryInfo
->
window
.
ekey
)
{
...
@@ -454,17 +453,11 @@ static int64_t tscGetStreamStartTimestamp(SSqlObj *pSql, SSqlStream *pStream, in
...
@@ -454,17 +453,11 @@ static int64_t tscGetStreamStartTimestamp(SSqlObj *pSql, SSqlStream *pStream, in
}
}
}
else
{
// timewindow based aggregation stream
}
else
{
// timewindow based aggregation stream
if
(
stime
==
0
)
{
// no data in meter till now
if
(
stime
==
0
)
{
// no data in meter till now
if
(
pQueryInfo
->
window
.
skey
!=
INT64_MIN
)
{
stime
=
pQueryInfo
->
window
.
skey
;
stime
=
pQueryInfo
->
window
.
skey
;
if
(
stime
==
INT64_MIN
)
{
stime
=
(
int64_t
)
taosGetTimestamp
(
pStream
->
precision
);
stime
=
taosTimeTruncate
(
stime
,
&
pStream
->
interval
,
pStream
->
precision
);
stime
=
taosTimeTruncate
(
stime
-
1
,
&
pStream
->
interval
,
pStream
->
precision
);
//stime = taosGetIntervalStartTimestamp(stime, pStream->interval.interval, pStream->interval.interval, pStream->interval.intervalUnit, pStream->precision);
//stime = taosGetIntervalStartTimestamp(stime - 1, pStream->interval.interval, pStream->interval.interval, pStream->interval.intervalUnit, pStream->precision);
tscWarn
(
"%p stream:%p, last timestamp:0, reset to:%"
PRId64
,
pSql
,
pStream
,
stime
);
}
}
stime
=
taosTimeTruncate
(
stime
,
&
pStream
->
interval
,
pStream
->
precision
);
}
else
{
}
else
{
//int64_t newStime = taosGetIntervalStartTimestamp(stime, pStream->interval.interval, pStream->interval.interval, pStream->interval.intervalUnit, pStream->precision);
int64_t
newStime
=
taosTimeTruncate
(
stime
,
&
pStream
->
interval
,
pStream
->
precision
);
int64_t
newStime
=
taosTimeTruncate
(
stime
,
&
pStream
->
interval
,
pStream
->
precision
);
if
(
newStime
!=
stime
)
{
if
(
newStime
!=
stime
)
{
tscWarn
(
"%p stream:%p, last timestamp:%"
PRId64
", reset to:%"
PRId64
,
pSql
,
pStream
,
stime
,
newStime
);
tscWarn
(
"%p stream:%p, last timestamp:%"
PRId64
", reset to:%"
PRId64
,
pSql
,
pStream
,
stime
,
newStime
);
...
@@ -477,8 +470,10 @@ static int64_t tscGetStreamStartTimestamp(SSqlObj *pSql, SSqlStream *pStream, in
...
@@ -477,8 +470,10 @@ static int64_t tscGetStreamStartTimestamp(SSqlObj *pSql, SSqlStream *pStream, in
}
}
static
int64_t
tscGetLaunchTimestamp
(
const
SSqlStream
*
pStream
)
{
static
int64_t
tscGetLaunchTimestamp
(
const
SSqlStream
*
pStream
)
{
int64_t
timer
=
pStream
->
stime
-
taosGetTimestamp
(
pStream
->
precision
);
int64_t
timer
=
0
,
now
=
taosGetTimestamp
(
pStream
->
precision
);
if
(
timer
<
0
)
timer
=
0
;
if
(
pStream
->
stime
>
now
)
{
timer
=
pStream
->
stime
-
now
;
}
int64_t
startDelay
=
int64_t
startDelay
=
(
pStream
->
precision
==
TSDB_TIME_PRECISION_MICRO
)
?
tsStreamCompStartDelay
*
1000L
:
tsStreamCompStartDelay
;
(
pStream
->
precision
==
TSDB_TIME_PRECISION_MICRO
)
?
tsStreamCompStartDelay
*
1000L
:
tsStreamCompStartDelay
;
...
...
src/client/src/tscSubquery.c
浏览文件 @
95426ffd
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include "tscSubquery.h"
#include "tscSubquery.h"
#include "tschemautil.h"
#include "tschemautil.h"
#include "tsclient.h"
#include "tsclient.h"
#include "tscSubquery.h"
typedef
struct
SInsertSupporter
{
typedef
struct
SInsertSupporter
{
SSubqueryState
*
pState
;
SSubqueryState
*
pState
;
...
...
src/common/inc/tcmdtype.h
浏览文件 @
95426ffd
...
@@ -78,6 +78,9 @@ enum {
...
@@ -78,6 +78,9 @@ enum {
TSDB_DEFINE_SQL_TYPE
(
TSDB_SQL_RETRIEVE_LOCALMERGE
,
"retrieve-localmerge"
)
TSDB_DEFINE_SQL_TYPE
(
TSDB_SQL_RETRIEVE_LOCALMERGE
,
"retrieve-localmerge"
)
TSDB_DEFINE_SQL_TYPE
(
TSDB_SQL_TABLE_JOIN_RETRIEVE
,
"join-retrieve"
)
TSDB_DEFINE_SQL_TYPE
(
TSDB_SQL_TABLE_JOIN_RETRIEVE
,
"join-retrieve"
)
TSDB_DEFINE_SQL_TYPE
(
TSDB_SQL_SHOW_CREATE_TABLE
,
"show-create-table"
)
TSDB_DEFINE_SQL_TYPE
(
TSDB_SQL_SHOW_CREATE_DATABASE
,
"show-create-database"
)
/*
/*
* build empty result instead of accessing dnode to fetch result
* build empty result instead of accessing dnode to fetch result
* reset the client cache
* reset the client cache
...
...
src/inc/taosmsg.h
浏览文件 @
95426ffd
...
@@ -673,6 +673,7 @@ typedef struct {
...
@@ -673,6 +673,7 @@ typedef struct {
typedef
struct
STableMetaMsg
{
typedef
struct
STableMetaMsg
{
int32_t
contLen
;
int32_t
contLen
;
char
tableId
[
TSDB_TABLE_FNAME_LEN
];
// table id
char
tableId
[
TSDB_TABLE_FNAME_LEN
];
// table id
char
sTableId
[
TSDB_TABLE_FNAME_LEN
];
uint8_t
numOfTags
;
uint8_t
numOfTags
;
uint8_t
precision
;
uint8_t
precision
;
uint8_t
tableType
;
uint8_t
tableType
;
...
...
src/inc/ttokendef.h
浏览文件 @
95426ffd
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
#ifndef TDENGINE_TTOKENDEF_H
#ifndef TDENGINE_TTOKENDEF_H
#define TDENGINE_TTOKENDEF_H
#define TDENGINE_TTOKENDEF_H
#define TK_ID 1
#define TK_ID 1
#define TK_BOOL 2
#define TK_BOOL 2
#define TK_TINYINT 3
#define TK_TINYINT 3
...
@@ -75,24 +76,24 @@
...
@@ -75,24 +76,24 @@
#define TK_VNODES 57
#define TK_VNODES 57
#define TK_IPTOKEN 58
#define TK_IPTOKEN 58
#define TK_DOT 59
#define TK_DOT 59
#define TK_
TABLES
60
#define TK_
CREATE
60
#define TK_
STABLES
61
#define TK_
TABLE
61
#define TK_
VGROUPS
62
#define TK_
DATABASE
62
#define TK_
DROP
63
#define TK_
TABLES
63
#define TK_
TABLE
64
#define TK_
STABLES
64
#define TK_
DATABASE
65
#define TK_
VGROUPS
65
#define TK_D
NODE
66
#define TK_D
ROP
66
#define TK_
USER
67
#define TK_
DNODE
67
#define TK_
ACCOUNT
68
#define TK_
USER
68
#define TK_
USE
69
#define TK_
ACCOUNT
69
#define TK_
DESCRIBE
70
#define TK_
USE
70
#define TK_
ALTER
71
#define TK_
DESCRIBE
71
#define TK_
PASS
72
#define TK_
ALTER
72
#define TK_P
RIVILEGE
73
#define TK_P
ASS
73
#define TK_
LOCAL
74
#define TK_
PRIVILEGE
74
#define TK_
IF
75
#define TK_
LOCAL
75
#define TK_
EXISTS
76
#define TK_
IF
76
#define TK_
CREATE
77
#define TK_
EXISTS
77
#define TK_PPS 78
#define TK_PPS 78
#define TK_TSERIES 79
#define TK_TSERIES 79
#define TK_DBS 80
#define TK_DBS 80
...
@@ -222,7 +223,6 @@
...
@@ -222,7 +223,6 @@
#define TK_INTO 204
#define TK_INTO 204
#define TK_VALUES 205
#define TK_VALUES 205
#define TK_SPACE 300
#define TK_SPACE 300
#define TK_COMMENT 301
#define TK_COMMENT 301
#define TK_ILLEGAL 302
#define TK_ILLEGAL 302
...
...
src/mnode/src/mnodeTable.c
浏览文件 @
95426ffd
...
@@ -2093,6 +2093,9 @@ static int32_t mnodeDoGetChildTableMeta(SMnodeMsg *pMsg, STableMetaMsg *pMeta) {
...
@@ -2093,6 +2093,9 @@ static int32_t mnodeDoGetChildTableMeta(SMnodeMsg *pMsg, STableMetaMsg *pMeta) {
pMeta
->
precision
=
pDb
->
cfg
.
precision
;
pMeta
->
precision
=
pDb
->
cfg
.
precision
;
pMeta
->
tableType
=
pTable
->
info
.
type
;
pMeta
->
tableType
=
pTable
->
info
.
type
;
tstrncpy
(
pMeta
->
tableId
,
pTable
->
info
.
tableId
,
TSDB_TABLE_FNAME_LEN
);
tstrncpy
(
pMeta
->
tableId
,
pTable
->
info
.
tableId
,
TSDB_TABLE_FNAME_LEN
);
if
(
pTable
->
superTable
)
{
tstrncpy
(
pMeta
->
sTableId
,
pTable
->
superTable
->
info
.
tableId
,
TSDB_TABLE_FNAME_LEN
);
}
if
(
pTable
->
info
.
type
==
TSDB_CHILD_TABLE
)
{
if
(
pTable
->
info
.
type
==
TSDB_CHILD_TABLE
)
{
pMeta
->
sversion
=
htons
(
pTable
->
superTable
->
sversion
);
pMeta
->
sversion
=
htons
(
pTable
->
superTable
->
sversion
);
...
...
src/query/inc/sql.y
浏览文件 @
95426ffd
...
@@ -80,6 +80,7 @@ cmd ::= SHOW GRANTS. { setShowOptions(pInfo, TSDB_MGMT_TABLE_GRANTS, 0, 0);
...
@@ -80,6 +80,7 @@ cmd ::= SHOW GRANTS. { setShowOptions(pInfo, TSDB_MGMT_TABLE_GRANTS, 0, 0);
cmd ::= SHOW VNODES. { setShowOptions(pInfo, TSDB_MGMT_TABLE_VNODES, 0, 0); }
cmd ::= SHOW VNODES. { setShowOptions(pInfo, TSDB_MGMT_TABLE_VNODES, 0, 0); }
cmd ::= SHOW VNODES IPTOKEN(X). { setShowOptions(pInfo, TSDB_MGMT_TABLE_VNODES, &X, 0); }
cmd ::= SHOW VNODES IPTOKEN(X). { setShowOptions(pInfo, TSDB_MGMT_TABLE_VNODES, &X, 0); }
%type dbPrefix {SStrToken}
%type dbPrefix {SStrToken}
dbPrefix(A) ::=. {A.n = 0; A.type = 0;}
dbPrefix(A) ::=. {A.n = 0; A.type = 0;}
dbPrefix(A) ::= ids(X) DOT. {A = X; }
dbPrefix(A) ::= ids(X) DOT. {A = X; }
...
@@ -88,6 +89,15 @@ dbPrefix(A) ::= ids(X) DOT. {A = X; }
...
@@ -88,6 +89,15 @@ dbPrefix(A) ::= ids(X) DOT. {A = X; }
cpxName(A) ::= . {A.n = 0; }
cpxName(A) ::= . {A.n = 0; }
cpxName(A) ::= DOT ids(Y). {A = Y; A.n += 1; }
cpxName(A) ::= DOT ids(Y). {A = Y; A.n += 1; }
cmd ::= SHOW CREATE TABLE ids(X) cpxName(Y). {
X.n += Y.n;
setDCLSQLElems(pInfo, TSDB_SQL_SHOW_CREATE_TABLE, 1, &X);
}
cmd ::= SHOW CREATE DATABASE ids(X). {
setDCLSQLElems(pInfo, TSDB_SQL_SHOW_CREATE_DATABASE, 1, &X);
}
cmd ::= SHOW dbPrefix(X) TABLES. {
cmd ::= SHOW dbPrefix(X) TABLES. {
setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &X, 0);
setShowOptions(pInfo, TSDB_MGMT_TABLE_TABLE, &X, 0);
}
}
...
...
src/query/src/sql.c
浏览文件 @
95426ffd
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
** input grammar file:
** input grammar file:
*/
*/
#include <stdio.h>
#include <stdio.h>
#include <assert.h>
/************ Begin %include sections from the grammar ************************/
/************ Begin %include sections from the grammar ************************/
#include <stdio.h>
#include <stdio.h>
...
@@ -77,10 +76,8 @@
...
@@ -77,10 +76,8 @@
** zero the stack is dynamically sized using realloc()
** zero the stack is dynamically sized using realloc()
** ParseARG_SDECL A static variable declaration for the %extra_argument
** ParseARG_SDECL A static variable declaration for the %extra_argument
** ParseARG_PDECL A parameter declaration for the %extra_argument
** ParseARG_PDECL A parameter declaration for the %extra_argument
** ParseARG_PARAM Code to pass %extra_argument as a subroutine parameter
** ParseARG_STORE Code to store %extra_argument into yypParser
** ParseARG_STORE Code to store %extra_argument into yypParser
** ParseARG_FETCH Code to extract %extra_argument from yypParser
** ParseARG_FETCH Code to extract %extra_argument from yypParser
** ParseCTX_* As ParseARG_ except for %extra_context
** YYERRORSYMBOL is the code number of the error symbol. If not
** YYERRORSYMBOL is the code number of the error symbol. If not
** defined, then do no error processing.
** defined, then do no error processing.
** YYNSTATE the combined number of states.
** YYNSTATE the combined number of states.
...
@@ -100,56 +97,48 @@
...
@@ -100,56 +97,48 @@
#endif
#endif
/************* Begin control #defines *****************************************/
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned short int
#define YYCODETYPE unsigned short int
#define YYNOCODE 27
0
#define YYNOCODE 27
2
#define YYACTIONTYPE unsigned short int
#define YYACTIONTYPE unsigned short int
#define ParseTOKENTYPE SStrToken
#define ParseTOKENTYPE SStrToken
typedef
union
{
typedef
union
{
int
yyinit
;
int
yyinit
;
ParseTOKENTYPE
yy0
;
ParseTOKENTYPE
yy0
;
int
yy112
;
SSubclauseInfo
*
yy25
;
SCreateDBInfo
yy118
;
tSQLExpr
*
yy66
;
tVariantList
*
yy156
;
SCreateAcctSQL
yy73
;
tSQLExprList
*
yy158
;
int
yy82
;
tSQLExpr
*
yy19
0
;
SQuerySQL
*
yy15
0
;
S
SubclauseInfo
*
yy333
;
S
CreateDBInfo
yy158
;
SIntervalVal
yy340
;
TAOS_FIELD
yy181
;
TAOS_FIELD
yy343
;
SLimitVal
yy188
;
int64_t
yy369
;
tSQLExprList
*
yy224
;
SCreateTableSQL
*
yy398
;
int64_t
yy271
;
SLimitVal
yy414
;
tVariant
yy312
;
S
QuerySQL
*
yy44
4
;
S
IntervalVal
yy31
4
;
SCreate
AcctSQL
yy479
;
SCreate
TableSQL
*
yy374
;
t
Variant
yy506
;
t
FieldList
*
yy449
;
t
FieldList
*
yy511
;
t
VariantList
*
yy494
;
}
YYMINORTYPE
;
}
YYMINORTYPE
;
#ifndef YYSTACKDEPTH
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
#define YYSTACKDEPTH 100
#endif
#endif
#define ParseARG_SDECL SSqlInfo* pInfo;
#define ParseARG_SDECL SSqlInfo* pInfo;
#define ParseARG_PDECL ,SSqlInfo* pInfo
#define ParseARG_PDECL ,SSqlInfo* pInfo
#define ParseARG_PARAM ,pInfo
#define ParseARG_FETCH SSqlInfo* pInfo = yypParser->pInfo
#define ParseARG_FETCH SSqlInfo* pInfo=yypParser->pInfo;
#define ParseARG_STORE yypParser->pInfo = pInfo
#define ParseARG_STORE yypParser->pInfo=pInfo;
#define ParseCTX_SDECL
#define ParseCTX_PDECL
#define ParseCTX_PARAM
#define ParseCTX_FETCH
#define ParseCTX_STORE
#define YYFALLBACK 1
#define YYFALLBACK 1
#define YYNSTATE 248
#define YYNSTATE 252
#define YYNRULE 228
#define YYNRULE 230
#define YYNRULE_WITH_ACTION 228
#define YYNTOKEN 206
#define YYNTOKEN 206
#define YY_MAX_SHIFT 2
47
#define YY_MAX_SHIFT 2
51
#define YY_MIN_SHIFTREDUCE 41
0
#define YY_MIN_SHIFTREDUCE 41
6
#define YY_MAX_SHIFTREDUCE 6
37
#define YY_MAX_SHIFTREDUCE 6
45
#define YY_ERROR_ACTION 6
38
#define YY_ERROR_ACTION 6
46
#define YY_ACCEPT_ACTION 6
39
#define YY_ACCEPT_ACTION 6
47
#define YY_NO_ACTION 64
0
#define YY_NO_ACTION 64
8
#define YY_MIN_REDUCE 64
1
#define YY_MIN_REDUCE 64
9
#define YY_MAX_REDUCE 8
6
8
#define YY_MAX_REDUCE 8
7
8
/************* End control #defines *******************************************/
/************* End control #defines *******************************************/
#define YY_NLOOKAHEAD ((int)(sizeof(yy_lookahead)/sizeof(yy_lookahead[0])))
/* Define the yytestcase() macro to be a no-op if is not already defined
/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
** otherwise.
...
@@ -214,219 +203,223 @@ typedef union {
...
@@ -214,219 +203,223 @@ typedef union {
** yy_default[] Default action for each state.
** yy_default[] Default action for each state.
**
**
*********** Begin parsing tables **********************************************/
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (56
0
)
#define YY_ACTTAB_COUNT (56
6
)
static
const
YYACTIONTYPE
yy_action
[]
=
{
static
const
YYACTIONTYPE
yy_action
[]
=
{
/* 0 */
741
,
451
,
11
,
739
,
740
,
639
,
247
,
451
,
742
,
452
,
/* 0 */
751
,
459
,
11
,
749
,
750
,
647
,
251
,
459
,
752
,
460
,
/* 10 */
744
,
745
,
743
,
35
,
36
,
452
,
37
,
38
,
156
,
245
,
/* 10 */
754
,
755
,
753
,
35
,
36
,
460
,
37
,
38
,
159
,
249
,
/* 20 */
167
,
29
,
138
,
137
,
202
,
41
,
39
,
43
,
40
,
106
,
/* 20 */
170
,
29
,
141
,
459
,
206
,
41
,
39
,
43
,
40
,
140
,
/* 30 */
517
,
162
,
856
,
34
,
33
,
782
,
138
,
32
,
31
,
30
,
/* 30 */
145
,
460
,
865
,
34
,
33
,
862
,
141
,
32
,
31
,
30
,
/* 40 */
35
,
36
,
771
,
37
,
38
,
161
,
856
,
167
,
29
,
771
,
/* 40 */
35
,
36
,
781
,
37
,
38
,
165
,
866
,
170
,
29
,
141
,
/* 50 */
106
,
202
,
41
,
39
,
43
,
40
,
187
,
159
,
223
,
222
,
/* 50 */
62
,
206
,
41
,
39
,
43
,
40
,
191
,
525
,
164
,
866
,
/* 60 */
34
,
33
,
138
,
157
,
32
,
31
,
30
,
35
,
36
,
451
,
/* 60 */
34
,
33
,
27
,
21
,
32
,
31
,
30
,
417
,
418
,
419
,
/* 70 */
37
,
38
,
855
,
142
,
167
,
29
,
760
,
452
,
202
,
41
,
/* 70 */
420
,
421
,
422
,
423
,
424
,
425
,
426
,
427
,
428
,
250
,
/* 80 */
39
,
43
,
40
,
199
,
78
,
60
,
779
,
34
,
33
,
234
,
/* 80 */
35
,
36
,
181
,
37
,
38
,
227
,
226
,
170
,
29
,
781
,
/* 90 */
234
,
32
,
31
,
30
,
21
,
41
,
39
,
43
,
40
,
32
,
/* 90 */
176
,
206
,
41
,
39
,
43
,
40
,
174
,
162
,
767
,
792
,
/* 100 */
31
,
30
,
56
,
34
,
33
,
852
,
808
,
32
,
31
,
30
,
/* 100 */
34
,
33
,
56
,
160
,
32
,
31
,
30
,
21
,
36
,
8
,
/* 110 */
21
,
21
,
106
,
411
,
412
,
413
,
414
,
415
,
416
,
417
,
/* 110 */
37
,
38
,
63
,
118
,
170
,
29
,
770
,
108
,
206
,
41
,
/* 120 */
418
,
419
,
420
,
421
,
422
,
246
,
591
,
171
,
36
,
757
,
/* 120 */
39
,
43
,
40
,
32
,
31
,
30
,
599
,
34
,
33
,
78
,
/* 130 */
37
,
38
,
225
,
50
,
167
,
29
,
21
,
62
,
202
,
41
,
/* 130 */
875
,
32
,
31
,
30
,
238
,
37
,
38
,
108
,
238
,
170
,
/* 140 */
39
,
43
,
40
,
172
,
221
,
757
,
757
,
34
,
33
,
27
,
/* 140 */
29
,
184
,
766
,
206
,
41
,
39
,
43
,
40
,
188
,
187
,
/* 150 */
51
,
32
,
31
,
30
,
8
,
37
,
38
,
63
,
116
,
167
,
/* 150 */
789
,
177
,
34
,
33
,
224
,
223
,
32
,
31
,
30
,
16
,
/* 160 */
29
,
101
,
758
,
202
,
41
,
39
,
43
,
40
,
809
,
226
,
/* 160 */
218
,
244
,
243
,
217
,
216
,
215
,
242
,
214
,
241
,
240
,
/* 170 */
197
,
757
,
34
,
33
,
170
,
851
,
32
,
31
,
30
,
16
,
/* 170 */
239
,
213
,
747
,
818
,
735
,
736
,
737
,
738
,
739
,
740
,
/* 180 */
214
,
240
,
239
,
213
,
212
,
211
,
238
,
210
,
237
,
236
,
/* 180 */
741
,
742
,
743
,
744
,
745
,
746
,
169
,
612
,
103
,
12
,
/* 190 */
235
,
209
,
737
,
760
,
725
,
726
,
727
,
728
,
729
,
730
,
/* 190 */
603
,
17
,
606
,
819
,
609
,
201
,
169
,
612
,
26
,
108
,
/* 200 */
731
,
732
,
733
,
734
,
735
,
736
,
166
,
604
,
12
,
241
,
/* 200 */
603
,
108
,
606
,
861
,
609
,
153
,
169
,
612
,
173
,
567
,
/* 210 */
595
,
17
,
598
,
190
,
601
,
559
,
166
,
604
,
26
,
103
,
/* 210 */
603
,
154
,
606
,
105
,
609
,
90
,
89
,
148
,
166
,
167
,
/* 220 */
595
,
597
,
598
,
600
,
601
,
34
,
33
,
151
,
760
,
32
,
/* 220 */
34
,
33
,
205
,
102
,
32
,
31
,
30
,
770
,
166
,
167
,
/* 230 */
31
,
30
,
21
,
90
,
89
,
145
,
572
,
573
,
163
,
164
,
/* 230 */
26
,
21
,
557
,
41
,
39
,
43
,
40
,
549
,
166
,
167
,
/* 240 */
173
,
150
,
201
,
76
,
80
,
85
,
88
,
79
,
163
,
164
,
/* 240 */
194
,
34
,
33
,
17
,
193
,
32
,
31
,
30
,
860
,
16
,
/* 250 */
166
,
604
,
549
,
82
,
595
,
106
,
598
,
100
,
601
,
244
,
/* 250 */
26
,
244
,
243
,
203
,
21
,
60
,
242
,
61
,
241
,
240
,
/* 260 */
243
,
97
,
17
,
16
,
26
,
240
,
239
,
756
,
680
,
26
,
/* 260 */
239
,
248
,
247
,
96
,
175
,
229
,
767
,
76
,
80
,
245
,
/* 270 */
238
,
129
,
237
,
236
,
235
,
119
,
120
,
70
,
66
,
69
,
/* 270 */
190
,
554
,
21
,
85
,
88
,
79
,
18
,
156
,
121
,
122
,
/* 280 */
203
,
165
,
163
,
164
,
689
,
533
,
180
,
129
,
530
,
186
,
/* 280 */
605
,
82
,
608
,
42
,
70
,
66
,
69
,
225
,
770
,
767
,
/* 290 */
531
,
850
,
532
,
184
,
183
,
596
,
153
,
599
,
133
,
131
,
/* 290 */
135
,
133
,
601
,
42
,
611
,
768
,
93
,
92
,
91
,
690
,
/* 300 */
93
,
92
,
91
,
42
,
174
,
546
,
681
,
220
,
219
,
129
,
/* 300 */
168
,
207
,
131
,
42
,
611
,
230
,
545
,
767
,
546
,
610
,
/* 310 */
18
,
61
,
541
,
42
,
603
,
593
,
175
,
176
,
563
,
189
,
/* 310 */
699
,
157
,
691
,
131
,
611
,
131
,
604
,
541
,
607
,
610
,
/* 320 */
3
,
47
,
46
,
537
,
603
,
538
,
564
,
623
,
605
,
602
,
/* 320 */
538
,
571
,
539
,
47
,
540
,
46
,
580
,
581
,
602
,
610
,
/* 330 */
14
,
13
,
13
,
154
,
523
,
75
,
74
,
522
,
46
,
602
,
/* 330 */
572
,
631
,
613
,
50
,
14
,
13
,
13
,
531
,
543
,
3
,
/* 340 */
48
,
22
,
207
,
535
,
155
,
536
,
22
,
42
,
10
,
9
,
/* 340 */
544
,
46
,
48
,
530
,
75
,
74
,
811
,
22
,
178
,
179
,
/* 350 */
140
,
594
,
87
,
86
,
141
,
143
,
144
,
148
,
603
,
149
,
/* 350 */
51
,
211
,
10
,
9
,
829
,
22
,
87
,
86
,
101
,
99
,
/* 360 */
147
,
136
,
146
,
139
,
865
,
759
,
819
,
818
,
168
,
607
,
/* 360 */
158
,
143
,
144
,
146
,
147
,
151
,
152
,
150
,
139
,
149
,
/* 370 */
815
,
814
,
169
,
602
,
751
,
224
,
781
,
773
,
786
,
788
,
/* 370 */
769
,
142
,
828
,
171
,
825
,
824
,
172
,
791
,
761
,
796
,
/* 380 */
102
,
801
,
117
,
800
,
115
,
118
,
26
,
534
,
188
,
691
,
/* 380 */
228
,
783
,
798
,
104
,
810
,
119
,
120
,
701
,
117
,
212
,
/* 390 */
208
,
134
,
24
,
217
,
688
,
218
,
864
,
72
,
863
,
861
,
/* 390 */
615
,
137
,
24
,
221
,
698
,
26
,
222
,
192
,
874
,
72
,
/* 400 */
121
,
95
,
709
,
25
,
23
,
135
,
678
,
81
,
558
,
676
,
/* 400 */
873
,
871
,
123
,
719
,
25
,
100
,
23
,
138
,
566
,
688
,
/* 410 */
83
,
191
,
84
,
674
,
158
,
673
,
195
,
177
,
130
,
671
,
/* 410 */
81
,
686
,
83
,
84
,
684
,
195
,
780
,
683
,
161
,
542
,
/* 420 */
52
,
670
,
770
,
669
,
49
,
44
,
668
,
107
,
108
,
200
,
/* 420 */
180
,
199
,
132
,
681
,
680
,
679
,
52
,
49
,
678
,
677
,
/* 430 */
667
,
194
,
659
,
132
,
665
,
663
,
198
,
196
,
192
,
661
,
/* 430 */
109
,
134
,
44
,
675
,
204
,
673
,
671
,
669
,
667
,
202
,
/* 440 */
28
,
57
,
58
,
802
,
216
,
77
,
227
,
228
,
229
,
230
,
/* 440 */
200
,
198
,
196
,
28
,
136
,
220
,
57
,
58
,
812
,
77
,
/* 450 */
231
,
232
,
205
,
233
,
242
,
53
,
637
,
178
,
179
,
636
,
/* 450 */
231
,
232
,
233
,
234
,
235
,
236
,
237
,
246
,
209
,
645
,
/* 460 */
152
,
64
,
67
,
182
,
181
,
672
,
635
,
628
,
94
,
96
,
/* 460 */
53
,
182
,
183
,
644
,
110
,
64
,
67
,
155
,
186
,
185
,
/* 470 */
185
,
666
,
124
,
55
,
123
,
710
,
122
,
125
,
126
,
128
,
/* 470 */
682
,
643
,
94
,
636
,
676
,
189
,
126
,
125
,
720
,
124
,
/* 480 */
127
,
1
,
2
,
189
,
755
,
543
,
59
,
560
,
111
,
109
,
/* 480 */
127
,
128
,
130
,
129
,
95
,
668
,
1
,
551
,
193
,
765
,
/* 490 */
112
,
110
,
104
,
113
,
114
,
160
,
19
,
193
,
5
,
565
,
/* 490 */
2
,
55
,
113
,
111
,
114
,
112
,
115
,
116
,
59
,
568
,
/* 500 */
105
,
6
,
606
,
4
,
20
,
15
,
204
,
7
,
608
,
65
,
/* 500 */
163
,
106
,
197
,
5
,
573
,
107
,
6
,
65
,
614
,
19
,
/* 510 */
206
,
492
,
488
,
486
,
485
,
484
,
481
,
455
,
215
,
68
,
/* 510 */
4
,
20
,
15
,
208
,
616
,
7
,
210
,
500
,
496
,
494
,
/* 520 */
45
,
71
,
22
,
519
,
73
,
518
,
516
,
54
,
476
,
474
,
/* 520 */
493
,
492
,
489
,
463
,
219
,
68
,
45
,
71
,
73
,
22
,
/* 530 */
466
,
472
,
468
,
470
,
464
,
462
,
491
,
490
,
489
,
487
,
/* 530 */
527
,
526
,
524
,
54
,
484
,
482
,
474
,
480
,
476
,
478
,
/* 540 */
483
,
482
,
46
,
453
,
426
,
424
,
641
,
640
,
640
,
640
,
/* 540 */
472
,
470
,
499
,
498
,
497
,
495
,
491
,
490
,
46
,
461
,
/* 550 */
640
,
640
,
640
,
640
,
640
,
640
,
640
,
640
,
98
,
99
,
/* 550 */
432
,
430
,
649
,
648
,
648
,
648
,
648
,
648
,
648
,
648
,
/* 560 */
648
,
648
,
648
,
648
,
97
,
98
,
};
};
static
const
YYCODETYPE
yy_lookahead
[]
=
{
static
const
YYCODETYPE
yy_lookahead
[]
=
{
/* 0 */
225
,
1
,
259
,
228
,
229
,
206
,
207
,
1
,
233
,
9
,
/* 0 */
226
,
1
,
260
,
229
,
230
,
207
,
208
,
1
,
234
,
9
,
/* 10 */
235
,
236
,
237
,
13
,
14
,
9
,
16
,
17
,
208
,
209
,
/* 10 */
236
,
237
,
238
,
13
,
14
,
9
,
16
,
17
,
209
,
210
,
/* 20 */
20
,
21
,
259
,
259
,
24
,
25
,
26
,
27
,
28
,
209
,
/* 20 */
20
,
21
,
260
,
1
,
24
,
25
,
26
,
27
,
28
,
260
,
/* 30 */
5
,
268
,
269
,
33
,
34
,
209
,
259
,
37
,
38
,
39
,
/* 30 */
260
,
9
,
270
,
33
,
34
,
260
,
260
,
37
,
38
,
39
,
/* 40 */
13
,
14
,
243
,
16
,
17
,
268
,
269
,
20
,
21
,
243
,
/* 40 */
13
,
14
,
244
,
16
,
17
,
269
,
270
,
20
,
21
,
260
,
/* 50 */
209
,
24
,
25
,
26
,
27
,
28
,
257
,
226
,
33
,
34
,
/* 50 */
247
,
24
,
25
,
26
,
27
,
28
,
258
,
5
,
269
,
270
,
/* 60 */
33
,
34
,
259
,
257
,
37
,
38
,
39
,
13
,
14
,
1
,
/* 60 */
33
,
34
,
259
,
210
,
37
,
38
,
39
,
45
,
46
,
47
,
/* 70 */
16
,
17
,
269
,
259
,
20
,
21
,
245
,
9
,
24
,
25
,
/* 70 */
48
,
49
,
50
,
51
,
52
,
53
,
54
,
55
,
56
,
57
,
/* 80 */
26
,
27
,
28
,
263
,
72
,
265
,
260
,
33
,
34
,
78
,
/* 80 */
13
,
14
,
60
,
16
,
17
,
33
,
34
,
20
,
21
,
244
,
/* 90 */
78
,
37
,
38
,
39
,
209
,
25
,
26
,
27
,
28
,
37
,
/* 90 */
66
,
24
,
25
,
26
,
27
,
28
,
243
,
227
,
245
,
210
,
/* 100 */
38
,
39
,
102
,
33
,
34
,
259
,
265
,
37
,
38
,
39
,
/* 100 */
33
,
34
,
102
,
258
,
37
,
38
,
39
,
210
,
14
,
98
,
/* 110 */
209
,
209
,
209
,
45
,
46
,
47
,
48
,
49
,
50
,
51
,
/* 110 */
16
,
17
,
101
,
102
,
20
,
21
,
246
,
210
,
24
,
25
,
/* 120 */
52
,
53
,
54
,
55
,
56
,
57
,
99
,
242
,
14
,
244
,
/* 120 */
26
,
27
,
28
,
37
,
38
,
39
,
99
,
33
,
34
,
73
,
/* 130 */
16
,
17
,
209
,
103
,
20
,
21
,
209
,
246
,
24
,
25
,
/* 130 */
246
,
37
,
38
,
39
,
78
,
16
,
17
,
210
,
78
,
20
,
/* 140 */
26
,
27
,
28
,
242
,
242
,
244
,
244
,
33
,
34
,
258
,
/* 140 */
21
,
126
,
245
,
24
,
25
,
26
,
27
,
28
,
133
,
134
,
/* 150 */
120
,
37
,
38
,
39
,
98
,
16
,
17
,
101
,
102
,
20
,
/* 150 */
261
,
127
,
33
,
34
,
130
,
131
,
37
,
38
,
39
,
85
,
/* 160 */
21
,
209
,
239
,
24
,
25
,
26
,
27
,
28
,
265
,
242
,
/* 160 */
86
,
87
,
88
,
89
,
90
,
91
,
92
,
93
,
94
,
95
,
/* 170 */
267
,
244
,
33
,
34
,
226
,
259
,
37
,
38
,
39
,
85
,
/* 170 */
96
,
97
,
226
,
266
,
228
,
229
,
230
,
231
,
232
,
233
,
/* 180 */
86
,
87
,
88
,
89
,
90
,
91
,
92
,
93
,
94
,
95
,
/* 180 */
234
,
235
,
236
,
237
,
238
,
239
,
1
,
2
,
210
,
44
,
/* 190 */
96
,
97
,
225
,
245
,
227
,
228
,
229
,
230
,
231
,
232
,
/* 190 */
5
,
98
,
7
,
266
,
9
,
268
,
1
,
2
,
105
,
210
,
/* 200 */
233
,
234
,
235
,
236
,
237
,
238
,
1
,
2
,
44
,
226
,
/* 200 */
5
,
210
,
7
,
260
,
9
,
60
,
1
,
2
,
227
,
99
,
/* 210 */
5
,
98
,
7
,
261
,
9
,
99
,
1
,
2
,
105
,
103
,
/* 210 */
5
,
66
,
7
,
103
,
9
,
70
,
71
,
72
,
33
,
34
,
/* 220 */
5
,
5
,
7
,
7
,
9
,
33
,
34
,
63
,
245
,
37
,
/* 220 */
33
,
34
,
37
,
98
,
37
,
38
,
39
,
246
,
33
,
34
,
/* 230 */
38
,
39
,
209
,
69
,
70
,
71
,
115
,
116
,
33
,
34
,
/* 230 */
105
,
210
,
37
,
25
,
26
,
27
,
28
,
99
,
33
,
34
,
/* 240 */
63
,
77
,
37
,
64
,
65
,
66
,
67
,
68
,
33
,
34
,
/* 240 */
262
,
33
,
34
,
98
,
106
,
37
,
38
,
39
,
260
,
85
,
/* 250 */
1
,
2
,
37
,
74
,
5
,
209
,
7
,
98
,
9
,
60
,
/* 250 */
105
,
87
,
88
,
264
,
210
,
266
,
92
,
266
,
94
,
95
,
/* 260 */
61
,
62
,
98
,
85
,
105
,
87
,
88
,
244
,
213
,
105
,
/* 260 */
96
,
63
,
64
,
65
,
243
,
210
,
245
,
61
,
62
,
227
,
/* 270 */
92
,
216
,
94
,
95
,
96
,
64
,
65
,
66
,
67
,
68
,
/* 270 */
125
,
103
,
210
,
67
,
68
,
69
,
108
,
132
,
61
,
62
,
/* 280 */
15
,
59
,
33
,
34
,
213
,
2
,
126
,
216
,
5
,
125
,
/* 280 */
5
,
75
,
7
,
98
,
67
,
68
,
69
,
243
,
246
,
245
,
/* 290 */
7
,
259
,
9
,
133
,
134
,
5
,
132
,
7
,
64
,
65
,
/* 290 */
61
,
62
,
1
,
98
,
109
,
240
,
67
,
68
,
69
,
214
,
/* 300 */
66
,
67
,
68
,
98
,
127
,
103
,
213
,
130
,
131
,
216
,
/* 300 */
59
,
15
,
217
,
98
,
109
,
243
,
5
,
245
,
7
,
124
,
/* 310 */
108
,
265
,
99
,
98
,
109
,
1
,
33
,
34
,
99
,
106
,
/* 310 */
214
,
260
,
214
,
217
,
109
,
217
,
5
,
2
,
7
,
124
,
/* 320 */
98
,
103
,
103
,
5
,
109
,
7
,
99
,
99
,
99
,
124
,
/* 320 */
5
,
99
,
7
,
103
,
9
,
103
,
115
,
116
,
37
,
124
,
/* 330 */
103
,
103
,
103
,
259
,
99
,
128
,
129
,
99
,
103
,
124
,
/* 330 */
99
,
99
,
99
,
103
,
103
,
103
,
103
,
99
,
5
,
98
,
/* 340 */
122
,
103
,
99
,
5
,
259
,
7
,
103
,
98
,
128
,
129
,
/* 340 */
7
,
103
,
122
,
99
,
128
,
129
,
267
,
103
,
33
,
34
,
/* 350 */
259
,
37
,
72
,
73
,
259
,
259
,
259
,
259
,
109
,
259
,
/* 350 */
120
,
99
,
128
,
129
,
241
,
103
,
73
,
74
,
61
,
62
,
/* 360 */
259
,
259
,
259
,
259
,
245
,
245
,
240
,
240
,
240
,
104
,
/* 360 */
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
260
,
/* 370 */
240
,
240
,
240
,
124
,
241
,
240
,
209
,
243
,
209
,
209
,
/* 370 */
246
,
260
,
241
,
241
,
241
,
241
,
241
,
210
,
242
,
210
,
/* 380 */
209
,
266
,
209
,
266
,
247
,
209
,
105
,
104
,
243
,
209
,
/* 380 */
241
,
244
,
210
,
210
,
267
,
210
,
210
,
210
,
248
,
210
,
/* 390 */
209
,
209
,
209
,
209
,
209
,
209
,
209
,
209
,
209
,
209
,
/* 390 */
104
,
210
,
210
,
210
,
210
,
105
,
210
,
244
,
210
,
210
,
/* 400 */
209
,
59
,
209
,
209
,
209
,
209
,
209
,
209
,
109
,
209
,
/* 400 */
210
,
210
,
210
,
210
,
210
,
59
,
210
,
210
,
109
,
210
,
/* 410 */
209
,
262
,
209
,
209
,
262
,
209
,
262
,
209
,
209
,
209
,
/* 410 */
210
,
210
,
210
,
210
,
210
,
263
,
257
,
210
,
263
,
104
,
/* 420 */
119
,
209
,
256
,
209
,
121
,
118
,
209
,
255
,
254
,
113
,
/* 420 */
210
,
263
,
210
,
210
,
210
,
210
,
119
,
121
,
210
,
210
,
/* 430 */
209
,
111
,
209
,
209
,
209
,
209
,
117
,
112
,
110
,
209
,
/* 430 */
256
,
210
,
118
,
210
,
113
,
210
,
210
,
210
,
210
,
117
,
/* 440 */
123
,
210
,
210
,
210
,
75
,
84
,
83
,
49
,
80
,
82
,
/* 440 */
112
,
111
,
110
,
123
,
210
,
76
,
211
,
211
,
211
,
84
,
/* 450 */
53
,
81
,
210
,
79
,
75
,
210
,
5
,
135
,
5
,
5
,
/* 450 */
83
,
49
,
80
,
82
,
53
,
81
,
79
,
76
,
211
,
5
,
/* 460 */
210
,
214
,
214
,
5
,
135
,
210
,
5
,
86
,
211
,
211
,
/* 460 */
211
,
135
,
5
,
5
,
255
,
215
,
215
,
211
,
5
,
135
,
/* 470 */
126
,
210
,
218
,
107
,
222
,
224
,
223
,
221
,
219
,
217
,
/* 470 */
211
,
5
,
212
,
86
,
211
,
126
,
219
,
223
,
225
,
224
,
/* 480 */
220
,
215
,
212
,
106
,
243
,
99
,
103
,
99
,
251
,
253
,
/* 480 */
222
,
220
,
218
,
221
,
212
,
211
,
216
,
99
,
106
,
244
,
/* 490 */
250
,
252
,
98
,
249
,
248
,
1
,
103
,
98
,
114
,
99
,
/* 490 */
213
,
107
,
252
,
254
,
251
,
253
,
250
,
249
,
103
,
99
,
/* 500 */
98
,
114
,
99
,
98
,
103
,
98
,
100
,
98
,
104
,
72
,
/* 500 */
1
,
98
,
98
,
114
,
99
,
98
,
114
,
73
,
99
,
103
,
/* 510 */
100
,
9
,
5
,
5
,
5
,
5
,
5
,
76
,
15
,
72
,
/* 510 */
98
,
103
,
98
,
100
,
104
,
98
,
100
,
9
,
5
,
5
,
/* 520 */
16
,
129
,
103
,
5
,
129
,
5
,
99
,
98
,
5
,
5
,
/* 520 */
5
,
5
,
5
,
77
,
15
,
73
,
16
,
129
,
129
,
103
,
/* 530 */
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
/* 530 */
5
,
5
,
99
,
98
,
5
,
5
,
5
,
5
,
5
,
5
,
/* 540 */
5
,
5
,
103
,
76
,
59
,
58
,
0
,
270
,
270
,
270
,
/* 540 */
5
,
5
,
5
,
5
,
5
,
5
,
5
,
5
,
103
,
77
,
/* 550 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
21
,
21
,
/* 550 */
59
,
58
,
0
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 560 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 560 */
271
,
271
,
271
,
271
,
21
,
21
,
271
,
271
,
271
,
271
,
/* 570 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 570 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 580 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 580 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 590 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 590 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 600 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 600 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 610 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 610 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 620 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 620 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 630 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 630 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 640 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 640 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 650 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 650 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 660 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 660 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 670 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 670 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 680 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 680 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 690 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 690 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 700 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 700 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 710 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 710 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 720 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 720 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 730 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 730 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 740 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 740 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 750 */
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
270
,
/* 750 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 760 */
270
,
270
,
270
,
270
,
270
,
270
,
/* 760 */
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
271
,
/* 770 */
271
,
271
,
};
};
#define YY_SHIFT_COUNT (2
47
)
#define YY_SHIFT_COUNT (2
51
)
#define YY_SHIFT_MIN (0)
#define YY_SHIFT_MIN (0)
#define YY_SHIFT_MAX (5
46
)
#define YY_SHIFT_MAX (5
52
)
static
const
unsigned
short
int
yy_shift_ofst
[]
=
{
static
const
unsigned
short
int
yy_shift_ofst
[]
=
{
/* 0 */
1
64
,
94
,
178
,
205
,
249
,
6
,
6
,
6
,
6
,
6
,
/* 0 */
1
45
,
74
,
164
,
185
,
205
,
6
,
6
,
6
,
6
,
6
,
/* 10 */
6
,
0
,
68
,
249
,
283
,
283
,
283
,
11
3
,
6
,
6
,
/* 10 */
6
,
0
,
22
,
205
,
315
,
315
,
315
,
9
3
,
6
,
6
,
/* 20 */
6
,
6
,
6
,
12
,
11
,
11
,
560
,
215
,
249
,
249
,
/* 20 */
6
,
6
,
6
,
56
,
60
,
60
,
566
,
195
,
205
,
205
,
/* 30 */
2
49
,
249
,
249
,
249
,
249
,
249
,
249
,
249
,
249
,
249
,
/* 30 */
2
05
,
205
,
205
,
205
,
205
,
205
,
205
,
205
,
205
,
205
,
/* 40 */
2
49
,
249
,
249
,
249
,
249
,
283
,
283
,
25
,
25
,
25
,
/* 40 */
2
05
,
205
,
205
,
205
,
205
,
315
,
315
,
52
,
52
,
52
,
/* 50 */
25
,
25
,
25
,
56
,
25
,
159
,
6
,
6
,
6
,
6
,
/* 50 */
52
,
52
,
52
,
11
,
52
,
125
,
6
,
6
,
6
,
6
,
/* 60 */
121
,
121
,
202
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
/* 60 */
211
,
211
,
168
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
/* 70 */
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
/* 70 */
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
/* 80 */
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
/* 80 */
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
/* 90 */
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
/* 90 */
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
6
,
/* 100 */
281
,
342
,
342
,
299
,
299
,
299
,
342
,
301
,
303
,
307
,
/* 100 */
6
,
6
,
290
,
346
,
346
,
299
,
299
,
299
,
346
,
307
,
/* 110 */
316
,
319
,
325
,
320
,
328
,
317
,
281
,
342
,
342
,
369
,
/* 110 */
306
,
314
,
321
,
322
,
328
,
330
,
332
,
320
,
290
,
346
,
/* 120 */
369
,
342
,
361
,
363
,
398
,
368
,
367
,
397
,
370
,
374
,
/* 120 */
346
,
369
,
369
,
346
,
365
,
367
,
402
,
372
,
371
,
401
,
/* 130 */
342
,
379
,
342
,
379
,
560
,
560
,
27
,
54
,
54
,
54
,
/* 130 */
374
,
377
,
346
,
381
,
346
,
381
,
346
,
566
,
566
,
27
,
/* 140 */
114
,
139
,
70
,
70
,
70
,
179
,
192
,
192
,
192
,
192
,
/* 140 */
67
,
67
,
67
,
94
,
119
,
208
,
208
,
208
,
206
,
187
,
/* 150 */
211
,
234
,
177
,
160
,
62
,
62
,
199
,
213
,
116
,
219
,
/* 150 */
187
,
187
,
187
,
217
,
229
,
24
,
15
,
86
,
86
,
198
,
/* 160 */
227
,
228
,
229
,
216
,
290
,
314
,
222
,
265
,
218
,
30
,
/* 160 */
138
,
110
,
222
,
231
,
232
,
233
,
275
,
311
,
291
,
241
,
/* 170 */
235
,
238
,
243
,
207
,
220
,
318
,
338
,
280
,
451
,
322
,
/* 170 */
286
,
220
,
230
,
238
,
244
,
252
,
216
,
224
,
301
,
333
,
/* 180 */
453
,
454
,
329
,
458
,
461
,
381
,
344
,
377
,
386
,
366
,
/* 180 */
283
,
297
,
454
,
326
,
457
,
458
,
334
,
463
,
466
,
387
,
/* 190 */
383
,
388
,
394
,
494
,
399
,
400
,
402
,
393
,
384
,
401
,
/* 190 */
349
,
382
,
388
,
384
,
395
,
400
,
403
,
499
,
404
,
405
,
/* 200 */
387
,
403
,
405
,
404
,
407
,
406
,
409
,
410
,
437
,
502
,
/* 200 */
407
,
406
,
389
,
408
,
392
,
409
,
412
,
410
,
414
,
413
,
/* 210 */
507
,
508
,
509
,
510
,
511
,
441
,
503
,
447
,
504
,
392
,
/* 210 */
417
,
416
,
434
,
508
,
513
,
514
,
515
,
516
,
517
,
446
,
/* 220 */
395
,
419
,
518
,
520
,
427
,
429
,
419
,
523
,
524
,
525
,
/* 220 */
509
,
452
,
510
,
398
,
399
,
426
,
525
,
526
,
433
,
435
,
/* 230 */
526
,
527
,
528
,
529
,
530
,
531
,
532
,
533
,
534
,
535
,
/* 230 */
426
,
529
,
530
,
531
,
532
,
533
,
534
,
535
,
536
,
537
,
/* 240 */
536
,
439
,
467
,
537
,
538
,
485
,
487
,
546
,
/* 240 */
538
,
539
,
540
,
541
,
542
,
445
,
472
,
543
,
544
,
491
,
/* 250 */
493
,
552
,
};
};
#define YY_REDUCE_COUNT (13
5
)
#define YY_REDUCE_COUNT (13
8
)
#define YY_REDUCE_MIN (-25
7
)
#define YY_REDUCE_MIN (-25
8
)
#define YY_REDUCE_MAX (27
0
)
#define YY_REDUCE_MAX (27
7
)
static
const
short
yy_reduce_ofst
[]
=
{
static
const
short
yy_reduce_ofst
[]
=
{
/* 0 */
-
20
1
,
-
33
,
-
225
,
-
237
,
-
223
,
-
97
,
-
180
,
-
115
,
-
99
,
-
98
,
/* 0 */
-
20
2
,
-
54
,
-
226
,
-
224
,
-
211
,
-
73
,
-
11
,
-
147
,
21
,
44
,
/* 10 */
-
73
,
-
174
,
-
190
,
-
197
,
-
169
,
-
52
,
-
17
,
-
194
,
-
48
,
-
159
,
/* 10 */
62
,
-
111
,
-
191
,
-
238
,
-
130
,
-
19
,
42
,
-
155
,
-
22
,
-
93
,
/* 20 */
46
,
-
77
,
23
,
55
,
71
,
93
,
-
109
,
-
257
,
-
236
,
-
186
,
/* 20 */
-
9
,
55
,
-
103
,
85
,
96
,
98
,
-
197
,
-
258
,
-
231
,
-
230
,
/* 30 */
-
154
,
-
84
,
32
,
74
,
85
,
91
,
95
,
96
,
97
,
98
,
/* 30 */
-
225
,
-
57
,
-
12
,
51
,
100
,
101
,
102
,
103
,
104
,
105
,
/* 40 */
10
0
,
101
,
102
,
103
,
104
,
119
,
120
,
126
,
127
,
128
,
/* 40 */
10
6
,
107
,
108
,
109
,
111
,
-
116
,
124
,
113
,
131
,
132
,
/* 50 */
13
0
,
131
,
132
,
133
,
135
,
134
,
167
,
169
,
170
,
171
,
/* 50 */
13
3
,
134
,
135
,
136
,
139
,
137
,
167
,
169
,
172
,
173
,
/* 60 */
115
,
117
,
137
,
173
,
176
,
180
,
181
,
182
,
183
,
184
,
/* 60 */
79
,
117
,
140
,
175
,
176
,
177
,
179
,
181
,
182
,
183
,
/* 70 */
18
5
,
186
,
187
,
188
,
189
,
190
,
191
,
193
,
194
,
195
,
/* 70 */
18
4
,
186
,
188
,
189
,
190
,
191
,
192
,
193
,
194
,
196
,
/* 80 */
19
6
,
197
,
198
,
200
,
201
,
203
,
204
,
206
,
208
,
209
,
/* 80 */
19
7
,
199
,
200
,
201
,
202
,
203
,
204
,
207
,
210
,
212
,
/* 90 */
21
0
,
212
,
214
,
217
,
221
,
223
,
224
,
225
,
226
,
230
,
/* 90 */
21
3
,
214
,
215
,
218
,
219
,
221
,
223
,
225
,
226
,
227
,
/* 100 */
145
,
231
,
232
,
149
,
152
,
154
,
233
,
166
,
172
,
174
,
/* 100 */
228
,
234
,
153
,
235
,
236
,
152
,
155
,
158
,
237
,
159
,
/* 110 */
236
,
239
,
237
,
240
,
244
,
246
,
241
,
242
,
245
,
247
,
/* 110 */
174
,
209
,
239
,
242
,
240
,
243
,
246
,
248
,
245
,
247
,
/* 120 */
24
8
,
250
,
251
,
253
,
252
,
254
,
256
,
259
,
260
,
262
,
/* 120 */
24
9
,
250
,
251
,
256
,
253
,
255
,
254
,
257
,
258
,
261
,
/* 130 */
2
55
,
257
,
261
,
258
,
266
,
270
,
/* 130 */
2
62
,
264
,
259
,
260
,
263
,
272
,
274
,
270
,
277
,
};
};
static
const
YYACTIONTYPE
yy_default
[]
=
{
static
const
YYACTIONTYPE
yy_default
[]
=
{
/* 0 */
638
,
690
,
679
,
858
,
858
,
638
,
638
,
638
,
638
,
638
,
/* 0 */
646
,
700
,
689
,
868
,
868
,
646
,
646
,
646
,
646
,
646
,
/* 10 */
638
,
783
,
656
,
858
,
638
,
638
,
638
,
638
,
638
,
638
,
/* 10 */
646
,
793
,
664
,
868
,
646
,
646
,
646
,
646
,
646
,
646
,
/* 20 */
638
,
638
,
638
,
692
,
692
,
692
,
778
,
638
,
638
,
638
,
/* 20 */
646
,
646
,
646
,
702
,
702
,
702
,
788
,
646
,
646
,
646
,
/* 30 */
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
/* 30 */
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
/* 40 */
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
/* 40 */
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
/* 50 */
638
,
638
,
638
,
638
,
638
,
638
,
638
,
785
,
787
,
638
,
/* 50 */
646
,
646
,
646
,
646
,
646
,
646
,
646
,
795
,
797
,
646
,
/* 60 */
805
,
805
,
776
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
/* 60 */
815
,
815
,
786
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
/* 70 */
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
/* 70 */
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
/* 80 */
638
,
677
,
638
,
675
,
638
,
638
,
638
,
638
,
638
,
638
,
/* 80 */
646
,
687
,
646
,
685
,
646
,
646
,
646
,
646
,
646
,
646
,
/* 90 */
638
,
638
,
638
,
638
,
638
,
638
,
638
,
664
,
638
,
638
,
/* 90 */
646
,
646
,
646
,
646
,
646
,
646
,
674
,
646
,
646
,
646
,
/* 100 */
638
,
658
,
658
,
638
,
638
,
638
,
658
,
812
,
816
,
810
,
/* 100 */
646
,
646
,
646
,
666
,
666
,
646
,
646
,
646
,
666
,
822
,
/* 110 */
798
,
806
,
797
,
793
,
792
,
820
,
638
,
658
,
658
,
687
,
/* 110 */
826
,
820
,
808
,
816
,
807
,
803
,
802
,
830
,
646
,
666
,
/* 120 */
687
,
658
,
708
,
706
,
704
,
696
,
702
,
698
,
700
,
694
,
/* 120 */
666
,
697
,
697
,
666
,
718
,
716
,
714
,
706
,
712
,
708
,
/* 130 */
658
,
685
,
658
,
685
,
724
,
738
,
638
,
821
,
857
,
811
,
/* 130 */
710
,
704
,
666
,
695
,
666
,
695
,
666
,
734
,
748
,
646
,
/* 140 */
847
,
846
,
853
,
845
,
844
,
638
,
840
,
841
,
843
,
842
,
/* 140 */
831
,
867
,
821
,
857
,
856
,
863
,
855
,
854
,
646
,
850
,
/* 150 */
638
,
638
,
638
,
638
,
849
,
848
,
638
,
638
,
638
,
638
,
/* 150 */
851
,
853
,
852
,
646
,
646
,
646
,
646
,
859
,
858
,
646
,
/* 160 */
638
,
638
,
638
,
638
,
638
,
638
,
823
,
638
,
817
,
813
,
/* 160 */
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
833
,
/* 170 */
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
/* 170 */
646
,
827
,
823
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
/* 180 */
638
,
638
,
638
,
638
,
638
,
638
,
638
,
775
,
638
,
638
,
/* 180 */
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
/* 190 */
784
,
638
,
638
,
638
,
638
,
638
,
638
,
807
,
638
,
799
,
/* 190 */
646
,
785
,
646
,
646
,
794
,
646
,
646
,
646
,
646
,
646
,
/* 200 */
638
,
638
,
638
,
638
,
638
,
638
,
638
,
752
,
638
,
638
,
/* 200 */
646
,
817
,
646
,
809
,
646
,
646
,
646
,
646
,
646
,
646
,
/* 210 */
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
/* 210 */
646
,
762
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
/* 220 */
638
,
862
,
638
,
638
,
638
,
746
,
860
,
638
,
638
,
638
,
/* 220 */
646
,
646
,
646
,
646
,
646
,
872
,
646
,
646
,
646
,
756
,
/* 230 */
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
638
,
/* 230 */
870
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
646
,
/* 240 */
638
,
711
,
638
,
662
,
660
,
638
,
654
,
638
,
/* 240 */
646
,
646
,
646
,
646
,
646
,
721
,
646
,
672
,
670
,
646
,
/* 250 */
662
,
646
,
};
};
/********** End of lemon-generated parsing tables *****************************/
/********** End of lemon-generated parsing tables *****************************/
...
@@ -506,12 +499,13 @@ static const YYCODETYPE yyFallback[] = {
...
@@ -506,12 +499,13 @@ static const YYCODETYPE yyFallback[] = {
0
,
/* VNODES => nothing */
0
,
/* VNODES => nothing */
1
,
/* IPTOKEN => ID */
1
,
/* IPTOKEN => ID */
0
,
/* DOT => nothing */
0
,
/* DOT => nothing */
0
,
/* CREATE => nothing */
0
,
/* TABLE => nothing */
1
,
/* DATABASE => ID */
0
,
/* TABLES => nothing */
0
,
/* TABLES => nothing */
0
,
/* STABLES => nothing */
0
,
/* STABLES => nothing */
0
,
/* VGROUPS => nothing */
0
,
/* VGROUPS => nothing */
0
,
/* DROP => nothing */
0
,
/* DROP => nothing */
0
,
/* TABLE => nothing */
1
,
/* DATABASE => ID */
0
,
/* DNODE => nothing */
0
,
/* DNODE => nothing */
0
,
/* USER => nothing */
0
,
/* USER => nothing */
0
,
/* ACCOUNT => nothing */
0
,
/* ACCOUNT => nothing */
...
@@ -523,7 +517,6 @@ static const YYCODETYPE yyFallback[] = {
...
@@ -523,7 +517,6 @@ static const YYCODETYPE yyFallback[] = {
0
,
/* LOCAL => nothing */
0
,
/* LOCAL => nothing */
0
,
/* IF => nothing */
0
,
/* IF => nothing */
0
,
/* EXISTS => nothing */
0
,
/* EXISTS => nothing */
0
,
/* CREATE => nothing */
0
,
/* PPS => nothing */
0
,
/* PPS => nothing */
0
,
/* TSERIES => nothing */
0
,
/* TSERIES => nothing */
0
,
/* DBS => nothing */
0
,
/* DBS => nothing */
...
@@ -691,7 +684,6 @@ struct yyParser {
...
@@ -691,7 +684,6 @@ struct yyParser {
int
yyerrcnt
;
/* Shifts left before out of the error */
int
yyerrcnt
;
/* Shifts left before out of the error */
#endif
#endif
ParseARG_SDECL
/* A place to hold %extra_argument */
ParseARG_SDECL
/* A place to hold %extra_argument */
ParseCTX_SDECL
/* A place to hold %extra_context */
#if YYSTACKDEPTH<=0
#if YYSTACKDEPTH<=0
int
yystksz
;
/* Current side of the stack */
int
yystksz
;
/* Current side of the stack */
yyStackEntry
*
yystack
;
/* The parser's stack */
yyStackEntry
*
yystack
;
/* The parser's stack */
...
@@ -799,24 +791,24 @@ static const char *const yyTokenName[] = {
...
@@ -799,24 +791,24 @@ static const char *const yyTokenName[] = {
/* 57 */
"VNODES"
,
/* 57 */
"VNODES"
,
/* 58 */
"IPTOKEN"
,
/* 58 */
"IPTOKEN"
,
/* 59 */
"DOT"
,
/* 59 */
"DOT"
,
/* 60 */
"
TABLES
"
,
/* 60 */
"
CREATE
"
,
/* 61 */
"
STABLES
"
,
/* 61 */
"
TABLE
"
,
/* 62 */
"
VGROUPS
"
,
/* 62 */
"
DATABASE
"
,
/* 63 */
"
DROP
"
,
/* 63 */
"
TABLES
"
,
/* 64 */
"
TABLE
"
,
/* 64 */
"
STABLES
"
,
/* 65 */
"
DATABASE
"
,
/* 65 */
"
VGROUPS
"
,
/* 66 */
"D
NODE
"
,
/* 66 */
"D
ROP
"
,
/* 67 */
"
USER
"
,
/* 67 */
"
DNODE
"
,
/* 68 */
"
ACCOUNT
"
,
/* 68 */
"
USER
"
,
/* 69 */
"
USE
"
,
/* 69 */
"
ACCOUNT
"
,
/* 70 */
"
DESCRIB
E"
,
/* 70 */
"
US
E"
,
/* 71 */
"
ALTER
"
,
/* 71 */
"
DESCRIBE
"
,
/* 72 */
"
PASS
"
,
/* 72 */
"
ALTER
"
,
/* 73 */
"P
RIVILEGE
"
,
/* 73 */
"P
ASS
"
,
/* 74 */
"
LOCAL
"
,
/* 74 */
"
PRIVILEGE
"
,
/* 75 */
"
IF
"
,
/* 75 */
"
LOCAL
"
,
/* 76 */
"
EXISTS
"
,
/* 76 */
"
IF
"
,
/* 77 */
"
CREATE
"
,
/* 77 */
"
EXISTS
"
,
/* 78 */
"PPS"
,
/* 78 */
"PPS"
,
/* 79 */
"TSERIES"
,
/* 79 */
"TSERIES"
,
/* 80 */
"DBS"
,
/* 80 */
"DBS"
,
...
@@ -945,70 +937,71 @@ static const char *const yyTokenName[] = {
...
@@ -945,70 +937,71 @@ static const char *const yyTokenName[] = {
/* 203 */
"INSERT"
,
/* 203 */
"INSERT"
,
/* 204 */
"INTO"
,
/* 204 */
"INTO"
,
/* 205 */
"VALUES"
,
/* 205 */
"VALUES"
,
/* 206 */
"program"
,
/* 206 */
"error"
,
/* 207 */
"cmd"
,
/* 207 */
"program"
,
/* 208 */
"dbPrefix"
,
/* 208 */
"cmd"
,
/* 209 */
"ids"
,
/* 209 */
"dbPrefix"
,
/* 210 */
"cpxName"
,
/* 210 */
"ids"
,
/* 211 */
"ifexists"
,
/* 211 */
"cpxName"
,
/* 212 */
"alter_db_optr"
,
/* 212 */
"ifexists"
,
/* 213 */
"acct_optr"
,
/* 213 */
"alter_db_optr"
,
/* 214 */
"ifnotexists"
,
/* 214 */
"acct_optr"
,
/* 215 */
"db_optr"
,
/* 215 */
"ifnotexists"
,
/* 216 */
"pps"
,
/* 216 */
"db_optr"
,
/* 217 */
"tseries"
,
/* 217 */
"pps"
,
/* 218 */
"dbs"
,
/* 218 */
"tseries"
,
/* 219 */
"streams"
,
/* 219 */
"dbs"
,
/* 220 */
"storage"
,
/* 220 */
"streams"
,
/* 221 */
"qtime"
,
/* 221 */
"storage"
,
/* 222 */
"users"
,
/* 222 */
"qtime"
,
/* 223 */
"conns"
,
/* 223 */
"users"
,
/* 224 */
"state"
,
/* 224 */
"conns"
,
/* 225 */
"keep"
,
/* 225 */
"state"
,
/* 226 */
"tagitemlist"
,
/* 226 */
"keep"
,
/* 227 */
"cache"
,
/* 227 */
"tagitemlist"
,
/* 228 */
"replica"
,
/* 228 */
"cache"
,
/* 229 */
"quorum"
,
/* 229 */
"replica"
,
/* 230 */
"days"
,
/* 230 */
"quorum"
,
/* 231 */
"minrows"
,
/* 231 */
"days"
,
/* 232 */
"maxrows"
,
/* 232 */
"minrows"
,
/* 233 */
"blocks"
,
/* 233 */
"maxrows"
,
/* 234 */
"ctime"
,
/* 234 */
"blocks"
,
/* 235 */
"wal"
,
/* 235 */
"ctime"
,
/* 236 */
"fsync"
,
/* 236 */
"wal"
,
/* 237 */
"comp"
,
/* 237 */
"fsync"
,
/* 238 */
"prec"
,
/* 238 */
"comp"
,
/* 239 */
"typename"
,
/* 239 */
"prec"
,
/* 240 */
"signed"
,
/* 240 */
"typename"
,
/* 241 */
"create_table_args"
,
/* 241 */
"signed"
,
/* 242 */
"columnlist"
,
/* 242 */
"create_table_args"
,
/* 243 */
"select"
,
/* 243 */
"columnlist"
,
/* 244 */
"column"
,
/* 244 */
"select"
,
/* 245 */
"tagitem"
,
/* 245 */
"column"
,
/* 246 */
"selcollist"
,
/* 246 */
"tagitem"
,
/* 247 */
"from"
,
/* 247 */
"selcollist"
,
/* 248 */
"where_opt"
,
/* 248 */
"from"
,
/* 249 */
"interval_opt"
,
/* 249 */
"where_opt"
,
/* 250 */
"fill_opt"
,
/* 250 */
"interval_opt"
,
/* 251 */
"sliding_opt"
,
/* 251 */
"fill_opt"
,
/* 252 */
"groupby_opt"
,
/* 252 */
"sliding_opt"
,
/* 253 */
"orderby_opt"
,
/* 253 */
"groupby_opt"
,
/* 254 */
"having_opt"
,
/* 254 */
"orderby_opt"
,
/* 255 */
"slimit_opt"
,
/* 255 */
"having_opt"
,
/* 256 */
"limit_opt"
,
/* 256 */
"slimit_opt"
,
/* 257 */
"union"
,
/* 257 */
"limit_opt"
,
/* 258 */
"sclp"
,
/* 258 */
"union"
,
/* 259 */
"expr"
,
/* 259 */
"sclp"
,
/* 260 */
"as"
,
/* 260 */
"expr"
,
/* 261 */
"tablelist"
,
/* 261 */
"as"
,
/* 262 */
"tmvar"
,
/* 262 */
"tablelist"
,
/* 263 */
"sortlist"
,
/* 263 */
"tmvar"
,
/* 264 */
"sortitem"
,
/* 264 */
"sortlist"
,
/* 265 */
"item"
,
/* 265 */
"sortitem"
,
/* 266 */
"sortorder"
,
/* 266 */
"item"
,
/* 267 */
"grouplist"
,
/* 267 */
"sortorder"
,
/* 268 */
"exprlist"
,
/* 268 */
"grouplist"
,
/* 269 */
"expritem"
,
/* 269 */
"exprlist"
,
/* 270 */
"expritem"
,
};
};
#endif
/* defined(YYCOVERAGE) || !defined(NDEBUG) */
#endif
/* defined(YYCOVERAGE) || !defined(NDEBUG) */
...
@@ -1035,215 +1028,217 @@ static const char *const yyRuleName[] = {
...
@@ -1035,215 +1028,217 @@ static const char *const yyRuleName[] = {
/* 16 */
"dbPrefix ::= ids DOT"
,
/* 16 */
"dbPrefix ::= ids DOT"
,
/* 17 */
"cpxName ::="
,
/* 17 */
"cpxName ::="
,
/* 18 */
"cpxName ::= DOT ids"
,
/* 18 */
"cpxName ::= DOT ids"
,
/* 19 */
"cmd ::= SHOW dbPrefix TABLES"
,
/* 19 */
"cmd ::= SHOW CREATE TABLE ids cpxName"
,
/* 20 */
"cmd ::= SHOW dbPrefix TABLES LIKE ids"
,
/* 20 */
"cmd ::= SHOW CREATE DATABASE ids"
,
/* 21 */
"cmd ::= SHOW dbPrefix STABLES"
,
/* 21 */
"cmd ::= SHOW dbPrefix TABLES"
,
/* 22 */
"cmd ::= SHOW dbPrefix STABLES LIKE ids"
,
/* 22 */
"cmd ::= SHOW dbPrefix TABLES LIKE ids"
,
/* 23 */
"cmd ::= SHOW dbPrefix VGROUPS"
,
/* 23 */
"cmd ::= SHOW dbPrefix STABLES"
,
/* 24 */
"cmd ::= SHOW dbPrefix VGROUPS ids"
,
/* 24 */
"cmd ::= SHOW dbPrefix STABLES LIKE ids"
,
/* 25 */
"cmd ::= DROP TABLE ifexists ids cpxName"
,
/* 25 */
"cmd ::= SHOW dbPrefix VGROUPS"
,
/* 26 */
"cmd ::= DROP DATABASE ifexists ids"
,
/* 26 */
"cmd ::= SHOW dbPrefix VGROUPS ids"
,
/* 27 */
"cmd ::= DROP DNODE ids"
,
/* 27 */
"cmd ::= DROP TABLE ifexists ids cpxName"
,
/* 28 */
"cmd ::= DROP USER ids"
,
/* 28 */
"cmd ::= DROP DATABASE ifexists ids"
,
/* 29 */
"cmd ::= DROP ACCOUNT ids"
,
/* 29 */
"cmd ::= DROP DNODE ids"
,
/* 30 */
"cmd ::= USE ids"
,
/* 30 */
"cmd ::= DROP USER ids"
,
/* 31 */
"cmd ::= DESCRIBE ids cpxName"
,
/* 31 */
"cmd ::= DROP ACCOUNT ids"
,
/* 32 */
"cmd ::= ALTER USER ids PASS ids"
,
/* 32 */
"cmd ::= USE ids"
,
/* 33 */
"cmd ::= ALTER USER ids PRIVILEGE ids"
,
/* 33 */
"cmd ::= DESCRIBE ids cpxName"
,
/* 34 */
"cmd ::= ALTER DNODE ids ids"
,
/* 34 */
"cmd ::= ALTER USER ids PASS ids"
,
/* 35 */
"cmd ::= ALTER DNODE ids ids ids"
,
/* 35 */
"cmd ::= ALTER USER ids PRIVILEGE ids"
,
/* 36 */
"cmd ::= ALTER LOCAL ids"
,
/* 36 */
"cmd ::= ALTER DNODE ids ids"
,
/* 37 */
"cmd ::= ALTER LOCAL ids ids"
,
/* 37 */
"cmd ::= ALTER DNODE ids ids ids"
,
/* 38 */
"cmd ::= ALTER DATABASE ids alter_db_optr"
,
/* 38 */
"cmd ::= ALTER LOCAL ids"
,
/* 39 */
"cmd ::= ALTER ACCOUNT ids acct_optr"
,
/* 39 */
"cmd ::= ALTER LOCAL ids ids"
,
/* 40 */
"cmd ::= ALTER ACCOUNT ids PASS ids acct_optr"
,
/* 40 */
"cmd ::= ALTER DATABASE ids alter_db_optr"
,
/* 41 */
"ids ::= ID"
,
/* 41 */
"cmd ::= ALTER ACCOUNT ids acct_optr"
,
/* 42 */
"ids ::= STRING"
,
/* 42 */
"cmd ::= ALTER ACCOUNT ids PASS ids acct_optr"
,
/* 43 */
"ifexists ::= IF EXISTS"
,
/* 43 */
"ids ::= ID"
,
/* 44 */
"ifexists ::="
,
/* 44 */
"ids ::= STRING"
,
/* 45 */
"ifnotexists ::= IF NOT EXISTS"
,
/* 45 */
"ifexists ::= IF EXISTS"
,
/* 46 */
"ifnotexists ::="
,
/* 46 */
"ifexists ::="
,
/* 47 */
"cmd ::= CREATE DNODE ids"
,
/* 47 */
"ifnotexists ::= IF NOT EXISTS"
,
/* 48 */
"cmd ::= CREATE ACCOUNT ids PASS ids acct_optr"
,
/* 48 */
"ifnotexists ::="
,
/* 49 */
"cmd ::= CREATE DATABASE ifnotexists ids db_optr"
,
/* 49 */
"cmd ::= CREATE DNODE ids"
,
/* 50 */
"cmd ::= CREATE USER ids PASS ids"
,
/* 50 */
"cmd ::= CREATE ACCOUNT ids PASS ids acct_optr"
,
/* 51 */
"pps ::="
,
/* 51 */
"cmd ::= CREATE DATABASE ifnotexists ids db_optr"
,
/* 52 */
"pps ::= PPS INTEGER"
,
/* 52 */
"cmd ::= CREATE USER ids PASS ids"
,
/* 53 */
"tseries ::="
,
/* 53 */
"pps ::="
,
/* 54 */
"tseries ::= TSERIES INTEGER"
,
/* 54 */
"pps ::= PPS INTEGER"
,
/* 55 */
"dbs ::="
,
/* 55 */
"tseries ::="
,
/* 56 */
"dbs ::= DBS INTEGER"
,
/* 56 */
"tseries ::= TSERIES INTEGER"
,
/* 57 */
"streams ::="
,
/* 57 */
"dbs ::="
,
/* 58 */
"streams ::= STREAMS INTEGER"
,
/* 58 */
"dbs ::= DBS INTEGER"
,
/* 59 */
"storage ::="
,
/* 59 */
"streams ::="
,
/* 60 */
"storage ::= STORAGE INTEGER"
,
/* 60 */
"streams ::= STREAMS INTEGER"
,
/* 61 */
"qtime ::="
,
/* 61 */
"storage ::="
,
/* 62 */
"qtime ::= QTIME INTEGER"
,
/* 62 */
"storage ::= STORAGE INTEGER"
,
/* 63 */
"users ::="
,
/* 63 */
"qtime ::="
,
/* 64 */
"users ::= USERS INTEGER"
,
/* 64 */
"qtime ::= QTIME INTEGER"
,
/* 65 */
"conns ::="
,
/* 65 */
"users ::="
,
/* 66 */
"conns ::= CONNS INTEGER"
,
/* 66 */
"users ::= USERS INTEGER"
,
/* 67 */
"state ::="
,
/* 67 */
"conns ::="
,
/* 68 */
"state ::= STATE ids"
,
/* 68 */
"conns ::= CONNS INTEGER"
,
/* 69 */
"acct_optr ::= pps tseries storage streams qtime dbs users conns state"
,
/* 69 */
"state ::="
,
/* 70 */
"keep ::= KEEP tagitemlist"
,
/* 70 */
"state ::= STATE ids"
,
/* 71 */
"cache ::= CACHE INTEGER"
,
/* 71 */
"acct_optr ::= pps tseries storage streams qtime dbs users conns state"
,
/* 72 */
"replica ::= REPLICA INTEGER"
,
/* 72 */
"keep ::= KEEP tagitemlist"
,
/* 73 */
"quorum ::= QUORUM INTEGER"
,
/* 73 */
"cache ::= CACHE INTEGER"
,
/* 74 */
"days ::= DAYS INTEGER"
,
/* 74 */
"replica ::= REPLICA INTEGER"
,
/* 75 */
"minrows ::= MINROWS INTEGER"
,
/* 75 */
"quorum ::= QUORUM INTEGER"
,
/* 76 */
"maxrows ::= MAXROWS INTEGER"
,
/* 76 */
"days ::= DAYS INTEGER"
,
/* 77 */
"blocks ::= BLOCKS INTEGER"
,
/* 77 */
"minrows ::= MINROWS INTEGER"
,
/* 78 */
"ctime ::= CTIME INTEGER"
,
/* 78 */
"maxrows ::= MAXROWS INTEGER"
,
/* 79 */
"wal ::= WAL INTEGER"
,
/* 79 */
"blocks ::= BLOCKS INTEGER"
,
/* 80 */
"fsync ::= FSYNC INTEGER"
,
/* 80 */
"ctime ::= CTIME INTEGER"
,
/* 81 */
"comp ::= COMP INTEGER"
,
/* 81 */
"wal ::= WAL INTEGER"
,
/* 82 */
"prec ::= PRECISION STRING"
,
/* 82 */
"fsync ::= FSYNC INTEGER"
,
/* 83 */
"db_optr ::="
,
/* 83 */
"comp ::= COMP INTEGER"
,
/* 84 */
"db_optr ::= db_optr cache"
,
/* 84 */
"prec ::= PRECISION STRING"
,
/* 85 */
"db_optr ::= db_optr replica"
,
/* 85 */
"db_optr ::="
,
/* 86 */
"db_optr ::= db_optr quorum"
,
/* 86 */
"db_optr ::= db_optr cache"
,
/* 87 */
"db_optr ::= db_optr days"
,
/* 87 */
"db_optr ::= db_optr replica"
,
/* 88 */
"db_optr ::= db_optr minrows"
,
/* 88 */
"db_optr ::= db_optr quorum"
,
/* 89 */
"db_optr ::= db_optr maxrows"
,
/* 89 */
"db_optr ::= db_optr days"
,
/* 90 */
"db_optr ::= db_optr blocks"
,
/* 90 */
"db_optr ::= db_optr minrows"
,
/* 91 */
"db_optr ::= db_optr ctime"
,
/* 91 */
"db_optr ::= db_optr maxrows"
,
/* 92 */
"db_optr ::= db_optr wal"
,
/* 92 */
"db_optr ::= db_optr blocks"
,
/* 93 */
"db_optr ::= db_optr fsync"
,
/* 93 */
"db_optr ::= db_optr ctime"
,
/* 94 */
"db_optr ::= db_optr comp"
,
/* 94 */
"db_optr ::= db_optr wal"
,
/* 95 */
"db_optr ::= db_optr prec"
,
/* 95 */
"db_optr ::= db_optr fsync"
,
/* 96 */
"db_optr ::= db_optr keep"
,
/* 96 */
"db_optr ::= db_optr comp"
,
/* 97 */
"alter_db_optr ::="
,
/* 97 */
"db_optr ::= db_optr prec"
,
/* 98 */
"alter_db_optr ::= alter_db_optr replica"
,
/* 98 */
"db_optr ::= db_optr keep"
,
/* 99 */
"alter_db_optr ::= alter_db_optr quorum"
,
/* 99 */
"alter_db_optr ::="
,
/* 100 */
"alter_db_optr ::= alter_db_optr keep"
,
/* 100 */
"alter_db_optr ::= alter_db_optr replica"
,
/* 101 */
"alter_db_optr ::= alter_db_optr blocks"
,
/* 101 */
"alter_db_optr ::= alter_db_optr quorum"
,
/* 102 */
"alter_db_optr ::= alter_db_optr comp"
,
/* 102 */
"alter_db_optr ::= alter_db_optr keep"
,
/* 103 */
"alter_db_optr ::= alter_db_optr wal"
,
/* 103 */
"alter_db_optr ::= alter_db_optr blocks"
,
/* 104 */
"alter_db_optr ::= alter_db_optr fsync"
,
/* 104 */
"alter_db_optr ::= alter_db_optr comp"
,
/* 105 */
"typename ::= ids"
,
/* 105 */
"alter_db_optr ::= alter_db_optr wal"
,
/* 106 */
"typename ::= ids LP signed RP"
,
/* 106 */
"alter_db_optr ::= alter_db_optr fsync"
,
/* 107 */
"signed ::= INTEGER"
,
/* 107 */
"typename ::= ids"
,
/* 108 */
"signed ::= PLUS INTEGER"
,
/* 108 */
"typename ::= ids LP signed RP"
,
/* 109 */
"signed ::= MINUS INTEGER"
,
/* 109 */
"signed ::= INTEGER"
,
/* 110 */
"cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args"
,
/* 110 */
"signed ::= PLUS INTEGER"
,
/* 111 */
"create_table_args ::= LP columnlist RP"
,
/* 111 */
"signed ::= MINUS INTEGER"
,
/* 112 */
"create_table_args ::= LP columnlist RP TAGS LP columnlist RP"
,
/* 112 */
"cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args"
,
/* 113 */
"create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP"
,
/* 113 */
"create_table_args ::= LP columnlist RP"
,
/* 114 */
"create_table_args ::= AS select"
,
/* 114 */
"create_table_args ::= LP columnlist RP TAGS LP columnlist RP"
,
/* 115 */
"columnlist ::= columnlist COMMA column"
,
/* 115 */
"create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP"
,
/* 116 */
"columnlist ::= column"
,
/* 116 */
"create_table_args ::= AS select"
,
/* 117 */
"column ::= ids typename"
,
/* 117 */
"columnlist ::= columnlist COMMA column"
,
/* 118 */
"tagitemlist ::= tagitemlist COMMA tagitem"
,
/* 118 */
"columnlist ::= column"
,
/* 119 */
"tagitemlist ::= tagitem"
,
/* 119 */
"column ::= ids typename"
,
/* 120 */
"tagitem ::= INTEGER"
,
/* 120 */
"tagitemlist ::= tagitemlist COMMA tagitem"
,
/* 121 */
"tagitem ::= FLOAT"
,
/* 121 */
"tagitemlist ::= tagitem"
,
/* 122 */
"tagitem ::= STRING"
,
/* 122 */
"tagitem ::= INTEGER"
,
/* 123 */
"tagitem ::= BOOL"
,
/* 123 */
"tagitem ::= FLOAT"
,
/* 124 */
"tagitem ::= NULL"
,
/* 124 */
"tagitem ::= STRING"
,
/* 125 */
"tagitem ::= MINUS INTEGER"
,
/* 125 */
"tagitem ::= BOOL"
,
/* 126 */
"tagitem ::= MINUS FLOAT"
,
/* 126 */
"tagitem ::= NULL"
,
/* 127 */
"tagitem ::= PLUS INTEGER"
,
/* 127 */
"tagitem ::= MINUS INTEGER"
,
/* 128 */
"tagitem ::= PLUS FLOAT"
,
/* 128 */
"tagitem ::= MINUS FLOAT"
,
/* 129 */
"select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt"
,
/* 129 */
"tagitem ::= PLUS INTEGER"
,
/* 130 */
"union ::= select"
,
/* 130 */
"tagitem ::= PLUS FLOAT"
,
/* 131 */
"union ::= LP union RP"
,
/* 131 */
"select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt"
,
/* 132 */
"union ::= union UNION ALL select"
,
/* 132 */
"union ::= select"
,
/* 133 */
"union ::= union UNION ALL LP select RP"
,
/* 133 */
"union ::= LP union RP"
,
/* 134 */
"cmd ::= union"
,
/* 134 */
"union ::= union UNION ALL select"
,
/* 135 */
"select ::= SELECT selcollist"
,
/* 135 */
"union ::= union UNION ALL LP select RP"
,
/* 136 */
"sclp ::= selcollist COMMA"
,
/* 136 */
"cmd ::= union"
,
/* 137 */
"sclp ::="
,
/* 137 */
"select ::= SELECT selcollist"
,
/* 138 */
"selcollist ::= sclp expr as"
,
/* 138 */
"sclp ::= selcollist COMMA"
,
/* 139 */
"selcollist ::= sclp STAR"
,
/* 139 */
"sclp ::="
,
/* 140 */
"as ::= AS ids"
,
/* 140 */
"selcollist ::= sclp expr as"
,
/* 141 */
"as ::= ids"
,
/* 141 */
"selcollist ::= sclp STAR"
,
/* 142 */
"as ::="
,
/* 142 */
"as ::= AS ids"
,
/* 143 */
"from ::= FROM tablelist"
,
/* 143 */
"as ::= ids"
,
/* 144 */
"tablelist ::= ids cpxName"
,
/* 144 */
"as ::="
,
/* 145 */
"tablelist ::= ids cpxName ids"
,
/* 145 */
"from ::= FROM tablelist"
,
/* 146 */
"tablelist ::= tablelist COMMA ids cpxName"
,
/* 146 */
"tablelist ::= ids cpxName"
,
/* 147 */
"tablelist ::= tablelist COMMA ids cpxName ids"
,
/* 147 */
"tablelist ::= ids cpxName ids"
,
/* 148 */
"tmvar ::= VARIABLE"
,
/* 148 */
"tablelist ::= tablelist COMMA ids cpxName"
,
/* 149 */
"interval_opt ::= INTERVAL LP tmvar RP"
,
/* 149 */
"tablelist ::= tablelist COMMA ids cpxName ids"
,
/* 150 */
"interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP"
,
/* 150 */
"tmvar ::= VARIABLE"
,
/* 151 */
"interval_opt ::="
,
/* 151 */
"interval_opt ::= INTERVAL LP tmvar RP"
,
/* 152 */
"fill_opt ::="
,
/* 152 */
"interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP"
,
/* 153 */
"fill_opt ::= FILL LP ID COMMA tagitemlist RP"
,
/* 153 */
"interval_opt ::="
,
/* 154 */
"fill_opt ::= FILL LP ID RP"
,
/* 154 */
"fill_opt ::="
,
/* 155 */
"sliding_opt ::= SLIDING LP tmvar RP"
,
/* 155 */
"fill_opt ::= FILL LP ID COMMA tagitemlist RP"
,
/* 156 */
"sliding_opt ::="
,
/* 156 */
"fill_opt ::= FILL LP ID RP"
,
/* 157 */
"orderby_opt ::="
,
/* 157 */
"sliding_opt ::= SLIDING LP tmvar RP"
,
/* 158 */
"orderby_opt ::= ORDER BY sortlist"
,
/* 158 */
"sliding_opt ::="
,
/* 159 */
"sortlist ::= sortlist COMMA item sortorder"
,
/* 159 */
"orderby_opt ::="
,
/* 160 */
"sortlist ::= item sortorder"
,
/* 160 */
"orderby_opt ::= ORDER BY sortlist"
,
/* 161 */
"item ::= ids cpxName"
,
/* 161 */
"sortlist ::= sortlist COMMA item sortorder"
,
/* 162 */
"sortorder ::= ASC"
,
/* 162 */
"sortlist ::= item sortorder"
,
/* 163 */
"sortorder ::= DESC"
,
/* 163 */
"item ::= ids cpxName"
,
/* 164 */
"sortorder ::="
,
/* 164 */
"sortorder ::= ASC"
,
/* 165 */
"groupby_opt ::="
,
/* 165 */
"sortorder ::= DESC"
,
/* 166 */
"groupby_opt ::= GROUP BY grouplist"
,
/* 166 */
"sortorder ::="
,
/* 167 */
"grouplist ::= grouplist COMMA item"
,
/* 167 */
"groupby_opt ::="
,
/* 168 */
"grouplist ::= item"
,
/* 168 */
"groupby_opt ::= GROUP BY grouplist"
,
/* 169 */
"having_opt ::="
,
/* 169 */
"grouplist ::= grouplist COMMA item"
,
/* 170 */
"having_opt ::= HAVING expr"
,
/* 170 */
"grouplist ::= item"
,
/* 171 */
"limit_opt ::="
,
/* 171 */
"having_opt ::="
,
/* 172 */
"limit_opt ::= LIMIT signed"
,
/* 172 */
"having_opt ::= HAVING expr"
,
/* 173 */
"limit_opt ::= LIMIT signed OFFSET signed"
,
/* 173 */
"limit_opt ::="
,
/* 174 */
"limit_opt ::= LIMIT signed COMMA signed"
,
/* 174 */
"limit_opt ::= LIMIT signed"
,
/* 175 */
"slimit_opt ::="
,
/* 175 */
"limit_opt ::= LIMIT signed OFFSET signed"
,
/* 176 */
"slimit_opt ::= SLIMIT signed"
,
/* 176 */
"limit_opt ::= LIMIT signed COMMA signed"
,
/* 177 */
"slimit_opt ::= SLIMIT signed SOFFSET signed"
,
/* 177 */
"slimit_opt ::="
,
/* 178 */
"slimit_opt ::= SLIMIT signed COMMA signed"
,
/* 178 */
"slimit_opt ::= SLIMIT signed"
,
/* 179 */
"where_opt ::="
,
/* 179 */
"slimit_opt ::= SLIMIT signed SOFFSET signed"
,
/* 180 */
"where_opt ::= WHERE expr"
,
/* 180 */
"slimit_opt ::= SLIMIT signed COMMA signed"
,
/* 181 */
"expr ::= LP expr RP"
,
/* 181 */
"where_opt ::="
,
/* 182 */
"expr ::= ID"
,
/* 182 */
"where_opt ::= WHERE expr"
,
/* 183 */
"expr ::= ID DOT ID"
,
/* 183 */
"expr ::= LP expr RP"
,
/* 184 */
"expr ::= ID DOT STAR"
,
/* 184 */
"expr ::= ID"
,
/* 185 */
"expr ::= INTEGER"
,
/* 185 */
"expr ::= ID DOT ID"
,
/* 186 */
"expr ::= MINUS INTEGER"
,
/* 186 */
"expr ::= ID DOT STAR"
,
/* 187 */
"expr ::= PLUS INTEGER"
,
/* 187 */
"expr ::= INTEGER"
,
/* 188 */
"expr ::= FLOAT"
,
/* 188 */
"expr ::= MINUS INTEGER"
,
/* 189 */
"expr ::= MINUS FLOAT"
,
/* 189 */
"expr ::= PLUS INTEGER"
,
/* 190 */
"expr ::= PLUS FLOAT"
,
/* 190 */
"expr ::= FLOAT"
,
/* 191 */
"expr ::= STRING"
,
/* 191 */
"expr ::= MINUS FLOAT"
,
/* 192 */
"expr ::= NOW"
,
/* 192 */
"expr ::= PLUS FLOAT"
,
/* 193 */
"expr ::= VARIABLE"
,
/* 193 */
"expr ::= STRING"
,
/* 194 */
"expr ::= BOOL"
,
/* 194 */
"expr ::= NOW"
,
/* 195 */
"expr ::= ID LP exprlist RP"
,
/* 195 */
"expr ::= VARIABLE"
,
/* 196 */
"expr ::= ID LP STAR RP"
,
/* 196 */
"expr ::= BOOL"
,
/* 197 */
"expr ::= expr IS NULL"
,
/* 197 */
"expr ::= ID LP exprlist RP"
,
/* 198 */
"expr ::= expr IS NOT NULL"
,
/* 198 */
"expr ::= ID LP STAR RP"
,
/* 199 */
"expr ::= expr LT expr"
,
/* 199 */
"expr ::= expr IS NULL"
,
/* 200 */
"expr ::= expr GT expr"
,
/* 200 */
"expr ::= expr IS NOT NULL"
,
/* 201 */
"expr ::= expr LE expr"
,
/* 201 */
"expr ::= expr LT expr"
,
/* 202 */
"expr ::= expr GE expr"
,
/* 202 */
"expr ::= expr GT expr"
,
/* 203 */
"expr ::= expr NE expr"
,
/* 203 */
"expr ::= expr LE expr"
,
/* 204 */
"expr ::= expr EQ expr"
,
/* 204 */
"expr ::= expr GE expr"
,
/* 205 */
"expr ::= expr AND expr"
,
/* 205 */
"expr ::= expr NE expr"
,
/* 206 */
"expr ::= expr OR expr"
,
/* 206 */
"expr ::= expr EQ expr"
,
/* 207 */
"expr ::= expr PLUS expr"
,
/* 207 */
"expr ::= expr AND expr"
,
/* 208 */
"expr ::= expr MINUS expr"
,
/* 208 */
"expr ::= expr OR expr"
,
/* 209 */
"expr ::= expr STAR expr"
,
/* 209 */
"expr ::= expr PLUS expr"
,
/* 210 */
"expr ::= expr SLASH expr"
,
/* 210 */
"expr ::= expr MINUS expr"
,
/* 211 */
"expr ::= expr REM expr"
,
/* 211 */
"expr ::= expr STAR expr"
,
/* 212 */
"expr ::= expr LIKE expr"
,
/* 212 */
"expr ::= expr SLASH expr"
,
/* 213 */
"expr ::= expr IN LP exprlist RP"
,
/* 213 */
"expr ::= expr REM expr"
,
/* 214 */
"exprlist ::= exprlist COMMA expritem"
,
/* 214 */
"expr ::= expr LIKE expr"
,
/* 215 */
"exprlist ::= expritem"
,
/* 215 */
"expr ::= expr IN LP exprlist RP"
,
/* 216 */
"expritem ::= expr"
,
/* 216 */
"exprlist ::= exprlist COMMA expritem"
,
/* 217 */
"expritem ::="
,
/* 217 */
"exprlist ::= expritem"
,
/* 218 */
"cmd ::= RESET QUERY CACHE"
,
/* 218 */
"expritem ::= expr"
,
/* 219 */
"cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist"
,
/* 219 */
"expritem ::="
,
/* 220 */
"cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids"
,
/* 220 */
"cmd ::= RESET QUERY CACHE"
,
/* 221 */
"cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist"
,
/* 221 */
"cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist"
,
/* 222 */
"cmd ::= ALTER TABLE ids cpxName DROP TAG ids"
,
/* 222 */
"cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids"
,
/* 223 */
"cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids"
,
/* 223 */
"cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist"
,
/* 224 */
"cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 224 */
"cmd ::= ALTER TABLE ids cpxName DROP TAG ids"
,
/* 225 */
"cmd ::= KILL CONNECTION INTEGER"
,
/* 225 */
"cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids"
,
/* 226 */
"cmd ::= KILL STREAM INTEGER COLON INTEGER"
,
/* 226 */
"cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem"
,
/* 227 */
"cmd ::= KILL QUERY INTEGER COLON INTEGER"
,
/* 227 */
"cmd ::= KILL CONNECTION INTEGER"
,
/* 228 */
"cmd ::= KILL STREAM INTEGER COLON INTEGER"
,
/* 229 */
"cmd ::= KILL QUERY INTEGER COLON INTEGER"
,
};
};
#endif
/* NDEBUG */
#endif
/* NDEBUG */
...
@@ -1292,29 +1287,28 @@ static int yyGrowStack(yyParser *p){
...
@@ -1292,29 +1287,28 @@ static int yyGrowStack(yyParser *p){
/* Initialize a new parser that has already been allocated.
/* Initialize a new parser that has already been allocated.
*/
*/
void
ParseInit
(
void
*
yypRawParser
ParseCTX_PDECL
){
void
ParseInit
(
void
*
yypParser
){
yyParser
*
yypParser
=
(
yyParser
*
)
yypRawParser
;
yyParser
*
pParser
=
(
yyParser
*
)
yypParser
;
ParseCTX_STORE
#ifdef YYTRACKMAXSTACKDEPTH
#ifdef YYTRACKMAXSTACKDEPTH
yy
pParser
->
yyhwm
=
0
;
pParser
->
yyhwm
=
0
;
#endif
#endif
#if YYSTACKDEPTH<=0
#if YYSTACKDEPTH<=0
yy
pParser
->
yytos
=
NULL
;
pParser
->
yytos
=
NULL
;
yy
pParser
->
yystack
=
NULL
;
pParser
->
yystack
=
NULL
;
yy
pParser
->
yystksz
=
0
;
pParser
->
yystksz
=
0
;
if
(
yyGrowStack
(
yy
pParser
)
){
if
(
yyGrowStack
(
pParser
)
){
yypParser
->
yystack
=
&
yy
pParser
->
yystk0
;
pParser
->
yystack
=
&
pParser
->
yystk0
;
yy
pParser
->
yystksz
=
1
;
pParser
->
yystksz
=
1
;
}
}
#endif
#endif
#ifndef YYNOERRORRECOVERY
#ifndef YYNOERRORRECOVERY
yy
pParser
->
yyerrcnt
=
-
1
;
pParser
->
yyerrcnt
=
-
1
;
#endif
#endif
yypParser
->
yytos
=
yy
pParser
->
yystack
;
pParser
->
yytos
=
pParser
->
yystack
;
yy
pParser
->
yystack
[
0
].
stateno
=
0
;
pParser
->
yystack
[
0
].
stateno
=
0
;
yy
pParser
->
yystack
[
0
].
major
=
0
;
pParser
->
yystack
[
0
].
major
=
0
;
#if YYSTACKDEPTH>0
#if YYSTACKDEPTH>0
yypParser
->
yystackEnd
=
&
yy
pParser
->
yystack
[
YYSTACKDEPTH
-
1
];
pParser
->
yystackEnd
=
&
pParser
->
yystack
[
YYSTACKDEPTH
-
1
];
#endif
#endif
}
}
...
@@ -1331,14 +1325,11 @@ void ParseInit(void *yypRawParser ParseCTX_PDECL){
...
@@ -1331,14 +1325,11 @@ void ParseInit(void *yypRawParser ParseCTX_PDECL){
** A pointer to a parser. This pointer is used in subsequent calls
** A pointer to a parser. This pointer is used in subsequent calls
** to Parse and ParseFree.
** to Parse and ParseFree.
*/
*/
void
*
ParseAlloc
(
void
*
(
*
mallocProc
)(
YYMALLOCARGTYPE
)
ParseCTX_PDECL
){
void
*
ParseAlloc
(
void
*
(
*
mallocProc
)(
YYMALLOCARGTYPE
)){
yyParser
*
yypParser
;
yyParser
*
pParser
;
yypParser
=
(
yyParser
*
)(
*
mallocProc
)(
(
YYMALLOCARGTYPE
)
sizeof
(
yyParser
)
);
pParser
=
(
yyParser
*
)(
*
mallocProc
)(
(
YYMALLOCARGTYPE
)
sizeof
(
yyParser
)
);
if
(
yypParser
){
if
(
pParser
)
ParseInit
(
pParser
);
ParseCTX_STORE
return
pParser
;
ParseInit
(
yypParser
ParseCTX_PARAM
);
}
return
(
void
*
)
yypParser
;
}
}
#endif
/* Parse_ENGINEALWAYSONSTACK */
#endif
/* Parse_ENGINEALWAYSONSTACK */
...
@@ -1355,8 +1346,7 @@ static void yy_destructor(
...
@@ -1355,8 +1346,7 @@ static void yy_destructor(
YYCODETYPE
yymajor
,
/* Type code for object to destroy */
YYCODETYPE
yymajor
,
/* Type code for object to destroy */
YYMINORTYPE
*
yypminor
/* The object to be destroyed */
YYMINORTYPE
*
yypminor
/* The object to be destroyed */
){
){
ParseARG_FETCH
ParseARG_FETCH
;
ParseCTX_FETCH
switch
(
yymajor
){
switch
(
yymajor
){
/* Here is inserted the actions which take place when a
/* Here is inserted the actions which take place when a
** terminal or non-terminal is destroyed. This can happen
** terminal or non-terminal is destroyed. This can happen
...
@@ -1369,50 +1359,50 @@ static void yy_destructor(
...
@@ -1369,50 +1359,50 @@ static void yy_destructor(
** inside the C code.
** inside the C code.
*/
*/
/********* Begin destructor definitions ***************************************/
/********* Begin destructor definitions ***************************************/
case
22
5
:
/* keep */
case
22
6
:
/* keep */
case
22
6
:
/* tagitemlist */
case
22
7
:
/* tagitemlist */
case
25
0
:
/* fill_opt */
case
25
1
:
/* fill_opt */
case
25
2
:
/* groupby_opt */
case
25
3
:
/* groupby_opt */
case
25
3
:
/* orderby_opt */
case
25
4
:
/* orderby_opt */
case
26
3
:
/* sortlist */
case
26
4
:
/* sortlist */
case
26
7
:
/* grouplist */
case
26
8
:
/* grouplist */
{
{
tVariantListDestroy
((
yypminor
->
yy
156
));
tVariantListDestroy
((
yypminor
->
yy
494
));
}
}
break
;
break
;
case
24
2
:
/* columnlist */
case
24
3
:
/* columnlist */
{
{
tFieldListDestroy
((
yypminor
->
yy
511
));
tFieldListDestroy
((
yypminor
->
yy
449
));
}
}
break
;
break
;
case
24
3
:
/* select */
case
24
4
:
/* select */
{
{
doDestroyQuerySql
((
yypminor
->
yy
444
));
doDestroyQuerySql
((
yypminor
->
yy
150
));
}
}
break
;
break
;
case
24
6
:
/* selcollist */
case
24
7
:
/* selcollist */
case
25
8
:
/* sclp */
case
25
9
:
/* sclp */
case
26
8
:
/* exprlist */
case
26
9
:
/* exprlist */
{
{
tSQLExprListDestroy
((
yypminor
->
yy
158
));
tSQLExprListDestroy
((
yypminor
->
yy
224
));
}
}
break
;
break
;
case
24
8
:
/* where_opt */
case
24
9
:
/* where_opt */
case
25
4
:
/* having_opt */
case
25
5
:
/* having_opt */
case
2
59
:
/* expr */
case
2
60
:
/* expr */
case
2
69
:
/* expritem */
case
2
70
:
/* expritem */
{
{
tSQLExprDestroy
((
yypminor
->
yy
190
));
tSQLExprDestroy
((
yypminor
->
yy
66
));
}
}
break
;
break
;
case
25
7
:
/* union */
case
25
8
:
/* union */
{
{
destroyAllSelectClause
((
yypminor
->
yy
333
));
destroyAllSelectClause
((
yypminor
->
yy
25
));
}
}
break
;
break
;
case
26
4
:
/* sortitem */
case
26
5
:
/* sortitem */
{
{
tVariantDestroy
(
&
(
yypminor
->
yy
506
));
tVariantDestroy
(
&
(
yypminor
->
yy
312
));
}
}
break
;
break
;
/********* End destructor definitions *****************************************/
/********* End destructor definitions *****************************************/
...
@@ -1524,11 +1514,12 @@ int ParseCoverage(FILE *out){
...
@@ -1524,11 +1514,12 @@ int ParseCoverage(FILE *out){
** Find the appropriate action for a parser given the terminal
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
** look-ahead token iLookAhead.
*/
*/
static
YYACTIONTYPE
yy_find_shift_action
(
static
unsigned
int
yy_find_shift_action
(
YYCODETYPE
iLookAhead
,
/* The look-ahead token
*/
yyParser
*
pParser
,
/* The parser
*/
YY
ACTIONTYPE
stateno
/* Current state number
*/
YY
CODETYPE
iLookAhead
/* The look-ahead token
*/
){
){
int
i
;
int
i
;
int
stateno
=
pParser
->
yytos
->
stateno
;
if
(
stateno
>
YY_MAX_SHIFT
)
return
stateno
;
if
(
stateno
>
YY_MAX_SHIFT
)
return
stateno
;
assert
(
stateno
<=
YY_SHIFT_COUNT
);
assert
(
stateno
<=
YY_SHIFT_COUNT
);
...
@@ -1537,19 +1528,15 @@ static YYACTIONTYPE yy_find_shift_action(
...
@@ -1537,19 +1528,15 @@ static YYACTIONTYPE yy_find_shift_action(
#endif
#endif
do
{
do
{
i
=
yy_shift_ofst
[
stateno
];
i
=
yy_shift_ofst
[
stateno
];
assert
(
i
>=
0
);
assert
(
i
>=
0
&&
i
+
YYNTOKEN
<=
sizeof
(
yy_lookahead
)
/
sizeof
(
yy_lookahead
[
0
])
);
assert
(
i
<=
YY_ACTTAB_COUNT
);
assert
(
i
+
YYNTOKEN
<=
(
int
)
YY_NLOOKAHEAD
);
assert
(
iLookAhead
!=
YYNOCODE
);
assert
(
iLookAhead
!=
YYNOCODE
);
assert
(
iLookAhead
<
YYNTOKEN
);
assert
(
iLookAhead
<
YYNTOKEN
);
i
+=
iLookAhead
;
i
+=
iLookAhead
;
assert
(
i
<
(
int
)
YY_NLOOKAHEAD
);
if
(
yy_lookahead
[
i
]
!=
iLookAhead
){
if
(
yy_lookahead
[
i
]
!=
iLookAhead
){
#ifdef YYFALLBACK
#ifdef YYFALLBACK
YYCODETYPE
iFallback
;
/* Fallback token */
YYCODETYPE
iFallback
;
/* Fallback token */
assert
(
iLookAhead
<
sizeof
(
yyFallback
)
/
sizeof
(
yyFallback
[
0
])
);
if
(
iLookAhead
<
sizeof
(
yyFallback
)
/
sizeof
(
yyFallback
[
0
])
iFallback
=
yyFallback
[
iLookAhead
];
&&
(
iFallback
=
yyFallback
[
iLookAhead
])
!=
0
){
if
(
iFallback
!=
0
){
#ifndef NDEBUG
#ifndef NDEBUG
if
(
yyTraceFILE
){
if
(
yyTraceFILE
){
fprintf
(
yyTraceFILE
,
"%sFALLBACK %s => %s
\n
"
,
fprintf
(
yyTraceFILE
,
"%sFALLBACK %s => %s
\n
"
,
...
@@ -1564,8 +1551,15 @@ static YYACTIONTYPE yy_find_shift_action(
...
@@ -1564,8 +1551,15 @@ static YYACTIONTYPE yy_find_shift_action(
#ifdef YYWILDCARD
#ifdef YYWILDCARD
{
{
int
j
=
i
-
iLookAhead
+
YYWILDCARD
;
int
j
=
i
-
iLookAhead
+
YYWILDCARD
;
assert
(
j
<
(
int
)(
sizeof
(
yy_lookahead
)
/
sizeof
(
yy_lookahead
[
0
]))
);
if
(
if
(
yy_lookahead
[
j
]
==
YYWILDCARD
&&
iLookAhead
>
0
){
#if YY_SHIFT_MIN+YYWILDCARD<0
j
>=
0
&&
#endif
#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
j
<
YY_ACTTAB_COUNT
&&
#endif
yy_lookahead
[
j
]
==
YYWILDCARD
&&
iLookAhead
>
0
){
#ifndef NDEBUG
#ifndef NDEBUG
if
(
yyTraceFILE
){
if
(
yyTraceFILE
){
fprintf
(
yyTraceFILE
,
"%sWILDCARD %s => %s
\n
"
,
fprintf
(
yyTraceFILE
,
"%sWILDCARD %s => %s
\n
"
,
...
@@ -1579,7 +1573,6 @@ static YYACTIONTYPE yy_find_shift_action(
...
@@ -1579,7 +1573,6 @@ static YYACTIONTYPE yy_find_shift_action(
#endif
/* YYWILDCARD */
#endif
/* YYWILDCARD */
return
yy_default
[
stateno
];
return
yy_default
[
stateno
];
}
else
{
}
else
{
assert
(
i
>=
0
&&
i
<
sizeof
(
yy_action
)
/
sizeof
(
yy_action
[
0
])
);
return
yy_action
[
i
];
return
yy_action
[
i
];
}
}
}
while
(
1
);
}
while
(
1
);
...
@@ -1589,8 +1582,8 @@ static YYACTIONTYPE yy_find_shift_action(
...
@@ -1589,8 +1582,8 @@ static YYACTIONTYPE yy_find_shift_action(
** Find the appropriate action for a parser given the non-terminal
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.
** look-ahead token iLookAhead.
*/
*/
static
YYACTIONTYPE
yy_find_reduce_action
(
static
int
yy_find_reduce_action
(
YYACTIONTYPE
stateno
,
/* Current state number */
int
stateno
,
/* Current state number */
YYCODETYPE
iLookAhead
/* The look-ahead token */
YYCODETYPE
iLookAhead
/* The look-ahead token */
){
){
int
i
;
int
i
;
...
@@ -1619,8 +1612,7 @@ static YYACTIONTYPE yy_find_reduce_action(
...
@@ -1619,8 +1612,7 @@ static YYACTIONTYPE yy_find_reduce_action(
** The following routine is called if the stack overflows.
** The following routine is called if the stack overflows.
*/
*/
static
void
yyStackOverflow
(
yyParser
*
yypParser
){
static
void
yyStackOverflow
(
yyParser
*
yypParser
){
ParseARG_FETCH
ParseARG_FETCH
;
ParseCTX_FETCH
#ifndef NDEBUG
#ifndef NDEBUG
if
(
yyTraceFILE
){
if
(
yyTraceFILE
){
fprintf
(
yyTraceFILE
,
"%sStack Overflow!
\n
"
,
yyTracePrompt
);
fprintf
(
yyTraceFILE
,
"%sStack Overflow!
\n
"
,
yyTracePrompt
);
...
@@ -1631,8 +1623,7 @@ static void yyStackOverflow(yyParser *yypParser){
...
@@ -1631,8 +1623,7 @@ static void yyStackOverflow(yyParser *yypParser){
** stack every overflows */
** stack every overflows */
/******** Begin %stack_overflow code ******************************************/
/******** Begin %stack_overflow code ******************************************/
/******** End %stack_overflow code ********************************************/
/******** End %stack_overflow code ********************************************/
ParseARG_STORE
/* Suppress warning about unused %extra_argument var */
ParseARG_STORE
;
/* Suppress warning about unused %extra_argument var */
ParseCTX_STORE
}
}
/*
/*
...
@@ -1661,8 +1652,8 @@ static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
...
@@ -1661,8 +1652,8 @@ static void yyTraceShift(yyParser *yypParser, int yyNewState, const char *zTag){
*/
*/
static
void
yy_shift
(
static
void
yy_shift
(
yyParser
*
yypParser
,
/* The parser to be shifted */
yyParser
*
yypParser
,
/* The parser to be shifted */
YYACTIONTYPE
yyNewState
,
/* The new state to shift in */
int
yyNewState
,
/* The new state to shift in */
YYCODETYPE
yyMajor
,
/* The major token to shift in */
int
yyMajor
,
/* The major token to shift in */
ParseTOKENTYPE
yyMinor
/* The minor token to shift in */
ParseTOKENTYPE
yyMinor
/* The minor token to shift in */
){
){
yyStackEntry
*
yytos
;
yyStackEntry
*
yytos
;
...
@@ -1692,476 +1683,249 @@ static void yy_shift(
...
@@ -1692,476 +1683,249 @@ static void yy_shift(
yyNewState
+=
YY_MIN_REDUCE
-
YY_MIN_SHIFTREDUCE
;
yyNewState
+=
YY_MIN_REDUCE
-
YY_MIN_SHIFTREDUCE
;
}
}
yytos
=
yypParser
->
yytos
;
yytos
=
yypParser
->
yytos
;
yytos
->
stateno
=
yyNewState
;
yytos
->
stateno
=
(
YYACTIONTYPE
)
yyNewState
;
yytos
->
major
=
yyMajor
;
yytos
->
major
=
(
YYCODETYPE
)
yyMajor
;
yytos
->
minor
.
yy0
=
yyMinor
;
yytos
->
minor
.
yy0
=
yyMinor
;
yyTraceShift
(
yypParser
,
yyNewState
,
"Shift"
);
yyTraceShift
(
yypParser
,
yyNewState
,
"Shift"
);
}
}
/* For rule J, yyRuleInfoLhs[J] contains the symbol on the left-hand side
/* The following table contains information about every rule that
** of that rule */
** is used during the reduce.
static
const
YYCODETYPE
yyRuleInfoLhs
[]
=
{
*/
206
,
/* (0) program ::= cmd */
static
const
struct
{
207
,
/* (1) cmd ::= SHOW DATABASES */
YYCODETYPE
lhs
;
/* Symbol on the left-hand side of the rule */
207
,
/* (2) cmd ::= SHOW MNODES */
signed
char
nrhs
;
/* Negative of the number of RHS symbols in the rule */
207
,
/* (3) cmd ::= SHOW DNODES */
}
yyRuleInfo
[]
=
{
207
,
/* (4) cmd ::= SHOW ACCOUNTS */
{
207
,
-
1
},
/* (0) program ::= cmd */
207
,
/* (5) cmd ::= SHOW USERS */
{
208
,
-
2
},
/* (1) cmd ::= SHOW DATABASES */
207
,
/* (6) cmd ::= SHOW MODULES */
{
208
,
-
2
},
/* (2) cmd ::= SHOW MNODES */
207
,
/* (7) cmd ::= SHOW QUERIES */
{
208
,
-
2
},
/* (3) cmd ::= SHOW DNODES */
207
,
/* (8) cmd ::= SHOW CONNECTIONS */
{
208
,
-
2
},
/* (4) cmd ::= SHOW ACCOUNTS */
207
,
/* (9) cmd ::= SHOW STREAMS */
{
208
,
-
2
},
/* (5) cmd ::= SHOW USERS */
207
,
/* (10) cmd ::= SHOW VARIABLES */
{
208
,
-
2
},
/* (6) cmd ::= SHOW MODULES */
207
,
/* (11) cmd ::= SHOW SCORES */
{
208
,
-
2
},
/* (7) cmd ::= SHOW QUERIES */
207
,
/* (12) cmd ::= SHOW GRANTS */
{
208
,
-
2
},
/* (8) cmd ::= SHOW CONNECTIONS */
207
,
/* (13) cmd ::= SHOW VNODES */
{
208
,
-
2
},
/* (9) cmd ::= SHOW STREAMS */
207
,
/* (14) cmd ::= SHOW VNODES IPTOKEN */
{
208
,
-
2
},
/* (10) cmd ::= SHOW VARIABLES */
208
,
/* (15) dbPrefix ::= */
{
208
,
-
2
},
/* (11) cmd ::= SHOW SCORES */
208
,
/* (16) dbPrefix ::= ids DOT */
{
208
,
-
2
},
/* (12) cmd ::= SHOW GRANTS */
210
,
/* (17) cpxName ::= */
{
208
,
-
2
},
/* (13) cmd ::= SHOW VNODES */
210
,
/* (18) cpxName ::= DOT ids */
{
208
,
-
3
},
/* (14) cmd ::= SHOW VNODES IPTOKEN */
207
,
/* (19) cmd ::= SHOW dbPrefix TABLES */
{
209
,
0
},
/* (15) dbPrefix ::= */
207
,
/* (20) cmd ::= SHOW dbPrefix TABLES LIKE ids */
{
209
,
-
2
},
/* (16) dbPrefix ::= ids DOT */
207
,
/* (21) cmd ::= SHOW dbPrefix STABLES */
{
211
,
0
},
/* (17) cpxName ::= */
207
,
/* (22) cmd ::= SHOW dbPrefix STABLES LIKE ids */
{
211
,
-
2
},
/* (18) cpxName ::= DOT ids */
207
,
/* (23) cmd ::= SHOW dbPrefix VGROUPS */
{
208
,
-
5
},
/* (19) cmd ::= SHOW CREATE TABLE ids cpxName */
207
,
/* (24) cmd ::= SHOW dbPrefix VGROUPS ids */
{
208
,
-
4
},
/* (20) cmd ::= SHOW CREATE DATABASE ids */
207
,
/* (25) cmd ::= DROP TABLE ifexists ids cpxName */
{
208
,
-
3
},
/* (21) cmd ::= SHOW dbPrefix TABLES */
207
,
/* (26) cmd ::= DROP DATABASE ifexists ids */
{
208
,
-
5
},
/* (22) cmd ::= SHOW dbPrefix TABLES LIKE ids */
207
,
/* (27) cmd ::= DROP DNODE ids */
{
208
,
-
3
},
/* (23) cmd ::= SHOW dbPrefix STABLES */
207
,
/* (28) cmd ::= DROP USER ids */
{
208
,
-
5
},
/* (24) cmd ::= SHOW dbPrefix STABLES LIKE ids */
207
,
/* (29) cmd ::= DROP ACCOUNT ids */
{
208
,
-
3
},
/* (25) cmd ::= SHOW dbPrefix VGROUPS */
207
,
/* (30) cmd ::= USE ids */
{
208
,
-
4
},
/* (26) cmd ::= SHOW dbPrefix VGROUPS ids */
207
,
/* (31) cmd ::= DESCRIBE ids cpxName */
{
208
,
-
5
},
/* (27) cmd ::= DROP TABLE ifexists ids cpxName */
207
,
/* (32) cmd ::= ALTER USER ids PASS ids */
{
208
,
-
4
},
/* (28) cmd ::= DROP DATABASE ifexists ids */
207
,
/* (33) cmd ::= ALTER USER ids PRIVILEGE ids */
{
208
,
-
3
},
/* (29) cmd ::= DROP DNODE ids */
207
,
/* (34) cmd ::= ALTER DNODE ids ids */
{
208
,
-
3
},
/* (30) cmd ::= DROP USER ids */
207
,
/* (35) cmd ::= ALTER DNODE ids ids ids */
{
208
,
-
3
},
/* (31) cmd ::= DROP ACCOUNT ids */
207
,
/* (36) cmd ::= ALTER LOCAL ids */
{
208
,
-
2
},
/* (32) cmd ::= USE ids */
207
,
/* (37) cmd ::= ALTER LOCAL ids ids */
{
208
,
-
3
},
/* (33) cmd ::= DESCRIBE ids cpxName */
207
,
/* (38) cmd ::= ALTER DATABASE ids alter_db_optr */
{
208
,
-
5
},
/* (34) cmd ::= ALTER USER ids PASS ids */
207
,
/* (39) cmd ::= ALTER ACCOUNT ids acct_optr */
{
208
,
-
5
},
/* (35) cmd ::= ALTER USER ids PRIVILEGE ids */
207
,
/* (40) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
{
208
,
-
4
},
/* (36) cmd ::= ALTER DNODE ids ids */
209
,
/* (41) ids ::= ID */
{
208
,
-
5
},
/* (37) cmd ::= ALTER DNODE ids ids ids */
209
,
/* (42) ids ::= STRING */
{
208
,
-
3
},
/* (38) cmd ::= ALTER LOCAL ids */
211
,
/* (43) ifexists ::= IF EXISTS */
{
208
,
-
4
},
/* (39) cmd ::= ALTER LOCAL ids ids */
211
,
/* (44) ifexists ::= */
{
208
,
-
4
},
/* (40) cmd ::= ALTER DATABASE ids alter_db_optr */
214
,
/* (45) ifnotexists ::= IF NOT EXISTS */
{
208
,
-
4
},
/* (41) cmd ::= ALTER ACCOUNT ids acct_optr */
214
,
/* (46) ifnotexists ::= */
{
208
,
-
6
},
/* (42) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
207
,
/* (47) cmd ::= CREATE DNODE ids */
{
210
,
-
1
},
/* (43) ids ::= ID */
207
,
/* (48) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
{
210
,
-
1
},
/* (44) ids ::= STRING */
207
,
/* (49) cmd ::= CREATE DATABASE ifnotexists ids db_optr */
{
212
,
-
2
},
/* (45) ifexists ::= IF EXISTS */
207
,
/* (50) cmd ::= CREATE USER ids PASS ids */
{
212
,
0
},
/* (46) ifexists ::= */
216
,
/* (51) pps ::= */
{
215
,
-
3
},
/* (47) ifnotexists ::= IF NOT EXISTS */
216
,
/* (52) pps ::= PPS INTEGER */
{
215
,
0
},
/* (48) ifnotexists ::= */
217
,
/* (53) tseries ::= */
{
208
,
-
3
},
/* (49) cmd ::= CREATE DNODE ids */
217
,
/* (54) tseries ::= TSERIES INTEGER */
{
208
,
-
6
},
/* (50) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
218
,
/* (55) dbs ::= */
{
208
,
-
5
},
/* (51) cmd ::= CREATE DATABASE ifnotexists ids db_optr */
218
,
/* (56) dbs ::= DBS INTEGER */
{
208
,
-
5
},
/* (52) cmd ::= CREATE USER ids PASS ids */
219
,
/* (57) streams ::= */
{
217
,
0
},
/* (53) pps ::= */
219
,
/* (58) streams ::= STREAMS INTEGER */
{
217
,
-
2
},
/* (54) pps ::= PPS INTEGER */
220
,
/* (59) storage ::= */
{
218
,
0
},
/* (55) tseries ::= */
220
,
/* (60) storage ::= STORAGE INTEGER */
{
218
,
-
2
},
/* (56) tseries ::= TSERIES INTEGER */
221
,
/* (61) qtime ::= */
{
219
,
0
},
/* (57) dbs ::= */
221
,
/* (62) qtime ::= QTIME INTEGER */
{
219
,
-
2
},
/* (58) dbs ::= DBS INTEGER */
222
,
/* (63) users ::= */
{
220
,
0
},
/* (59) streams ::= */
222
,
/* (64) users ::= USERS INTEGER */
{
220
,
-
2
},
/* (60) streams ::= STREAMS INTEGER */
223
,
/* (65) conns ::= */
{
221
,
0
},
/* (61) storage ::= */
223
,
/* (66) conns ::= CONNS INTEGER */
{
221
,
-
2
},
/* (62) storage ::= STORAGE INTEGER */
224
,
/* (67) state ::= */
{
222
,
0
},
/* (63) qtime ::= */
224
,
/* (68) state ::= STATE ids */
{
222
,
-
2
},
/* (64) qtime ::= QTIME INTEGER */
213
,
/* (69) acct_optr ::= pps tseries storage streams qtime dbs users conns state */
{
223
,
0
},
/* (65) users ::= */
225
,
/* (70) keep ::= KEEP tagitemlist */
{
223
,
-
2
},
/* (66) users ::= USERS INTEGER */
227
,
/* (71) cache ::= CACHE INTEGER */
{
224
,
0
},
/* (67) conns ::= */
228
,
/* (72) replica ::= REPLICA INTEGER */
{
224
,
-
2
},
/* (68) conns ::= CONNS INTEGER */
229
,
/* (73) quorum ::= QUORUM INTEGER */
{
225
,
0
},
/* (69) state ::= */
230
,
/* (74) days ::= DAYS INTEGER */
{
225
,
-
2
},
/* (70) state ::= STATE ids */
231
,
/* (75) minrows ::= MINROWS INTEGER */
{
214
,
-
9
},
/* (71) acct_optr ::= pps tseries storage streams qtime dbs users conns state */
232
,
/* (76) maxrows ::= MAXROWS INTEGER */
{
226
,
-
2
},
/* (72) keep ::= KEEP tagitemlist */
233
,
/* (77) blocks ::= BLOCKS INTEGER */
{
228
,
-
2
},
/* (73) cache ::= CACHE INTEGER */
234
,
/* (78) ctime ::= CTIME INTEGER */
{
229
,
-
2
},
/* (74) replica ::= REPLICA INTEGER */
235
,
/* (79) wal ::= WAL INTEGER */
{
230
,
-
2
},
/* (75) quorum ::= QUORUM INTEGER */
236
,
/* (80) fsync ::= FSYNC INTEGER */
{
231
,
-
2
},
/* (76) days ::= DAYS INTEGER */
237
,
/* (81) comp ::= COMP INTEGER */
{
232
,
-
2
},
/* (77) minrows ::= MINROWS INTEGER */
238
,
/* (82) prec ::= PRECISION STRING */
{
233
,
-
2
},
/* (78) maxrows ::= MAXROWS INTEGER */
215
,
/* (83) db_optr ::= */
{
234
,
-
2
},
/* (79) blocks ::= BLOCKS INTEGER */
215
,
/* (84) db_optr ::= db_optr cache */
{
235
,
-
2
},
/* (80) ctime ::= CTIME INTEGER */
215
,
/* (85) db_optr ::= db_optr replica */
{
236
,
-
2
},
/* (81) wal ::= WAL INTEGER */
215
,
/* (86) db_optr ::= db_optr quorum */
{
237
,
-
2
},
/* (82) fsync ::= FSYNC INTEGER */
215
,
/* (87) db_optr ::= db_optr days */
{
238
,
-
2
},
/* (83) comp ::= COMP INTEGER */
215
,
/* (88) db_optr ::= db_optr minrows */
{
239
,
-
2
},
/* (84) prec ::= PRECISION STRING */
215
,
/* (89) db_optr ::= db_optr maxrows */
{
216
,
0
},
/* (85) db_optr ::= */
215
,
/* (90) db_optr ::= db_optr blocks */
{
216
,
-
2
},
/* (86) db_optr ::= db_optr cache */
215
,
/* (91) db_optr ::= db_optr ctime */
{
216
,
-
2
},
/* (87) db_optr ::= db_optr replica */
215
,
/* (92) db_optr ::= db_optr wal */
{
216
,
-
2
},
/* (88) db_optr ::= db_optr quorum */
215
,
/* (93) db_optr ::= db_optr fsync */
{
216
,
-
2
},
/* (89) db_optr ::= db_optr days */
215
,
/* (94) db_optr ::= db_optr comp */
{
216
,
-
2
},
/* (90) db_optr ::= db_optr minrows */
215
,
/* (95) db_optr ::= db_optr prec */
{
216
,
-
2
},
/* (91) db_optr ::= db_optr maxrows */
215
,
/* (96) db_optr ::= db_optr keep */
{
216
,
-
2
},
/* (92) db_optr ::= db_optr blocks */
212
,
/* (97) alter_db_optr ::= */
{
216
,
-
2
},
/* (93) db_optr ::= db_optr ctime */
212
,
/* (98) alter_db_optr ::= alter_db_optr replica */
{
216
,
-
2
},
/* (94) db_optr ::= db_optr wal */
212
,
/* (99) alter_db_optr ::= alter_db_optr quorum */
{
216
,
-
2
},
/* (95) db_optr ::= db_optr fsync */
212
,
/* (100) alter_db_optr ::= alter_db_optr keep */
{
216
,
-
2
},
/* (96) db_optr ::= db_optr comp */
212
,
/* (101) alter_db_optr ::= alter_db_optr blocks */
{
216
,
-
2
},
/* (97) db_optr ::= db_optr prec */
212
,
/* (102) alter_db_optr ::= alter_db_optr comp */
{
216
,
-
2
},
/* (98) db_optr ::= db_optr keep */
212
,
/* (103) alter_db_optr ::= alter_db_optr wal */
{
213
,
0
},
/* (99) alter_db_optr ::= */
212
,
/* (104) alter_db_optr ::= alter_db_optr fsync */
{
213
,
-
2
},
/* (100) alter_db_optr ::= alter_db_optr replica */
239
,
/* (105) typename ::= ids */
{
213
,
-
2
},
/* (101) alter_db_optr ::= alter_db_optr quorum */
239
,
/* (106) typename ::= ids LP signed RP */
{
213
,
-
2
},
/* (102) alter_db_optr ::= alter_db_optr keep */
240
,
/* (107) signed ::= INTEGER */
{
213
,
-
2
},
/* (103) alter_db_optr ::= alter_db_optr blocks */
240
,
/* (108) signed ::= PLUS INTEGER */
{
213
,
-
2
},
/* (104) alter_db_optr ::= alter_db_optr comp */
240
,
/* (109) signed ::= MINUS INTEGER */
{
213
,
-
2
},
/* (105) alter_db_optr ::= alter_db_optr wal */
207
,
/* (110) cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args */
{
213
,
-
2
},
/* (106) alter_db_optr ::= alter_db_optr fsync */
241
,
/* (111) create_table_args ::= LP columnlist RP */
{
240
,
-
1
},
/* (107) typename ::= ids */
241
,
/* (112) create_table_args ::= LP columnlist RP TAGS LP columnlist RP */
{
240
,
-
4
},
/* (108) typename ::= ids LP signed RP */
241
,
/* (113) create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP */
{
241
,
-
1
},
/* (109) signed ::= INTEGER */
241
,
/* (114) create_table_args ::= AS select */
{
241
,
-
2
},
/* (110) signed ::= PLUS INTEGER */
242
,
/* (115) columnlist ::= columnlist COMMA column */
{
241
,
-
2
},
/* (111) signed ::= MINUS INTEGER */
242
,
/* (116) columnlist ::= column */
{
208
,
-
6
},
/* (112) cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args */
244
,
/* (117) column ::= ids typename */
{
242
,
-
3
},
/* (113) create_table_args ::= LP columnlist RP */
226
,
/* (118) tagitemlist ::= tagitemlist COMMA tagitem */
{
242
,
-
7
},
/* (114) create_table_args ::= LP columnlist RP TAGS LP columnlist RP */
226
,
/* (119) tagitemlist ::= tagitem */
{
242
,
-
7
},
/* (115) create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP */
245
,
/* (120) tagitem ::= INTEGER */
{
242
,
-
2
},
/* (116) create_table_args ::= AS select */
245
,
/* (121) tagitem ::= FLOAT */
{
243
,
-
3
},
/* (117) columnlist ::= columnlist COMMA column */
245
,
/* (122) tagitem ::= STRING */
{
243
,
-
1
},
/* (118) columnlist ::= column */
245
,
/* (123) tagitem ::= BOOL */
{
245
,
-
2
},
/* (119) column ::= ids typename */
245
,
/* (124) tagitem ::= NULL */
{
227
,
-
3
},
/* (120) tagitemlist ::= tagitemlist COMMA tagitem */
245
,
/* (125) tagitem ::= MINUS INTEGER */
{
227
,
-
1
},
/* (121) tagitemlist ::= tagitem */
245
,
/* (126) tagitem ::= MINUS FLOAT */
{
246
,
-
1
},
/* (122) tagitem ::= INTEGER */
245
,
/* (127) tagitem ::= PLUS INTEGER */
{
246
,
-
1
},
/* (123) tagitem ::= FLOAT */
245
,
/* (128) tagitem ::= PLUS FLOAT */
{
246
,
-
1
},
/* (124) tagitem ::= STRING */
243
,
/* (129) select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
{
246
,
-
1
},
/* (125) tagitem ::= BOOL */
257
,
/* (130) union ::= select */
{
246
,
-
1
},
/* (126) tagitem ::= NULL */
257
,
/* (131) union ::= LP union RP */
{
246
,
-
2
},
/* (127) tagitem ::= MINUS INTEGER */
257
,
/* (132) union ::= union UNION ALL select */
{
246
,
-
2
},
/* (128) tagitem ::= MINUS FLOAT */
257
,
/* (133) union ::= union UNION ALL LP select RP */
{
246
,
-
2
},
/* (129) tagitem ::= PLUS INTEGER */
207
,
/* (134) cmd ::= union */
{
246
,
-
2
},
/* (130) tagitem ::= PLUS FLOAT */
243
,
/* (135) select ::= SELECT selcollist */
{
244
,
-
12
},
/* (131) select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
258
,
/* (136) sclp ::= selcollist COMMA */
{
258
,
-
1
},
/* (132) union ::= select */
258
,
/* (137) sclp ::= */
{
258
,
-
3
},
/* (133) union ::= LP union RP */
246
,
/* (138) selcollist ::= sclp expr as */
{
258
,
-
4
},
/* (134) union ::= union UNION ALL select */
246
,
/* (139) selcollist ::= sclp STAR */
{
258
,
-
6
},
/* (135) union ::= union UNION ALL LP select RP */
260
,
/* (140) as ::= AS ids */
{
208
,
-
1
},
/* (136) cmd ::= union */
260
,
/* (141) as ::= ids */
{
244
,
-
2
},
/* (137) select ::= SELECT selcollist */
260
,
/* (142) as ::= */
{
259
,
-
2
},
/* (138) sclp ::= selcollist COMMA */
247
,
/* (143) from ::= FROM tablelist */
{
259
,
0
},
/* (139) sclp ::= */
261
,
/* (144) tablelist ::= ids cpxName */
{
247
,
-
3
},
/* (140) selcollist ::= sclp expr as */
261
,
/* (145) tablelist ::= ids cpxName ids */
{
247
,
-
2
},
/* (141) selcollist ::= sclp STAR */
261
,
/* (146) tablelist ::= tablelist COMMA ids cpxName */
{
261
,
-
2
},
/* (142) as ::= AS ids */
261
,
/* (147) tablelist ::= tablelist COMMA ids cpxName ids */
{
261
,
-
1
},
/* (143) as ::= ids */
262
,
/* (148) tmvar ::= VARIABLE */
{
261
,
0
},
/* (144) as ::= */
249
,
/* (149) interval_opt ::= INTERVAL LP tmvar RP */
{
248
,
-
2
},
/* (145) from ::= FROM tablelist */
249
,
/* (150) interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
{
262
,
-
2
},
/* (146) tablelist ::= ids cpxName */
249
,
/* (151) interval_opt ::= */
{
262
,
-
3
},
/* (147) tablelist ::= ids cpxName ids */
250
,
/* (152) fill_opt ::= */
{
262
,
-
4
},
/* (148) tablelist ::= tablelist COMMA ids cpxName */
250
,
/* (153) fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
262
,
-
5
},
/* (149) tablelist ::= tablelist COMMA ids cpxName ids */
250
,
/* (154) fill_opt ::= FILL LP ID RP */
{
263
,
-
1
},
/* (150) tmvar ::= VARIABLE */
251
,
/* (155) sliding_opt ::= SLIDING LP tmvar RP */
{
250
,
-
4
},
/* (151) interval_opt ::= INTERVAL LP tmvar RP */
251
,
/* (156) sliding_opt ::= */
{
250
,
-
6
},
/* (152) interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
253
,
/* (157) orderby_opt ::= */
{
250
,
0
},
/* (153) interval_opt ::= */
253
,
/* (158) orderby_opt ::= ORDER BY sortlist */
{
251
,
0
},
/* (154) fill_opt ::= */
263
,
/* (159) sortlist ::= sortlist COMMA item sortorder */
{
251
,
-
6
},
/* (155) fill_opt ::= FILL LP ID COMMA tagitemlist RP */
263
,
/* (160) sortlist ::= item sortorder */
{
251
,
-
4
},
/* (156) fill_opt ::= FILL LP ID RP */
265
,
/* (161) item ::= ids cpxName */
{
252
,
-
4
},
/* (157) sliding_opt ::= SLIDING LP tmvar RP */
266
,
/* (162) sortorder ::= ASC */
{
252
,
0
},
/* (158) sliding_opt ::= */
266
,
/* (163) sortorder ::= DESC */
{
254
,
0
},
/* (159) orderby_opt ::= */
266
,
/* (164) sortorder ::= */
{
254
,
-
3
},
/* (160) orderby_opt ::= ORDER BY sortlist */
252
,
/* (165) groupby_opt ::= */
{
264
,
-
4
},
/* (161) sortlist ::= sortlist COMMA item sortorder */
252
,
/* (166) groupby_opt ::= GROUP BY grouplist */
{
264
,
-
2
},
/* (162) sortlist ::= item sortorder */
267
,
/* (167) grouplist ::= grouplist COMMA item */
{
266
,
-
2
},
/* (163) item ::= ids cpxName */
267
,
/* (168) grouplist ::= item */
{
267
,
-
1
},
/* (164) sortorder ::= ASC */
254
,
/* (169) having_opt ::= */
{
267
,
-
1
},
/* (165) sortorder ::= DESC */
254
,
/* (170) having_opt ::= HAVING expr */
{
267
,
0
},
/* (166) sortorder ::= */
256
,
/* (171) limit_opt ::= */
{
253
,
0
},
/* (167) groupby_opt ::= */
256
,
/* (172) limit_opt ::= LIMIT signed */
{
253
,
-
3
},
/* (168) groupby_opt ::= GROUP BY grouplist */
256
,
/* (173) limit_opt ::= LIMIT signed OFFSET signed */
{
268
,
-
3
},
/* (169) grouplist ::= grouplist COMMA item */
256
,
/* (174) limit_opt ::= LIMIT signed COMMA signed */
{
268
,
-
1
},
/* (170) grouplist ::= item */
255
,
/* (175) slimit_opt ::= */
{
255
,
0
},
/* (171) having_opt ::= */
255
,
/* (176) slimit_opt ::= SLIMIT signed */
{
255
,
-
2
},
/* (172) having_opt ::= HAVING expr */
255
,
/* (177) slimit_opt ::= SLIMIT signed SOFFSET signed */
{
257
,
0
},
/* (173) limit_opt ::= */
255
,
/* (178) slimit_opt ::= SLIMIT signed COMMA signed */
{
257
,
-
2
},
/* (174) limit_opt ::= LIMIT signed */
248
,
/* (179) where_opt ::= */
{
257
,
-
4
},
/* (175) limit_opt ::= LIMIT signed OFFSET signed */
248
,
/* (180) where_opt ::= WHERE expr */
{
257
,
-
4
},
/* (176) limit_opt ::= LIMIT signed COMMA signed */
259
,
/* (181) expr ::= LP expr RP */
{
256
,
0
},
/* (177) slimit_opt ::= */
259
,
/* (182) expr ::= ID */
{
256
,
-
2
},
/* (178) slimit_opt ::= SLIMIT signed */
259
,
/* (183) expr ::= ID DOT ID */
{
256
,
-
4
},
/* (179) slimit_opt ::= SLIMIT signed SOFFSET signed */
259
,
/* (184) expr ::= ID DOT STAR */
{
256
,
-
4
},
/* (180) slimit_opt ::= SLIMIT signed COMMA signed */
259
,
/* (185) expr ::= INTEGER */
{
249
,
0
},
/* (181) where_opt ::= */
259
,
/* (186) expr ::= MINUS INTEGER */
{
249
,
-
2
},
/* (182) where_opt ::= WHERE expr */
259
,
/* (187) expr ::= PLUS INTEGER */
{
260
,
-
3
},
/* (183) expr ::= LP expr RP */
259
,
/* (188) expr ::= FLOAT */
{
260
,
-
1
},
/* (184) expr ::= ID */
259
,
/* (189) expr ::= MINUS FLOAT */
{
260
,
-
3
},
/* (185) expr ::= ID DOT ID */
259
,
/* (190) expr ::= PLUS FLOAT */
{
260
,
-
3
},
/* (186) expr ::= ID DOT STAR */
259
,
/* (191) expr ::= STRING */
{
260
,
-
1
},
/* (187) expr ::= INTEGER */
259
,
/* (192) expr ::= NOW */
{
260
,
-
2
},
/* (188) expr ::= MINUS INTEGER */
259
,
/* (193) expr ::= VARIABLE */
{
260
,
-
2
},
/* (189) expr ::= PLUS INTEGER */
259
,
/* (194) expr ::= BOOL */
{
260
,
-
1
},
/* (190) expr ::= FLOAT */
259
,
/* (195) expr ::= ID LP exprlist RP */
{
260
,
-
2
},
/* (191) expr ::= MINUS FLOAT */
259
,
/* (196) expr ::= ID LP STAR RP */
{
260
,
-
2
},
/* (192) expr ::= PLUS FLOAT */
259
,
/* (197) expr ::= expr IS NULL */
{
260
,
-
1
},
/* (193) expr ::= STRING */
259
,
/* (198) expr ::= expr IS NOT NULL */
{
260
,
-
1
},
/* (194) expr ::= NOW */
259
,
/* (199) expr ::= expr LT expr */
{
260
,
-
1
},
/* (195) expr ::= VARIABLE */
259
,
/* (200) expr ::= expr GT expr */
{
260
,
-
1
},
/* (196) expr ::= BOOL */
259
,
/* (201) expr ::= expr LE expr */
{
260
,
-
4
},
/* (197) expr ::= ID LP exprlist RP */
259
,
/* (202) expr ::= expr GE expr */
{
260
,
-
4
},
/* (198) expr ::= ID LP STAR RP */
259
,
/* (203) expr ::= expr NE expr */
{
260
,
-
3
},
/* (199) expr ::= expr IS NULL */
259
,
/* (204) expr ::= expr EQ expr */
{
260
,
-
4
},
/* (200) expr ::= expr IS NOT NULL */
259
,
/* (205) expr ::= expr AND expr */
{
260
,
-
3
},
/* (201) expr ::= expr LT expr */
259
,
/* (206) expr ::= expr OR expr */
{
260
,
-
3
},
/* (202) expr ::= expr GT expr */
259
,
/* (207) expr ::= expr PLUS expr */
{
260
,
-
3
},
/* (203) expr ::= expr LE expr */
259
,
/* (208) expr ::= expr MINUS expr */
{
260
,
-
3
},
/* (204) expr ::= expr GE expr */
259
,
/* (209) expr ::= expr STAR expr */
{
260
,
-
3
},
/* (205) expr ::= expr NE expr */
259
,
/* (210) expr ::= expr SLASH expr */
{
260
,
-
3
},
/* (206) expr ::= expr EQ expr */
259
,
/* (211) expr ::= expr REM expr */
{
260
,
-
3
},
/* (207) expr ::= expr AND expr */
259
,
/* (212) expr ::= expr LIKE expr */
{
260
,
-
3
},
/* (208) expr ::= expr OR expr */
259
,
/* (213) expr ::= expr IN LP exprlist RP */
{
260
,
-
3
},
/* (209) expr ::= expr PLUS expr */
268
,
/* (214) exprlist ::= exprlist COMMA expritem */
{
260
,
-
3
},
/* (210) expr ::= expr MINUS expr */
268
,
/* (215) exprlist ::= expritem */
{
260
,
-
3
},
/* (211) expr ::= expr STAR expr */
269
,
/* (216) expritem ::= expr */
{
260
,
-
3
},
/* (212) expr ::= expr SLASH expr */
269
,
/* (217) expritem ::= */
{
260
,
-
3
},
/* (213) expr ::= expr REM expr */
207
,
/* (218) cmd ::= RESET QUERY CACHE */
{
260
,
-
3
},
/* (214) expr ::= expr LIKE expr */
207
,
/* (219) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{
260
,
-
5
},
/* (215) expr ::= expr IN LP exprlist RP */
207
,
/* (220) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
269
,
-
3
},
/* (216) exprlist ::= exprlist COMMA expritem */
207
,
/* (221) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{
269
,
-
1
},
/* (217) exprlist ::= expritem */
207
,
/* (222) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
270
,
-
1
},
/* (218) expritem ::= expr */
207
,
/* (223) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
270
,
0
},
/* (219) expritem ::= */
207
,
/* (224) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{
208
,
-
3
},
/* (220) cmd ::= RESET QUERY CACHE */
207
,
/* (225) cmd ::= KILL CONNECTION INTEGER */
{
208
,
-
7
},
/* (221) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
207
,
/* (226) cmd ::= KILL STREAM INTEGER COLON INTEGER */
{
208
,
-
7
},
/* (222) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
207
,
/* (227) cmd ::= KILL QUERY INTEGER COLON INTEGER */
{
208
,
-
7
},
/* (223) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
};
{
208
,
-
7
},
/* (224) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
208
,
-
8
},
/* (225) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
/* For rule J, yyRuleInfoNRhs[J] contains the negative of the number
{
208
,
-
9
},
/* (226) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
** of symbols on the right-hand side of that rule. */
{
208
,
-
3
},
/* (227) cmd ::= KILL CONNECTION INTEGER */
static
const
signed
char
yyRuleInfoNRhs
[]
=
{
{
208
,
-
5
},
/* (228) cmd ::= KILL STREAM INTEGER COLON INTEGER */
-
1
,
/* (0) program ::= cmd */
{
208
,
-
5
},
/* (229) cmd ::= KILL QUERY INTEGER COLON INTEGER */
-
2
,
/* (1) cmd ::= SHOW DATABASES */
-
2
,
/* (2) cmd ::= SHOW MNODES */
-
2
,
/* (3) cmd ::= SHOW DNODES */
-
2
,
/* (4) cmd ::= SHOW ACCOUNTS */
-
2
,
/* (5) cmd ::= SHOW USERS */
-
2
,
/* (6) cmd ::= SHOW MODULES */
-
2
,
/* (7) cmd ::= SHOW QUERIES */
-
2
,
/* (8) cmd ::= SHOW CONNECTIONS */
-
2
,
/* (9) cmd ::= SHOW STREAMS */
-
2
,
/* (10) cmd ::= SHOW VARIABLES */
-
2
,
/* (11) cmd ::= SHOW SCORES */
-
2
,
/* (12) cmd ::= SHOW GRANTS */
-
2
,
/* (13) cmd ::= SHOW VNODES */
-
3
,
/* (14) cmd ::= SHOW VNODES IPTOKEN */
0
,
/* (15) dbPrefix ::= */
-
2
,
/* (16) dbPrefix ::= ids DOT */
0
,
/* (17) cpxName ::= */
-
2
,
/* (18) cpxName ::= DOT ids */
-
3
,
/* (19) cmd ::= SHOW dbPrefix TABLES */
-
5
,
/* (20) cmd ::= SHOW dbPrefix TABLES LIKE ids */
-
3
,
/* (21) cmd ::= SHOW dbPrefix STABLES */
-
5
,
/* (22) cmd ::= SHOW dbPrefix STABLES LIKE ids */
-
3
,
/* (23) cmd ::= SHOW dbPrefix VGROUPS */
-
4
,
/* (24) cmd ::= SHOW dbPrefix VGROUPS ids */
-
5
,
/* (25) cmd ::= DROP TABLE ifexists ids cpxName */
-
4
,
/* (26) cmd ::= DROP DATABASE ifexists ids */
-
3
,
/* (27) cmd ::= DROP DNODE ids */
-
3
,
/* (28) cmd ::= DROP USER ids */
-
3
,
/* (29) cmd ::= DROP ACCOUNT ids */
-
2
,
/* (30) cmd ::= USE ids */
-
3
,
/* (31) cmd ::= DESCRIBE ids cpxName */
-
5
,
/* (32) cmd ::= ALTER USER ids PASS ids */
-
5
,
/* (33) cmd ::= ALTER USER ids PRIVILEGE ids */
-
4
,
/* (34) cmd ::= ALTER DNODE ids ids */
-
5
,
/* (35) cmd ::= ALTER DNODE ids ids ids */
-
3
,
/* (36) cmd ::= ALTER LOCAL ids */
-
4
,
/* (37) cmd ::= ALTER LOCAL ids ids */
-
4
,
/* (38) cmd ::= ALTER DATABASE ids alter_db_optr */
-
4
,
/* (39) cmd ::= ALTER ACCOUNT ids acct_optr */
-
6
,
/* (40) cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
-
1
,
/* (41) ids ::= ID */
-
1
,
/* (42) ids ::= STRING */
-
2
,
/* (43) ifexists ::= IF EXISTS */
0
,
/* (44) ifexists ::= */
-
3
,
/* (45) ifnotexists ::= IF NOT EXISTS */
0
,
/* (46) ifnotexists ::= */
-
3
,
/* (47) cmd ::= CREATE DNODE ids */
-
6
,
/* (48) cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
-
5
,
/* (49) cmd ::= CREATE DATABASE ifnotexists ids db_optr */
-
5
,
/* (50) cmd ::= CREATE USER ids PASS ids */
0
,
/* (51) pps ::= */
-
2
,
/* (52) pps ::= PPS INTEGER */
0
,
/* (53) tseries ::= */
-
2
,
/* (54) tseries ::= TSERIES INTEGER */
0
,
/* (55) dbs ::= */
-
2
,
/* (56) dbs ::= DBS INTEGER */
0
,
/* (57) streams ::= */
-
2
,
/* (58) streams ::= STREAMS INTEGER */
0
,
/* (59) storage ::= */
-
2
,
/* (60) storage ::= STORAGE INTEGER */
0
,
/* (61) qtime ::= */
-
2
,
/* (62) qtime ::= QTIME INTEGER */
0
,
/* (63) users ::= */
-
2
,
/* (64) users ::= USERS INTEGER */
0
,
/* (65) conns ::= */
-
2
,
/* (66) conns ::= CONNS INTEGER */
0
,
/* (67) state ::= */
-
2
,
/* (68) state ::= STATE ids */
-
9
,
/* (69) acct_optr ::= pps tseries storage streams qtime dbs users conns state */
-
2
,
/* (70) keep ::= KEEP tagitemlist */
-
2
,
/* (71) cache ::= CACHE INTEGER */
-
2
,
/* (72) replica ::= REPLICA INTEGER */
-
2
,
/* (73) quorum ::= QUORUM INTEGER */
-
2
,
/* (74) days ::= DAYS INTEGER */
-
2
,
/* (75) minrows ::= MINROWS INTEGER */
-
2
,
/* (76) maxrows ::= MAXROWS INTEGER */
-
2
,
/* (77) blocks ::= BLOCKS INTEGER */
-
2
,
/* (78) ctime ::= CTIME INTEGER */
-
2
,
/* (79) wal ::= WAL INTEGER */
-
2
,
/* (80) fsync ::= FSYNC INTEGER */
-
2
,
/* (81) comp ::= COMP INTEGER */
-
2
,
/* (82) prec ::= PRECISION STRING */
0
,
/* (83) db_optr ::= */
-
2
,
/* (84) db_optr ::= db_optr cache */
-
2
,
/* (85) db_optr ::= db_optr replica */
-
2
,
/* (86) db_optr ::= db_optr quorum */
-
2
,
/* (87) db_optr ::= db_optr days */
-
2
,
/* (88) db_optr ::= db_optr minrows */
-
2
,
/* (89) db_optr ::= db_optr maxrows */
-
2
,
/* (90) db_optr ::= db_optr blocks */
-
2
,
/* (91) db_optr ::= db_optr ctime */
-
2
,
/* (92) db_optr ::= db_optr wal */
-
2
,
/* (93) db_optr ::= db_optr fsync */
-
2
,
/* (94) db_optr ::= db_optr comp */
-
2
,
/* (95) db_optr ::= db_optr prec */
-
2
,
/* (96) db_optr ::= db_optr keep */
0
,
/* (97) alter_db_optr ::= */
-
2
,
/* (98) alter_db_optr ::= alter_db_optr replica */
-
2
,
/* (99) alter_db_optr ::= alter_db_optr quorum */
-
2
,
/* (100) alter_db_optr ::= alter_db_optr keep */
-
2
,
/* (101) alter_db_optr ::= alter_db_optr blocks */
-
2
,
/* (102) alter_db_optr ::= alter_db_optr comp */
-
2
,
/* (103) alter_db_optr ::= alter_db_optr wal */
-
2
,
/* (104) alter_db_optr ::= alter_db_optr fsync */
-
1
,
/* (105) typename ::= ids */
-
4
,
/* (106) typename ::= ids LP signed RP */
-
1
,
/* (107) signed ::= INTEGER */
-
2
,
/* (108) signed ::= PLUS INTEGER */
-
2
,
/* (109) signed ::= MINUS INTEGER */
-
6
,
/* (110) cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args */
-
3
,
/* (111) create_table_args ::= LP columnlist RP */
-
7
,
/* (112) create_table_args ::= LP columnlist RP TAGS LP columnlist RP */
-
7
,
/* (113) create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP */
-
2
,
/* (114) create_table_args ::= AS select */
-
3
,
/* (115) columnlist ::= columnlist COMMA column */
-
1
,
/* (116) columnlist ::= column */
-
2
,
/* (117) column ::= ids typename */
-
3
,
/* (118) tagitemlist ::= tagitemlist COMMA tagitem */
-
1
,
/* (119) tagitemlist ::= tagitem */
-
1
,
/* (120) tagitem ::= INTEGER */
-
1
,
/* (121) tagitem ::= FLOAT */
-
1
,
/* (122) tagitem ::= STRING */
-
1
,
/* (123) tagitem ::= BOOL */
-
1
,
/* (124) tagitem ::= NULL */
-
2
,
/* (125) tagitem ::= MINUS INTEGER */
-
2
,
/* (126) tagitem ::= MINUS FLOAT */
-
2
,
/* (127) tagitem ::= PLUS INTEGER */
-
2
,
/* (128) tagitem ::= PLUS FLOAT */
-
12
,
/* (129) select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
-
1
,
/* (130) union ::= select */
-
3
,
/* (131) union ::= LP union RP */
-
4
,
/* (132) union ::= union UNION ALL select */
-
6
,
/* (133) union ::= union UNION ALL LP select RP */
-
1
,
/* (134) cmd ::= union */
-
2
,
/* (135) select ::= SELECT selcollist */
-
2
,
/* (136) sclp ::= selcollist COMMA */
0
,
/* (137) sclp ::= */
-
3
,
/* (138) selcollist ::= sclp expr as */
-
2
,
/* (139) selcollist ::= sclp STAR */
-
2
,
/* (140) as ::= AS ids */
-
1
,
/* (141) as ::= ids */
0
,
/* (142) as ::= */
-
2
,
/* (143) from ::= FROM tablelist */
-
2
,
/* (144) tablelist ::= ids cpxName */
-
3
,
/* (145) tablelist ::= ids cpxName ids */
-
4
,
/* (146) tablelist ::= tablelist COMMA ids cpxName */
-
5
,
/* (147) tablelist ::= tablelist COMMA ids cpxName ids */
-
1
,
/* (148) tmvar ::= VARIABLE */
-
4
,
/* (149) interval_opt ::= INTERVAL LP tmvar RP */
-
6
,
/* (150) interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
0
,
/* (151) interval_opt ::= */
0
,
/* (152) fill_opt ::= */
-
6
,
/* (153) fill_opt ::= FILL LP ID COMMA tagitemlist RP */
-
4
,
/* (154) fill_opt ::= FILL LP ID RP */
-
4
,
/* (155) sliding_opt ::= SLIDING LP tmvar RP */
0
,
/* (156) sliding_opt ::= */
0
,
/* (157) orderby_opt ::= */
-
3
,
/* (158) orderby_opt ::= ORDER BY sortlist */
-
4
,
/* (159) sortlist ::= sortlist COMMA item sortorder */
-
2
,
/* (160) sortlist ::= item sortorder */
-
2
,
/* (161) item ::= ids cpxName */
-
1
,
/* (162) sortorder ::= ASC */
-
1
,
/* (163) sortorder ::= DESC */
0
,
/* (164) sortorder ::= */
0
,
/* (165) groupby_opt ::= */
-
3
,
/* (166) groupby_opt ::= GROUP BY grouplist */
-
3
,
/* (167) grouplist ::= grouplist COMMA item */
-
1
,
/* (168) grouplist ::= item */
0
,
/* (169) having_opt ::= */
-
2
,
/* (170) having_opt ::= HAVING expr */
0
,
/* (171) limit_opt ::= */
-
2
,
/* (172) limit_opt ::= LIMIT signed */
-
4
,
/* (173) limit_opt ::= LIMIT signed OFFSET signed */
-
4
,
/* (174) limit_opt ::= LIMIT signed COMMA signed */
0
,
/* (175) slimit_opt ::= */
-
2
,
/* (176) slimit_opt ::= SLIMIT signed */
-
4
,
/* (177) slimit_opt ::= SLIMIT signed SOFFSET signed */
-
4
,
/* (178) slimit_opt ::= SLIMIT signed COMMA signed */
0
,
/* (179) where_opt ::= */
-
2
,
/* (180) where_opt ::= WHERE expr */
-
3
,
/* (181) expr ::= LP expr RP */
-
1
,
/* (182) expr ::= ID */
-
3
,
/* (183) expr ::= ID DOT ID */
-
3
,
/* (184) expr ::= ID DOT STAR */
-
1
,
/* (185) expr ::= INTEGER */
-
2
,
/* (186) expr ::= MINUS INTEGER */
-
2
,
/* (187) expr ::= PLUS INTEGER */
-
1
,
/* (188) expr ::= FLOAT */
-
2
,
/* (189) expr ::= MINUS FLOAT */
-
2
,
/* (190) expr ::= PLUS FLOAT */
-
1
,
/* (191) expr ::= STRING */
-
1
,
/* (192) expr ::= NOW */
-
1
,
/* (193) expr ::= VARIABLE */
-
1
,
/* (194) expr ::= BOOL */
-
4
,
/* (195) expr ::= ID LP exprlist RP */
-
4
,
/* (196) expr ::= ID LP STAR RP */
-
3
,
/* (197) expr ::= expr IS NULL */
-
4
,
/* (198) expr ::= expr IS NOT NULL */
-
3
,
/* (199) expr ::= expr LT expr */
-
3
,
/* (200) expr ::= expr GT expr */
-
3
,
/* (201) expr ::= expr LE expr */
-
3
,
/* (202) expr ::= expr GE expr */
-
3
,
/* (203) expr ::= expr NE expr */
-
3
,
/* (204) expr ::= expr EQ expr */
-
3
,
/* (205) expr ::= expr AND expr */
-
3
,
/* (206) expr ::= expr OR expr */
-
3
,
/* (207) expr ::= expr PLUS expr */
-
3
,
/* (208) expr ::= expr MINUS expr */
-
3
,
/* (209) expr ::= expr STAR expr */
-
3
,
/* (210) expr ::= expr SLASH expr */
-
3
,
/* (211) expr ::= expr REM expr */
-
3
,
/* (212) expr ::= expr LIKE expr */
-
5
,
/* (213) expr ::= expr IN LP exprlist RP */
-
3
,
/* (214) exprlist ::= exprlist COMMA expritem */
-
1
,
/* (215) exprlist ::= expritem */
-
1
,
/* (216) expritem ::= expr */
0
,
/* (217) expritem ::= */
-
3
,
/* (218) cmd ::= RESET QUERY CACHE */
-
7
,
/* (219) cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
-
7
,
/* (220) cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
-
7
,
/* (221) cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
-
7
,
/* (222) cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
-
8
,
/* (223) cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
-
9
,
/* (224) cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
-
3
,
/* (225) cmd ::= KILL CONNECTION INTEGER */
-
5
,
/* (226) cmd ::= KILL STREAM INTEGER COLON INTEGER */
-
5
,
/* (227) cmd ::= KILL QUERY INTEGER COLON INTEGER */
};
};
static
void
yy_accept
(
yyParser
*
);
/* Forward Declaration */
static
void
yy_accept
(
yyParser
*
);
/* Forward Declaration */
...
@@ -2176,34 +1940,30 @@ static void yy_accept(yyParser*); /* Forward Declaration */
...
@@ -2176,34 +1940,30 @@ static void yy_accept(yyParser*); /* Forward Declaration */
** only called from one place, optimizing compilers will in-line it, which
** only called from one place, optimizing compilers will in-line it, which
** means that the extra parameters have no performance impact.
** means that the extra parameters have no performance impact.
*/
*/
static
YYACTIONTYPE
yy_reduce
(
static
void
yy_reduce
(
yyParser
*
yypParser
,
/* The parser */
yyParser
*
yypParser
,
/* The parser */
unsigned
int
yyruleno
,
/* Number of the rule by which to reduce */
unsigned
int
yyruleno
,
/* Number of the rule by which to reduce */
int
yyLookahead
,
/* Lookahead token, or YYNOCODE if none */
int
yyLookahead
,
/* Lookahead token, or YYNOCODE if none */
ParseTOKENTYPE
yyLookaheadToken
/* Value of the lookahead token */
ParseTOKENTYPE
yyLookaheadToken
/* Value of the lookahead token */
ParseCTX_PDECL
/* %extra_context */
){
){
int
yygoto
;
/* The next state */
int
yygoto
;
/* The next state */
YYACTIONTYPE
yyact
;
/* The next action */
int
yyact
;
/* The next action */
yyStackEntry
*
yymsp
;
/* The top of the parser's stack */
yyStackEntry
*
yymsp
;
/* The top of the parser's stack */
int
yysize
;
/* Amount to pop the stack */
int
yysize
;
/* Amount to pop the stack */
ParseARG_FETCH
ParseARG_FETCH
;
(
void
)
yyLookahead
;
(
void
)
yyLookahead
;
(
void
)
yyLookaheadToken
;
(
void
)
yyLookaheadToken
;
yymsp
=
yypParser
->
yytos
;
yymsp
=
yypParser
->
yytos
;
#ifndef NDEBUG
#ifndef NDEBUG
if
(
yyTraceFILE
&&
yyruleno
<
(
int
)(
sizeof
(
yyRuleName
)
/
sizeof
(
yyRuleName
[
0
]))
){
if
(
yyTraceFILE
&&
yyruleno
<
(
int
)(
sizeof
(
yyRuleName
)
/
sizeof
(
yyRuleName
[
0
]))
){
yysize
=
yyRuleInfo
NRhs
[
yyruleno
]
;
yysize
=
yyRuleInfo
[
yyruleno
].
nrhs
;
if
(
yysize
){
if
(
yysize
){
fprintf
(
yyTraceFILE
,
"%sReduce %d [%s]
%s, pop back
to state %d.
\n
"
,
fprintf
(
yyTraceFILE
,
"%sReduce %d [%s]
, go
to state %d.
\n
"
,
yyTracePrompt
,
yyTracePrompt
,
yyruleno
,
yyRuleName
[
yyruleno
],
yyruleno
,
yyRuleName
[
yyruleno
],
yymsp
[
yysize
].
stateno
);
yyruleno
<
YYNRULE_WITH_ACTION
?
""
:
" without external action"
,
yymsp
[
yysize
].
stateno
);
}
else
{
}
else
{
fprintf
(
yyTraceFILE
,
"%sReduce %d [%s]%s.
\n
"
,
fprintf
(
yyTraceFILE
,
"%sReduce %d [%s].
\n
"
,
yyTracePrompt
,
yyruleno
,
yyRuleName
[
yyruleno
],
yyTracePrompt
,
yyruleno
,
yyRuleName
[
yyruleno
]);
yyruleno
<
YYNRULE_WITH_ACTION
?
""
:
" without external action"
);
}
}
}
}
#endif
/* NDEBUG */
#endif
/* NDEBUG */
...
@@ -2211,7 +1971,7 @@ static YYACTIONTYPE yy_reduce(
...
@@ -2211,7 +1971,7 @@ static YYACTIONTYPE yy_reduce(
/* Check that the stack is large enough to grow by a single entry
/* Check that the stack is large enough to grow by a single entry
** if the RHS of the rule is empty. This ensures that there is room
** if the RHS of the rule is empty. This ensures that there is room
** enough on the stack to push the LHS value */
** enough on the stack to push the LHS value */
if
(
yyRuleInfo
NRhs
[
yyruleno
]
==
0
){
if
(
yyRuleInfo
[
yyruleno
].
nrhs
==
0
){
#ifdef YYTRACKMAXSTACKDEPTH
#ifdef YYTRACKMAXSTACKDEPTH
if
(
(
int
)(
yypParser
->
yytos
-
yypParser
->
yystack
)
>
yypParser
->
yyhwm
){
if
(
(
int
)(
yypParser
->
yytos
-
yypParser
->
yystack
)
>
yypParser
->
yyhwm
){
yypParser
->
yyhwm
++
;
yypParser
->
yyhwm
++
;
...
@@ -2221,19 +1981,13 @@ static YYACTIONTYPE yy_reduce(
...
@@ -2221,19 +1981,13 @@ static YYACTIONTYPE yy_reduce(
#if YYSTACKDEPTH>0
#if YYSTACKDEPTH>0
if
(
yypParser
->
yytos
>=
yypParser
->
yystackEnd
){
if
(
yypParser
->
yytos
>=
yypParser
->
yystackEnd
){
yyStackOverflow
(
yypParser
);
yyStackOverflow
(
yypParser
);
/* The call to yyStackOverflow() above pops the stack until it is
return
;
** empty, causing the main parser loop to exit. So the return value
** is never used and does not matter. */
return
0
;
}
}
#else
#else
if
(
yypParser
->
yytos
>=&
yypParser
->
yystack
[
yypParser
->
yystksz
-
1
]
){
if
(
yypParser
->
yytos
>=&
yypParser
->
yystack
[
yypParser
->
yystksz
-
1
]
){
if
(
yyGrowStack
(
yypParser
)
){
if
(
yyGrowStack
(
yypParser
)
){
yyStackOverflow
(
yypParser
);
yyStackOverflow
(
yypParser
);
/* The call to yyStackOverflow() above pops the stack until it is
return
;
** empty, causing the main parser loop to exit. So the return value
** is never used and does not matter. */
return
0
;
}
}
yymsp
=
yypParser
->
yytos
;
yymsp
=
yypParser
->
yytos
;
}
}
...
@@ -2309,708 +2063,719 @@ static YYACTIONTYPE yy_reduce(
...
@@ -2309,708 +2063,719 @@ static YYACTIONTYPE yy_reduce(
case
18
:
/* cpxName ::= DOT ids */
case
18
:
/* cpxName ::= DOT ids */
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
1
;
}
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
1
;
}
break
;
break
;
case
19
:
/* cmd ::= SHOW dbPrefix TABLES */
case
19
:
/* cmd ::= SHOW CREATE TABLE ids cpxName */
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
setDCLSQLElems
(
pInfo
,
TSDB_SQL_SHOW_CREATE_TABLE
,
1
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
break
;
case
20
:
/* cmd ::= SHOW CREATE DATABASE ids */
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_SHOW_CREATE_DATABASE
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
case
21
:
/* cmd ::= SHOW dbPrefix TABLES */
{
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_TABLE
,
&
yymsp
[
-
1
].
minor
.
yy0
,
0
);
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_TABLE
,
&
yymsp
[
-
1
].
minor
.
yy0
,
0
);
}
}
break
;
break
;
case
2
0
:
/* cmd ::= SHOW dbPrefix TABLES LIKE ids */
case
2
2
:
/* cmd ::= SHOW dbPrefix TABLES LIKE ids */
{
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_TABLE
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_TABLE
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
}
break
;
break
;
case
2
1
:
/* cmd ::= SHOW dbPrefix STABLES */
case
2
3
:
/* cmd ::= SHOW dbPrefix STABLES */
{
{
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_METRIC
,
&
yymsp
[
-
1
].
minor
.
yy0
,
0
);
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_METRIC
,
&
yymsp
[
-
1
].
minor
.
yy0
,
0
);
}
}
break
;
break
;
case
2
2
:
/* cmd ::= SHOW dbPrefix STABLES LIKE ids */
case
2
4
:
/* cmd ::= SHOW dbPrefix STABLES LIKE ids */
{
{
SStrToken
token
;
SStrToken
token
;
setDBName
(
&
token
,
&
yymsp
[
-
3
].
minor
.
yy0
);
setDBName
(
&
token
,
&
yymsp
[
-
3
].
minor
.
yy0
);
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_METRIC
,
&
token
,
&
yymsp
[
0
].
minor
.
yy0
);
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_METRIC
,
&
token
,
&
yymsp
[
0
].
minor
.
yy0
);
}
}
break
;
break
;
case
2
3
:
/* cmd ::= SHOW dbPrefix VGROUPS */
case
2
5
:
/* cmd ::= SHOW dbPrefix VGROUPS */
{
{
SStrToken
token
;
SStrToken
token
;
setDBName
(
&
token
,
&
yymsp
[
-
1
].
minor
.
yy0
);
setDBName
(
&
token
,
&
yymsp
[
-
1
].
minor
.
yy0
);
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_VGROUP
,
&
token
,
0
);
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_VGROUP
,
&
token
,
0
);
}
}
break
;
break
;
case
2
4
:
/* cmd ::= SHOW dbPrefix VGROUPS ids */
case
2
6
:
/* cmd ::= SHOW dbPrefix VGROUPS ids */
{
{
SStrToken
token
;
SStrToken
token
;
setDBName
(
&
token
,
&
yymsp
[
-
2
].
minor
.
yy0
);
setDBName
(
&
token
,
&
yymsp
[
-
2
].
minor
.
yy0
);
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_VGROUP
,
&
token
,
&
yymsp
[
0
].
minor
.
yy0
);
setShowOptions
(
pInfo
,
TSDB_MGMT_TABLE_VGROUP
,
&
token
,
&
yymsp
[
0
].
minor
.
yy0
);
}
}
break
;
break
;
case
2
5
:
/* cmd ::= DROP TABLE ifexists ids cpxName */
case
2
7
:
/* cmd ::= DROP TABLE ifexists ids cpxName */
{
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
setDropDBTableInfo
(
pInfo
,
TSDB_SQL_DROP_TABLE
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
-
2
].
minor
.
yy0
);
setDropDBTableInfo
(
pInfo
,
TSDB_SQL_DROP_TABLE
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
-
2
].
minor
.
yy0
);
}
}
break
;
break
;
case
2
6
:
/* cmd ::= DROP DATABASE ifexists ids */
case
2
8
:
/* cmd ::= DROP DATABASE ifexists ids */
{
setDropDBTableInfo
(
pInfo
,
TSDB_SQL_DROP_DB
,
&
yymsp
[
0
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
{
setDropDBTableInfo
(
pInfo
,
TSDB_SQL_DROP_DB
,
&
yymsp
[
0
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
break
;
break
;
case
2
7
:
/* cmd ::= DROP DNODE ids */
case
2
9
:
/* cmd ::= DROP DNODE ids */
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_DROP_DNODE
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_DROP_DNODE
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
break
;
case
28
:
/* cmd ::= DROP USER ids */
case
30
:
/* cmd ::= DROP USER ids */
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_DROP_USER
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_DROP_USER
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
break
;
case
29
:
/* cmd ::= DROP ACCOUNT ids */
case
31
:
/* cmd ::= DROP ACCOUNT ids */
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_DROP_ACCT
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_DROP_ACCT
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
break
;
case
3
0
:
/* cmd ::= USE ids */
case
3
2
:
/* cmd ::= USE ids */
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_USE_DB
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);}
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_USE_DB
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
break
;
case
3
1
:
/* cmd ::= DESCRIBE ids cpxName */
case
3
3
:
/* cmd ::= DESCRIBE ids cpxName */
{
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
setDCLSQLElems
(
pInfo
,
TSDB_SQL_DESCRIBE_TABLE
,
1
,
&
yymsp
[
-
1
].
minor
.
yy0
);
setDCLSQLElems
(
pInfo
,
TSDB_SQL_DESCRIBE_TABLE
,
1
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
}
break
;
break
;
case
3
2
:
/* cmd ::= ALTER USER ids PASS ids */
case
3
4
:
/* cmd ::= ALTER USER ids PASS ids */
{
setAlterUserSQL
(
pInfo
,
TSDB_ALTER_USER_PASSWD
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
NULL
);
}
{
setAlterUserSQL
(
pInfo
,
TSDB_ALTER_USER_PASSWD
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
NULL
);
}
break
;
break
;
case
3
3
:
/* cmd ::= ALTER USER ids PRIVILEGE ids */
case
3
5
:
/* cmd ::= ALTER USER ids PRIVILEGE ids */
{
setAlterUserSQL
(
pInfo
,
TSDB_ALTER_USER_PRIVILEGES
,
&
yymsp
[
-
2
].
minor
.
yy0
,
NULL
,
&
yymsp
[
0
].
minor
.
yy0
);}
{
setAlterUserSQL
(
pInfo
,
TSDB_ALTER_USER_PRIVILEGES
,
&
yymsp
[
-
2
].
minor
.
yy0
,
NULL
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
break
;
case
3
4
:
/* cmd ::= ALTER DNODE ids ids */
case
3
6
:
/* cmd ::= ALTER DNODE ids ids */
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_CFG_DNODE
,
2
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_CFG_DNODE
,
2
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
break
;
case
3
5
:
/* cmd ::= ALTER DNODE ids ids ids */
case
3
7
:
/* cmd ::= ALTER DNODE ids ids ids */
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_CFG_DNODE
,
3
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_CFG_DNODE
,
3
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
break
;
case
3
6
:
/* cmd ::= ALTER LOCAL ids */
case
3
8
:
/* cmd ::= ALTER LOCAL ids */
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_CFG_LOCAL
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_CFG_LOCAL
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
break
;
case
3
7
:
/* cmd ::= ALTER LOCAL ids ids */
case
3
9
:
/* cmd ::= ALTER LOCAL ids ids */
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_CFG_LOCAL
,
2
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_CFG_LOCAL
,
2
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);
}
break
;
break
;
case
38
:
/* cmd ::= ALTER DATABASE ids alter_db_optr */
case
40
:
/* cmd ::= ALTER DATABASE ids alter_db_optr */
{
SStrToken
t
=
{
0
};
setCreateDBSQL
(
pInfo
,
TSDB_SQL_ALTER_DB
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy1
1
8
,
&
t
);}
{
SStrToken
t
=
{
0
};
setCreateDBSQL
(
pInfo
,
TSDB_SQL_ALTER_DB
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy1
5
8
,
&
t
);}
break
;
break
;
case
39
:
/* cmd ::= ALTER ACCOUNT ids acct_optr */
case
41
:
/* cmd ::= ALTER ACCOUNT ids acct_optr */
{
setCreateAcctSQL
(
pInfo
,
TSDB_SQL_ALTER_ACCT
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
,
&
yymsp
[
0
].
minor
.
yy
479
);}
{
setCreateAcctSQL
(
pInfo
,
TSDB_SQL_ALTER_ACCT
,
&
yymsp
[
-
1
].
minor
.
yy0
,
NULL
,
&
yymsp
[
0
].
minor
.
yy
73
);}
break
;
break
;
case
4
0
:
/* cmd ::= ALTER ACCOUNT ids PASS ids acct_optr */
case
4
2
:
/* 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
479
);}
{
setCreateAcctSQL
(
pInfo
,
TSDB_SQL_ALTER_ACCT
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy
73
);}
break
;
break
;
case
4
1
:
/* ids ::= ID */
case
4
3
:
/* ids ::= ID */
case
4
2
:
/* ids ::= STRING */
yytestcase
(
yyruleno
==
42
);
case
4
4
:
/* ids ::= STRING */
yytestcase
(
yyruleno
==
44
);
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
break
;
break
;
case
4
3
:
/* ifexists ::= IF EXISTS */
case
4
5
:
/* ifexists ::= IF EXISTS */
{
yymsp
[
-
1
].
minor
.
yy0
.
n
=
1
;}
{
yymsp
[
-
1
].
minor
.
yy0
.
n
=
1
;}
break
;
break
;
case
4
4
:
/* ifexists ::= */
case
4
6
:
/* ifexists ::= */
case
4
6
:
/* ifnotexists ::= */
yytestcase
(
yyruleno
==
46
);
case
4
8
:
/* ifnotexists ::= */
yytestcase
(
yyruleno
==
48
);
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;}
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;}
break
;
break
;
case
4
5
:
/* ifnotexists ::= IF NOT EXISTS */
case
4
7
:
/* ifnotexists ::= IF NOT EXISTS */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
=
1
;}
{
yymsp
[
-
2
].
minor
.
yy0
.
n
=
1
;}
break
;
break
;
case
4
7
:
/* cmd ::= CREATE DNODE ids */
case
4
9
:
/* cmd ::= CREATE DNODE ids */
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_CREATE_DNODE
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);}
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_CREATE_DNODE
,
1
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
break
;
case
48
:
/* cmd ::= CREATE ACCOUNT ids PASS ids acct_optr */
case
50
:
/* 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
479
);}
{
setCreateAcctSQL
(
pInfo
,
TSDB_SQL_CREATE_ACCT
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy
73
);}
break
;
break
;
case
49
:
/* cmd ::= CREATE DATABASE ifnotexists ids db_optr */
case
51
:
/* cmd ::= CREATE DATABASE ifnotexists ids db_optr */
{
setCreateDBSQL
(
pInfo
,
TSDB_SQL_CREATE_DB
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy1
1
8
,
&
yymsp
[
-
2
].
minor
.
yy0
);}
{
setCreateDBSQL
(
pInfo
,
TSDB_SQL_CREATE_DB
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy1
5
8
,
&
yymsp
[
-
2
].
minor
.
yy0
);}
break
;
break
;
case
5
0
:
/* cmd ::= CREATE USER ids PASS ids */
case
5
2
:
/* cmd ::= CREATE USER ids PASS ids */
{
setCreateUserSQL
(
pInfo
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);}
{
setCreateUserSQL
(
pInfo
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
break
;
case
5
1
:
/* pps ::= */
case
5
3
:
/* pps ::= */
case
5
3
:
/* tseries ::= */
yytestcase
(
yyruleno
==
53
);
case
5
5
:
/* tseries ::= */
yytestcase
(
yyruleno
==
55
);
case
5
5
:
/* dbs ::= */
yytestcase
(
yyruleno
==
55
);
case
5
7
:
/* dbs ::= */
yytestcase
(
yyruleno
==
57
);
case
5
7
:
/* streams ::= */
yytestcase
(
yyruleno
==
57
);
case
5
9
:
/* streams ::= */
yytestcase
(
yyruleno
==
59
);
case
59
:
/* storage ::= */
yytestcase
(
yyruleno
==
59
);
case
61
:
/* storage ::= */
yytestcase
(
yyruleno
==
61
);
case
6
1
:
/* qtime ::= */
yytestcase
(
yyruleno
==
61
);
case
6
3
:
/* qtime ::= */
yytestcase
(
yyruleno
==
63
);
case
6
3
:
/* users ::= */
yytestcase
(
yyruleno
==
63
);
case
6
5
:
/* users ::= */
yytestcase
(
yyruleno
==
65
);
case
6
5
:
/* conns ::= */
yytestcase
(
yyruleno
==
65
);
case
6
7
:
/* conns ::= */
yytestcase
(
yyruleno
==
67
);
case
6
7
:
/* state ::= */
yytestcase
(
yyruleno
==
67
);
case
6
9
:
/* state ::= */
yytestcase
(
yyruleno
==
69
);
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
}
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
}
break
;
break
;
case
5
2
:
/* pps ::= PPS INTEGER */
case
5
4
:
/* pps ::= PPS INTEGER */
case
5
4
:
/* tseries ::= TSERIES INTEGER */
yytestcase
(
yyruleno
==
54
);
case
5
6
:
/* tseries ::= TSERIES INTEGER */
yytestcase
(
yyruleno
==
56
);
case
5
6
:
/* dbs ::= DBS INTEGER */
yytestcase
(
yyruleno
==
56
);
case
5
8
:
/* dbs ::= DBS INTEGER */
yytestcase
(
yyruleno
==
58
);
case
58
:
/* streams ::= STREAMS INTEGER */
yytestcase
(
yyruleno
==
58
);
case
60
:
/* streams ::= STREAMS INTEGER */
yytestcase
(
yyruleno
==
60
);
case
6
0
:
/* storage ::= STORAGE INTEGER */
yytestcase
(
yyruleno
==
60
);
case
6
2
:
/* storage ::= STORAGE INTEGER */
yytestcase
(
yyruleno
==
62
);
case
6
2
:
/* qtime ::= QTIME INTEGER */
yytestcase
(
yyruleno
==
62
);
case
6
4
:
/* qtime ::= QTIME INTEGER */
yytestcase
(
yyruleno
==
64
);
case
6
4
:
/* users ::= USERS INTEGER */
yytestcase
(
yyruleno
==
64
);
case
6
6
:
/* users ::= USERS INTEGER */
yytestcase
(
yyruleno
==
66
);
case
6
6
:
/* conns ::= CONNS INTEGER */
yytestcase
(
yyruleno
==
66
);
case
6
8
:
/* conns ::= CONNS INTEGER */
yytestcase
(
yyruleno
==
68
);
case
68
:
/* state ::= STATE ids */
yytestcase
(
yyruleno
==
68
);
case
70
:
/* state ::= STATE ids */
yytestcase
(
yyruleno
==
70
);
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
break
;
case
69
:
/* acct_optr ::= pps tseries storage streams qtime dbs users conns state */
case
71
:
/* acct_optr ::= pps tseries storage streams qtime dbs users conns state */
{
{
yylhsminor
.
yy
479
.
maxUsers
=
(
yymsp
[
-
2
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
2
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy
73
.
maxUsers
=
(
yymsp
[
-
2
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
2
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy
479
.
maxDbs
=
(
yymsp
[
-
3
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
3
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy
73
.
maxDbs
=
(
yymsp
[
-
3
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
3
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy
479
.
maxTimeSeries
=
(
yymsp
[
-
7
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
7
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy
73
.
maxTimeSeries
=
(
yymsp
[
-
7
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
7
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy
479
.
maxStreams
=
(
yymsp
[
-
5
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
5
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy
73
.
maxStreams
=
(
yymsp
[
-
5
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
5
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy
479
.
maxPointsPerSecond
=
(
yymsp
[
-
8
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
8
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy
73
.
maxPointsPerSecond
=
(
yymsp
[
-
8
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
8
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy
479
.
maxStorage
=
(
yymsp
[
-
6
].
minor
.
yy0
.
n
>
0
)
?
strtoll
(
yymsp
[
-
6
].
minor
.
yy0
.
z
,
NULL
,
10
)
:-
1
;
yylhsminor
.
yy
73
.
maxStorage
=
(
yymsp
[
-
6
].
minor
.
yy0
.
n
>
0
)
?
strtoll
(
yymsp
[
-
6
].
minor
.
yy0
.
z
,
NULL
,
10
)
:-
1
;
yylhsminor
.
yy
479
.
maxQueryTime
=
(
yymsp
[
-
4
].
minor
.
yy0
.
n
>
0
)
?
strtoll
(
yymsp
[
-
4
].
minor
.
yy0
.
z
,
NULL
,
10
)
:-
1
;
yylhsminor
.
yy
73
.
maxQueryTime
=
(
yymsp
[
-
4
].
minor
.
yy0
.
n
>
0
)
?
strtoll
(
yymsp
[
-
4
].
minor
.
yy0
.
z
,
NULL
,
10
)
:-
1
;
yylhsminor
.
yy
479
.
maxConnections
=
(
yymsp
[
-
1
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
1
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy
73
.
maxConnections
=
(
yymsp
[
-
1
].
minor
.
yy0
.
n
>
0
)
?
atoi
(
yymsp
[
-
1
].
minor
.
yy0
.
z
)
:-
1
;
yylhsminor
.
yy
479
.
stat
=
yymsp
[
0
].
minor
.
yy0
;
yylhsminor
.
yy
73
.
stat
=
yymsp
[
0
].
minor
.
yy0
;
}
}
yymsp
[
-
8
].
minor
.
yy
479
=
yylhsminor
.
yy479
;
yymsp
[
-
8
].
minor
.
yy
73
=
yylhsminor
.
yy73
;
break
;
break
;
case
7
0
:
/* keep ::= KEEP tagitemlist */
case
7
2
:
/* keep ::= KEEP tagitemlist */
{
yymsp
[
-
1
].
minor
.
yy
156
=
yymsp
[
0
].
minor
.
yy156
;
}
{
yymsp
[
-
1
].
minor
.
yy
494
=
yymsp
[
0
].
minor
.
yy494
;
}
break
;
break
;
case
7
1
:
/* cache ::= CACHE INTEGER */
case
7
3
:
/* cache ::= CACHE INTEGER */
case
7
2
:
/* replica ::= REPLICA INTEGER */
yytestcase
(
yyruleno
==
72
);
case
7
4
:
/* replica ::= REPLICA INTEGER */
yytestcase
(
yyruleno
==
74
);
case
7
3
:
/* quorum ::= QUORUM INTEGER */
yytestcase
(
yyruleno
==
73
);
case
7
5
:
/* quorum ::= QUORUM INTEGER */
yytestcase
(
yyruleno
==
75
);
case
7
4
:
/* days ::= DAYS INTEGER */
yytestcase
(
yyruleno
==
74
);
case
7
6
:
/* days ::= DAYS INTEGER */
yytestcase
(
yyruleno
==
76
);
case
7
5
:
/* minrows ::= MINROWS INTEGER */
yytestcase
(
yyruleno
==
75
);
case
7
7
:
/* minrows ::= MINROWS INTEGER */
yytestcase
(
yyruleno
==
77
);
case
7
6
:
/* maxrows ::= MAXROWS INTEGER */
yytestcase
(
yyruleno
==
76
);
case
7
8
:
/* maxrows ::= MAXROWS INTEGER */
yytestcase
(
yyruleno
==
78
);
case
7
7
:
/* blocks ::= BLOCKS INTEGER */
yytestcase
(
yyruleno
==
77
);
case
7
9
:
/* blocks ::= BLOCKS INTEGER */
yytestcase
(
yyruleno
==
79
);
case
78
:
/* ctime ::= CTIME INTEGER */
yytestcase
(
yyruleno
==
78
);
case
80
:
/* ctime ::= CTIME INTEGER */
yytestcase
(
yyruleno
==
80
);
case
79
:
/* wal ::= WAL INTEGER */
yytestcase
(
yyruleno
==
79
);
case
81
:
/* wal ::= WAL INTEGER */
yytestcase
(
yyruleno
==
81
);
case
8
0
:
/* fsync ::= FSYNC INTEGER */
yytestcase
(
yyruleno
==
80
);
case
8
2
:
/* fsync ::= FSYNC INTEGER */
yytestcase
(
yyruleno
==
82
);
case
8
1
:
/* comp ::= COMP INTEGER */
yytestcase
(
yyruleno
==
81
);
case
8
3
:
/* comp ::= COMP INTEGER */
yytestcase
(
yyruleno
==
83
);
case
8
2
:
/* prec ::= PRECISION STRING */
yytestcase
(
yyruleno
==
82
);
case
8
4
:
/* prec ::= PRECISION STRING */
yytestcase
(
yyruleno
==
84
);
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
break
;
case
8
3
:
/* db_optr ::= */
case
8
5
:
/* db_optr ::= */
{
setDefaultCreateDbOption
(
&
yymsp
[
1
].
minor
.
yy1
1
8
);}
{
setDefaultCreateDbOption
(
&
yymsp
[
1
].
minor
.
yy1
5
8
);}
break
;
break
;
case
8
4
:
/* db_optr ::= db_optr cache */
case
8
6
:
/* db_optr ::= db_optr cache */
{
yylhsminor
.
yy1
18
=
yymsp
[
-
1
].
minor
.
yy118
;
yylhsminor
.
yy11
8
.
cacheBlockSize
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
{
yylhsminor
.
yy1
58
=
yymsp
[
-
1
].
minor
.
yy158
;
yylhsminor
.
yy15
8
.
cacheBlockSize
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy1
18
=
yylhsminor
.
yy11
8
;
yymsp
[
-
1
].
minor
.
yy1
58
=
yylhsminor
.
yy15
8
;
break
;
break
;
case
8
5
:
/* db_optr ::= db_optr replica */
case
8
7
:
/* db_optr ::= db_optr replica */
case
98
:
/* alter_db_optr ::= alter_db_optr replica */
yytestcase
(
yyruleno
==
98
);
case
100
:
/* alter_db_optr ::= alter_db_optr replica */
yytestcase
(
yyruleno
==
100
);
{
yylhsminor
.
yy1
18
=
yymsp
[
-
1
].
minor
.
yy118
;
yylhsminor
.
yy11
8
.
replica
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
{
yylhsminor
.
yy1
58
=
yymsp
[
-
1
].
minor
.
yy158
;
yylhsminor
.
yy15
8
.
replica
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy1
18
=
yylhsminor
.
yy11
8
;
yymsp
[
-
1
].
minor
.
yy1
58
=
yylhsminor
.
yy15
8
;
break
;
break
;
case
8
6
:
/* db_optr ::= db_optr quorum */
case
8
8
:
/* db_optr ::= db_optr quorum */
case
99
:
/* alter_db_optr ::= alter_db_optr quorum */
yytestcase
(
yyruleno
==
99
);
case
101
:
/* alter_db_optr ::= alter_db_optr quorum */
yytestcase
(
yyruleno
==
101
);
{
yylhsminor
.
yy1
18
=
yymsp
[
-
1
].
minor
.
yy118
;
yylhsminor
.
yy11
8
.
quorum
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
{
yylhsminor
.
yy1
58
=
yymsp
[
-
1
].
minor
.
yy158
;
yylhsminor
.
yy15
8
.
quorum
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy1
18
=
yylhsminor
.
yy11
8
;
yymsp
[
-
1
].
minor
.
yy1
58
=
yylhsminor
.
yy15
8
;
break
;
break
;
case
8
7
:
/* db_optr ::= db_optr days */
case
8
9
:
/* db_optr ::= db_optr days */
{
yylhsminor
.
yy1
18
=
yymsp
[
-
1
].
minor
.
yy118
;
yylhsminor
.
yy11
8
.
daysPerFile
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
{
yylhsminor
.
yy1
58
=
yymsp
[
-
1
].
minor
.
yy158
;
yylhsminor
.
yy15
8
.
daysPerFile
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy1
18
=
yylhsminor
.
yy11
8
;
yymsp
[
-
1
].
minor
.
yy1
58
=
yylhsminor
.
yy15
8
;
break
;
break
;
case
88
:
/* db_optr ::= db_optr minrows */
case
90
:
/* db_optr ::= db_optr minrows */
{
yylhsminor
.
yy1
18
=
yymsp
[
-
1
].
minor
.
yy118
;
yylhsminor
.
yy11
8
.
minRowsPerBlock
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
{
yylhsminor
.
yy1
58
=
yymsp
[
-
1
].
minor
.
yy158
;
yylhsminor
.
yy15
8
.
minRowsPerBlock
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy1
18
=
yylhsminor
.
yy11
8
;
yymsp
[
-
1
].
minor
.
yy1
58
=
yylhsminor
.
yy15
8
;
break
;
break
;
case
89
:
/* db_optr ::= db_optr maxrows */
case
91
:
/* db_optr ::= db_optr maxrows */
{
yylhsminor
.
yy1
18
=
yymsp
[
-
1
].
minor
.
yy118
;
yylhsminor
.
yy11
8
.
maxRowsPerBlock
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
{
yylhsminor
.
yy1
58
=
yymsp
[
-
1
].
minor
.
yy158
;
yylhsminor
.
yy15
8
.
maxRowsPerBlock
=
strtod
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
);
}
yymsp
[
-
1
].
minor
.
yy1
18
=
yylhsminor
.
yy11
8
;
yymsp
[
-
1
].
minor
.
yy1
58
=
yylhsminor
.
yy15
8
;
break
;
break
;
case
9
0
:
/* db_optr ::= db_optr blocks */
case
9
2
:
/* db_optr ::= db_optr blocks */
case
10
1
:
/* alter_db_optr ::= alter_db_optr blocks */
yytestcase
(
yyruleno
==
101
);
case
10
3
:
/* alter_db_optr ::= alter_db_optr blocks */
yytestcase
(
yyruleno
==
103
);
{
yylhsminor
.
yy1
18
=
yymsp
[
-
1
].
minor
.
yy118
;
yylhsminor
.
yy11
8
.
numOfBlocks
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
{
yylhsminor
.
yy1
58
=
yymsp
[
-
1
].
minor
.
yy158
;
yylhsminor
.
yy15
8
.
numOfBlocks
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy1
18
=
yylhsminor
.
yy11
8
;
yymsp
[
-
1
].
minor
.
yy1
58
=
yylhsminor
.
yy15
8
;
break
;
break
;
case
9
1
:
/* db_optr ::= db_optr ctime */
case
9
3
:
/* db_optr ::= db_optr ctime */
{
yylhsminor
.
yy1
18
=
yymsp
[
-
1
].
minor
.
yy118
;
yylhsminor
.
yy11
8
.
commitTime
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
{
yylhsminor
.
yy1
58
=
yymsp
[
-
1
].
minor
.
yy158
;
yylhsminor
.
yy15
8
.
commitTime
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy1
18
=
yylhsminor
.
yy11
8
;
yymsp
[
-
1
].
minor
.
yy1
58
=
yylhsminor
.
yy15
8
;
break
;
break
;
case
9
2
:
/* db_optr ::= db_optr wal */
case
9
4
:
/* db_optr ::= db_optr wal */
case
10
3
:
/* alter_db_optr ::= alter_db_optr wal */
yytestcase
(
yyruleno
==
103
);
case
10
5
:
/* alter_db_optr ::= alter_db_optr wal */
yytestcase
(
yyruleno
==
105
);
{
yylhsminor
.
yy1
18
=
yymsp
[
-
1
].
minor
.
yy118
;
yylhsminor
.
yy11
8
.
walLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
{
yylhsminor
.
yy1
58
=
yymsp
[
-
1
].
minor
.
yy158
;
yylhsminor
.
yy15
8
.
walLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy1
18
=
yylhsminor
.
yy11
8
;
yymsp
[
-
1
].
minor
.
yy1
58
=
yylhsminor
.
yy15
8
;
break
;
break
;
case
9
3
:
/* db_optr ::= db_optr fsync */
case
9
5
:
/* db_optr ::= db_optr fsync */
case
10
4
:
/* alter_db_optr ::= alter_db_optr fsync */
yytestcase
(
yyruleno
==
104
);
case
10
6
:
/* alter_db_optr ::= alter_db_optr fsync */
yytestcase
(
yyruleno
==
106
);
{
yylhsminor
.
yy1
18
=
yymsp
[
-
1
].
minor
.
yy118
;
yylhsminor
.
yy11
8
.
fsyncPeriod
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
{
yylhsminor
.
yy1
58
=
yymsp
[
-
1
].
minor
.
yy158
;
yylhsminor
.
yy15
8
.
fsyncPeriod
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy1
18
=
yylhsminor
.
yy11
8
;
yymsp
[
-
1
].
minor
.
yy1
58
=
yylhsminor
.
yy15
8
;
break
;
break
;
case
9
4
:
/* db_optr ::= db_optr comp */
case
9
6
:
/* db_optr ::= db_optr comp */
case
10
2
:
/* alter_db_optr ::= alter_db_optr comp */
yytestcase
(
yyruleno
==
102
);
case
10
4
:
/* alter_db_optr ::= alter_db_optr comp */
yytestcase
(
yyruleno
==
104
);
{
yylhsminor
.
yy1
18
=
yymsp
[
-
1
].
minor
.
yy118
;
yylhsminor
.
yy11
8
.
compressionLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
{
yylhsminor
.
yy1
58
=
yymsp
[
-
1
].
minor
.
yy158
;
yylhsminor
.
yy15
8
.
compressionLevel
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
-
1
].
minor
.
yy1
18
=
yylhsminor
.
yy11
8
;
yymsp
[
-
1
].
minor
.
yy1
58
=
yylhsminor
.
yy15
8
;
break
;
break
;
case
9
5
:
/* db_optr ::= db_optr prec */
case
9
7
:
/* db_optr ::= db_optr prec */
{
yylhsminor
.
yy1
18
=
yymsp
[
-
1
].
minor
.
yy118
;
yylhsminor
.
yy11
8
.
precision
=
yymsp
[
0
].
minor
.
yy0
;
}
{
yylhsminor
.
yy1
58
=
yymsp
[
-
1
].
minor
.
yy158
;
yylhsminor
.
yy15
8
.
precision
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
-
1
].
minor
.
yy1
18
=
yylhsminor
.
yy11
8
;
yymsp
[
-
1
].
minor
.
yy1
58
=
yylhsminor
.
yy15
8
;
break
;
break
;
case
9
6
:
/* db_optr ::= db_optr keep */
case
9
8
:
/* db_optr ::= db_optr keep */
case
10
0
:
/* alter_db_optr ::= alter_db_optr keep */
yytestcase
(
yyruleno
==
100
);
case
10
2
:
/* alter_db_optr ::= alter_db_optr keep */
yytestcase
(
yyruleno
==
102
);
{
yylhsminor
.
yy1
18
=
yymsp
[
-
1
].
minor
.
yy118
;
yylhsminor
.
yy118
.
keep
=
yymsp
[
0
].
minor
.
yy156
;
}
{
yylhsminor
.
yy1
58
=
yymsp
[
-
1
].
minor
.
yy158
;
yylhsminor
.
yy158
.
keep
=
yymsp
[
0
].
minor
.
yy494
;
}
yymsp
[
-
1
].
minor
.
yy1
18
=
yylhsminor
.
yy11
8
;
yymsp
[
-
1
].
minor
.
yy1
58
=
yylhsminor
.
yy15
8
;
break
;
break
;
case
9
7
:
/* alter_db_optr ::= */
case
9
9
:
/* alter_db_optr ::= */
{
setDefaultCreateDbOption
(
&
yymsp
[
1
].
minor
.
yy1
1
8
);}
{
setDefaultCreateDbOption
(
&
yymsp
[
1
].
minor
.
yy1
5
8
);}
break
;
break
;
case
10
5
:
/* typename ::= ids */
case
10
7
:
/* typename ::= ids */
{
{
yymsp
[
0
].
minor
.
yy0
.
type
=
0
;
yymsp
[
0
].
minor
.
yy0
.
type
=
0
;
tSQLSetColumnType
(
&
yylhsminor
.
yy
343
,
&
yymsp
[
0
].
minor
.
yy0
);
tSQLSetColumnType
(
&
yylhsminor
.
yy
181
,
&
yymsp
[
0
].
minor
.
yy0
);
}
}
yymsp
[
0
].
minor
.
yy
343
=
yylhsminor
.
yy343
;
yymsp
[
0
].
minor
.
yy
181
=
yylhsminor
.
yy181
;
break
;
break
;
case
10
6
:
/* typename ::= ids LP signed RP */
case
10
8
:
/* typename ::= ids LP signed RP */
{
{
if
(
yymsp
[
-
1
].
minor
.
yy
369
<=
0
)
{
if
(
yymsp
[
-
1
].
minor
.
yy
271
<=
0
)
{
yymsp
[
-
3
].
minor
.
yy0
.
type
=
0
;
yymsp
[
-
3
].
minor
.
yy0
.
type
=
0
;
tSQLSetColumnType
(
&
yylhsminor
.
yy
343
,
&
yymsp
[
-
3
].
minor
.
yy0
);
tSQLSetColumnType
(
&
yylhsminor
.
yy
181
,
&
yymsp
[
-
3
].
minor
.
yy0
);
}
else
{
}
else
{
yymsp
[
-
3
].
minor
.
yy0
.
type
=
-
yymsp
[
-
1
].
minor
.
yy
369
;
// negative value of name length
yymsp
[
-
3
].
minor
.
yy0
.
type
=
-
yymsp
[
-
1
].
minor
.
yy
271
;
// negative value of name length
tSQLSetColumnType
(
&
yylhsminor
.
yy
343
,
&
yymsp
[
-
3
].
minor
.
yy0
);
tSQLSetColumnType
(
&
yylhsminor
.
yy
181
,
&
yymsp
[
-
3
].
minor
.
yy0
);
}
}
}
}
yymsp
[
-
3
].
minor
.
yy
343
=
yylhsminor
.
yy343
;
yymsp
[
-
3
].
minor
.
yy
181
=
yylhsminor
.
yy181
;
break
;
break
;
case
10
7
:
/* signed ::= INTEGER */
case
10
9
:
/* signed ::= INTEGER */
{
yylhsminor
.
yy
369
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
{
yylhsminor
.
yy
271
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
yymsp
[
0
].
minor
.
yy
369
=
yylhsminor
.
yy369
;
yymsp
[
0
].
minor
.
yy
271
=
yylhsminor
.
yy271
;
break
;
break
;
case
1
08
:
/* signed ::= PLUS INTEGER */
case
1
10
:
/* signed ::= PLUS INTEGER */
{
yymsp
[
-
1
].
minor
.
yy
369
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
{
yymsp
[
-
1
].
minor
.
yy
271
=
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);
}
break
;
break
;
case
1
09
:
/* signed ::= MINUS INTEGER */
case
1
11
:
/* signed ::= MINUS INTEGER */
{
yymsp
[
-
1
].
minor
.
yy
369
=
-
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);}
{
yymsp
[
-
1
].
minor
.
yy
271
=
-
strtol
(
yymsp
[
0
].
minor
.
yy0
.
z
,
NULL
,
10
);}
break
;
break
;
case
11
0
:
/* cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args */
case
11
2
:
/* cmd ::= CREATE TABLE ifnotexists ids cpxName create_table_args */
{
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
yymsp
[
-
1
].
minor
.
yy0
.
n
;
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
yymsp
[
-
1
].
minor
.
yy0
.
n
;
setCreatedTableName
(
pInfo
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
-
3
].
minor
.
yy0
);
setCreatedTableName
(
pInfo
,
&
yymsp
[
-
2
].
minor
.
yy0
,
&
yymsp
[
-
3
].
minor
.
yy0
);
}
}
break
;
break
;
case
11
1
:
/* create_table_args ::= LP columnlist RP */
case
11
3
:
/* create_table_args ::= LP columnlist RP */
{
{
yymsp
[
-
2
].
minor
.
yy3
98
=
tSetCreateSQLElems
(
yymsp
[
-
1
].
minor
.
yy511
,
NULL
,
NULL
,
NULL
,
NULL
,
TSQL_CREATE_TABLE
);
yymsp
[
-
2
].
minor
.
yy3
74
=
tSetCreateSQLElems
(
yymsp
[
-
1
].
minor
.
yy449
,
NULL
,
NULL
,
NULL
,
NULL
,
TSQL_CREATE_TABLE
);
setSQLInfo
(
pInfo
,
yymsp
[
-
2
].
minor
.
yy3
98
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
setSQLInfo
(
pInfo
,
yymsp
[
-
2
].
minor
.
yy3
74
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
}
}
break
;
break
;
case
11
2
:
/* create_table_args ::= LP columnlist RP TAGS LP columnlist RP */
case
11
4
:
/* create_table_args ::= LP columnlist RP TAGS LP columnlist RP */
{
{
yymsp
[
-
6
].
minor
.
yy3
98
=
tSetCreateSQLElems
(
yymsp
[
-
5
].
minor
.
yy511
,
yymsp
[
-
1
].
minor
.
yy511
,
NULL
,
NULL
,
NULL
,
TSQL_CREATE_STABLE
);
yymsp
[
-
6
].
minor
.
yy3
74
=
tSetCreateSQLElems
(
yymsp
[
-
5
].
minor
.
yy449
,
yymsp
[
-
1
].
minor
.
yy449
,
NULL
,
NULL
,
NULL
,
TSQL_CREATE_STABLE
);
setSQLInfo
(
pInfo
,
yymsp
[
-
6
].
minor
.
yy3
98
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
setSQLInfo
(
pInfo
,
yymsp
[
-
6
].
minor
.
yy3
74
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
}
}
break
;
break
;
case
11
3
:
/* create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP */
case
11
5
:
/* create_table_args ::= USING ids cpxName TAGS LP tagitemlist RP */
{
{
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
yymsp
[
-
6
].
minor
.
yy3
98
=
tSetCreateSQLElems
(
NULL
,
NULL
,
&
yymsp
[
-
5
].
minor
.
yy0
,
yymsp
[
-
1
].
minor
.
yy156
,
NULL
,
TSQL_CREATE_TABLE_FROM_STABLE
);
yymsp
[
-
6
].
minor
.
yy3
74
=
tSetCreateSQLElems
(
NULL
,
NULL
,
&
yymsp
[
-
5
].
minor
.
yy0
,
yymsp
[
-
1
].
minor
.
yy494
,
NULL
,
TSQL_CREATE_TABLE_FROM_STABLE
);
setSQLInfo
(
pInfo
,
yymsp
[
-
6
].
minor
.
yy3
98
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
setSQLInfo
(
pInfo
,
yymsp
[
-
6
].
minor
.
yy3
74
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
}
}
break
;
break
;
case
11
4
:
/* create_table_args ::= AS select */
case
11
6
:
/* create_table_args ::= AS select */
{
{
yymsp
[
-
1
].
minor
.
yy3
98
=
tSetCreateSQLElems
(
NULL
,
NULL
,
NULL
,
NULL
,
yymsp
[
0
].
minor
.
yy444
,
TSQL_CREATE_STREAM
);
yymsp
[
-
1
].
minor
.
yy3
74
=
tSetCreateSQLElems
(
NULL
,
NULL
,
NULL
,
NULL
,
yymsp
[
0
].
minor
.
yy150
,
TSQL_CREATE_STREAM
);
setSQLInfo
(
pInfo
,
yymsp
[
-
1
].
minor
.
yy3
98
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
setSQLInfo
(
pInfo
,
yymsp
[
-
1
].
minor
.
yy3
74
,
NULL
,
TSDB_SQL_CREATE_TABLE
);
}
}
break
;
break
;
case
11
5
:
/* columnlist ::= columnlist COMMA column */
case
11
7
:
/* columnlist ::= columnlist COMMA column */
{
yylhsminor
.
yy
511
=
tFieldListAppend
(
yymsp
[
-
2
].
minor
.
yy511
,
&
yymsp
[
0
].
minor
.
yy343
);
}
{
yylhsminor
.
yy
449
=
tFieldListAppend
(
yymsp
[
-
2
].
minor
.
yy449
,
&
yymsp
[
0
].
minor
.
yy181
);
}
yymsp
[
-
2
].
minor
.
yy
511
=
yylhsminor
.
yy511
;
yymsp
[
-
2
].
minor
.
yy
449
=
yylhsminor
.
yy449
;
break
;
break
;
case
11
6
:
/* columnlist ::= column */
case
11
8
:
/* columnlist ::= column */
{
yylhsminor
.
yy
511
=
tFieldListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy343
);}
{
yylhsminor
.
yy
449
=
tFieldListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy181
);}
yymsp
[
0
].
minor
.
yy
511
=
yylhsminor
.
yy511
;
yymsp
[
0
].
minor
.
yy
449
=
yylhsminor
.
yy449
;
break
;
break
;
case
11
7
:
/* column ::= ids typename */
case
11
9
:
/* column ::= ids typename */
{
{
tSQLSetColumnInfo
(
&
yylhsminor
.
yy
343
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy343
);
tSQLSetColumnInfo
(
&
yylhsminor
.
yy
181
,
&
yymsp
[
-
1
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy181
);
}
}
yymsp
[
-
1
].
minor
.
yy
343
=
yylhsminor
.
yy343
;
yymsp
[
-
1
].
minor
.
yy
181
=
yylhsminor
.
yy181
;
break
;
break
;
case
1
18
:
/* tagitemlist ::= tagitemlist COMMA tagitem */
case
1
20
:
/* tagitemlist ::= tagitemlist COMMA tagitem */
{
yylhsminor
.
yy
156
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy156
,
&
yymsp
[
0
].
minor
.
yy506
,
-
1
);
}
{
yylhsminor
.
yy
494
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy494
,
&
yymsp
[
0
].
minor
.
yy312
,
-
1
);
}
yymsp
[
-
2
].
minor
.
yy
156
=
yylhsminor
.
yy156
;
yymsp
[
-
2
].
minor
.
yy
494
=
yylhsminor
.
yy494
;
break
;
break
;
case
1
19
:
/* tagitemlist ::= tagitem */
case
1
21
:
/* tagitemlist ::= tagitem */
{
yylhsminor
.
yy
156
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy506
,
-
1
);
}
{
yylhsminor
.
yy
494
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy312
,
-
1
);
}
yymsp
[
0
].
minor
.
yy
156
=
yylhsminor
.
yy156
;
yymsp
[
0
].
minor
.
yy
494
=
yylhsminor
.
yy494
;
break
;
break
;
case
12
0
:
/* tagitem ::= INTEGER */
case
12
2
:
/* tagitem ::= INTEGER */
case
12
1
:
/* tagitem ::= FLOAT */
yytestcase
(
yyruleno
==
121
);
case
12
3
:
/* tagitem ::= FLOAT */
yytestcase
(
yyruleno
==
123
);
case
12
2
:
/* tagitem ::= STRING */
yytestcase
(
yyruleno
==
122
);
case
12
4
:
/* tagitem ::= STRING */
yytestcase
(
yyruleno
==
124
);
case
12
3
:
/* tagitem ::= BOOL */
yytestcase
(
yyruleno
==
123
);
case
12
5
:
/* tagitem ::= BOOL */
yytestcase
(
yyruleno
==
125
);
{
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
tVariantCreate
(
&
yylhsminor
.
yy
506
,
&
yymsp
[
0
].
minor
.
yy0
);
}
{
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
tVariantCreate
(
&
yylhsminor
.
yy
312
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
0
].
minor
.
yy
506
=
yylhsminor
.
yy506
;
yymsp
[
0
].
minor
.
yy
312
=
yylhsminor
.
yy312
;
break
;
break
;
case
12
4
:
/* tagitem ::= NULL */
case
12
6
:
/* tagitem ::= NULL */
{
yymsp
[
0
].
minor
.
yy0
.
type
=
0
;
tVariantCreate
(
&
yylhsminor
.
yy
506
,
&
yymsp
[
0
].
minor
.
yy0
);
}
{
yymsp
[
0
].
minor
.
yy0
.
type
=
0
;
tVariantCreate
(
&
yylhsminor
.
yy
312
,
&
yymsp
[
0
].
minor
.
yy0
);
}
yymsp
[
0
].
minor
.
yy
506
=
yylhsminor
.
yy506
;
yymsp
[
0
].
minor
.
yy
312
=
yylhsminor
.
yy312
;
break
;
break
;
case
12
5
:
/* tagitem ::= MINUS INTEGER */
case
12
7
:
/* tagitem ::= MINUS INTEGER */
case
12
6
:
/* tagitem ::= MINUS FLOAT */
yytestcase
(
yyruleno
==
126
);
case
12
8
:
/* tagitem ::= MINUS FLOAT */
yytestcase
(
yyruleno
==
128
);
case
12
7
:
/* tagitem ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
127
);
case
12
9
:
/* tagitem ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
129
);
case
1
28
:
/* tagitem ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
128
);
case
1
30
:
/* tagitem ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
130
);
{
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
yymsp
[
0
].
minor
.
yy0
.
type
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
yymsp
[
0
].
minor
.
yy0
.
type
;
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
tVariantCreate
(
&
yylhsminor
.
yy
506
,
&
yymsp
[
-
1
].
minor
.
yy0
);
tVariantCreate
(
&
yylhsminor
.
yy
312
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
}
yymsp
[
-
1
].
minor
.
yy
506
=
yylhsminor
.
yy506
;
yymsp
[
-
1
].
minor
.
yy
312
=
yylhsminor
.
yy312
;
break
;
break
;
case
1
29
:
/* select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
case
1
31
:
/* select ::= SELECT selcollist from where_opt interval_opt fill_opt sliding_opt groupby_opt orderby_opt having_opt slimit_opt limit_opt */
{
{
yylhsminor
.
yy
444
=
tSetQuerySQLElems
(
&
yymsp
[
-
11
].
minor
.
yy0
,
yymsp
[
-
10
].
minor
.
yy158
,
yymsp
[
-
9
].
minor
.
yy156
,
yymsp
[
-
8
].
minor
.
yy190
,
yymsp
[
-
4
].
minor
.
yy156
,
yymsp
[
-
3
].
minor
.
yy156
,
&
yymsp
[
-
7
].
minor
.
yy340
,
&
yymsp
[
-
5
].
minor
.
yy0
,
yymsp
[
-
6
].
minor
.
yy156
,
&
yymsp
[
0
].
minor
.
yy414
,
&
yymsp
[
-
1
].
minor
.
yy414
);
yylhsminor
.
yy
150
=
tSetQuerySQLElems
(
&
yymsp
[
-
11
].
minor
.
yy0
,
yymsp
[
-
10
].
minor
.
yy224
,
yymsp
[
-
9
].
minor
.
yy494
,
yymsp
[
-
8
].
minor
.
yy66
,
yymsp
[
-
4
].
minor
.
yy494
,
yymsp
[
-
3
].
minor
.
yy494
,
&
yymsp
[
-
7
].
minor
.
yy314
,
&
yymsp
[
-
5
].
minor
.
yy0
,
yymsp
[
-
6
].
minor
.
yy494
,
&
yymsp
[
0
].
minor
.
yy188
,
&
yymsp
[
-
1
].
minor
.
yy188
);
}
}
yymsp
[
-
11
].
minor
.
yy
444
=
yylhsminor
.
yy444
;
yymsp
[
-
11
].
minor
.
yy
150
=
yylhsminor
.
yy150
;
break
;
break
;
case
13
0
:
/* union ::= select */
case
13
2
:
/* union ::= select */
{
yylhsminor
.
yy
333
=
setSubclause
(
NULL
,
yymsp
[
0
].
minor
.
yy444
);
}
{
yylhsminor
.
yy
25
=
setSubclause
(
NULL
,
yymsp
[
0
].
minor
.
yy150
);
}
yymsp
[
0
].
minor
.
yy
333
=
yylhsminor
.
yy333
;
yymsp
[
0
].
minor
.
yy
25
=
yylhsminor
.
yy25
;
break
;
break
;
case
13
1
:
/* union ::= LP union RP */
case
13
3
:
/* union ::= LP union RP */
{
yymsp
[
-
2
].
minor
.
yy
333
=
yymsp
[
-
1
].
minor
.
yy333
;
}
{
yymsp
[
-
2
].
minor
.
yy
25
=
yymsp
[
-
1
].
minor
.
yy25
;
}
break
;
break
;
case
13
2
:
/* union ::= union UNION ALL select */
case
13
4
:
/* union ::= union UNION ALL select */
{
yylhsminor
.
yy
333
=
appendSelectClause
(
yymsp
[
-
3
].
minor
.
yy333
,
yymsp
[
0
].
minor
.
yy444
);
}
{
yylhsminor
.
yy
25
=
appendSelectClause
(
yymsp
[
-
3
].
minor
.
yy25
,
yymsp
[
0
].
minor
.
yy150
);
}
yymsp
[
-
3
].
minor
.
yy
333
=
yylhsminor
.
yy333
;
yymsp
[
-
3
].
minor
.
yy
25
=
yylhsminor
.
yy25
;
break
;
break
;
case
13
3
:
/* union ::= union UNION ALL LP select RP */
case
13
5
:
/* union ::= union UNION ALL LP select RP */
{
yylhsminor
.
yy
333
=
appendSelectClause
(
yymsp
[
-
5
].
minor
.
yy333
,
yymsp
[
-
1
].
minor
.
yy444
);
}
{
yylhsminor
.
yy
25
=
appendSelectClause
(
yymsp
[
-
5
].
minor
.
yy25
,
yymsp
[
-
1
].
minor
.
yy150
);
}
yymsp
[
-
5
].
minor
.
yy
333
=
yylhsminor
.
yy333
;
yymsp
[
-
5
].
minor
.
yy
25
=
yylhsminor
.
yy25
;
break
;
break
;
case
13
4
:
/* cmd ::= union */
case
13
6
:
/* cmd ::= union */
{
setSQLInfo
(
pInfo
,
yymsp
[
0
].
minor
.
yy
333
,
NULL
,
TSDB_SQL_SELECT
);
}
{
setSQLInfo
(
pInfo
,
yymsp
[
0
].
minor
.
yy
25
,
NULL
,
TSDB_SQL_SELECT
);
}
break
;
break
;
case
13
5
:
/* select ::= SELECT selcollist */
case
13
7
:
/* select ::= SELECT selcollist */
{
{
yylhsminor
.
yy
444
=
tSetQuerySQLElems
(
&
yymsp
[
-
1
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy158
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
yylhsminor
.
yy
150
=
tSetQuerySQLElems
(
&
yymsp
[
-
1
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy224
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
}
}
yymsp
[
-
1
].
minor
.
yy
444
=
yylhsminor
.
yy444
;
yymsp
[
-
1
].
minor
.
yy
150
=
yylhsminor
.
yy150
;
break
;
break
;
case
13
6
:
/* sclp ::= selcollist COMMA */
case
13
8
:
/* sclp ::= selcollist COMMA */
{
yylhsminor
.
yy
158
=
yymsp
[
-
1
].
minor
.
yy158
;}
{
yylhsminor
.
yy
224
=
yymsp
[
-
1
].
minor
.
yy224
;}
yymsp
[
-
1
].
minor
.
yy
158
=
yylhsminor
.
yy158
;
yymsp
[
-
1
].
minor
.
yy
224
=
yylhsminor
.
yy224
;
break
;
break
;
case
13
7
:
/* sclp ::= */
case
13
9
:
/* sclp ::= */
{
yymsp
[
1
].
minor
.
yy
158
=
0
;}
{
yymsp
[
1
].
minor
.
yy
224
=
0
;}
break
;
break
;
case
1
38
:
/* selcollist ::= sclp expr as */
case
1
40
:
/* selcollist ::= sclp expr as */
{
{
yylhsminor
.
yy
158
=
tSQLExprListAppend
(
yymsp
[
-
2
].
minor
.
yy158
,
yymsp
[
-
1
].
minor
.
yy190
,
yymsp
[
0
].
minor
.
yy0
.
n
?&
yymsp
[
0
].
minor
.
yy0
:
0
);
yylhsminor
.
yy
224
=
tSQLExprListAppend
(
yymsp
[
-
2
].
minor
.
yy224
,
yymsp
[
-
1
].
minor
.
yy66
,
yymsp
[
0
].
minor
.
yy0
.
n
?&
yymsp
[
0
].
minor
.
yy0
:
0
);
}
}
yymsp
[
-
2
].
minor
.
yy
158
=
yylhsminor
.
yy158
;
yymsp
[
-
2
].
minor
.
yy
224
=
yylhsminor
.
yy224
;
break
;
break
;
case
1
39
:
/* selcollist ::= sclp STAR */
case
1
41
:
/* selcollist ::= sclp STAR */
{
{
tSQLExpr
*
pNode
=
tSQLExprIdValueCreate
(
NULL
,
TK_ALL
);
tSQLExpr
*
pNode
=
tSQLExprIdValueCreate
(
NULL
,
TK_ALL
);
yylhsminor
.
yy
158
=
tSQLExprListAppend
(
yymsp
[
-
1
].
minor
.
yy158
,
pNode
,
0
);
yylhsminor
.
yy
224
=
tSQLExprListAppend
(
yymsp
[
-
1
].
minor
.
yy224
,
pNode
,
0
);
}
}
yymsp
[
-
1
].
minor
.
yy
158
=
yylhsminor
.
yy158
;
yymsp
[
-
1
].
minor
.
yy
224
=
yylhsminor
.
yy224
;
break
;
break
;
case
14
0
:
/* as ::= AS ids */
case
14
2
:
/* as ::= AS ids */
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
{
yymsp
[
-
1
].
minor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
break
;
break
;
case
14
1
:
/* as ::= ids */
case
14
3
:
/* as ::= ids */
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;
}
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
break
;
break
;
case
14
2
:
/* as ::= */
case
14
4
:
/* as ::= */
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
}
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
}
break
;
break
;
case
14
3
:
/* from ::= FROM tablelist */
case
14
5
:
/* from ::= FROM tablelist */
{
yymsp
[
-
1
].
minor
.
yy
156
=
yymsp
[
0
].
minor
.
yy156
;}
{
yymsp
[
-
1
].
minor
.
yy
494
=
yymsp
[
0
].
minor
.
yy494
;}
break
;
break
;
case
14
4
:
/* tablelist ::= ids cpxName */
case
14
6
:
/* tablelist ::= ids cpxName */
{
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yylhsminor
.
yy
156
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
yylhsminor
.
yy
494
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
yylhsminor
.
yy
156
=
tVariantListAppendToken
(
yylhsminor
.
yy156
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
// table alias name
yylhsminor
.
yy
494
=
tVariantListAppendToken
(
yylhsminor
.
yy494
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
// table alias name
}
}
yymsp
[
-
1
].
minor
.
yy
156
=
yylhsminor
.
yy156
;
yymsp
[
-
1
].
minor
.
yy
494
=
yylhsminor
.
yy494
;
break
;
break
;
case
14
5
:
/* tablelist ::= ids cpxName ids */
case
14
7
:
/* tablelist ::= ids cpxName ids */
{
{
toTSDBType
(
yymsp
[
-
2
].
minor
.
yy0
.
type
);
toTSDBType
(
yymsp
[
-
2
].
minor
.
yy0
.
type
);
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
yymsp
[
-
1
].
minor
.
yy0
.
n
;
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
yymsp
[
-
1
].
minor
.
yy0
.
n
;
yylhsminor
.
yy
156
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
2
].
minor
.
yy0
,
-
1
);
yylhsminor
.
yy
494
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
2
].
minor
.
yy0
,
-
1
);
yylhsminor
.
yy
156
=
tVariantListAppendToken
(
yylhsminor
.
yy156
,
&
yymsp
[
0
].
minor
.
yy0
,
-
1
);
yylhsminor
.
yy
494
=
tVariantListAppendToken
(
yylhsminor
.
yy494
,
&
yymsp
[
0
].
minor
.
yy0
,
-
1
);
}
}
yymsp
[
-
2
].
minor
.
yy
156
=
yylhsminor
.
yy156
;
yymsp
[
-
2
].
minor
.
yy
494
=
yylhsminor
.
yy494
;
break
;
break
;
case
14
6
:
/* tablelist ::= tablelist COMMA ids cpxName */
case
14
8
:
/* tablelist ::= tablelist COMMA ids cpxName */
{
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yylhsminor
.
yy
156
=
tVariantListAppendToken
(
yymsp
[
-
3
].
minor
.
yy156
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
yylhsminor
.
yy
494
=
tVariantListAppendToken
(
yymsp
[
-
3
].
minor
.
yy494
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
yylhsminor
.
yy
156
=
tVariantListAppendToken
(
yylhsminor
.
yy156
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
yylhsminor
.
yy
494
=
tVariantListAppendToken
(
yylhsminor
.
yy494
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
}
}
yymsp
[
-
3
].
minor
.
yy
156
=
yylhsminor
.
yy156
;
yymsp
[
-
3
].
minor
.
yy
494
=
yylhsminor
.
yy494
;
break
;
break
;
case
14
7
:
/* tablelist ::= tablelist COMMA ids cpxName ids */
case
14
9
:
/* tablelist ::= tablelist COMMA ids cpxName ids */
{
{
toTSDBType
(
yymsp
[
-
2
].
minor
.
yy0
.
type
);
toTSDBType
(
yymsp
[
-
2
].
minor
.
yy0
.
type
);
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
yymsp
[
-
1
].
minor
.
yy0
.
n
;
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
yymsp
[
-
1
].
minor
.
yy0
.
n
;
yylhsminor
.
yy
156
=
tVariantListAppendToken
(
yymsp
[
-
4
].
minor
.
yy156
,
&
yymsp
[
-
2
].
minor
.
yy0
,
-
1
);
yylhsminor
.
yy
494
=
tVariantListAppendToken
(
yymsp
[
-
4
].
minor
.
yy494
,
&
yymsp
[
-
2
].
minor
.
yy0
,
-
1
);
yylhsminor
.
yy
156
=
tVariantListAppendToken
(
yylhsminor
.
yy156
,
&
yymsp
[
0
].
minor
.
yy0
,
-
1
);
yylhsminor
.
yy
494
=
tVariantListAppendToken
(
yylhsminor
.
yy494
,
&
yymsp
[
0
].
minor
.
yy0
,
-
1
);
}
}
yymsp
[
-
4
].
minor
.
yy
156
=
yylhsminor
.
yy156
;
yymsp
[
-
4
].
minor
.
yy
494
=
yylhsminor
.
yy494
;
break
;
break
;
case
1
48
:
/* tmvar ::= VARIABLE */
case
1
50
:
/* tmvar ::= VARIABLE */
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;}
{
yylhsminor
.
yy0
=
yymsp
[
0
].
minor
.
yy0
;}
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
yymsp
[
0
].
minor
.
yy0
=
yylhsminor
.
yy0
;
break
;
break
;
case
1
49
:
/* interval_opt ::= INTERVAL LP tmvar RP */
case
1
51
:
/* interval_opt ::= INTERVAL LP tmvar RP */
{
yymsp
[
-
3
].
minor
.
yy3
40
.
interval
=
yymsp
[
-
1
].
minor
.
yy0
;
yymsp
[
-
3
].
minor
.
yy340
.
offset
.
n
=
0
;
yymsp
[
-
3
].
minor
.
yy340
.
offset
.
z
=
NULL
;
yymsp
[
-
3
].
minor
.
yy340
.
offset
.
type
=
0
;}
{
yymsp
[
-
3
].
minor
.
yy3
14
.
interval
=
yymsp
[
-
1
].
minor
.
yy0
;
yymsp
[
-
3
].
minor
.
yy314
.
offset
.
n
=
0
;
yymsp
[
-
3
].
minor
.
yy314
.
offset
.
z
=
NULL
;
yymsp
[
-
3
].
minor
.
yy314
.
offset
.
type
=
0
;}
break
;
break
;
case
15
0
:
/* interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
case
15
2
:
/* interval_opt ::= INTERVAL LP tmvar COMMA tmvar RP */
{
yymsp
[
-
5
].
minor
.
yy3
40
.
interval
=
yymsp
[
-
3
].
minor
.
yy0
;
yymsp
[
-
5
].
minor
.
yy340
.
offset
=
yymsp
[
-
1
].
minor
.
yy0
;}
{
yymsp
[
-
5
].
minor
.
yy3
14
.
interval
=
yymsp
[
-
3
].
minor
.
yy0
;
yymsp
[
-
5
].
minor
.
yy314
.
offset
=
yymsp
[
-
1
].
minor
.
yy0
;}
break
;
break
;
case
15
1
:
/* interval_opt ::= */
case
15
3
:
/* interval_opt ::= */
{
memset
(
&
yymsp
[
1
].
minor
.
yy3
40
,
0
,
sizeof
(
yymsp
[
1
].
minor
.
yy340
));}
{
memset
(
&
yymsp
[
1
].
minor
.
yy3
14
,
0
,
sizeof
(
yymsp
[
1
].
minor
.
yy314
));}
break
;
break
;
case
15
2
:
/* fill_opt ::= */
case
15
4
:
/* fill_opt ::= */
{
yymsp
[
1
].
minor
.
yy
156
=
0
;
}
{
yymsp
[
1
].
minor
.
yy
494
=
0
;
}
break
;
break
;
case
15
3
:
/* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
case
15
5
:
/* fill_opt ::= FILL LP ID COMMA tagitemlist RP */
{
{
tVariant
A
=
{
0
};
tVariant
A
=
{
0
};
toTSDBType
(
yymsp
[
-
3
].
minor
.
yy0
.
type
);
toTSDBType
(
yymsp
[
-
3
].
minor
.
yy0
.
type
);
tVariantCreate
(
&
A
,
&
yymsp
[
-
3
].
minor
.
yy0
);
tVariantCreate
(
&
A
,
&
yymsp
[
-
3
].
minor
.
yy0
);
tVariantListInsert
(
yymsp
[
-
1
].
minor
.
yy
156
,
&
A
,
-
1
,
0
);
tVariantListInsert
(
yymsp
[
-
1
].
minor
.
yy
494
,
&
A
,
-
1
,
0
);
yymsp
[
-
5
].
minor
.
yy
156
=
yymsp
[
-
1
].
minor
.
yy156
;
yymsp
[
-
5
].
minor
.
yy
494
=
yymsp
[
-
1
].
minor
.
yy494
;
}
}
break
;
break
;
case
15
4
:
/* fill_opt ::= FILL LP ID RP */
case
15
6
:
/* fill_opt ::= FILL LP ID RP */
{
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
3
].
minor
.
yy
156
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
yymsp
[
-
3
].
minor
.
yy
494
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy0
,
-
1
);
}
}
break
;
break
;
case
15
5
:
/* sliding_opt ::= SLIDING LP tmvar RP */
case
15
7
:
/* sliding_opt ::= SLIDING LP tmvar RP */
{
yymsp
[
-
3
].
minor
.
yy0
=
yymsp
[
-
1
].
minor
.
yy0
;
}
{
yymsp
[
-
3
].
minor
.
yy0
=
yymsp
[
-
1
].
minor
.
yy0
;
}
break
;
break
;
case
15
6
:
/* sliding_opt ::= */
case
15
8
:
/* sliding_opt ::= */
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
yymsp
[
1
].
minor
.
yy0
.
z
=
NULL
;
yymsp
[
1
].
minor
.
yy0
.
type
=
0
;
}
{
yymsp
[
1
].
minor
.
yy0
.
n
=
0
;
yymsp
[
1
].
minor
.
yy0
.
z
=
NULL
;
yymsp
[
1
].
minor
.
yy0
.
type
=
0
;
}
break
;
break
;
case
15
7
:
/* orderby_opt ::= */
case
15
9
:
/* orderby_opt ::= */
case
16
5
:
/* groupby_opt ::= */
yytestcase
(
yyruleno
==
165
);
case
16
7
:
/* groupby_opt ::= */
yytestcase
(
yyruleno
==
167
);
{
yymsp
[
1
].
minor
.
yy
156
=
0
;}
{
yymsp
[
1
].
minor
.
yy
494
=
0
;}
break
;
break
;
case
1
58
:
/* orderby_opt ::= ORDER BY sortlist */
case
1
60
:
/* orderby_opt ::= ORDER BY sortlist */
case
16
6
:
/* groupby_opt ::= GROUP BY grouplist */
yytestcase
(
yyruleno
==
166
);
case
16
8
:
/* groupby_opt ::= GROUP BY grouplist */
yytestcase
(
yyruleno
==
168
);
{
yymsp
[
-
2
].
minor
.
yy
156
=
yymsp
[
0
].
minor
.
yy156
;}
{
yymsp
[
-
2
].
minor
.
yy
494
=
yymsp
[
0
].
minor
.
yy494
;}
break
;
break
;
case
1
59
:
/* sortlist ::= sortlist COMMA item sortorder */
case
1
61
:
/* sortlist ::= sortlist COMMA item sortorder */
{
{
yylhsminor
.
yy
156
=
tVariantListAppend
(
yymsp
[
-
3
].
minor
.
yy156
,
&
yymsp
[
-
1
].
minor
.
yy506
,
yymsp
[
0
].
minor
.
yy11
2
);
yylhsminor
.
yy
494
=
tVariantListAppend
(
yymsp
[
-
3
].
minor
.
yy494
,
&
yymsp
[
-
1
].
minor
.
yy312
,
yymsp
[
0
].
minor
.
yy8
2
);
}
}
yymsp
[
-
3
].
minor
.
yy
156
=
yylhsminor
.
yy156
;
yymsp
[
-
3
].
minor
.
yy
494
=
yylhsminor
.
yy494
;
break
;
break
;
case
16
0
:
/* sortlist ::= item sortorder */
case
16
2
:
/* sortlist ::= item sortorder */
{
{
yylhsminor
.
yy
156
=
tVariantListAppend
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy506
,
yymsp
[
0
].
minor
.
yy11
2
);
yylhsminor
.
yy
494
=
tVariantListAppend
(
NULL
,
&
yymsp
[
-
1
].
minor
.
yy312
,
yymsp
[
0
].
minor
.
yy8
2
);
}
}
yymsp
[
-
1
].
minor
.
yy
156
=
yylhsminor
.
yy156
;
yymsp
[
-
1
].
minor
.
yy
494
=
yylhsminor
.
yy494
;
break
;
break
;
case
16
1
:
/* item ::= ids cpxName */
case
16
3
:
/* item ::= ids cpxName */
{
{
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
toTSDBType
(
yymsp
[
-
1
].
minor
.
yy0
.
type
);
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
tVariantCreate
(
&
yylhsminor
.
yy
506
,
&
yymsp
[
-
1
].
minor
.
yy0
);
tVariantCreate
(
&
yylhsminor
.
yy
312
,
&
yymsp
[
-
1
].
minor
.
yy0
);
}
}
yymsp
[
-
1
].
minor
.
yy
506
=
yylhsminor
.
yy506
;
yymsp
[
-
1
].
minor
.
yy
312
=
yylhsminor
.
yy312
;
break
;
break
;
case
16
2
:
/* sortorder ::= ASC */
case
16
4
:
/* sortorder ::= ASC */
{
yymsp
[
0
].
minor
.
yy
11
2
=
TSDB_ORDER_ASC
;
}
{
yymsp
[
0
].
minor
.
yy
8
2
=
TSDB_ORDER_ASC
;
}
break
;
break
;
case
16
3
:
/* sortorder ::= DESC */
case
16
5
:
/* sortorder ::= DESC */
{
yymsp
[
0
].
minor
.
yy
11
2
=
TSDB_ORDER_DESC
;}
{
yymsp
[
0
].
minor
.
yy
8
2
=
TSDB_ORDER_DESC
;}
break
;
break
;
case
16
4
:
/* sortorder ::= */
case
16
6
:
/* sortorder ::= */
{
yymsp
[
1
].
minor
.
yy
11
2
=
TSDB_ORDER_ASC
;}
{
yymsp
[
1
].
minor
.
yy
8
2
=
TSDB_ORDER_ASC
;}
break
;
break
;
case
16
7
:
/* grouplist ::= grouplist COMMA item */
case
16
9
:
/* grouplist ::= grouplist COMMA item */
{
{
yylhsminor
.
yy
156
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy156
,
&
yymsp
[
0
].
minor
.
yy506
,
-
1
);
yylhsminor
.
yy
494
=
tVariantListAppend
(
yymsp
[
-
2
].
minor
.
yy494
,
&
yymsp
[
0
].
minor
.
yy312
,
-
1
);
}
}
yymsp
[
-
2
].
minor
.
yy
156
=
yylhsminor
.
yy156
;
yymsp
[
-
2
].
minor
.
yy
494
=
yylhsminor
.
yy494
;
break
;
break
;
case
1
68
:
/* grouplist ::= item */
case
1
70
:
/* grouplist ::= item */
{
{
yylhsminor
.
yy
156
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy506
,
-
1
);
yylhsminor
.
yy
494
=
tVariantListAppend
(
NULL
,
&
yymsp
[
0
].
minor
.
yy312
,
-
1
);
}
}
yymsp
[
0
].
minor
.
yy
156
=
yylhsminor
.
yy156
;
yymsp
[
0
].
minor
.
yy
494
=
yylhsminor
.
yy494
;
break
;
break
;
case
1
69
:
/* having_opt ::= */
case
1
71
:
/* having_opt ::= */
case
1
79
:
/* where_opt ::= */
yytestcase
(
yyruleno
==
179
);
case
1
81
:
/* where_opt ::= */
yytestcase
(
yyruleno
==
181
);
case
21
7
:
/* expritem ::= */
yytestcase
(
yyruleno
==
217
);
case
21
9
:
/* expritem ::= */
yytestcase
(
yyruleno
==
219
);
{
yymsp
[
1
].
minor
.
yy
190
=
0
;}
{
yymsp
[
1
].
minor
.
yy
66
=
0
;}
break
;
break
;
case
17
0
:
/* having_opt ::= HAVING expr */
case
17
2
:
/* having_opt ::= HAVING expr */
case
18
0
:
/* where_opt ::= WHERE expr */
yytestcase
(
yyruleno
==
180
);
case
18
2
:
/* where_opt ::= WHERE expr */
yytestcase
(
yyruleno
==
182
);
{
yymsp
[
-
1
].
minor
.
yy
190
=
yymsp
[
0
].
minor
.
yy190
;}
{
yymsp
[
-
1
].
minor
.
yy
66
=
yymsp
[
0
].
minor
.
yy66
;}
break
;
break
;
case
17
1
:
/* limit_opt ::= */
case
17
3
:
/* limit_opt ::= */
case
17
5
:
/* slimit_opt ::= */
yytestcase
(
yyruleno
==
175
);
case
17
7
:
/* slimit_opt ::= */
yytestcase
(
yyruleno
==
177
);
{
yymsp
[
1
].
minor
.
yy
414
.
limit
=
-
1
;
yymsp
[
1
].
minor
.
yy414
.
offset
=
0
;}
{
yymsp
[
1
].
minor
.
yy
188
.
limit
=
-
1
;
yymsp
[
1
].
minor
.
yy188
.
offset
=
0
;}
break
;
break
;
case
17
2
:
/* limit_opt ::= LIMIT signed */
case
17
4
:
/* limit_opt ::= LIMIT signed */
case
17
6
:
/* slimit_opt ::= SLIMIT signed */
yytestcase
(
yyruleno
==
176
);
case
17
8
:
/* slimit_opt ::= SLIMIT signed */
yytestcase
(
yyruleno
==
178
);
{
yymsp
[
-
1
].
minor
.
yy
414
.
limit
=
yymsp
[
0
].
minor
.
yy369
;
yymsp
[
-
1
].
minor
.
yy414
.
offset
=
0
;}
{
yymsp
[
-
1
].
minor
.
yy
188
.
limit
=
yymsp
[
0
].
minor
.
yy271
;
yymsp
[
-
1
].
minor
.
yy188
.
offset
=
0
;}
break
;
break
;
case
17
3
:
/* limit_opt ::= LIMIT signed OFFSET signed */
case
17
5
:
/* limit_opt ::= LIMIT signed OFFSET signed */
case
17
7
:
/* slimit_opt ::= SLIMIT signed SOFFSET signed */
yytestcase
(
yyruleno
==
177
);
case
17
9
:
/* slimit_opt ::= SLIMIT signed SOFFSET signed */
yytestcase
(
yyruleno
==
179
);
{
yymsp
[
-
3
].
minor
.
yy
414
.
limit
=
yymsp
[
-
2
].
minor
.
yy369
;
yymsp
[
-
3
].
minor
.
yy414
.
offset
=
yymsp
[
0
].
minor
.
yy369
;}
{
yymsp
[
-
3
].
minor
.
yy
188
.
limit
=
yymsp
[
-
2
].
minor
.
yy271
;
yymsp
[
-
3
].
minor
.
yy188
.
offset
=
yymsp
[
0
].
minor
.
yy271
;}
break
;
break
;
case
17
4
:
/* limit_opt ::= LIMIT signed COMMA signed */
case
17
6
:
/* limit_opt ::= LIMIT signed COMMA signed */
case
1
78
:
/* slimit_opt ::= SLIMIT signed COMMA signed */
yytestcase
(
yyruleno
==
178
);
case
1
80
:
/* slimit_opt ::= SLIMIT signed COMMA signed */
yytestcase
(
yyruleno
==
180
);
{
yymsp
[
-
3
].
minor
.
yy
414
.
limit
=
yymsp
[
0
].
minor
.
yy369
;
yymsp
[
-
3
].
minor
.
yy414
.
offset
=
yymsp
[
-
2
].
minor
.
yy369
;}
{
yymsp
[
-
3
].
minor
.
yy
188
.
limit
=
yymsp
[
0
].
minor
.
yy271
;
yymsp
[
-
3
].
minor
.
yy188
.
offset
=
yymsp
[
-
2
].
minor
.
yy271
;}
break
;
break
;
case
18
1
:
/* expr ::= LP expr RP */
case
18
3
:
/* expr ::= LP expr RP */
{
yymsp
[
-
2
].
minor
.
yy
190
=
yymsp
[
-
1
].
minor
.
yy190
;
}
{
yymsp
[
-
2
].
minor
.
yy
66
=
yymsp
[
-
1
].
minor
.
yy66
;
}
break
;
break
;
case
18
2
:
/* expr ::= ID */
case
18
4
:
/* expr ::= ID */
{
yylhsminor
.
yy
190
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_ID
);}
{
yylhsminor
.
yy
66
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_ID
);}
yymsp
[
0
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
0
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
18
3
:
/* expr ::= ID DOT ID */
case
18
5
:
/* expr ::= ID DOT ID */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy
190
=
tSQLExprIdValueCreate
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ID
);}
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy
66
=
tSQLExprIdValueCreate
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ID
);}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
18
4
:
/* expr ::= ID DOT STAR */
case
18
6
:
/* expr ::= ID DOT STAR */
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy
190
=
tSQLExprIdValueCreate
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ALL
);}
{
yymsp
[
-
2
].
minor
.
yy0
.
n
+=
(
1
+
yymsp
[
0
].
minor
.
yy0
.
n
);
yylhsminor
.
yy
66
=
tSQLExprIdValueCreate
(
&
yymsp
[
-
2
].
minor
.
yy0
,
TK_ALL
);}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
18
5
:
/* expr ::= INTEGER */
case
18
7
:
/* expr ::= INTEGER */
{
yylhsminor
.
yy
190
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_INTEGER
);}
{
yylhsminor
.
yy
66
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_INTEGER
);}
yymsp
[
0
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
0
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
18
6
:
/* expr ::= MINUS INTEGER */
case
18
8
:
/* expr ::= MINUS INTEGER */
case
18
7
:
/* expr ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
187
);
case
18
9
:
/* expr ::= PLUS INTEGER */
yytestcase
(
yyruleno
==
189
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_INTEGER
;
yylhsminor
.
yy
190
=
tSQLExprIdValueCreate
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_INTEGER
);}
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_INTEGER
;
yylhsminor
.
yy
66
=
tSQLExprIdValueCreate
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_INTEGER
);}
yymsp
[
-
1
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
1
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
1
88
:
/* expr ::= FLOAT */
case
1
90
:
/* expr ::= FLOAT */
{
yylhsminor
.
yy
190
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_FLOAT
);}
{
yylhsminor
.
yy
66
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_FLOAT
);}
yymsp
[
0
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
0
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
1
89
:
/* expr ::= MINUS FLOAT */
case
1
91
:
/* expr ::= MINUS FLOAT */
case
19
0
:
/* expr ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
190
);
case
19
2
:
/* expr ::= PLUS FLOAT */
yytestcase
(
yyruleno
==
192
);
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_FLOAT
;
yylhsminor
.
yy
190
=
tSQLExprIdValueCreate
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_FLOAT
);}
{
yymsp
[
-
1
].
minor
.
yy0
.
n
+=
yymsp
[
0
].
minor
.
yy0
.
n
;
yymsp
[
-
1
].
minor
.
yy0
.
type
=
TK_FLOAT
;
yylhsminor
.
yy
66
=
tSQLExprIdValueCreate
(
&
yymsp
[
-
1
].
minor
.
yy0
,
TK_FLOAT
);}
yymsp
[
-
1
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
1
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
19
1
:
/* expr ::= STRING */
case
19
3
:
/* expr ::= STRING */
{
yylhsminor
.
yy
190
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_STRING
);}
{
yylhsminor
.
yy
66
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_STRING
);}
yymsp
[
0
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
0
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
19
2
:
/* expr ::= NOW */
case
19
4
:
/* expr ::= NOW */
{
yylhsminor
.
yy
190
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_NOW
);
}
{
yylhsminor
.
yy
66
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_NOW
);
}
yymsp
[
0
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
0
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
19
3
:
/* expr ::= VARIABLE */
case
19
5
:
/* expr ::= VARIABLE */
{
yylhsminor
.
yy
190
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_VARIABLE
);}
{
yylhsminor
.
yy
66
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_VARIABLE
);}
yymsp
[
0
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
0
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
19
4
:
/* expr ::= BOOL */
case
19
6
:
/* expr ::= BOOL */
{
yylhsminor
.
yy
190
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_BOOL
);}
{
yylhsminor
.
yy
66
=
tSQLExprIdValueCreate
(
&
yymsp
[
0
].
minor
.
yy0
,
TK_BOOL
);}
yymsp
[
0
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
0
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
19
5
:
/* expr ::= ID LP exprlist RP */
case
19
7
:
/* expr ::= ID LP exprlist RP */
{
yylhsminor
.
yy
190
=
tSQLExprCreateFunction
(
yymsp
[
-
1
].
minor
.
yy158
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
{
yylhsminor
.
yy
66
=
tSQLExprCreateFunction
(
yymsp
[
-
1
].
minor
.
yy224
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
yymsp
[
-
3
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
3
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
19
6
:
/* expr ::= ID LP STAR RP */
case
19
8
:
/* expr ::= ID LP STAR RP */
{
yylhsminor
.
yy
190
=
tSQLExprCreateFunction
(
NULL
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
{
yylhsminor
.
yy
66
=
tSQLExprCreateFunction
(
NULL
,
&
yymsp
[
-
3
].
minor
.
yy0
,
&
yymsp
[
0
].
minor
.
yy0
,
yymsp
[
-
3
].
minor
.
yy0
.
type
);
}
yymsp
[
-
3
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
3
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
19
7
:
/* expr ::= expr IS NULL */
case
19
9
:
/* expr ::= expr IS NULL */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy190
,
NULL
,
TK_ISNULL
);}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy66
,
NULL
,
TK_ISNULL
);}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
198
:
/* expr ::= expr IS NOT NULL */
case
200
:
/* expr ::= expr IS NOT NULL */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
3
].
minor
.
yy190
,
NULL
,
TK_NOTNULL
);}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
3
].
minor
.
yy66
,
NULL
,
TK_NOTNULL
);}
yymsp
[
-
3
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
3
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
199
:
/* expr ::= expr LT expr */
case
201
:
/* expr ::= expr LT expr */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy190
,
yymsp
[
0
].
minor
.
yy190
,
TK_LT
);}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy66
,
yymsp
[
0
].
minor
.
yy66
,
TK_LT
);}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
20
0
:
/* expr ::= expr GT expr */
case
20
2
:
/* expr ::= expr GT expr */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy190
,
yymsp
[
0
].
minor
.
yy190
,
TK_GT
);}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy66
,
yymsp
[
0
].
minor
.
yy66
,
TK_GT
);}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
20
1
:
/* expr ::= expr LE expr */
case
20
3
:
/* expr ::= expr LE expr */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy190
,
yymsp
[
0
].
minor
.
yy190
,
TK_LE
);}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy66
,
yymsp
[
0
].
minor
.
yy66
,
TK_LE
);}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
20
2
:
/* expr ::= expr GE expr */
case
20
4
:
/* expr ::= expr GE expr */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy190
,
yymsp
[
0
].
minor
.
yy190
,
TK_GE
);}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy66
,
yymsp
[
0
].
minor
.
yy66
,
TK_GE
);}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
20
3
:
/* expr ::= expr NE expr */
case
20
5
:
/* expr ::= expr NE expr */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy190
,
yymsp
[
0
].
minor
.
yy190
,
TK_NE
);}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy66
,
yymsp
[
0
].
minor
.
yy66
,
TK_NE
);}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
20
4
:
/* expr ::= expr EQ expr */
case
20
6
:
/* expr ::= expr EQ expr */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy190
,
yymsp
[
0
].
minor
.
yy190
,
TK_EQ
);}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy66
,
yymsp
[
0
].
minor
.
yy66
,
TK_EQ
);}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
20
5
:
/* expr ::= expr AND expr */
case
20
7
:
/* expr ::= expr AND expr */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy190
,
yymsp
[
0
].
minor
.
yy190
,
TK_AND
);}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy66
,
yymsp
[
0
].
minor
.
yy66
,
TK_AND
);}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
20
6
:
/* expr ::= expr OR expr */
case
20
8
:
/* expr ::= expr OR expr */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy190
,
yymsp
[
0
].
minor
.
yy190
,
TK_OR
);
}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy66
,
yymsp
[
0
].
minor
.
yy66
,
TK_OR
);
}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
20
7
:
/* expr ::= expr PLUS expr */
case
20
9
:
/* expr ::= expr PLUS expr */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy190
,
yymsp
[
0
].
minor
.
yy190
,
TK_PLUS
);
}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy66
,
yymsp
[
0
].
minor
.
yy66
,
TK_PLUS
);
}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
2
08
:
/* expr ::= expr MINUS expr */
case
2
10
:
/* expr ::= expr MINUS expr */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy190
,
yymsp
[
0
].
minor
.
yy190
,
TK_MINUS
);
}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy66
,
yymsp
[
0
].
minor
.
yy66
,
TK_MINUS
);
}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
2
09
:
/* expr ::= expr STAR expr */
case
2
11
:
/* expr ::= expr STAR expr */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy190
,
yymsp
[
0
].
minor
.
yy190
,
TK_STAR
);
}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy66
,
yymsp
[
0
].
minor
.
yy66
,
TK_STAR
);
}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
21
0
:
/* expr ::= expr SLASH expr */
case
21
2
:
/* expr ::= expr SLASH expr */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy190
,
yymsp
[
0
].
minor
.
yy190
,
TK_DIVIDE
);}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy66
,
yymsp
[
0
].
minor
.
yy66
,
TK_DIVIDE
);}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
21
1
:
/* expr ::= expr REM expr */
case
21
3
:
/* expr ::= expr REM expr */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy190
,
yymsp
[
0
].
minor
.
yy190
,
TK_REM
);
}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy66
,
yymsp
[
0
].
minor
.
yy66
,
TK_REM
);
}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
21
2
:
/* expr ::= expr LIKE expr */
case
21
4
:
/* expr ::= expr LIKE expr */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy190
,
yymsp
[
0
].
minor
.
yy190
,
TK_LIKE
);
}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
2
].
minor
.
yy66
,
yymsp
[
0
].
minor
.
yy66
,
TK_LIKE
);
}
yymsp
[
-
2
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
2
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
21
3
:
/* expr ::= expr IN LP exprlist RP */
case
21
5
:
/* expr ::= expr IN LP exprlist RP */
{
yylhsminor
.
yy
190
=
tSQLExprCreate
(
yymsp
[
-
4
].
minor
.
yy190
,
(
tSQLExpr
*
)
yymsp
[
-
1
].
minor
.
yy158
,
TK_IN
);
}
{
yylhsminor
.
yy
66
=
tSQLExprCreate
(
yymsp
[
-
4
].
minor
.
yy66
,
(
tSQLExpr
*
)
yymsp
[
-
1
].
minor
.
yy224
,
TK_IN
);
}
yymsp
[
-
4
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
-
4
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
21
4
:
/* exprlist ::= exprlist COMMA expritem */
case
21
6
:
/* exprlist ::= exprlist COMMA expritem */
{
yylhsminor
.
yy
158
=
tSQLExprListAppend
(
yymsp
[
-
2
].
minor
.
yy158
,
yymsp
[
0
].
minor
.
yy190
,
0
);}
{
yylhsminor
.
yy
224
=
tSQLExprListAppend
(
yymsp
[
-
2
].
minor
.
yy224
,
yymsp
[
0
].
minor
.
yy66
,
0
);}
yymsp
[
-
2
].
minor
.
yy
158
=
yylhsminor
.
yy158
;
yymsp
[
-
2
].
minor
.
yy
224
=
yylhsminor
.
yy224
;
break
;
break
;
case
21
5
:
/* exprlist ::= expritem */
case
21
7
:
/* exprlist ::= expritem */
{
yylhsminor
.
yy
158
=
tSQLExprListAppend
(
0
,
yymsp
[
0
].
minor
.
yy190
,
0
);}
{
yylhsminor
.
yy
224
=
tSQLExprListAppend
(
0
,
yymsp
[
0
].
minor
.
yy66
,
0
);}
yymsp
[
0
].
minor
.
yy
158
=
yylhsminor
.
yy158
;
yymsp
[
0
].
minor
.
yy
224
=
yylhsminor
.
yy224
;
break
;
break
;
case
21
6
:
/* expritem ::= expr */
case
21
8
:
/* expritem ::= expr */
{
yylhsminor
.
yy
190
=
yymsp
[
0
].
minor
.
yy190
;}
{
yylhsminor
.
yy
66
=
yymsp
[
0
].
minor
.
yy66
;}
yymsp
[
0
].
minor
.
yy
190
=
yylhsminor
.
yy190
;
yymsp
[
0
].
minor
.
yy
66
=
yylhsminor
.
yy66
;
break
;
break
;
case
2
18
:
/* cmd ::= RESET QUERY CACHE */
case
2
20
:
/* cmd ::= RESET QUERY CACHE */
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_RESET_CACHE
,
0
);}
{
setDCLSQLElems
(
pInfo
,
TSDB_SQL_RESET_CACHE
,
0
);}
break
;
break
;
case
2
19
:
/* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
case
2
21
:
/* cmd ::= ALTER TABLE ids cpxName ADD COLUMN columnlist */
{
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableSQL
*
pAlterTable
=
tAlterTableSQLElems
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy
511
,
NULL
,
TSDB_ALTER_TABLE_ADD_COLUMN
);
SAlterTableSQL
*
pAlterTable
=
tAlterTableSQLElems
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy
449
,
NULL
,
TSDB_ALTER_TABLE_ADD_COLUMN
);
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
}
break
;
break
;
case
22
0
:
/* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
case
22
2
:
/* cmd ::= ALTER TABLE ids cpxName DROP COLUMN ids */
{
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
@@ -3021,14 +2786,14 @@ static YYACTIONTYPE yy_reduce(
...
@@ -3021,14 +2786,14 @@ static YYACTIONTYPE yy_reduce(
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
}
break
;
break
;
case
22
1
:
/* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
case
22
3
:
/* cmd ::= ALTER TABLE ids cpxName ADD TAG columnlist */
{
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableSQL
*
pAlterTable
=
tAlterTableSQLElems
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy
511
,
NULL
,
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
);
SAlterTableSQL
*
pAlterTable
=
tAlterTableSQLElems
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy
449
,
NULL
,
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
);
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
}
break
;
break
;
case
22
2
:
/* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
case
22
4
:
/* cmd ::= ALTER TABLE ids cpxName DROP TAG ids */
{
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
...
@@ -3039,7 +2804,7 @@ static YYACTIONTYPE yy_reduce(
...
@@ -3039,7 +2804,7 @@ static YYACTIONTYPE yy_reduce(
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
}
break
;
break
;
case
22
3
:
/* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
case
22
5
:
/* cmd ::= ALTER TABLE ids cpxName CHANGE TAG ids ids */
{
{
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
yymsp
[
-
5
].
minor
.
yy0
.
n
+=
yymsp
[
-
4
].
minor
.
yy0
.
n
;
...
@@ -3053,34 +2818,34 @@ static YYACTIONTYPE yy_reduce(
...
@@ -3053,34 +2818,34 @@ static YYACTIONTYPE yy_reduce(
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
}
break
;
break
;
case
22
4
:
/* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
case
22
6
:
/* cmd ::= ALTER TABLE ids cpxName SET TAG ids EQ tagitem */
{
{
yymsp
[
-
6
].
minor
.
yy0
.
n
+=
yymsp
[
-
5
].
minor
.
yy0
.
n
;
yymsp
[
-
6
].
minor
.
yy0
.
n
+=
yymsp
[
-
5
].
minor
.
yy0
.
n
;
toTSDBType
(
yymsp
[
-
2
].
minor
.
yy0
.
type
);
toTSDBType
(
yymsp
[
-
2
].
minor
.
yy0
.
type
);
tVariantList
*
A
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
2
].
minor
.
yy0
,
-
1
);
tVariantList
*
A
=
tVariantListAppendToken
(
NULL
,
&
yymsp
[
-
2
].
minor
.
yy0
,
-
1
);
A
=
tVariantListAppend
(
A
,
&
yymsp
[
0
].
minor
.
yy
506
,
-
1
);
A
=
tVariantListAppend
(
A
,
&
yymsp
[
0
].
minor
.
yy
312
,
-
1
);
SAlterTableSQL
*
pAlterTable
=
tAlterTableSQLElems
(
&
yymsp
[
-
6
].
minor
.
yy0
,
NULL
,
A
,
TSDB_ALTER_TABLE_UPDATE_TAG_VAL
);
SAlterTableSQL
*
pAlterTable
=
tAlterTableSQLElems
(
&
yymsp
[
-
6
].
minor
.
yy0
,
NULL
,
A
,
TSDB_ALTER_TABLE_UPDATE_TAG_VAL
);
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
setSQLInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
}
break
;
break
;
case
22
5
:
/* cmd ::= KILL CONNECTION INTEGER */
case
22
7
:
/* cmd ::= KILL CONNECTION INTEGER */
{
setKillSQL
(
pInfo
,
TSDB_SQL_KILL_CONNECTION
,
&
yymsp
[
0
].
minor
.
yy0
);}
{
setKillSQL
(
pInfo
,
TSDB_SQL_KILL_CONNECTION
,
&
yymsp
[
0
].
minor
.
yy0
);}
break
;
break
;
case
22
6
:
/* cmd ::= KILL STREAM INTEGER COLON INTEGER */
case
22
8
:
/* 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
);}
{
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
;
break
;
case
22
7
:
/* cmd ::= KILL QUERY INTEGER COLON INTEGER */
case
22
9
:
/* 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
);}
{
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
;
break
;
default:
default:
break
;
break
;
/********** End reduce actions ************************************************/
/********** End reduce actions ************************************************/
};
};
assert
(
yyruleno
<
sizeof
(
yyRuleInfo
Lhs
)
/
sizeof
(
yyRuleInfoLhs
[
0
])
);
assert
(
yyruleno
<
sizeof
(
yyRuleInfo
)
/
sizeof
(
yyRuleInfo
[
0
])
);
yygoto
=
yyRuleInfo
Lhs
[
yyruleno
]
;
yygoto
=
yyRuleInfo
[
yyruleno
].
lhs
;
yysize
=
yyRuleInfo
NRhs
[
yyruleno
]
;
yysize
=
yyRuleInfo
[
yyruleno
].
nrhs
;
yyact
=
yy_find_reduce_action
(
yymsp
[
yysize
].
stateno
,(
YYCODETYPE
)
yygoto
);
yyact
=
yy_find_reduce_action
(
yymsp
[
yysize
].
stateno
,(
YYCODETYPE
)
yygoto
);
/* There are no SHIFTREDUCE actions on nonterminals because the table
/* There are no SHIFTREDUCE actions on nonterminals because the table
...
@@ -3095,7 +2860,6 @@ static YYACTIONTYPE yy_reduce(
...
@@ -3095,7 +2860,6 @@ static YYACTIONTYPE yy_reduce(
yymsp
->
stateno
=
(
YYACTIONTYPE
)
yyact
;
yymsp
->
stateno
=
(
YYACTIONTYPE
)
yyact
;
yymsp
->
major
=
(
YYCODETYPE
)
yygoto
;
yymsp
->
major
=
(
YYCODETYPE
)
yygoto
;
yyTraceShift
(
yypParser
,
yyact
,
"... then shift"
);
yyTraceShift
(
yypParser
,
yyact
,
"... then shift"
);
return
yyact
;
}
}
/*
/*
...
@@ -3105,8 +2869,7 @@ static YYACTIONTYPE yy_reduce(
...
@@ -3105,8 +2869,7 @@ static YYACTIONTYPE yy_reduce(
static
void
yy_parse_failed
(
static
void
yy_parse_failed
(
yyParser
*
yypParser
/* The parser */
yyParser
*
yypParser
/* The parser */
){
){
ParseARG_FETCH
ParseARG_FETCH
;
ParseCTX_FETCH
#ifndef NDEBUG
#ifndef NDEBUG
if
(
yyTraceFILE
){
if
(
yyTraceFILE
){
fprintf
(
yyTraceFILE
,
"%sFail!
\n
"
,
yyTracePrompt
);
fprintf
(
yyTraceFILE
,
"%sFail!
\n
"
,
yyTracePrompt
);
...
@@ -3117,8 +2880,7 @@ static void yy_parse_failed(
...
@@ -3117,8 +2880,7 @@ static void yy_parse_failed(
** parser fails */
** parser fails */
/************ Begin %parse_failure code ***************************************/
/************ Begin %parse_failure code ***************************************/
/************ End %parse_failure code *****************************************/
/************ End %parse_failure code *****************************************/
ParseARG_STORE
/* Suppress warning about unused %extra_argument variable */
ParseARG_STORE
;
/* Suppress warning about unused %extra_argument variable */
ParseCTX_STORE
}
}
#endif
/* YYNOERRORRECOVERY */
#endif
/* YYNOERRORRECOVERY */
...
@@ -3130,8 +2892,7 @@ static void yy_syntax_error(
...
@@ -3130,8 +2892,7 @@ static void yy_syntax_error(
int
yymajor
,
/* The major type of the error token */
int
yymajor
,
/* The major type of the error token */
ParseTOKENTYPE
yyminor
/* The minor type of the error token */
ParseTOKENTYPE
yyminor
/* The minor type of the error token */
){
){
ParseARG_FETCH
ParseARG_FETCH
;
ParseCTX_FETCH
#define TOKEN yyminor
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/
/************ Begin %syntax_error code ****************************************/
...
@@ -3157,8 +2918,7 @@ static void yy_syntax_error(
...
@@ -3157,8 +2918,7 @@ static void yy_syntax_error(
assert
(
len
<=
outputBufLen
);
assert
(
len
<=
outputBufLen
);
/************ End %syntax_error code ******************************************/
/************ End %syntax_error code ******************************************/
ParseARG_STORE
/* Suppress warning about unused %extra_argument variable */
ParseARG_STORE
;
/* Suppress warning about unused %extra_argument variable */
ParseCTX_STORE
}
}
/*
/*
...
@@ -3167,8 +2927,7 @@ static void yy_syntax_error(
...
@@ -3167,8 +2927,7 @@ static void yy_syntax_error(
static
void
yy_accept
(
static
void
yy_accept
(
yyParser
*
yypParser
/* The parser */
yyParser
*
yypParser
/* The parser */
){
){
ParseARG_FETCH
ParseARG_FETCH
;
ParseCTX_FETCH
#ifndef NDEBUG
#ifndef NDEBUG
if
(
yyTraceFILE
){
if
(
yyTraceFILE
){
fprintf
(
yyTraceFILE
,
"%sAccept!
\n
"
,
yyTracePrompt
);
fprintf
(
yyTraceFILE
,
"%sAccept!
\n
"
,
yyTracePrompt
);
...
@@ -3183,8 +2942,7 @@ static void yy_accept(
...
@@ -3183,8 +2942,7 @@ static void yy_accept(
/*********** Begin %parse_accept code *****************************************/
/*********** Begin %parse_accept code *****************************************/
/*********** End %parse_accept code *******************************************/
/*********** End %parse_accept code *******************************************/
ParseARG_STORE
/* Suppress warning about unused %extra_argument variable */
ParseARG_STORE
;
/* Suppress warning about unused %extra_argument variable */
ParseCTX_STORE
}
}
/* The main parser program.
/* The main parser program.
...
@@ -3213,47 +2971,45 @@ void Parse(
...
@@ -3213,47 +2971,45 @@ void Parse(
ParseARG_PDECL
/* Optional %extra_argument parameter */
ParseARG_PDECL
/* Optional %extra_argument parameter */
){
){
YYMINORTYPE
yyminorunion
;
YYMINORTYPE
yyminorunion
;
YYACTIONTYPE
yyact
;
/* The parser action. */
unsigned
int
yyact
;
/* The parser action. */
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
int
yyendofinput
;
/* True if we are at the end of input */
int
yyendofinput
;
/* True if we are at the end of input */
#endif
#endif
#ifdef YYERRORSYMBOL
#ifdef YYERRORSYMBOL
int
yyerrorhit
=
0
;
/* True if yymajor has invoked an error */
int
yyerrorhit
=
0
;
/* True if yymajor has invoked an error */
#endif
#endif
yyParser
*
yypParser
=
(
yyParser
*
)
yyp
;
/* The parser */
yyParser
*
yypParser
;
/* The parser */
ParseCTX_FETCH
ParseARG_STORE
yypParser
=
(
yyParser
*
)
yyp
;
assert
(
yypParser
->
yytos
!=
0
);
assert
(
yypParser
->
yytos
!=
0
);
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
yyendofinput
=
(
yymajor
==
0
);
yyendofinput
=
(
yymajor
==
0
);
#endif
#endif
ParseARG_STORE
;
yyact
=
yypParser
->
yytos
->
stateno
;
#ifndef NDEBUG
#ifndef NDEBUG
if
(
yyTraceFILE
){
if
(
yyTraceFILE
){
if
(
yyact
<
YY_MIN_REDUCE
){
int
stateno
=
yypParser
->
yytos
->
stateno
;
if
(
stateno
<
YY_MIN_REDUCE
){
fprintf
(
yyTraceFILE
,
"%sInput '%s' in state %d
\n
"
,
fprintf
(
yyTraceFILE
,
"%sInput '%s' in state %d
\n
"
,
yyTracePrompt
,
yyTokenName
[
yymajor
],
yyact
);
yyTracePrompt
,
yyTokenName
[
yymajor
],
stateno
);
}
else
{
}
else
{
fprintf
(
yyTraceFILE
,
"%sInput '%s' with pending reduce %d
\n
"
,
fprintf
(
yyTraceFILE
,
"%sInput '%s' with pending reduce %d
\n
"
,
yyTracePrompt
,
yyTokenName
[
yymajor
],
yyact
-
YY_MIN_REDUCE
);
yyTracePrompt
,
yyTokenName
[
yymajor
],
stateno
-
YY_MIN_REDUCE
);
}
}
}
}
#endif
#endif
do
{
do
{
assert
(
yyact
==
yypParser
->
yytos
->
stateno
);
yyact
=
yy_find_shift_action
(
yypParser
,(
YYCODETYPE
)
yymajor
);
yyact
=
yy_find_shift_action
((
YYCODETYPE
)
yymajor
,
yyact
);
if
(
yyact
>=
YY_MIN_REDUCE
){
if
(
yyact
>=
YY_MIN_REDUCE
){
yyact
=
yy_reduce
(
yypParser
,
yyact
-
YY_MIN_REDUCE
,
yymajor
,
yy_reduce
(
yypParser
,
yyact
-
YY_MIN_REDUCE
,
yymajor
,
yyminor
);
yyminor
ParseCTX_PARAM
);
}
else
if
(
yyact
<=
YY_MAX_SHIFTREDUCE
){
}
else
if
(
yyact
<=
YY_MAX_SHIFTREDUCE
){
yy_shift
(
yypParser
,
yyact
,
(
YYCODETYPE
)
yymajor
,
yyminor
);
yy_shift
(
yypParser
,
yyact
,
yymajor
,
yyminor
);
#ifndef YYNOERRORRECOVERY
#ifndef YYNOERRORRECOVERY
yypParser
->
yyerrcnt
--
;
yypParser
->
yyerrcnt
--
;
#endif
#endif
break
;
yymajor
=
YYNOCODE
;
}
else
if
(
yyact
==
YY_ACCEPT_ACTION
){
}
else
if
(
yyact
==
YY_ACCEPT_ACTION
){
yypParser
->
yytos
--
;
yypParser
->
yytos
--
;
yy_accept
(
yypParser
);
yy_accept
(
yypParser
);
...
@@ -3304,9 +3060,10 @@ void Parse(
...
@@ -3304,9 +3060,10 @@ void Parse(
yymajor
=
YYNOCODE
;
yymajor
=
YYNOCODE
;
}
else
{
}
else
{
while
(
yypParser
->
yytos
>=
yypParser
->
yystack
while
(
yypParser
->
yytos
>=
yypParser
->
yystack
&&
yymx
!=
YYERRORSYMBOL
&&
(
yyact
=
yy_find_reduce_action
(
&&
(
yyact
=
yy_find_reduce_action
(
yypParser
->
yytos
->
stateno
,
yypParser
->
yytos
->
stateno
,
YYERRORSYMBOL
))
>
YY_MAX_SHIFT
REDUCE
YYERRORSYMBOL
))
>
=
YY_MIN_
REDUCE
){
){
yy_pop_parser_stack
(
yypParser
);
yy_pop_parser_stack
(
yypParser
);
}
}
...
@@ -3323,8 +3080,6 @@ void Parse(
...
@@ -3323,8 +3080,6 @@ void Parse(
}
}
yypParser
->
yyerrcnt
=
3
;
yypParser
->
yyerrcnt
=
3
;
yyerrorhit
=
1
;
yyerrorhit
=
1
;
if
(
yymajor
==
YYNOCODE
)
break
;
yyact
=
yypParser
->
yytos
->
stateno
;
#elif defined(YYNOERRORRECOVERY)
#elif defined(YYNOERRORRECOVERY)
/* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
/* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
** do any kind of error recovery. Instead, simply invoke the syntax
** do any kind of error recovery. Instead, simply invoke the syntax
...
@@ -3335,7 +3090,8 @@ void Parse(
...
@@ -3335,7 +3090,8 @@ void Parse(
*/
*/
yy_syntax_error
(
yypParser
,
yymajor
,
yyminor
);
yy_syntax_error
(
yypParser
,
yymajor
,
yyminor
);
yy_destructor
(
yypParser
,(
YYCODETYPE
)
yymajor
,
&
yyminorunion
);
yy_destructor
(
yypParser
,(
YYCODETYPE
)
yymajor
,
&
yyminorunion
);
break
;
yymajor
=
YYNOCODE
;
#else
/* YYERRORSYMBOL is not defined */
#else
/* YYERRORSYMBOL is not defined */
/* This is what we do if the grammar does not define ERROR:
/* This is what we do if the grammar does not define ERROR:
**
**
...
@@ -3357,10 +3113,10 @@ void Parse(
...
@@ -3357,10 +3113,10 @@ void Parse(
yypParser
->
yyerrcnt
=
-
1
;
yypParser
->
yyerrcnt
=
-
1
;
#endif
#endif
}
}
break
;
yymajor
=
YYNOCODE
;
#endif
#endif
}
}
}
while
(
yypParser
->
yytos
>
yypParser
->
yystack
);
}
while
(
yy
major
!=
YYNOCODE
&&
yy
pParser
->
yytos
>
yypParser
->
yystack
);
#ifndef NDEBUG
#ifndef NDEBUG
if
(
yyTraceFILE
){
if
(
yyTraceFILE
){
yyStackEntry
*
i
;
yyStackEntry
*
i
;
...
@@ -3375,17 +3131,3 @@ void Parse(
...
@@ -3375,17 +3131,3 @@ void Parse(
#endif
#endif
return
;
return
;
}
}
/*
** Return the fallback token corresponding to canonical token iToken, or
** 0 if iToken has no fallback.
*/
int
ParseFallback
(
int
iToken
){
#ifdef YYFALLBACK
assert
(
iToken
<
(
int
)(
sizeof
(
yyFallback
)
/
sizeof
(
yyFallback
[
0
]))
);
return
yyFallback
[
iToken
];
#else
(
void
)
iToken
;
return
0
;
#endif
}
tests/pytest/fulltest.sh
浏览文件 @
95426ffd
...
@@ -155,6 +155,7 @@ python3 ./test.py -f stream/new.py
...
@@ -155,6 +155,7 @@ python3 ./test.py -f stream/new.py
python3 ./test.py
-f
stream/stream1.py
python3 ./test.py
-f
stream/stream1.py
python3 ./test.py
-f
stream/stream2.py
python3 ./test.py
-f
stream/stream2.py
python3 ./test.py
-f
stream/parser.py
python3 ./test.py
-f
stream/parser.py
python3 ./test.py
-f
stream/history.py
#alter table
#alter table
python3 ./test.py
-f
alter/alter_table_crash.py
python3 ./test.py
-f
alter/alter_table_crash.py
...
...
tests/pytest/stream/history.py
0 → 100644
浏览文件 @
95426ffd
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import
sys
import
time
import
taos
from
util.log
import
tdLog
from
util.cases
import
tdCases
from
util.sql
import
tdSql
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
(),
logSql
)
def
run
(
self
):
tdSql
.
prepare
()
tdSql
.
execute
(
"create table cars(ts timestamp, s int) tags(id int)"
)
tdSql
.
execute
(
"create table car0 using cars tags(0)"
)
tdSql
.
execute
(
"create table car1 using cars tags(1)"
)
tdSql
.
execute
(
"create table car2 using cars tags(2)"
)
tdSql
.
execute
(
"create table car3 using cars tags(3)"
)
tdSql
.
execute
(
"create table car4 using cars tags(4)"
)
tdSql
.
execute
(
"insert into car0 values('2019-01-01 00:00:00.103', 1)"
)
tdSql
.
execute
(
"insert into car1 values('2019-01-01 00:00:00.234', 1)"
)
tdSql
.
execute
(
"insert into car0 values('2019-01-01 00:00:01.012', 1)"
)
tdSql
.
execute
(
"insert into car0 values('2019-01-01 00:00:02.003', 1)"
)
tdSql
.
execute
(
"insert into car2 values('2019-01-01 00:00:02.328', 1)"
)
tdSql
.
execute
(
"insert into car0 values('2019-01-01 00:00:03.139', 1)"
)
tdSql
.
execute
(
"insert into car0 values('2019-01-01 00:00:04.348', 1)"
)
tdSql
.
execute
(
"insert into car0 values('2019-01-01 00:00:05.783', 1)"
)
tdSql
.
execute
(
"insert into car1 values('2019-01-01 00:00:01.893', 1)"
)
tdSql
.
execute
(
"insert into car1 values('2019-01-01 00:00:02.712', 1)"
)
tdSql
.
execute
(
"insert into car1 values('2019-01-01 00:00:03.982', 1)"
)
tdSql
.
execute
(
"insert into car3 values('2019-01-01 00:00:01.389', 1)"
)
tdSql
.
execute
(
"insert into car4 values('2019-01-01 00:00:01.829', 1)"
)
tdSql
.
execute
(
"create table strm as select count(*) from cars interval(4s)"
)
tdSql
.
waitedQuery
(
"select * from strm"
,
2
,
100
)
tdSql
.
checkData
(
0
,
1
,
11
)
tdSql
.
checkData
(
1
,
1
,
2
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/script/fullGeneralSuite.sim
浏览文件 @
95426ffd
...
@@ -220,3 +220,5 @@ run general/stream/table_del.sim
...
@@ -220,3 +220,5 @@ run general/stream/table_del.sim
run general/stream/metrics_del.sim
run general/stream/metrics_del.sim
run general/stream/table_replica1_vnoden.sim
run general/stream/table_replica1_vnoden.sim
run general/stream/metrics_replica1_vnoden.sim
run general/stream/metrics_replica1_vnoden.sim
run general/db/show_create_db.sim
run general/db/show_create_table.sim
tests/script/general/db/show_create_db.sim
0 → 100644
浏览文件 @
95426ffd
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
print =============== step2
sql create database db
sql show create database db
if $rows != 1 then
return -1
endi
print =============== step3
sql use db
sql show create database db
if $rows != 1 then
return -1
endi
if $data00 != db then
return -1
endi
sql drop database db
system sh/exec.sh -n dnode1 -s stop -x SIGINT
tests/script/general/db/show_create_table.sim
0 → 100644
浏览文件 @
95426ffd
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
print ===============create three type table
sql create database db
sql use db
sql create table meters(ts timestamp, f binary(8)) tags(loc int, zone binary(8))
sql create table t0 using meters tags(1,'ch')
sql create table normalTbl(ts timestamp, zone binary(8))
sql use db
sql show create table meters
if $rows != 1 then
return -1
endi
print ===============check sub table
sql show create table t0
if $rows != 1 then
return -1
endi
if $data00 == 't0' then
return -1
endi
print ===============check normal table
sql show create table normalTbl
if $rows != 1 then
return -1
endi
if $data00 == 'normalTbl' then
return -1
endi
print ===============check super table
sql show create table meters
if $rows != 1 then
return -1
endi
if $data00 == 'meters' then
return -1
endi
print ===============check sub table with prefix
sql show create table db.t0
if $rows != 1 then
return -1
endi
if $data00 == 't0' then
return -1
endi
print ===============check normal table with prefix
sql show create table db.normalTbl
if $rows != 1 then
return -1
endi
if $data00 == 'normalTbl' then
return -1
endi
print ===============check super table with prefix
sql show create table db.meters
if $rows != 1 then
return -1
endi
if $data00 == 'meters' then
return -1
endi
sql drop database db
system sh/exec.sh -n dnode1 -s stop -x SIGINT
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录