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

Zabbix database upgrade from 3.0.3 to 3.2.5 fails with oracle db backend in use

    Details

    • Team:
      Team C
    • Sprint:
      Sprint 8
    • Story Points:
      0.5

      Description

      Problems start from DBpatch_3010021.
      You started to use zbx_db_statement_execute() in zbx_db_insert_execute() [ src/libs/zbxdbhigh/db.c at line 2315 ]
      which actually returns number of affected rows. Later in code you check it against status codes: ret = (ZBX_DB_OK == rc ? SUCCEED : FAIL); [line 2335]
      So possibly zbx_db_statement_execute should return code:

      diff -u -r -N  zabbix-3.2.5/src/libs/zbxdb/db.c zabbix-3.2.5-mod/src/libs/zbxdb/db.c 
      --- zabbix-3.2.5/src/libs/zbxdb/db.c    2017-04-20 22:10:25.000000000 +1000
      +++ zabbix-3.2.5-mod/src/libs/zbxdb/db.c        2017-05-04 16:08:48.305256812 +1000
      @@ -1196,7 +1196,8 @@
              if (OCI_SUCCESS != (err = zbx_oracle_statement_execute(iters, &nrows)))
                      ret = OCI_handle_sql_error(ERR_Z3007, err, NULL);
              else
      -               ret = (int)nrows;
      +//             ret = (int)nrows;
      +               ret = err;
       
              if (ZBX_DB_FAIL == ret && 0 < txn_level)
              {
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                chdemon Dmitriy Chir
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: