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.
2 parents f2ab098 + ac1fb2d commit 8c219d9Copy full SHA for 8c219d9
_mysql.c
@@ -823,9 +823,13 @@ _mysql_ConnectionObject_affected_rows(
823
_mysql_ConnectionObject *self,
824
PyObject *args)
825
{
826
+ my_ulonglong ret;
827
if (!PyArg_ParseTuple(args, "")) return NULL;
828
check_connection(self);
- return PyLong_FromUnsignedLongLong(mysql_affected_rows(&(self->connection)));
829
+ ret = mysql_affected_rows(&(self->connection));
830
+ if (ret == (my_ulonglong)-1)
831
+ return PyInt_FromLong(-1);
832
+ return PyLong_FromUnsignedLongLong(ret);
833
}
834
835
static char _mysql_debug__doc__[] =
0 commit comments