Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d85d6d3f
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
d85d6d3f
编写于
5月 23, 2022
作者:
C
Cary Xu
提交者:
GitHub
5月 23, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #12856 from taosdata/feature/TD-13066-3.0
fix: use bound index instead of colid in case of alter schema
上级
f9563922
82030735
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
9 addition
and
12 deletion
+9
-12
include/common/ttypes.h
include/common/ttypes.h
+1
-1
source/common/src/tdatablock.c
source/common/src/tdatablock.c
+1
-1
source/common/src/tmsg.c
source/common/src/tmsg.c
+1
-1
source/common/src/trow.c
source/common/src/trow.c
+1
-1
source/dnode/vnode/src/meta/metaQuery.c
source/dnode/vnode/src/meta/metaQuery.c
+2
-1
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+2
-6
source/libs/parser/src/parInsert.c
source/libs/parser/src/parInsert.c
+1
-1
未找到文件。
include/common/ttypes.h
浏览文件 @
d85d6d3f
...
...
@@ -30,7 +30,7 @@ typedef uint64_t TDRowVerT;
typedef
int16_t
col_id_t
;
typedef
int8_t
col_type_t
;
typedef
int32_t
col_bytes_t
;
typedef
uint16
_t
schema_ver_t
;
typedef
int32
_t
schema_ver_t
;
typedef
int32_t
func_id_t
;
#pragma pack(push, 1)
...
...
source/common/src/tdatablock.c
浏览文件 @
d85d6d3f
...
...
@@ -1538,7 +1538,7 @@ int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SArray* pDataBlocks
int32_t
msgLen
=
sizeof
(
SSubmitReq
);
int32_t
numOfBlks
=
0
;
SRowBuilder
rb
=
{
0
};
tdSRowInit
(
&
rb
,
0
);
// TODO: use the latest version
tdSRowInit
(
&
rb
,
pTSchema
->
version
);
// TODO: use the latest version
for
(
int32_t
i
=
0
;
i
<
sz
;
++
i
)
{
SSDataBlock
*
pDataBlock
=
taosArrayGet
(
pDataBlocks
,
i
);
...
...
source/common/src/tmsg.c
浏览文件 @
d85d6d3f
...
...
@@ -3817,7 +3817,7 @@ int tDecodeSVCreateStbReq(SDecoder *pCoder, SVCreateStbReq *pReq) {
STSchema
*
tdGetSTSChemaFromSSChema
(
SSchema
**
pSchema
,
int32_t
nCols
)
{
STSchemaBuilder
schemaBuilder
=
{
0
};
if
(
tdInitTSchemaBuilder
(
&
schemaBuilder
,
0
)
<
0
)
{
if
(
tdInitTSchemaBuilder
(
&
schemaBuilder
,
1
)
<
0
)
{
return
NULL
;
}
...
...
source/common/src/trow.c
浏览文件 @
d85d6d3f
...
...
@@ -924,7 +924,7 @@ void tdSRowPrint(STSRow *row, STSchema *pSchema, const char *tag) {
STSRowIter
iter
=
{
0
};
tdSTSRowIterInit
(
&
iter
,
pSchema
);
tdSTSRowIterReset
(
&
iter
,
row
);
printf
(
"%s >>>
"
,
tag
);
printf
(
"%s >>>
type:%d,sver:%d "
,
tag
,
(
int32_t
)
TD_ROW_TYPE
(
row
),
(
int32_t
)
TD_ROW_SVER
(
row
)
);
for
(
int
i
=
0
;
i
<
pSchema
->
numOfCols
;
++
i
)
{
STColumn
*
stCol
=
pSchema
->
columns
+
i
;
SCellVal
sVal
=
{
255
,
NULL
};
...
...
source/dnode/vnode/src/meta/metaQuery.c
浏览文件 @
d85d6d3f
...
...
@@ -278,12 +278,13 @@ STSchema *metaGetTbTSchema(SMeta *pMeta, tb_uid_t uid, int32_t sver) {
pSW
=
metaGetTableSchema
(
pMeta
,
quid
,
sver
,
0
);
if
(
!
pSW
)
return
NULL
;
tdInitTSchemaBuilder
(
&
sb
,
0
);
tdInitTSchemaBuilder
(
&
sb
,
sver
);
for
(
int
i
=
0
;
i
<
pSW
->
nCols
;
i
++
)
{
pSchema
=
pSW
->
pSchema
+
i
;
tdAddColToSchema
(
&
sb
,
pSchema
->
type
,
pSchema
->
flags
,
pSchema
->
colId
,
pSchema
->
bytes
);
}
pTSchema
=
tdGetSchemaFromBuilder
(
&
sb
);
tdDestroyTSchemaBuilder
(
&
sb
);
taosMemoryFree
(
pSW
->
pSchema
);
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
d85d6d3f
...
...
@@ -1638,9 +1638,7 @@ static int32_t mergeTwoRowFromMem(STsdbReadHandle* pTsdbReadHandle, int32_t capa
int32_t
numOfColsOfRow1
=
0
;
if
(
pSchema1
==
NULL
)
{
// pSchema1 = metaGetTbTSchema(REPO_META(pTsdbReadHandle->pTsdb), uid, TD_ROW_SVER(row1));
// TODO: use the real schemaVersion
pSchema1
=
metaGetTbTSchema
(
REPO_META
(
pTsdbReadHandle
->
pTsdb
),
uid
,
1
);
pSchema1
=
metaGetTbTSchema
(
REPO_META
(
pTsdbReadHandle
->
pTsdb
),
uid
,
TD_ROW_SVER
(
row1
));
}
#ifdef TD_DEBUG_PRINT_ROW
...
...
@@ -1657,9 +1655,7 @@ static int32_t mergeTwoRowFromMem(STsdbReadHandle* pTsdbReadHandle, int32_t capa
if
(
row2
)
{
isRow2DataRow
=
TD_IS_TP_ROW
(
row2
);
if
(
pSchema2
==
NULL
)
{
// pSchema2 = metaGetTbTSchema(REPO_META(pTsdbReadHandle->pTsdb), uid, TD_ROW_SVER(row2));
// TODO: use the real schemaVersion
pSchema2
=
metaGetTbTSchema
(
REPO_META
(
pTsdbReadHandle
->
pTsdb
),
uid
,
1
);
pSchema2
=
metaGetTbTSchema
(
REPO_META
(
pTsdbReadHandle
->
pTsdb
),
uid
,
TD_ROW_SVER
(
row2
));
}
if
(
isRow2DataRow
)
{
numOfColsOfRow2
=
schemaNCols
(
pSchema2
);
...
...
source/libs/parser/src/parInsert.c
浏览文件 @
d85d6d3f
...
...
@@ -647,7 +647,7 @@ static FORCE_INLINE int32_t MemRowAppend(SMsgBuf* pMsgBuf, const void* value, in
if
(
TSDB_DATA_TYPE_BINARY
==
pa
->
schema
->
type
)
{
const
char
*
rowEnd
=
tdRowEnd
(
rb
->
pBuf
);
STR_WITH_SIZE_TO_VARSTR
(
rowEnd
,
value
,
len
);
tdAppendColValToRow
(
rb
,
pa
->
schema
->
colId
,
pa
->
schema
->
type
,
TD_VTYPE_NORM
,
rowEnd
,
tru
e
,
pa
->
toffset
,
pa
->
colIdx
);
tdAppendColValToRow
(
rb
,
pa
->
schema
->
colId
,
pa
->
schema
->
type
,
TD_VTYPE_NORM
,
rowEnd
,
fals
e
,
pa
->
toffset
,
pa
->
colIdx
);
}
else
if
(
TSDB_DATA_TYPE_NCHAR
==
pa
->
schema
->
type
)
{
// if the converted output len is over than pColumnModel->bytes, return error: 'Argument list too long'
int32_t
output
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录