Closed M4X1K02 closed 1 year ago
Thanks for the report and testcase.
The parameter batcherrors
can only be used with insert, update, delete and merge statements, not with PL/SQL. This is not being checked in thin mode (so you are seeing the ORA-3137 error instead). I'll get that corrected. In the meantime, remove the batcherrors
parameter as it cannot be used with PL/SQL!
I have pushed a patch that should correct this issue and added a relevant test case. If you are able to build from source you can verify that it corrects your issue as well.
Built from source and now prints the error message
oracledb.exceptions.ProgrammingError: DPY-2040: parameters "batcherrors" and "arraydmlrowcounts" may only be true when used with insert, update, delete and merge statements
Thank you and closing this issue.
oracle database: 19c platform.platform: Windows-10-10.0.19044-SP0 sys.maxsize > 2**32: True platform.python_version: 3.10.9 oracledb.version: 1.2.1
I'm not sure, I'd say it is an error and a hang. For details see 3.
cur.executemany()
raises the following error ifbatcherrors=True
. But withbatcherrors=False
or even catching the exception and doing nothing with it, the query completes and data is inserted. I also have found another issue, wherecur.executemany()
simply hangs forever withbatcherrors=False
but is also showing the same errormessage when turning batcherrors back on. Unfortunately I have not been able to completely reproduce this error in a smaller factor, which resulted in this example (5.), but I still believe they are related. The only difference between this example and the other one (which is not shown here because it is simply to big) is that withbatcherrors=False
this example (5.) completes, while the other one hangs.No. (Thin mode)
SQL table:
SQL procedure: