Using stored procedures is a good thing to reduce complexity of
PERL scripts.
Since my company switched to MySQL 5 (last month) I started to
write some SPs.
But a problem arised.
DBD::MySQL for Perl has a problem dealing with multiple rows
statements like simple SELECTs in SP.
So, I was not able to grab results from routines.
As you can see here the problem is well known and a patch was proposed , but at the moment there's no solution. My DBD::MySQL version is 3.0003
So, the only way you can grab the SP's results in a perl script is to store them into OUT parameters and read them through user variables.
Let's see a simple example.
Suppose you have the SP below to count the number of published news articles …
[Read more]