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

PosgreSQL queries fail due to usage of reserved word 'NEW' in queries

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • 1.4.2
    • Server (S)
    • None
    • postgreSQL 8.2.4 on x86_64

      The zabbix server sometimes dies with these messages:

      Query::select new.itemid from items new, items dest where dest.itemid=10420 and new.key_=dest.key_ and new.hostid=10020
      Query failed:PGRES_FATAL_ERROR:FEHLER: NEW in einer Anfrage verwendet, die nicht Teil einer Regel ist
      (in english: NEW used in a query that is not part of a rule)

      Obviously the query uses new as aliasname, which causes a conflict with the predefined NEW variable.

      In the source, I find this problem in two files:
      frontends/php/include/graphs.inc.php on line 209
      src/libs/zbxdbhigh/host.c on line 973

      I replaced the token 'new' by 'neww' in these two queries, then my problem disappeared.

            alexei Alexei Vladishev
            milprog Marcel Gsteiger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: