OK I tried this exact syntax and I get the same error. I tried it on mysql
client for 6.0.10

On Wed, May 20, 2009 at 2:22 PM, Gavin Towey <gto...@ffn.com> wrote:

> Interesting.  This syntax is only supposed to be available as of 5.4, but
> it doesn't even work there.  The reference I found was at :
> http://dev.mysql.com/tech-resources/articles/mysql-54.html
>
> But I couldn't find other references to the new signal support.
>
> This is listed as the example on that page, but it doesn't work in
> 5.4.0-beta
>
> CREATE PROCEDURE p (divisor INT)
> BEGIN
>  DECLARE divide_by_zero CONDITION FOR SQLSTATE '22012';
>  IF divisor = 0 THEN
>  SIGNAL divide_by_zero;
> END IF;
> END
>
> Methinks someone forgot to include this feature in the release!
>
>
> -----Original Message-----
> From: Alex Katebi [mailto:alex.kat...@gmail.com]
> Sent: Wednesday, May 20, 2009 10:58 AM
> To: mysql
> Subject: SOS mysql signal syntax error
>
> Hi Folks,
>
>  I am getting syntax error with the mysql signal. I have a trigger
> that needs a signal for raising an error condition if a row with
> specific value  is removed.
>
>  CREATE TRIGGER my_trig BEFORE DELETE ON my_tbl
>  FOR EACH ROW BEGIN
>  DECLARE mysig CONDITION FOR SQLSTATE '45000';
>  IF OLD.name = 'base' THEN
>     SIGNAL mysig SET MESSAGE_TEXT='base row removal is not allowed';
>  END IF;
>  END
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=gto...@ffn.com
>
>
> The information contained in this transmission may contain privileged and
> confidential information. It is intended only for the use of the person(s)
> named above. If you are not the intended recipient, you are hereby notified
> that any review, dissemination, distribution or duplication of this
> communication is strictly prohibited. If you are not the intended recipient,
> please contact the sender by reply email and destroy all copies of the
> original message.
>

Reply via email to