Source
/*
** Zabbix
** Copyright (C) 2001-2023 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** 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 General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
/*
* 2.2 development database patches
*/
static int DBmodify_proxy_table_id_field(const char *table_name)
{
const zbx_db_field_t field = {"id", NULL, NULL, NULL, 0, ZBX_TYPE_ID, ZBX_NOTNULL, 0};
return DBmodify_field_type(table_name, &field, NULL);
ZBX_UNUSED(table_name);
return SUCCEED;
}
/*********************************************************************************
* *
* Purpose: parse database monitor item params string "user=<user> password= *
* <password> DSN=<dsn> sql=<sql>" into parameter values. *
* *
* Parameters: params - [IN] the params string *
* dsn - [OUT] the ODBC DSN output buffer *
* user - [OUT] the user name output buffer *
* password - [OUT] the password output buffer *
* sql - [OUT] the sql query output buffer *
* *
* Comments: This function allocated memory to store parsed parameters, which *
* must be freed later by the caller. *
* Failed (or absent) parameters will contain empty string "". *
* *
*********************************************************************************/
static void parse_db_monitor_item_params(const char *params, char **dsn, char **user, char **password, char **sql)