| Bug #6478 | A store procedure causes mysql server to hang out | ||
|---|---|---|---|
| Submitted: | 6 Nov 2004 18:42 | Modified: | 6 Nov 2004 19:36 |
| Reporter: | Nelson | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server | Severity: | S1 (Critical) |
| Version: | OS: | Windows (WinXP Pro) | |
| Assigned to: | CPU Architecture: | Any | |
[6 Nov 2004 18:42]
Nelson
[6 Nov 2004 19:36]
MySQL Verification Team
Thank you for the bug report. This issue was already fixed on current
BK source:
c:\mysql\bin>mysql -uroot test
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.2-alpha-nt-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> delimiter //;
mysql> DROP PROCEDURE IF EXISTS a_procedure//
Query OK, 0 rows affected, 1 warning (0.22 sec)
mysql> CREATE PROCEDURE a_procedure ()
-> BEGIN
-> DECLARE total int;
-> DECLARE campo1 int;
-> DECLARE campo2 varchar(100);
-> Set total = 2;
-> IF @total = 1 THEN
-> SET campo1 = 1;
-> SET campo2 = '';
-> ELSE
-> SET campo1 = 45;
-> SET campo2 = 'El presupuesto no existe.';
-> END IF;
-> SELECT campo1 as col1, campo2 as col2;
-> END
-> //
Query OK, 0 rows affected (0.03 sec)
mysql> call a_procedure()//
+--------+---------------------------+
| campo1 | campo2 |
+--------+---------------------------+
| 45 | El presupuesto no existe. |
+--------+---------------------------+
1 row in set (0.02 sec)
Query OK, 0 rows affected (0.02 sec)
