Created
March 14, 2016 12:20
-
-
Save tgunr/f703a78de2d23a71a914 to your computer and use it in GitHub Desktop.
Dealing with structs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct st_mysql_methods; | |
typedef struct st_mysql | |
{ | |
NET net; /* Communication parameters */ | |
unsigned char *connector_fd; /* ConnectorFd for SSL */ | |
char *host,*user,*passwd,*unix_socket,*server_version,*host_info; | |
char *info, *db; | |
struct charset_info_st *charset; | |
MYSQL_FIELD *fields; | |
MEM_ROOT field_alloc; | |
my_ulonglong affected_rows; | |
my_ulonglong insert_id; /* id if insert on table with NEXTNR */ | |
my_ulonglong extra_info; /* Not used */ | |
unsigned long thread_id; /* Id for connection in server */ | |
unsigned long packet_length; | |
unsigned int port; | |
unsigned long client_flag,server_capabilities; | |
unsigned int protocol_version; | |
unsigned int field_count; | |
unsigned int server_status; | |
unsigned int server_language; | |
unsigned int warning_count; | |
struct st_mysql_options options; | |
enum mysql_status status; | |
my_bool free_me; /* If free in mysql_close */ | |
my_bool reconnect; /* set to 1 if automatic reconnect */ | |
/* session-wide random string */ | |
char scramble[SCRAMBLE_LENGTH+1]; | |
my_bool unused1; | |
void *unused2, *unused3, *unused4, *unused5; | |
LIST *stmts; /* list of all statements */ | |
const struct st_mysql_methods *methods; | |
void *thd; | |
/* | |
Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag | |
from mysql_stmt_close if close had to cancel result set of this object. | |
*/ | |
my_bool *unbuffered_fetch_owner; | |
/* needed for embedded server - no net buffer to store the 'info' */ | |
char *info_buffer; | |
void *extension; | |
} MYSQL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment