Gallery2:Known Issues:MySQL UTF8 Upgrade - Gallery Codex
Personal tools

Gallery2:Known Issues:MySQL UTF8 Upgrade

From Gallery Codex

MySQL Upgrade Issue - UTF-8

MySQL Collations - In the upgrade from older version to G2.1 or newer, step 3 (core module upgrade) might fail for some users with a error similar to

 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE)

What you can do to fix the problem is to edit modules/core/classes/GalleryStorage/MySqlStorage.class and change

   function _setConnectionSettings(&$db) {
       /* MySQL 4.1.0+ support UTF-8, for details, see: http://drupal.org/node/40515 */

to

   function _setConnectionSettings(&$db) {
       return null;
       /* MySQL 4.1.0+ support UTF-8, for details, see: http://drupal.org/node/40515 */

and edit modules/core/CoreModuleExtras.inc by replacing

       case '1.0.27':

with

           $storage->execute('SET NAMES "utf8"');
       case '1.0.27':

Then start the upgrade wizard again. You should now be able to successfully run all upgrade steps. After the upgrade, change MySqlStorage back. CoreModuleExtras.inc does't matter, but you can revert that change too after the upgrade.

Note: Earlier MySQL had a related bug. Upgrade to MySQL 4.1.16 (or higher) or 5.0.17 (or higher) to resolve this problem: http://bugs.mysql.com/bug.php?id=10446

advertisements