Comment 0 for bug 1004991

Revision history for this message
Jonathan Bastnagel (jonthebagel) wrote :

Calling a stored procedure shows a positive row count but won't let me fetch results.

Client running Ubuntu 12.04 LTS, Python 2.7.3, OurSQL 0.9.2, and libmysqlclient-dev 5.5
Server is an Amazon RDS MySQL instance running MySQL 5.5.12

Python Code:
import oursql

conn = oursql.connect(host='www.example.com', user='foo', passwd='bar', port=3306)
curs = conn.cursor()

curs.execute("CALL db.foo(?, ?, ?)", (1, 2, 3))
print("Row count: " + str(curs.rowcount))
print(curs.nextset())
res = curs.fetchone()
print(res)
curs.close()

Output:
Row count: 189
Traceback (most recent call last):
  File "test.py", line 8, in <module>
    print(curs.nextset())
  File "cursor.pyx", line 169, in oursql.Cursor.nextset (oursqlx/oursql.c:16436)
  File "cursor.pyx", line 161, in oursql.Cursor._check_statements (oursqlx/oursql.c:16392)
oursql.ProgrammingError: (None, 'no results available', None)