I'm using mysql v5.1.48 and red http://dev.mysql.com/doc/refman/5.5/en/signal.html. But the code
DELIMITER $$
CREATE PROCEDURE `CoreRaiseError`()
BEGIN
SIGNAL SQLSTATE '45000'
SET MESSAGE_TEXT = 'An error occurred', MYSQL_ERRNO = 1001;
END$$
raise an
SQL Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SQLSTATE '45000'
From which version SIGNAL start to be a keyword? How can I raise an exception with prior version of mysql?
Thank you.