-
Problem report
-
Resolution: Fixed
-
Critical
-
3.2.5
-
linux x86_64
-
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) {
- is duplicated by
-
ZBX-12395 failed to update local proxy configuration copy: database error
- Closed