Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
17040610
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
17040610
编写于
10月 13, 2022
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more code format
上级
5b6e928d
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
566 addition
and
238 deletion
+566
-238
source/client/inc/clientLog.h
source/client/inc/clientLog.h
+46
-8
source/client/inc/clientStmt.h
source/client/inc/clientStmt.h
+70
-50
source/client/src/clientStmt.c
source/client/src/clientStmt.c
+7
-6
source/client/src/clientTmqConnector.c
source/client/src/clientTmqConnector.c
+3
-2
source/client/test/clientTests.cpp
source/client/test/clientTests.cpp
+35
-36
source/client/test/smlTest.cpp
source/client/test/smlTest.cpp
+400
-133
tools/scripts/codeFormat.py
tools/scripts/codeFormat.py
+0
-0
tools/scripts/codeFormat.sh
tools/scripts/codeFormat.sh
+5
-3
未找到文件。
source/client/inc/clientLog.h
浏览文件 @
17040610
...
...
@@ -22,14 +22,52 @@ extern "C" {
#include "tlog.h"
#define tscFatal(...) do { if (cDebugFlag & DEBUG_FATAL) { taosPrintLog("TSC FATAL ", DEBUG_FATAL, cDebugFlag, __VA_ARGS__); }} while(0)
#define tscError(...) do { if (cDebugFlag & DEBUG_ERROR) { taosPrintLog("TSC ERROR ", DEBUG_ERROR, cDebugFlag, __VA_ARGS__); }} while(0)
#define tscWarn(...) do { if (cDebugFlag & DEBUG_WARN) { taosPrintLog("TSC WARN ", DEBUG_WARN, cDebugFlag, __VA_ARGS__); }} while(0)
#define tscInfo(...) do { if (cDebugFlag & DEBUG_INFO) { taosPrintLog("TSC ", DEBUG_INFO, cDebugFlag, __VA_ARGS__); }} while(0)
#define tscDebug(...) do { if (cDebugFlag & DEBUG_DEBUG) { taosPrintLog("TSC ", DEBUG_DEBUG, cDebugFlag, __VA_ARGS__); }} while(0)
#define tscTrace(...) do { if (cDebugFlag & DEBUG_TRACE) { taosPrintLog("TSC ", DEBUG_TRACE, cDebugFlag, __VA_ARGS__); }} while(0)
#define tscDebugL(...) do { if (cDebugFlag & DEBUG_DEBUG) { taosPrintLongString("TSC ", DEBUG_DEBUG, cDebugFlag, __VA_ARGS__); }} while(0)
#define tscPerf(...) do { taosPrintLog("TSC ", 0, cDebugFlag, __VA_ARGS__); } while(0)
#define tscFatal(...) \
do { \
if (cDebugFlag & DEBUG_FATAL) { \
taosPrintLog("TSC FATAL ", DEBUG_FATAL, cDebugFlag, __VA_ARGS__); \
} \
} while (0)
#define tscError(...) \
do { \
if (cDebugFlag & DEBUG_ERROR) { \
taosPrintLog("TSC ERROR ", DEBUG_ERROR, cDebugFlag, __VA_ARGS__); \
} \
} while (0)
#define tscWarn(...) \
do { \
if (cDebugFlag & DEBUG_WARN) { \
taosPrintLog("TSC WARN ", DEBUG_WARN, cDebugFlag, __VA_ARGS__); \
} \
} while (0)
#define tscInfo(...) \
do { \
if (cDebugFlag & DEBUG_INFO) { \
taosPrintLog("TSC ", DEBUG_INFO, cDebugFlag, __VA_ARGS__); \
} \
} while (0)
#define tscDebug(...) \
do { \
if (cDebugFlag & DEBUG_DEBUG) { \
taosPrintLog("TSC ", DEBUG_DEBUG, cDebugFlag, __VA_ARGS__); \
} \
} while (0)
#define tscTrace(...) \
do { \
if (cDebugFlag & DEBUG_TRACE) { \
taosPrintLog("TSC ", DEBUG_TRACE, cDebugFlag, __VA_ARGS__); \
} \
} while (0)
#define tscDebugL(...) \
do { \
if (cDebugFlag & DEBUG_DEBUG) { \
taosPrintLongString("TSC ", DEBUG_DEBUG, cDebugFlag, __VA_ARGS__); \
} \
} while (0)
#define tscPerf(...) \
do { \
taosPrintLog("TSC ", 0, cDebugFlag, __VA_ARGS__); \
} while (0)
#ifdef __cplusplus
}
...
...
source/client/inc/clientStmt.h
浏览文件 @
17040610
...
...
@@ -42,37 +42,37 @@ typedef enum {
}
STMT_STATUS
;
typedef
struct
SStmtTableCache
{
STableDataBlocks
*
pDataBlock
;
void
*
boundTags
;
STableDataBlocks
*
pDataBlock
;
void
*
boundTags
;
}
SStmtTableCache
;
typedef
struct
SStmtQueryResInfo
{
TAOS_FIELD
*
fields
;
TAOS_FIELD
*
userFields
;
uint32_t
numOfCols
;
int32_t
precision
;
TAOS_FIELD
*
fields
;
TAOS_FIELD
*
userFields
;
uint32_t
numOfCols
;
int32_t
precision
;
}
SStmtQueryResInfo
;
typedef
struct
SStmtBindInfo
{
bool
needParse
;
bool
inExecCache
;
uint64_t
tbUid
;
uint64_t
tbSuid
;
int32_t
sBindRowNum
;
int32_t
sBindLastIdx
;
int8_t
tbType
;
bool
tagsCached
;
void
*
boundTags
;
char
tbName
[
TSDB_TABLE_FNAME_LEN
];
char
tbFName
[
TSDB_TABLE_FNAME_LEN
];
char
stbFName
[
TSDB_TABLE_FNAME_LEN
];
SName
sname
;
bool
needParse
;
bool
inExecCache
;
uint64_t
tbUid
;
uint64_t
tbSuid
;
int32_t
sBindRowNum
;
int32_t
sBindLastIdx
;
int8_t
tbType
;
bool
tagsCached
;
void
*
boundTags
;
char
tbName
[
TSDB_TABLE_FNAME_LEN
];
char
tbFName
[
TSDB_TABLE_FNAME_LEN
];
char
stbFName
[
TSDB_TABLE_FNAME_LEN
];
SName
sname
;
}
SStmtBindInfo
;
typedef
struct
SStmtExecInfo
{
int32_t
affectedRows
;
SRequestObj
*
pRequest
;
SHashObj
*
pBlockHash
;
SRequestObj
*
pRequest
;
SHashObj
*
pBlockHash
;
bool
autoCreateTbl
;
}
SStmtExecInfo
;
...
...
@@ -80,20 +80,20 @@ typedef struct SStmtSQLInfo {
STMT_TYPE
type
;
STMT_STATUS
status
;
uint64_t
runTimes
;
SHashObj
*
pTableCache
;
//
SHash<SStmtTableCache>
SQuery
*
pQuery
;
char
*
sqlStr
;
SHashObj
*
pTableCache
;
//
SHash<SStmtTableCache>
SQuery
*
pQuery
;
char
*
sqlStr
;
int32_t
sqlLen
;
SArray
*
nodeList
;
SArray
*
nodeList
;
SStmtQueryResInfo
queryRes
;
bool
autoCreateTbl
;
SHashObj
*
pVgHash
;
SHashObj
*
pVgHash
;
}
SStmtSQLInfo
;
typedef
struct
STscStmt
{
STscObj
*
taos
;
SCatalog
*
pCatalog
;
int32_t
affectedRows
;
STscObj
*
taos
;
SCatalog
*
pCatalog
;
int32_t
affectedRows
;
SStmtSQLInfo
sql
;
SStmtExecInfo
exec
;
...
...
@@ -103,28 +103,48 @@ typedef struct STscStmt {
#define STMT_STATUS_NE(S) (pStmt->sql.status != STMT_##S)
#define STMT_STATUS_EQ(S) (pStmt->sql.status == STMT_##S)
#define STMT_ERR_RET(c) do { int32_t _code = c; if (_code != TSDB_CODE_SUCCESS) { terrno = _code; return _code; } } while (0)
#define STMT_RET(c) do { int32_t _code = c; if (_code != TSDB_CODE_SUCCESS) { terrno = _code; } return _code; } while (0)
#define STMT_ERR_JRET(c) do { code = c; if (code != TSDB_CODE_SUCCESS) { terrno = code; goto _return; } } while (0)
TAOS_STMT
*
stmtInit
(
STscObj
*
taos
);
int
stmtClose
(
TAOS_STMT
*
stmt
);
int
stmtExec
(
TAOS_STMT
*
stmt
);
#define STMT_ERR_RET(c) \
do { \
int32_t _code = c; \
if (_code != TSDB_CODE_SUCCESS) { \
terrno = _code; \
return _code; \
} \
} while (0)
#define STMT_RET(c) \
do { \
int32_t _code = c; \
if (_code != TSDB_CODE_SUCCESS) { \
terrno = _code; \
} \
return _code; \
} while (0)
#define STMT_ERR_JRET(c) \
do { \
code = c; \
if (code != TSDB_CODE_SUCCESS) { \
terrno = code; \
goto _return; \
} \
} while (0)
TAOS_STMT
*
stmtInit
(
STscObj
*
taos
);
int
stmtClose
(
TAOS_STMT
*
stmt
);
int
stmtExec
(
TAOS_STMT
*
stmt
);
const
char
*
stmtErrstr
(
TAOS_STMT
*
stmt
);
int
stmtAffectedRows
(
TAOS_STMT
*
stmt
);
int
stmtAffectedRowsOnce
(
TAOS_STMT
*
stmt
);
int
stmtPrepare
(
TAOS_STMT
*
stmt
,
const
char
*
sql
,
unsigned
long
length
);
int
stmtSetTbName
(
TAOS_STMT
*
stmt
,
const
char
*
tbName
);
int
stmtSetTbTags
(
TAOS_STMT
*
stmt
,
TAOS_MULTI_BIND
*
tags
);
int
stmtGetTagFields
(
TAOS_STMT
*
stmt
,
int
*
nums
,
TAOS_FIELD_E
**
fields
);
int
stmtGetColFields
(
TAOS_STMT
*
stmt
,
int
*
nums
,
TAOS_FIELD_E
**
fields
);
int
stmtIsInsert
(
TAOS_STMT
*
stmt
,
int
*
insert
);
int
stmtGetParamNum
(
TAOS_STMT
*
stmt
,
int
*
nums
);
int
stmtGetParam
(
TAOS_STMT
*
stmt
,
int
idx
,
int
*
type
,
int
*
bytes
);
int
stmtAddBatch
(
TAOS_STMT
*
stmt
);
TAOS_RES
*
stmtUseResult
(
TAOS_STMT
*
stmt
);
int
stmtBindBatch
(
TAOS_STMT
*
stmt
,
TAOS_MULTI_BIND
*
bind
,
int32_t
colIdx
);
int
stmtAffectedRows
(
TAOS_STMT
*
stmt
);
int
stmtAffectedRowsOnce
(
TAOS_STMT
*
stmt
);
int
stmtPrepare
(
TAOS_STMT
*
stmt
,
const
char
*
sql
,
unsigned
long
length
);
int
stmtSetTbName
(
TAOS_STMT
*
stmt
,
const
char
*
tbName
);
int
stmtSetTbTags
(
TAOS_STMT
*
stmt
,
TAOS_MULTI_BIND
*
tags
);
int
stmtGetTagFields
(
TAOS_STMT
*
stmt
,
int
*
nums
,
TAOS_FIELD_E
**
fields
);
int
stmtGetColFields
(
TAOS_STMT
*
stmt
,
int
*
nums
,
TAOS_FIELD_E
**
fields
);
int
stmtIsInsert
(
TAOS_STMT
*
stmt
,
int
*
insert
);
int
stmtGetParamNum
(
TAOS_STMT
*
stmt
,
int
*
nums
);
int
stmtGetParam
(
TAOS_STMT
*
stmt
,
int
idx
,
int
*
type
,
int
*
bytes
);
int
stmtAddBatch
(
TAOS_STMT
*
stmt
);
TAOS_RES
*
stmtUseResult
(
TAOS_STMT
*
stmt
);
int
stmtBindBatch
(
TAOS_STMT
*
stmt
,
TAOS_MULTI_BIND
*
bind
,
int32_t
colIdx
);
#ifdef __cplusplus
}
...
...
source/client/src/clientStmt.c
浏览文件 @
17040610
...
...
@@ -7,8 +7,8 @@
static
int32_t
stmtCreateRequest
(
STscStmt
*
pStmt
)
{
int32_t
code
=
0
;
if
(
pStmt
->
exec
.
pRequest
==
NULL
)
{
if
(
pStmt
->
exec
.
pRequest
==
NULL
)
{
code
=
buildRequest
(
pStmt
->
taos
->
id
,
pStmt
->
sql
.
sqlStr
,
pStmt
->
sql
.
sqlLen
,
NULL
,
false
,
&
pStmt
->
exec
.
pRequest
);
if
(
TSDB_CODE_SUCCESS
==
code
)
{
pStmt
->
exec
.
pRequest
->
syncQuery
=
true
;
...
...
@@ -232,7 +232,7 @@ int32_t stmtParseSql(STscStmt* pStmt) {
};
STMT_ERR_RET
(
stmtCreateRequest
(
pStmt
));
STMT_ERR_RET
(
parseSql
(
pStmt
->
exec
.
pRequest
,
false
,
&
pStmt
->
sql
.
pQuery
,
&
stmtCb
));
pStmt
->
bInfo
.
needParse
=
false
;
...
...
@@ -402,7 +402,7 @@ int32_t stmtGetFromCache(STscStmt* pStmt) {
STMT_ERR_RET
(
TSDB_CODE_OUT_OF_MEMORY
);
}
tscDebug
(
"reuse stmt block for tb %s in sqlBlock, suid:0x%"
PRIx64
,
pStmt
->
bInfo
.
tbFName
,
pStmt
->
bInfo
.
tbSuid
);
tscDebug
(
"reuse stmt block for tb %s in sqlBlock, suid:0x%"
PRIx64
,
pStmt
->
bInfo
.
tbFName
,
pStmt
->
bInfo
.
tbSuid
);
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -600,8 +600,9 @@ int stmtSetTbTags(TAOS_STMT* stmt, TAOS_MULTI_BIND* tags) {
}
tscDebug
(
"start to bind stmt tag values"
);
STMT_ERR_RET
(
qBindStmtTagsValue
(
*
pDataBlock
,
pStmt
->
bInfo
.
boundTags
,
pStmt
->
bInfo
.
tbSuid
,
pStmt
->
bInfo
.
stbFName
,
pStmt
->
bInfo
.
sname
.
tname
,
tags
,
pStmt
->
exec
.
pRequest
->
msgBuf
,
pStmt
->
exec
.
pRequest
->
msgBufLen
));
STMT_ERR_RET
(
qBindStmtTagsValue
(
*
pDataBlock
,
pStmt
->
bInfo
.
boundTags
,
pStmt
->
bInfo
.
tbSuid
,
pStmt
->
bInfo
.
stbFName
,
pStmt
->
bInfo
.
sname
.
tname
,
tags
,
pStmt
->
exec
.
pRequest
->
msgBuf
,
pStmt
->
exec
.
pRequest
->
msgBufLen
));
return
TSDB_CODE_SUCCESS
;
}
...
...
source/client/src/clientTmqConnector.c
浏览文件 @
17040610
...
...
@@ -212,7 +212,8 @@ JNIEXPORT void JNICALL Java_com_taosdata_jdbc_tmq_TMQConnector_tmqCommitAsync(JN
tmq_commit_async
(
tmq
,
res
,
commit_cb
,
consumer
);
}
JNIEXPORT
jint
JNICALL
Java_com_taosdata_jdbc_tmq_TMQConnector_tmqUnsubscribeImp
(
JNIEnv
*
env
,
jobject
jobj
,
jlong
jtmq
)
{
JNIEXPORT
jint
JNICALL
Java_com_taosdata_jdbc_tmq_TMQConnector_tmqUnsubscribeImp
(
JNIEnv
*
env
,
jobject
jobj
,
jlong
jtmq
)
{
tmq_t
*
tmq
=
(
tmq_t
*
)
jtmq
;
if
(
tmq
==
NULL
)
{
jniError
(
"jobj:%p, tmq is closed"
,
jobj
);
...
...
@@ -223,7 +224,7 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_tmq_TMQConnector_tmqUnsubscribeImp
}
JNIEXPORT
jint
JNICALL
Java_com_taosdata_jdbc_tmq_TMQConnector_tmqConsumerCloseImp
(
JNIEnv
*
env
,
jobject
jobj
,
jlong
jtmq
)
{
jlong
jtmq
)
{
tmq_t
*
tmq
=
(
tmq_t
*
)
jtmq
;
if
(
tmq
==
NULL
)
{
jniDebug
(
"jobj:%p, tmq is closed"
,
jobj
);
...
...
source/client/test/clientTests.cpp
浏览文件 @
17040610
...
...
@@ -13,12 +13,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <iostream>
#include <gtest/gtest.h>
#include <iostream>
#include "clientInt.h"
#include "taoserror.h"
#include "tglobal.h"
#include "thash.h"
#include "clientInt.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wwrite-strings"
...
...
@@ -26,8 +26,8 @@
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wsign-compare"
#include "taos.h"
#include "executor.h"
#include "taos.h"
namespace
{
void
showDB
(
TAOS
*
pConn
)
{
...
...
@@ -50,11 +50,11 @@ void printResult(TAOS_RES* pRes) {
int32_t
numOfFields
=
taos_num_fields
(
pRes
);
int32_t
n
=
0
;
char
str
[
512
]
=
{
0
};
char
str
[
512
]
=
{
0
};
while
((
pRow
=
taos_fetch_row
(
pRes
))
!=
NULL
)
{
int32_t
*
length
=
taos_fetch_lengths
(
pRes
);
for
(
int32_t
i
=
0
;
i
<
numOfFields
;
++
i
)
{
printf
(
"(%d):%d "
,
i
,
length
[
i
]);
for
(
int32_t
i
=
0
;
i
<
numOfFields
;
++
i
)
{
printf
(
"(%d):%d "
,
i
,
length
[
i
]);
}
printf
(
"
\n
"
);
...
...
@@ -123,16 +123,16 @@ void createNewTable(TAOS* pConn, int32_t index) {
}
taos_free_result
(
pRes
);
for
(
int32_t
i
=
0
;
i
<
3280
;
i
+=
20
)
{
for
(
int32_t
i
=
0
;
i
<
3280
;
i
+=
20
)
{
char
sql
[
1024
]
=
{
0
};
sprintf
(
sql
,
"insert into tu%d values(now+%da, %d)(now+%da, %d)(now+%da, %d)(now+%da, %d)"
"(now+%da, %d)(now+%da, %d)(now+%da, %d)(now+%da, %d)(now+%da, %d)(now+%da, %d)"
"(now+%da, %d)(now+%da, %d)(now+%da, %d)(now+%da, %d)"
"(now+%da, %d)(now+%da, %d)(now+%da, %d)(now+%da, %d)(now+%da, %d)(now+%da, %d)"
,
index
,
i
,
i
,
i
+
1
,
i
+
1
,
i
+
2
,
i
+
2
,
i
+
3
,
i
+
3
,
i
+
4
,
i
+
4
,
i
+
5
,
i
+
5
,
i
+
6
,
i
+
6
,
i
+
7
,
i
+
7
,
i
+
8
,
i
+
8
,
i
+
9
,
i
+
9
,
i
+
10
,
i
+
10
,
i
+
11
,
i
+
11
,
i
+
12
,
i
+
12
,
i
+
13
,
i
+
13
,
i
+
14
,
i
+
14
,
i
+
15
,
i
+
15
,
i
+
16
,
i
+
16
,
i
+
17
,
i
+
17
,
i
+
18
,
i
+
18
,
i
+
19
,
i
+
19
);
"(now+%da, %d)(now+%da, %d)(now+%da, %d)(now+%da, %d)(now+%da, %d)(now+%da, %d)"
,
i
ndex
,
i
,
i
,
i
+
1
,
i
+
1
,
i
+
2
,
i
+
2
,
i
+
3
,
i
+
3
,
i
+
4
,
i
+
4
,
i
+
5
,
i
+
5
,
i
+
6
,
i
+
6
,
i
+
7
,
i
+
7
,
i
+
8
,
i
+
8
,
i
+
9
,
i
+
9
,
i
+
10
,
i
+
10
,
i
+
11
,
i
+
11
,
i
+
12
,
i
+
12
,
i
+
13
,
i
+
13
,
i
+
14
,
i
+
1
4
,
i
+
1
5
,
i
+
15
,
i
+
16
,
i
+
16
,
i
+
17
,
i
+
17
,
i
+
18
,
i
+
18
,
i
+
19
,
i
+
19
);
TAOS_RES
*
p
=
taos_query
(
pConn
,
sql
);
if
(
taos_errno
(
p
)
!=
0
)
{
printf
(
"failed to insert data, reason:%s
\n
"
,
taos_errstr
(
p
));
...
...
@@ -150,7 +150,7 @@ int main(int argc, char** argv) {
TEST
(
testCase
,
driverInit_Test
)
{
// taosInitGlobalCfg();
// taos_init();
// taos_init();
}
TEST
(
testCase
,
connect_Test
)
{
...
...
@@ -670,11 +670,11 @@ TEST(testCase, projection_query_tables) {
TAOS
*
pConn
=
taos_connect
(
"localhost"
,
"root"
,
"taosdata"
,
NULL
,
0
);
ASSERT_NE
(
pConn
,
nullptr
);
// TAOS_RES* pRes = taos_query(pConn, "create database if not exists abc1 vgroups 1");
// if (taos_errno(pRes) != 0) {
// printf("error in create db, reason:%s\n", taos_errstr(pRes));
// }
// taos_free_result(pRes);
// TAOS_RES* pRes = taos_query(pConn, "create database if not exists abc1 vgroups 1");
// if (taos_errno(pRes) != 0) {
// printf("error in create db, reason:%s\n", taos_errstr(pRes));
// }
// taos_free_result(pRes);
TAOS_RES
*
pRes
=
taos_query
(
pConn
,
"use abc1"
);
taos_free_result
(
pRes
);
...
...
@@ -697,27 +697,27 @@ TEST(testCase, projection_query_tables) {
}
taos_free_result
(
pRes
);
for
(
int32_t
i
=
0
;
i
<
2
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
2
;
++
i
)
{
printf
(
"create table :%d
\n
"
,
i
);
createNewTable
(
pConn
,
i
);
}
//
// pRes = taos_query(pConn, "select * from tu");
// if (taos_errno(pRes) != 0) {
// printf("failed to select from table, reason:%s\n", taos_errstr(pRes));
// taos_free_result(pRes);
// ASSERT_TRUE(false);
// }
//
// TAOS_ROW pRow = NULL;
// TAOS_FIELD* pFields = taos_fetch_fields(pRes);
// int32_t numOfFields = taos_num_fields(pRes);
//
// char str[512] = {0};
// while ((pRow = taos_fetch_row(pRes)) != NULL) {
// int32_t code = taos_print_row(str, pRow, pFields, numOfFields);
// printf("%s\n", str);
// }
//
// pRes = taos_query(pConn, "select * from tu");
// if (taos_errno(pRes) != 0) {
// printf("failed to select from table, reason:%s\n", taos_errstr(pRes));
// taos_free_result(pRes);
// ASSERT_TRUE(false);
// }
//
// TAOS_ROW pRow = NULL;
// TAOS_FIELD* pFields = taos_fetch_fields(pRes);
// int32_t numOfFields = taos_num_fields(pRes);
//
// char str[512] = {0};
// while ((pRow = taos_fetch_row(pRes)) != NULL) {
// int32_t code = taos_print_row(str, pRow, pFields, numOfFields);
// printf("%s\n", str);
// }
taos_free_result
(
pRes
);
taos_close
(
pConn
);
...
...
@@ -860,5 +860,4 @@ TEST(testCase, update_test) {
#endif
#pragma GCC diagnostic pop
source/client/test/smlTest.cpp
浏览文件 @
17040610
此差异已折叠。
点击以展开。
tools/scripts/codeFormat.py
0 → 100644
浏览文件 @
17040610
tools/scripts/codeFormat.sh
浏览文件 @
17040610
...
...
@@ -31,7 +31,9 @@ FORMAT_DIR_LIST=(
"
${
PRJ_ROOT_DIR
}
/source/libs/tfs"
"
${
PRJ_ROOT_DIR
}
/source/libs/transport"
"
${
PRJ_ROOT_DIR
}
/source/libs/wal"
# "${PRJ_ROOT_DIR}/source/client"
"
${
PRJ_ROOT_DIR
}
/source/client/inc"
"
${
PRJ_ROOT_DIR
}
/source/client/src"
"
${
PRJ_ROOT_DIR
}
/source/client/test"
"
${
PRJ_ROOT_DIR
}
/source/dnode"
)
...
...
@@ -43,11 +45,11 @@ EXCLUDE_FILE_LIST=(
)
for
d
in
${
FORMAT_DIR_LIST
[@]
}
;
do
for
f
in
$(
find
$d
-regex
'.*\.\(cpp\|hpp\|c\|h\)'
)
;
do
for
f
in
$(
find
$d
-
type
f
-
regex
'.*\.\(cpp\|hpp\|c\|h\)'
)
;
do
${
FORMAT_BIN
}
-i
$f
done
done
cd
${
ORIGIN_DIR
}
# find source
/libs/ -path ./source/libs/qworker -prune -o -regex '.*\.\(cpp\|hpp\|c\|h\)' -print
# find source
-type f -regex '.*\.\(cpp\|hpp\|c\|h\)' ! -name
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录