[TD-657] fix describe the table bugs
This commit is contained in:
parent
b9b0a42861
commit
b986843d7d
|
@ -183,9 +183,13 @@ static int32_t tscSetValueToResObj(SSqlObj *pSql, int32_t rowLen) {
|
|||
// type length
|
||||
int32_t bytes = pSchema[i].bytes;
|
||||
pField = tscFieldInfoGetField(&pQueryInfo->fieldsInfo, 2);
|
||||
if (pSchema[i].type == TSDB_DATA_TYPE_BINARY || pSchema[i].type == TSDB_DATA_TYPE_NCHAR) {
|
||||
bytes -= VARSTR_HEADER_SIZE;
|
||||
|
||||
if (pSchema[i].type == TSDB_DATA_TYPE_NCHAR) {
|
||||
bytes = bytes / TSDB_NCHAR_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
*(int32_t *)(pRes->data + tscFieldInfoGetOffset(pQueryInfo, 2) * totalNumOfRows + pField->bytes * i) = bytes;
|
||||
|
||||
|
|
Loading…
Reference in New Issue