issues with delimiter

[expired user #4382]'s profile image [expired user #4382] posted 13 years ago in General Permalink
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's profile image ansgar posted 13 years ago Permalink
What means "does not work"? Error messages somewhere?
[expired user #4382]'s profile image [expired user #4382] posted 13 years ago Permalink
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's profile image ansgar posted 13 years ago Permalink
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.
[expired user #4382]'s profile image [expired user #4382] posted 13 years ago Permalink
sure

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