enh: disable stream/udf on windows
This commit is contained in:
parent
edd4a78772
commit
f7a5bef17d
|
@ -707,6 +707,7 @@ int32_t* taosGetErrno();
|
|||
#define TSDB_CODE_PAR_INVALID_OPTR_USAGE TAOS_DEF_ERROR_CODE(0, 0x2667)
|
||||
#define TSDB_CODE_PAR_SYSTABLE_NOT_ALLOWED_FUNC TAOS_DEF_ERROR_CODE(0, 0x2668)
|
||||
#define TSDB_CODE_PAR_SYSTABLE_NOT_ALLOWED TAOS_DEF_ERROR_CODE(0, 0x2669)
|
||||
#define TSDB_CODE_PAR_INVALID_PLATFORM TAOS_DEF_ERROR_CODE(0, 0x2670)
|
||||
#define TSDB_CODE_PAR_INTERNAL_ERROR TAOS_DEF_ERROR_CODE(0, 0x26FF)
|
||||
|
||||
//planner
|
||||
|
|
|
@ -59,9 +59,11 @@ static int32_t dmOpenMgmt(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
#ifdef WINDOWS
|
||||
if (udfStartUdfd(pMgmt->pData->dnodeId) != 0) {
|
||||
dError("failed to start udfd");
|
||||
}
|
||||
#endif
|
||||
|
||||
pOutput->pMgmt = pMgmt;
|
||||
return 0;
|
||||
|
|
|
@ -57,11 +57,13 @@ static int32_t qmOpen(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
|
|||
}
|
||||
tmsgReportStartup("qnode-impl", "initialized");
|
||||
|
||||
#ifdef WINDOWS
|
||||
if (udfcOpen() != 0) {
|
||||
dError("qnode can not open udfc");
|
||||
qmClose(pMgmt);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (qmStartWorker(pMgmt) != 0) {
|
||||
dError("failed to start qnode worker since %s", terrstr());
|
||||
|
|
|
@ -65,11 +65,13 @@ int32_t smOpen(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
|
|||
}
|
||||
tmsgReportStartup("snode-worker", "initialized");
|
||||
|
||||
#ifdef WINDOWS
|
||||
if (udfcOpen() != 0) {
|
||||
dError("failed to open udfc in snode");
|
||||
smClose(pMgmt);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
pOutput->pMgmt = pMgmt;
|
||||
return 0;
|
||||
|
|
|
@ -571,10 +571,12 @@ static int32_t vmInit(SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) {
|
|||
}
|
||||
tmsgReportStartup("vnode-vnodes", "initialized");
|
||||
|
||||
#ifdef WINDOWS
|
||||
if (udfcOpen() != 0) {
|
||||
dError("failed to open udfc in vnode");
|
||||
goto _OVER;
|
||||
}
|
||||
#endif
|
||||
|
||||
code = 0;
|
||||
|
||||
|
|
|
@ -198,8 +198,10 @@ void dmCleanup() {
|
|||
monCleanup();
|
||||
syncCleanUp();
|
||||
walCleanUp();
|
||||
udfcClose();
|
||||
#ifdef WINDOWS
|
||||
udfcClose();
|
||||
udfStopUdfd();
|
||||
#endif
|
||||
taosStopCacheRefreshWorker();
|
||||
dmDiskClose();
|
||||
dInfo("dnode env is cleaned up");
|
||||
|
|
|
@ -4418,6 +4418,10 @@ static int32_t checkDbRetentionsOption(STranslateContext* pCxt, SNodeList* pRete
|
|||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef WINDOWS
|
||||
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_PLATFORM, "Unsupported feature on this platform");
|
||||
#endif
|
||||
|
||||
if (LIST_LENGTH(pRetentions) > 3) {
|
||||
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_DB_OPTION, "Invalid option retentions");
|
||||
}
|
||||
|
@ -5867,6 +5871,9 @@ static int32_t checkCreateSmaIndex(STranslateContext* pCxt, SCreateIndexStmt* pS
|
|||
}
|
||||
|
||||
static int32_t translateCreateSmaIndex(STranslateContext* pCxt, SCreateIndexStmt* pStmt) {
|
||||
#ifdef WINDOWS
|
||||
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_PLATFORM, "Unsupported feature on this platform");
|
||||
#endif
|
||||
int32_t code = checkCreateSmaIndex(pCxt, pStmt);
|
||||
pStmt->pReq = taosMemoryCalloc(1, sizeof(SMCreateSmaReq));
|
||||
if (pStmt->pReq == NULL) code = TSDB_CODE_OUT_OF_MEMORY;
|
||||
|
@ -7052,6 +7059,9 @@ static int32_t buildCreateStreamReq(STranslateContext* pCxt, SCreateStreamStmt*
|
|||
}
|
||||
|
||||
static int32_t translateCreateStream(STranslateContext* pCxt, SCreateStreamStmt* pStmt) {
|
||||
#ifdef WINDOWS
|
||||
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_PLATFORM, "Unsupported feature on this platform");
|
||||
#endif
|
||||
SCMCreateStreamReq createReq = {0};
|
||||
|
||||
int32_t code = checkCreateStream(pCxt, pStmt);
|
||||
|
@ -7201,6 +7211,9 @@ static int32_t readFromFile(char* pName, int32_t* len, char** buf) {
|
|||
}
|
||||
|
||||
static int32_t translateCreateFunction(STranslateContext* pCxt, SCreateFunctionStmt* pStmt) {
|
||||
#ifdef WINDOWS
|
||||
return generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_PLATFORM, "Unsupported feature on this platform");
|
||||
#endif
|
||||
if (fmIsBuiltinFunc(pStmt->funcName)) {
|
||||
return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_INVALID_FUNCTION_NAME);
|
||||
}
|
||||
|
|
|
@ -570,6 +570,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_PAR_GET_META_ERROR, "Fail to get table i
|
|||
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_NOT_UNIQUE_TABLE_ALIAS, "Not unique table/alias")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_SYSTABLE_NOT_ALLOWED_FUNC, "System table not allowed")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_SYSTABLE_NOT_ALLOWED, "System table not allowed")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INVALID_PLATFORM, "Unsupported feature on this platformXX")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_PAR_INTERNAL_ERROR, "Parser internal error")
|
||||
|
||||
//planner
|
||||
|
|
Loading…
Reference in New Issue