Bug #13819 Optionally suppress resultsets returned by SP's (DO syntax but now for SP's)
Submitted: 6 Oct 2005 20:10 Modified: 15 Dec 2010 11:01
Reporter: Roland Bouman Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Stored Routines Severity:S4 (Feature request)
Version:5.0.13 OS:Any
Assigned to: CPU Architecture:Any

[6 Oct 2005 20:10] Roland Bouman
SELECT statements within Stored Procedures return a resultset when they are called. There are situations when it would be desirable to supress these resultset. 

Suppose we have a procedure, P1, that can be called either directly by a human user via a command line tool, or programmatically by another procedure P2. 

In the first case, it is desirable to return P1's resultsets to the command line client. In fact, this is the only way to send a message from within the stored procedure directly to the user. 

In the second case, it would be desirable to suppress P1's resultsets. Suppose the calling procedure, P2, only calls P1 because of some side effect it performs, and suppose P2 is actually a procedure who'se results are meaningful to the caller of P2. Right now, it is not possible to reuse P1 in P2 without affecting the output of P2, wich is a pity.

For function calls (and other expressions), this behaviour can be achieved by using the DO syntax. It would be very nice to have similar functionality for stored procedures.

How to repeat:

Suggested fix:
design and implement a language construct or modifier that acts on, or acts in conjuction with, the CALL statement in order to suprress any resultsets from being return from the called procedure. 

Using the DO syntax seems a straightforward solution.
[14 Oct 2005 19:25] Roland Bouman
No comment, i just changed the title
[27 Jul 2006 12:09] Beat Vontobel
Just stumbled across this feature request as I wanted to post a similar one: This feature really would be appreciated.