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

Bug in patch.sql (version 1.4) - table items is not correctly upgraded/mapped

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • 1.4, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5
    • Server (S)
    • None
    • mysql Ver 14.14 Distrib 5.1.25-rc, for pc-solaris2.10 (i386) using readline 5.1

      the problem can be found in line 570 of the file zabbix-1.4.6/upgrades/dbpatches/1.4/mysql/patch.sql
      the columns are not correctly mapped between items_tmp and the subquery "select *,'','' from items". the columns of the subquery are ordered alphabetically. those are mapped in into items_tmp with the order in which those columns where specified in the "create" statement. this results in the following mapping:

      itemid \=> itemid
      type \=> type
      snmp_community \=> snmp_community
      snmp_oid \=> snmp_oid
      snmp_port \=> snmp_port
      hostid \=> hostid
      description \=> description
      key_ \=> key_
      delay \=> delay
      history \=> history
      nextcheck \=> trends
      lastvalue \=> nextcheck
      lastclock \=> lastvalue
      prevvalue \=> lastclock
      status \=> prevvalue
      value_type \=> status
      trapper_hosts \=> value_type
      units \=> trapper_hosts
      multiplier \=> units
      delta \=> multiplier
      prevorgvalue \=> delta
      trends \=> prevorgvalue
      snmpv3_securityname \=> snmpv3_securityname
      snmpv3_securitylevel \=> snmpv3_securitylevel
      snmpv3_authpassphrase \=> snmpv3_authpassphrase
      snmpv3_privpassphrase \=> snmpv3_privpassphrase
      formula \=> formula
      error \=> error
      lastlogsize \=> lastlogsize
      logtimefmt \=> logtimefmt
      templateid \=> templateid
      valuemapid \=> valuemapid
      _ \=> delay_flex
      _ \=> params

      e.g. the trends column will contain the values of the nextcheck column after the upgrade.

            Unassigned Unassigned
            tdomhan Tobias Domhan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: