st_net
st_net也是一个网络属性相关的结构体,还没有接触太多,但在mysql启动的时候就会设置好里面的参数
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 */ /* 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 long max_packet,max_packet_size; unsigned int pkt_nr,compress_pkt_nr; unsigned int write_timeout, read_timeout, retry_count; int fcntl; unsigned int *return_status; unsigned char reading_or_writing; char save_char; my_bool unused1; /* Please remove with the next incompatible ABI change. */ my_bool unused2; /* Please remove with the next incompatible ABI change */ my_bool compress; my_bool unused3; /* Please remove with the next incompatible ABI change. */ /* Pointer to query object in query cache, do not equal NULL (0) for queries in cache that have not stored its results yet */ #endif /* Unused, please remove with the next incompatible ABI change. */ unsigned char *unused; unsigned int last_errno; unsigned char error; my_bool unused4; /* Please remove with the next incompatible ABI change. */ my_bool unused5; /* Please remove with the next incompatible ABI change. */ /** Client library error message buffer. Actually belongs to struct MYSQL. */ char last_error[MYSQL_ERRMSG_SIZE]; /** Client library sqlstate buffer. Set along with the error message. */ char sqlstate[SQLSTATE_LENGTH+1]; void *extension; #if defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY) /* Controls whether a big packet should be skipped. Initially set to FALSE by default. Unauthenticated sessions must have this set to FALSE so that the server can't be tricked to read packets indefinitely. */ my_bool skip_big_packet; #endif } NET;