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

POLICY: Change recommended MySQL collation to case-sensitive

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.1.1
    • Fix Version/s: None
    • Component/s: Database SQL/XMLDB, Policy
    • Labels:
      None
    • Affected Branches:
      MOODLE_31_STABLE

      Description

      Currently Moodle recommends case-insensitive collation for MySQL database:
      https://docs.moodle.org/31/en/MySQL
      But if I create a mysql database with "recommended" collation utf8_unicode_ci I get unittest errors.
      Should not we change the recommended collation?

      There were 2 failures:
       
      1) core_dml_testcase::test_unique_index_collation_trouble
      Unique index is accent insensitive, this may cause problems for non-ascii languages. This is usually caused by accent insensitive default collation.
       
      /home/marina/repositories/mdk_master/moodle/lib/dml/tests/dml_test.php:3823
      /home/marina/repositories/mdk_master/moodle/lib/phpunit/classes/database_driver_testcase.php:143
       
      To re-run:
       vendor/bin/phpunit core_dml_testcase lib/dml/tests/dml_test.php
       
      2) core_dml_testcase::test_sql_binary_equal
      SQL operator "=" is expected to be case sensitive
      Failed asserting that 2 matches expected 1.
       
      /home/marina/repositories/mdk_master/moodle/lib/dml/tests/dml_test.php:3851
      /home/marina/repositories/mdk_master/moodle/lib/phpunit/classes/database_driver_testcase.php:143
       
      To re-run:
       vendor/bin/phpunit core_dml_testcase lib/dml/tests/dml_test.php
      

      P.S. I have always actually had utf8_bin myself but changed the default collation to work on MDL-29332

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              marina Marina Glancy
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Adrian Greeve, Andrew Nicols, Eloy Lafuente (stronk7), Juan Leyva, Jun Pataleta, Sander Bangma
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: