提交 b48c2c9c 编写于 作者: dengyihao's avatar dengyihao

[TD-6361]<fix> restrict UDF func name

上级 a8d688a7
......@@ -432,7 +432,7 @@ int32_t readFromFile(char *name, uint32_t *len, void **buf) {
int32_t handleUserDefinedFunc(SSqlObj* pSql, struct SSqlInfo* pInfo) {
const char *msg1 = "function name is too long";
const char *msg1 = "invalidate function name";
const char *msg2 = "path is too long";
const char *msg3 = "invalid outputtype";
const char *msg4 = "invalid script";
......@@ -449,7 +449,10 @@ int32_t handleUserDefinedFunc(SSqlObj* pSql, struct SSqlInfo* pInfo) {
}
createInfo->name.z[createInfo->name.n] = 0;
// funcname's naming rule is same to column
if (!validateColumnName(createInfo->name.z)) {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1);
}
strdequote(createInfo->name.z);
if (strlen(createInfo->name.z) >= TSDB_FUNC_NAME_LEN) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册