Bug #61998 MySQL console hangs when procedure returns result set.
| Submitted: | 27 Jul 2011 8:23 | Modified: | 27 Jul 2011 10:04 |
|---|---|---|---|
| Reporter: | Dima Drug | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Enterprise Monitor: Agent | Severity: | S3 (Non-critical) |
| Version: | 5.5.12 | OS: | Linux |
| Assigned to: | Jan Kneschke | CPU Architecture: | Any |
| Tags: | Stored procedure result set | ||
[27 Jul 2011 9:58]
Dima Drug
This bug is only reproduced when working through MySQL proxy
[27 Jul 2011 10:04]
Mark Leith
Verified as described.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: When stored procedure has cursor loop inside, it can't return result set and console hangs. Procedures without cursors works fine. How to repeat: CREATE PROCEDURE prc1() BEGIN DECLARE lTblName VARCHAR(64); DECLARE done BOOL DEFAULT False; DECLARE curIndx CURSOR FOR SELECT table_name FROM information_schema.tables WHERE table_name like 'doesnt matter'; DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = True; OPEN curIndx; lpIndx: LOOP FETCH curIndx INTO lTblName; IF done THEN LEAVE lpIndx; END IF; END LOOP; -- end of lpIndx CLOSE curIndx; SELECT 'finished'; END; CALL prc1;