diff --git a/src/plugins/http/inc/httpInt.h b/src/plugins/http/inc/httpInt.h index 4fae4e74c9..36a022159f 100644 --- a/src/plugins/http/inc/httpInt.h +++ b/src/plugins/http/inc/httpInt.h @@ -36,7 +36,7 @@ #define HTTP_BUFFER_SIZE 8388608 #define HTTP_STEP_SIZE 4096 //http message get process step by step #define HTTP_METHOD_SCANNER_SIZE 7 //http method fp size -#define TSDB_CODE_HTTP_GC_TARGET_SIZE 512 +#define HTTP_GC_TARGET_SIZE 512 #define HTTP_WRITE_RETRY_TIMES 500 #define HTTP_WRITE_WAIT_TIME_MS 5 #define HTTP_SESSION_ID_LEN (TSDB_USER_LEN + TSDB_PASSWORD_LEN) diff --git a/src/plugins/http/inc/httpSql.h b/src/plugins/http/inc/httpSql.h index 660a65e44d..db3e3a3b16 100644 --- a/src/plugins/http/inc/httpSql.h +++ b/src/plugins/http/inc/httpSql.h @@ -29,10 +29,10 @@ void httpFreeMultiCmds(HttpContext *pContext); HttpSqlCmd *httpNewSqlCmd(HttpContext *pContext); HttpSqlCmd *httpCurrSqlCmd(HttpContext *pContext); -int32_t httpCurSqlCmdPos(HttpContext *pContext); +int32_t httpCurSqlCmdPos(HttpContext *pContext); -void httpTrimTableName(char *name); +void httpTrimTableName(char *name); int32_t httpShrinkTableName(HttpContext *pContext, int32_t pos, char *name); -char *httpGetCmdsString(HttpContext *pContext, int32_t pos); +char * httpGetCmdsString(HttpContext *pContext, int32_t pos); #endif diff --git a/src/plugins/http/src/httpGcHandle.c b/src/plugins/http/src/httpGcHandle.c index 01be301637..5d4cb0c680 100644 --- a/src/plugins/http/src/httpGcHandle.c +++ b/src/plugins/http/src/httpGcHandle.c @@ -228,7 +228,7 @@ bool gcProcessQueryRequest(HttpContext* pContext) { cmd->values = refIdBuffer; cmd->table = aliasBuffer; cmd->numOfRows = 0; // hack way as target flags - cmd->timestamp = httpAddToSqlCmdBufferWithSize(pContext, TSDB_CODE_HTTP_GC_TARGET_SIZE + 1); // hack way + cmd->timestamp = httpAddToSqlCmdBufferWithSize(pContext, HTTP_GC_TARGET_SIZE + 1); // hack way if (cmd->timestamp == -1) { httpWarn("context:%p, fd:%d, user:%s, cant't malloc target size, sql buffer is full", pContext, pContext->fd, diff --git a/src/plugins/http/src/httpGcJson.c b/src/plugins/http/src/httpGcJson.c index e864d54ac0..a291641dc3 100644 --- a/src/plugins/http/src/httpGcJson.c +++ b/src/plugins/http/src/httpGcJson.c @@ -129,48 +129,48 @@ bool gcBuildQueryJson(HttpContext *pContext, HttpSqlCmd *cmd, TAOS_RES *result, // for group by if (groupFields != -1) { - char target[TSDB_CODE_HTTP_GC_TARGET_SIZE] = {0}; + char target[HTTP_GC_TARGET_SIZE] = {0}; int32_t len; - len = snprintf(target,TSDB_CODE_HTTP_GC_TARGET_SIZE,"%s{",aliasBuffer); + len = snprintf(target,HTTP_GC_TARGET_SIZE,"%s{",aliasBuffer); for (int32_t i = dataFields + 1; i