[ZBX-4259] potential mysql upgrade patch issue with collations Created: 2011 Oct 20 Updated: 2017 May 30 Resolved: 2012 Aug 27 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Installation (I) |
Affects Version/s: | 1.9.6 (beta) |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | richlv | Assignee: | Unassigned |
Resolution: | Won't fix | Votes: | 0 |
Labels: | mysql, upgrade | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
mysql 5.1.46 |
Issue Links: |
|
Description |
just documenting here for now. upgrading db might error out like this : ERROR 1267 (HY000) at line 779: Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=' that happens even if global, connection and database collations are set to 'general' one - somehow, somewhere 'unicode' still appears. a similar case was reported as http://bugs.mysql.com/bug.php?id=24690 - but that seemed to cover exactly the opposite... so far the only solution i've found is to modify collation for the database (which might not be always possible/desirable) : |
Comments |
Comment by Siert Z. [ 2012 Feb 28 ] |
I am having the same issue when upgrading from 1.8.9 to 1.9.9. The solution found does not work in my situation. 5482:20120228:113543.823 [Z3005] query failed: [1267] Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=' [select distinct h.hostid,h.proxy_hostid from hosts h,interface i,dservices ds where h.hostid=i.hostid and i.ip=ds.ip and ds.dhostid=277 and h.hostid between 0 and 99999999999999 order by h.hostid] If you need any information, don't hestitate to request... |
Comment by Siert Z. [ 2012 Feb 28 ] |
Correcting the query executed by the Zabbix server from: mysql> select distinct h.hostid,h.proxy_hostid from hosts h,interface i,dservices ds where h.hostid=i.hostid and i.ip=ds.ip and ds.dhostid=390 and h.hostid between 0 and 99999999999999 order by h.hostid; To: mysql> select distinct h.hostid,h.proxy_hostid from hosts h,interface i,dservices ds where h.hostid="i.hostid" and i.ip="ds.ip" and ds.dhostid="390" and h.hostid between 0 and 99999999999999 order by h.hostid; Returns nothing, but seem to work. Perhaps this needs changing somewhere in de code? |
Comment by Siert Z. [ 2012 Feb 28 ] |
This also happens in 'Administration/Discovery' (discovery.php) Error in query [SELECT DISTINCT h.hostid,h.name,h.status,ds.dserviceid FROM hosts h,dservices ds,interface i WHERE 1=0 AND ds.ip=i.ip AND h.hostid=i.hostid AND h.hostid BETWEEN 000000000000000 AND 099999999999999 AND h.status IN (0,1) ORDER BY h.status] [Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='] |
Comment by Siert Z. [ 2012 Feb 28 ] |
If the character set and collation's are all the same the issue is fixed. This is not caused by the upgrade SQL scripts, but caused by configuration differences in old and new setups. I think this call can be closed. |
Comment by richlv [ 2012 Feb 29 ] |
the last issue you listed is coming from the frontend, so that's indeed a different thing. the original problem with the patch seems to remain |
Comment by richlv [ 2012 Aug 27 ] |
this didn't affect too many users, so closing it |