Oracle 19.0.0.0.ru-2024-07.rur-2024-07.r1 (hosted on Amazon RDS)
platform.platform: macOS-15.1.1-arm64-arm-64bit
sys.maxsize > 2**32: True
platform.python_version: 3.12.6
oracledb.__version__: 3.0.0 (I had the same issue in 2.5.1)
Both, depending on various parameters
oracledb.defaults.prefetchrows = 10_000 oracledb.defaults.arraysize = 10_000 with get_database_connection().cursor() as cursor: # cursor.execute("drop table example_table") cursor.execute("create table example_table(id number generated by default on null as identity, data number)") # Populate the table with data; data is `2` except for one row which is `0` cursor.executemany("insert into example_table(data) values (2)", [tuple() for _ in range(20_000)]) cursor.execute("insert into example_table(data) values (0)") cursor.connection.commit() print("inserted") successful_query = cursor.execute("SELECT id, data FROM EXAMPLE_TABLE").fetchall() print("total records:", len(successful_query)) # Prints 20002 # Fails with error `DPY-5000: internal error: unknown protocol message type 1 at position 10` cursor.execute("SELECT id, 1 / data FROM EXAMPLE_TABLE").fetchall() # Fails with the seemingly correct error `ORA-01476: divisor is equal to zero` cursor.execute("SELECT id, 1 / data FROM EXAMPLE_TABLE order by id").fetchall() # Hangs for values from 1 to 19000 cursor.execute("SELECT id, 1 / data FROM EXAMPLE_TABLE where id > 1").fetchall() cursor.execute("SELECT id, 1 / data FROM EXAMPLE_TABLE where id > 19000").fetchall() # Fails with the seemingly correct error `ORA-01476: divisor is equal to zero` cursor.execute("SELECT id, 1 / data FROM EXAMPLE_TABLE where id > 19001").fetchall() cursor.execute("SELECT id, 1 / data FROM EXAMPLE_TABLE where id > 20000").fetchall() # Succeeds (returns nothing) as expected cursor.execute("SELECT id, 1 / data FROM EXAMPLE_TABLE where id > 20001").fetchall() # I've also gotten errors like `ValueError: could not convert string to float: b'2.482419253800I50'` # or `ValueError: invalid literal for int() with base 10: b'200I500'` when running a similar query, # but I haven't managed to recreate that consistently here
No, I use thin mode
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4