[mysql5][function][erreure 1418]syntaxe qui marche sur base de dev et pas sur prod.
Bonjours, je suis en train de basculer les procedures stockées et les fonctions developpées par d'autres personnes vers la base de prod.
je rencontre actuellement un pb avec cette fonction :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
DELIMITER $$;
DROP FUNCTION IF EXISTS `xxxxx`.`getCatlibOfForm`$$
CREATE DEFINER=`xxxx`@`%` FUNCTION `getCatlibOfForm`(pformid int(6), plangid varchar(2)) RETURNS text
BEGIN
DECLARE done INT DEFAULT 0;
declare childid int(6);
declare parid int(6);
declare childlib varchar(255);
declare parentlib varchar(255);
declare scat cursor for
select SksCatid
from sksformcategorie fc
where fc.SkfFormId=pformid;
declare cat cursor for
select c.parentId, ct.SksCatLibelle
from (skscategorie as c left join traduction_skscategorie as ct on c.SksCatid=ct.SksCatid and ct.langueId=plangid)
where c.SksCatid=childid;
/* select parentId,SksCatLibelle from skscategorie c where c.SksCatid=childid; */
declare surcat cursor for
select SksCatLibelle
from traduction_skscategorie ct
where (ct.SksCatid=parid AND ct.langueId=plangid);
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
OPEN scat;
FETCH scat INTO childid;
CLOSE scat;
OPEN cat;
FETCH cat INTO parid,childlib;
CLOSE cat;
OPEN surcat;
FETCH surcat INTO parentlib;
CLOSE surcat;
RETURN CONCAT(parentlib," ",childlib);
END$$
DELIMITER ;$$ |
lorsque je lance cette instruction, j'ai l'erreure suivante :
Citation:
Error Code : 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)
savez vous d'ou peut provenir cette erreure sachant que su le serveur de dev. la fonction ne pose aps de pb. ....?