Bug #61144 | Cursor in SP once run traverses stale table columns for subsequent CALL of SP | ||
---|---|---|---|
Submitted: | 12 May 2011 7:28 | Modified: | 6 Jul 2011 19:10 |
Reporter: | Jake Sully | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S2 (Serious) |
Version: | 5.5 | OS: | Windows |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[12 May 2011 7:28]
Jake Sully
[12 May 2011 8:55]
Jake Sully
I forgot to mention: After step 3, where the SP is created, you need to call it: CALL foobarCursor(); Then you alter the table (step 4).
[12 May 2011 8:58]
Jake Sully
EDIT (missing step): I forgot to mention: After step 2, where the SP is created, you need to call it: CALL foobarCursor(); Then you alter the table (step 3).
[14 May 2011 13:03]
Valeriy Kravchuk
I do not see anything in the manual about the behavior of cursors "by design", but probably the same logic as for views (see http://dev.mysql.com/doc/refman/5.5/en/create-view.html) is applied. Then this is not a bug...
[14 May 2011 14:30]
Jake Sully
Just for clarification, what is meant by "behavior" is about the SELECT statement: SELECT * FROM `dbName`.`tableName` When this is run the expectation is all columns are selected. Hence, it was loosely termed "behavior should be as expected". When the asterisk (*) is used, all columns are expected by the average user not as per the manual. Just to add, hopefully this will be resolved when dynamic cursors are supported in a future version, hence it might be more of a feature request. Thanks.
[15 May 2011 14:49]
Valeriy Kravchuk
Assuming current behavior is intended, we have a documentation request here.
[6 Jul 2011 19:10]
Paul DuBois
This is a duplicate of Bug#12257