Call to mysql procedure fails with error.
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();
Subject
Written By
Posted
Call to mysql procedure fails with error.
November 21, 2016 03:17AM
November 21, 2016 05:37AM
November 21, 2016 11:41AM
November 22, 2016 09:18AM
November 22, 2016 01:58PM
November 22, 2016 06:26PM
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.