Incorrect character comparison between different collation for MySQL

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Timed out
    • Component/s: None
    • None

      NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? See the corresponding suggestion.

      Detailed explanation can be found at:

      What this means for JIRA is that you might get duplicate result for different values as an affect of how MySQL handles character comparison.

      For example you might see errors such as:

      Cause:
      java.lang.RuntimeException: java.lang.RuntimeException: Found more than one user with name 'melgstrom'; ids [GenericEntity:OSUser][id,14773][name,melgström][passwordHash,x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A==], [GenericEntity:OSUser][id,15020][name,melgstrom][passwordHash,x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A==] 
      

      Making the coresponding select statement in MySQL returns:

      mysql> select * from userbase where username = 'melgstrom';
      +-------+------------+------------------------------------------------------------------------------------------+
      | ID    | username   | PASSWORD_HASH                                                                            |
      +-------+------------+------------------------------------------------------------------------------------------+
      | 14773 | melgström  | x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A== |
      | 15020 | melgstrom  | x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A== |
      +-------+------------+------------------------------------------------------------------------------------------+
      

              Assignee:
              Unassigned
              Reporter:
              Han Chen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: