[TD-4394]fix core when select data after modify tag width
This commit is contained in:
parent
019860111d
commit
c2a558cd21
|
@ -7519,7 +7519,8 @@ static void doSetTagValueToResultBuf(char* output, const char* val, int16_t type
|
|||
if (IS_VAR_DATA_TYPE(type)) {
|
||||
// Binary data overflows for sort of unknown reasons. Let trim the overflow data
|
||||
if (varDataTLen(val) > bytes) {
|
||||
int32_t len = bytes - VARSTR_HEADER_SIZE; // remain available space
|
||||
int32_t maxLen = bytes - VARSTR_HEADER_SIZE;
|
||||
int32_t len = (varDataLen(val) > maxLen)? maxLen:varDataLen(val);
|
||||
memcpy(varDataVal(output), varDataVal(val), len);
|
||||
varDataSetLen(output, len);
|
||||
} else {
|
||||
|
|
|
@ -211,7 +211,7 @@ void *tsdbGetTableTagVal(const void* pTable, int32_t colId, int16_t type, int16_
|
|||
}
|
||||
|
||||
char *val = tdGetKVRowValOfCol(((STable*)pTable)->tagVal, colId);
|
||||
assert(type == pCol->type && bytes == pCol->bytes);
|
||||
assert(type == pCol->type && bytes >= pCol->bytes);
|
||||
|
||||
// if (val != NULL && IS_VAR_DATA_TYPE(type)) {
|
||||
// assert(varDataLen(val) < pCol->bytes);
|
||||
|
|
Loading…
Reference in New Issue