Bug #64410 OUT parameter returns NULL value.
Submitted: 22 Feb 2012 12:30 Modified: 22 Mar 2012 13:18
Reporter: Neha Vishwakarma Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S3 (Non-critical)
Version:5.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: OUT prameter is null, stored procedure

[22 Feb 2012 12:30] Neha Vishwakarma
Description:
I have written a very small procedure.

DELIMITER $$

DROP PROCEDURE IF EXISTS `cimcsd`.`sp_time` $$
CREATE DEFINER=`dbAdmin`@`%` PROCEDURE `cimcsd`.`sp_time` ( out t int)
BEGIN
     set t = 5;
END $$
DELIMITER ;

-- Call to procedure is done as
call sp_time(@c);
select @c;

-- select @c statement retuns NULL.
Please explain the reason..

How to repeat:
By creating procedure and running it in above defined manner.
[22 Feb 2012 13:18] Valeriy Kravchuk
I just do not see any problem with recent enough 5.0.x:

C:\Program Files\MySQL\MySQL Server 5.1\bin>mysql -uroot -proot -P3308 test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.0.91-community-nt MySQL Community Edition (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> delimiter //
mysql> create procedure sp_time(out t int)
    -> BEGIN
    ->      set t = 5;
    -> END//
Query OK, 0 rows affected (0.03 sec)

mysql> delimiter ;
mysql> select @c;
+------+
| @c   |
+------+
| NULL |
+------+
1 row in set (0.00 sec)

mysql> call sp_time(@c);
Query OK, 0 rows affected (0.03 sec)

mysql> select @c;
+------+
| @c   |
+------+
| 5    |
+------+
1 row in set (0.00 sec)

Maybe it's time to upgrade?
[23 Mar 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".