[ZBX-15541] Question marks in Dashboard after upgrade to 4.0 Created: 2019 Jan 29  Updated: 2024 Apr 10  Resolved: 2019 May 27

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 4.0.3
Fix Version/s: 4.4 (plan)

Type: Documentation task Priority: Critical
Reporter: Daniel Egorov Assignee: Vladislavs Sokurenko
Resolution: Fixed Votes: 0
Labels: dashboard, frontend
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Rhel 7.3, MySQL DB, Zabbix-server 4.0.3


Attachments: PNG File screenshot.png     PNG File screenshot2.png    
Team: Team A
Team: Team A
Sprint: Sprint 48, Jan 2019, Sprint 49 (Feb 2019), Sprint 50 (Mar 2019), Sprint 51 (Apr 2019), Sprint 52 (May 2019)
Story Points: 1

 Description   

Steps to reproduce:

  1. No changes in configuration were made, only server upgrade
  2. Opening Dashboard shows question marks instead of description of trigger
  3. Trigger description in Configuration os tamplate looks fine, only Dashboard is problem

Result:
See screenshot attached

Expected:
Normal text instead of "?????????"



 Comments   
Comment by Daniel Egorov [ 2019 Jan 29 ]

Tried to use such a walkaround:

[client]
character-set-server = utf8
skip-character-set-client-handshake
collation-server = utf8_bin
character_set_connection = utf8
character_set_result = utf8
character_set_client = utf8

 

No effect at all

Comment by Vladislavs Sokurenko [ 2019 Jan 30 ]

Could you please show output of show create table triggers; ?

Comment by Daniel Egorov [ 2019 Jan 30 ]

MariaDB [zabbix]> show create table triggers;

