distal-attribute
distal-attribute
distal-attribute
distal-attribute

issues with delimiter

User, date Message
mikgigs Written by mikgigs
3 years ago
Category: General
22 posts since Mon, 12 Oct 09
the same code works under Mysql Workbench or php call, but
not under HeidiSQl

USE sauna;
DROP TRIGGER IF EXISTS deleteword;
DELIMITER |
CREATE TRIGGER deleteword AFTER DELETE ON kirja
FOR EACH ROW
BEGIN
SET @maxid = (SELECT max(id) FROM kirja LIMIT 1);

IF @maxid>OLD.id THEN
UPDATE kirja SET id = OLD.id where id=@maxid;
END IF;

END;|
DELIMITER ;
ansgar Written by ansgar
3 years ago
5098 posts since Fri, 07 Apr 06
What means "does not work"? Error messages somewhere?
mikgigs Written by mikgigs
3 years ago
22 posts since Mon, 12 Oct 09
I am sorry for vague explanation.

yes, there is a SQL error 1064 appearing in message box for the delimiter, but it seems that trigger is created.

The same script works with no issues for other clients.
ansgar Written by ansgar
3 years ago
5098 posts since Fri, 07 Apr 06
I got no error here, using the latest build. Probably you are on an older revision? In that case, just update via Help > Check for updates, and this is fixed.
mikgigs Written by mikgigs
3 years ago
22 posts since Mon, 12 Oct 09
sure
 

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