[td-225] fix error in join

This commit is contained in:
Haojun Liao 2020-06-23 22:37:47 +08:00
parent 9a6dd6d497
commit 404d21706d
1 changed files with 3 additions and 1 deletions

View File

@ -824,7 +824,9 @@ int tscBuildQueryMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
tscError("%p: fseek failed: %s", pSql, tstrerror(code)); tscError("%p: fseek failed: %s", pSql, tstrerror(code));
return code; return code;
} }
if (fread(pMsg, pBlockInfo->compLen, 1, pQueryInfo->tsBuf->f) != pBlockInfo->compLen) {
size_t s = fread(pMsg, 1, pBlockInfo->compLen, pQueryInfo->tsBuf->f);
if (s != pBlockInfo->compLen) {
int code = TAOS_SYSTEM_ERROR(ferror(pQueryInfo->tsBuf->f)); int code = TAOS_SYSTEM_ERROR(ferror(pQueryInfo->tsBuf->f));
tscError("%p: fread didn't return expected data: %s", pSql, tstrerror(code)); tscError("%p: fread didn't return expected data: %s", pSql, tstrerror(code));
return code; return code;