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

issues with delimiter

User, date Message
Written by mikgigs
3 years ago
Category: General
21 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 ;
Written by ansgar
3 years ago
4801 posts since Fri, 07 Apr 06
What means "does not work"? Error messages somewhere?
Written by mikgigs
3 years ago
21 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.
Written by ansgar
3 years ago
4801 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.
Written by mikgigs
3 years ago
21 posts since Mon, 12 Oct 09
sure
 

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