Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
98fb54bf
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
98fb54bf
编写于
7月 27, 2022
作者:
wmmhello
提交者:
GitHub
7月 27, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #15439 from taosdata/feature/TD-14761
feat:add tmq get data interface
上级
81a13a3b
e4655413
变更
18
展开全部
隐藏空白更改
内联
并排
Showing
18 changed file
with
537 addition
and
158 deletion
+537
-158
examples/c/tmq.c
examples/c/tmq.c
+2
-2
examples/c/tmq_taosx.c
examples/c/tmq_taosx.c
+69
-48
include/client/taos.h
include/client/taos.h
+9
-6
include/common/tcommon.h
include/common/tcommon.h
+1
-0
include/common/tmsg.h
include/common/tmsg.h
+1
-0
include/libs/executor/dataSinkMgt.h
include/libs/executor/dataSinkMgt.h
+1
-0
include/libs/nodes/plannodes.h
include/libs/nodes/plannodes.h
+1
-0
include/libs/qcom/query.h
include/libs/qcom/query.h
+2
-2
source/client/src/tmq.c
source/client/src/tmq.c
+411
-84
source/common/src/tmsg.c
source/common/src/tmsg.c
+3
-1
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+6
-5
source/dnode/vnode/src/vnd/vnodeSvr.c
source/dnode/vnode/src/vnd/vnodeSvr.c
+17
-1
source/libs/executor/src/dataDeleter.c
source/libs/executor/src/dataDeleter.c
+1
-0
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+3
-0
source/libs/qworker/src/qworker.c
source/libs/qworker/src/qworker.c
+1
-1
source/libs/scheduler/src/schRemote.c
source/libs/scheduler/src/schRemote.c
+1
-0
tests/system-test/fulltest.sh
tests/system-test/fulltest.sh
+6
-6
tests/test/c/tmqSim.c
tests/test/c/tmqSim.c
+2
-2
未找到文件。
examples/c/tmq.c
浏览文件 @
98fb54bf
...
...
@@ -29,7 +29,7 @@ static void msg_process(TAOS_RES* msg) {
printf
(
"vg: %d
\n
"
,
tmq_get_vgroup_id
(
msg
));
if
(
tmq_get_res_type
(
msg
)
==
TMQ_RES_TABLE_META
)
{
tmq_raw_data
raw
=
{
0
};
int32_t
code
=
tmq_get_raw
_meta
(
msg
,
&
raw
);
int32_t
code
=
tmq_get_raw
(
msg
,
&
raw
);
if
(
code
==
0
)
{
TAOS
*
pConn
=
taos_connect
(
"192.168.1.86"
,
"root"
,
"taosdata"
,
NULL
,
0
);
if
(
pConn
==
NULL
)
{
...
...
@@ -50,7 +50,7 @@ static void msg_process(TAOS_RES* msg) {
}
taos_free_result
(
pRes
);
int32_t
ret
=
t
aos_write_raw_meta
(
pConn
,
raw
);
int32_t
ret
=
t
mq_write_raw
(
pConn
,
raw
);
printf
(
"write raw data: %s
\n
"
,
tmq_err2str
(
ret
));
taos_close
(
pConn
);
}
...
...
examples/c/tmq_taosx.c
浏览文件 @
98fb54bf
...
...
@@ -49,18 +49,25 @@ static void msg_process(TAOS_RES* msg) {
printf
(
"meta result: %s
\n
"
,
result
);
}
tmq_free_json_meta
(
result
);
tmq_raw_data
raw
=
{
0
};
tmq_get_raw_meta
(
msg
,
&
raw
);
int32_t
ret
=
taos_write_raw_meta
(
pConn
,
raw
);
printf
(
"write raw meta: %s
\n
"
,
tmq_err2str
(
ret
));
}
if
(
tmq_get_res_type
(
msg
)
==
TMQ_RES_DATA
){
int32_t
ret
=
taos_write_raw_data
(
pConn
,
msg
);
printf
(
"write raw data: %s
\n
"
,
tmq_err2str
(
ret
));
}
tmq_raw_data
raw
=
{
0
};
tmq_get_raw
(
msg
,
&
raw
);
int32_t
ret
=
tmq_write_raw
(
pConn
,
raw
);
printf
(
"write raw data: %s
\n
"
,
tmq_err2str
(
ret
));
// else{
// while(1){
// int numOfRows = 0;
// void *pData = NULL;
// taos_fetch_raw_block(msg, &numOfRows, &pData);
// if(numOfRows == 0) break;
// printf("write data: tbname:%s, numOfRows:%d\n", tmq_get_table_name(msg), numOfRows);
// int ret = taos_write_raw_block(pConn, numOfRows, pData, tmq_get_table_name(msg));
// printf("write raw data: %s\n", tmq_err2str(ret));
// }
// }
taos_close
(
pConn
);
}
...
...
@@ -121,7 +128,7 @@ int32_t init_env() {
}
taos_free_result
(
pRes
);
pRes
=
taos_query
(
pConn
,
"insert into ct0 values(
now
, 1, 2, 'a')"
);
pRes
=
taos_query
(
pConn
,
"insert into ct0 values(
1626006833600
, 1, 2, 'a')"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to insert into ct0, reason:%s
\n
"
,
taos_errstr
(
pRes
));
return
-
1
;
...
...
@@ -142,7 +149,7 @@ int32_t init_env() {
}
taos_free_result
(
pRes
);
pRes
=
taos_query
(
pConn
,
"insert into ct1 values(
now
, 3, 4, 'b')"
);
pRes
=
taos_query
(
pConn
,
"insert into ct1 values(
1626006833600
, 3, 4, 'b')"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to insert into ct1, reason:%s
\n
"
,
taos_errstr
(
pRes
));
return
-
1
;
...
...
@@ -156,7 +163,7 @@ int32_t init_env() {
}
taos_free_result
(
pRes
);
pRes
=
taos_query
(
pConn
,
"insert into ct3 values(
now, 5, 6, 'c') ct1 values(now+1s, 2, 3, 'sds') (now+2s, 4, 5, 'ddd') ct0 values(now+1s
, 4, 3, 'hwj') ct1 values(now+5s, 23, 32, 's21ds')"
);
pRes
=
taos_query
(
pConn
,
"insert into ct3 values(
1626006833600, 5, 6, 'c') ct1 values(1626006833601, 2, 3, 'sds') (1626006833602, 4, 5, 'ddd') ct0 values(1626006833602
, 4, 3, 'hwj') ct1 values(now+5s, 23, 32, 's21ds')"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to insert into ct3, reason:%s
\n
"
,
taos_errstr
(
pRes
));
return
-
1
;
...
...
@@ -177,7 +184,14 @@ int32_t init_env() {
}
taos_free_result
(
pRes
);
pRes
=
taos_query
(
pConn
,
"insert into ct3 values(now+7s, 53, 63, 'cffffffffffffffffffffffffffff', 8989898899999) (now+9s, 51, 62, 'c333', 940)"
);
pRes
=
taos_query
(
pConn
,
"insert into ct3 values(1626006833605, 53, 63, 'cffffffffffffffffffffffffffff', 8989898899999) (1626006833609, 51, 62, 'c333', 940)"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to insert into ct3, reason:%s
\n
"
,
taos_errstr
(
pRes
));
return
-
1
;
}
taos_free_result
(
pRes
);
pRes
=
taos_query
(
pConn
,
"insert into ct3 select * from ct1"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to insert into ct3, reason:%s
\n
"
,
taos_errstr
(
pRes
));
return
-
1
;
...
...
@@ -198,19 +212,26 @@ int32_t init_env() {
}
taos_free_result
(
pRes
);
// pRes = taos_query(pConn, "drop table ct3 ct1");
// if (taos_errno(pRes) != 0) {
// printf("failed to drop child table ct3, reason:%s\n", taos_errstr(pRes));
// return -1;
// }
// taos_free_result(pRes);
//
// pRes = taos_query(pConn, "drop table st1");
// if (taos_errno(pRes) != 0) {
// printf("failed to drop super table st1, reason:%s\n", taos_errstr(pRes));
// return -1;
// }
// taos_free_result(pRes);
pRes
=
taos_query
(
pConn
,
"delete from abc1 .ct3 where ts < 1626006833606"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to insert into ct3, reason:%s
\n
"
,
taos_errstr
(
pRes
));
return
-
1
;
}
taos_free_result
(
pRes
);
pRes
=
taos_query
(
pConn
,
"drop table ct3 ct1"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to drop child table ct3, reason:%s
\n
"
,
taos_errstr
(
pRes
));
return
-
1
;
}
taos_free_result
(
pRes
);
pRes
=
taos_query
(
pConn
,
"drop table st1"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to drop super table st1, reason:%s
\n
"
,
taos_errstr
(
pRes
));
return
-
1
;
}
taos_free_result
(
pRes
);
pRes
=
taos_query
(
pConn
,
"create table if not exists n1(ts timestamp, c1 int, c2 nchar(4))"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
...
...
@@ -261,12 +282,12 @@ int32_t init_env() {
}
taos_free_result
(
pRes
);
//
pRes = taos_query(pConn, "drop table n1");
//
if (taos_errno(pRes) != 0) {
//
printf("failed to drop normal table n1, reason:%s\n", taos_errstr(pRes));
//
return -1;
//
}
//
taos_free_result(pRes);
pRes
=
taos_query
(
pConn
,
"drop table n1"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to drop normal table n1, reason:%s
\n
"
,
taos_errstr
(
pRes
));
return
-
1
;
}
taos_free_result
(
pRes
);
pRes
=
taos_query
(
pConn
,
"create table jt(ts timestamp, i int) tags(t json)"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
...
...
@@ -289,21 +310,21 @@ int32_t init_env() {
}
taos_free_result
(
pRes
);
//
pRes = taos_query(pConn,
//
"create stable if not exists st1 (ts timestamp, c1 int, c2 float, c3 binary(16)) tags(t1 int, t3 "
//
"nchar(8), t4 bool)");
//
if (taos_errno(pRes) != 0) {
//
printf("failed to create super table st1, reason:%s\n", taos_errstr(pRes));
//
return -1;
//
}
//
taos_free_result(pRes);
//
//
pRes = taos_query(pConn, "drop table st1");
//
if (taos_errno(pRes) != 0) {
//
printf("failed to drop super table st1, reason:%s\n", taos_errstr(pRes));
//
return -1;
//
}
//
taos_free_result(pRes);
pRes
=
taos_query
(
pConn
,
"create stable if not exists st1 (ts timestamp, c1 int, c2 float, c3 binary(16)) tags(t1 int, t3 "
"nchar(8), t4 bool)"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to create super table st1, reason:%s
\n
"
,
taos_errstr
(
pRes
));
return
-
1
;
}
taos_free_result
(
pRes
);
pRes
=
taos_query
(
pConn
,
"drop table st1"
);
if
(
taos_errno
(
pRes
)
!=
0
)
{
printf
(
"failed to drop super table st1, reason:%s
\n
"
,
taos_errstr
(
pRes
));
return
-
1
;
}
taos_free_result
(
pRes
);
taos_close
(
pConn
);
return
0
;
...
...
include/client/taos.h
浏览文件 @
98fb54bf
...
...
@@ -260,17 +260,20 @@ enum tmq_res_t {
};
typedef
struct
tmq_raw_data
{
void
*
raw
_meta
;
uint32_t
raw_
meta_
len
;
uint16_t
raw_
meta_
type
;
void
*
raw
;
uint32_t
raw_len
;
uint16_t
raw_type
;
}
tmq_raw_data
;
typedef
enum
tmq_res_t
tmq_res_t
;
DLL_EXPORT
tmq_res_t
tmq_get_res_type
(
TAOS_RES
*
res
);
DLL_EXPORT
int32_t
tmq_get_raw_meta
(
TAOS_RES
*
res
,
tmq_raw_data
*
raw_meta
);
DLL_EXPORT
int32_t
taos_write_raw_meta
(
TAOS
*
taos
,
tmq_raw_data
raw_meta
);
DLL_EXPORT
int32_t
taos_write_raw_data
(
TAOS
*
taos
,
TAOS_RES
*
res
);
DLL_EXPORT
int32_t
tmq_get_raw
(
TAOS_RES
*
res
,
tmq_raw_data
*
raw
);
DLL_EXPORT
int32_t
tmq_write_raw
(
TAOS
*
taos
,
tmq_raw_data
raw
);
DLL_EXPORT
int
taos_write_raw_block
(
TAOS
*
taos
,
int
numOfRows
,
char
*
pData
,
const
char
*
tbname
);
DLL_EXPORT
void
tmq_free_raw
(
tmq_raw_data
raw
);
DLL_EXPORT
char
*
tmq_get_json_meta
(
TAOS_RES
*
res
);
// Returning null means error. Returned result need to be freed by tmq_free_json_meta
DLL_EXPORT
void
tmq_free_json_meta
(
char
*
jsonMeta
);
DLL_EXPORT
const
char
*
tmq_get_topic_name
(
TAOS_RES
*
res
);
...
...
include/common/tcommon.h
浏览文件 @
98fb54bf
...
...
@@ -40,6 +40,7 @@ enum {
|| x == TDMT_VND_CREATE_TABLE \
|| x == TDMT_VND_ALTER_TABLE \
|| x == TDMT_VND_DROP_TABLE \
|| x == TDMT_VND_DELETE \
)
// clang-format on
...
...
include/common/tmsg.h
浏览文件 @
98fb54bf
...
...
@@ -3044,6 +3044,7 @@ typedef struct SDeleteRes {
int64_t
skey
;
int64_t
ekey
;
int64_t
affectedRows
;
char
tableFName
[
TSDB_TABLE_FNAME_LEN
];
}
SDeleteRes
;
int32_t
tEncodeDeleteRes
(
SEncoder
*
pCoder
,
const
SDeleteRes
*
pRes
);
...
...
include/libs/executor/dataSinkMgt.h
浏览文件 @
98fb54bf
...
...
@@ -38,6 +38,7 @@ typedef struct SDeleterRes {
int64_t
skey
;
int64_t
ekey
;
int64_t
affectedRows
;
char
tableFName
[
TSDB_TABLE_FNAME_LEN
];
}
SDeleterRes
;
typedef
struct
SDeleterParam
{
...
...
include/libs/nodes/plannodes.h
浏览文件 @
98fb54bf
...
...
@@ -503,6 +503,7 @@ typedef struct SDataDeleterNode {
uint64_t
tableId
;
int8_t
tableType
;
// table type
char
tableFName
[
TSDB_TABLE_FNAME_LEN
];
char
tsColName
[
TSDB_COL_NAME_LEN
];
STimeWindow
deleteTimeRange
;
SNode
*
pAffectedRows
;
}
SDataDeleterNode
;
...
...
include/libs/qcom/query.h
浏览文件 @
98fb54bf
...
...
@@ -251,8 +251,8 @@ extern int32_t (*queryProcessMsgRsp[TDMT_MAX])(void* output, char* msg, int32_t
(_code) == TSDB_CODE_APP_NOT_READY || (_code) == TSDB_CODE_RPC_BROKEN_LINK)
#define NEED_CLIENT_RM_TBLMETA_REQ(_type) \
((_type) == TDMT_VND_CREATE_TABLE || (_type) == TDMT_
V
ND_CREATE_STB || (_type) == TDMT_VND_DROP_TABLE || \
(_type) == TDMT_
V
ND_DROP_STB)
((_type) == TDMT_VND_CREATE_TABLE || (_type) == TDMT_
M
ND_CREATE_STB || (_type) == TDMT_VND_DROP_TABLE || \
(_type) == TDMT_
M
ND_DROP_STB)
#define NEED_SCHEDULER_REDIRECT_ERROR(_code) \
((_code) == TSDB_CODE_RPC_REDIRECT || (_code) == TSDB_CODE_NODE_NOT_DEPLOYED || \
...
...
source/client/src/tmq.c
浏览文件 @
98fb54bf
此差异已折叠。
点击以展开。
source/common/src/tmsg.c
浏览文件 @
98fb54bf
...
...
@@ -5681,6 +5681,7 @@ int32_t tEncodeDeleteRes(SEncoder *pCoder, const SDeleteRes *pRes) {
if
(
tEncodeI64
(
pCoder
,
pRes
->
ekey
)
<
0
)
return
-
1
;
if
(
tEncodeI64v
(
pCoder
,
pRes
->
affectedRows
)
<
0
)
return
-
1
;
if
(
tEncodeCStr
(
pCoder
,
pRes
->
tableFName
)
<
0
)
return
-
1
;
return
0
;
}
...
...
@@ -5692,12 +5693,13 @@ int32_t tDecodeDeleteRes(SDecoder *pCoder, SDeleteRes *pRes) {
if
(
tDecodeI32v
(
pCoder
,
&
nUid
)
<
0
)
return
-
1
;
for
(
int32_t
iUid
=
0
;
iUid
<
nUid
;
iUid
++
)
{
if
(
tDecodeU64
(
pCoder
,
&
uid
)
<
0
)
return
-
1
;
taosArrayPush
(
pRes
->
uidList
,
&
uid
);
if
(
pRes
->
uidList
)
taosArrayPush
(
pRes
->
uidList
,
&
uid
);
}
if
(
tDecodeI64
(
pCoder
,
&
pRes
->
skey
)
<
0
)
return
-
1
;
if
(
tDecodeI64
(
pCoder
,
&
pRes
->
ekey
)
<
0
)
return
-
1
;
if
(
tDecodeI64v
(
pCoder
,
&
pRes
->
affectedRows
)
<
0
)
return
-
1
;
if
(
tDecodeCStrTo
(
pCoder
,
pRes
->
tableFName
)
<
0
)
return
-
1
;
return
0
;
}
int32_t
tEncodeSMqDataRsp
(
SEncoder
*
pEncoder
,
const
SMqDataRsp
*
pRsp
)
{
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
98fb54bf
...
...
@@ -146,8 +146,8 @@ int32_t tqSendDataRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, con
}
}
int32_t
len
;
int32_t
code
;
int32_t
len
=
0
;
int32_t
code
=
0
;
tEncodeSize
(
tEncodeSMqDataRsp
,
pRsp
,
len
,
code
);
if
(
code
<
0
)
{
return
-
1
;
...
...
@@ -164,9 +164,10 @@ int32_t tqSendDataRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, con
void
*
abuf
=
POINTER_SHIFT
(
buf
,
sizeof
(
SMqRspHead
));
SEncoder
encoder
;
SEncoder
encoder
=
{
0
}
;
tEncoderInit
(
&
encoder
,
abuf
,
len
);
tEncodeSMqDataRsp
(
&
encoder
,
pRsp
);
tEncoderClear
(
&
encoder
);
SRpcMsg
rsp
=
{
.
info
=
pMsg
->
info
,
...
...
@@ -176,8 +177,8 @@ int32_t tqSendDataRsp(STQ* pTq, const SRpcMsg* pMsg, const SMqPollReq* pReq, con
};
tmsgSendRsp
(
&
rsp
);
char
buf1
[
80
];
char
buf2
[
80
];
char
buf1
[
80
]
=
{
0
}
;
char
buf2
[
80
]
=
{
0
}
;
tFormatOffset
(
buf1
,
80
,
&
pRsp
->
reqOffset
);
tFormatOffset
(
buf2
,
80
,
&
pRsp
->
rspOffset
);
tqDebug
(
"vgId:%d from consumer:%"
PRId64
", (epoch %d) send rsp, block num: %d, reqOffset:%s, rspOffset:%s"
,
...
...
source/dnode/vnode/src/vnd/vnodeSvr.c
浏览文件 @
98fb54bf
...
...
@@ -106,7 +106,9 @@ int32_t vnodePreProcessWriteMsg(SVnode *pVnode, SRpcMsg *pMsg) {
.
meta
=
pVnode
->
pMeta
,
.
config
=
&
pVnode
->
config
,
.
vnode
=
pVnode
,
.
pMsgCb
=
&
pVnode
->
msgCb
};
code
=
qWorkerProcessDeleteMsg
(
&
handle
,
pVnode
->
pQuery
,
pMsg
,
&
res
);
if
(
code
)
goto
_err
;
if
(
code
)
{
goto
_err
;
}
// malloc and encode
tEncodeSize
(
tEncodeDeleteRes
,
&
res
,
size
,
ret
);
...
...
@@ -993,6 +995,11 @@ static int32_t vnodeProcessDeleteReq(SVnode *pVnode, int64_t version, void *pReq
SDecoder
*
pCoder
=
&
(
SDecoder
){
0
};
SDeleteRes
*
pRes
=
&
(
SDeleteRes
){
0
};
pRsp
->
msgType
=
TDMT_VND_DELETE_RSP
;
pRsp
->
pCont
=
NULL
;
pRsp
->
contLen
=
0
;
pRsp
->
code
=
TSDB_CODE_SUCCESS
;
pRes
->
uidList
=
taosArrayInit
(
0
,
sizeof
(
tb_uid_t
));
if
(
pRes
->
uidList
==
NULL
)
{
code
=
TSDB_CODE_OUT_OF_MEMORY
;
...
...
@@ -1010,6 +1017,15 @@ static int32_t vnodeProcessDeleteReq(SVnode *pVnode, int64_t version, void *pReq
tDecoderClear
(
pCoder
);
taosArrayDestroy
(
pRes
->
uidList
);
SVDeleteRsp
rsp
=
{.
affectedRows
=
pRes
->
affectedRows
};
int32_t
ret
=
0
;
tEncodeSize
(
tEncodeSVDeleteRsp
,
&
rsp
,
pRsp
->
contLen
,
ret
);
pRsp
->
pCont
=
rpcMallocCont
(
pRsp
->
contLen
);
SEncoder
ec
=
{
0
};
tEncoderInit
(
&
ec
,
pRsp
->
pCont
,
pRsp
->
contLen
);
tEncodeSVDeleteRsp
(
&
ec
,
&
rsp
);
tEncoderClear
(
&
ec
);
return
code
;
_err:
...
...
source/libs/executor/src/dataDeleter.c
浏览文件 @
98fb54bf
...
...
@@ -90,6 +90,7 @@ static void toDataCacheEntry(SDataDeleterHandle* pHandle, const SInputData* pInp
pRes
->
uidList
=
pHandle
->
pParam
->
pUidList
;
pRes
->
skey
=
pHandle
->
pDeleter
->
deleteTimeRange
.
skey
;
pRes
->
ekey
=
pHandle
->
pDeleter
->
deleteTimeRange
.
ekey
;
strcpy
(
pRes
->
tableFName
,
pHandle
->
pDeleter
->
tableFName
);
pRes
->
affectedRows
=
*
(
int64_t
*
)
pColRes
->
pData
;
pBuf
->
useSize
+=
pEntry
->
dataLen
;
...
...
source/libs/executor/src/executor.c
浏览文件 @
98fb54bf
...
...
@@ -347,6 +347,9 @@ int32_t qCreateExecTask(SReadHandle* readHandle, int32_t vgId, uint64_t taskId,
}
code
=
dsCreateDataSinker
(
pSubplan
->
pDataSink
,
handle
,
pSinkParam
);
if
(
code
!=
TSDB_CODE_SUCCESS
){
taosMemoryFreeClear
(
pSinkParam
);
}
}
_error:
...
...
source/libs/qworker/src/qworker.c
浏览文件 @
98fb54bf
...
...
@@ -283,7 +283,7 @@ int32_t qwGetDeleteResFromSink(QW_FPARAMS_DEF, SQWTaskCtx *ctx, SDeleteRes *pRes
pRes
->
skey
=
pDelRes
->
skey
;
pRes
->
ekey
=
pDelRes
->
ekey
;
pRes
->
affectedRows
=
pDelRes
->
affectedRows
;
strcpy
(
pRes
->
tableFName
,
pDelRes
->
tableFName
);
taosMemoryFree
(
output
.
pData
);
return
TSDB_CODE_SUCCESS
;
...
...
source/libs/scheduler/src/schRemote.c
浏览文件 @
98fb54bf
...
...
@@ -230,6 +230,7 @@ int32_t schHandleResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SDa
SVDeleteRsp
rsp
=
{
0
};
tDecoderInit
(
&
coder
,
msg
,
msgSize
);
tDecodeSVDeleteRsp
(
&
coder
,
&
rsp
);
tDecoderClear
(
&
coder
);
atomic_add_fetch_32
(
&
pJob
->
resNumOfRows
,
rsp
.
affectedRows
);
SCH_TASK_DLOG
(
"delete succeed, affectedRows:%"
PRId64
,
rsp
.
affectedRows
);
...
...
tests/system-test/fulltest.sh
浏览文件 @
98fb54bf
...
...
@@ -59,8 +59,8 @@ python3 ./test.py -f 2-query/ceil.py
python3 ./test.py
-f
2-query/ceil.py
-R
python3 ./test.py
-f
2-query/char_length.py
python3 ./test.py
-f
2-query/char_length.py
-R
python3 ./test.py
-f
2-query/check_tsdb.py
python3 ./test.py
-f
2-query/check_tsdb.py
-R
#
python3 ./test.py -f 2-query/check_tsdb.py
#
python3 ./test.py -f 2-query/check_tsdb.py -R
python3 ./test.py
-f
1-insert/update_data.py
...
...
@@ -209,8 +209,8 @@ python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py
python3 ./test.py
-f
7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py
python3 ./test.py
-f
7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py
python3 ./test.py
-f
7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py
python3 ./test.py
-f
7-tmq/tmqAutoCreateTbl.py
python3 ./test.py
-f
7-tmq/tmqDnodeRestart.py
#
python3 ./test.py -f 7-tmq/tmqAutoCreateTbl.py
#
python3 ./test.py -f 7-tmq/tmqDnodeRestart.py
python3 ./test.py
-f
7-tmq/tmqUpdate-1ctb.py
python3 ./test.py
-f
7-tmq/tmqUpdateWithConsume.py
python3 ./test.py
-f
7-tmq/tmqUpdate-multiCtb-snapshot0.py
...
...
@@ -250,7 +250,7 @@ python3 ./test.py -f 2-query/concat.py -Q 2
python3 ./test.py
-f
2-query/concat2.py
-Q
2
python3 ./test.py
-f
2-query/concat_ws.py
-Q
2
python3 ./test.py
-f
2-query/concat_ws2.py
-Q
2
python3 ./test.py
-f
2-query/check_tsdb.py
-Q
2
#
python3 ./test.py -f 2-query/check_tsdb.py -Q 2
python3 ./test.py
-f
2-query/spread.py
-Q
2
python3 ./test.py
-f
2-query/hyperloglog.py
-Q
2
python3 ./test.py
-f
2-query/explain.py
-Q
2
...
...
@@ -340,7 +340,7 @@ python3 ./test.py -f 2-query/concat.py -Q 3
python3 ./test.py
-f
2-query/concat2.py
-Q
3
python3 ./test.py
-f
2-query/concat_ws.py
-Q
3
python3 ./test.py
-f
2-query/concat_ws2.py
-Q
3
python3 ./test.py
-f
2-query/check_tsdb.py
-Q
3
#
python3 ./test.py -f 2-query/check_tsdb.py -Q 3
python3 ./test.py
-f
2-query/spread.py
-Q
3
python3 ./test.py
-f
2-query/hyperloglog.py
-Q
3
python3 ./test.py
-f
2-query/explain.py
-Q
3
...
...
tests/test/c/tmqSim.c
浏览文件 @
98fb54bf
...
...
@@ -630,7 +630,7 @@ static int32_t meta_msg_process(TAOS_RES* msg, SThreadInfo* pInfo, int32_t msgIn
{
tmq_raw_data
raw
=
{
0
};
int32_t
code
=
tmq_get_raw
_meta
(
msg
,
&
raw
);
int32_t
code
=
tmq_get_raw
(
msg
,
&
raw
);
if
(
code
==
TSDB_CODE_SUCCESS
){
int
retCode
=
queryDB
(
pInfo
->
taos
,
"use metadb"
);
...
...
@@ -641,7 +641,7 @@ static int32_t meta_msg_process(TAOS_RES* msg, SThreadInfo* pInfo, int32_t msgIn
}
taosFprintfFile
(
g_fp
,
"raw:%p
\n
"
,
&
raw
);
t
aos_write_raw_meta
(
pInfo
->
taos
,
raw
);
t
mq_write_raw
(
pInfo
->
taos
,
raw
);
}
char
*
result
=
tmq_get_json_meta
(
msg
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录