Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
b0b119
TDengine
提交
c9feaf28
TDengine
项目概览
b0b119
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c9feaf28
编写于
7月 08, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/hotfix/test' into hotfix/crash
上级
5754c95a
57671ddf
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
3 deletion
+29
-3
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+24
-0
src/kit/taosmigrate/taosmigrate.c
src/kit/taosmigrate/taosmigrate.c
+1
-1
tests/pytest/client/client.py
tests/pytest/client/client.py
+4
-2
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
c9feaf28
...
@@ -90,6 +90,7 @@ static int32_t validateSqlFunctionInStreamSql(SSqlCmd* pCmd, SQueryInfo* pQueryI
...
@@ -90,6 +90,7 @@ static int32_t validateSqlFunctionInStreamSql(SSqlCmd* pCmd, SQueryInfo* pQueryI
static
int32_t
buildArithmeticExprString
(
tSQLExpr
*
pExpr
,
char
**
exprString
);
static
int32_t
buildArithmeticExprString
(
tSQLExpr
*
pExpr
,
char
**
exprString
);
static
int32_t
validateFunctionsInIntervalOrGroupbyQuery
(
SSqlCmd
*
pCmd
,
SQueryInfo
*
pQueryInfo
);
static
int32_t
validateFunctionsInIntervalOrGroupbyQuery
(
SSqlCmd
*
pCmd
,
SQueryInfo
*
pQueryInfo
);
static
int32_t
validateArithmeticSQLExpr
(
SSqlCmd
*
pCmd
,
tSQLExpr
*
pExpr
,
SQueryInfo
*
pQueryInfo
,
SColumnList
*
pList
,
int32_t
*
type
);
static
int32_t
validateArithmeticSQLExpr
(
SSqlCmd
*
pCmd
,
tSQLExpr
*
pExpr
,
SQueryInfo
*
pQueryInfo
,
SColumnList
*
pList
,
int32_t
*
type
);
static
int32_t
validateEp
(
char
*
ep
);
static
int32_t
validateDNodeConfig
(
tDCLSQL
*
pOptions
);
static
int32_t
validateDNodeConfig
(
tDCLSQL
*
pOptions
);
static
int32_t
validateLocalConfig
(
tDCLSQL
*
pOptions
);
static
int32_t
validateLocalConfig
(
tDCLSQL
*
pOptions
);
static
int32_t
validateColumnName
(
char
*
name
);
static
int32_t
validateColumnName
(
char
*
name
);
...
@@ -359,6 +360,7 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) {
...
@@ -359,6 +360,7 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) {
case
TSDB_SQL_CFG_DNODE
:
{
case
TSDB_SQL_CFG_DNODE
:
{
const
char
*
msg2
=
"invalid configure options or values"
;
const
char
*
msg2
=
"invalid configure options or values"
;
const
char
*
msg3
=
"invalid dnode ep"
;
/* validate the ip address */
/* validate the ip address */
tDCLSQL
*
pDCL
=
pInfo
->
pDCLInfo
;
tDCLSQL
*
pDCL
=
pInfo
->
pDCLInfo
;
...
@@ -375,6 +377,10 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) {
...
@@ -375,6 +377,10 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) {
strncpy
(
pCfg
->
ep
,
pDCL
->
a
[
0
].
z
,
pDCL
->
a
[
0
].
n
);
strncpy
(
pCfg
->
ep
,
pDCL
->
a
[
0
].
z
,
pDCL
->
a
[
0
].
n
);
if
(
validateEp
(
pCfg
->
ep
)
!=
TSDB_CODE_SUCCESS
)
{
return
invalidSqlErrMsg
(
tscGetErrorMsgPayload
(
pCmd
),
msg3
);
}
strncpy
(
pCfg
->
config
,
pDCL
->
a
[
1
].
z
,
pDCL
->
a
[
1
].
n
);
strncpy
(
pCfg
->
config
,
pDCL
->
a
[
1
].
z
,
pDCL
->
a
[
1
].
n
);
if
(
pDCL
->
nTokens
==
3
)
{
if
(
pDCL
->
nTokens
==
3
)
{
...
@@ -4629,6 +4635,24 @@ typedef struct SDNodeDynConfOption {
...
@@ -4629,6 +4635,24 @@ typedef struct SDNodeDynConfOption {
int32_t
len
;
// name string length
int32_t
len
;
// name string length
}
SDNodeDynConfOption
;
}
SDNodeDynConfOption
;
int32_t
validateEp
(
char
*
ep
)
{
char
buf
[
TSDB_EP_LEN
+
1
]
=
{
0
};
tstrncpy
(
buf
,
ep
,
TSDB_EP_LEN
);
char
*
pos
=
strchr
(
buf
,
':'
);
if
(
NULL
==
pos
)
{
return
TSDB_CODE_TSC_INVALID_SQL
;
}
uint16_t
port
=
atoi
(
pos
+
1
);
if
(
0
==
port
)
{
return
TSDB_CODE_TSC_INVALID_SQL
;
}
return
TSDB_CODE_SUCCESS
;
}
int32_t
validateDNodeConfig
(
tDCLSQL
*
pOptions
)
{
int32_t
validateDNodeConfig
(
tDCLSQL
*
pOptions
)
{
if
(
pOptions
->
nTokens
<
2
||
pOptions
->
nTokens
>
3
)
{
if
(
pOptions
->
nTokens
<
2
||
pOptions
->
nTokens
>
3
)
{
return
TSDB_CODE_TSC_INVALID_SQL
;
return
TSDB_CODE_TSC_INVALID_SQL
;
...
...
src/kit/taosmigrate/taosmigrate.c
浏览文件 @
c9feaf28
...
@@ -40,7 +40,7 @@ struct arguments {
...
@@ -40,7 +40,7 @@ struct arguments {
static
error_t
parse_opt
(
int
key
,
char
*
arg
,
struct
argp_state
*
state
)
{
static
error_t
parse_opt
(
int
key
,
char
*
arg
,
struct
argp_state
*
state
)
{
struct
arguments
*
arguments
=
state
->
input
;
struct
arguments
*
arguments
=
state
->
input
;
switch
(
key
)
{
switch
(
key
)
{
case
'
w
'
:
case
'
r
'
:
arguments
->
dataDir
=
arg
;
arguments
->
dataDir
=
arg
;
break
;
break
;
case
'd'
:
case
'd'
:
...
...
tests/pytest/client/client.py
浏览文件 @
c9feaf28
...
@@ -40,8 +40,10 @@ class TDTestCase:
...
@@ -40,8 +40,10 @@ class TDTestCase:
ret
=
tdSql
.
query
(
'select server_status() as result'
)
ret
=
tdSql
.
query
(
'select server_status() as result'
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
ret
=
tdSql
.
execute
(
'alter dnode 127.0.0.1 debugFlag 135'
)
ret
=
tdSql
.
query
(
'show dnodes'
)
tdLog
.
info
(
"alter dnode ret: %d"
%
ret
)
ret
=
tdSql
.
execute
(
'alter dnode "%s" debugFlag 135'
%
tdSql
.
getData
(
0
,
1
))
tdLog
.
info
(
'alter dnode "%s" debugFlag 135 -> ret: %d'
%
(
tdSql
.
getData
(
0
,
1
),
ret
))
def
stop
(
self
):
def
stop
(
self
):
tdSql
.
close
()
tdSql
.
close
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录