Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2, 2.3
    • Fix Version/s: 2.2.5, 2.3.2, 2.4
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Testing Instructions:
      Hide

      run unit tests

      1/ install moodle 19
      2/ Alter collations in several tables/columns, make it so there is a mix of collations. (Use http://moodle.org/mod/forum/discuss.php?d=206607 as an examle of a real life mixture)
      3/ point moodle 22 install to 19 database
      4/ try /admin/cli/mysql_collation.php script to fix the incorrect collations before upgrade
      5/ run upgrade - no problems expected

      1/ create a test database with 19 data
      2/ change default database collation to something different to what it currently is
      3/ try upgrade to 22 - no problems expected

      Show
      run unit tests 1/ install moodle 19 2/ Alter collations in several tables/columns, make it so there is a mix of collations. (Use http://moodle.org/mod/forum/discuss.php?d=206607 as an examle of a real life mixture) 3/ point moodle 22 install to 19 database 4/ try /admin/cli/mysql_collation.php script to fix the incorrect collations before upgrade 5/ run upgrade - no problems expected 1/ create a test database with 19 data 2/ change default database collation to something different to what it currently is 3/ try upgrade to 22 - no problems expected
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w29_MDL-34271_m24_mysqlcollation
    • Rank:
      42624

      Description

      Quite often ppl change default collation either when upgrading MYSQL or when backing up and restoring mysql dump - this usually coincides with Moodle upgrades. Solution is to detect current collation from one table (config) and use reasonable default when starting installation.

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

          This patch is not going to fix already 1.9 borked sites (those with mixtures of collations or charsets), but it will prevent problems if you change default collations when upgrading to 2.2 or later.

          Show
          Petr Škoda added a comment - This patch is not going to fix already 1.9 borked sites (those with mixtures of collations or charsets), but it will prevent problems if you change default collations when upgrading to 2.2 or later.
          Hide
          Dan Poltawski added a comment -

          So utf8_unicode_ci is our 'recommended' collation.

          Show
          Dan Poltawski added a comment - So utf8_unicode_ci is our 'recommended' collation.
          Hide
          Dan Poltawski added a comment -

          Thanks Petr, i've integrated this now.

          Show
          Dan Poltawski added a comment - Thanks Petr, i've integrated this now.
          Hide
          Martin Dougiamas added a comment -

          I can confirm that http://docs.moodle.org/23/en/MySQL had utf8_unicode_ci. I just made it even clearer.

          Show
          Martin Dougiamas added a comment - I can confirm that http://docs.moodle.org/23/en/MySQL had utf8_unicode_ci. I just made it even clearer.
          Hide
          Matteo Scaramuccia added a comment -
          Show
          Matteo Scaramuccia added a comment - Here is my contrib at the time of 1.9->2.0: http://tracker.moodle.org/browse/MDL-24845?focusedCommentId=98856&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-98856 . Not sure if it will be of any help now.
          Hide
          Dan Poltawski added a comment -

          Can we confirm about what should be our recommended collation setting? I've previously used utf8_bin..something.

          Show
          Dan Poltawski added a comment - Can we confirm about what should be our recommended collation setting? I've previously used utf8_bin..something.
          Hide
          Petr Škoda added a comment -

          utf8_bin solves the comparison issues, unfortunately it borks the sorting - you have to choose lesser evil yourself I am afraid

          Show
          Petr Škoda added a comment - utf8_bin solves the comparison issues, unfortunately it borks the sorting - you have to choose lesser evil yourself I am afraid
          Hide
          Ankit Agarwal added a comment -

          works as expected
          thanks!

          Show
          Ankit Agarwal added a comment - works as expected thanks!
          Hide
          Dan Poltawski added a comment -

          *Notice*: Undefined variable: friendlyintegrator in /Users/danp/git/tokenintegrationthanks.php on line 26

          Congratulations

          {tracker.user.name}

          !

          You've made into Moodle

          {tracker.fixversion-1}

          +

          I would like to personally thank you for this contribution on behalf of all Moodle users throughout the world.

          cheers!

          {tracker.friendlyintegrator}
          Show
          Dan Poltawski added a comment - * Notice *: Undefined variable: friendlyintegrator in /Users/danp/git/tokenintegrationthanks.php on line 26 Congratulations {tracker.user.name} ! You've made into Moodle {tracker.fixversion-1} + I would like to personally thank you for this contribution on behalf of all Moodle users throughout the world. cheers! {tracker.friendlyintegrator}

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: