callproc not returning multiple results

Asked by Jake Griffith

Hi there

I am having some problems with the callproc() when trying to receive the recordsets. I am calling a procedure that returns two recordsets and two output parameters. I am able to retrieve the output parameters but I am not able to access the two recordsets. The script that I have written is below, and appears to be correct as far as I can see based upon what I have read on the mySQL site. Can someone give me some pointers as to what I have done wrong.

        import mysql.connector
        try:
            self.connection = mysql.connector.connect(**{'user':'xxx', 'host':'localhost', 'database':'xxx'})
            curs = self.connection.cursor(buffered=True)
            curs.callproc('procname', 'input/output parameters')

            for result in curs.stored_results():
                rows = result.fetchall()

Thanks

Jake

Question information

Language:
English Edit question
Status:
Answered
For:
MySQL Connector/Python Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Jake Griffith (jakegs) said :
#2
Revision history for this message
Geert JM Vanderkelen (geertjmvdk) said :
#3

Sorry about this late reply.
This is a bug, and I filed it here:
  http://bugs.mysql.com/bug.php?id=67710

Thanks for reporting this, and please keep an eye on the bug report.

Revision history for this message
Jake Griffith (jakegs) said :
#4

Hi Geert

Do you have an eta on this? I guess that this should be reasonably straight forward to resolve.

Would be good if this could be available asap as I am in the process of migrating from python 2.6 to 3.2 and mysqlDB to myconnpy. Having a db connector that allows python 3 to connect to mySQL is a huge advantage. Even better being able to use output parameters which do not work in mysqlDB.

Thanks for all the hard work and effort.

Jake

Revision history for this message
Geert JM Vanderkelen (geertjmvdk) said :
#5

We finally released Connector/Python 1.0.8, available here http://www.mysql.com/downloads/connector/python/
Please check if it works for you now.

Can you help with this problem?

Provide an answer of your own, or ask Jake Griffith for more information if necessary.

To post a message you must log in.