int zbx_db_prepare_multiple_query(const char *query, const char *field_name, zbx_vector_uint64_t *ids, char **sql,
#include "zbx_host_constants.h"
# include "zbx_dbversion_constants.h"
#define ZBX_DB_WAIT_DOWN 10
#define ZBX_MAX_SQL_SIZE 262144
#ifndef ZBX_MAX_OVERFLOW_SQL_SIZE
# define ZBX_MAX_OVERFLOW_SQL_SIZE 0
# define ZBX_MAX_OVERFLOW_SQL_SIZE ZBX_MAX_SQL_SIZE
#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
# if 0 == ZBX_MAX_OVERFLOW_SQL_SIZE
# define ZBX_SQL_EXEC_FROM ZBX_CONST_STRLEN(ZBX_PLSQL_BEGIN)
# define ZBX_SQL_EXEC_FROM 0
# define ZBX_SQL_EXEC_FROM 0
#ifdef HAVE_MULTIROW_INSERT
# define ZBX_ROW_DL ";\n"
ZBX_PTR_VECTOR_IMPL(db_event, zbx_db_event *)
ZBX_PTR_VECTOR_IMPL(events_ptr, zbx_event_t *)
ZBX_PTR_VECTOR_IMPL(escalation_new_ptr, zbx_escalation_new_t *)
ZBX_PTR_VECTOR_IMPL(item_diff_ptr, zbx_item_diff_t *)
ZBX_PTR_VECTOR_IMPL(trigger_diff_ptr, zbx_trigger_diff_t *)
ZBX_PTR_VECTOR_IMPL(db_field_ptr, zbx_db_field_t *)
ZBX_PTR_VECTOR_IMPL(db_value_ptr, zbx_db_value_t *)
void zbx_item_diff_free(zbx_item_diff_t *item_diff)
int zbx_item_diff_compare_func(const void *d1, const void *d2)
const zbx_item_diff_t *id_1 = *(const zbx_item_diff_t **)d1;
const zbx_item_diff_t *id_2 = *(const zbx_item_diff_t **)d2;
ZBX_RETURN_IF_NOT_EQUAL(id_1->itemid, id_2->itemid);
int zbx_trigger_diff_compare_func(const void *d1, const void *d2)
const zbx_trigger_diff_t *id_1 = *(const zbx_trigger_diff_t **)d1;
const zbx_trigger_diff_t *id_2 = *(const zbx_trigger_diff_t **)d2;
ZBX_RETURN_IF_NOT_EQUAL(id_1->triggerid, id_2->triggerid);