Bug #110641 | MySQL Connection not available after a procedure call | ||
---|---|---|---|
Submitted: | 9 Apr 2023 6:31 | Modified: | 10 Apr 2023 11:56 |
Reporter: | Wenqian Deng | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | Connector / Python | Severity: | S3 (Non-critical) |
Version: | 8.0.32 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[9 Apr 2023 6:31]
Wenqian Deng
[10 Apr 2023 11:56]
MySQL Verification Team
Hello Wenqian Deng, Thank you for the report and test case. regards, Umesh
[12 Apr 2023 11:57]
Nuno Mariz
Posted by developer: Thank you for your bug report. The recommended way of calling a stored procedure is using `cursor.callproc()`. Using `cursor.execute()` your implementation will not work, it should be something like: for res in cursor.execute("CALL t0_select_all()", multi=True): if res.with_rows: print(res.fetchall()) Although the above code works, this is the recommended way of calling stored procedures: cursor.callproc("t0_select_all") for res in cursor.stored_results(): print(res.fetchall()) Nonetheless, when getting a new cursor it shouldn't raise any error, and needs investigation on our side.