Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
067af996
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,发现更多精彩内容 >>
未验证
提交
067af996
编写于
10月 21, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
10月 21, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #17566 from taosdata/fix/TS-1937
fix: fix show create table crash issue
上级
808ae094
1b65cd20
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
14 addition
and
14 deletion
+14
-14
include/libs/nodes/cmdnodes.h
include/libs/nodes/cmdnodes.h
+1
-1
source/client/src/clientEnv.c
source/client/src/clientEnv.c
+1
-1
source/libs/command/src/command.c
source/libs/command/src/command.c
+9
-1
source/libs/nodes/src/nodesUtilFuncs.c
source/libs/nodes/src/nodesUtilFuncs.c
+3
-11
未找到文件。
include/libs/nodes/cmdnodes.h
浏览文件 @
067af996
...
...
@@ -34,7 +34,7 @@ extern "C" {
#define SHOW_CREATE_TB_RESULT_COLS 2
#define SHOW_CREATE_TB_RESULT_FIELD1_LEN (TSDB_TABLE_NAME_LEN + VARSTR_HEADER_SIZE)
#define SHOW_CREATE_TB_RESULT_FIELD2_LEN (TSDB_MAX_
BINARY_LEN + VARSTR_HEADER_SIZE
)
#define SHOW_CREATE_TB_RESULT_FIELD2_LEN (TSDB_MAX_
ALLOWED_SQL_LEN * 3
)
#define SHOW_LOCAL_VARIABLES_RESULT_COLS 2
#define SHOW_LOCAL_VARIABLES_RESULT_FIELD1_LEN (TSDB_CONFIG_OPTION_LEN + VARSTR_HEADER_SIZE)
...
...
source/client/src/clientEnv.c
浏览文件 @
067af996
...
...
@@ -338,7 +338,7 @@ void doDestroyRequest(void *p) {
SRequestObj
*
pRequest
=
(
SRequestObj
*
)
p
;
int64_t
reqId
=
pRequest
->
self
;
uint64_t
reqId
=
pRequest
->
requestId
;
tscTrace
(
"begin to destroy request %"
PRIx64
" p:%p"
,
reqId
,
pRequest
);
taosHashRemove
(
pRequest
->
pTscObj
->
pRequests
,
&
pRequest
->
self
,
sizeof
(
pRequest
->
self
));
...
...
source/libs/command/src/command.c
浏览文件 @
067af996
...
...
@@ -496,7 +496,12 @@ static int32_t setCreateTBResultIntoDataBlock(SSDataBlock* pBlock, SDbCfgInfo* p
colDataAppend
(
pCol1
,
0
,
buf1
,
false
);
SColumnInfoData
*
pCol2
=
taosArrayGet
(
pBlock
->
pDataBlock
,
1
);
char
buf2
[
SHOW_CREATE_TB_RESULT_FIELD2_LEN
]
=
{
0
};
char
*
buf2
=
taosMemoryMalloc
(
SHOW_CREATE_TB_RESULT_FIELD2_LEN
);
if
(
NULL
==
buf2
)
{
terrno
=
TSDB_CODE_TSC_OUT_OF_MEMORY
;
return
terrno
;
}
int32_t
len
=
0
;
if
(
TSDB_SUPER_TABLE
==
pCfg
->
tableType
)
{
...
...
@@ -512,6 +517,7 @@ static int32_t setCreateTBResultIntoDataBlock(SSDataBlock* pBlock, SDbCfgInfo* p
len
+=
sprintf
(
buf2
+
VARSTR_HEADER_SIZE
+
len
,
") TAGS ("
);
code
=
appendTagValues
(
buf2
,
&
len
,
pCfg
);
if
(
code
)
{
taosMemoryFree
(
buf2
);
return
code
;
}
len
+=
sprintf
(
buf2
+
VARSTR_HEADER_SIZE
+
len
,
")"
);
...
...
@@ -527,6 +533,8 @@ static int32_t setCreateTBResultIntoDataBlock(SSDataBlock* pBlock, SDbCfgInfo* p
colDataAppend
(
pCol2
,
0
,
buf2
,
false
);
taosMemoryFree
(
buf2
);
return
TSDB_CODE_SUCCESS
;
}
...
...
source/libs/nodes/src/nodesUtilFuncs.c
浏览文件 @
067af996
...
...
@@ -190,28 +190,20 @@ int32_t nodesReleaseAllocator(int64_t allocatorId) {
return
TSDB_CODE_SUCCESS
;
}
SNodeAllocator
*
pAllocator
=
taosAcquireRef
(
g_allocatorReqRefPool
,
allocatorId
);
if
(
NULL
==
pAllocator
)
{
return
terrno
;
}
int32_t
code
=
taosThreadMutexTryLock
(
&
pAllocator
->
mutex
);
if
(
EBUSY
!=
code
)
{
if
(
NULL
==
g_pNodeAllocator
)
{
nodesError
(
"allocator id %"
PRIx64
" release failed: The nodesReleaseAllocator function needs to be called after the nodesAcquireAllocator "
"function is called!"
,
allocatorId
);
if
(
0
==
code
)
{
taosThreadMutexUnlock
(
&
pAllocator
->
mutex
);
}
return
TSDB_CODE_FAILED
;
}
SNodeAllocator
*
pAllocator
=
g_pNodeAllocator
;
g_pNodeAllocator
=
NULL
;
taosThreadMutexUnlock
(
&
pAllocator
->
mutex
);
return
taosReleaseRef
(
g_allocatorReqRefPool
,
allocatorId
);
}
int64_t
nodesMakeAllocatorWeakRef
(
int64_t
allocatorId
)
{
if
(
allocatorId
<=
0
)
{
return
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录