+----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| triggers | CREATE TABLE `triggers` (
 `triggerid` bigint(20) unsigned NOT NULL,
 `expression` varchar(2048) COLLATE utf8mb4_bin NOT NULL DEFAULT '',
 `description` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
 `url` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
 `status` int(11) NOT NULL DEFAULT '0',
 `value` int(11) NOT NULL DEFAULT '0',
 `priority` int(11) NOT NULL DEFAULT '0',
 `lastchange` int(11) NOT NULL DEFAULT '0',
 `comments` text COLLATE utf8_bin NOT NULL,
 `error` varchar(2048) COLLATE utf8_bin NOT NULL DEFAULT '',
 `templateid` bigint(20) unsigned DEFAULT NULL,
 `type` int(11) NOT NULL DEFAULT '0',
 `state` int(11) NOT NULL DEFAULT '0',
 `flags` int(11) NOT NULL DEFAULT '0',
 `recovery_mode` int(11) NOT NULL DEFAULT '0',
 `recovery_expression` varchar(2048) COLLATE utf8_bin NOT NULL DEFAULT '',
 `correlation_mode` int(11) NOT NULL DEFAULT '0',
 `correlation_tag` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
 `manual_close` int(11) NOT NULL DEFAULT '0',
 PRIMARY KEY (`triggerid`),
 KEY `triggers_1` (`status`),
 KEY `triggers_3` (`templateid`),
 KEY `triggers_2` (`value`,`lastchange`),
 CONSTRAINT `c_triggers_1` FOREIGN KEY (`templateid`) REFERENCES `triggers` (`triggerid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin |
+----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.02 sec)
Comment by Andrejs Sitals (Inactive) [ 2019 Jan 30 ]

Could you please show output of "show create table problems;" too?

What version of Zabbix did you use before the upgrade?

Comment by Daniel Egorov [ 2019 Jan 30 ]

Threre is no table named "problems", it's "problem".

 

Here is the output:

problem CREATE TABLE `problem` (
`eventid` bigint(20) unsigned NOT NULL,
`source` int(11) NOT NULL DEFAULT '0',
`object` int(11) NOT NULL DEFAULT '0',
`objectid` bigint(20) unsigned NOT NULL DEFAULT '0',
`clock` int(11) NOT NULL DEFAULT '0',
`ns` int(11) NOT NULL DEFAULT '0',
`r_eventid` bigint(20) unsigned DEFAULT NULL,
`r_clock` int(11) NOT NULL DEFAULT '0',
`r_ns` int(11) NOT NULL DEFAULT '0',
`correlationid` bigint(20) unsigned DEFAULT NULL,
`userid` bigint(20) unsigned DEFAULT NULL,
`name` varchar(2048) NOT NULL DEFAULT '',
`acknowledged` int(11) NOT NULL DEFAULT '0',
`severity` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`eventid`),
KEY `problem_1` (`source`,`object`,`objectid`),
KEY `problem_2` (`r_clock`),
KEY `problem_3` (`r_eventid`),
CONSTRAINT `c_problem_1` FOREIGN KEY (`eventid`) REFERENCES `events` (`eventid`) ON DELETE CASCADE,
CONSTRAINT `c_problem_2` FOREIGN KEY (`r_eventid`) REFERENCES `events` (`eventid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1

 

The origin Zabbix server version is 3.2.7. The database was not imported or moved, the clone of the VM was made instead and Zabbix binaries updated through rpm -U, the DB was upgraded through the zabbix server service start.

Comment by Andrejs Sitals (Inactive) [ 2019 Jan 30 ]

Threre is no table named "problems", it's "problem".

Sorry, my bad. Table's name is indeed "problem".

It looks like there are some problems with charsets and/or collations. Your "triggers" table has utf8 charset and utf8_bin collation which is expected. Your "problem" table has latin1 charset. That's why trigger configurations are fine, but "Dashboard" and "Problems" views display "???" instead of normal text.

Can you please show output of following queries (replace <dbname> with actual name)?

show create database <dbname>;
select table_name, engine, table_collation from information_schema.tables where table_schema="<dbname>";

If you still have database from Zabbix 3.2.7, it would be good to see output of these queries for that database as well.

Comment by Daniel Egorov [ 2019 Jan 30 ]

Original database on 3.2.7 gives the following replies:

 

MariaDB [zabbix]> show create database zabbix;
------------------------------------------------------------------------------------------+

Database Create Database

------------------------------------------------------------------------------------------+

zabbix CREATE DATABASE `zabbix` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */

------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

 

MariaDB [zabbix]> select table_name, engine, table_collation from information_schema.tables where table_schema="zabbix";
---------------------------------------------------

table_name engine table_collation

---------------------------------------------------

acknowledges InnoDB utf8_bin
actions InnoDB utf8_bin
alerts InnoDB utf8_bin
application_discovery InnoDB latin1_swedish_ci
application_prototype InnoDB latin1_swedish_ci
application_template InnoDB utf8_bin
applications InnoDB utf8_bin
auditlog InnoDB utf8_bin
auditlog_details InnoDB utf8_bin
autoreg_host InnoDB utf8_bin
conditions InnoDB utf8_bin
config InnoDB utf8_bin
corr_condition InnoDB latin1_swedish_ci
corr_condition_group InnoDB latin1_swedish_ci
corr_condition_tag InnoDB latin1_swedish_ci
corr_condition_tagpair InnoDB latin1_swedish_ci
corr_condition_tagvalue InnoDB latin1_swedish_ci
corr_operation InnoDB latin1_swedish_ci
correlation InnoDB latin1_swedish_ci
dbversion InnoDB utf8_bin
dchecks InnoDB utf8_bin
dhosts InnoDB utf8_bin
drules InnoDB utf8_bin
dservices InnoDB utf8_bin
escalations InnoDB utf8_bin
event_recovery InnoDB latin1_swedish_ci
event_tag InnoDB latin1_swedish_ci
events InnoDB utf8_bin
expressions InnoDB utf8_bin
functions InnoDB utf8_bin
globalmacro InnoDB utf8_bin
globalvars InnoDB utf8_bin
graph_discovery InnoDB utf8_bin
graph_theme InnoDB latin1_swedish_ci
graphs InnoDB utf8_bin
graphs_items InnoDB utf8_bin
group_discovery InnoDB utf8_bin
group_prototype InnoDB utf8_bin
groups InnoDB utf8_bin
history InnoDB utf8_bin
history_log InnoDB utf8_bin
history_str InnoDB utf8_bin
history_text InnoDB utf8_bin
history_uint InnoDB utf8_bin
host_discovery InnoDB utf8_bin
host_inventory InnoDB utf8_bin
hostmacro InnoDB utf8_bin
hosts InnoDB utf8_bin
hosts_groups InnoDB utf8_bin
hosts_templates InnoDB utf8_bin
housekeeper InnoDB utf8_bin
httpstep InnoDB utf8_bin
httpstepitem InnoDB utf8_bin
httptest InnoDB utf8_bin
httptestitem InnoDB utf8_bin
icon_map InnoDB utf8_bin
icon_mapping InnoDB utf8_bin
ids InnoDB utf8_bin
images InnoDB utf8_bin
interface InnoDB utf8_bin
interface_discovery InnoDB utf8_bin
item_application_prototype InnoDB latin1_swedish_ci
item_condition InnoDB utf8_bin
item_discovery InnoDB utf8_bin
items InnoDB utf8_bin
items_applications InnoDB utf8_bin
maintenances InnoDB utf8_bin
maintenances_groups InnoDB utf8_bin
maintenances_hosts InnoDB utf8_bin
maintenances_windows InnoDB utf8_bin
mappings InnoDB utf8_bin
media InnoDB utf8_bin
media_type InnoDB utf8_bin
opcommand InnoDB utf8_bin
opcommand_grp InnoDB utf8_bin
opcommand_hst InnoDB utf8_bin
opconditions InnoDB utf8_bin
operations InnoDB utf8_bin
opgroup InnoDB utf8_bin
opinventory InnoDB latin1_swedish_ci
opmessage InnoDB utf8_bin
opmessage_grp InnoDB utf8_bin
opmessage_usr InnoDB utf8_bin
optemplate InnoDB utf8_bin
problem InnoDB latin1_swedish_ci
problem_tag InnoDB latin1_swedish_ci
profiles InnoDB utf8_bin
proxy_autoreg_host InnoDB utf8_bin
proxy_dhistory InnoDB utf8_bin
proxy_history InnoDB utf8_bin
regexps InnoDB utf8_bin
rights InnoDB utf8_bin
screen_user InnoDB latin1_swedish_ci
screen_usrgrp InnoDB latin1_swedish_ci
screens InnoDB utf8_bin
screens_items InnoDB utf8_bin
scripts InnoDB utf8_bin
service_alarms InnoDB utf8_bin
service_alert MyISAM utf8_bin
service_icon MyISAM utf8_bin
service_showtree MyISAM utf8_bin
service_threshold MyISAM utf8_bin
service_weight MyISAM utf8_bin
services InnoDB utf8_bin
services_links InnoDB utf8_bin
services_times InnoDB utf8_bin
sessions InnoDB utf8_bin
slides InnoDB utf8_bin
slideshow_user InnoDB latin1_swedish_ci
slideshow_usrgrp InnoDB latin1_swedish_ci
slideshows InnoDB utf8_bin
sysmap_element_url InnoDB utf8_bin
sysmap_url InnoDB utf8_bin
sysmap_user InnoDB latin1_swedish_ci
sysmap_usrgrp InnoDB latin1_swedish_ci
sysmaps InnoDB utf8_bin
sysmaps_elements InnoDB utf8_bin
sysmaps_link_triggers InnoDB utf8_bin
sysmaps_links InnoDB utf8_bin
task InnoDB latin1_swedish_ci
task_close_problem InnoDB latin1_swedish_ci
timeperiods InnoDB utf8_bin
trends InnoDB utf8_bin
trends_uint InnoDB utf8_bin
trigger_depends InnoDB utf8_bin
trigger_discovery InnoDB utf8_bin
trigger_tag InnoDB latin1_swedish_ci
triggers InnoDB utf8_bin
users InnoDB utf8_bin
users_groups InnoDB utf8_bin
usrgrp InnoDB utf8_bin
valuemaps InnoDB utf8_bin
zbxe_preferences MyISAM utf8_bin
zbxe_translation MyISAM utf8_bin

---------------------------------------------------
134 rows in set (0.00 sec)

Comment by Daniel Egorov [ 2019 Jan 30 ]

The DB under version 4.0 gives the following:

 

MariaDB [zabbix]> show create database zabbix;
------------------------------------------------------------------------------------------+

Database Create Database

------------------------------------------------------------------------------------------+

zabbix CREATE DATABASE `zabbix` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */

------------------------------------------------------------------------------------------+

 

MariaDB [zabbix]> select table_name, engine, table_collation from information_schema.tables where table_schema="zabbix";
---------------------------------------------------

table_name engine table_collation

---------------------------------------------------

acknowledges InnoDB utf8_bin
actions InnoDB utf8_bin
alerts InnoDB utf8_bin
application_discovery InnoDB latin1_swedish_ci
application_prototype InnoDB latin1_swedish_ci
application_template InnoDB utf8_bin
applications InnoDB utf8_bin
auditlog InnoDB utf8_bin
auditlog_details InnoDB utf8_bin
autoreg_host InnoDB utf8_bin
conditions InnoDB utf8_bin
config InnoDB utf8_bin
corr_condition InnoDB latin1_swedish_ci
corr_condition_group InnoDB latin1_swedish_ci
corr_condition_tag InnoDB latin1_swedish_ci
corr_condition_tagpair InnoDB latin1_swedish_ci
corr_condition_tagvalue InnoDB latin1_swedish_ci
corr_operation InnoDB latin1_swedish_ci
correlation InnoDB latin1_swedish_ci
dashboard InnoDB utf8_bin
dashboard_user InnoDB utf8_bin
dashboard_usrgrp InnoDB utf8_bin
dbversion InnoDB utf8_bin
dchecks InnoDB utf8_bin
dhosts InnoDB utf8_bin
drules InnoDB utf8_bin
dservices InnoDB utf8_bin
escalations InnoDB utf8_bin
event_recovery InnoDB latin1_swedish_ci
event_suppress InnoDB utf8_bin
event_tag InnoDB latin1_swedish_ci
events InnoDB utf8_bin
expressions InnoDB utf8_bin
functions InnoDB utf8_bin
globalmacro InnoDB utf8_bin
globalvars InnoDB utf8_bin
graph_discovery InnoDB utf8_bin
graph_theme InnoDB utf8_bin
graphs InnoDB utf8_bin
graphs_items InnoDB utf8_bin
group_discovery InnoDB utf8_bin
group_prototype InnoDB utf8_bin
history InnoDB utf8_bin
history_log InnoDB utf8_bin
history_str InnoDB utf8_bin
history_text InnoDB utf8_bin
history_uint InnoDB utf8_bin
host_discovery InnoDB utf8_bin
host_inventory InnoDB utf8_bin
hostmacro InnoDB utf8_bin
hosts InnoDB utf8_bin
hosts_groups InnoDB utf8_bin
hosts_templates InnoDB utf8_bin
housekeeper InnoDB utf8_bin
hstgrp InnoDB utf8_bin
httpstep InnoDB utf8_bin
httpstep_field InnoDB utf8_bin
httpstepitem InnoDB utf8_bin
httptest InnoDB utf8_bin
httptest_field InnoDB utf8_bin
httptestitem InnoDB utf8_bin
icon_map InnoDB utf8_bin
icon_mapping InnoDB utf8_bin
ids InnoDB utf8_bin
images InnoDB utf8_bin
interface InnoDB utf8_bin
interface_discovery InnoDB utf8_bin
item_application_prototype InnoDB latin1_swedish_ci
item_condition InnoDB utf8_bin
item_discovery InnoDB utf8_bin
item_preproc InnoDB utf8_bin
items InnoDB utf8_bin
items_applications InnoDB utf8_bin
maintenance_tag InnoDB utf8_bin
maintenances InnoDB utf8_bin
maintenances_groups InnoDB utf8_bin
maintenances_hosts InnoDB utf8_bin
maintenances_windows InnoDB utf8_bin
mappings InnoDB utf8_bin
media InnoDB utf8_bin
media_type InnoDB utf8_bin
opcommand InnoDB utf8_bin
opcommand_grp InnoDB utf8_bin
opcommand_hst InnoDB utf8_bin
opconditions InnoDB utf8_bin
operations InnoDB utf8_bin
opgroup InnoDB utf8_bin
opinventory InnoDB latin1_swedish_ci
opmessage InnoDB utf8_bin
opmessage_grp InnoDB utf8_bin
opmessage_usr InnoDB utf8_bin
optemplate InnoDB utf8_bin
problem InnoDB latin1_swedish_ci
problem_tag InnoDB latin1_swedish_ci
profiles InnoDB utf8_bin
proxy_autoreg_host InnoDB utf8_bin
proxy_dhistory InnoDB utf8_bin
proxy_history InnoDB utf8_bin
regexps InnoDB utf8_bin
rights InnoDB utf8_bin
screen_user InnoDB latin1_swedish_ci
screen_usrgrp InnoDB latin1_swedish_ci
screens InnoDB utf8_bin
screens_items InnoDB utf8_bin
scripts InnoDB utf8_bin
service_alarms InnoDB utf8_bin
service_alert MyISAM utf8_bin
service_icon MyISAM utf8_bin
service_showtree MyISAM utf8_bin
service_threshold MyISAM utf8_bin
service_weight MyISAM utf8_bin
services InnoDB utf8_bin
services_links InnoDB utf8_bin
services_times InnoDB utf8_bin
sessions InnoDB utf8_bin
slides InnoDB utf8_bin
slideshow_user InnoDB latin1_swedish_ci
slideshow_usrgrp InnoDB latin1_swedish_ci
slideshows InnoDB utf8_bin
sysmap_element_trigger InnoDB utf8_bin
sysmap_element_url InnoDB utf8_bin
sysmap_shape InnoDB utf8_bin
sysmap_url InnoDB utf8_bin
sysmap_user InnoDB latin1_swedish_ci
sysmap_usrgrp InnoDB latin1_swedish_ci
sysmaps InnoDB utf8_bin
sysmaps_elements InnoDB utf8_bin
sysmaps_link_triggers InnoDB utf8_bin
sysmaps_links InnoDB utf8_bin
tag_filter InnoDB utf8_bin
task InnoDB latin1_swedish_ci
task_acknowledge InnoDB utf8_bin
task_check_now InnoDB utf8_bin
task_close_problem InnoDB latin1_swedish_ci
task_remote_command InnoDB utf8_bin
task_remote_command_result InnoDB utf8_bin
timeperiods InnoDB utf8_bin
trends InnoDB utf8_bin
trends_uint InnoDB utf8_bin
trigger_depends InnoDB utf8_bin
trigger_discovery InnoDB utf8_bin
trigger_tag InnoDB latin1_swedish_ci
triggers InnoDB utf8_bin
users InnoDB utf8_bin
users_groups InnoDB utf8_bin
usrgrp InnoDB utf8_bin
valuemaps InnoDB utf8_bin
widget InnoDB utf8_bin
widget_field InnoDB utf8_bin
zbxe_preferences MyISAM utf8_bin
zbxe_translation MyISAM utf8_bin

---------------------------------------------------

 

Comment by Daniel Egorov [ 2019 Jan 30 ]

It seems the collation latin1_swedish_ci is the problem, but I can't say why everything works in 3.2.7, and I've got problems in 4.0.3. Probably I can try to change the collation of the "problem" table and retry with zabbix-server?

Comment by Glebs Ivanovskis [ 2019 Jan 30 ]

The likely source of non-ASCII characters are macro values. In 3.2 they are resolved in Problems "on-the-fly" by frontend, in 4.0 they are resolved by server and written into DB, new frontend just shows them as they are in DB. Fixing character set now will only affect new problems, to fix all of them you will probably need to restore the backup, fix character sets and redo the upgrade.

Or, perhaps, you can hack around by inserting ZBX_TM_TASK_UPDATE_EVENTNAMES task manually, this can save you from redoing the upgrade, but I will not guarantee that it will work.

Comment by Daniel Egorov [ 2019 Jan 30 ]

I've doublechecked my vanilla 4.0 deployment and all the tables are in utf8_bin collation. Looks like collation is the real problem.

Comment by Daniel Egorov [ 2019 Jan 30 ]

I will try to restore the DB backup from 3.2.7 server over the DB on 4.0 machine, fix the character sets and redo upgrade. An get back when finished.

Comment by Daniel Egorov [ 2019 Jan 31 ]

Thank you very much for help, I've successfully reloaded a db dump, fixed collation and charset, upgraded and now no problem with question marks!!!

Everyone - THANK YOU VERY MUCH!

I think this feature of 4.0 woth DB char set is worth mentioning in manuals for upgrade. =)

Comment by Daniel Egorov [ 2019 Jan 31 ]
  1. Fix char set and collation for tables BEFORE the upgrade
  2. Upgrade
  3. No issues
Comment by Vladislavs Sokurenko [ 2019 Jan 31 ]

(1) [D] Upgrade procedure should contain a warning about the fact that character set utf8 and utf8_bin collation is required for Zabbix server to work properly with MySQL database.

Please add a note in db_scripts:
Character set utf8 and utf8_bin collation is required for Zabbix server to work properly with MySQL database.

Also please change upgrade notes

Case-sensitive MySQL database required for proper server work.

to

Case-sensitive MySQL database required for proper server work.
Character set utf8 and utf8_bin collation is required for Zabbix server to work properly with MySQL database.

martins-v Suggested changes added to Database creation scripts for 4.2 and other supported versions. I think that should be sufficient. RESOLVED

vso CLOSED

Comment by Glebs Ivanovskis [ 2019 Jan 31 ]

There is nothing specific about upgrade. It is documented that

UTF-8 is the only encoding supported by Zabbix.

If the reported had used non-ASCII characters in trigger names outside of macro values, the question marks in problems would be noticed much earlier, while still running 3.2.

I think there is nothing to add to documentation regarding this issue. But it may be a good idea for Zabbix to check database character set (and schema in general) on startup.

Comment by Daniel Egorov [ 2019 Jan 31 ]

It's strange that 3.2 works fine with the same database with incorrect charset for several tables, though the db charset is OK. IMHO it's a good thing to notice that 4.0 has to be upgraded with the revised db.

Comment by Glebs Ivanovskis [ 2019 Jan 31 ]

You are lucky. UTF-8 is backward compatible with ASCII, therefore if you only use code points from U+0000 to U+0127 in the configuration there will be no data loss when saving UTF-8 text as any of extended ASCII character sets.

Comment by Glebs Ivanovskis [ 2019 Jan 31 ]

One more recommendation could be to use STRICT_TRANS_TABLES mode which could have prevented database corruption during upgrade (I think...). See a relevant discussion around here.

Comment by Andrejs Sitals (Inactive) [ 2019 Jan 31 ]

(..) which could have prevented database corruption during upgrade (..)

I don't see any corruption in this case. Upgrade added some new tables (all of them have utf8_bin collation), collation of "graph_theme" table changed from "latin1_swedish_ci" to "utf8_bin" for some reason, but collations of other tables were left untouched.

Or was it upgrade process that populated "problem" table with data?

It's unclear why many tables had "latin1_swedish_ci" collation before the upgrade, though.

Comment by Glebs Ivanovskis [ 2019 Jan 31 ]

I don't see any corruption in this case.

Zabbix clearly wasn't writing question marks into problem table during upgrade (see ZBXNEXT-4108 for details). It was writing UTF-8 characters. MySQL couldn't write them into latin1... tables and silently replaced with question marks. Isn't it a corruption?

Comment by Vladislavs Sokurenko [ 2019 Jan 31 ]

It was MariaDB, not MySQL. On MySQL this would fail as far as I know.

Comment by Glebs Ivanovskis [ 2019 Jan 31 ]

Depends on sql_mode I guess.

Generated at Sat Apr 20 11:03:20 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.