Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-15085

Civi fails to enforce collation utf8_unicode_ci

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.6
    • Fix Version/s: Unscheduled
    • Component/s: Core CiviCRM
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      CiviCRM uses "SET NAMES utf8" in CRM_Core_DAO->initialize() to force using the desired character set. This leaves the collation as the default for utf8, which is utf8_general_ci. Any queries comparing string literals may encounter a mismatched collation error (utf8_general_ci implicit, utf8_unicode_ci implicit) if other measures are not taken (e.g., type-casting literals to a specific collation.

      Recommend patching CRM_Core_DAO->initialize() to use the proper, desired collation.

        Attachments

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              s.bink Steve Binkowski
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: