[dev.icinga.com #2389] Mysql 1267: Illegal mix of collations (latin1_general_cs,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' #897
Comments
Updated by changsisu on 2012-03-02 01:47:06 +00:00 I'm running icinga 1.61 |
Updated by Tommi on 2012-03-02 19:19:20 +00:00 within objects table definition name fields are hardcode to latin1, which is the standard within the most mysql database installations.
In your case there will be a mismatch between table definition and database definition if database charset is UTF or other one multibyte charset. You can try to change the column characterset definitions for yourselve to match your database settings. (remove it or set it to your charset). But there are much more fields than for the objects table affected. for chance this will be changed in later versions, but maybe this can break backward compatibility |
Updated by mfriedrich on 2012-03-02 22:36:23 +00:00 the collation with cs = case sensitive is there for a reason. mainly to drop former binary selects which where dropping performance. if you remove cs mysql won't make a difference between HOSTNAME and hostname e.g. - that's a bug and unwanted behaviour. |
Updated by Tommi on 2012-03-03 21:09:28 +00:00 i think the problem is more to fill the latin charset field with chinese characters.
From now, every connection(regardless of ido2db or icinga-web) to the DB should use characterset UTF8 with
or change it in my.ini as default
Afterwards, a the apps (ido2db/icingaweb) must be enabled to store/retrieve data in UTF8 (maybe with libintl or similar). Other databases types are affected as well, if we enable ido2db with multibyte chars for mysql. But at least in near future we should think about the general solution. in oracle i had already problemes with differend sizes of a string compared to bytes. |
Updated by Tommi on 2012-03-11 19:55:21 +00:00
currently, icinga project team cannot implement full multibyte charset support. But you are invited to help and send a patch. |
Updated by mfriedrich on 2014-12-08 14:37:35 +00:00
|
Updated by mfriedrich on 2015-03-12 16:56:09 +00:00
|
Updated by mfriedrich on 2015-03-12 16:56:34 +00:00
|
This issue has been migrated from Redmine: https://dev.icinga.com/issues/2389
Created by changsisu on 2012-03-01 07:58:30 +00:00
Assignee: (none)
Status: Rejected (closed on 2012-03-11 19:55:21 +00:00)
Target Version: (none)
Last Update: 2014-12-08 14:37:35 +00:00 (in Redmine)
Service discriptions containing Chinese characters can cause mysql error code 1267.
Here is the full log:
Mar 1 15:36:12 ADMIN-01 ido2db: Error: database query failed for 'SELECT object_id FROM icinga_objects WHERE instance_id=1 AND objecttype_id=2 AND name1='MISC-ADMIN-01' AND name2='SMS Send Check - IDC生产环境报警手机短信发送检测'' - '1267: Illegal mix of collations (latin1_general_cs,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=''
The service above is defined like this:
define service{
use generic-service ; Name of service template to use
host_name MISC-ADMIN-01
service_description SMS Send Check - IDC生产环境报警手机短信发送检测
check_command check_icinga_sms
max_check_attempts 1
check_interval 1440
notification_interval 1440
notification_period 1622
}
Relations:
The text was updated successfully, but these errors were encountered: