提交 e3ab7346 编写于 作者: S slguan

compile options

上级 cb1c3a17
...@@ -1071,7 +1071,7 @@ int doParseInsertSql(SSqlObj *pSql, char *str) { ...@@ -1071,7 +1071,7 @@ int doParseInsertSql(SSqlObj *pSql, char *str) {
} }
// todo add to return // todo add to return
tscError("async insert parse error, code:%d, %s", code, tsError[code]); tscError("async insert parse error, code:%d, %s", code, tstrerror(code));
pSql->asyncTblPos = NULL; pSql->asyncTblPos = NULL;
} }
......
...@@ -849,7 +849,7 @@ char *taos_errstr(TAOS *taos) { ...@@ -849,7 +849,7 @@ char *taos_errstr(TAOS *taos) {
STscObj *pObj = (STscObj *)taos; STscObj *pObj = (STscObj *)taos;
uint8_t code; uint8_t code;
if (pObj == NULL || pObj->signature != pObj) return tsError[globalCode]; if (pObj == NULL || pObj->signature != pObj) return tstrerror(globalCode);
SSqlObj* pSql = pObj->pSql; SSqlObj* pSql = pObj->pSql;
...@@ -862,7 +862,7 @@ char *taos_errstr(TAOS *taos) { ...@@ -862,7 +862,7 @@ char *taos_errstr(TAOS *taos) {
if (hasAdditionalErrorInfo(code, &pSql->cmd)) { if (hasAdditionalErrorInfo(code, &pSql->cmd)) {
return pSql->cmd.payload; return pSql->cmd.payload;
} else { } else {
return tsError[code]; return tstrerror(code);
} }
} }
......
...@@ -4,25 +4,18 @@ PROJECT(TDengine) ...@@ -4,25 +4,18 @@ PROJECT(TDengine)
IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM)) IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
INCLUDE_DIRECTORIES(${TD_OS_DIR}/inc) INCLUDE_DIRECTORIES(${TD_OS_DIR}/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/inc) INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/util/inc)
INCLUDE_DIRECTORIES(${TD_ENTERPRISE_DIR}/src/inc) INCLUDE_DIRECTORIES(${TD_ENTERPRISE_DIR}/src/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/dnode/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/mnode/detail/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/vnode/detail/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/client/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/modules/http/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/modules/monitor/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/inc)
INCLUDE_DIRECTORIES(${TD_ENTERPRISE_DIR}/src/util/cluster/inc)
INCLUDE_DIRECTORIES(inc) INCLUDE_DIRECTORIES(inc)
AUX_SOURCE_DIRECTORY(src SRC) AUX_SOURCE_DIRECTORY(src SRC)
ADD_EXECUTABLE(taosd ${SRC}) ADD_LIBRARY(dnode ${SRC})
TARGET_LINK_LIBRARIES(taosd mnode vnode taos_static monitor http) #ADD_EXECUTABLE(taosd ${SRC})
#TARGET_LINK_LIBRARIES(taosd mnode sdb vnode taos_static monitor http)
IF (TD_CLUSTER) #IF (TD_CLUSTER)
TARGET_LINK_LIBRARIES(taosd dcluster) # TARGET_LINK_LIBRARIES(taosd dcluster)
ENDIF () #ENDIF ()
SET(PREPARE_ENV_CMD "prepare_env_cmd") SET(PREPARE_ENV_CMD "prepare_env_cmd")
SET(PREPARE_ENV_TARGET "prepare_env_target") SET(PREPARE_ENV_TARGET "prepare_env_target")
......
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
extern "C" { extern "C" {
#endif #endif
#include <stdint.h>
#include <stdbool.h>
#ifdef TAOS_ERROR_C #ifdef TAOS_ERROR_C
#define TAOS_DEFINE_ERROR(name, mod, code, msg) {.val = (0x80000000 | ((mod)<<16) | (code)), .str=(msg)}, #define TAOS_DEFINE_ERROR(name, mod, code, msg) {.val = (0x80000000 | ((mod)<<16) | (code)), .str=(msg)},
#else #else
......
...@@ -319,9 +319,6 @@ typedef struct { ...@@ -319,9 +319,6 @@ typedef struct {
char reserved[16]; char reserved[16];
int32_t sversion; int32_t sversion;
SMColumn schema[]; SMColumn schema[];
SVariableMsg tags;
} SCreateMsg; } SCreateMsg;
typedef struct { typedef struct {
......
...@@ -451,7 +451,7 @@ void httpJsonPairStatus(JsonBuf* buf, int code) { ...@@ -451,7 +451,7 @@ void httpJsonPairStatus(JsonBuf* buf, int code) {
} else if (code == TSDB_CODE_INVALID_TABLE) { } else if (code == TSDB_CODE_INVALID_TABLE) {
httpJsonPair(buf, "desc", 4, "failed to create table", 22); httpJsonPair(buf, "desc", 4, "failed to create table", 22);
} else } else
httpJsonPair(buf, "desc", 4, tsError[code], (int)strlen(tsError[code])); httpJsonPair(buf, "desc", 4, tstrerror(code), (int)strlen(tstrerror(code)));
} }
} }
} }
\ No newline at end of file
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(TDengine) PROJECT(TDengine)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/inc)
INCLUDE_DIRECTORIES(${TD_OS_DIR}/inc) INCLUDE_DIRECTORIES(${TD_OS_DIR}/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/util/inc)
INCLUDE_DIRECTORIES(inc) INCLUDE_DIRECTORIES(inc)
IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM)) IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
......
...@@ -699,10 +699,7 @@ int taosSendPacketViaTcp(uint32_t ip, uint16_t port, char *data, int dataLen, vo ...@@ -699,10 +699,7 @@ int taosSendPacketViaTcp(uint32_t ip, uint16_t port, char *data, int dataLen, vo
pHead = (STaosHeader *)buffer; pHead = (STaosHeader *)buffer;
memcpy(pHead, data, sizeof(STaosHeader)); memcpy(pHead, data, sizeof(STaosHeader));
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wbitfield-constant-conversion"
pHead->tcp = 2; pHead->tcp = 2;
#pragma GCC diagnostic pop
msgLen = sizeof(STaosHeader); msgLen = sizeof(STaosHeader);
pHead->msgLen = (int32_t)htonl(msgLen); pHead->msgLen = (int32_t)htonl(msgLen);
......
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(TDengine) PROJECT(TDengine)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/inc)
INCLUDE_DIRECTORIES(${TD_OS_DIR}/inc) INCLUDE_DIRECTORIES(${TD_OS_DIR}/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/inc)
INCLUDE_DIRECTORIES(${TD_COMMUNITY_DIR}/src/util/inc)
INCLUDE_DIRECTORIES(inc) INCLUDE_DIRECTORIES(inc)
IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM)) IF ((TD_LINUX_64) OR (TD_LINUX_32 AND TD_ARM))
......
...@@ -25,13 +25,13 @@ extern "C" { ...@@ -25,13 +25,13 @@ extern "C" {
#include "taoserror.h" #include "taoserror.h"
enum _TSDB_VG_STATUS { enum _TSDB_VG_STATUS {
TSDB_VG_STATUS_READY = TSDB_CODE_SUCCESS, TSDB_VG_STATUS_READY = TSDB_CODE_SUCCESS,
TSDB_VG_STATUS_IN_PROGRESS = TSDB_CODE_ACTION_IN_PROGRESS, TSDB_VG_STATUS_IN_PROGRESS = 1, //TSDB_CODE_ACTION_IN_PROGRESS,
TSDB_VG_STATUS_NO_DISK_PERMISSIONS = TSDB_CODE_NO_DISK_PERMISSIONS, TSDB_VG_STATUS_NO_DISK_PERMISSIONS = 73,//TSDB_CODE_NO_DISK_PERMISSIONS,
TSDB_VG_STATUS_SERVER_NO_PACE = TSDB_CODE_SERV_NO_DISKSPACE, TSDB_VG_STATUS_SERVER_NO_PACE = 110, //TSDB_CODE_SERV_NO_DISKSPACE,
TSDB_VG_STATUS_SERV_OUT_OF_MEMORY = TSDB_CODE_SERV_OUT_OF_MEMORY, TSDB_VG_STATUS_SERV_OUT_OF_MEMORY = 69, //TSDB_CODE_SERV_OUT_OF_MEMORY,
TSDB_VG_STATUS_INIT_FAILED = TSDB_CODE_VG_INIT_FAILED, TSDB_VG_STATUS_INIT_FAILED = 74, //TSDB_CODE_VG_INIT_FAILED,
TSDB_VG_STATUS_FULL = TSDB_CODE_NO_ENOUGH_DNODES, TSDB_VG_STATUS_FULL = 48, //TSDB_CODE_NO_ENOUGH_DNODES,
}; };
enum _TSDB_DB_STATUS { enum _TSDB_DB_STATUS {
......
...@@ -18,13 +18,13 @@ ...@@ -18,13 +18,13 @@
const char* taosGetVgroupStatusStr(int32_t vgroupStatus) { const char* taosGetVgroupStatusStr(int32_t vgroupStatus) {
switch (vgroupStatus) { switch (vgroupStatus) {
case TSDB_VG_STATUS_READY: return tsError[vgroupStatus]; case TSDB_VG_STATUS_READY: return tstrerror(vgroupStatus);
case TSDB_VG_STATUS_IN_PROGRESS: return tsError[vgroupStatus]; case TSDB_VG_STATUS_IN_PROGRESS: return tstrerror(vgroupStatus);
case TSDB_VG_STATUS_NO_DISK_PERMISSIONS: return tsError[vgroupStatus]; case TSDB_VG_STATUS_NO_DISK_PERMISSIONS: return tstrerror(vgroupStatus);
case TSDB_VG_STATUS_SERVER_NO_PACE: return tsError[vgroupStatus]; case TSDB_VG_STATUS_SERVER_NO_PACE: return tstrerror(vgroupStatus);
case TSDB_VG_STATUS_SERV_OUT_OF_MEMORY: return tsError[vgroupStatus]; case TSDB_VG_STATUS_SERV_OUT_OF_MEMORY: return tstrerror(vgroupStatus);
case TSDB_VG_STATUS_INIT_FAILED: return tsError[vgroupStatus]; case TSDB_VG_STATUS_INIT_FAILED: return tstrerror(vgroupStatus);
case TSDB_VG_STATUS_FULL: return tsError[vgroupStatus]; case TSDB_VG_STATUS_FULL: return tstrerror(vgroupStatus);
default: return "undefined"; default: return "undefined";
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册