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

    • Incident report
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.4
    • 1.8.6
    • Server (S)
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: