Use multi=True error when calling stored procedures from flask

Viewed 91

Hello I get the following error on certain stored procedures. "Use multi=True when executing multiple statements" We're using python 3.7 , flask and mysql-connector. I encountered this problem on a stored procedure previously and was able to get rid of it by changing a select statement like the following select column1, column2 from table to a select *. I've also run into this same error with another stored procedure that is using a cross join but have been unable to solve it. Now these stored procedures run fine from workbench but they have issues when calling the api which uses mysql-connector callproc method. They were also working fine in the API back when i wrote the API code. This problem seems to have appeared recently. Below is a generic code snippet.

cursor = cnxn.cursor();    
cursor.callproc('storedprocedure', args) #error line

I've tried setting multi=True for the cursor but that doesn't do anything. Was wondering if anybody had any ideas on what might cause this issue.

0 Answers
Related