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

Missing FROM-clause when querying 'userids' and 'scriptids' by action.get method

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.8
    • Fix Version/s: 2.0.10rc1, 2.1.8, 2.2.0
    • Component/s: API (A)
    • Labels:
      None
    • Environment:
      Linux, CentOS-6.4, PostgreSQL 9.1.9, Apache HTTPD-2.2.15, PHP-5.3.3

      Description

      The SQL query generated by the following API call lacks of proper FROM-clause for "omu" alias:

      — BEGIN PHP —

      $options['usrgrpids'] = 3;
      $options['scriptids'] = 19;
      API::Action()->get($options);

      — END PHP —

      — BEGIN generated SQL —

      SELECT a.actionid,
      omu.userid,
      oc.scriptid
      FROM actions a,
      opcommand oc,
      operations o
      WHERE a.actionid BETWEEN 000000000000000 AND 099999999999999
      AND omu.userid='3'
      AND a.actionid=o.actionid
      AND o.operationid=omu.operationid
      AND (oc.scriptid='19'
      AND oc.type=4)
      AND o.operationid=oc.operationid

      — END generated SQL —

        Attachments

          Activity

            People

            Assignee:
            iivs Ivo Kurzemnieks
            Reporter:
            okkuv9xh Marc
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: