mysql_init - Man Page

Name

mysql_init - Prepares and initializes a MYSQL structure

Synopsis

#include <mysql.h>

MYSQL *mysql_init(MYSQL *mysql);

Description

Prepares and initializes a MYSQL structure to be used with mysql_real_connect(3). If an address of a MYSQL structure was passed as parameter, the structure will be initialized, if NULL was passed, a new structure will be allocated and initialized.

Notes: * If parameter mysql is not NULL mysql_close(3) API function will not release the memory * Any subsequent calls to any function (except mysql_optionsv(3) will fail until mysql_real_connect(3) was called. * Memory allocated by mysql_init() must be freed with mysql_close(3).

Return value

The mysql_init() function returns an address of a MYSQL structure, or NULL in case of memory allcation error.

See also

Referenced By

mariadb_cancel(3), mariadb_connection(3), mariadb_get_infov(3), mysql_affected_rows(3), mysql_autocommit(3), mysql_change_user(3), mysql_close(3), mysql_commit(3), mysql_errno(3), mysql_error(3), mysql_field_count(3), mysql_get_character_set_info(3), mysql_get_host_info(3), mysql_get_proto_info(3), mysql_get_server_info(3), mysql_get_server_version(3), mysql_get_socket(3), mysql_get_ssl_cipher(3), mysql_info(3), mysql_kill(3), mysql_more_results(3), mysql_next_result(3), mysql_options(3), mysql_options4(3), mysql_optionsv(3), mysql_ping(3), mysql_query(3), mysql_read_query_result(3), mysql_real_connect(3), mysql_real_escape_string(3), mysql_real_query(3), mysql_refresh(3), mysql_reset_connection(3), mysql_rollback(3), mysql_select_db(3), mysql_send_query(3), mysql_server_init(3), mysql_session_track_get_first(3), mysql_session_track_get_next(3), mysql_set_character_set(3), mysql_set_server_option(3), mysql_shutdown(3), mysql_ssl_set(3), mysql_stat(3), mysql_stmt_init(3), mysql_store_result(3), mysql_thread_id(3), mysql_thread_init(3), mysql_use_result(3), mysql_warning_count(3).

Version 3.4 MariaDB Connector/C