Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
5a7d5123
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看板
提交
5a7d5123
编写于
7月 03, 2020
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-225] fix bugs found in regression test.
上级
f3674d28
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
10 addition
and
10 deletion
+10
-10
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+1
-1
src/common/inc/tdataformat.h
src/common/inc/tdataformat.h
+3
-3
src/common/src/tdataformat.c
src/common/src/tdataformat.c
+4
-4
src/tsdb/src/tsdbMeta.c
src/tsdb/src/tsdbMeta.c
+2
-2
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
5a7d5123
...
...
@@ -4514,7 +4514,7 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
if
(
pTagsSchema
->
type
!=
TSDB_DATA_TYPE_BINARY
&&
pTagsSchema
->
type
!=
TSDB_DATA_TYPE_NCHAR
)
{
len
=
tDataTypeDesc
[
pTagsSchema
->
type
].
nSize
;
}
else
{
len
=
varDataTLen
(
pUpdateMsg
->
data
);
len
=
varDataTLen
(
pUpdateMsg
->
data
+
schemaLen
);
}
pUpdateMsg
->
tagValLen
=
htonl
(
len
);
// length may be changed after dump data
...
...
src/common/inc/tdataformat.h
浏览文件 @
5a7d5123
...
...
@@ -50,8 +50,8 @@ extern "C" {
typedef
struct
{
int8_t
type
;
// Column type
int16_t
colId
;
// column ID
int
32
_t
bytes
;
// column bytes
int
32
_t
offset
;
// point offset in SDataRow after the header part
int
16
_t
bytes
;
// column bytes
int
16
_t
offset
;
// point offset in SDataRow after the header part
}
STColumn
;
#define colType(col) ((col)->type)
...
...
@@ -116,7 +116,7 @@ typedef struct {
int
tdInitTSchemaBuilder
(
STSchemaBuilder
*
pBuilder
,
int32_t
version
);
void
tdDestroyTSchemaBuilder
(
STSchemaBuilder
*
pBuilder
);
void
tdResetTSchemaBuilder
(
STSchemaBuilder
*
pBuilder
,
int32_t
version
);
int
tdAddColToSchema
(
STSchemaBuilder
*
pBuilder
,
int8_t
type
,
int16_t
colId
,
int
32
_t
bytes
);
int
tdAddColToSchema
(
STSchemaBuilder
*
pBuilder
,
int8_t
type
,
int16_t
colId
,
int
16
_t
bytes
);
STSchema
*
tdGetSchemaFromBuilder
(
STSchemaBuilder
*
pBuilder
);
// ----------------- Data row structure
...
...
src/common/src/tdataformat.c
浏览文件 @
5a7d5123
...
...
@@ -43,7 +43,7 @@ int tdEncodeSchema(void **buf, STSchema *pSchema) {
STColumn
*
pCol
=
schemaColAt
(
pSchema
,
i
);
tlen
+=
taosEncodeFixedI8
(
buf
,
colType
(
pCol
));
tlen
+=
taosEncodeFixedI16
(
buf
,
colColId
(
pCol
));
tlen
+=
taosEncodeFixedI
32
(
buf
,
colBytes
(
pCol
));
tlen
+=
taosEncodeFixedI
16
(
buf
,
colBytes
(
pCol
));
}
return
tlen
;
...
...
@@ -65,10 +65,10 @@ void *tdDecodeSchema(void *buf, STSchema **pRSchema) {
for
(
int
i
=
0
;
i
<
numOfCols
;
i
++
)
{
int8_t
type
=
0
;
int16_t
colId
=
0
;
int
32
_t
bytes
=
0
;
int
16
_t
bytes
=
0
;
buf
=
taosDecodeFixedI8
(
buf
,
&
type
);
buf
=
taosDecodeFixedI16
(
buf
,
&
colId
);
buf
=
taosDecodeFixedI
32
(
buf
,
&
bytes
);
buf
=
taosDecodeFixedI
16
(
buf
,
&
bytes
);
if
(
tdAddColToSchema
(
&
schemaBuilder
,
type
,
colId
,
bytes
)
<
0
)
{
tdDestroyTSchemaBuilder
(
&
schemaBuilder
);
return
NULL
;
...
...
@@ -105,7 +105,7 @@ void tdResetTSchemaBuilder(STSchemaBuilder *pBuilder, int32_t version) {
pBuilder
->
version
=
version
;
}
int
tdAddColToSchema
(
STSchemaBuilder
*
pBuilder
,
int8_t
type
,
int16_t
colId
,
int
32
_t
bytes
)
{
int
tdAddColToSchema
(
STSchemaBuilder
*
pBuilder
,
int8_t
type
,
int16_t
colId
,
int
16
_t
bytes
)
{
if
(
!
isValidDataType
(
type
))
return
-
1
;
if
(
pBuilder
->
nCols
>=
pBuilder
->
tCols
)
{
...
...
src/tsdb/src/tsdbMeta.c
浏览文件 @
5a7d5123
...
...
@@ -283,8 +283,8 @@ int tsdbUpdateTagValue(TSDB_REPO_T *repo, SUpdateTableTagValMsg *pMsg) {
for
(
int32_t
i
=
0
;
i
<
pMsg
->
numOfTags
;
++
i
)
{
STColumn
*
pCol
=
(
STColumn
*
)
d
;
pCol
->
colId
=
htons
(
pCol
->
colId
);
pCol
->
bytes
=
hton
l
(
pCol
->
bytes
);
assert
(
pCol
->
offset
==
0
)
;
pCol
->
bytes
=
hton
s
(
pCol
->
bytes
);
pCol
->
offset
=
0
;
d
+=
sizeof
(
STColumn
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录