static void lld_item_prepare_update(const zbx_lld_item_prototype_t *item_prototype, const zbx_lld_item_full_t *item,
#include "zbx_item_constants.h"
#include "zbxexpression.h"
#include "zbxprometheus.h"
#include "audit/zbxaudit.h"
#include "audit/zbxaudit_item.h"
#include "zbxcacheconfig.h"
#include "../server_constants.h"
ZBX_PTR_VECTOR_IMPL(lld_item_full_ptr, zbx_lld_item_full_t*)
ZBX_PTR_VECTOR_IMPL(lld_item_preproc_ptr, zbx_lld_item_preproc_t*)
static zbx_lld_item_preproc_t *zbx_init_lld_item_preproc(zbx_uint64_t item_preprocid, zbx_uint64_t flags, int step,
int type, const char *params, int error_handler, const char *error_handler_params)
zbx_lld_item_preproc_t *preproc_op;
preproc_op = (zbx_lld_item_preproc_t *)zbx_malloc(NULL, sizeof(zbx_lld_item_preproc_t));
preproc_op->flags = flags;
preproc_op->item_preprocid = item_preprocid;
preproc_op->type_orig = 0;
preproc_op->params = zbx_strdup(NULL, params);
preproc_op->params_orig = NULL;
preproc_op->error_handler = error_handler;
preproc_op->error_handler_orig = ZBX_PREPROC_FAIL_DEFAULT;
preproc_op->error_handler_params = zbx_strdup(NULL, error_handler_params);
preproc_op->error_handler_params_orig = NULL;
static zbx_hash_t lld_item_index_hash_func(const void *data)
const zbx_lld_item_index_t *item_index = (const zbx_lld_item_index_t *)data;
hash = ZBX_DEFAULT_UINT64_HASH_ALGO(&item_index->parent_itemid,
sizeof(item_index->parent_itemid), ZBX_DEFAULT_HASH_SEED);
return ZBX_DEFAULT_PTR_HASH_ALGO(&item_index->lld_row, sizeof(item_index->lld_row), hash);
static int lld_item_index_compare_func(const void *d1, const void *d2)
const zbx_lld_item_index_t *i1 = (const zbx_lld_item_index_t *)d1;
const zbx_lld_item_index_t *i2 = (const zbx_lld_item_index_t *)d2;
ZBX_RETURN_IF_NOT_EQUAL(i1->parent_itemid, i2->parent_itemid);
ZBX_RETURN_IF_NOT_EQUAL(i1->lld_row, i2->lld_row);