Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Biscuola <git-no-reply@zabbix.com>2017-12-05 16:16:28 +0300
committerAndrea Biscuola <git-no-reply@zabbix.com>2017-12-05 16:16:28 +0300
commite57c1595125cd52d2328c245851e0cc9c0eb5d2b (patch)
tree0e8f880096cde25f27b2b86b39db68fae99671bb
parent1934bfcbc55bfa76c343b28996ebb0de5b992f49 (diff)
........S. [ZBXNEXT-4108] fixed dbupgrade breakage
Backport immediately to trunk a fix for a dbupgrade breakage in the case a db does not have events or problems.
-rw-r--r--src/libs/zbxdbupgrade/dbupgrade_3050.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/libs/zbxdbupgrade/dbupgrade_3050.c b/src/libs/zbxdbupgrade/dbupgrade_3050.c
index c76fc484233..c1e60985c63 100644
--- a/src/libs/zbxdbupgrade/dbupgrade_3050.c
+++ b/src/libs/zbxdbupgrade/dbupgrade_3050.c
@@ -139,8 +139,11 @@ static int DBpatch_3050006(void)
DBend_multiple_update(&sql, &sql_alloc, &sql_offset);
- if (ZBX_DB_OK > DBexecute("%s", sql))
- return FAIL;
+ if (16 < sql_offset) /* in ORACLE always present begin..end; */
+ {
+ if (ZBX_DB_OK > DBexecute("%s", sql))
+ return FAIL;
+ }
zbx_free(sql);
@@ -173,8 +176,11 @@ static int DBpatch_3050007(void)
DBend_multiple_update(&sql, &sql_alloc, &sql_offset);
- if (ZBX_DB_OK > DBexecute("%s", sql))
- return FAIL;
+ if (16 < sql_offset) /* in ORACLE always present begin..end; */
+ {
+ if (ZBX_DB_OK > DBexecute("%s", sql))
+ return FAIL;
+ }
zbx_free(sql);