MySQL 9.0.0
Source Code Documentation
mysql.h File Reference

This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient. More...

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <sys/types.h>
#include "field_types.h"
#include "my_list.h"
#include "mysql_com.h"
#include "mysql/client_plugin.h"
#include "mysql_version.h"
#include "mysql_time.h"
#include "errmsg.h"

Go to the source code of this file.

Classes

struct  MYSQL_FIELD
 
struct  MYSQL_ROWS
 
struct  MYSQL_DATA
 
struct  st_mysql_options
 
struct  character_set
 
struct  MYSQL
 
struct  MYSQL_RES
 
struct  MYSQL_RPL
 Struct for information about a replication stream. More...
 
struct  MYSQL_BIND
 
struct  MYSQL_STMT
 

Macros

#define my_socket_defined
 
#define STDCALL
 
#define CLIENT_NET_RETRY_COUNT   1 /* Retry count */
 
#define CLIENT_NET_READ_TIMEOUT   365 * 24 * 3600 /* Timeout on read */
 
#define CLIENT_NET_WRITE_TIMEOUT   365 * 24 * 3600 /* Timeout on write */
 
#define IS_PRI_KEY(n)   ((n)&PRI_KEY_FLAG)
 
#define IS_NOT_NULL(n)   ((n)&NOT_NULL_FLAG)
 
#define IS_BLOB(n)   ((n)&BLOB_FLAG)
 
#define IS_NUM(t)
 Returns true if the value is a number which does not need quotes for the sql_lex.cc parser to parse correctly. More...
 
#define IS_LONGDATA(t)   ((t) >= MYSQL_TYPE_TINY_BLOB && (t) <= MYSQL_TYPE_STRING)
 
#define MYSQL_COUNT_ERROR   (~(uint64_t)0)
 
#define ER_WARN_DATA_TRUNCATED   WARN_DATA_TRUNCATED
 
#define MYSQL_RPL_GTID   (1 << 16)
 Flag to indicate that COM_BINLOG_DUMP_GTID should be used rather than COM_BINLOG_DUMP in the. More...
 
#define MYSQL_RPL_SKIP_HEARTBEAT   (1 << 17)
 Skip HEARBEAT events in the. More...
 
#define USE_HEARTBEAT_EVENT_V2   (1 << 1)
 Flag to indicate that the heartbeat_event being generated is using the class Heartbeat_event_v2. More...
 
#define MYSQL_RPL_SKIP_TAGGED_GTIDS   (1 << 2)
 Flag to indicate that tagged GTIDS will be skipped in COM_BINLOG_DUMP_GTIDS. More...
 
#define MYSQL_TAGGED_GTIDS_VERSION_SUPPORT   80300
 Tagged GTIDS are supported starting from below version of MySQL. More...
 
#define mysql_library_init   mysql_server_init
 
#define mysql_library_end   mysql_server_end
 
#define LOCAL_INFILE_ERROR_LEN   512
 
#define MYSQL_NO_DATA   100
 
#define MYSQL_DATA_TRUNCATED   101
 
#define mysql_reload(mysql)   mysql_refresh((mysql), REFRESH_GRANT)
 
#define HAVE_MYSQL_REAL_CONNECT
 

Typedefs

typedef uint64_t my_ulonglong
 
typedef int my_socket
 
typedef struct MYSQL_FIELD MYSQL_FIELD
 
typedef char ** MYSQL_ROW
 
typedef unsigned int MYSQL_FIELD_OFFSET
 
typedef struct MYSQL_ROWS MYSQL_ROWS
 
typedef MYSQL_ROWSMYSQL_ROW_OFFSET
 
typedef struct MYSQL_DATA MYSQL_DATA
 
typedef struct character_set MY_CHARSET_INFO
 
typedef struct MYSQL MYSQL
 
typedef struct MYSQL_RES MYSQL_RES
 
typedef struct MYSQL_RPL MYSQL_RPL
 Struct for information about a replication stream. More...
 
typedef struct MYSQL_BIND MYSQL_BIND
 
typedef struct MYSQL_STMT MYSQL_STMT
 

Enumerations

enum  mysql_option {
  MYSQL_OPT_CONNECT_TIMEOUT , MYSQL_OPT_COMPRESS , MYSQL_OPT_NAMED_PIPE , MYSQL_INIT_COMMAND ,
  MYSQL_READ_DEFAULT_FILE , MYSQL_READ_DEFAULT_GROUP , MYSQL_SET_CHARSET_DIR , MYSQL_SET_CHARSET_NAME ,
  MYSQL_OPT_LOCAL_INFILE , MYSQL_OPT_PROTOCOL , MYSQL_SHARED_MEMORY_BASE_NAME , MYSQL_OPT_READ_TIMEOUT ,
  MYSQL_OPT_WRITE_TIMEOUT , MYSQL_OPT_USE_RESULT , MYSQL_REPORT_DATA_TRUNCATION , MYSQL_OPT_RECONNECT ,
  MYSQL_PLUGIN_DIR , MYSQL_DEFAULT_AUTH , MYSQL_OPT_BIND , MYSQL_OPT_SSL_KEY ,
  MYSQL_OPT_SSL_CERT , MYSQL_OPT_SSL_CA , MYSQL_OPT_SSL_CAPATH , MYSQL_OPT_SSL_CIPHER ,
  MYSQL_OPT_SSL_CRL , MYSQL_OPT_SSL_CRLPATH , MYSQL_OPT_CONNECT_ATTR_RESET , MYSQL_OPT_CONNECT_ATTR_ADD ,
  MYSQL_OPT_CONNECT_ATTR_DELETE , MYSQL_SERVER_PUBLIC_KEY , MYSQL_ENABLE_CLEARTEXT_PLUGIN , MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS ,
  MYSQL_OPT_MAX_ALLOWED_PACKET , MYSQL_OPT_NET_BUFFER_LENGTH , MYSQL_OPT_TLS_VERSION , MYSQL_OPT_SSL_MODE ,
  MYSQL_OPT_GET_SERVER_PUBLIC_KEY , MYSQL_OPT_RETRY_COUNT , MYSQL_OPT_OPTIONAL_RESULTSET_METADATA , MYSQL_OPT_SSL_FIPS_MODE ,
  MYSQL_OPT_TLS_CIPHERSUITES , MYSQL_OPT_COMPRESSION_ALGORITHMS , MYSQL_OPT_ZSTD_COMPRESSION_LEVEL , MYSQL_OPT_LOAD_DATA_LOCAL_DIR ,
  MYSQL_OPT_USER_PASSWORD , MYSQL_OPT_SSL_SESSION_DATA , MYSQL_OPT_TLS_SNI_SERVERNAME
}
 
enum  mysql_status { MYSQL_STATUS_READY , MYSQL_STATUS_GET_RESULT , MYSQL_STATUS_USE_RESULT , MYSQL_STATUS_STATEMENT_GET_RESULT }
 
enum  mysql_protocol_type {
  MYSQL_PROTOCOL_DEFAULT , MYSQL_PROTOCOL_TCP , MYSQL_PROTOCOL_SOCKET , MYSQL_PROTOCOL_PIPE ,
  MYSQL_PROTOCOL_MEMORY
}
 
enum  mysql_ssl_mode {
  SSL_MODE_DISABLED = 1 , SSL_MODE_PREFERRED , SSL_MODE_REQUIRED , SSL_MODE_VERIFY_CA ,
  SSL_MODE_VERIFY_IDENTITY
}
 
enum  mysql_ssl_fips_mode { SSL_FIPS_MODE_OFF = 0 , SSL_FIPS_MODE_ON = 1 , SSL_FIPS_MODE_STRICT }
 
enum  enum_mysql_stmt_state { MYSQL_STMT_INIT_DONE = 1 , MYSQL_STMT_PREPARE_DONE , MYSQL_STMT_EXECUTE_DONE , MYSQL_STMT_FETCH_DONE }
 
enum  enum_stmt_attr_type { STMT_ATTR_UPDATE_MAX_LENGTH , STMT_ATTR_CURSOR_TYPE , STMT_ATTR_PREFETCH_ROWS }
 

Functions

int STDCALL mysql_server_init (int argc, char **argv, char **groups)
 
void STDCALL mysql_server_end (void)
 
bool STDCALL mysql_thread_init (void)
 
void STDCALL mysql_thread_end (void)
 
uint64_t STDCALL mysql_num_rows (MYSQL_RES *res)
 
unsigned int STDCALL mysql_num_fields (MYSQL_RES *res)
 
bool STDCALL mysql_eof (MYSQL_RES *res)
 
MYSQL_FIELD *STDCALL mysql_fetch_field_direct (MYSQL_RES *res, unsigned int fieldnr)
 
MYSQL_FIELD *STDCALL mysql_fetch_fields (MYSQL_RES *res)
 
MYSQL_ROW_OFFSET STDCALL mysql_row_tell (MYSQL_RES *res)
 
MYSQL_FIELD_OFFSET STDCALL mysql_field_tell (MYSQL_RES *res)
 
enum enum_resultset_metadata STDCALL mysql_result_metadata (MYSQL_RES *result)
 
unsigned int STDCALL mysql_field_count (MYSQL *mysql)
 
uint64_t STDCALL mysql_affected_rows (MYSQL *mysql)
 
uint64_t STDCALL mysql_insert_id (MYSQL *mysql)
 
unsigned int STDCALL mysql_errno (MYSQL *mysql)
 
const char *STDCALL mysql_error (MYSQL *mysql)
 
const char *STDCALL mysql_sqlstate (MYSQL *mysql)
 
unsigned int STDCALL mysql_warning_count (MYSQL *mysql)
 
const char *STDCALL mysql_info (MYSQL *mysql)
 
unsigned long STDCALL mysql_thread_id (MYSQL *mysql)
 
const char *STDCALL mysql_character_set_name (MYSQL *mysql)
 
int STDCALL mysql_set_character_set (MYSQL *mysql, const char *csname)
 
MYSQL *STDCALL mysql_init (MYSQL *mysql)
 
bool STDCALL mysql_ssl_set (MYSQL *mysql, const char *key, const char *cert, const char *ca, const char *capath, const char *cipher)
 
const char *STDCALL mysql_get_ssl_cipher (MYSQL *mysql)
 
bool STDCALL mysql_get_ssl_session_reused (MYSQL *mysql)
 Check if the current ssl session is reused. More...
 
void *STDCALL mysql_get_ssl_session_data (MYSQL *mysql, unsigned int n_ticket, unsigned int *out_len)
 Get the current SSL session serialization. More...
 
bool STDCALL mysql_free_ssl_session_data (MYSQL *mysql, void *data)
 Free a saved SSL session serialization. More...
 
bool STDCALL mysql_change_user (MYSQL *mysql, const char *user, const char *passwd, const char *db)
 
MYSQL *STDCALL mysql_real_connect (MYSQL *mysql, const char *host, const char *user, const char *passwd, const char *db, unsigned int port, const char *unix_socket, unsigned long clientflag)
 
int STDCALL mysql_select_db (MYSQL *mysql, const char *db)
 
int STDCALL mysql_query (MYSQL *mysql, const char *q)
 
int STDCALL mysql_send_query (MYSQL *mysql, const char *q, unsigned long length)
 
int STDCALL mysql_real_query (MYSQL *mysql, const char *q, unsigned long length)
 
MYSQL_RES *STDCALL mysql_store_result (MYSQL *mysql)
 
MYSQL_RES *STDCALL mysql_use_result (MYSQL *mysql)
 
enum net_async_status STDCALL mysql_real_connect_nonblocking (MYSQL *mysql, const char *host, const char *user, const char *passwd, const char *db, unsigned int port, const char *unix_socket, unsigned long clientflag)
 
enum net_async_status STDCALL mysql_send_query_nonblocking (MYSQL *mysql, const char *query, unsigned long length)
 
enum net_async_status STDCALL mysql_real_query_nonblocking (MYSQL *mysql, const char *query, unsigned long length)
 
enum net_async_status STDCALL mysql_store_result_nonblocking (MYSQL *mysql, MYSQL_RES **result)
 This API reads all result set sent by server in an asynchronous way. More...
 
enum net_async_status STDCALL mysql_next_result_nonblocking (MYSQL *mysql)
 
enum net_async_status STDCALL mysql_select_db_nonblocking (MYSQL *mysql, const char *db, bool *error)
 
void STDCALL mysql_get_character_set_info (MYSQL *mysql, MY_CHARSET_INFO *charset)
 
int STDCALL mysql_session_track_get_first (MYSQL *mysql, enum enum_session_state_type type, const char **data, size_t *length)
 Get the first state change information received from the server. More...
 
int STDCALL mysql_session_track_get_next (MYSQL *mysql, enum enum_session_state_type type, const char **data, size_t *length)
 Get the subsequent state change information received from the server. More...
 
void mysql_set_local_infile_handler (MYSQL *mysql, int(*local_infile_init)(void **, const char *, void *), int(*local_infile_read)(void *, char *, unsigned int), void(*local_infile_end)(void *), int(*local_infile_error)(void *, char *, unsigned int), void *)
 
void mysql_set_local_infile_default (MYSQL *mysql)
 
int STDCALL mysql_shutdown (MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level)
 
int STDCALL mysql_dump_debug_info (MYSQL *mysql)
 
int STDCALL mysql_refresh (MYSQL *mysql, unsigned int refresh_options)
 
int STDCALL mysql_kill (MYSQL *mysql, unsigned long pid)
 
int STDCALL mysql_set_server_option (MYSQL *mysql, enum enum_mysql_set_option option)
 
int STDCALL mysql_ping (MYSQL *mysql)
 
const char *STDCALL mysql_stat (MYSQL *mysql)
 
const char *STDCALL mysql_get_server_info (MYSQL *mysql)
 
const char *STDCALL mysql_get_client_info (void)
 
unsigned long STDCALL mysql_get_client_version (void)
 
const char *STDCALL mysql_get_host_info (MYSQL *mysql)
 
unsigned long STDCALL mysql_get_server_version (MYSQL *mysql)
 
unsigned int STDCALL mysql_get_proto_info (MYSQL *mysql)
 
MYSQL_RES *STDCALL mysql_list_dbs (MYSQL *mysql, const char *wild)
 
MYSQL_RES *STDCALL mysql_list_tables (MYSQL *mysql, const char *wild)
 
MYSQL_RES *STDCALL mysql_list_processes (MYSQL *mysql)
 
int STDCALL mysql_options (MYSQL *mysql, enum mysql_option option, const void *arg)
 
int STDCALL mysql_options4 (MYSQL *mysql, enum mysql_option option, const void *arg1, const void *arg2)
 
int STDCALL mysql_get_option (MYSQL *mysql, enum mysql_option option, const void *arg)
 Return the current values for the options settable through mysql_options() More...
 
void STDCALL mysql_free_result (MYSQL_RES *result)
 
enum net_async_status STDCALL mysql_free_result_nonblocking (MYSQL_RES *result)
 Frees the memory allocated for a result, set by APIs which would have returned rows. More...
 
void STDCALL mysql_data_seek (MYSQL_RES *result, uint64_t offset)
 
MYSQL_ROW_OFFSET STDCALL mysql_row_seek (MYSQL_RES *result, MYSQL_ROW_OFFSET offset)
 
MYSQL_FIELD_OFFSET STDCALL mysql_field_seek (MYSQL_RES *result, MYSQL_FIELD_OFFSET offset)
 
MYSQL_ROW STDCALL mysql_fetch_row (MYSQL_RES *result)
 
enum net_async_status STDCALL mysql_fetch_row_nonblocking (MYSQL_RES *res, MYSQL_ROW *row)
 Reads next row of a result set in an asynchronous way. More...
 
unsigned long *STDCALL mysql_fetch_lengths (MYSQL_RES *result)
 
MYSQL_FIELD *STDCALL mysql_fetch_field (MYSQL_RES *result)
 
MYSQL_RES *STDCALL mysql_list_fields (MYSQL *mysql, const char *table, const char *wild)
 
unsigned long STDCALL mysql_escape_string (char *to, const char *from, unsigned long from_length)
 
unsigned long STDCALL mysql_hex_string (char *to, const char *from, unsigned long from_length)
 
unsigned long STDCALL mysql_real_escape_string (MYSQL *mysql, char *to, const char *from, unsigned long length)
 
unsigned long STDCALL mysql_real_escape_string_quote (MYSQL *mysql, char *to, const char *from, unsigned long length, char quote)
 
void STDCALL mysql_debug (const char *debug)
 
void STDCALL myodbc_remove_escape (MYSQL *mysql, char *name)
 
unsigned int STDCALL mysql_thread_safe (void)
 
bool STDCALL mysql_read_query_result (MYSQL *mysql)
 
int STDCALL mysql_reset_connection (MYSQL *mysql)
 
enum net_async_status STDCALL mysql_reset_connection_nonblocking (MYSQL *mysql)
 
int STDCALL mysql_binlog_open (MYSQL *mysql, MYSQL_RPL *rpl)
 Open a new replication stream. More...
 
int STDCALL mysql_binlog_fetch (MYSQL *mysql, MYSQL_RPL *rpl)
 Fetch one event from the server. More...
 
void STDCALL mysql_binlog_close (MYSQL *mysql, MYSQL_RPL *rpl)
 Close replication stream. More...
 
bool STDCALL mysql_bind_param (MYSQL *mysql, unsigned n_params, MYSQL_BIND *binds, const char **names)
 
MYSQL_STMT *STDCALL mysql_stmt_init (MYSQL *mysql)
 
int STDCALL mysql_stmt_prepare (MYSQL_STMT *stmt, const char *query, unsigned long length)
 
int STDCALL mysql_stmt_execute (MYSQL_STMT *stmt)
 
int STDCALL mysql_stmt_fetch (MYSQL_STMT *stmt)
 
int STDCALL mysql_stmt_fetch_column (MYSQL_STMT *stmt, MYSQL_BIND *bind_arg, unsigned int column, unsigned long offset)
 
int STDCALL mysql_stmt_store_result (MYSQL_STMT *stmt)
 
unsigned long STDCALL mysql_stmt_param_count (MYSQL_STMT *stmt)
 
bool STDCALL mysql_stmt_attr_set (MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *attr)
 
bool STDCALL mysql_stmt_attr_get (MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *attr)
 
bool STDCALL mysql_stmt_bind_param (MYSQL_STMT *stmt, MYSQL_BIND *bnd)
 
bool STDCALL mysql_stmt_bind_named_param (MYSQL_STMT *stmt, MYSQL_BIND *binds, unsigned n_params, const char **names)
 
bool STDCALL mysql_stmt_bind_result (MYSQL_STMT *stmt, MYSQL_BIND *bnd)
 
bool STDCALL mysql_stmt_close (MYSQL_STMT *stmt)
 
bool STDCALL mysql_stmt_reset (MYSQL_STMT *stmt)
 
bool STDCALL mysql_stmt_free_result (MYSQL_STMT *stmt)
 
bool STDCALL mysql_stmt_send_long_data (MYSQL_STMT *stmt, unsigned int param_number, const char *data, unsigned long length)
 
MYSQL_RES *STDCALL mysql_stmt_result_metadata (MYSQL_STMT *stmt)
 
MYSQL_RES *STDCALL mysql_stmt_param_metadata (MYSQL_STMT *stmt)
 
unsigned int STDCALL mysql_stmt_errno (MYSQL_STMT *stmt)
 
const char *STDCALL mysql_stmt_error (MYSQL_STMT *stmt)
 
const char *STDCALL mysql_stmt_sqlstate (MYSQL_STMT *stmt)
 
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek (MYSQL_STMT *stmt, MYSQL_ROW_OFFSET offset)
 
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell (MYSQL_STMT *stmt)
 
void STDCALL mysql_stmt_data_seek (MYSQL_STMT *stmt, uint64_t offset)
 
uint64_t STDCALL mysql_stmt_num_rows (MYSQL_STMT *stmt)
 
uint64_t STDCALL mysql_stmt_affected_rows (MYSQL_STMT *stmt)
 
uint64_t STDCALL mysql_stmt_insert_id (MYSQL_STMT *stmt)
 
unsigned int STDCALL mysql_stmt_field_count (MYSQL_STMT *stmt)
 
bool STDCALL mysql_commit (MYSQL *mysql)
 
