Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
c2f32ad9
T
TDengine
项目概览
慢慢CG
/
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看板
提交
c2f32ad9
编写于
7月 08, 2021
作者:
Y
yihaoDeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-5134]<fix> fix runtime error
上级
a49c706b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
12 deletion
+20
-12
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+3
-3
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+4
-3
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+4
-2
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+9
-4
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
c2f32ad9
...
@@ -2766,8 +2766,7 @@ static bool isTablenameToken(SStrToken* token) {
...
@@ -2766,8 +2766,7 @@ static bool isTablenameToken(SStrToken* token) {
SStrToken
tableToken
=
{
0
};
SStrToken
tableToken
=
{
0
};
extractTableNameFromToken
(
&
tmpToken
,
&
tableToken
);
extractTableNameFromToken
(
&
tmpToken
,
&
tableToken
);
return
(
tmpToken
.
n
==
strlen
(
TSQL_TBNAME_L
)
&&
strncasecmp
(
TSQL_TBNAME_L
,
tmpToken
.
z
,
tmpToken
.
n
)
==
0
);
return
(
strncasecmp
(
TSQL_TBNAME_L
,
tmpToken
.
z
,
tmpToken
.
n
)
==
0
&&
tmpToken
.
n
==
strlen
(
TSQL_TBNAME_L
));
}
}
static
int16_t
doGetColumnIndex
(
SQueryInfo
*
pQueryInfo
,
int32_t
index
,
SStrToken
*
pToken
)
{
static
int16_t
doGetColumnIndex
(
SQueryInfo
*
pQueryInfo
,
int32_t
index
,
SStrToken
*
pToken
)
{
...
@@ -2798,7 +2797,8 @@ int32_t doGetColumnIndexByName(SStrToken* pToken, SQueryInfo* pQueryInfo, SColum
...
@@ -2798,7 +2797,8 @@ int32_t doGetColumnIndexByName(SStrToken* pToken, SQueryInfo* pQueryInfo, SColum
if
(
isTablenameToken
(
pToken
))
{
if
(
isTablenameToken
(
pToken
))
{
pIndex
->
columnIndex
=
TSDB_TBNAME_COLUMN_INDEX
;
pIndex
->
columnIndex
=
TSDB_TBNAME_COLUMN_INDEX
;
}
else
if
(
strncasecmp
(
pToken
->
z
,
DEFAULT_PRIMARY_TIMESTAMP_COL_NAME
,
pToken
->
n
)
==
0
)
{
}
else
if
(
strlen
(
DEFAULT_PRIMARY_TIMESTAMP_COL_NAME
)
==
pToken
->
n
&&
strncasecmp
(
pToken
->
z
,
DEFAULT_PRIMARY_TIMESTAMP_COL_NAME
,
pToken
->
n
)
==
0
)
{
pIndex
->
columnIndex
=
PRIMARYKEY_TIMESTAMP_COL_INDEX
;
pIndex
->
columnIndex
=
PRIMARYKEY_TIMESTAMP_COL_INDEX
;
}
else
{
}
else
{
// not specify the table name, try to locate the table index by column name
// not specify the table name, try to locate the table index by column name
...
...
src/client/src/tscSubquery.c
浏览文件 @
c2f32ad9
...
@@ -3047,9 +3047,10 @@ static void multiVnodeInsertFinalize(void* param, TAOS_RES* tres, int numOfRows)
...
@@ -3047,9 +3047,10 @@ static void multiVnodeInsertFinalize(void* param, TAOS_RES* tres, int numOfRows)
pParentObj
->
cmd
.
insertParam
.
schemaAttached
=
1
;
pParentObj
->
cmd
.
insertParam
.
schemaAttached
=
1
;
}
}
}
}
if
(
!
subAndCheckDone
(
tres
,
pParentObj
,
pSupporter
->
index
))
{
int32_t
suppIdx
=
pSupporter
->
index
;
tscDebug
(
"0x%"
PRIx64
" insert:%p,%d completed, total:%d"
,
pParentObj
->
self
,
tres
,
pSupporter
->
index
,
pParentObj
->
subState
.
numOfSub
);
if
(
!
subAndCheckDone
(
tres
,
pParentObj
,
suppIdx
))
{
tscDebug
(
"0x%"
PRIx64
" insert:%p,%d completed, total:%d"
,
pParentObj
->
self
,
tres
,
suppIdx
,
pParentObj
->
subState
.
numOfSub
);
return
;
return
;
}
}
...
...
src/client/src/tscUtil.c
浏览文件 @
c2f32ad9
...
@@ -297,7 +297,7 @@ bool tscHasColumnFilter(SQueryInfo* pQueryInfo) {
...
@@ -297,7 +297,7 @@ bool tscHasColumnFilter(SQueryInfo* pQueryInfo) {
size_t
size
=
taosArrayGetSize
(
pQueryInfo
->
colList
);
size_t
size
=
taosArrayGetSize
(
pQueryInfo
->
colList
);
for
(
int32_t
i
=
0
;
i
<
size
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
size
;
++
i
)
{
SColumn
*
pCol
=
taosArrayGet
(
pQueryInfo
->
colList
,
i
);
SColumn
*
pCol
=
taosArrayGet
P
(
pQueryInfo
->
colList
,
i
);
if
(
pCol
->
info
.
flist
.
numOfFilters
>
0
)
{
if
(
pCol
->
info
.
flist
.
numOfFilters
>
0
)
{
return
true
;
return
true
;
}
}
...
@@ -4382,7 +4382,9 @@ int32_t tscCreateQueryFromQueryInfo(SQueryInfo* pQueryInfo, SQueryAttr* pQueryAt
...
@@ -4382,7 +4382,9 @@ int32_t tscCreateQueryFromQueryInfo(SQueryInfo* pQueryInfo, SQueryAttr* pQueryAt
if
(
pQueryAttr
->
fillType
!=
TSDB_FILL_NONE
)
{
if
(
pQueryAttr
->
fillType
!=
TSDB_FILL_NONE
)
{
pQueryAttr
->
fillVal
=
calloc
(
pQueryAttr
->
numOfOutput
,
sizeof
(
int64_t
));
pQueryAttr
->
fillVal
=
calloc
(
pQueryAttr
->
numOfOutput
,
sizeof
(
int64_t
));
memcpy
(
pQueryAttr
->
fillVal
,
pQueryInfo
->
fillVal
,
pQueryAttr
->
numOfOutput
*
sizeof
(
int64_t
));
int32_t
fields
=
tscNumOfFields
(
pQueryInfo
);
int32_t
cpySize
=
fields
<
pQueryAttr
->
numOfOutput
?
fields
:
pQueryAttr
->
numOfOutput
;
memcpy
(
pQueryAttr
->
fillVal
,
pQueryInfo
->
fillVal
,
cpySize
*
sizeof
(
int64_t
));
}
}
pQueryAttr
->
srcRowSize
=
0
;
pQueryAttr
->
srcRowSize
=
0
;
...
...
src/query/src/qExecutor.c
浏览文件 @
c2f32ad9
...
@@ -5956,8 +5956,13 @@ SColumnInfo* extractColumnFilterInfo(SExprInfo* pExpr, int32_t numOfOutput, int3
...
@@ -5956,8 +5956,13 @@ SColumnInfo* extractColumnFilterInfo(SExprInfo* pExpr, int32_t numOfOutput, int3
pCols
[
i
].
colId
=
pExpr
[
i
].
base
.
resColId
;
pCols
[
i
].
colId
=
pExpr
[
i
].
base
.
resColId
;
pCols
[
i
].
flist
.
numOfFilters
=
pExpr
[
i
].
base
.
flist
.
numOfFilters
;
pCols
[
i
].
flist
.
numOfFilters
=
pExpr
[
i
].
base
.
flist
.
numOfFilters
;
pCols
[
i
].
flist
.
filterInfo
=
calloc
(
pCols
[
i
].
flist
.
numOfFilters
,
sizeof
(
SColumnFilterInfo
));
if
(
pCols
[
i
].
flist
.
numOfFilters
!=
0
)
{
memcpy
(
pCols
[
i
].
flist
.
filterInfo
,
pExpr
[
i
].
base
.
flist
.
filterInfo
,
pCols
[
i
].
flist
.
numOfFilters
*
sizeof
(
SColumnFilterInfo
));
pCols
[
i
].
flist
.
filterInfo
=
calloc
(
pCols
[
i
].
flist
.
numOfFilters
,
sizeof
(
SColumnFilterInfo
));
memcpy
(
pCols
[
i
].
flist
.
filterInfo
,
pExpr
[
i
].
base
.
flist
.
filterInfo
,
pCols
[
i
].
flist
.
numOfFilters
*
sizeof
(
SColumnFilterInfo
));
}
else
{
// avoid runtime error
pCols
[
i
].
flist
.
filterInfo
=
NULL
;
}
}
}
assert
(
numOfFilter
>
0
);
assert
(
numOfFilter
>
0
);
...
@@ -6416,10 +6421,10 @@ static SSDataBlock* hashDistinct(void* param, bool* newgroup) {
...
@@ -6416,10 +6421,10 @@ static SSDataBlock* hashDistinct(void* param, bool* newgroup) {
if
(
isNull
(
val
,
type
))
{
if
(
isNull
(
val
,
type
))
{
continue
;
continue
;
}
}
int
dummy
;
void
*
res
=
taosHashGet
(
pInfo
->
pSet
,
val
,
bytes
);
void
*
res
=
taosHashGet
(
pInfo
->
pSet
,
val
,
bytes
);
if
(
res
==
NULL
)
{
if
(
res
==
NULL
)
{
taosHashPut
(
pInfo
->
pSet
,
val
,
bytes
,
NULL
,
0
);
taosHashPut
(
pInfo
->
pSet
,
val
,
bytes
,
&
dummy
,
sizeof
(
dummy
)
);
char
*
start
=
pResultColInfoData
->
pData
+
bytes
*
pInfo
->
pRes
->
info
.
rows
;
char
*
start
=
pResultColInfoData
->
pData
+
bytes
*
pInfo
->
pRes
->
info
.
rows
;
memcpy
(
start
,
val
,
bytes
);
memcpy
(
start
,
val
,
bytes
);
pRes
->
info
.
rows
+=
1
;
pRes
->
info
.
rows
+=
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录