I’m trying to call a MySQL stored procedure from Twisted adbapi using the MySQLdb interface but cannot get it to work. I saw that there is a special way to call stored procedure in MySQLdb (callproc), so I was wondering if there was a special way to call it from the adbapi.
My stored procedure takes two fields A_PROCEDURE(field1 VARCHAR(20), field2 VARCHAR(25)) and I’m attempting to call it in my program in the way most obvious to me: dbpool.runOperation("CALL A_PROCEDURE(%s,%s)", arg1, arg2). This attempt called the errback. The procedure works fine if I just test it from my terminal connection to the database.
You can use
runInteractionto do arbitrary database or adapter specific things like this: