MySQL Forums
Forum List  »  Triggers

server crashs
Posted by: seetharamakrishna kurra
Date: May 31, 2005 09:42AM

Hello techies,
I am using mysqlserver 5.0.4 beta version.
I am trying to use triggers. My trigger is

CREATE TABLE account (acct_num INT, amount DECIMAL(10,2));

CREATE TRIGGER ins_sum BEFORE INSERT ON account
FOR EACH ROW SET @sum = @sum + NEW.amount;

Now, when i try to insert some values into the account table

SET @sum = 0;
mysql> INSERT INTO account VALUES(137,14.98),(141,1937.50),(97,-100.00);
mysql> SELECT @sum AS 'Total amount inserted';

The server crashes.

why this happens ??
Does triggers not supported in mysql 5.0.4beta version.


regards,
ramu

Options: ReplyQuote


Subject
Views
Written By
Posted
server crashs
3410
May 31, 2005 09:42AM
2256
June 01, 2005 12:46AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.