We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42c2b22 commit ac1fb2dCopy full SHA for ac1fb2d
_mysql.c
@@ -827,9 +827,13 @@ _mysql_ConnectionObject_affected_rows(
827
_mysql_ConnectionObject *self,
828
PyObject *args)
829
{
830
+ my_ulonglong ret;
831
if (!PyArg_ParseTuple(args, "")) return NULL;
832
check_connection(self);
- return PyLong_FromUnsignedLongLong(mysql_affected_rows(&(self->connection)));
833
+ ret = mysql_affected_rows(&(self->connection));
834
+ if (ret == (my_ulonglong)-1)
835
+ return PyInt_FromLong(-1);
836
+ return PyLong_FromUnsignedLongLong(ret);
837
}
838
839
static char _mysql_debug__doc__[] =
0 commit comments