-
Notifications
You must be signed in to change notification settings - Fork 62
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
ORA-01008: not all variables bound - but they are bound #41
Comments
The thin driver isn't supposed to ever get ORA-01008! There is code to perform all sorts of checks. I just ran this code and it produced the expected results:
This produces (for me) the results:
I presume you would get the same results. Assuming that is the case, can you replace your SQL with an equivalent set of SQL that demonstrates the problem but which I can also run? Are you able to demonstrate the issue without SQLAlchemy? Another option for debugging this: set the environment variable |
|
Interesting! Are you able to replicate the issue with a standalone example that I could run as well? That would be the most helpful. I'll see if I can get anything useful from the packet output, though. Thanks for providing that! |
From those logs I see an additional error (fetch out of sequence) and the fact that the statement is indeed being executed without passing any parameters -- but why is a mystery. I tried replacing the table |
One note: I see that the type bound in the first case is string and the second is integer. If you make them both string or both integer does the problem go away? |
|
Interesting! So did you add data into the table that matches the data in your
Can you also provide the table structure for the table? Preferably with the SQL used to create the table. This looks like an interesting problem. :-) |
|
Thanks. That was sufficient. If I have a table with the description column being a CLOB I am able to replicate the issue. Now to find out what might be causing the problem to occur! |
For future reference, this setup script:
and this Python script:
are sufficient to replicate the issue without SQLAlchemy involved. I hope to have a fix for this soon. Thanks for reporting it! |
occurs when setting oracledb.defaults.fetch_lobs to the value False (#41).
I've just pushed a patch that corrects this. The problem occurs when a define is required (such as when converting CLOB to VARCHAR2, as is occurring in this scenario) and the bind parameter type/size changes. If you are able to build and test, you can confirm that. Otherwise, using the same type/size for your parameters will bypass this issue. Again, thanks for reporting this issue! |
occurs when setting oracledb.defaults.fetch_lobs to the value False (#41).
Confirmed. When use both ints/strings with the same size - issue doesn't reproduce. |
This fix is included in python-oracledb 1.0.3, which was just released. |
What versions are you using?
platform.platform: Linux-5.10.104-linuxkit-x86_64-with-glibc2.31
sys.maxsize > 2**32: True
platform.python_version: 3.9.13
oracledb.version: 1.0.2
sqlalchemy.version: 1.4.35
pyramid.version: 2.0
Is it an error or a hang or a crash?
crash
What error(s) or behavior you are seeing?
(Background on this error at: https://sqlalche.me/e/14/4xp6)
Does your application call init_oracle_client()?
No (the issue doesn't reproduce when using Thick mode)
Include a runnable Python script that shows the problem.
Run the server:
Run the test and get the error on the server:
The text was updated successfully, but these errors were encountered: