Source
char *zbx_db_dyn_escape_string_basic(const char *src, size_t max_bytes, size_t max_chars, zbx_escape_sequence_t flag)
/*
** Copyright (C) 2001-2024 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;
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;