Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-23925

make get_records() and friends use case and accent insensitive comparison consistently for all DB engines

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.9.9
    • Fix Version/s: 2.0
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      The problem is that the "=" in MySQL and MSSQL is using collation rules, in PostgreSQL and Oracle it is using binary string comparison. This is surprising for many developers, it creates major problems in glossary, tags, course shortnames, user names, etc. for non-english languages because different accent difference sometimes makes a work meaning different.

      After the like fixes in MDL-23888 it makes sense to fix get_records() and friends to make them use binary comparisons consistently via new $DB->sql_binary_comparison().

      I have discussed this with Eloy today, he seemed to be surprised too and gave +2 for commit...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              skodak Petr Skoda
              Tester:
              Nobody
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10