MySQL/函数创建出错

                                              MySQL/函数创建出错

MySQL函数创建出错;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)

 

 

 

例子是php和mysqlweb开发中遇到的;

 

delimiter //

create function add_tax(price float) returns float

return price * 1.1 ;

//

 

delimiter ;

 

解决方案:

 

SET GLOBAL log_bin_trust_function_creators = 1

 

这是出于安全考虑吧;

你可能感兴趣的:(MySQL/函数创建出错)