Closed AaronDMarasco closed 9 months ago
This is not a bug in the code. It could arguably be considered a bug in the documentation, though! This is a "feature" of Oracle. Parsing DDL also executes it. There is no way around that as far as I am aware.
@anthony-tuininga I figured something like that would be the response. But IMHO as a total newb in this domain, the documentation should tell me that.
Or maybe there needs to be a totally different "parse/verify this is legit" API call independent of "execute it but not really."
The documentation (https://docs.oracle.com/en/database/oracle/oracle-database/18/lnoci/statement-functions.html#GUID-98B26708-3E02-45C0-8258-5D5544F32BE9) does say nothing about DDL statements, though it's ancient knowledge (https://asktom.oracle.com/pls/apex/asktom.search?tag=ddl-related-parse-execute-fetch). Which I had to experience myself, too.
Note added to the documentation.
What version of ODPI-C are you using (see dpi.h)?
What OS (and version) is your application on?
What compiler (and version) did you use?
What is your version of the Oracle Client (e.g. Instant Client)? How was it installed? Where it is installed?
/opt/tools/oracle/19.17
)What is your Oracle Database version?
What is the
PATH
environment variable (on Windows) orLD_LIBRARY_PATH
(on Linux) set to?/opt/tools/oracle/19.17/lib
What environment variables did you set? How exactly did you set them?
ORACLE_HOME
is being set by the.so
finding mechanismWhat problem or error(s) you are seeing?
CREATE TABLE
" statement withDPI_MODE_EXEC_PARSE_ONLY
which says "Do not execute the statement but only parse it and return any parse errors."Do you have a runnable code snippet to describe the problem?
DPI_MODE_EXEC_DESCRIBE_ONLY
, but when debugging if I tried that alone I received an error about zero iterations.