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

issues with delimiter

mikgigs posted 4 years ago in General
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 posted 4 years ago
What means "does not work"? Error messages somewhere?
mikgigs posted 4 years ago
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 posted 4 years ago
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 posted 4 years ago
sure

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