Adding a MySQL StoredProcedure causes not responding state
Posted
by Omie
on Server Fault
See other posts from Server Fault
or by Omie
Published on 2010-01-08T19:45:15Z
Indexed on
2010/04/24
4:03 UTC
Read the original article
Hit count: 322
Hello
I'm on Windows 7 ultimate 32bit + xampp 1.7.2 [MySQL v5.1.37]
This is my stored procedure :
delimiter //
CREATE PROCEDURE updatePoints(IN parentid INT(5),IN userid INT(5))
DECLARE chpoints INT(5);
BEGIN
SELECT points INTO chpoints FROM quiz_challenges WHERE id = parentid;
UPDATE quiz_users SET points = points + chpoints WHERE forumid=userid;
END;
//
delimiter ;
At first it was showing error 1064 while creating stored procedure. I added delimiters part and when I tried running the query from phpmyadmin, Firefox went into not responding state. After that I started Internet Explorer and tried opening my pages which use the same database, it worked fine. However, I tried opening phpmyadmin and IE went into not responding state as well. I restarted both servers. Later restarted PC. Tried again but its same behavior.
So whats wrong with this tiny little code ? Am I missing something which might be causing infinite loop ?
Thanks
© Server Fault or respective owner