Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6bdf22f7
T
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
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看板
提交
6bdf22f7
编写于
8月 03, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
差异文件
merge from master
上级
9b125563
f5a9b37c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
34 addition
and
15 deletion
+34
-15
src/client/src/tscParseInsert.c
src/client/src/tscParseInsert.c
+1
-3
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+26
-10
src/mnode/src/mnodeShow.c
src/mnode/src/mnodeShow.c
+5
-1
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+2
-1
未找到文件。
src/client/src/tscParseInsert.c
浏览文件 @
6bdf22f7
...
...
@@ -992,9 +992,7 @@ int32_t tsParseValues(char **str, STableDataBlocks *pDataBlock, int maxRows, SIn
index
=
0
;
sToken
=
tStrGetToken
(
*
str
,
&
index
,
false
);
if
(
sToken
.
n
==
0
||
sToken
.
type
!=
TK_RP
)
{
tscSQLSyntaxErrMsg
(
pInsertParam
->
msg
,
") expected"
,
*
str
);
code
=
TSDB_CODE_TSC_SQL_SYNTAX_ERROR
;
return
code
;
return
tscSQLSyntaxErrMsg
(
pCmd
->
payload
,
") expected"
,
*
str
);
}
*
str
+=
index
;
...
...
src/kit/taosdemo/taosdemo.c
浏览文件 @
6bdf22f7
...
...
@@ -5095,7 +5095,9 @@ static int getRowDataFromSample(
static
int64_t
generateStbRowData
(
SSuperTable
*
stbInfo
,
char
*
recBuf
,
int64_t
timestamp
)
char
*
recBuf
,
int64_t
remainderBufLen
,
int64_t
timestamp
)
{
int64_t
dataLen
=
0
;
char
*
pstr
=
recBuf
;
...
...
@@ -5123,6 +5125,7 @@ static int64_t generateStbRowData(
rand_string
(
buf
,
stbInfo
->
columns
[
i
].
dataLen
);
dataLen
+=
snprintf
(
pstr
+
dataLen
,
maxLen
-
dataLen
,
"
\'
%s
\'
,"
,
buf
);
tmfree
(
buf
);
}
else
{
char
*
tmp
;
...
...
@@ -5179,6 +5182,9 @@ static int64_t generateStbRowData(
tstrncpy
(
pstr
+
dataLen
,
","
,
2
);
dataLen
+=
1
;
}
if
(
dataLen
>
remainderBufLen
)
return
0
;
}
dataLen
-=
1
;
...
...
@@ -5385,7 +5391,7 @@ static int32_t generateDataTailWithoutStb(
int32_t
k
=
0
;
for
(
k
=
0
;
k
<
batch
;)
{
char
data
[
MAX_DATA_SIZE
]
;
char
*
data
=
pstr
;
memset
(
data
,
0
,
MAX_DATA_SIZE
);
int64_t
retLen
=
0
;
...
...
@@ -5409,7 +5415,7 @@ static int32_t generateDataTailWithoutStb(
if
(
len
>
remainderBufLen
)
break
;
pstr
+=
sprintf
(
pstr
,
"%s"
,
data
)
;
pstr
+=
retLen
;
k
++
;
len
+=
retLen
;
remainderBufLen
-=
retLen
;
...
...
@@ -5465,14 +5471,14 @@ static int32_t generateStbDataTail(
int32_t
k
;
for
(
k
=
0
;
k
<
batch
;)
{
char
data
[
MAX_DATA_SIZE
];
memset
(
data
,
0
,
MAX_DATA_SIZE
);
char
*
data
=
pstr
;
int64_t
lenOfRow
=
0
;
if
(
tsRand
)
{
if
(
superTblInfo
->
disorderRatio
>
0
)
{
lenOfRow
=
generateStbRowData
(
superTblInfo
,
data
,
remainderBufLen
,
startTime
+
getTSRandTail
(
superTblInfo
->
timeStampStep
,
k
,
superTblInfo
->
disorderRatio
,
...
...
@@ -5480,6 +5486,7 @@ static int32_t generateStbDataTail(
);
}
else
{
lenOfRow
=
generateStbRowData
(
superTblInfo
,
data
,
remainderBufLen
,
startTime
+
superTblInfo
->
timeStampStep
*
k
);
}
...
...
@@ -5492,11 +5499,15 @@ static int32_t generateStbDataTail(
pSamplePos
);
}
if
(
lenOfRow
==
0
)
{
data
[
0
]
=
'\0'
;
break
;
}
if
((
lenOfRow
+
1
)
>
remainderBufLen
)
{
break
;
}
pstr
+=
snprintf
(
pstr
,
lenOfRow
+
1
,
"%s"
,
data
)
;
pstr
+=
lenOfRow
;
k
++
;
len
+=
lenOfRow
;
remainderBufLen
-=
lenOfRow
;
...
...
@@ -6248,7 +6259,7 @@ static int32_t generateStbProgressiveData(
assert
(
buffer
!=
NULL
);
char
*
pstr
=
buffer
;
memset
(
buffe
r
,
0
,
*
pRemainderBufLen
);
memset
(
pst
r
,
0
,
*
pRemainderBufLen
);
int64_t
headLen
=
generateStbSQLHead
(
superTblInfo
,
...
...
@@ -6642,7 +6653,7 @@ static void* syncWriteProgressive(threadInfo *pThreadInfo) {
return
NULL
;
}
int64_t
remainderBufLen
=
maxSqlLen
;
int64_t
remainderBufLen
=
maxSqlLen
-
2000
;
char
*
pstr
=
pThreadInfo
->
buffer
;
int
len
=
snprintf
(
pstr
,
...
...
@@ -6824,10 +6835,14 @@ static void callBack(void *param, TAOS_RES *res, int code) {
&&
rand_num
<
pThreadInfo
->
superTblInfo
->
disorderRatio
)
{
int64_t
d
=
pThreadInfo
->
lastTs
-
(
taosRandom
()
%
pThreadInfo
->
superTblInfo
->
disorderRange
+
1
);
generateStbRowData
(
pThreadInfo
->
superTblInfo
,
data
,
d
);
generateStbRowData
(
pThreadInfo
->
superTblInfo
,
data
,
MAX_DATA_SIZE
,
d
);
}
else
{
generateStbRowData
(
pThreadInfo
->
superTblInfo
,
data
,
pThreadInfo
->
lastTs
+=
1000
);
data
,
MAX_DATA_SIZE
,
pThreadInfo
->
lastTs
+=
1000
);
}
pstr
+=
sprintf
(
pstr
,
"%s"
,
data
);
pThreadInfo
->
counter
++
;
...
...
@@ -7052,6 +7067,7 @@ static void startMultiThreadInsertData(int threads, char* db_name,
for
(
int
i
=
0
;
i
<
threads
;
i
++
)
{
threadInfo
*
pThreadInfo
=
infos
+
i
;
pThreadInfo
->
threadID
=
i
;
tstrncpy
(
pThreadInfo
->
db_name
,
db_name
,
TSDB_DB_NAME_LEN
);
pThreadInfo
->
time_precision
=
timePrec
;
pThreadInfo
->
superTblInfo
=
superTblInfo
;
...
...
src/mnode/src/mnodeShow.c
浏览文件 @
6bdf22f7
...
...
@@ -253,11 +253,15 @@ static int32_t mnodeProcessHeartBeatMsg(SMnodeMsg *pMsg) {
int32_t
connId
=
htonl
(
pHBMsg
->
connId
);
SConnObj
*
pConn
=
mnodeAccquireConn
(
connId
,
connInfo
.
user
,
connInfo
.
clientIp
,
connInfo
.
clientPort
);
if
(
pConn
==
NULL
)
{
pHBMsg
->
pid
=
htonl
(
pHBMsg
->
pid
);
pConn
=
mnodeCreateConn
(
connInfo
.
user
,
connInfo
.
clientIp
,
connInfo
.
clientPort
,
pHBMsg
->
pid
,
pHBMsg
->
appName
);
}
if
(
pConn
==
NULL
)
{
// do not close existing links, otherwise
// mError("failed to create connId, close connect");
// pRsp->killConnection = 1;
// pRsp->killConnection = 1;
}
else
{
pRsp
->
connId
=
htonl
(
pConn
->
connId
);
mnodeSaveQueryStreamList
(
pConn
,
pHBMsg
);
...
...
src/tsdb/src/tsdbRead.c
浏览文件 @
6bdf22f7
...
...
@@ -2696,7 +2696,7 @@ static void destroyHelper(void* param) {
free
(
param
);
}
static
bool
loadBlockOfActiveTable
(
STsdbQueryHandle
*
pQueryHandle
)
{
static
bool
loadBlockOfActiveTable
(
STsdbQueryHandle
*
pQueryHandle
)
{
if
(
pQueryHandle
->
checkFiles
)
{
// check if the query range overlaps with the file data block
bool
exists
=
true
;
...
...
@@ -2708,6 +2708,7 @@ static bool loadBlockOfActiveTable(STsdbQueryHandle* pQueryHandle) {
}
if
(
exists
)
{
tsdbRetrieveDataBlock
((
TsdbQueryHandleT
)
pQueryHandle
,
NULL
);
if
(
pQueryHandle
->
currentLoadExternalRows
&&
pQueryHandle
->
window
.
skey
==
pQueryHandle
->
window
.
ekey
)
{
SColumnInfoData
*
pColInfo
=
taosArrayGet
(
pQueryHandle
->
pColumns
,
0
);
assert
(
*
(
int64_t
*
)
pColInfo
->
pData
==
pQueryHandle
->
window
.
skey
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录