Problems creating stored functions

notHeidi's profile image notHeidi posted 2 months ago in General Permalink

Can anyone explain to me why this, pasted into a Query tab, will run without errors, but no function is created?

CREATE FUNCTION testF(sText TEXT)
RETURNS TEXT
DETERMINISTIC
BEGIN
   RETURN 'ok';
END
DELIMITER ;

Trying to create functions within the actual function editor never seems to work - it just throws up syntax errors ...:(

Any clues about creating functions gratefully received!

I am using an up-to-date Heidi, though my MySQL version is old: v 5.6.15-log

Thanks

notHeidi's profile image notHeidi posted 2 months ago Permalink

Yeah, there is/was a "DELIMITER //" at the start of that. (No edit feature here?)

notHeidi's profile image notHeidi posted 2 months ago Permalink

SO... turns out I needed to add a line // before the DELIMITER ; line at the end

But still can only create functions via the query tab - the actual function "Builder" window will not work on SAVE.

Please login to leave a reply, or register at first.