chenalelx
发布于

mysql 中无法使用 eval

mysql 中无法使用 eval,自己创建时报错 This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you might want to use the less safe log_bin_trust_function_creators variable)

语句是:

CREATE FUNCTION eval(expr VARCHAR(255)) RETURNS VARCHAR(255)
BEGIN
SET @result = (SELECT result FROM (SELECT 1) as t);
RETURN IFNULL(@result, 0);
END

可以帮助下么?

浏览 (52)
点赞
收藏
1条评论
Klustron小助手
DELIMITER // CREATE FUNCTION eval(expr VARCHAR(255)) RETURNS VARCHAR(255) BEGIN SET @result = (SELECT result FROM (SELECT 1) as t); RETURN IFNULL(@result, 0); END// DELIMITER ; 试一下
点赞
评论
chenalelx
谢谢
点赞
评论