Skip to content

Conversation

@arjantijms
Copy link
Contributor

Fixes #2592

shouldBindPartialParameters was set to true in DB2Platform, but later overridden by a copy of the default parameters from the default DBPlatform.

It never actually worked.

After enabling it for real, found out that for translateQueryStringAndBindParameters in DatabaseCall, bindParameters (for that call) has to be checked for, otherwise things like setting query hints to not bind from the caller site don't work anymore.

Additionally, dynamicSQLRequiredForFunctions should return false when shouldBindPartialParameters is true. Otherwise a single operator will immediately disable binding for the entire query, which is the exact opposite of what partial binding is about.

A large number of tests had to be adjusted for the new output of DB2.

shouldBindPartialParameters was set to true in DB2Platform, but later
overridden by a copy of the default parameters from the default
DBPlatform.

It never actually worked.

After enabling it for real, found out that for
"translateQueryStringAndBindParameters" in DatabaseCall,
"bindParameters" (for that call) has to be checked for, otherwise things
like setting query hints to not bind from the caller site don't work
anymore.

Additionally, "dynamicSQLRequiredForFunctions" should return false when
"shouldBindPartialParameters" is true. Otherwise a single operator will
immediately disable binding for the entire query, which is the exact
opposite of what partial binding is about.

A large number of tests had to be adjusted for the new output of DB2.
@arjantijms
Copy link
Contributor Author

@pardhiv-krishna What do you think about this PR?

@arjantijms
Copy link
Contributor Author

Small ping @pardhiv-krishna and @anija-anil

Maybe @rfelcman can say something about this one too?

Copy link
Contributor

@pardhiv-krishna pardhiv-krishna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the failing test class and it passes with these changes. However, my DB2 container keeps hanging when I run the full suite, so I couldn’t verify everything end to end. I’m not fully confident about any broader impact. Would be good for someone with more EclipseLink expertise to re-validate the overall behavior.

@arjantijms
Copy link
Contributor Author

Indeed, there's 4 other tests that hang (they are all about locking). These will be the last to investigate to make the entire suite pass.

I locally commented them out, and all tests pass then (when the other outstanding PR has been merged)

Obviously it's very important to address these hangs.

We all have a lot to learn about the EclipseLink code, and I truly hope the previous Oracle maintainers (who retain their commit status) can continue to help in some capacity.

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.

JUnitJPQLComplexTest.variableReferencedOnlyInParameterTest fails on DB2

2 participants