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

Error in query generated extra . after c_ports in popup.php

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.9.8 (beta)
    • Fix Version/s: None
    • Component/s: Frontend (F)

      Description

      localhost/zabbix/popup.php?writeonly=1&dstfrm=action.edit&dstfld1=new_condition_value&dstfld2=dcheck&srctbl=dchecks&srcfld1=dcheckid&srcfld2=name
      Response
      Error in query [SELECT DISTINCT r.name,c.dcheckid,c.type,c.key_,c.ports. FROM drules r,dchecks c WHERE r.druleid=c.druleid AND r.druleid BETWEEN 000000000000000 AND 099999999999999] [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM drules r,dchecks c WHERE r.druleid=c.druleid AND r.druleid BETWEEN 00000000' at line 1]
      mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource [include/db.inc.php:572]
      mysql_free_result(): supplied argument is not a valid MySQL result resource [include/db.inc.php:573]

      When running this query it does indeed fail
      SELECT DISTINCT r.name,c.dcheckid,c.type,c.key_,c.ports. FROM drules r,dchecks c WHERE r.druleid=c.druleid AND r.druleid BETWEEN 000000000000000 AND 099999999999999
      However
      mysql> SELECT DISTINCT r.name,c.dcheckid,c.type,c.key_,c.ports FROM drules r,dchecks c WHERE r.druleid=c.druleid AND r.druleid BETWEEN 000000000000000 AND 099999999999999;
      Works fine.
      NOTE the . removed after the c_ports.
      I am unable to add new conditions as discoverychecks.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            brandonnolte Brandon Nolte
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: