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:
authorAlex Kalimulin <aleksandrs.kalimulins@zabbix.com>2019-02-08 10:33:31 +0300
committerAlex Kalimulin <aleksandrs.kalimulins@zabbix.com>2019-02-08 10:33:31 +0300
commit3258d907600e3bedd90f33934bee3bb837e23a90 (patch)
tree95b45764a843febeee7c2611ab4c9a0c25198ed1 /include/zbxdb.h
parent7faf3dc2f34d41eeb3a10c8362a462e599d17dbc (diff)
.......PS. [ZBXNEXT-4941] changed overflow statements to execute one by one for Oracle for better performance
Diffstat (limited to 'include/zbxdb.h')
-rw-r--r--include/zbxdb.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/zbxdb.h b/include/zbxdb.h
index 41b92714c87..5dcffa32d04 100644
--- a/include/zbxdb.h
+++ b/include/zbxdb.h
@@ -29,6 +29,19 @@
#define ZBX_DB_WAIT_DOWN 10
#define ZBX_MAX_SQL_SIZE 262144 /* 256KB */
+#ifndef ZBX_MAX_OVERFLOW_SQL_SIZE
+# ifdef HAVE_ORACLE
+ /* Do not use "overflowing" (multi-statement) queries for Oracle. */
+ /* Zabbix benefits from cursor_sharing=force Oracle parameter */
+ /* which doesn't apply to PL/SQL blocks. */
+# define ZBX_MAX_OVERFLOW_SQL_SIZE 0
+# else
+# define ZBX_MAX_OVERFLOW_SQL_SIZE ZBX_MAX_SQL_SIZE
+# endif
+#elif 0 != ZBX_MAX_OVERFLOW_SQL_SIZE && \
+ (1024 > ZBX_MAX_OVERFLOW_SQL_SIZE || ZBX_MAX_OVERFLOW_SQL_SIZE > ZBX_MAX_SQL_SIZE)
+#error ZBX_MAX_OVERFLOW_SQL_SIZE is out of range
+#endif
typedef char **DB_ROW;
typedef struct zbx_db_result *DB_RESULT;