mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 21:00:33 +03:00
Parse the rowcount as long
This commit is contained in:
parent
35545e7374
commit
d0b35adeb6
|
@ -506,7 +506,7 @@ psyco_curs_executemany(cursorObject *self, PyObject *args, PyObject *kwargs)
|
||||||
{
|
{
|
||||||
PyObject *operation = NULL, *vars = NULL;
|
PyObject *operation = NULL, *vars = NULL;
|
||||||
PyObject *v, *iter = NULL;
|
PyObject *v, *iter = NULL;
|
||||||
int rowcount = 0;
|
long rowcount = 0;
|
||||||
|
|
||||||
static char *kwlist[] = {"query", "vars_list", NULL};
|
static char *kwlist[] = {"query", "vars_list", NULL};
|
||||||
|
|
||||||
|
|
|
@ -1274,7 +1274,7 @@ _read_rowcount(cursorObject *curs)
|
||||||
if (!rowcount || !rowcount[0]) {
|
if (!rowcount || !rowcount[0]) {
|
||||||
curs->rowcount = -1;
|
curs->rowcount = -1;
|
||||||
} else {
|
} else {
|
||||||
curs->rowcount = atoi(rowcount);
|
curs->rowcount = atol(rowcount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user