Ad Widget

Collapse

Running double.sql script does nothing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Robvil
    Junior Member
    • Sep 2017
    • 12

    #1

    Running double.sql script does nothing

    Hi,

    I have upgraded from 4.2 til 5.0.2. I stopped zabbix-server and ran the provided double.sql script for MySQL.


    The result:
    mysql> source /home/appliance/double.sql
    Query OK, 0 rows affected (0.00 sec)
    Records: 0 Duplicates: 0 Warnings: 0

    Query OK, 0 rows affected (0.00 sec)
    Records: 0 Duplicates: 0 Warnings: 0

    And of cause webinterface still show "Database history tables upgraded" as no.

    Any idea why?

    Regards
    Robert
  • Robvil
    Junior Member
    • Sep 2017
    • 12

    #2

    ALTER TABLE trends
    MODIFY value_min DOUBLE PRECISION DEFAULT '0.0000' NOT NULL,
    MODIFY value_avg DOUBLE PRECISION DEFAULT '0.0000' NOT NULL,
    MODIFY value_max DOUBLE PRECISION DEFAULT '0.0000' NOT NULL;
    ALTER TABLE history MODIFY value DOUBLE PRECISION DEFAULT '0.0000' NOT NULL;


    mysql> describe trends;
    +-----------+---------------------+------+-----+---------+-------+
    | Field | Type | Null | Key | Default | Extra |
    +-----------+---------------------+------+-----+---------+-------+
    | itemid | bigint(20) unsigned | NO | PRI | NULL | |
    | clock | int(11) | NO | PRI | 0 | |
    | num | int(11) | NO | | 0 | |
    | value_min | double | NO | | 0 | |
    | value_avg | double | NO | | 0 | |
    | value_max | double | NO | | 0 | |
    +-----------+---------------------+------+-----+---------+-------+
    6 rows in set (0.00 sec)


    mysql> describe history;
    +--------+---------------------+------+-----+---------+-------+
    | Field | Type | Null | Key | Default | Extra |
    +--------+---------------------+------+-----+---------+-------+
    | itemid | bigint(20) unsigned | NO | MUL | NULL | |
    | clock | int(11) | NO | | 0 | |
    | value | double | NO | | 0 | |
    | ns | int(11) | NO | | 0 | |
    +--------+---------------------+------+-----+---------+-------+
    4 rows in set (0.00 sec)

    Comment

    • Robvil
      Junior Member
      • Sep 2017
      • 12

      #3
      okay forget it. My falt. I just had to add $DB['DOUBLE_IEEE754'] in zabbix php configuration file after running the script.

      Comment

      Working...