Eneboo - Documentación para desarrolladores
Clases | 'defines' | 'typedefs' | Funciones | Variables
Referencia del Archivo src/libmysql_std/libmysql.c
#include <my_global.h>
#include <my_sys.h>
#include <my_time.h>
#include <mysys_err.h>
#include <m_string.h>
#include <m_ctype.h>
#include "mysql.h"
#include "mysql_version.h"
#include "mysqld_error.h"
#include "errmsg.h"
#include <violite.h>
#include <sys/stat.h>
#include <signal.h>
#include <time.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sql_common.h>
#include "client_settings.h"
#include <errno.h>

Clases

struct  st_default_local_infile

'defines'

#define INADDR_NONE   -1
#define SOCKET_ERROR   -1
#define MAX_LONG_DATA_LENGTH   8192
#define unsigned_field(A)   ((A)->flags & UNSIGNED_FLAG)
#define DEFAULT_PREFETCH_ROWS   (ulong) 1
#define RESET_SERVER_SIDE   1
#define RESET_LONG_DATA   2
#define RESET_STORE_RESULT   4
#define MAX_DATE_REP_LENGTH   5
#define MAX_TIME_REP_LENGTH   13
#define MAX_DATETIME_REP_LENGTH   12
#define MAX_DOUBLE_STRING_REP_LENGTH   331
#define IS_TRUNCATED(value, is_unsigned, min, max, umax)
#define BIND_RESULT_DONE   1
#define REPORT_DATA_TRUNCATION   2
#define NOT_FIXED_DEC   31

'typedefs'

typedef struct
st_default_local_infile 
default_local_infile_data

Funciones

sig_handler my_pipe_sig_handler (int sig)
int STDCALL mysql_server_init (int argc __attribute__((unused)), char **argv __attribute__((unused)), char **groups __attribute__((unused)))
void STDCALL mysql_server_end ()
MYSQL_PARAMETERS *STDCALL mysql_get_parameters (void)
my_bool STDCALL mysql_thread_init ()
void STDCALL mysql_thread_end ()
void STDCALL mysql_debug (const char *debug __attribute__((unused)))
sig_handler my_pipe_sig_handler (int sig __attribute__((unused)))
my_bool STDCALL mysql_master_query (MYSQL *mysql, const char *q, unsigned long length)
my_bool STDCALL mysql_master_send_query (MYSQL *mysql, const char *q, unsigned long length)
my_bool STDCALL mysql_slave_query (MYSQL *mysql, const char *q, unsigned long length)
my_bool STDCALL mysql_slave_send_query (MYSQL *mysql, const char *q, unsigned long length)
void STDCALL mysql_enable_rpl_parse (MYSQL *mysql)
void STDCALL mysql_disable_rpl_parse (MYSQL *mysql)
int STDCALL mysql_rpl_parse_enabled (MYSQL *mysql)
void STDCALL mysql_enable_reads_from_master (MYSQL *mysql)
void STDCALL mysql_disable_reads_from_master (MYSQL *mysql)
my_bool STDCALL mysql_reads_from_master_enabled (MYSQL *mysql)
my_bool STDCALL mysql_rpl_probe (MYSQL *mysql)
enum mysql_rpl_type STDCALL mysql_rpl_query_type (const char *q, int len)
int cli_read_change_user_result (MYSQL *mysql, char *buff, const char *passwd)
my_bool STDCALL mysql_change_user (MYSQL *mysql, const char *user, const char *passwd, const char *db)
void read_user_name (char *name)
my_bool handle_local_infile (MYSQL *mysql, const char *net_filename)
void mysql_set_local_infile_handler (MYSQL *mysql, int(*local_infile_init)(void **, const char *, void *), int(*local_infile_read)(void *, char *, uint), void(*local_infile_end)(void *), int(*local_infile_error)(void *, char *, uint), void *userdata)
void mysql_set_local_infile_default (MYSQL *mysql)
int STDCALL mysql_query (MYSQL *mysql, const char *query)
int STDCALL mysql_set_master (MYSQL *mysql, const char *host, unsigned int port, const char *user, const char *passwd)
int STDCALL mysql_add_slave (MYSQL *mysql, const char *host, unsigned int port, const char *user, const char *passwd)
MYSQL_FIELD *STDCALL mysql_fetch_field (MYSQL_RES *result)
void STDCALL mysql_data_seek (MYSQL_RES *result, my_ulonglong row)
MYSQL_ROW_OFFSET STDCALL mysql_row_seek (MYSQL_RES *result, MYSQL_ROW_OFFSET row)
MYSQL_FIELD_OFFSET STDCALL mysql_field_seek (MYSQL_RES *result, MYSQL_FIELD_OFFSET field_offset)
MYSQL_RES *STDCALL mysql_list_dbs (MYSQL *mysql, const char *wild)
MYSQL_RES *STDCALL mysql_list_tables (MYSQL *mysql, const char *wild)
MYSQL_FIELDcli_list_fields (MYSQL *mysql)
MYSQL_RES *STDCALL mysql_list_fields (MYSQL *mysql, const char *table, const char *wild)
MYSQL_RES *STDCALL mysql_list_processes (MYSQL *mysql)
int STDCALL mysql_shutdown (MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level)
int STDCALL mysql_refresh (MYSQL *mysql, uint options)
int STDCALL mysql_kill (MYSQL *mysql, ulong pid)
int STDCALL mysql_set_server_option (MYSQL *mysql, enum enum_mysql_set_option option)
int STDCALL mysql_dump_debug_info (MYSQL *mysql)
const char * cli_read_statistics (MYSQL *mysql)
const char *STDCALL mysql_stat (MYSQL *mysql)
int STDCALL mysql_ping (MYSQL *mysql)
const char *STDCALL mysql_get_server_info (MYSQL *mysql)
const char *STDCALL mysql_get_host_info (MYSQL *mysql)
uint STDCALL mysql_get_proto_info (MYSQL *mysql)
const char *STDCALL mysql_get_client_info (void)
ulong STDCALL mysql_get_client_version (void)
my_bool STDCALL mysql_eof (MYSQL_RES *res)
MYSQL_FIELD *STDCALL mysql_fetch_field_direct (MYSQL_RES *res, uint 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)
unsigned int STDCALL mysql_field_count (MYSQL *mysql)
my_ulonglong STDCALL mysql_affected_rows (MYSQL *mysql)
my_ulonglong STDCALL mysql_insert_id (MYSQL *mysql)
const char *STDCALL mysql_sqlstate (MYSQL *mysql)
uint STDCALL mysql_warning_count (MYSQL *mysql)
const char *STDCALL mysql_info (MYSQL *mysql)
ulong STDCALL mysql_thread_id (MYSQL *mysql)
const char *STDCALL mysql_character_set_name (MYSQL *mysql)
void STDCALL mysql_get_character_set_info (MYSQL *mysql, MY_CHARSET_INFO *csinfo)
uint STDCALL mysql_thread_safe (void)
my_bool STDCALL mysql_embedded (void)
void my_net_local_init (NET *net)
ulong STDCALL mysql_hex_string (char *to, const char *from, ulong length)
ulong STDCALL mysql_escape_string (char *to, const char *from, ulong length)
ulong STDCALL mysql_real_escape_string (MYSQL *mysql, char *to, const char *from, ulong length)
char *STDCALL mysql_odbc_escape_string (MYSQL *mysql, char *to, ulong to_length, const char *from, ulong from_length, void *param, char *(*extend_buffer)(void *, char *, ulong *))
void STDCALL myodbc_remove_escape (MYSQL *mysql, char *name)
void set_stmt_errmsg (MYSQL_STMT *stmt, const char *err, int errcode, const char *sqlstate)
my_bool cli_read_prepare_result (MYSQL *mysql, MYSQL_STMT *stmt)
MYSQL_STMT *STDCALL mysql_stmt_init (MYSQL *mysql)
int STDCALL mysql_stmt_prepare (MYSQL_STMT *stmt, const char *query, ulong length)
MYSQL_RES *STDCALL mysql_stmt_result_metadata (MYSQL_STMT *stmt)
MYSQL_RES *STDCALL mysql_stmt_param_metadata (MYSQL_STMT *stmt)
int cli_stmt_execute (MYSQL_STMT *stmt)
my_bool STDCALL mysql_stmt_attr_set (MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *value)
my_bool STDCALL mysql_stmt_attr_get (MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *value)
int STDCALL mysql_stmt_execute (MYSQL_STMT *stmt)
ulong STDCALL mysql_stmt_param_count (MYSQL_STMT *stmt)
my_ulonglong STDCALL mysql_stmt_affected_rows (MYSQL_STMT *stmt)
unsigned int STDCALL mysql_stmt_field_count (MYSQL_STMT *stmt)
my_ulonglong STDCALL mysql_stmt_insert_id (MYSQL_STMT *stmt)
my_bool STDCALL mysql_stmt_bind_param (MYSQL_STMT *stmt, MYSQL_BIND *my_bind)
my_bool STDCALL mysql_stmt_send_long_data (MYSQL_STMT *stmt, uint param_number, const char *data, ulong length)
my_bool STDCALL mysql_stmt_bind_result (MYSQL_STMT *stmt, MYSQL_BIND *my_bind)
int cli_unbuffered_fetch (MYSQL *mysql, char **row)
int STDCALL mysql_stmt_fetch (MYSQL_STMT *stmt)
int STDCALL mysql_stmt_fetch_column (MYSQL_STMT *stmt, MYSQL_BIND *my_bind, uint column, ulong offset)
int cli_read_binary_rows (MYSQL_STMT *stmt)
int STDCALL mysql_stmt_store_result (MYSQL_STMT *stmt)
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek (MYSQL_STMT *stmt, MYSQL_ROW_OFFSET row)
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell (MYSQL_STMT *stmt)
void STDCALL mysql_stmt_data_seek (MYSQL_STMT *stmt, my_ulonglong row)
my_ulonglong STDCALL mysql_stmt_num_rows (MYSQL_STMT *stmt)
my_bool STDCALL mysql_stmt_free_result (MYSQL_STMT *stmt)
my_bool STDCALL mysql_stmt_close (MYSQL_STMT *stmt)
my_bool STDCALL mysql_stmt_reset (MYSQL_STMT *stmt)
uint STDCALL mysql_stmt_errno (MYSQL_STMT *stmt)
const char *STDCALL mysql_stmt_sqlstate (MYSQL_STMT *stmt)
const char *STDCALL mysql_stmt_error (MYSQL_STMT *stmt)
my_bool STDCALL mysql_commit (MYSQL *mysql)
my_bool STDCALL mysql_rollback (MYSQL *mysql)
my_bool STDCALL mysql_autocommit (MYSQL *mysql, my_bool auto_mode)
my_bool STDCALL mysql_more_results (MYSQL *mysql)
int STDCALL mysql_next_result (MYSQL *mysql)
MYSQL_RES *STDCALL mysql_use_result (MYSQL *mysql)
my_bool STDCALL mysql_read_query_result (MYSQL *mysql)

Variables

ulong net_buffer_length = 8192
ulong max_allowed_packet = 1024L*1024L*1024L

Documentación de los 'defines'

#define BIND_RESULT_DONE   1
#define DEFAULT_PREFETCH_ROWS   (ulong) 1
#define INADDR_NONE   -1
#define IS_TRUNCATED (   value,
  is_unsigned,
  min,
  max,
  umax 
)
Valor:
((is_unsigned) ? (((value) > (umax) || (value) < 0) ? 1 : 0) : \
                         (((value) > (max)  || (value) < (min)) ? 1 : 0))
#define MAX_DATE_REP_LENGTH   5
#define MAX_DATETIME_REP_LENGTH   12
#define MAX_DOUBLE_STRING_REP_LENGTH   331
#define MAX_LONG_DATA_LENGTH   8192
#define MAX_TIME_REP_LENGTH   13
#define NOT_FIXED_DEC   31
#define REPORT_DATA_TRUNCATION   2
#define RESET_LONG_DATA   2
#define RESET_SERVER_SIDE   1
#define RESET_STORE_RESULT   4
#define SOCKET_ERROR   -1
#define unsigned_field (   A)    ((A)->flags & UNSIGNED_FLAG)

Documentación de los 'typedefs'


Documentación de las funciones

MYSQL_FIELD* cli_list_fields ( MYSQL mysql)
int cli_read_binary_rows ( MYSQL_STMT stmt)
int cli_read_change_user_result ( MYSQL mysql,
char *  buff,
const char *  passwd 
)
my_bool cli_read_prepare_result ( MYSQL mysql,
MYSQL_STMT stmt 
)
const char* cli_read_statistics ( MYSQL mysql)
int cli_stmt_execute ( MYSQL_STMT stmt)
int cli_unbuffered_fetch ( MYSQL mysql,
char **  row 
)
my_bool handle_local_infile ( MYSQL mysql,
const char *  net_filename 
)
void my_net_local_init ( NET net)
sig_handler my_pipe_sig_handler ( int sig   __attribute__(unused))
sig_handler my_pipe_sig_handler ( int  sig)
void STDCALL myodbc_remove_escape ( MYSQL mysql,
char *  name 
)
int STDCALL mysql_add_slave ( MYSQL mysql,
const char *  host,
unsigned int  port,
const char *  user,
const char *  passwd 
)
my_ulonglong STDCALL mysql_affected_rows ( MYSQL mysql)
my_bool STDCALL mysql_autocommit ( MYSQL mysql,
my_bool  auto_mode 
)
my_bool STDCALL mysql_change_user ( MYSQL mysql,
const char *  user,
const char *  passwd,
const char *  db 
)
const char* STDCALL mysql_character_set_name ( MYSQL mysql)
my_bool STDCALL mysql_commit ( MYSQL mysql)
void STDCALL mysql_data_seek ( MYSQL_RES result,
my_ulonglong  row 
)
void STDCALL mysql_debug ( const char *debug   __attribute__(unused))
void STDCALL mysql_disable_reads_from_master ( MYSQL mysql)
void STDCALL mysql_disable_rpl_parse ( MYSQL mysql)
int STDCALL mysql_dump_debug_info ( MYSQL mysql)
my_bool STDCALL mysql_embedded ( void  )
void STDCALL mysql_enable_reads_from_master ( MYSQL mysql)
void STDCALL mysql_enable_rpl_parse ( MYSQL mysql)
my_bool STDCALL mysql_eof ( MYSQL_RES res)
ulong STDCALL mysql_escape_string ( char *  to,
const char *  from,
ulong  length 
)
MYSQL_FIELD* STDCALL mysql_fetch_field ( MYSQL_RES result)
MYSQL_FIELD* STDCALL mysql_fetch_field_direct ( MYSQL_RES res,
uint  fieldnr 
)
MYSQL_FIELD* STDCALL mysql_fetch_fields ( MYSQL_RES res)
unsigned int STDCALL mysql_field_count ( MYSQL mysql)
MYSQL_FIELD_OFFSET STDCALL mysql_field_seek ( MYSQL_RES result,
MYSQL_FIELD_OFFSET  field_offset 
)
MYSQL_FIELD_OFFSET STDCALL mysql_field_tell ( MYSQL_RES res)
void STDCALL mysql_get_character_set_info ( MYSQL mysql,
MY_CHARSET_INFO csinfo 
)
const char* STDCALL mysql_get_client_info ( void  )
ulong STDCALL mysql_get_client_version ( void  )
const char* STDCALL mysql_get_host_info ( MYSQL mysql)
MYSQL_PARAMETERS* STDCALL mysql_get_parameters ( void  )
uint STDCALL mysql_get_proto_info ( MYSQL mysql)
const char* STDCALL mysql_get_server_info ( MYSQL mysql)
ulong STDCALL mysql_hex_string ( char *  to,
const char *  from,
ulong  length 
)
const char* STDCALL mysql_info ( MYSQL mysql)
my_ulonglong STDCALL mysql_insert_id ( MYSQL mysql)
int STDCALL mysql_kill ( MYSQL mysql,
ulong  pid 
)
MYSQL_RES* STDCALL mysql_list_dbs ( MYSQL mysql,
const char *  wild 
)
MYSQL_RES* STDCALL mysql_list_fields ( MYSQL mysql,
const char *  table,
const char *  wild 
)
MYSQL_RES* STDCALL mysql_list_processes ( MYSQL mysql)
MYSQL_RES* STDCALL mysql_list_tables ( MYSQL mysql,
const char *  wild 
)
my_bool STDCALL mysql_master_query ( MYSQL mysql,
const char *  q,
unsigned long  length 
)
my_bool STDCALL mysql_master_send_query ( MYSQL mysql,
const char *  q,
unsigned long  length 
)
my_bool STDCALL mysql_more_results ( MYSQL mysql)
int STDCALL mysql_next_result ( MYSQL mysql)
char* STDCALL mysql_odbc_escape_string ( MYSQL mysql,
char *  to,
ulong  to_length,
const char *  from,
ulong  from_length,
void *  param,
char *(*)(void *, char *, ulong *)  extend_buffer 
)
int STDCALL mysql_ping ( MYSQL mysql)
int STDCALL mysql_query ( MYSQL mysql,
const char *  query 
)
my_bool STDCALL mysql_read_query_result ( MYSQL mysql)
my_bool STDCALL mysql_reads_from_master_enabled ( MYSQL mysql)
ulong STDCALL mysql_real_escape_string ( MYSQL mysql,
char *  to,
const char *  from,
ulong  length 
)
int STDCALL mysql_refresh ( MYSQL mysql,
uint  options 
)
my_bool STDCALL mysql_rollback ( MYSQL mysql)
MYSQL_ROW_OFFSET STDCALL mysql_row_seek ( MYSQL_RES result,
MYSQL_ROW_OFFSET  row 
)
MYSQL_ROW_OFFSET STDCALL mysql_row_tell ( MYSQL_RES res)
int STDCALL mysql_rpl_parse_enabled ( MYSQL mysql)
my_bool STDCALL mysql_rpl_probe ( MYSQL mysql)
enum mysql_rpl_type STDCALL mysql_rpl_query_type ( const char *  q,
int  len 
)
void STDCALL mysql_server_end ( void  )
int STDCALL mysql_server_init ( int argc   __attribute__(unused),
char **argv   __attribute__(unused),
char **groups   __attribute__(unused) 
)
void mysql_set_local_infile_default ( MYSQL mysql)
void mysql_set_local_infile_handler ( MYSQL mysql,
int(*)(void **, const char *, void *)  local_infile_init,
int(*)(void *, char *, uint local_infile_read,
void(*)(void *)  local_infile_end,
int(*)(void *, char *, uint local_infile_error,
void *  userdata 
)
int STDCALL mysql_set_master ( MYSQL mysql,
const char *  host,
unsigned int  port,
const char *  user,
const char *  passwd 
)
int STDCALL mysql_set_server_option ( MYSQL mysql,
enum enum_mysql_set_option  option 
)
int STDCALL mysql_shutdown ( MYSQL mysql,
enum mysql_enum_shutdown_level  shutdown_level 
)
my_bool STDCALL mysql_slave_query ( MYSQL mysql,
const char *  q,
unsigned long  length 
)
my_bool STDCALL mysql_slave_send_query ( MYSQL mysql,
const char *  q,
unsigned long  length 
)
const char* STDCALL mysql_sqlstate ( MYSQL mysql)
const char* STDCALL mysql_stat ( MYSQL mysql)
my_ulonglong STDCALL mysql_stmt_affected_rows ( MYSQL_STMT stmt)
my_bool STDCALL mysql_stmt_attr_get ( MYSQL_STMT stmt,
enum enum_stmt_attr_type  attr_type,
void *  value 
)
my_bool STDCALL mysql_stmt_attr_set ( MYSQL_STMT stmt,
enum enum_stmt_attr_type  attr_type,
const void *  value 
)
my_bool STDCALL mysql_stmt_bind_param ( MYSQL_STMT stmt,
MYSQL_BIND my_bind 
)
my_bool STDCALL mysql_stmt_bind_result ( MYSQL_STMT stmt,
MYSQL_BIND my_bind 
)
my_bool STDCALL mysql_stmt_close ( MYSQL_STMT stmt)
void STDCALL mysql_stmt_data_seek ( MYSQL_STMT stmt,
my_ulonglong  row 
)
uint STDCALL mysql_stmt_errno ( MYSQL_STMT stmt)
const char* STDCALL mysql_stmt_error ( MYSQL_STMT stmt)
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 my_bind,
uint  column,
ulong  offset 
)
unsigned int STDCALL mysql_stmt_field_count ( MYSQL_STMT stmt)
my_bool STDCALL mysql_stmt_free_result ( MYSQL_STMT stmt)
MYSQL_STMT* STDCALL mysql_stmt_init ( MYSQL mysql)
my_ulonglong STDCALL mysql_stmt_insert_id ( MYSQL_STMT stmt)
my_ulonglong STDCALL mysql_stmt_num_rows ( MYSQL_STMT stmt)
ulong STDCALL mysql_stmt_param_count ( MYSQL_STMT stmt)
MYSQL_RES* STDCALL mysql_stmt_param_metadata ( MYSQL_STMT stmt)
int STDCALL mysql_stmt_prepare ( MYSQL_STMT stmt,
const char *  query,
ulong  length 
)
my_bool STDCALL mysql_stmt_reset ( MYSQL_STMT stmt)
MYSQL_RES* STDCALL mysql_stmt_result_metadata ( MYSQL_STMT stmt)
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek ( MYSQL_STMT stmt,
MYSQL_ROW_OFFSET  row 
)
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell ( MYSQL_STMT stmt)
my_bool STDCALL mysql_stmt_send_long_data ( MYSQL_STMT stmt,
uint  param_number,
const char *  data,
ulong  length 
)
const char* STDCALL mysql_stmt_sqlstate ( MYSQL_STMT stmt)
int STDCALL mysql_stmt_store_result ( MYSQL_STMT stmt)
void STDCALL mysql_thread_end ( void  )
ulong STDCALL mysql_thread_id ( MYSQL mysql)
my_bool STDCALL mysql_thread_init ( void  )
uint STDCALL mysql_thread_safe ( void  )
MYSQL_RES* STDCALL mysql_use_result ( MYSQL mysql)
uint STDCALL mysql_warning_count ( MYSQL mysql)
void read_user_name ( char *  name)
void set_stmt_errmsg ( MYSQL_STMT stmt,
const char *  err,
int  errcode,
const char *  sqlstate 
)

Documentación de las variables

ulong max_allowed_packet = 1024L*1024L*1024L
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'