Details

    • Type: Sub-task
    • Status: Closed
    • Priority: 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

      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.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            skodak Petr Skoda 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
            skodak Petr Skoda 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
            poltawski Dan Poltawski added a comment -

            So utf8_unicode_ci is our 'recommended' collation.

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

            Thanks Petr, i've integrated this now.

            Show
            poltawski Dan Poltawski added a comment - Thanks Petr, i've integrated this now.
            Hide
            dougiamas 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
            dougiamas 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 Matteo Scaramuccia added a comment -
            Show
            matteo 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
            poltawski Dan Poltawski added a comment -

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

            Show
            poltawski Dan Poltawski added a comment - Can we confirm about what should be our recommended collation setting? I've previously used utf8_bin..something.
            Hide
            skodak Petr Skoda 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
            skodak Petr Skoda 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_frenz Ankit Agarwal added a comment -

            works as expected
            thanks!

            Show
            ankit_frenz Ankit Agarwal added a comment - works as expected thanks!
            Hide
            poltawski 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
            poltawski 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:
                  Fix Release Date:
                  10/Sep/12