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

Use of 'count(value)' on 'NCLOB' column

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.4
    • Fix Version/s: 1.8.6
    • Component/s: Server (S)
    • Labels:
      None
    • Environment:
      Server: ZABBIX 1.8.4 (Oracle Call Interface)
      Server Database: Oracle RDBMS 11.2.0.1
      OS: CentOS release 5.5

      Description

      Hi,

      there is a bug in a SQL query:

      1. sed -n 380,385p zabbix-1.8.4/src/libs/zbxserver/evalfunc.c
        offset = zbx_snprintf(sql, sizeof(sql),
        "select count(value)"
        " from %s"
        " where itemid=" ZBX_FS_UI64,
        get_table_by_value_type(item->value_type),
        item->itemid);

      Select queries with 'count(value)' won't work when column 'value' is of any kind of 'LOB' datatypes:

      select count(value) from history_text where itemid=26212 and clock<=1301417122 and clock>1301417122
      ORA-00932: inconsistent datatypes: expected - got NCLOB

      Changing the query to 'count' would work but may result in a different result set. Adding a condition for LOB columns could be a solution.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              okkuv9xh Marc
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: