19 Jul 2012 14:34
question about stored procedures with Select statements and critical errors.
Kern, Daniel <dkern <at> iskoot.com>
2012-07-19 12:34:46 GMT
2012-07-19 12:34:46 GMT
Can someone please help with the following. I am using mysql dbd 4.017 and mysql 5.5.17.
When I call a stored procedure that has Select statements in it, and the stored procedure has a critical
error, I am not getting back any indication there was an error.
The SP looks like this:
Begin
SELECT CONCAT("Populating summary tables from: ", <at> v_from_date, " , to: ", <at> v_to_date) AS return_message;
...
<Critical Error here>
...
End
Here is the code, where $sql is call <sp name> (\'2012-06-16\', \'2012-06-16\')
$sth = $dbh->prepare($sql);
if (!$sth) {
...
}
my $ex_result = $sth->execute();
And when I run in the debugger, I get this result on the statement handle:
x DBI::dump_results($sth):
'Populating summary tables from...'
1 rows
0 1
And x $sth->errstr returns:
undef
(Continue reading)
RSS Feed