Mysql Error in virtual-list.php

  • jstad

    jstad - 2008-05-15

    Everytime I try to access the virtual-list.php I am greated with the following error:

    DEBUG INFORMATION: Invalid query: Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '='

    If anyone can tell me how to solve this, it would be greatly appreciated.


    • Odd Henriksen

      Odd Henriksen - 2008-05-17

      Apparently, the various tables in your postfix database has different collation settings (and possibly also charset settings). Did you use setup.php or a script to create all the tables? Anyhow, please make sure that all tables use the same collation setting, for example by going through them with phpMyAdmin or MySQL Administrator.

    • Jon Kristian Nilsen

      Same issues here, even with a clean db installation. I tried to change stuff from latin1_swedish_ci to latin1_general_ci, except,
      the email field in vacation table, and on_vacation/notified fields in vacation_notification absolutley refuse to change collation from
      latin1_swedish_ci to latin1_general_ci , i get a #1025 - Error on rename of './postfix/#sql-dfd_281b9' to './postfix/vacation' (errno: 150)

    • Jon Kristian Nilsen

      • Morgan

        Morgan - 2008-08-06

        Invalid query: Illegal mix of collations (cp1251_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '='

    • Christian Boltz

      Christian Boltz - 2008-06-10

      Changing the vacation and vacation_notification tables is somewhat difficult because they use foreign keys. I'm not really surprised that they refuse the change ;-)

      Regarding the collation: For historical reasons (and because latin1_swedish_ci existed before latin1_general_ci in MySQL), we use swedish. It should not make a difference because the latin1 fields contain only ASCII characters (like domains or mail addresses). Fields that can contain comments etc. are UTF-8 already.

      I'm not too keen on switching to latin1_general_ci because it causes lots of work for the database upgrade, with no value added. (No, just changing the line as proposed in your patch isn't enough :-( )

      If you really see the issues with a clean db, please tell me which fields are not in latin1_swedish_ci and therefore cause the error. Debugging is probably easier if you patch slightly - please change line 1478:

      - if ($error_text != "" && $ignore_errors == 0) die($error_text);
      + if ($error_text != "" && $ignore_errors == 0) die($query . " - " . $error_text);

    • Jon Kristian Nilsen

      That's pretty strange, I just went through my old database from 2.1.0 and it contains only latin1_general_ci
      As with jsmestad's report, im willing to bet his does too, and that they're actually conflicting the other way around.

      Yes, i had the same issues with a clean install, the fields that contains latin1_swedish_ci after upgrading a db from 2.1.0 are:
      config -> name, value
      vacation -> email, cache, domain
      vacation_notification -> on_vacation, notified


Log in to post a comment.