Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-18177

Frontend does not detect whether double precision patch is applied

    XMLWordPrintable

Details

    • Problem report
    • Status: Confirmed
    • Major
    • Resolution: Unresolved
    • 5.0.2
    • None
    • Frontend (F)
    • None

    Description

      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 |
      +-------------------+
      

      Attachments

        Activity

          People

            zabbix.dev Zabbix Development Team
            stephankn Stephan Knauss
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated: