-
Notifications
You must be signed in to change notification settings - Fork 934
WIP Add testing DB2 to GitHub Actions #2967
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
base: master
Are you sure you want to change the base?
Conversation
DB2 requires similar to Firebird workaround for parameters. Parameters that are used in the SELECT statements should be wrapped into
See this: https://www.ibm.com/docs/es/db2/11.1?topic=design-parameters-markers#d97366e93 |
I think we need to have a systematic approach rather than trying to fix this problem for different DBs. (I think Hana has the same problem). I had a several attempts to fix it, but never finished. |
I don't really like how it's done in Firebird. We need to think about more elegant solution rather than "brute force" parameters wrapping in cast. The request to disable this functionality proves it can cause more harm than good |
Yes, agree. |
171) Error : NHibernate.Test.TypesTest.StringTypeWithLengthFixture.HqlEqualityParameterCanExceedColumnSize
NHibernate.Exceptions.GenericADOException : could not execute query
[ select stringclas0_.Id as id1_0_, stringclas0_.StringValue as stringvalue2_0_, stringclas0_.LongStringValue as longstringvalue3_0_ from StringClass stringclas0_ where stringclas0_.StringValue=@p0 ]
Name:likeValue - Value:AAAAAAAAABx [Type: NHibernate.Type.StringType (SqlType: String(Length=10))]
----> IBM.Data.DB2.Core.DB2Exception : ERROR [22001] [IBM] CLI0109E String data right truncation. SQLSTATE=22001 This test is skipped if |
Skip condition is incorrect then.
Yes
Yes |
/// <summary> | ||
/// Supports sub-selects in order by clause | ||
/// </summary> | ||
public virtual bool SupportsSubSelectsInOrderBy => _dialect.SupportsScalarSubSelects; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DB2 supports scalar sub selects, but it does not support them in order-by clause.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Also... The assembly name and namespace has (edit:almost) reverted back to .NET version. Need to change driver. |
Just to check how it works... It's the latest version. So why not? |
And it doesn't work... So let's just drop it for now.. |
Yeah, it is |
This comment has been minimized.
This comment has been minimized.
Interesting async regen failure. Logscrit: AsyncGenerator.CommandLine[0] One or more errors occurred while opening the project: Msbuild failed when processing the file '/home/runner/work/nhibernate-core/nhibernate-core/src/NHibernate.Test/NHibernate.Test.csproj' with message: /usr/share/dotnet/sdk/6.0.405/Microsoft.Common.CurrentVersion.targets: (2302, 5): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "/home/runner/.nuget/packages/ibm.data.db2.core-lnx/3.1.0.500/lib/netstandard2.1/IBM.Data.DB2.Core.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. Hint: For suppressing irrelevant errors use SuppressDiagnosticFailures option. System.InvalidOperationException: One or more errors occurred while opening the project: Msbuild failed when processing the file '/home/runner/work/nhibernate-core/nhibernate-core/src/NHibernate.Test/NHibernate.Test.csproj' with message: /usr/share/dotnet/sdk/6.0.405/Microsoft.Common.CurrentVersion.targets: (2302, 5): There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "/home/runner/.nuget/packages/ibm.data.db2.core-lnx/3.1.0.500/lib/netstandard2.1/IBM.Data.DB2.Core.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. Hint: For suppressing irrelevant errors use SuppressDiagnosticFailures option. at AsyncGenerator.AsyncCodeGenerator.CheckForErrors(MSBuildWorkspace workspace, String itemType, ImmutableArray`1 supressFailuresPredicates, ILogger logger) in C:\Workspace\Git\AsyncGenerator\Source\AsyncGenerator\AsyncCodeGenerator.cs:line 437 at AsyncGenerator.AsyncCodeGenerator.OpenProject(MSBuildWorkspace workspace, String filePath, ImmutableArray`1 supressFailuresPredicates, ILogger logger, CancellationToken cancellationToken) in C:\Workspace\Git\AsyncGenerator\Source\AsyncGenerator\AsyncCodeGenerator.cs:line 375 at AsyncGenerator.AsyncCodeGenerator.GenerateAsync(AsyncCodeConfiguration configuration, CancellationToken cancellationToken) in C:\Workspace\Git\AsyncGenerator\Source\AsyncGenerator\AsyncCodeGenerator.cs:line 76 at AsyncGenerator.CommandLine.Program.Main(String[] args) in C:\Workspace\Git\AsyncGenerator\Source\AsyncGenerator.CommandLine\Program.cs:line 51 |
I've just moved my app from .NET 3.1 to .NET 6.0. Next step it would be to have new Db2 driver supporting .NET 6.0 (I expect better performance). However I was surprised with driver name change - db2-net-packages (breaking changes paragraph). |
ERROR [42803] [IBM][DB2/LINUXX8664] SQL0119N An expression starting with "BODYWEIGHT" specified in a SELECT clause, HAVING clause, or ORDER BY clause is not specified in the GROUP BY clause or it is in a SELECT clause, HAVING clause, or ORDER BY clause with a column function and no GROUP BY clause is specified.
Note to myself: On Windows need to set |
# Conflicts: # src/NHibernate/Driver/DB2NetDriver.cs
Current state: 91 tests are failing. |
This reverts commit 578bf11.
Too many tests error..