… | |
… | |
30 | #endif /* __cplusplus */ |
30 | #endif /* __cplusplus */ |
31 | |
31 | |
32 | #if MYSQL_VERSION_ID < 50100 |
32 | #if MYSQL_VERSION_ID < 50100 |
33 | typedef I8 *xgptr; |
33 | typedef I8 *xgptr; |
34 | typedef I8 *const cxgptr; |
34 | typedef I8 *const cxgptr; |
35 | typedef int xlen; |
35 | typedef int xsize_t; |
|
|
36 | typedef int xssize_t; |
36 | #else |
37 | #else |
37 | typedef U8 *xgptr; |
38 | typedef U8 *xgptr; |
38 | typedef const U8 *cxgptr; |
39 | typedef const U8 *cxgptr; |
39 | typedef size_t xlen; |
40 | typedef size_t xsize_t; |
|
|
41 | typedef size_t xssize_t; |
40 | #endif |
42 | #endif |
41 | |
43 | |
42 | enum enum_vio_type |
44 | enum enum_vio_type |
43 | { |
45 | { |
44 | VIO_CLOSED, VIO_TYPE_TCPIP, VIO_TYPE_SOCKET, VIO_TYPE_NAMEDPIPE, |
46 | VIO_CLOSED, VIO_TYPE_TCPIP, VIO_TYPE_SOCKET, VIO_TYPE_NAMEDPIPE, |
… | |
… | |
134 | |
136 | |
135 | typedef unsigned char uchar; |
137 | typedef unsigned char uchar; |
136 | |
138 | |
137 | /* HFTODO - hide this if we don't want client in embedded server */ |
139 | /* HFTODO - hide this if we don't want client in embedded server */ |
138 | /* This structure is for every connection on both sides */ |
140 | /* This structure is for every connection on both sides */ |
139 | #if defined(MARIADB_BASE_VERSION) && 0 |
141 | #if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100010 |
140 | |
142 | |
141 | #define DESC_IS_PTR 1 |
143 | #define DESC_IS_PTR 1 |
142 | |
|
|
143 | struct st_vio |
144 | struct st_vio |
144 | { |
145 | { |
145 | my_socket sd; /* my_socket - real or imaginary */ |
146 | my_socket sd; /* my_socket - real or imaginary */ |
146 | void *m_psi; |
147 | void *m_psi; |
147 | my_bool localhost; /* Are we from localhost? */ |
148 | my_bool localhost; /* Are we from localhost? */ |
… | |
… | |
226 | char desc[30]; /* String description */ |
227 | char desc[30]; /* String description */ |
227 | char *read_buffer; /* buffer for vio_read_buff */ |
228 | char *read_buffer; /* buffer for vio_read_buff */ |
228 | char *read_pos; /* start of unfetched data in the |
229 | char *read_pos; /* start of unfetched data in the |
229 | read buffer */ |
230 | read buffer */ |
230 | char *read_end; /* end of unfetched data */ |
231 | char *read_end; /* end of unfetched data */ |
|
|
232 | #if defined(MARIADB_BASE_VERSION) |
|
|
233 | struct mysql_async_context *async_context; /* For non-blocking API */ |
|
|
234 | uint read_timeout, write_timeout; |
|
|
235 | #endif |
231 | /* function pointers. They are similar for socket/SSL/whatever */ |
236 | /* function pointers. They are similar for socket/SSL/whatever */ |
232 | void (*viodelete)(Vio*); |
237 | void (*viodelete)(Vio*); |
233 | int (*vioerrno)(Vio*); |
238 | int (*vioerrno)(Vio*); |
234 | size_t (*read)(Vio*, unsigned char *, size_t); |
239 | size_t (*read)(Vio*, unsigned char *, size_t); |
235 | size_t (*write)(Vio*, const unsigned char *, size_t); |
240 | size_t (*write)(Vio*, const unsigned char *, size_t); |