diff options
Diffstat (limited to 'src/libs/zbxdbhigh/db.c')
-rw-r--r-- | src/libs/zbxdbhigh/db.c | 120 |
1 files changed, 0 insertions, 120 deletions
diff --git a/src/libs/zbxdbhigh/db.c b/src/libs/zbxdbhigh/db.c index a0246dd1623..b49c5a57d9f 100644 --- a/src/libs/zbxdbhigh/db.c +++ b/src/libs/zbxdbhigh/db.c @@ -157,8 +157,6 @@ void zbx_db_validate_config(void) /****************************************************************************** * * - * Function: DBinit_autoincrement_options * - * * * Purpose: specify the autoincrement options when connecting to the database * * * ******************************************************************************/ @@ -169,8 +167,6 @@ void DBinit_autoincrement_options(void) /****************************************************************************** * * - * Function: DBconnect * - * * * Purpose: connect to the database * * * * Parameters: flag - ZBX_DB_CONNECT_ONCE (try once and return the result), * @@ -218,8 +214,6 @@ int DBconnect(int flag) /****************************************************************************** * * - * Function: DBinit * - * * * Author: Alexander Vladishev * * * ******************************************************************************/ @@ -235,8 +229,6 @@ void DBdeinit(void) /****************************************************************************** * * - * Function: DBtxn_operation * - * * * Purpose: helper function to loop transaction operation while DB is down * * * * Author: Eugene Grigorjev, Vladimir Levijev * @@ -264,8 +256,6 @@ static void DBtxn_operation(int (*txn_operation)(void)) /****************************************************************************** * * - * Function: DBbegin * - * * * Purpose: start a transaction * * * * Author: Eugene Grigorjev, Vladimir Levijev * @@ -280,8 +270,6 @@ void DBbegin(void) /****************************************************************************** * * - * Function: DBcommit * - * * * Purpose: commit a transaction * * * * Author: Eugene Grigorjev, Vladimir Levijev * @@ -302,8 +290,6 @@ int DBcommit(void) /****************************************************************************** * * - * Function: DBrollback * - * * * Purpose: rollback a transaction * * * * Author: Eugene Grigorjev, Vladimir Levijev * @@ -324,8 +310,6 @@ void DBrollback(void) /****************************************************************************** * * - * Function: DBend * - * * * Purpose: commit or rollback a transaction depending on a parameter value * * * * Comments: do nothing if DB does not support transactions * @@ -344,8 +328,6 @@ int DBend(int ret) #ifdef HAVE_ORACLE /****************************************************************************** * * - * Function: DBstatement_prepare * - * * * Purpose: prepares a SQL statement for execution * * * * Comments: retry until DB is up * @@ -374,8 +356,6 @@ void DBstatement_prepare(const char *sql) /****************************************************************************** * * - * Function: __zbx_DBexecute * - * * * Purpose: execute a non-select statement * * * * Comments: retry until DB is up * @@ -410,8 +390,6 @@ int DBexecute(const char *fmt, ...) /****************************************************************************** * * - * Function: __zbx_DBexecute_once * - * * * Purpose: execute a non-select statement * * * * Comments: don't retry if DB is down * @@ -433,8 +411,6 @@ int DBexecute_once(const char *fmt, ...) /****************************************************************************** * * - * Function: DBis_null * - * * * Purpose: check if numeric field value is null * * * * Parameters: field - [IN] field value to be checked * @@ -459,8 +435,6 @@ DB_ROW DBfetch(DB_RESULT result) /****************************************************************************** * * - * Function: DBselect_once * - * * * Purpose: execute a select statement * * * ******************************************************************************/ @@ -480,8 +454,6 @@ DB_RESULT DBselect_once(const char *fmt, ...) /****************************************************************************** * * - * Function: DBselect * - * * * Purpose: execute a select statement * * * * Comments: retry until DB is up * @@ -516,8 +488,6 @@ DB_RESULT DBselect(const char *fmt, ...) /****************************************************************************** * * - * Function: DBselectN * - * * * Purpose: execute a select statement and get the first N entries * * * * Comments: retry until DB is up * @@ -632,8 +602,6 @@ static size_t get_string_field_size(unsigned char type) /****************************************************************************** * * - * Function: DBdyn_escape_string_len * - * * ******************************************************************************/ char *DBdyn_escape_string_len(const char *src, size_t length) { @@ -642,8 +610,6 @@ char *DBdyn_escape_string_len(const char *src, size_t length) /****************************************************************************** * * - * Function: DBdyn_escape_string * - * * ******************************************************************************/ char *DBdyn_escape_string(const char *src) { @@ -652,8 +618,6 @@ char *DBdyn_escape_string(const char *src) /****************************************************************************** * * - * Function: DBdyn_escape_field_len * - * * ******************************************************************************/ static char *DBdyn_escape_field_len(const ZBX_FIELD *field, const char *src, zbx_escape_sequence_t flag) { @@ -675,8 +639,6 @@ static char *DBdyn_escape_field_len(const ZBX_FIELD *field, const char *src, zbx /****************************************************************************** * * - * Function: DBdyn_escape_field * - * * ******************************************************************************/ char *DBdyn_escape_field(const char *table_name, const char *field_name, const char *src) { @@ -694,8 +656,6 @@ char *DBdyn_escape_field(const char *table_name, const char *field_name, const c /****************************************************************************** * * - * Function: DBdyn_escape_like_pattern * - * * ******************************************************************************/ char *DBdyn_escape_like_pattern(const char *src) { @@ -730,8 +690,6 @@ const ZBX_FIELD *DBget_field(const ZBX_TABLE *table, const char *fieldname) /****************************************************************************** * * - * Function: DBget_nextid * - * * * Purpose: gets a new identifier(s) for a specified table * * * * Parameters: tablename - [IN] the name of a table * @@ -865,8 +823,6 @@ zbx_uint64_t DBget_maxid_num(const char *tablename, int num) /****************************************************************************** * * - * Function: DBextract_version_info * - * * * Purpose: connects to DB and tries to detect DB version * * * ******************************************************************************/ @@ -879,8 +835,6 @@ void DBextract_version_info(struct zbx_db_version_info_t *version_info) /****************************************************************************** * * - * Function: DBflush_version_requirements * - * * * Purpose: writes a json entry in DB with the result for the front-end * * * * Parameters: version - [IN] entry of DB versions * @@ -898,8 +852,6 @@ void DBflush_version_requirements(const char *version) /****************************************************************************** * * - * Function: DBcheck_capabilities * - * * * Purpose: checks DBMS for optional features and exit if is not suitable * * * * Parameters: db_version - [IN] version of DB * @@ -976,8 +928,6 @@ out: /****************************************************************************** * * - * Function: DBadd_condition_alloc_btw * - * * * Purpose: Takes an initial part of SQL query and appends a generated * * WHERE condition. The WHERE condition is generated from the given * * list of values as a mix of <fieldname> BETWEEN <id1> AND <idN>" * @@ -1060,8 +1010,6 @@ static void DBadd_condition_alloc_btw(char **sql, size_t *sql_alloc, size_t *sql /****************************************************************************** * * - * Function: DBadd_condition_alloc * - * * * Purpose: Takes an initial part of SQL query and appends a generated * * WHERE condition. The WHERE condition is generated from the given * * list of values as a mix of <fieldname> BETWEEN <id1> AND <idN>" * @@ -1205,8 +1153,6 @@ void DBadd_condition_alloc(char **sql, size_t *sql_alloc, size_t *sql_offset, co /****************************************************************************** * * - * Function: DBadd_str_condition_alloc * - * * * Purpose: This function is similar to DBadd_condition_alloc(), except it is * * designed for generating WHERE conditions for strings. Hence, this * * function is simpler, because only IN condition is possible. * @@ -1313,8 +1259,6 @@ static char buf_string[640]; /****************************************************************************** * * - * Function: zbx_host_string * - * * * Return value: <host> or "???" if host not found * * * * Author: Alexander Vladishev * @@ -1343,8 +1287,6 @@ const char *zbx_host_string(zbx_uint64_t hostid) /****************************************************************************** * * - * Function: zbx_host_key_string * - * * * Return value: <host>:<key> or "???" if item not found * * * * Author: Alexander Vladishev * @@ -1374,8 +1316,6 @@ const char *zbx_host_key_string(zbx_uint64_t itemid) /****************************************************************************** * * - * Function: zbx_check_user_permissions * - * * * Purpose: check if user has access rights to information - full name, * * alias, Email, SMS, etc * * * @@ -1443,8 +1383,6 @@ out: /****************************************************************************** * * - * Function: zbx_user_string * - * * * Return value: "Name Surname (Alias)" or "unknown" if user not found * * * * Author: Alexander Vladishev * @@ -1469,8 +1407,6 @@ const char *zbx_user_string(zbx_uint64_t userid) /****************************************************************************** * * - * Function: DBget_user_names * - * * * Purpose: get user username, name and surname * * * * Parameters: userid - [IN] user id * @@ -1511,8 +1447,6 @@ out: /****************************************************************************** * * - * Function: DBsql_id_cmp * - * * * Purpose: construct where condition * * * * Return value: "=<id>" if id not equal zero, * @@ -1538,8 +1472,6 @@ const char *DBsql_id_cmp(zbx_uint64_t id) /****************************************************************************** * * - * Function: DBregister_host * - * * * Purpose: register unknown host and generate event * * * * Parameters: host - host name * @@ -1883,8 +1815,6 @@ void DBregister_host_clean(zbx_vector_ptr_t *autoreg_hosts) /****************************************************************************** * * - * Function: DBproxy_register_host * - * * * Purpose: register unknown host * * * * Parameters: host - host name * @@ -1917,8 +1847,6 @@ void DBproxy_register_host(const char *host, const char *ip, const char *dns, un /****************************************************************************** * * - * Function: DBexecute_overflowed_sql * - * * * Purpose: execute a set of SQL statements IF it is big enough * * * * Author: Dmitry Borovikov * @@ -1966,8 +1894,6 @@ int DBexecute_overflowed_sql(char **sql, size_t *sql_alloc, size_t *sql_offset) /****************************************************************************** * * - * Function: DBget_unique_hostname_by_sample * - * * * Purpose: construct a unique host name by the given sample * * * * Parameters: host_name_sample - a host name to start constructing from * @@ -2068,8 +1994,6 @@ clean: /****************************************************************************** * * - * Function: DBsql_id_ins * - * * * Purpose: construct insert statement * * * * Return value: "<id>" if id not equal zero, * @@ -2096,8 +2020,6 @@ const char *DBsql_id_ins(zbx_uint64_t id) /****************************************************************************** * * - * Function: DBget_inventory_field * - * * * Purpose: get corresponding host_inventory field name * * * * Parameters: inventory_link - [IN] field link 1..HOST_INVENTORY_FIELD_COUNT * @@ -2351,8 +2273,6 @@ int DBpk_exists(const char *table_name) /****************************************************************************** * * - * Function: DBselect_uint64 * - * * * Parameters: sql - [IN] sql statement * * ids - [OUT] sorted list of selected uint64 values * * * @@ -2681,8 +2601,6 @@ out: #ifdef HAVE_ORACLE /****************************************************************************** * * - * Function: zbx_db_format_values * - * * * Purpose: format bulk operation (insert, update) value list * * * * Parameters: fields - [IN] the field list * @@ -2740,8 +2658,6 @@ static char *zbx_db_format_values(ZBX_FIELD **fields, const zbx_db_value_t *valu /****************************************************************************** * * - * Function: zbx_db_insert_clean * - * * * Purpose: releases resources allocated by bulk insert operations * * * * Parameters: self - [IN] the bulk insert data * @@ -2780,8 +2696,6 @@ void zbx_db_insert_clean(zbx_db_insert_t *self) /****************************************************************************** * * - * Function: zbx_db_insert_prepare_dyn * - * * * Purpose: prepare for database bulk insert operation * * * * Parameters: self - [IN] the bulk insert data * @@ -2826,8 +2740,6 @@ void zbx_db_insert_prepare_dyn(zbx_db_insert_t *self, const ZBX_TABLE *table, co /****************************************************************************** * * - * Function: zbx_db_insert_prepare * - * * * Purpose: prepare for database bulk insert operation * * * * Parameters: self - [IN] the bulk insert data * @@ -2879,8 +2791,6 @@ void zbx_db_insert_prepare(zbx_db_insert_t *self, const char *table, ...) /****************************************************************************** * * - * Function: zbx_db_insert_add_values_dyn * - * * * Purpose: adds row values for database bulk insert operation * * * * Parameters: self - [IN] the bulk insert data * @@ -2933,8 +2843,6 @@ void zbx_db_insert_add_values_dyn(zbx_db_insert_t *self, const zbx_db_value_t ** /****************************************************************************** * * - * Function: zbx_db_insert_add_values * - * * * Purpose: adds row values for database bulk insert operation * * * * Parameters: self - [IN] the bulk insert data * @@ -3001,8 +2909,6 @@ void zbx_db_insert_add_values(zbx_db_insert_t *self, ...) /****************************************************************************** * * - * Function: zbx_db_insert_execute * - * * * Purpose: executes the prepared database bulk insert operation * * * * Parameters: self - [IN] the bulk insert data * @@ -3250,8 +3156,6 @@ out: /****************************************************************************** * * - * Function: zbx_db_insert_autoincrement * - * * * Purpose: executes the prepared database bulk insert operation * * * * Parameters: self - [IN] the bulk insert data * @@ -3278,8 +3182,6 @@ void zbx_db_insert_autoincrement(zbx_db_insert_t *self, const char *field_name) /****************************************************************************** * * - * Function: zbx_db_get_database_type * - * * * Purpose: determine is it a server or a proxy database * * * * Return value: ZBX_DB_SERVER - server database * @@ -3338,8 +3240,6 @@ out: /****************************************************************************** * * - * Function: DBlock_record * - * * * Purpose: locks a record in a table by its primary key and an optional * * constraint field * * * @@ -3389,8 +3289,6 @@ int DBlock_record(const char *table, zbx_uint64_t id, const char *add_field, zbx /****************************************************************************** * * - * Function: DBlock_records * - * * * Purpose: locks a records in a table by its primary key * * * * Parameters: table - [IN] the target table * @@ -3438,8 +3336,6 @@ int DBlock_records(const char *table, const zbx_vector_uint64_t *ids) /****************************************************************************** * * - * Function: DBlock_ids * - * * * Purpose: locks a records in a table by field name * * * * Parameters: table - [IN] the target table * @@ -3487,8 +3383,6 @@ int DBlock_ids(const char *table_name, const char *field_name, zbx_vector_uint64 /****************************************************************************** * * - * Function: zbx_sql_add_interface_availability * - * * * Purpose: adds interface availability update to sql statement * * * * Parameters: ia [IN] the interface availability data * @@ -3544,8 +3438,6 @@ static int zbx_sql_add_interface_availability(const zbx_interface_availability_t /****************************************************************************** * * - * Function: zbx_db_update_interface_availabilities * - * * * Purpose: sync interface availabilities updates into database * * * * Parameters: interface_availabilities [IN] the interface availability data * @@ -3593,8 +3485,6 @@ void zbx_db_update_interface_availabilities(const zbx_vector_availability_ptr_t /****************************************************************************** * * - * Function: DBget_user_by_active_session * - * * * Purpose: validate that session is active and get associated user data * * * * Parameters: sessionid - [IN] the session id to validate * @@ -3647,8 +3537,6 @@ out: /****************************************************************************** * * - * Function: DBget_user_by_auth_token * - * * * Purpose: validate that token is not expired and is active and then get * * associated user data * * * @@ -3718,8 +3606,6 @@ void zbx_user_free(zbx_user_t *user) /****************************************************************************** * * - * Function: zbx_db_mock_field_init * - * * * Purpose: initializes mock field * * * * Parameters: field - [OUT] the field data * @@ -3750,8 +3636,6 @@ void zbx_db_mock_field_init(zbx_db_mock_field_t *field, int field_type, int fiel /****************************************************************************** * * - * Function: zbx_db_mock_field_append * - * * * Purpose: 'appends' text to the field, if successful the character/byte * * limits are updated * * * @@ -3792,8 +3676,6 @@ int zbx_db_mock_field_append(zbx_db_mock_field_t *field, const char *text) /****************************************************************************** * * - * Function: zbx_db_check_instanceid * - * * * Purpose: checks instanceid value in config table and generates new * * instance id if its empty * * * @@ -3841,8 +3723,6 @@ int zbx_db_check_instanceid(void) #if defined(HAVE_POSTGRESQL) /****************************************************************************** * * - * Function: zbx_db_get_schema_esc * - * * * Purpose: returns escaped DB schema name * * * ******************************************************************************/ |