Fix MSSQL queries to work with case sensitive collations#48746
Fix MSSQL queries to work with case sensitive collations#48746pruivo wants to merge 4 commits intokeycloak:mainfrom
Conversation
Closes keycloak#48584 Signed-off-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
|
Having lower and upper case column names looks really bad but it seems to be the correct thing. Looks good, please proceed. Thanks! |
Signed-off-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
|
Will this change the collation used for all MS SQL testing in Keycloak? If yes, I am not sure this is a good idea. Basically all default collations in MS SQL are case-insensitive (see https://learn.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support) and I would assume most people go with the default. By changing to case-sensitive, we would test a setup most people are not using. |
Signed-off-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
@sschu I would love all the input I can have. How would we detect errors like this one without running the test with case-sensitive collation? I'm not a DB expert (please read, never used DB in my life), but if the test passes with case-sensitive implies the case-insensitive will also work? I don't wanna double our testsuite size by running it twice 🤞 |
|
@pruivo You are absolutely right, you could not detect this bug without it. I am just concerned that if we change collation here, we don't detect other bugs with case-insensitive collations somewhere else. Would it be possible to make this configurable and specify collation per test? |
Signed-off-by: Pedro Ruivo <1492066+pruivo@users.noreply.github.com>
|
I duplicated the "Migration Tests" to run MSSQL with case-sensitive collation. |
Closes #48584