在mysql_com.h里修改:typedef struct st_net { #if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY) Vio* vio; unsigned char *buff,*buff_end,*write_pos,*read_pos; // my_socket fd; /*把这里注释掉*/ /* For Perl DBI/dbd */ unsigned long max_packet,max_packet_size; unsigned int pkt_nr,compress_pkt_nr; unsigned int write_timeout, read_timeout, retry_count; int fcntl; my_bool compress; /* The following variable is set if we are doing several queries in one command ( as in LOAD TABLE ... FROM MASTER ), and do not want to confuse the client with OK at the wrong time */ unsigned long remain_in_buf,length, buf_length, where_b; unsigned int *return_status; unsigned char reading_or_writing; char save_char; my_bool no_send_ok; /* Pointer to query object in query cache, do not equal NULL (0) for queries in cache that have not stored its results yet */ #endifmy_bool my_net_init(NET *net, Vio* vio); void my_net_local_init(NET *net); void net_end(NET *net); void net_clear(NET *net); my_bool net_realloc(NET *net, unsigned long length); my_bool net_flush(NET *net); my_bool my_net_write(NET *net,const char *packet,unsigned long len); my_bool net_write_command(NET *net,unsigned char command, const char *header, unsigned long head_len, const char *packet, unsigned long len); int net_real_write(NET *net,const char *packet,unsigned long len); unsigned long my_net_read(NET *net);/* The following function is not meant for normal usage Currently it's used internally by manager.c */ struct sockaddr; //int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen, // unsigned int timeout);/*把这句注释掉*/struct rand_struct { unsigned long seed1,seed2,max_value; double max_value_dbl; };现在编译吧。
#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
Vio* vio;
unsigned char *buff,*buff_end,*write_pos,*read_pos;
// my_socket fd; /*把这里注释掉*/ /* For Perl DBI/dbd */
unsigned long max_packet,max_packet_size;
unsigned int pkt_nr,compress_pkt_nr;
unsigned int write_timeout, read_timeout, retry_count;
int fcntl;
my_bool compress;
/*
The following variable is set if we are doing several queries in one
command ( as in LOAD TABLE ... FROM MASTER ),
and do not want to confuse the client with OK at the wrong time
*/
unsigned long remain_in_buf,length, buf_length, where_b;
unsigned int *return_status;
unsigned char reading_or_writing;
char save_char;
my_bool no_send_ok;
/*
Pointer to query object in query cache, do not equal NULL (0) for
queries in cache that have not stored its results yet
*/
#endifmy_bool my_net_init(NET *net, Vio* vio);
void my_net_local_init(NET *net);
void net_end(NET *net);
void net_clear(NET *net);
my_bool net_realloc(NET *net, unsigned long length);
my_bool net_flush(NET *net);
my_bool my_net_write(NET *net,const char *packet,unsigned long len);
my_bool net_write_command(NET *net,unsigned char command,
const char *header, unsigned long head_len,
const char *packet, unsigned long len);
int net_real_write(NET *net,const char *packet,unsigned long len);
unsigned long my_net_read(NET *net);/*
The following function is not meant for normal usage
Currently it's used internally by manager.c
*/
struct sockaddr;
//int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen,
// unsigned int timeout);/*把这句注释掉*/struct rand_struct {
unsigned long seed1,seed2,max_value;
double max_value_dbl;
};现在编译吧。