Executing a stored procedure kills the server.
Hi,
when calling the procedure below from MySQL Query Browser located on the server, it looks like the job is done, but it results in a error message : Lost connection to MySQL server during Query.errornr 2013. The reason is that MySQL server has stopped! Have to restart the Service.
Starting the same job from Navicat located on a client, results the same errormessage, but now is it impossible to restart the service. We have to restart the server.
CREATE PROCEDURE `Opdater_firma`()
BEGIN
declare a, b INT;
declare cur_1 CURSOR for select bedrnr from firma ;
declare continue handler for not found
set b=1;
open cur_1;
repeat
fetch cur_1 into a;
update firma
set antanskat1=(select count(*) from person p where (p.bedrnr=a) and (p.kategori=1) and (p.ugyldig is null ) and (p.sluttetdato is null)),
antanskat2=(select count(*) from person p where (p.bedrnr=a) and (p.kategori=2) and (p.ugyldig is null ) and (p.sluttetdato is null)),
antanskat3=(select count(*) from person p where (p.bedrnr=a) and (p.kategori=3) and (p.ugyldig is null ) and (p.sluttetdato is null))
where bedrnr=a;
until b=1
end repeat;
close cur_1;
END
Subject
Views
Written By
Posted
Executing a stored procedure kills the server.
2130
December 12, 2005 09:17AM
1369
December 15, 2005 04:39PM
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.