Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cursor.rowcount is wrong (by about 32 bits) #3

Closed
jkyeung opened this issue May 28, 2019 · 1 comment
Closed

cursor.rowcount is wrong (by about 32 bits) #3

jkyeung opened this issue May 28, 2019 · 1 comment

Comments

@jkyeung
Copy link

jkyeung commented May 28, 2019

Using the following packages as reported by yum list:

python3.ppc64                          3.6.8-1
python3-ibm_db.ppc64                   2.0.5.9-0

After updating some rows using cursor.execute, cursor.rowcount is not set to the actual number of affected rows, but rather (actual_rows + 1) * 2**32 - 1. I imagine this is due to some mix-up with respect to integer size in the C implementation.

@kadler
Copy link
Owner

kadler commented May 28, 2019

This is a 64-bit issue caused by SQLLEN being defined as a long instead of an int/SQLINTEGER:

https://github.com/kadler/python-ibmdb/blob/ibmi/IBM_DB/ibm_db/ibm_db.h#L152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants