fix: review comments
This commit is contained in:
parent
0c6338dc15
commit
de411ebad1
|
@ -244,7 +244,7 @@ typedef enum {
|
||||||
TAOS_CONN_MODE_BI = 0,
|
TAOS_CONN_MODE_BI = 0,
|
||||||
} TAOS_CONN_MODE;
|
} TAOS_CONN_MODE;
|
||||||
|
|
||||||
DLL_EXPORT int taos_set_mode(TAOS* taos, int mode, int value);
|
DLL_EXPORT int taos_set_conn_mode(TAOS* taos, int mode, int value);
|
||||||
/* --------------------------schemaless INTERFACE------------------------------- */
|
/* --------------------------schemaless INTERFACE------------------------------- */
|
||||||
|
|
||||||
DLL_EXPORT TAOS_RES *taos_schemaless_insert(TAOS *taos, char *lines[], int numLines, int protocol, int precision);
|
DLL_EXPORT TAOS_RES *taos_schemaless_insert(TAOS *taos, char *lines[], int numLines, int protocol, int precision);
|
||||||
|
|
|
@ -297,7 +297,8 @@ int32_t parseSql(SRequestObj* pRequest, bool topicQuery, SQuery** pQuery, SStmtC
|
||||||
|
|
||||||
int32_t execLocalCmd(SRequestObj* pRequest, SQuery* pQuery) {
|
int32_t execLocalCmd(SRequestObj* pRequest, SQuery* pQuery) {
|
||||||
SRetrieveTableRsp* pRsp = NULL;
|
SRetrieveTableRsp* pRsp = NULL;
|
||||||
int32_t code = qExecCommand(&pRequest->pTscObj->id, pRequest->pTscObj->sysInfo, pQuery->pRoot, &pRsp, pRequest->pTscObj->biMode);
|
int8_t biMode = atomic_load_8(&pRequest->pTscObj->biMode);
|
||||||
|
int32_t code = qExecCommand(&pRequest->pTscObj->id, pRequest->pTscObj->sysInfo, pQuery->pRoot, &pRsp, biMode);
|
||||||
if (TSDB_CODE_SUCCESS == code && NULL != pRsp) {
|
if (TSDB_CODE_SUCCESS == code && NULL != pRsp) {
|
||||||
code = setQueryResultFromRsp(&pRequest->body.resInfo, pRsp, false, true);
|
code = setQueryResultFromRsp(&pRequest->body.resInfo, pRsp, false, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1832,7 +1832,7 @@ int taos_stmt_close(TAOS_STMT *stmt) {
|
||||||
return stmtClose(stmt);
|
return stmtClose(stmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
int taos_set_mode(TAOS* taos, int mode, int value) {
|
int taos_set_conn_mode(TAOS* taos, int mode, int value) {
|
||||||
if (taos == NULL) {
|
if (taos == NULL) {
|
||||||
terrno = TSDB_CODE_INVALID_PARA;
|
terrno = TSDB_CODE_INVALID_PARA;
|
||||||
return terrno;
|
return terrno;
|
||||||
|
@ -1848,6 +1848,9 @@ int taos_set_mode(TAOS* taos, int mode, int value) {
|
||||||
case TAOS_CONN_MODE_BI:
|
case TAOS_CONN_MODE_BI:
|
||||||
atomic_store_8(&pObj->biMode, value);
|
atomic_store_8(&pObj->biMode, value);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
tscError("not supported mode.");
|
||||||
|
return TSDB_CODE_INVALID_PARA;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
|
@ -89,7 +89,8 @@ static int32_t buildDescResultDataBlock(SSDataBlock** pOutput) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static int32_t setDescResultIntoDataBlock(bool sysInfoUser, SSDataBlock* pBlock, int32_t numOfRows, STableMeta* pMeta, int8_t biMode) {
|
static int32_t setDescResultIntoDataBlock(bool sysInfoUser, SSDataBlock* pBlock, int32_t numOfRows, STableMeta* pMeta, int8_t biMode) {
|
||||||
blockDataEnsureCapacity(pBlock, numOfRows + 1);
|
int32_t blockCap = (biMode != 0) ? numOfRows + 1 : numOfRows;
|
||||||
|
blockDataEnsureCapacity(pBlock, blockCap);
|
||||||
pBlock->info.rows = 0;
|
pBlock->info.rows = 0;
|
||||||
|
|
||||||
// field
|
// field
|
||||||
|
|
Loading…
Reference in New Issue