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

SQL error occurs when trying to filter items by host group.

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6
    • Component/s: Frontend (F)
    • Labels:
      None

      Description

      In "Configuration"=> "Item" screan, when filter "from Host group like" is enabled, SQL error occurs.
      Alias "hg" for table "hosts_groups" is defined two times.

      • mysql_query() [<a href='http://www.mysql.com/doc'>http://www.mysql.com/doc</a>]: Not unique table/alias: 'hg'[C:\inet\www\zabbix16\frontends\php\include\db.inc.php:383]
      • Error in query [SELECT DISTINCT th.host as template_host,th.hostid as template_hostid, h.host, h.hostid, hg.groupid, i.* FROM hosts h,hosts_groups hg,groups g,items i LEFT JOIN items ti ON i.templateid=ti.itemid LEFT JOIN hosts th ON ti.hostid=th.hostid LEFT JOIN hosts_groups hg ON hg.hostid=th.hostid WHERE i.hostid=h.hostid AND (h.hostid IN (0,10070,10017)) AND h.hostid=10017 AND i.status <> 1 AND i.hostid=hg.hostid AND g.groupid=hg.groupid AND g.name like '%ZABBIX Servers%' ORDER BY i.description ASC,i.itemid] [Not unique table/alias: 'hg']
      • mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource[C:\inet\www\zabbix16\frontends\php\include\db.inc.php:519]

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vedmak Alexey Fukalov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: