Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#72 [PATCH] CallProc

open
Andy Dustman
MySQLdb (53)
5
2012-09-19
2012-01-12
Charles Timko
No

I played a bit with the callproc method and came up with a working solution for the failure to return the updated values. I did do a number of test cases against my patch, and I was able to still use it as before (so it shouldn't break anyones implementation) but I think it would still need more tests. (Since I didn't build the module from the depot, I downloaded a pre-packaged python install, I didn't check this against unittest (if there are any).

In short what the patch does is that it backs up the state of the cursor, throws away the results that the procedure would return, then retrieves the OUT/INOUT results and sets the values properly, then I reset the state of the cursor to what it was when I backed it up, then I delete the backup. This was a quick, albeit dirty way, to keep with PEP compliance on the function. Let me know if you have any questions about it.

Discussion

  • Charles Timko
    Charles Timko
    2012-01-12

    Cursors Patch

     
    Attachments