bool STDCALL mysql_rollback (MYSQL *mysql)
 
bool STDCALL mysql_autocommit (MYSQL *mysql, bool auto_mode)
 
bool STDCALL mysql_more_results (MYSQL *mysql)
 
int STDCALL mysql_next_result (MYSQL *mysql)
 
int STDCALL mysql_stmt_next_result (MYSQL_STMT *stmt)
 
void STDCALL mysql_close (MYSQL *sock)
 
void STDCALL mysql_reset_server_public_key (void)
 
MYSQL *STDCALL mysql_real_connect_dns_srv (MYSQL *mysql, const char *dns_srv_name, const char *user, const char *passwd, const char *db, unsigned long client_flag)
 Connect to a server using a DNS SRV name. More...
 
enum connect_stage STDCALL mysql_get_connect_nonblocking_stage (MYSQL *mysql)
 

Variables

unsigned int mysql_port
 
char * mysql_unix_port
 

Detailed Description

This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient.

The ABI should never be changed in a released product of MySQL, thus you need to take great care when changing the file. In case the file is changed so the ABI is broken, you must also update the SHARED_LIB_MAJOR_VERSION in cmake/mysql_version.cmake

Macro Definition Documentation

◆ CLIENT_NET_READ_TIMEOUT

#define CLIENT_NET_READ_TIMEOUT   365 * 24 * 3600 /* Timeout on read */

◆ CLIENT_NET_RETRY_COUNT

#define CLIENT_NET_RETRY_COUNT   1 /* Retry count */

◆ CLIENT_NET_WRITE_TIMEOUT

#define CLIENT_NET_WRITE_TIMEOUT   365 * 24 * 3600 /* Timeout on write */

◆ ER_WARN_DATA_TRUNCATED

#define ER_WARN_DATA_TRUNCATED   WARN_DATA_TRUNCATED

◆ HAVE_MYSQL_REAL_CONNECT

#define HAVE_MYSQL_REAL_CONNECT

◆ IS_BLOB

#define IS_BLOB (   n)    ((n)&BLOB_FLAG)

◆ IS_LONGDATA

#define IS_LONGDATA (   t)    ((t) >= MYSQL_TYPE_TINY_BLOB && (t) <= MYSQL_TYPE_STRING)

◆ IS_NOT_NULL

#define IS_NOT_NULL (   n)    ((n)&NOT_NULL_FLAG)

◆ IS_NUM

