[TD-825] change conditions of restful interface
This commit is contained in:
parent
a1d992e321
commit
95c92802f8
|
@ -47,6 +47,10 @@ void httpProcessMultiSqlRetrieveCallBack(void *param, TAOS_RES *result, int numO
|
|||
}
|
||||
}
|
||||
|
||||
if (tscResultsetFetchCompleted(result)) {
|
||||
isContinue = false;
|
||||
}
|
||||
|
||||
if (isContinue) {
|
||||
// retrieve next batch of rows
|
||||
httpDebug("context:%p, fd:%d, ip:%s, user:%s, process pos:%d, continue retrieve, numOfRows:%d, sql:%s",
|
||||
|
@ -75,7 +79,8 @@ void httpProcessMultiSqlCallBack(void *param, TAOS_RES *result, int code) {
|
|||
HttpContext *pContext = (HttpContext *)param;
|
||||
if (pContext == NULL) return;
|
||||
|
||||
HttpSqlCmds * multiCmds = pContext->multiCmds;
|
||||
code = taos_errno(result);
|
||||
HttpSqlCmds *multiCmds = pContext->multiCmds;
|
||||
HttpEncodeMethod *encode = pContext->encodeMethod;
|
||||
|
||||
HttpSqlCmd *singleCmd = multiCmds->cmds + multiCmds->pos;
|
||||
|
@ -109,8 +114,8 @@ void httpProcessMultiSqlCallBack(void *param, TAOS_RES *result, int code) {
|
|||
return;
|
||||
}
|
||||
|
||||
int num_fields = taos_field_count(result);
|
||||
if (num_fields == 0) {
|
||||
bool isUpdate = tscIsUpdateQuery(result);
|
||||
if (isUpdate) {
|
||||
// not select or show commands
|
||||
int affectRows = taos_affected_rows(result);
|
||||
httpDebug("context:%p, fd:%d, ip:%s, user:%s, process pos:%d, affect rows:%d, sql:%s",
|
||||
|
@ -238,6 +243,11 @@ void httpProcessSingleSqlCallBack(void *param, TAOS_RES *result, int unUsedCode)
|
|||
if (pContext == NULL) return;
|
||||
|
||||
int32_t code = taos_errno(result);
|
||||
if (code != unUsedCode) {
|
||||
httpError("context:%p, fd:%d, ip:%s, user:%s, resultset code:%s input code:%s not matched, sqlObj:%p", pContext,
|
||||
pContext->fd, pContext->ipstr, pContext->user, tstrerror(code), tstrerror(unUsedCode), (SSqlObj *)result);
|
||||
}
|
||||
|
||||
HttpEncodeMethod *encode = pContext->encodeMethod;
|
||||
|
||||
if (code == TSDB_CODE_TSC_ACTION_IN_PROGRESS) {
|
||||
|
|
Loading…
Reference in New Issue