Skip to content
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

Adjust exists subquery for Oracle #105

Closed
wants to merge 1 commit into from
Closed

Adjust exists subquery for Oracle #105

wants to merge 1 commit into from

Conversation

ribasushi
Copy link
Contributor

I believe this is all that's needed to address #104. @abraxxa please test when time permits.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 98.517% when pulling 9a9a92b on ribasushi:fix_oracle_exists into 1c69130 on frioux:main.

@abraxxa
Copy link
Contributor

abraxxa commented Jun 24, 2020

I tested the changed code and sadly it didn't change the error message.

@ribasushi
Copy link
Contributor Author

I tested the changed code and sadly it didn't change the error message.

If the error message is exactly the same
=> this means that the query that executed is exactly the same
=> which means the conditional that I added failed
=> which should not be possible

Either you are not testing against the correct code, or there is a secondary bug of some sort lurking somewhere obscuring the correct sqlt_type. You will have to debug this further locally.

@abraxxa
Copy link
Contributor

abraxxa commented Jun 24, 2020

The error message doesn't include the full sql query just the start so it is the same. Yes DBIC_TRACE showed that 'FROM DUAL' has been appended.

Oracle has no 'SELECT EXISTS' as far as I see here: https://docs.oracle.com/database/121/SQLRF/statements_10002.htm#SQLRF01702

I only found 'exists' here https://docs.oracle.com/database/121/SQLRF/conditions013.htm#SQLRF52167

@ribasushi
Copy link
Contributor Author

Oracle has no 'SELECT EXISTS'

You are mis-interpreting the query we are issuing ( EXISTS is a standalone operator, not a qualifier for SELECT: think SELECT column1, function2(...), value3 ). You need to try to dig harder and apply more thought.

I can try to setup the CI portion locally, and figure this out, but this is fiddly and I definitely won't be able to look until the weekend or beyond.

@abraxxa
Copy link
Contributor

abraxxa commented Jun 24, 2020

The * in Oracles error messages haven't failed me in the past to point at the correct location of the query and it points at the EXISTS right after SELECT.
As shown in the stackoverflow I've linked to select count(*) from dual where exists ($subquery) should be a valid statement.
I don't know EXISTS at all and haven't used it before so can't help but testing queries.

@ribasushi
Copy link
Contributor Author

lack of available expertise, closing until such materializes

@ribasushi ribasushi closed this Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants