alexis

Illegal mix of collations Error

Recommended Posts

Hi, 

I found lots of errors in the system logs, with the same name:

Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operatio...

I repost the content for three errors:

Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='
SELECT * FROM `pathalias_paths` WHERE `path_path`=?
Array
(
    [0] => topic/7648-sosiska-

Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='
SELECT * FROM `pathalias_paths` WHERE `path_path`=?
Array
(
    [0] => f/963-mod-

Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='
SELECT * FROM `pathalias_paths` WHERE `path_path`=?
Array
(
    [0] => f/255-kollektivnyie-igryi-

 

The backtrace for one of it is:

 #0 /var/www/strategium/data/www/strategium.ru/forum/system/Db/Exception.php(109): IPS\_Log::log('Illegal mix of ...', 'sql')
#1 /var/www/strategium/data/www/strategium.ru/forum/system/Db/Db.php(427): IPS\Db\_Exception->__construct('Illegal mix of ...', 1267, NULL, 'SELECT * FROM `...', Array)
#2 /var/www/strategium/data/www/strategium.ru/forum/system/Db/Select.php(346): IPS\_Db->preparedQuery('SELECT * FROM `...', Array)
#3 /var/www/strategium/data/www/strategium.ru/forum/system/Db/Select.php(408): IPS\Db\_Select->runQuery()
#4 /var/www/strategium/data/www/strategium.ru/forum/system/Db/Select.php(329): IPS\Db\_Select->rewind()
#5 /var/www/strategium/data/www/strategium.ru/forum/system/Patterns/ActiveRecord.php(108): IPS\Db\_Select->first()
#6 /var/www/strategium/data/www/strategium.ru/forum/init.php(434) : eval()'d code(23): IPS\Patterns\_ActiveRecord::load('f/255-kollektiv...', 'path_path')
#7 /var/www/strategium/data/www/strategium.ru/forum/system/Dispatcher/Front.php(109): IPS\Http\pathalias_hook_ipsHttpUrl->getFriendlyUrlData(true)
#8 /var/www/strategium/data/www/strategium.ru/forum/init.php(434) : eval()'d code(9): IPS\Dispatcher\_Front->init()
#9 [internal function]: IPS\Dispatcher\hook912->init()
#10 /var/www/strategium/data/www/strategium.ru/forum/init.php(434) : eval()'d code(15): call_user_func_array('parent::init', Array)
#11 /var/www/strategium/data/www/strategium.ru/forum/system/Dispatcher/Dispatcher.php(86): IPS\Dispatcher\hook968->init()
#12 /var/www/strategium/data/www/strategium.ru/forum/index.php(13): IPS\_Dispatcher::i()
#13 {main}

As we see, it mentions the Path Aliases hook, so I think, it's something related to your application, Kevin. Could you please take a look at the issue.

Thanks,

Share this post


Link to post
Share on other sites

An illegal mix of collations error means that you have a default collation set on your table which cannot be mixed with that of some of the columns inside the table. You have any idea how that might have happened? Did you perhaps change the collation type of the database table?

Specifically, you have your table collation set to utf8mb4_general_ci, and some of the columns inside the table have a collation of utf8_unicode_ci. You should probably be using utf8mb4_unicode_ci for the table collation so that it is compatible with the utf8_unicode_ci columns.

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.