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

XMLWordPrintable

    • Sprint 8
    • 0.5

      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)
              {
      

            Unassigned Unassigned
            chdemon Dmitriy Chir
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: