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

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • 2.0.10rc1, 2.1.8, 2.2.0
    • 2.0.8
    • API (A)
    • None
    • Linux, CentOS-6.4, PostgreSQL 9.1.9, Apache HTTPD-2.2.15, PHP-5.3.3

      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 —

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

              Created:
              Updated:
              Resolved: