I'm migrating Oracle PL/SQL stored procs which are very simple in nature, nothing
sophisticated, other than the exception mechanism that seems not to be supported
in MySQL (since we intend to use Cluster 7.0.9, we're limited to the database
version that it comes with - 5.1.41 from memory), so I'm trying to find out how
to support stored procedures that would report exception conditions using sql
error codes in out parameters and return the result set as the procedure's return
value. Below is an example of what I'm trying to do:
create procedure getSession( out sql_error integer, param1...)
declare exit handler for 1062
set sql_error = -9999;
call lockContext( p1, ...);
select c1, c2, c3 from t_session where ....;
The client application uses Connector/C++.
So the two questions are:
1. Can I do the above in version 5.1.41 stored proc?
2. How does the client retrieve the two kinds of results?