-
Problem report
-
Resolution: Unresolved
-
Major
-
None
-
5.0.2
-
None
Steps to reproduce:
Upgrade Zabbix to 5.0 and apply double.sql patch to the database.
Result:
Frontend still displays warning
"Database history tables upgraded: No".
This can be manually fixed by adding the following line to the PHP configuration:
$DB['DOUBLE_IEEE754'] = 'true';
Expected:
While the behavior is documented in https://www.zabbix.com/documentation/current/manual/installation/upgrade_notes_500 I think this is broken, because it is error prone. Users could falsely set this while the database is still not updated.
I suggest that the frontend queries the database to detect whether the patch is really required.
Example here showing a query for Mysql. For PostgreSQL the same query should work:
Old scheme uses this (in Mysql 8.0 deprecated) type:
SELECT numeric_precision FROM information_schema.columns WHERE table_schema='zabbix' AND table_name='history' AND column_name='value'; +-------------------+ | numeric_precision | +-------------------+ | 16 | +-------------------+
in fresh installs or after the required conversion it is:
SELECT numeric_precision FROM information_schema.columns WHERE table_schema='zabbix' AND table_name='history' AND column_name='value'; +-------------------+ | NUMERIC_PRECISION | +-------------------+ | 22 | +-------------------+