fix: use real schema version
This commit is contained in:
parent
f63552c213
commit
d6bd729888
|
@ -1538,7 +1538,7 @@ int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SArray* pDataBlocks
|
||||||
int32_t msgLen = sizeof(SSubmitReq);
|
int32_t msgLen = sizeof(SSubmitReq);
|
||||||
int32_t numOfBlks = 0;
|
int32_t numOfBlks = 0;
|
||||||
SRowBuilder rb = {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) {
|
for (int32_t i = 0; i < sz; ++i) {
|
||||||
SSDataBlock* pDataBlock = taosArrayGet(pDataBlocks, i);
|
SSDataBlock* pDataBlock = taosArrayGet(pDataBlocks, i);
|
||||||
|
|
|
@ -3817,7 +3817,7 @@ int tDecodeSVCreateStbReq(SDecoder *pCoder, SVCreateStbReq *pReq) {
|
||||||
|
|
||||||
STSchema *tdGetSTSChemaFromSSChema(SSchema **pSchema, int32_t nCols) {
|
STSchema *tdGetSTSChemaFromSSChema(SSchema **pSchema, int32_t nCols) {
|
||||||
STSchemaBuilder schemaBuilder = {0};
|
STSchemaBuilder schemaBuilder = {0};
|
||||||
if (tdInitTSchemaBuilder(&schemaBuilder, 0) < 0) {
|
if (tdInitTSchemaBuilder(&schemaBuilder, 1) < 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -284,6 +284,8 @@ STSchema *metaGetTbTSchema(SMeta *pMeta, tb_uid_t uid, int32_t sver) {
|
||||||
tdAddColToSchema(&sb, pSchema->type, pSchema->flags, pSchema->colId, pSchema->bytes);
|
tdAddColToSchema(&sb, pSchema->type, pSchema->flags, pSchema->colId, pSchema->bytes);
|
||||||
}
|
}
|
||||||
pTSchema = tdGetSchemaFromBuilder(&sb);
|
pTSchema = tdGetSchemaFromBuilder(&sb);
|
||||||
|
pTSchema->version = sver;
|
||||||
|
|
||||||
tdDestroyTSchemaBuilder(&sb);
|
tdDestroyTSchemaBuilder(&sb);
|
||||||
|
|
||||||
taosMemoryFree(pSW->pSchema);
|
taosMemoryFree(pSW->pSchema);
|
||||||
|
|
Loading…
Reference in New Issue