Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Mr、小李
TDengine
提交
4e944c3a
T
TDengine
项目概览
Mr、小李
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
4e944c3a
编写于
8月 28, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
8月 28, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3280 from taosdata/feature/os
Feature/os
上级
97d095af
332ae098
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
28 addition
and
28 deletion
+28
-28
src/client/src/taos.rc.in
src/client/src/taos.rc.in
+4
-4
src/client/src/tscFunctionImpl.c
src/client/src/tscFunctionImpl.c
+3
-3
src/client/src/tscLocalMerge.c
src/client/src/tscLocalMerge.c
+1
-1
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+1
-1
src/common/src/tname.c
src/common/src/tname.c
+1
-1
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+9
-9
src/query/src/qParserImpl.c
src/query/src/qParserImpl.c
+1
-1
src/query/src/qResultbuf.c
src/query/src/qResultbuf.c
+1
-1
src/query/src/qTsbuf.c
src/query/src/qTsbuf.c
+4
-4
tests/script/wtest.bat
tests/script/wtest.bat
+3
-3
未找到文件。
src/client/src/taos.rc.in
浏览文件 @
4e944c3a
1 VERSIONINFO
FILEVERSION ${TD_VER_
1}, ${TD_VER_2}, ${TD_VER_3
}
PRODUCTVERSION ${TD_VER_
1}, ${TD_VER_2}, ${TD_VER_3
}
FILEVERSION ${TD_VER_
NUMBER
}
PRODUCTVERSION ${TD_VER_
NUMBER
}
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
...
...
@@ -16,12 +16,12 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "Native C Driver for TDengine"
VALUE "FileVersion", "${TD_VER_
1}, ${TD_VER_2}, ${TD_VER_3
}"
VALUE "FileVersion", "${TD_VER_
NUMBER
}"
VALUE "InternalName", "taos.dll(${TD_VER_CPUTYPE})"
VALUE "LegalCopyright", "Copyright (C) 2020 TAOS Data"
VALUE "OriginalFilename", ""
VALUE "ProductName", "taos.dll(${TD_VER_CPUTYPE})"
VALUE "ProductVersion", "${TD_VER_
1}.${TD_VER_2}.${TD_VER_3}.${TD_VER_4
}"
VALUE "ProductVersion", "${TD_VER_
NUMBER
}"
END
END
BLOCK "VarFileInfo"
...
...
src/client/src/tscFunctionImpl.c
浏览文件 @
4e944c3a
...
...
@@ -2034,7 +2034,7 @@ static void copyTopBotRes(SQLFunctionCtx *pCtx, int32_t type) {
tValuePair
**
tvp
=
pRes
->
res
;
int32_t
step
=
QUERY_ASC_FORWARD_STEP
;
int32_t
len
=
GET_RES_INFO
(
pCtx
)
->
numOfRes
;
int32_t
len
=
(
int32_t
)(
GET_RES_INFO
(
pCtx
)
->
numOfRes
)
;
switch
(
type
)
{
case
TSDB_DATA_TYPE_INT
:
{
...
...
@@ -2408,10 +2408,10 @@ static void top_bottom_func_finalizer(SQLFunctionCtx *pCtx) {
// user specify the order of output by sort the result according to timestamp
if
(
pCtx
->
param
[
1
].
i64Key
==
PRIMARYKEY_TIMESTAMP_COL_INDEX
)
{
__compar_fn_t
comparator
=
(
pCtx
->
param
[
2
].
i64Key
==
TSDB_ORDER_ASC
)
?
resAscComparFn
:
resDescComparFn
;
qsort
(
tvp
,
pResInfo
->
numOfRes
,
POINTER_BYTES
,
comparator
);
qsort
(
tvp
,
(
size_t
)
pResInfo
->
numOfRes
,
POINTER_BYTES
,
comparator
);
}
else
if
(
pCtx
->
param
[
1
].
i64Key
>
PRIMARYKEY_TIMESTAMP_COL_INDEX
)
{
__compar_fn_t
comparator
=
(
pCtx
->
param
[
2
].
i64Key
==
TSDB_ORDER_ASC
)
?
resDataAscComparFn
:
resDataDescComparFn
;
qsort
(
tvp
,
pResInfo
->
numOfRes
,
POINTER_BYTES
,
comparator
);
qsort
(
tvp
,
(
size_t
)
pResInfo
->
numOfRes
,
POINTER_BYTES
,
comparator
);
}
GET_TRUE_DATA_TYPE
();
...
...
src/client/src/tscLocalMerge.c
浏览文件 @
4e944c3a
...
...
@@ -966,7 +966,7 @@ static void doFillResult(SSqlObj *pSql, SLocalReducer *pLocalReducer, bool doneO
for
(
int32_t
i
=
0
;
i
<
pQueryInfo
->
fieldsInfo
.
numOfOutput
;
++
i
)
{
TAOS_FIELD
*
pField
=
tscFieldInfoGetField
(
&
pQueryInfo
->
fieldsInfo
,
i
);
int16_t
offset
=
getColumnModelOffset
(
pLocalReducer
->
resColModel
,
i
);
memcpy
(
pRes
->
data
+
offset
*
pRes
->
numOfRows
,
pResPages
[
i
]
->
data
,
pField
->
bytes
*
pRes
->
numOfRows
);
memcpy
(
pRes
->
data
+
offset
*
pRes
->
numOfRows
,
pResPages
[
i
]
->
data
,
(
size_t
)(
pField
->
bytes
*
pRes
->
numOfRows
)
);
}
pRes
->
numOfRowsGroup
+=
pRes
->
numOfRows
;
...
...
src/client/src/tscSQLParser.c
浏览文件 @
4e944c3a
...
...
@@ -1303,7 +1303,7 @@ int32_t parseSelectClause(SSqlCmd* pCmd, int32_t clauseIndex, tSQLExprList* pSel
SSchema
*
pSchema
=
tscGetTableColumnSchema
(
pTableMetaInfo
->
pTableMeta
,
PRIMARYKEY_TIMESTAMP_COL_INDEX
);
// add the timestamp column into the output columns
int32_t
numOfCols
=
tscSqlExprNumOfExprs
(
pQueryInfo
);
int32_t
numOfCols
=
(
int32_t
)
tscSqlExprNumOfExprs
(
pQueryInfo
);
tscAddSpecialColumnForSelect
(
pQueryInfo
,
numOfCols
,
TSDB_FUNC_PRJ
,
&
index
,
pSchema
,
TSDB_COL_NORMAL
);
SFieldSupInfo
*
pSupInfo
=
tscFieldInfoGetSupp
(
&
pQueryInfo
->
fieldsInfo
,
numOfCols
);
...
...
src/common/src/tname.c
浏览文件 @
4e944c3a
...
...
@@ -53,7 +53,7 @@ SSchema tGetUserSpecifiedColumnSchema(tVariant* pVal, SStrToken* exprStr, const
s
.
type
=
pVal
->
nType
;
if
(
s
.
type
==
TSDB_DATA_TYPE_BINARY
||
s
.
type
==
TSDB_DATA_TYPE_NCHAR
)
{
s
.
bytes
=
pVal
->
nLen
+
VARSTR_HEADER_SIZE
;
s
.
bytes
=
(
int16_t
)(
pVal
->
nLen
+
VARSTR_HEADER_SIZE
)
;
}
else
{
s
.
bytes
=
tDataTypeDesc
[
pVal
->
nType
].
nSize
;
}
...
...
src/query/src/qExecutor.c
浏览文件 @
4e944c3a
...
...
@@ -2771,14 +2771,14 @@ void copyResToQueryResultBuf(SQInfo *pQInfo, SQuery *pQuery) {
tFilePage
*
pData
=
getResBufPage
(
pResultBuf
,
pi
->
pageId
);
assert
(
pData
->
num
>
0
&&
pData
->
num
<=
pRuntimeEnv
->
numOfRowsPerPage
&&
pGroupResInfo
->
pos
.
rowId
<
pData
->
num
);
int32_t
numOfRes
=
pData
->
num
-
pGroupResInfo
->
pos
.
rowId
;
int32_t
numOfRes
=
(
int32_t
)(
pData
->
num
-
pGroupResInfo
->
pos
.
rowId
)
;
if
(
numOfRes
>
pQuery
->
rec
.
capacity
-
offset
)
{
numOfCopiedRows
=
pQuery
->
rec
.
capacity
-
offset
;
numOfCopiedRows
=
(
int32_t
)(
pQuery
->
rec
.
capacity
-
offset
)
;
pGroupResInfo
->
pos
.
rowId
+=
numOfCopiedRows
;
done
=
true
;
}
else
{
numOfCopiedRows
=
pData
->
num
;
numOfCopiedRows
=
(
int32_t
)
pData
->
num
;
pGroupResInfo
->
pos
.
pageId
+=
1
;
pGroupResInfo
->
pos
.
rowId
=
0
;
...
...
@@ -2871,7 +2871,7 @@ int32_t mergeIntoGroupResultImpl(SQInfo *pQInfo, SArray *pGroup) {
SGroupResInfo
*
pGroupResInfo
=
&
pQInfo
->
groupResInfo
;
pGroupResInfo
->
numOfDataPages
=
taosArrayGetSize
(
pageList
);
pGroupResInfo
->
numOfDataPages
=
(
int32_t
)
taosArrayGetSize
(
pageList
);
pGroupResInfo
->
groupId
=
tid
;
pGroupResInfo
->
pos
.
pageId
=
0
;
pGroupResInfo
->
pos
.
rowId
=
0
;
...
...
@@ -3036,7 +3036,7 @@ int32_t flushFromResultBuf(SQueryRuntimeEnv* pRuntimeEnv, SGroupResInfo* pGroupR
char
*
output
=
buf
->
data
+
pRuntimeEnv
->
offset
[
i
]
*
pRuntimeEnv
->
numOfRowsPerPage
;
char
*
src
=
((
char
*
)
pQuery
->
sdata
[
i
]
->
data
)
+
offset
*
bytes
;
memcpy
(
output
,
src
,
buf
->
num
*
bytes
);
memcpy
(
output
,
src
,
(
size_t
)(
buf
->
num
*
bytes
)
);
}
offset
+=
rows
;
...
...
@@ -3211,7 +3211,7 @@ void resetCtxOutputBuf(SQueryRuntimeEnv *pRuntimeEnv) {
pCtx
->
ptsOutputBuf
=
pRuntimeEnv
->
pCtx
[
0
].
aOutputBuf
;
}
memset
(
pQuery
->
sdata
[
i
]
->
data
,
0
,
(
size_t
)
pQuery
->
pSelectExpr
[
i
].
bytes
*
pQuery
->
rec
.
capacity
);
memset
(
pQuery
->
sdata
[
i
]
->
data
,
0
,
(
size_t
)
(
pQuery
->
pSelectExpr
[
i
].
bytes
*
pQuery
->
rec
.
capacity
)
);
}
initCtxOutputBuf
(
pRuntimeEnv
);
...
...
@@ -3926,7 +3926,7 @@ static void updateWindowResNumOfRes(SQueryRuntimeEnv *pRuntimeEnv) {
continue
;
}
pResult
->
numOfRows
=
MAX
(
pResult
->
numOfRows
,
pResult
->
resultInfo
[
j
].
numOfRes
);
pResult
->
numOfRows
=
(
uint16_t
)(
MAX
(
pResult
->
numOfRows
,
pResult
->
resultInfo
[
j
].
numOfRes
)
);
}
}
}
...
...
@@ -4789,7 +4789,7 @@ static void sequentialTableProcess(SQInfo *pQInfo) {
SWindowResult
*
pResult
=
&
pWindowResInfo
->
pResult
[
i
];
for
(
int32_t
j
=
0
;
j
<
pQuery
->
numOfOutput
;
++
j
)
{
pResult
->
numOfRows
=
MAX
(
pResult
->
numOfRows
,
pResult
->
resultInfo
[
j
].
numOfRes
);
pResult
->
numOfRows
=
(
uint16_t
)(
MAX
(
pResult
->
numOfRows
,
pResult
->
resultInfo
[
j
].
numOfRes
)
);
}
}
...
...
@@ -6356,7 +6356,7 @@ static int32_t doDumpQueryResult(SQInfo *pQInfo, char *data) {
qDebug
(
"QInfo:%p ts comp data return, file:%s, size:%"
PRId64
,
pQInfo
,
pQuery
->
sdata
[
0
]
->
data
,
s
);
if
(
lseek
(
fd
,
0
,
SEEK_SET
)
>=
0
)
{
size_t
sz
=
read
(
fd
,
data
,
s
);
size_t
sz
=
read
(
fd
,
data
,
(
uint32_t
)
s
);
if
(
sz
<
s
)
{
// todo handle error
assert
(
0
);
}
...
...
src/query/src/qParserImpl.c
浏览文件 @
4e944c3a
...
...
@@ -182,7 +182,7 @@ tSQLExpr *tSQLExprCreate(tSQLExpr *pLeft, tSQLExpr *pRight, int32_t optrType) {
if
(
pRight
!=
NULL
&&
pLeft
!=
NULL
)
{
char
*
endPos
=
pRight
->
token
.
z
+
pRight
->
token
.
n
;
pExpr
->
token
.
z
=
pLeft
->
token
.
z
;
pExpr
->
token
.
n
=
endPos
-
pExpr
->
token
.
z
;
pExpr
->
token
.
n
=
(
uint32_t
)(
endPos
-
pExpr
->
token
.
z
)
;
pExpr
->
token
.
type
=
pLeft
->
token
.
type
;
}
...
...
src/query/src/qResultbuf.c
浏览文件 @
4e944c3a
...
...
@@ -142,7 +142,7 @@ static char* doFlushPageToDisk(SDiskbasedResultBuf* pResultBuf, SPageInfo* pg) {
}
ret
=
fwrite
(
t
,
size
,
1
,
pResultBuf
->
file
);
ret
=
(
int32_t
)
fwrite
(
t
,
size
,
1
,
pResultBuf
->
file
);
if
(
ret
!=
size
)
{
// todo handle the error case
}
...
...
src/query/src/qTsbuf.c
浏览文件 @
4e944c3a
...
...
@@ -242,13 +242,13 @@ static void writeDataToDisk(STSBuf* pTSBuf) {
* both side has the compressed length is used to support load data forwards/backwords.
*/
int32_t
metaLen
=
0
;
metaLen
+=
fwrite
(
&
pBlock
->
tag
.
nType
,
1
,
sizeof
(
pBlock
->
tag
.
nType
),
pTSBuf
->
f
);
metaLen
+=
fwrite
(
&
pBlock
->
tag
.
nLen
,
1
,
sizeof
(
pBlock
->
tag
.
nLen
),
pTSBuf
->
f
);
metaLen
+=
(
int32_t
)
fwrite
(
&
pBlock
->
tag
.
nType
,
1
,
sizeof
(
pBlock
->
tag
.
nType
),
pTSBuf
->
f
);
metaLen
+=
(
int32_t
)
fwrite
(
&
pBlock
->
tag
.
nLen
,
1
,
sizeof
(
pBlock
->
tag
.
nLen
),
pTSBuf
->
f
);
if
(
pBlock
->
tag
.
nType
==
TSDB_DATA_TYPE_BINARY
||
pBlock
->
tag
.
nType
==
TSDB_DATA_TYPE_NCHAR
)
{
metaLen
+=
fwrite
(
pBlock
->
tag
.
pz
,
1
,
(
size_t
)
pBlock
->
tag
.
nLen
,
pTSBuf
->
f
);
metaLen
+=
(
int32_t
)
fwrite
(
pBlock
->
tag
.
pz
,
1
,
(
size_t
)
pBlock
->
tag
.
nLen
,
pTSBuf
->
f
);
}
else
if
(
pBlock
->
tag
.
nType
!=
TSDB_DATA_TYPE_NULL
)
{
metaLen
+=
fwrite
(
&
pBlock
->
tag
.
i64Key
,
1
,
sizeof
(
int64_t
),
pTSBuf
->
f
);
metaLen
+=
(
int32_t
)
fwrite
(
&
pBlock
->
tag
.
i64Key
,
1
,
sizeof
(
int64_t
),
pTSBuf
->
f
);
}
fwrite
(
&
pBlock
->
numOfElem
,
sizeof
(
pBlock
->
numOfElem
),
1
,
pTSBuf
->
f
);
...
...
tests/script/wtest.bat
浏览文件 @
4e944c3a
...
...
@@ -6,8 +6,8 @@ echo Start TDengine Testing Case ...
set
"SCRIPT_DIR=
%~dp0
"
echo
SCRIPT_DIR
:
%SCRIPT_DIR%
set
"BUILD_DIR=
%~dp0
..\..\debug\build\bin"
set
"TSIM=
%~dp0
..\..\debug\build\bin\tsim"
set
"BUILD_DIR=
%~dp0
..\..\debug\
32\
build\bin"
set
"TSIM=
%~dp0
..\..\debug\
32\
build\bin\tsim"
echo
BUILD_DIR
:
%BUILD_DIR%
set
"SIM_DIR=
%~dp0
..\..\sim"
...
...
@@ -47,7 +47,7 @@ echo qdebugFlag 143 >> %TAOS_CFG%
echo
udebugFlag
143
>>
%TAOS_CFG%
set
"FILE_NAME=windows\testSuite.sim"
set
"FIRSTEP=
localhost
"
set
"FIRSTEP=
192.168.1.182
"
if
"
%
1"
==
"-f"
set
"FILE_NAME=
%
2"
if
"
%
1"
==
"-h"
set
"FIRSTEP=
%
2"
if
"
%
3"
==
"-f"
set
"FILE_NAME=
%
4"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录