From 8c090157b7031de40a8f177aadf2507e56f602f5 Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Sun, 11 Oct 2015 20:09:17 +0900 Subject: [PATCH] Check after mysql_store_result propery fixes #51 --- _mysql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_mysql.c b/_mysql.c index 5d3f572..62e2401 100644 --- a/_mysql.c +++ b/_mysql.c @@ -408,7 +408,7 @@ _mysql_ResultObject_Initialize( self->result = result; Py_END_ALLOW_THREADS ; if (!result) { - if (mysql_field_count(&(conn->connection)) > 0) { + if (mysql_errno(&(conn->connection))) { _mysql_Exception(conn); return -1; }