-
Notifications
You must be signed in to change notification settings - Fork 358
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
get error DPI-1044: value cannot be represented as an Oracle number when using very large number #459
Comments
I am able to replicate the issue with some values of |
allow for that possibility (oracle/python-cx_Oracle#459).
… bump version to 8.1 for further development.
The patch ended up being quite simple. If you are able to build cx_Oracle for yourself you can test and let me know if itt works for you as well. I used these scripts for my own tests: The SQL: create table issue_459 (
num number
);
insert into issue_459
values (225268684584131642404515845017960494737);
insert into issue_459
values (8225268684584131642404515845017960494737);
insert into issue_459
values (-8225268684584131642404515845017960494737);
commit; and the Python script: import cx_Oracle
conn = cx_Oracle.connect("user/password@dsn")
cursor = conn.cursor()
cursor.execute("select * from issue_459")
vals = [i for i, in cursor]
for val in vals:
print(val, "with length", len(str(val)))
for val in vals:
cursor.execute("select * from issue_459 where num = :val", val=val)
for fetched_val, in cursor:
print(fetched_val) |
Thank you very much, this was fast (so much faster than metalink !!). I don't know how to compile it and I work in a very secure (hardened) environment so I cannot test (but the patch is obvious). Pierre |
Thanks for your comments. For the record, compilation steps are in https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html#install-using-github |
allow for that possibility (oracle/python-cx_Oracle#459).
This is included in cx_Oracle 8.0.1 which was just released. |
See https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html for how to report security issues.
For other issues:
It is an error
cx_Oracle.DatabaseError: DPI-1044: value cannot be represented as an Oracle number
Include all SQL needed to create the database schema.
platform.platform: Linux-3.10.0-1127.el7.x86_64-x86_64-with-redhat-7.8-Maipo
sys.maxsize > 2**32: True
platform.python_version: 3.6.8
And:
12.1.0.2
The text was updated successfully, but these errors were encountered: