求助 求助 MySQL 不能创建函数 在Godaddy 虚拟空间上
马群007 2014-01-12 07:31:33 今天把本地的MySQL数据库发布到Godaddy空间上,创建自定义函数时,提示错误:
#1418 - 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)
函数SQL语句 :
CREATE FUNCTION `NOP_getcustomerattributevalue`(
V_CustomerID int,
V_AttributeKey nvarchar(100)) RETURNS varchar(1000)
BEGIN
SET @AttributeValue = '';
SET @CustomerID = V_CustomerID;
SET @AttributeKey = V_AttributeKey;
IF (EXISTS (SELECT `Nop_CustomerAttribute`.`Value` FROM `Nop_CustomerAttribute`
WHERE `Nop_CustomerAttribute`.`CustomerID` = @CustomerID AND
`Nop_CustomerAttribute`.`Key` = @AttributeKey)) then
set @AttributeValue = (
SELECT Nop_CustomerAttribute.Value FROM `Nop_CustomerAttribute`
WHERE `Nop_CustomerAttribute`.`CustomerID` = @CustomerID AND
`Nop_CustomerAttribute`.`Key` = @AttributeKey limit 1,1 ) ;
end if;
return @AttributeValue ;
END
加上 : DETERMINISTIC NO SQL READS SQL DATA
提示错误:
#1419 - You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
可是我又没有权限修参数 log_bin_trust_function_creators
郁闷啊!哪位大侠,在GoDaddy上发不过MySql数据库?