-
Notifications
You must be signed in to change notification settings - Fork 44
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
Allow chinese characters in saved_user_auth_info db table #701
Conversation
of info_val column in saved_user_auth_info table from latin1 to utf8 in order to accept also chinese characters
Could you add a URL reference for the default MySQL charsets you mentioned? Thanks :) |
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.
Just a couple of clarifications
@@ -0,0 +1 @@ | |||
ALTER TABLE saved_user_auth_info MODIFY info_val varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; |
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.
Has this query some consequences on already present records?
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.
AFAIK, there should be no problem because all characters from latin1_swedish_ci
are present in utf8mb4_unicode_ci
. There might be problems with conversion if there were charset columns defined as foreign keys, but this is not the case.
I tried this query on our development instance (iam-dev) having that table already populated, and it succeeded.
URLs added in the PR description! :) |
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
@@ -0,0 +1 @@ | |||
ALTER TABLE saved_user_auth_info MODIFY info_val varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; |
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.
case-insensitive?
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.
yes, I left it case-insensitive as before. Isn't it good?
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.
It depends on what that field represents
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.
It contains information on user authentication through a SAML IdP (e.g. organization name, UID, given name, mail, etc.) coming from the SAML assertion
in particular, character set of the
info_val
column has been changed fromlatin1
toutf8
.This PR solves issue #700.
The error occurs when using MySQL 5.7 since:
latin1
and default collationlatin1_swedish_ci
utf8mb4
and default collationutf8mb4_0900_ai_ci
(which also accepts Chinese characters)References: