Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Incorrect parameter length for char types in MicrosoftDataSqlClientDriver #3360

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

Merged
merged 9 commits into from
Jul 16, 2023

Conversation

hazzik
Copy link
Member

@hazzik hazzik commented Jul 14, 2023

NHibernate.Test.Linq.FunctionTests.CharIndexFunction was failing using MicrosoftDataSqlClientDriver

=> NHibernate.Test.Linq.FunctionTests.CharIndexFunction
NHibernate: 
    select
        employee0_.FirstName as col_0_0_ 
    from
        Employees employee0_
NHibernate: 
    select
        lower(employee0_.FirstName) as col_0_0_ 
    from
        Employees employee0_ 
    where
        charindex(@p0, lower(employee0_.FirstName))-1=@p1;
    @p0 = 'a' [Type: StringFixedLength (4000:0:0)], @p1 = 0 [Type: Int32 (0:0:0)]

Note the size of @p0 parameter. Same test using Sql2008ClientDriver:

=> NHibernate.Test.Linq.FunctionTests.CharIndexFunction
NHibernate: 
    select
        employee0_.FirstName as col_0_0_ 
    from
        Employees employee0_
NHibernate: 
    select
        lower(employee0_.FirstName) as col_0_0_ 
    from
        Employees employee0_ 
    where
        charindex(@p0, lower(employee0_.FirstName))-1=@p1;
    @p0 = 'a' [Type: StringFixedLength (1:0:0)], @p1 = 0 [Type: Int32 (0:0:0)]

Closes #3280

@hazzik hazzik changed the title Run tests for Microsoft.Data.SqlClientDriver Run tests for Microsoft.Data.SqlClient Driver Jul 14, 2023
@hazzik hazzik changed the title Run tests for Microsoft.Data.SqlClient Driver Fix parameter length for char types in MicrosoftDataSqlClientDriver Jul 14, 2023
@hazzik hazzik changed the title Fix parameter length for char types in MicrosoftDataSqlClientDriver Incorrect parameter length for char types in MicrosoftDataSqlClientDriver Jul 14, 2023
@hazzik hazzik enabled auto-merge (squash) July 16, 2023 13:59
@hazzik hazzik merged commit 04c4d52 into nhibernate:master Jul 16, 2023
@hazzik hazzik deleted the test-MicrosoftDataSqlClientDriver branch July 16, 2023 17:56
@fredericDelaporte fredericDelaporte added this to the 5.5 milestone Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests for Microsoft.Data.SqlClient driver
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.