Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a3b0136e
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
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看板
提交
a3b0136e
编写于
5月 17, 2022
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
stmt query
上级
fff19722
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
34 addition
and
21 deletion
+34
-21
source/client/src/clientStmt.c
source/client/src/clientStmt.c
+8
-0
tests/script/api/batchprepare.c
tests/script/api/batchprepare.c
+26
-21
未找到文件。
source/client/src/clientStmt.c
浏览文件 @
a3b0136e
...
...
@@ -218,6 +218,13 @@ int32_t stmtParseSql(STscStmt* pStmt) {
pStmt
->
bInfo
.
needParse
=
false
;
if
(
pStmt
->
sql
.
pQuery
->
pRoot
&&
0
==
pStmt
->
sql
.
type
)
{
pStmt
->
sql
.
type
=
STMT_TYPE_INSERT
;
}
else
if
(
pStmt
->
sql
.
pQuery
->
pPrepareRoot
)
{
pStmt
->
sql
.
type
=
STMT_TYPE_QUERY
;
}
/*
switch (nodeType(pStmt->sql.pQuery->pRoot)) {
case QUERY_NODE_VNODE_MODIF_STMT:
if (0 == pStmt->sql.type) {
...
...
@@ -231,6 +238,7 @@ int32_t stmtParseSql(STscStmt* pStmt) {
tscError("not supported stmt type %d", nodeType(pStmt->sql.pQuery->pRoot));
STMT_ERR_RET(TSDB_CODE_TSC_STMT_CLAUSE_ERROR);
}
*/
return
TSDB_CODE_SUCCESS
;
}
...
...
tests/script/api/batchprepare.c
浏览文件 @
a3b0136e
...
...
@@ -170,11 +170,11 @@ CaseCfg gCase[] = {
// 22
{
"insert:AUTO1-FULL"
,
tListLen
(
fullColList
),
fullColList
,
TTYPE_INSERT
,
true
,
true
,
insertAUTOTest1
,
10
,
10
,
2
,
0
,
0
,
0
,
1
,
-
1
},
//
{"query:SUBT-COLUMN", tListLen(fullColList), fullColList, TTYPE_QUERY, false, false, queryColumnTest, 10, 10, 1, 3, 0, 0, 1, 2},
//
{"query:SUBT-MISC", tListLen(fullColList), fullColList, TTYPE_QUERY, false, false, queryMiscTest, 10, 10, 1, 3, 0, 0, 1, 2},
{
"query:SUBT-COLUMN"
,
tListLen
(
fullColList
),
fullColList
,
TTYPE_QUERY
,
false
,
false
,
queryColumnTest
,
10
,
10
,
1
,
3
,
0
,
0
,
1
,
2
},
{
"query:SUBT-MISC"
,
tListLen
(
fullColList
),
fullColList
,
TTYPE_QUERY
,
false
,
false
,
queryMiscTest
,
10
,
10
,
1
,
3
,
0
,
0
,
1
,
2
},
{
"query:SUBT-COLUMN"
,
tListLen
(
fullColList
),
fullColList
,
TTYPE_QUERY
,
false
,
false
,
queryColumnTest
,
1
,
10
,
1
,
1
,
0
,
0
,
1
,
2
},
{
"query:SUBT-MISC"
,
tListLen
(
fullColList
),
fullColList
,
TTYPE_QUERY
,
false
,
false
,
queryMiscTest
,
2
,
10
,
1
,
1
,
0
,
0
,
1
,
2
},
//
{"query:SUBT-COLUMN", tListLen(fullColList), fullColList, TTYPE_QUERY, false, false, queryColumnTest, 1, 10, 1, 1, 0, 0, 1, 2},
//
{"query:SUBT-MISC", tListLen(fullColList), fullColList, TTYPE_QUERY, false, false, queryMiscTest, 2, 10, 1, 1, 0, 0, 1, 2},
};
...
...
@@ -209,7 +209,7 @@ typedef struct {
int32_t
caseRunNum
;
// total run case num
}
CaseCtrl
;
#if
0
#if
1
CaseCtrl
gCaseCtrl
=
{
// default
.
bindNullNum
=
0
,
.
printCreateTblSql
=
false
,
...
...
@@ -267,7 +267,7 @@ CaseCtrl gCaseCtrl = {
};
#endif
#if
1
#if
0
CaseCtrl gCaseCtrl = { // query case with specified col&oper
.bindNullNum = 1,
.printCreateTblSql = false,
...
...
@@ -292,7 +292,7 @@ CaseCtrl gCaseCtrl = { // query case with specified col&oper
#if 0
CaseCtrl gCaseCtrl = { // query case with specified col&oper
.bindNullNum =
0
,
.bindNullNum =
1
,
.printCreateTblSql = true,
.printQuerySql = true,
.printStmtSql = true,
...
...
@@ -309,10 +309,10 @@ CaseCtrl gCaseCtrl = { // query case with specified col&oper
.printRes = true,
.runTimes = 0,
.caseRunIdx = -1,
.optrIdxListNum = tListLen(optrIdxList),
.optrIdxList = optrIdxList,
.bindColTypeNum = tListLen(bindColTypeList),
.bindColTypeList = bindColTypeList,
//
.optrIdxListNum = tListLen(optrIdxList),
//
.optrIdxList = optrIdxList,
//
.bindColTypeNum = tListLen(bindColTypeList),
//
.bindColTypeList = bindColTypeList,
.caseIdx = 24,
.caseNum = 1,
.caseRunNum = 1,
...
...
@@ -665,15 +665,16 @@ void bpGenerateConstInFuncSQL(BindData *data, int32_t tblIdx) {
void
generateQueryMiscSQL
(
BindData
*
data
,
int32_t
tblIdx
)
{
switch
(
tblIdx
)
{
case
0
:
//TODO FILL TEST
default:
bpGenerateConstInOpSQL
(
data
,
tblIdx
);
break
;
case
FUNCTION_TEST_IDX
:
bpGenerateConstInFuncSQL
(
data
,
tblIdx
);
break
;
if
(
tblIdx
==
FUNCTION_TEST_IDX
&&
gCurCase
->
bindNullNum
<=
0
)
{
bpGenerateConstInFuncSQL
(
data
,
tblIdx
);
}
else
{
switch
(
tblIdx
)
{
case
0
:
//TODO FILL TEST
default:
bpGenerateConstInOpSQL
(
data
,
tblIdx
);
break
;
}
}
if
(
gCaseCtrl
.
printStmtSql
)
{
...
...
@@ -1064,6 +1065,8 @@ int32_t prepareQueryMiscData(BindData *data, int32_t tblIdx) {
if
(
tblIdx
==
FUNCTION_TEST_IDX
)
{
gCaseCtrl
.
numericParam
=
true
;
}
else
{
gCaseCtrl
.
numericParam
=
false
;
}
for
(
int
b
=
0
;
b
<
bindNum
;
b
++
)
{
...
...
@@ -1072,8 +1075,10 @@ int32_t prepareQueryMiscData(BindData *data, int32_t tblIdx) {
}
}
gCaseCtrl
.
numericParam
=
false
;
generateQueryMiscSQL
(
data
,
tblIdx
);
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录