Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ad56011f
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ad56011f
编写于
3月 03, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-13039] fix compiler error.
上级
fa9d652e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
20 deletion
+22
-20
source/libs/parser/src/astCreateFuncs.c
source/libs/parser/src/astCreateFuncs.c
+19
-19
source/libs/scheduler/test/schedulerTests.cpp
source/libs/scheduler/test/schedulerTests.cpp
+3
-1
未找到文件。
source/libs/parser/src/astCreateFuncs.c
浏览文件 @
ad56011f
...
...
@@ -44,7 +44,7 @@ static SDatabaseOptions* setDbBlocks(SAstCreateContext* pCxt, SDatabaseOptions*
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_TOTAL_BLOCKS
||
val
>
TSDB_MAX_TOTAL_BLOCKS
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option totalBlocks: %
d
valid range: [%d, %d]"
,
val
,
TSDB_MIN_TOTAL_BLOCKS
,
TSDB_MAX_TOTAL_BLOCKS
);
"invalid db option totalBlocks: %
"
PRId64
"
valid range: [%d, %d]"
,
val
,
TSDB_MIN_TOTAL_BLOCKS
,
TSDB_MAX_TOTAL_BLOCKS
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -56,7 +56,7 @@ static SDatabaseOptions* setDbCache(SAstCreateContext* pCxt, SDatabaseOptions* p
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_CACHE_BLOCK_SIZE
||
val
>
TSDB_MAX_CACHE_BLOCK_SIZE
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option cacheBlockSize: %
d
valid range: [%d, %d]"
,
val
,
TSDB_MIN_CACHE_BLOCK_SIZE
,
TSDB_MAX_CACHE_BLOCK_SIZE
);
"invalid db option cacheBlockSize: %
"
PRId64
"
valid range: [%d, %d]"
,
val
,
TSDB_MIN_CACHE_BLOCK_SIZE
,
TSDB_MAX_CACHE_BLOCK_SIZE
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -68,7 +68,7 @@ static SDatabaseOptions* setDbCacheLast(SAstCreateContext* pCxt, SDatabaseOption
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_DB_CACHE_LAST_ROW
||
val
>
TSDB_MAX_DB_CACHE_LAST_ROW
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option cacheLast: %
d
valid range: [%d, %d]"
,
val
,
TSDB_MIN_DB_CACHE_LAST_ROW
,
TSDB_MAX_DB_CACHE_LAST_ROW
);
"invalid db option cacheLast: %
"
PRId64
"
valid range: [%d, %d]"
,
val
,
TSDB_MIN_DB_CACHE_LAST_ROW
,
TSDB_MAX_DB_CACHE_LAST_ROW
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -80,7 +80,7 @@ static SDatabaseOptions* setDbComp(SAstCreateContext* pCxt, SDatabaseOptions* pO
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_COMP_LEVEL
||
val
>
TSDB_MAX_COMP_LEVEL
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option compression: %
d
valid range: [%d, %d]"
,
val
,
TSDB_MIN_COMP_LEVEL
,
TSDB_MAX_COMP_LEVEL
);
"invalid db option compression: %
"
PRId64
"
valid range: [%d, %d]"
,
val
,
TSDB_MIN_COMP_LEVEL
,
TSDB_MAX_COMP_LEVEL
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -92,7 +92,7 @@ static SDatabaseOptions* setDbDays(SAstCreateContext* pCxt, SDatabaseOptions* pO
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_DAYS_PER_FILE
||
val
>
TSDB_MAX_DAYS_PER_FILE
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option daysPerFile: %
d
valid range: [%d, %d]"
,
val
,
TSDB_MIN_DAYS_PER_FILE
,
TSDB_MAX_DAYS_PER_FILE
);
"invalid db option daysPerFile: %
"
PRId64
"
valid range: [%d, %d]"
,
val
,
TSDB_MIN_DAYS_PER_FILE
,
TSDB_MAX_DAYS_PER_FILE
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -104,7 +104,7 @@ static SDatabaseOptions* setDbFsync(SAstCreateContext* pCxt, SDatabaseOptions* p
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_FSYNC_PERIOD
||
val
>
TSDB_MAX_FSYNC_PERIOD
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option fsyncPeriod: %
d
valid range: [%d, %d]"
,
val
,
TSDB_MIN_FSYNC_PERIOD
,
TSDB_MAX_FSYNC_PERIOD
);
"invalid db option fsyncPeriod: %
"
PRId64
"
valid range: [%d, %d]"
,
val
,
TSDB_MIN_FSYNC_PERIOD
,
TSDB_MAX_FSYNC_PERIOD
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -116,7 +116,7 @@ static SDatabaseOptions* setDbMaxRows(SAstCreateContext* pCxt, SDatabaseOptions*
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_MAX_ROW_FBLOCK
||
val
>
TSDB_MAX_MAX_ROW_FBLOCK
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option maxRowsPerBlock: %
d
valid range: [%d, %d]"
,
val
,
TSDB_MIN_MAX_ROW_FBLOCK
,
TSDB_MAX_MAX_ROW_FBLOCK
);
"invalid db option maxRowsPerBlock: %
"
PRId64
"
valid range: [%d, %d]"
,
val
,
TSDB_MIN_MAX_ROW_FBLOCK
,
TSDB_MAX_MAX_ROW_FBLOCK
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -128,7 +128,7 @@ static SDatabaseOptions* setDbMinRows(SAstCreateContext* pCxt, SDatabaseOptions*
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_MIN_ROW_FBLOCK
||
val
>
TSDB_MAX_MIN_ROW_FBLOCK
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option minRowsPerBlock: %
d
valid range: [%d, %d]"
,
val
,
TSDB_MIN_MIN_ROW_FBLOCK
,
TSDB_MAX_MIN_ROW_FBLOCK
);
"invalid db option minRowsPerBlock: %
"
PRId64
"
valid range: [%d, %d]"
,
val
,
TSDB_MIN_MIN_ROW_FBLOCK
,
TSDB_MAX_MIN_ROW_FBLOCK
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -140,7 +140,7 @@ static SDatabaseOptions* setDbKeep(SAstCreateContext* pCxt, SDatabaseOptions* pO
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_KEEP
||
val
>
TSDB_MAX_KEEP
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option keep: %
d
valid range: [%d, %d]"
,
val
,
TSDB_MIN_KEEP
,
TSDB_MAX_KEEP
);
"invalid db option keep: %
"
PRId64
"
valid range: [%d, %d]"
,
val
,
TSDB_MIN_KEEP
,
TSDB_MAX_KEEP
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -168,7 +168,7 @@ static SDatabaseOptions* setDbQuorum(SAstCreateContext* pCxt, SDatabaseOptions*
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_DB_QUORUM_OPTION
||
val
>
TSDB_MAX_DB_QUORUM_OPTION
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option quorum: %
d
valid range: [%d, %d]"
,
val
,
TSDB_MIN_DB_QUORUM_OPTION
,
TSDB_MAX_DB_QUORUM_OPTION
);
"invalid db option quorum: %
"
PRId64
"
valid range: [%d, %d]"
,
val
,
TSDB_MIN_DB_QUORUM_OPTION
,
TSDB_MAX_DB_QUORUM_OPTION
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -180,7 +180,7 @@ static SDatabaseOptions* setDbReplica(SAstCreateContext* pCxt, SDatabaseOptions*
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_DB_REPLICA_OPTION
||
val
>
TSDB_MAX_DB_REPLICA_OPTION
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option replications: %
d
valid range: [%d, %d]"
,
val
,
TSDB_MIN_DB_REPLICA_OPTION
,
TSDB_MAX_DB_REPLICA_OPTION
);
"invalid db option replications: %
"
PRId64
"
valid range: [%d, %d]"
,
val
,
TSDB_MIN_DB_REPLICA_OPTION
,
TSDB_MAX_DB_REPLICA_OPTION
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -192,7 +192,7 @@ static SDatabaseOptions* setDbTtl(SAstCreateContext* pCxt, SDatabaseOptions* pOp
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_DB_TTL_OPTION
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option ttl: %
d
, should be greater than or equal to %d"
,
val
,
TSDB_MIN_DB_TTL_OPTION
);
"invalid db option ttl: %
"
PRId64
"
, should be greater than or equal to %d"
,
val
,
TSDB_MIN_DB_TTL_OPTION
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -203,7 +203,7 @@ static SDatabaseOptions* setDbTtl(SAstCreateContext* pCxt, SDatabaseOptions* pOp
static
SDatabaseOptions
*
setDbWal
(
SAstCreateContext
*
pCxt
,
SDatabaseOptions
*
pOptions
,
const
SToken
*
pVal
)
{
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_WAL_LEVEL
||
val
>
TSDB_MAX_WAL_LEVEL
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option walLevel: %
d
, only 1-2 allowed"
,
val
);
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option walLevel: %
"
PRId64
"
, only 1-2 allowed"
,
val
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -215,7 +215,7 @@ static SDatabaseOptions* setDbVgroups(SAstCreateContext* pCxt, SDatabaseOptions*
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_VNODES_PER_DB
||
val
>
TSDB_MAX_VNODES_PER_DB
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option vgroups: %
d
valid range: [%d, %d]"
,
val
,
TSDB_MIN_VNODES_PER_DB
,
TSDB_MAX_VNODES_PER_DB
);
"invalid db option vgroups: %
"
PRId64
"
valid range: [%d, %d]"
,
val
,
TSDB_MIN_VNODES_PER_DB
,
TSDB_MAX_VNODES_PER_DB
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -226,7 +226,7 @@ static SDatabaseOptions* setDbVgroups(SAstCreateContext* pCxt, SDatabaseOptions*
static
SDatabaseOptions
*
setDbSingleStable
(
SAstCreateContext
*
pCxt
,
SDatabaseOptions
*
pOptions
,
const
SToken
*
pVal
)
{
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_DB_SINGLE_STABLE_OPTION
||
val
>
TSDB_MAX_DB_SINGLE_STABLE_OPTION
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option singleStable: %
d
, only 0-1 allowed"
,
val
);
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option singleStable: %
"
PRId64
"
, only 0-1 allowed"
,
val
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -237,7 +237,7 @@ static SDatabaseOptions* setDbSingleStable(SAstCreateContext* pCxt, SDatabaseOpt
static
SDatabaseOptions
*
setDbStreamMode
(
SAstCreateContext
*
pCxt
,
SDatabaseOptions
*
pOptions
,
const
SToken
*
pVal
)
{
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_DB_STREAM_MODE_OPTION
||
val
>
TSDB_MAX_DB_STREAM_MODE_OPTION
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option streamMode: %
d
, only 0-1 allowed"
,
val
);
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid db option streamMode: %
"
PRId64
"
, only 0-1 allowed"
,
val
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -269,7 +269,7 @@ static STableOptions* setTableKeep(SAstCreateContext* pCxt, STableOptions* pOpti
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_KEEP
||
val
>
TSDB_MAX_KEEP
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid table option keep: %
d
valid range: [%d, %d]"
,
val
,
TSDB_MIN_KEEP
,
TSDB_MAX_KEEP
);
"invalid table option keep: %
"
PRId64
"
valid range: [%d, %d]"
,
val
,
TSDB_MIN_KEEP
,
TSDB_MAX_KEEP
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -281,7 +281,7 @@ static STableOptions* setTableTtl(SAstCreateContext* pCxt, STableOptions* pOptio
int64_t
val
=
strtol
(
pVal
->
z
,
NULL
,
10
);
if
(
val
<
TSDB_MIN_DB_TTL_OPTION
)
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid table option ttl: %
d
, should be greater than or equal to %d"
,
val
,
TSDB_MIN_DB_TTL_OPTION
);
"invalid table option ttl: %
"
PRId64
"
, should be greater than or equal to %d"
,
val
,
TSDB_MIN_DB_TTL_OPTION
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
@@ -292,7 +292,7 @@ static STableOptions* setTableTtl(SAstCreateContext* pCxt, STableOptions* pOptio
static
STableOptions
*
setTableComment
(
SAstCreateContext
*
pCxt
,
STableOptions
*
pOptions
,
const
SToken
*
pVal
)
{
if
(
pVal
->
n
>=
sizeof
(
pOptions
->
comments
))
{
snprintf
(
pCxt
->
pQueryCxt
->
pMsg
,
pCxt
->
pQueryCxt
->
msgLen
,
"invalid table option comment, length cannot exceed %d"
,
sizeof
(
pOptions
->
comments
)
-
1
);
"invalid table option comment, length cannot exceed %d"
,
(
int32_t
)(
sizeof
(
pOptions
->
comments
)
-
1
)
);
pCxt
->
valid
=
false
;
return
pOptions
;
}
...
...
source/libs/scheduler/test/schedulerTests.cpp
浏览文件 @
ad56011f
...
...
@@ -535,7 +535,9 @@ TEST(queryTest, normalCase) {
char
*
tablename
=
"table1"
;
SVgroupInfo
vgInfo
=
{
0
};
int64_t
job
=
0
;
SQueryPlan
dag
=
{
0
};
SQueryPlan
dag
;
memset
(
&
dag
,
0
,
sizeof
(
dag
));
schtInitLogFile
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录