Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Help me to solve this problem

error

call cd3(@VAR) 0 row(s) affected, 1 warning(s): 1329 No data - zero rows fetched, selected, or processed 0.000 sec

delimiter ;;
create procedure cd3(out var int)

begin

declare finished int default 0;

declare cur cursor for select id from a;

declare continue handler for not found set finished=1;

open cur;

curloop:loop

fetch cur into var;

if finished then


close cur;

leave curloop;

end if;

end loop curloop;

end;;
call cd3(@VAR)
select @var
share|improve this question
    
The continue handler should suppress that warning. Is it possible that you created the procedure without the continue handler first, and that's the version that you're running? Try dropping and recreating the procedure. –  Ike Walker Nov 19 '13 at 14:10
    
I declared the continue handler just after declaring the cursor,please check out in the given code.Still it was not working at all. –  Abhik Dey Nov 20 '13 at 6:26
    
My theory is that an older version of the procedure exists. Run this to verify that the continue handler is actually in the procedure: show create procedure cd3 –  Ike Walker Nov 20 '13 at 18:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.