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

MySQL sql-mode Value Breaks The Graphs Configuration Page

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.5rc1, 2.1.0
    • Component/s: Frontend (F), Server (S)
    • Labels:
    • Environment:
      RHEL 6 x68_64, MySQL 5.5.27

      Description

      I couldn't create graphs for hosts when configuring them. The graphs page (/graphs.php) didn't show any graphs for hosts that have them and the button to create a new graph was disabled. In addition, the Groups and Hosts select boxes didn't have any options in them (see attached screen shot). After a little research I realized that the sql mode MYSQL40 cause the query for hosts to fail.

      In api/classes/CHostGroup.php on line 236 I changed ...

      $sqlParts['where'][] = 'NOT h.status IN ('.HOST_STATUS_PROXY_ACTIVE.','.HOST_STATUS_PROXY_PASSIVE.')';

      ... to ...

      $sqlParts['where'][] = 'h.status NOT IN ('.HOST_STATUS_PROXY_ACTIVE.','.HOST_STATUS_PROXY_PASSIVE.')';

      ... and this fixed the graphs page for me. I verified that the page works without my fix if the MySQL server is running in TRADITIONAL mode. My fix works in both modes and that's how I'm running it now.

      Thanks,
      Tony

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jwtire Jack Williams Tire
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: