MySQL Forums
Forum List  »  Newbie

Call to mysql procedure fails with error.
Posted by: pandu hondu
Date: November 21, 2016 03:17AM

Hello Friends,

I'm making call to mysql procedure and it is failing with the error below. I am unable to figure it out what is the issue.

My shell script snippet is below:
export batchsize=$1
echo $batchsize
myvar=$(mysql -q mydb -uuser --skip-column-names --execute='call delete_table_incrementally(batchsize)')

Code snippet from mysql procedure is below:

create procedure delete_table_incrementally(IN batchsize MEDIUMINT(3))
modifies sql data
begin
DELETE FROM mytable where mycondition='ERROR-5000' order by id limit batchsize;
commit;
select count(*) FROM mytable where mycondition='ERROR-5000';
end;
//
delimiter ;
call delete_table_incrementally();

Options: ReplyQuote


Subject
Written By
Posted
Call to mysql procedure fails with error.
November 21, 2016 03:17AM


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.