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.


#72 [PATCH] CallProc

Andy Dustman
MySQLdb (53)
Charles Timko

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.


  • Charles Timko
    Charles Timko

    Cursors Patch