[td-225] fix bugs in join

This commit is contained in:
Haojun Liao 2020-06-27 17:05:08 +08:00
parent 5835964c15
commit 04ad350559
1 changed files with 4 additions and 2 deletions

View File

@ -5858,11 +5858,13 @@ static int32_t doDumpQueryResult(SQInfo *pQInfo, char *data) {
int32_t s = lseek(fd, 0, SEEK_END); int32_t s = lseek(fd, 0, SEEK_END);
UNUSED(s); UNUSED(s);
qTrace("QInfo:%p ts comp data return, file:%s, size:%d", pQInfo, pQuery->sdata[0]->data, s); qTrace("QInfo:%p ts comp data return, file:%s, size:%d", pQInfo, pQuery->sdata[0]->data, s);
s = lseek(fd, 0, SEEK_SET); if (lseek(fd, 0, SEEK_SET) >= 0) {
if (s >= 0) {
size_t sz = read(fd, data, s); size_t sz = read(fd, data, s);
UNUSED(sz); UNUSED(sz);
} else {
// todo handle error
} }
close(fd); close(fd);
unlink(pQuery->sdata[0]->data); unlink(pQuery->sdata[0]->data);
} else { } else {