Bug #26318 OUT parameters do not work
Submitted: 13 Feb 2007 12:36 Modified: 14 Feb 2007 9:56
Reporter: William Chiquito Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.2.9, 1.2.8 beta OS:Windows (Windows XP SP2)
Assigned to: CPU Architecture:Any
Tags: OUT, Parameters

[13 Feb 2007 12:36] William Chiquito
Description:
OUT parameters do not work.

How to repeat:
DELIMITER $$

DROP PROCEDURE IF EXISTS `spProblema` $$
CREATE PROCEDURE `spProblema`(OUT prueba varchar(25))
BEGIN
SET prueba = 'MySQL';
END $$

DELIMITER ;

CALL spProblema(@variable);
SELECT @variable;

Result:

@variable
---------
NULL
[13 Feb 2007 12:58] Valeriy Kravchuk
Thank you for a bug report. Verified just as described. User varaibles should work as in mysql command line client in this case.
[13 Feb 2007 13:22] William Chiquito
MySQL Monitor (mysql command line client):

mysql> CALL spProblema(@variable);
Query OK, 0 rows affected (0.01 sec)

mysql> SELECT @variable;
+-----------+
| @variable |
+-----------+
| MySQL     |
+-----------+
1 row in set (0.00 sec)
[14 Feb 2007 9:56] Valeriy Kravchuk
This is a duplicate of bug #7158, just re-opened. At least, the reason for this behaviour (reconnection on each and every statement) is the same.