Source
static sb4 db_bind_dynamic_cb(dvoid *ctxp, OCIBind *bindp, ub4 iter, ub4 index, dvoid **bufpp, ub4 *alenp, ub1 *piecep,
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
struct zbx_db_result
{
MYSQL_RES *result;
OCIStmt *stmthp; /* the statement handle for select operations */
int ncolumn;
zbx_db_row_t values;
ub4 *values_alloc;
OCILobLocator **clobs;
PGresult *pg_result;
int row_num;
int fld_num;
int cursor;
zbx_db_row_t values;
int curow;
char **data;
int nrow;
int ncolumn;
zbx_db_row_t values;
};
static int txn_level = 0; /* transaction level, nested transactions are not supported */
static int txn_error = ZBX_DB_OK; /* failed transaction */
static int txn_end_error = ZBX_DB_OK; /* transaction result */
static char *last_db_strerror = NULL; /* last database error message */
static int config_log_slow_queries;
static int db_auto_increment;
static MYSQL *conn = NULL;
static int mysql_err_cnt = 0;
static zbx_uint32_t ZBX_MYSQL_SVERSION = ZBX_DBVERSION_UNDEFINED;
static int ZBX_MARIADB_SFORK = OFF;
static int txn_begin = 0; /* transaction begin statement is executed */
typedef struct
{
OCIEnv *envhp;
OCIError *errhp;
OCISvcCtx *svchp;
OCIServer *srvhp;
OCIStmt *stmthp; /* the statement handle for execute operations */
zbx_vector_ptr_t db_results;
}
zbx_oracle_db_handle_t;