Bug #62406 | new cursor, on table with same name but different structure as used before fails | ||
---|---|---|---|
Submitted: | 10 Sep 2011 17:46 | Modified: | 11 Sep 2011 6:43 |
Reporter: | Shlomi Noach (OCA) | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S3 (Non-critical) |
Version: | >= 5.1 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | cursor, temporary table |
[10 Sep 2011 17:46]
Shlomi Noach
[11 Sep 2011 5:40]
MySQL Verification Team
isn't this bug #12257 ?
[11 Sep 2011 6:09]
Shlomi Noach
Yes, it appears so. My friend, this makes it a 6 year old bug, with quite a few duplicates.
[11 Sep 2011 6:11]
Shlomi Noach
Ummm. while it is in principle similar, do note that the bug I'm presenting here occurs on two different calls to a stored routine (so, this is not twice in the same call to a routine). It may or may not make a difference.
[11 Sep 2011 6:25]
MySQL Verification Team
what is @q here ?
[11 Sep 2011 6:30]
MySQL Verification Team
None-the-less, a dirty workaround is to manually flush the stored procedure cache between calls, but this obviously has a performance impact. It can be done easily with: CREATE OR REPLACE VIEW tmpview AS SELECT 1;
[11 Sep 2011 6:41]
Shlomi Noach
My apologies, the following lines: " PREPARE st FROM @q; EXECUTE st; DEALLOCATE PREPARE st; " are superfluous and should not be there as part of the bug report.
[11 Sep 2011 6:43]
Shlomi Noach
Thank you for the workaround