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
可以帮助下么?