#define IS_NUM (   t)
Value:
(((t) <= MYSQL_TYPE_INT24 && (t) != MYSQL_TYPE_TIMESTAMP) || \
@ MYSQL_TYPE_NEWDECIMAL
Definition: field_types.h:81
@ MYSQL_TYPE_TIMESTAMP
Definition: field_types.h:63
@ MYSQL_TYPE_INT24
Definition: field_types.h:65
@ MYSQL_TYPE_YEAR
Definition: field_types.h:69

Returns true if the value is a number which does not need quotes for the sql_lex.cc parser to parse correctly.

◆ IS_PRI_KEY

#define IS_PRI_KEY (   n)    ((n)&PRI_KEY_FLAG)

◆ LOCAL_INFILE_ERROR_LEN

#define LOCAL_INFILE_ERROR_LEN   512

◆ my_socket_defined

#define my_socket_defined

◆ MYSQL_COUNT_ERROR

#define MYSQL_COUNT_ERROR   (~(uint64_t)0)

◆ MYSQL_DATA_TRUNCATED

#define MYSQL_DATA_TRUNCATED   101

◆ mysql_library_end

#define mysql_library_end   mysql_server_end

◆ mysql_library_init

#define mysql_library_init   mysql_server_init

◆ MYSQL_NO_DATA

#define MYSQL_NO_DATA   100

◆ mysql_reload

#define mysql_reload (   mysql)    mysql_refresh((mysql), REFRESH_GRANT)

◆ MYSQL_RPL_GTID

#define MYSQL_RPL_GTID   (1 << 16)

Flag to indicate that COM_BINLOG_DUMP_GTID should be used rather than COM_BINLOG_DUMP in the.

See also
mysql_binlog_open().

◆ MYSQL_RPL_SKIP_HEARTBEAT

#define MYSQL_RPL_SKIP_HEARTBEAT   (1 << 17)

Skip HEARBEAT events in the.

See also
mysql_binlog_fetch().

◆ MYSQL_RPL_SKIP_TAGGED_GTIDS

#define MYSQL_RPL_SKIP_TAGGED_GTIDS   (1 << 2)

Flag to indicate that tagged GTIDS will be skipped in COM_BINLOG_DUMP_GTIDS.

◆ MYSQL_TAGGED_GTIDS_VERSION_SUPPORT

#define MYSQL_TAGGED_GTIDS_VERSION_SUPPORT   80300

Tagged GTIDS are supported starting from below version of MySQL.

◆ STDCALL

#define STDCALL

◆ USE_HEARTBEAT_EVENT_V2

#define USE_HEARTBEAT_EVENT_V2   (1 << 1)

Flag to indicate that the heartbeat_event being generated is using the class Heartbeat_event_v2.

Typedef Documentation

◆ MY_CHARSET_INFO

◆ my_socket

typedef int my_socket

◆ my_ulonglong

typedef uint64_t my_ulonglong

◆ MYSQL

typedef struct MYSQL MYSQL

◆ MYSQL_BIND

typedef struct MYSQL_BIND MYSQL_BIND

◆ MYSQL_DATA

typedef struct MYSQL_DATA MYSQL_DATA

◆ MYSQL_FIELD

typedef struct MYSQL_FIELD MYSQL_FIELD

◆ MYSQL_FIELD_OFFSET

typedef unsigned int MYSQL_FIELD_OFFSET

◆ MYSQL_RES

typedef struct MYSQL_RES MYSQL_RES

◆ MYSQL_ROW

typedef char** MYSQL_ROW

◆ MYSQL_ROW_OFFSET

◆ MYSQL_ROWS

typedef struct MYSQL_ROWS MYSQL_ROWS

◆ MYSQL_RPL

typedef struct MYSQL_RPL MYSQL_RPL

Struct for information about a replication stream.

See also
mysql_binlog_open()
mysql_binlog_fetch()
mysql_binlog_close()

◆ MYSQL_STMT

typedef struct MYSQL_STMT MYSQL_STMT

Enumeration Type Documentation

◆ enum_mysql_stmt_state

Enumerator
MYSQL_STMT_INIT_DONE 
MYSQL_STMT_PREPARE_DONE 
MYSQL_STMT_EXECUTE_DONE 
MYSQL_STMT_FETCH_DONE 

◆ enum_stmt_attr_type

Enumerator
STMT_ATTR_UPDATE_MAX_LENGTH 
STMT_ATTR_CURSOR_TYPE 
STMT_ATTR_PREFETCH_ROWS 

◆ mysql_option

Enumerator
MYSQL_OPT_CONNECT_TIMEOUT 
MYSQL_OPT_COMPRESS 
MYSQL_OPT_NAMED_PIPE 
MYSQL_INIT_COMMAND 
MYSQL_READ_DEFAULT_FILE 
MYSQL_READ_DEFAULT_GROUP 
MYSQL_SET_CHARSET_DIR 
MYSQL_SET_CHARSET_NAME 
MYSQL_OPT_LOCAL_INFILE 
MYSQL_OPT_PROTOCOL 
MYSQL_SHARED_MEMORY_BASE_NAME 
MYSQL_OPT_READ_TIMEOUT 
MYSQL_OPT_WRITE_TIMEOUT 
MYSQL_OPT_USE_RESULT 
MYSQL_REPORT_DATA_TRUNCATION 
MYSQL_OPT_RECONNECT 
MYSQL_PLUGIN_DIR 
MYSQL_DEFAULT_AUTH 
MYSQL_OPT_BIND 
MYSQL_OPT_SSL_KEY 
MYSQL_OPT_SSL_CERT 
MYSQL_OPT_SSL_CA 
MYSQL_OPT_SSL_CAPATH 
MYSQL_OPT_SSL_CIPHER 
MYSQL_OPT_SSL_CRL 
MYSQL_OPT_SSL_CRLPATH 
MYSQL_OPT_CONNECT_ATTR_RESET 
MYSQL_OPT_CONNECT_ATTR_ADD 
MYSQL_OPT_CONNECT_ATTR_DELETE 
MYSQL_SERVER_PUBLIC_KEY 
MYSQL_ENABLE_CLEARTEXT_PLUGIN 
MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS 
MYSQL_OPT_MAX_ALLOWED_PACKET 
MYSQL_OPT_NET_BUFFER_LENGTH 
MYSQL_OPT_TLS_VERSION 
MYSQL_OPT_SSL_MODE 
MYSQL_OPT_GET_SERVER_PUBLIC_KEY 
MYSQL_OPT_RETRY_COUNT 
MYSQL_OPT_OPTIONAL_RESULTSET_METADATA 
MYSQL_OPT_SSL_FIPS_MODE 
MYSQL_OPT_TLS_CIPHERSUITES 
MYSQL_OPT_COMPRESSION_ALGORITHMS 
MYSQL_OPT_ZSTD_COMPRESSION_LEVEL 
MYSQL_OPT_LOAD_DATA_LOCAL_DIR 
MYSQL_OPT_USER_PASSWORD 
MYSQL_OPT_SSL_SESSION_DATA 
MYSQL_OPT_TLS_SNI_SERVERNAME 

◆ mysql_protocol_type

Enumerator
MYSQL_PROTOCOL_DEFAULT 
MYSQL_PROTOCOL_TCP 
MYSQL_PROTOCOL_SOCKET 
MYSQL_PROTOCOL_PIPE 
MYSQL_PROTOCOL_MEMORY 

◆ mysql_ssl_fips_mode

Enumerator
SSL_FIPS_MODE_OFF 
SSL_FIPS_MODE_ON 
SSL_FIPS_MODE_STRICT 

◆ mysql_ssl_mode

Enumerator
SSL_MODE_DISABLED 
SSL_MODE_PREFERRED 
SSL_MODE_REQUIRED 
SSL_MODE_VERIFY_CA 
SSL_MODE_VERIFY_IDENTITY 

◆ mysql_status

Enumerator
MYSQL_STATUS_READY 
MYSQL_STATUS_GET_RESULT 
MYSQL_STATUS_USE_RESULT 
MYSQL_STATUS_STATEMENT_GET_RESULT 

Function Documentation

◆ myodbc_remove_escape()

void STDCALL myodbc_remove_escape ( MYSQL mysql,
char *  name 
)

◆ mysql_affected_rows()

uint64_t STDCALL mysql_affected_rows ( MYSQL mysql)

◆ mysql_autocommit()

bool STDCALL mysql_autocommit ( MYSQL mysql,
bool  auto_mode 
)

◆ mysql_bind_param()

bool STDCALL mysql_bind_param ( MYSQL mysql,
unsigned  n_params,
MYSQL_BIND binds,
const char **  names 
)

◆ mysql_binlog_close()

void STDCALL mysql_binlog_close ( MYSQL mysql,
MYSQL_RPL rpl 
)

Close replication stream.

Parameters
mysqlConnection handle.
rplReplication stream information.

◆ mysql_binlog_fetch()

int STDCALL mysql_binlog_fetch ( MYSQL mysql,
MYSQL_RPL rpl 
)

Fetch one event from the server.

Read one packet and check its validity, set rpl->buffer and rpl->size accordingly.

Parameters
mysqlConnection handle.
rplReplication stream information.
Return values
-1Got error packet.
0Success.

◆ mysql_binlog_open()

int STDCALL mysql_binlog_open ( MYSQL mysql,
MYSQL_RPL rpl 
)

Open a new replication stream.

Compose and send COM_BINLOG_DUMP[_GTID] command using information in the MYSQL_RPL structure.

Caller must set the following MYSQL_RPL's slots: file_name_length, file_name, start_positions, server_id, flags and in case of MYSQL_RPL_GTID: gtid_set_size, gtid_set or fix_gtid_set/fix_gtid_set_arg which is used to compose command packet.

Note: we treat NULL rpl->file_name as an empty string. If rpl->file_name_length is 0, strlen(rpl->file_name) will be called to set it. If rpl->fix_gtid_set is not NULL it will be called to fill packet gtid set data (rpl->gtid_set is ignored).

Parameters
mysqlConnection handle.
rplReplication stream information.
Return values
-1Error.
0Success.

◆ mysql_change_user()

bool STDCALL mysql_change_user ( MYSQL mysql,
const char *  user,
const char *  passwd,
const char *  db 
)

◆ mysql_character_set_name()

const char *STDCALL mysql_character_set_name ( MYSQL mysql)

◆ mysql_close()

void STDCALL mysql_close ( MYSQL sock)

◆ mysql_commit()

bool STDCALL mysql_commit ( MYSQL mysql)

◆ mysql_data_seek()

void STDCALL mysql_data_seek ( MYSQL_RES result,
uint64_t  offset 
)

◆ mysql_debug()

void STDCALL mysql_debug ( const char *  debug)

◆ mysql_dump_debug_info()

int STDCALL mysql_dump_debug_info ( MYSQL mysql)

◆ mysql_eof()

bool STDCALL mysql_eof ( MYSQL_RES res)

◆ mysql_errno()

unsigned int STDCALL mysql_errno ( MYSQL mysql)

◆ mysql_error()

const char *STDCALL mysql_error ( MYSQL mysql)

◆ mysql_escape_string()

unsigned long STDCALL mysql_escape_string ( char *  to,
const char *  from,
unsigned long  from_length 
)

◆ mysql_fetch_field()

MYSQL_FIELD *STDCALL mysql_fetch_field ( MYSQL_RES result)

◆ mysql_fetch_field_direct()

MYSQL_FIELD *STDCALL mysql_fetch_field_direct ( MYSQL_RES res,
unsigned int  fieldnr 
)

◆ mysql_fetch_fields()

MYSQL_FIELD *STDCALL mysql_fetch_fields ( MYSQL_RES res)

◆ mysql_fetch_lengths()

unsigned long *STDCALL mysql_fetch_lengths ( MYSQL_RES result)

◆ mysql_fetch_row()

MYSQL_ROW STDCALL mysql_fetch_row ( MYSQL_RES result)

◆ mysql_fetch_row_nonblocking()

enum net_async_status STDCALL mysql_fetch_row_nonblocking ( MYSQL_RES res,
MYSQL_ROW row 
)

Reads next row of a result set in an asynchronous way.

Parameters
[in]resbuffer in which all rows are stored
[out]rowreturn pointer to one row from result set
Return values
NET_ASYNC_NOT_READYfetch operation not complete, retry again
NET_ASYNC_COMPLETEfetch operation complete

◆ mysql_field_count()

unsigned int STDCALL mysql_field_count ( MYSQL mysql)

◆ mysql_field_seek()

MYSQL_FIELD_OFFSET STDCALL mysql_field_seek ( MYSQL_RES result,
MYSQL_FIELD_OFFSET  offset 
)

◆ mysql_field_tell()

MYSQL_FIELD_OFFSET STDCALL mysql_field_tell ( MYSQL_RES res)

◆ mysql_free_result()

void STDCALL mysql_free_result ( MYSQL_RES result)

◆ mysql_free_result_nonblocking()

enum net_async_status STDCALL mysql_free_result_nonblocking ( MYSQL_RES result)

Frees the memory allocated for a result, set by APIs which would have returned rows.

Parameters
[in]resultbuffer which needs to be freed
Return values
NET_ASYNC_NOT_READYoperation not complete, retry again
NET_ASYNC_COMPLETEoperation complete

◆ mysql_free_ssl_session_data()

bool STDCALL mysql_free_ssl_session_data ( MYSQL mysql,
void *  data 
)

Free a saved SSL session serialization.

Frees the session serialization as returned by mysql_get_ssl_session_data()

Parameters
mysqlpointer to the mysql connection
datathe session data to dispose of
Return values
truefailure
falsesuccess

◆ mysql_get_character_set_info()

void STDCALL mysql_get_character_set_info ( MYSQL mysql,
MY_CHARSET_INFO charset 
)

◆ mysql_get_client_info()

const char *STDCALL mysql_get_client_info ( void  )

◆ mysql_get_client_version()

unsigned long STDCALL mysql_get_client_version ( void  )

◆ mysql_get_connect_nonblocking_stage()

enum connect_stage STDCALL mysql_get_connect_nonblocking_stage ( MYSQL mysql)

◆ mysql_get_host_info()

const char *STDCALL mysql_get_host_info ( MYSQL mysql)

◆ mysql_get_option()

int STDCALL mysql_get_option ( MYSQL mysql,
enum mysql_option  option,
const void *  arg 
)

Return the current values for the options settable through mysql_options()

Returns the current values for all of the connection options. Callers should not manipulate the returned data ! Data are valid at the time of returning them until the next C API CALL arg should always be a pointer to a variable of the appropriate type. type of variable, based on the parameter:

uint MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_READ_TIMEOUT, MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_PROTOCOL, MYSQL_OPT_SSL_MODE, MYSQL_OPT_RETRY_COUNT

bool MYSQL_OPT_COMPRESS, MYSQL_OPT_LOCAL_INFILE, MYSQL_REPORT_DATA_TRUNCATION, MYSQL_OPT_RECONNECT, MYSQL_ENABLE_CLEARTEXT_PLUGIN, MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS, MYSQL_OPT_OPTIONAL_RESULTSET_METADATA

const char * MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP, MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_SET_CLIENT_IP, MYSQL_OPT_BIND, MYSQL_PLUGIN_DIR, MYSQL_DEFAULT_AUTH, MYSQL_OPT_SSL_KEY, MYSQL_OPT_SSL_CERT, MYSQL_OPT_SSL_CA, MYSQL_OPT_SSL_CAPATH, MYSQL_OPT_SSL_CIPHER, MYSQL_OPT_TLS_CIPHERSUITES, MYSQL_OPT_SSL_CRL, MYSQL_OPT_SSL_CRLPATH, MYSQL_OPT_TLS_VERSION, MYSQL_SERVER_PUBLIC_KEY, MYSQL_OPT_SSL_FIPS_MODE, MYSQL_OPT_TLS_SNI_SERVERNAME

<none, error returned> MYSQL_OPT_NAMED_PIPE, MYSQL_OPT_CONNECT_ATTR_RESET, MYSQL_OPT_CONNECT_ATTR_DELETE, MYSQL_INIT_COMMAND

Parameters
mysqlThe MYSQL connection to operate on
optionThe option to return the value for
[out]argMust be non-null. Receives the current value.
Returns
status
Return values
0SUCCESS

◆ mysql_get_proto_info()

unsigned int STDCALL mysql_get_proto_info ( MYSQL mysql)

◆ mysql_get_server_info()

const char *STDCALL mysql_get_server_info ( MYSQL mysql)

◆ mysql_get_server_version()

unsigned long STDCALL mysql_get_server_version ( MYSQL mysql)

◆ mysql_get_ssl_cipher()

const char *STDCALL mysql_get_ssl_cipher ( MYSQL mysql)

◆ mysql_get_ssl_session_data()

void *STDCALL mysql_get_ssl_session_data ( MYSQL mysql,
unsigned int  n_ticket,
unsigned int *  out_len 
)

Get the current SSL session serialization.

Return the SSL session serialized (if any) used for current connection to the server. The caller needs to free the return value by calling mysql_free_ssl_session_data()

Parameters
mysqlpointer to the mysql connection
n_ticketthe ticket to return. Currently on 0 is supported.
[out]out_lenif a non-null is supplied, stores the length of data returned.
Return values
null-terminatedstring of the session serialization
nullpointer if not an SSL connection or error

◆ mysql_get_ssl_session_reused()

bool STDCALL mysql_get_ssl_session_reused ( MYSQL mysql)

Check if the current ssl session is reused.

Parameters
mysqlpointer to the mysql connection
Return values
falsenot SSL or session not reused
truesession reused

◆ mysql_hex_string()

unsigned long STDCALL mysql_hex_string ( char *  to,
const char *  from,
unsigned long  from_length 
)

◆ mysql_info()

const char *STDCALL mysql_info ( MYSQL mysql)

◆ mysql_init()

MYSQL *STDCALL mysql_init ( MYSQL mysql)

◆ mysql_insert_id()

uint64_t STDCALL mysql_insert_id ( MYSQL mysql)

◆ mysql_kill()

int STDCALL mysql_kill ( MYSQL mysql,
unsigned long  pid 
)

◆ mysql_list_dbs()

MYSQL_RES *STDCALL mysql_list_dbs ( MYSQL mysql,
const char *  wild 
)

◆ mysql_list_fields()

MYSQL_RES *STDCALL mysql_list_fields ( MYSQL mysql,
const char *  table,
const char *  wild 
)

◆ mysql_list_processes()

MYSQL_RES *STDCALL mysql_list_processes ( MYSQL mysql)

◆ mysql_list_tables()

MYSQL_RES *STDCALL mysql_list_tables ( MYSQL mysql,
const char *  wild 
)

◆ mysql_more_results()

bool STDCALL mysql_more_results ( MYSQL mysql)

◆ mysql_next_result()

int STDCALL mysql_next_result ( MYSQL mysql)

◆ mysql_next_result_nonblocking()

enum net_async_status STDCALL mysql_next_result_nonblocking ( MYSQL mysql)

◆ mysql_num_fields()

unsigned int STDCALL mysql_num_fields ( MYSQL_RES res)

◆ mysql_num_rows()

uint64_t STDCALL mysql_num_rows ( MYSQL_RES res)

◆ mysql_options()

int STDCALL mysql_options ( MYSQL mysql,
enum mysql_option  option,
const void *  arg 
)

◆ mysql_options4()

int STDCALL mysql_options4 ( MYSQL mysql,
enum mysql_option  option,
const void *  arg1,
const void *  arg2 
)

◆ mysql_ping()

int STDCALL mysql_ping ( MYSQL mysql)

◆ mysql_query()

int STDCALL mysql_query ( MYSQL mysql,
const char *  q 
)

◆ mysql_read_query_result()

bool STDCALL mysql_read_query_result ( MYSQL mysql)

◆ mysql_real_connect()

MYSQL *STDCALL mysql_real_connect ( MYSQL mysql,
const char *  host,
const char *  user,
const char *  passwd,
const char *  db,
unsigned int  port,
const char *  unix_socket,
unsigned long  clientflag 
)

◆ mysql_real_connect_dns_srv()

MYSQL *STDCALL mysql_real_connect_dns_srv ( MYSQL mysql,
const char *  dns_srv_name,
const char *  user,
const char *  passwd,
const char *  db,
unsigned long  client_flag 
)

Connect to a server using a DNS SRV name.

See rfc2782 for what a DNS SRV is and how is one read

Parameters
mysqla MySQL handle to use
dns_srv_namethe name of the DNS SRV resource to query. ANSI
userthe user name to pass to mysql_real_connect
passwdthe password to pass to mysql_real_connect
dbthe database to pass to mysql_real_connect
client_flagthe client flag to pass to mysql_real_connect
Return values
NULLan error has occurred
non-NULLthe connected MySQL handle to use

If the OS doesn't support it the function returns OS error -1.

SRV FORMAT: _service._proto.name. TTL class SRV priority weight port target.

Example: _sip._tcp.example.com. 86400 IN SRV 0 5 5060 sipserver.example.com.

See also
mysql_real_connect

◆ mysql_real_connect_nonblocking()

enum net_async_status STDCALL mysql_real_connect_nonblocking ( MYSQL mysql,
const char *  host,
const char *  user,
const char *  passwd,
const char *  db,
unsigned int  port,
const char *  unix_socket,
unsigned long  clientflag 
)

◆ mysql_real_escape_string()

unsigned long STDCALL mysql_real_escape_string ( MYSQL mysql,
char *  to,
const char *  from,
unsigned long  length 
)

◆ mysql_real_escape_string_quote()

unsigned long STDCALL mysql_real_escape_string_quote ( MYSQL mysql,
char *  to,
const char *  from,
unsigned long  length,
char  quote 
)

◆ mysql_real_query()

int STDCALL mysql_real_query ( MYSQL mysql,
const char *  q,
unsigned long  length 
)

◆ mysql_real_query_nonblocking()

enum net_async_status STDCALL mysql_real_query_nonblocking ( MYSQL mysql,
const char *  query,
unsigned long  length 
)

◆ mysql_refresh()

int STDCALL mysql_refresh ( MYSQL mysql,
unsigned int  refresh_options 
)

◆ mysql_reset_connection()

int STDCALL mysql_reset_connection ( MYSQL mysql)

◆ mysql_reset_connection_nonblocking()

enum net_async_status STDCALL mysql_reset_connection_nonblocking ( MYSQL mysql)

◆ mysql_reset_server_public_key()

void STDCALL mysql_reset_server_public_key ( void  )

◆ mysql_result_metadata()

enum enum_resultset_metadata STDCALL mysql_result_metadata ( MYSQL_RES result)

◆ mysql_rollback()

bool STDCALL mysql_rollback ( MYSQL mysql)

◆ mysql_row_seek()

MYSQL_ROW_OFFSET STDCALL mysql_row_seek ( MYSQL_RES result,
MYSQL_ROW_OFFSET  offset 
)

◆ mysql_row_tell()

MYSQL_ROW_OFFSET STDCALL mysql_row_tell ( MYSQL_RES res)

◆ mysql_select_db()

int STDCALL mysql_select_db ( MYSQL mysql,
const char *  db 
)

◆ mysql_select_db_nonblocking()

enum net_async_status STDCALL mysql_select_db_nonblocking ( MYSQL mysql,
const char *  db,
bool *  error 
)

◆ mysql_send_query()

int STDCALL mysql_send_query ( MYSQL mysql,
const char *  q,
unsigned long  length 
)

◆ mysql_send_query_nonblocking()

enum net_async_status STDCALL mysql_send_query_nonblocking ( MYSQL mysql,
const char *  query,
unsigned long  length 
)

◆ mysql_server_end()

void STDCALL mysql_server_end ( void  )

◆ mysql_server_init()

int STDCALL mysql_server_init ( int  argc,
char **  argv,
char **  groups 
)

◆ mysql_session_track_get_first()

int STDCALL mysql_session_track_get_first ( MYSQL mysql,
enum enum_session_state_type  type,
const char **  data,
size_t *  length 
)

Get the first state change information received from the server.

Parameters
[in]mysqlmysql handle
[in]typestate change type
[out]databuffer to store the data
[out]lengthlength of the data
Returns
0 - Valid data stored 1 - No data

◆ mysql_session_track_get_next()

int STDCALL mysql_session_track_get_next ( MYSQL mysql,
enum enum_session_state_type  type,
const char **  data,
size_t *  length 
)

Get the subsequent state change information received from the server.

Parameters
[in]mysqlmysql handle
[in]typestate change type
[out]databuffer to store the data
[out]lengthlength of the data
Returns
0 - Valid data stored 1 - No data

◆ mysql_set_character_set()

int STDCALL mysql_set_character_set ( MYSQL mysql,
const char *  csname 
)

◆ mysql_set_local_infile_default()

void mysql_set_local_infile_default ( MYSQL mysql)

◆ mysql_set_local_infile_handler()

void mysql_set_local_infile_handler ( MYSQL mysql,
int(*)(void **, const char *, void *)  local_infile_init,
int(*)(void *, char *, unsigned int)  local_infile_read,
void(*)(void *)  local_infile_end,
int(*)(void *, char *, unsigned int)  local_infile_error,
void *   
)

◆ mysql_set_server_option()

int STDCALL mysql_set_server_option ( MYSQL mysql,
enum enum_mysql_set_option  option 
)

◆ mysql_shutdown()

int STDCALL mysql_shutdown ( MYSQL mysql,
enum mysql_enum_shutdown_level  shutdown_level 
)

◆ mysql_sqlstate()

const char *STDCALL mysql_sqlstate ( MYSQL mysql)

◆ mysql_ssl_set()

bool STDCALL mysql_ssl_set ( MYSQL mysql,
const char *  key,
const char *  cert,
const char *  ca,
const char *  capath,
const char *  cipher 
)

◆ mysql_stat()

const char *STDCALL mysql_stat ( MYSQL mysql)

◆ mysql_stmt_affected_rows()

uint64_t STDCALL mysql_stmt_affected_rows ( MYSQL_STMT stmt)

◆ mysql_stmt_attr_get()

bool STDCALL mysql_stmt_attr_get ( MYSQL_STMT stmt,
enum enum_stmt_attr_type  attr_type,
void *  attr 
)

◆ mysql_stmt_attr_set()

bool STDCALL mysql_stmt_attr_set ( MYSQL_STMT stmt,
enum enum_stmt_attr_type  attr_type,
const void *  attr 
)

◆ mysql_stmt_bind_named_param()

bool STDCALL mysql_stmt_bind_named_param ( MYSQL_STMT stmt,
MYSQL_BIND binds,
unsigned  n_params,
const char **  names 
)

◆ mysql_stmt_bind_param()

bool STDCALL mysql_stmt_bind_param ( MYSQL_STMT stmt,
MYSQL_BIND bnd 
)

◆ mysql_stmt_bind_result()

bool STDCALL mysql_stmt_bind_result ( MYSQL_STMT stmt,
MYSQL_BIND bnd 
)

◆ mysql_stmt_close()

bool STDCALL mysql_stmt_close ( MYSQL_STMT stmt)

◆ mysql_stmt_data_seek()

void STDCALL mysql_stmt_data_seek ( MYSQL_STMT stmt,
uint64_t  offset 
)

◆ mysql_stmt_errno()

unsigned int STDCALL mysql_stmt_errno ( MYSQL_STMT stmt)

◆ mysql_stmt_error()

const char *STDCALL mysql_stmt_error ( MYSQL_STMT stmt)

◆ mysql_stmt_execute()

int STDCALL mysql_stmt_execute ( MYSQL_STMT stmt)

◆ mysql_stmt_fetch()

int STDCALL mysql_stmt_fetch ( MYSQL_STMT stmt)

◆ mysql_stmt_fetch_column()

int STDCALL mysql_stmt_fetch_column ( MYSQL_STMT stmt,
MYSQL_BIND bind_arg,
unsigned int  column,
unsigned long  offset 
)

◆ mysql_stmt_field_count()

unsigned int STDCALL mysql_stmt_field_count ( MYSQL_STMT stmt)

◆ mysql_stmt_free_result()

bool STDCALL mysql_stmt_free_result ( MYSQL_STMT stmt)

◆ mysql_stmt_init()

MYSQL_STMT *STDCALL mysql_stmt_init ( MYSQL mysql)

◆ mysql_stmt_insert_id()

uint64_t STDCALL mysql_stmt_insert_id ( MYSQL_STMT stmt)

◆ mysql_stmt_next_result()

int STDCALL mysql_stmt_next_result ( MYSQL_STMT stmt)

◆ mysql_stmt_num_rows()

uint64_t STDCALL mysql_stmt_num_rows ( MYSQL_STMT stmt)

◆ mysql_stmt_param_count()

unsigned long STDCALL mysql_stmt_param_count ( MYSQL_STMT stmt)

◆ mysql_stmt_param_metadata()

MYSQL_RES *STDCALL mysql_stmt_param_metadata ( MYSQL_STMT stmt)

◆ mysql_stmt_prepare()

int STDCALL mysql_stmt_prepare ( MYSQL_STMT stmt,
const char *  query,
unsigned long  length 
)

◆ mysql_stmt_reset()

bool STDCALL mysql_stmt_reset ( MYSQL_STMT stmt)

◆ mysql_stmt_result_metadata()

MYSQL_RES *STDCALL mysql_stmt_result_metadata ( MYSQL_STMT stmt)

◆ mysql_stmt_row_seek()

MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek ( MYSQL_STMT stmt,
MYSQL_ROW_OFFSET  offset 
)

◆ mysql_stmt_row_tell()

MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell ( MYSQL_STMT stmt)

◆ mysql_stmt_send_long_data()

bool STDCALL mysql_stmt_send_long_data ( MYSQL_STMT stmt,
unsigned int  param_number,
const char *  data,
unsigned long  length 
)

◆ mysql_stmt_sqlstate()

const char *STDCALL mysql_stmt_sqlstate ( MYSQL_STMT stmt)

◆ mysql_stmt_store_result()

int STDCALL mysql_stmt_store_result ( MYSQL_STMT stmt)

◆ mysql_store_result()

MYSQL_RES *STDCALL mysql_store_result ( MYSQL mysql)

◆ mysql_store_result_nonblocking()

enum net_async_status STDCALL mysql_store_result_nonblocking ( MYSQL mysql,
MYSQL_RES **  result 
)

This API reads all result set sent by server in an asynchronous way.

Parameters
[in]mysqlconnection handle
[in]resultbuffer which holds all result sets.
Return values
NET_ASYNC_NOT_READYreading of result sets not complete
NET_ASYNC_COMPLETEcompleted this asynchronous operation

◆ mysql_thread_end()

void STDCALL mysql_thread_end ( void  )

◆ mysql_thread_id()

unsigned long STDCALL mysql_thread_id ( MYSQL mysql)

◆ mysql_thread_init()

bool STDCALL mysql_thread_init ( void  )

◆ mysql_thread_safe()

unsigned int STDCALL mysql_thread_safe ( void  )

◆ mysql_use_result()

MYSQL_RES *STDCALL mysql_use_result ( MYSQL mysql)

◆ mysql_warning_count()

unsigned int STDCALL mysql_warning_count ( MYSQL mysql)

Variable Documentation

◆ mysql_port

unsigned int mysql_port
extern

◆ mysql_unix_port

char* mysql_unix_port
extern