I am getting the error "procedure XXX can't return a result set in the given context" when calling a stored proc with Connector/J 5.1.18. The stored proc in question has one cursor, but no bare SELECT statements in it.
I can call the proc from the mysql command line client and it works as expected - the MySQL client and server are both version 5.1.47.
My Java code is:
CallableStatement s = connection.prepareCall("{call YYY(?, ?)}");
s.setString(1, "foo");
s.setString(2, "bar");
s.execute();
Proc YYY then calls proc XXX, and the execute() throws a SQLException with a 1312 error code.
Is there a MySQL session parameter or something I should be setting on the JDBC connection that would make it work like the mysql client?
Thanks,
Greg.
I can call the proc from the mysql command line client and it works as expected - the MySQL client and server are both version 5.1.47.
My Java code is:
CallableStatement s = connection.prepareCall("{call YYY(?, ?)}");
s.setString(1, "foo");
s.setString(2, "bar");
s.execute();
Proc YYY then calls proc XXX, and the execute() throws a SQLException with a 1312 error code.
Is there a MySQL session parameter or something I should be setting on the JDBC connection that would make it work like the mysql client?
Thanks,
Greg.