1#[repr(C)]
4pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
5impl <T> __BindgenUnionField<T> {
6 #[inline]
7 pub fn new() -> Self { __BindgenUnionField(::std::marker::PhantomData) }
8 #[inline]
9 pub unsafe fn as_ref(&self) -> &T { ::std::mem::transmute(self) }
10 #[inline]
11 pub unsafe fn as_mut(&mut self) -> &mut T { ::std::mem::transmute(self) }
12}
13impl <T> ::std::default::Default for __BindgenUnionField<T> {
14 #[inline]
15 fn default() -> Self { Self::new() }
16}
17impl <T> ::std::clone::Clone for __BindgenUnionField<T> {
18 #[inline]
19 fn clone(&self) -> Self { Self::new() }
20}
21impl <T> ::std::marker::Copy for __BindgenUnionField<T> { }
22impl <T> ::std::fmt::Debug for __BindgenUnionField<T> {
23 fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
24 fmt.write_str("__BindgenUnionField")
25 }
26}
27pub const MYSQL_SERVER_VERSION: &'static [u8; 7usize] = b"5.7.17\x00";
28pub const MYSQL_BASE_VERSION: &'static [u8; 11usize] = b"mysqld-5.7\x00";
29pub const MYSQL_SERVER_SUFFIX_DEF: &'static [u8; 1usize] = b"\x00";
30pub const MYSQL_VERSION_ID: ::std::os::raw::c_uint = 50717;
31pub const MYSQL_PORT: ::std::os::raw::c_uint = 3306;
32pub const MYSQL_PORT_DEFAULT: ::std::os::raw::c_uint = 0;
33pub const MYSQL_UNIX_ADDR: &'static [u8; 16usize] = b"/tmp/mysql.sock\x00";
34pub const MYSQL_CONFIG_NAME: &'static [u8; 3usize] = b"my\x00";
35pub const MYSQL_COMPILATION_COMMENT: &'static [u8; 20usize] =
36 b"Source distribution\x00";
37pub const MYSQL_AUTODETECT_CHARSET_NAME: &'static [u8; 5usize] = b"auto\x00";
38pub const MYSQL_NAMEDPIPE: &'static [u8; 6usize] = b"MySQL\x00";
39pub const MYSQL_SERVICENAME: &'static [u8; 6usize] = b"MySQL\x00";
40pub const MYSQL_ERRMSG_SIZE: ::std::os::raw::c_uint = 512;
41pub const MYSQL_STMT_HEADER: ::std::os::raw::c_uint = 4;
42pub const MYSQL_LONG_DATA_HEADER: ::std::os::raw::c_uint = 6;
43pub const MYSQL_CLIENT_reserved1: ::std::os::raw::c_uint = 0;
44pub const MYSQL_CLIENT_reserved2: ::std::os::raw::c_uint = 1;
45pub const MYSQL_CLIENT_AUTHENTICATION_PLUGIN: ::std::os::raw::c_uint = 2;
46pub const MYSQL_CLIENT_TRACE_PLUGIN: ::std::os::raw::c_uint = 3;
47pub const MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION:
48 ::std::os::raw::c_uint =
49 256;
50pub const MYSQL_CLIENT_TRACE_PLUGIN_INTERFACE_VERSION: ::std::os::raw::c_uint
51 =
52 256;
53pub const MYSQL_CLIENT_MAX_PLUGINS: ::std::os::raw::c_uint = 4;
54pub const MYSQL_USERNAME_LENGTH: ::std::os::raw::c_uint = 96;
55pub const MYSQL_NO_DATA: ::std::os::raw::c_uint = 100;
56pub const MYSQL_DATA_TRUNCATED: ::std::os::raw::c_uint = 101;
57pub type my_bool = ::std::os::raw::c_char;
58pub type va_list = *mut ::std::os::raw::c_char;
59pub type UINT_PTR = ::std::os::raw::c_ulonglong;
60pub type HANDLE = *mut ::std::os::raw::c_void;
61pub type SOCKET = UINT_PTR;
62#[repr(i32)]
63#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
64pub enum enum_field_types {
65 MYSQL_TYPE_DECIMAL = 0,
66 MYSQL_TYPE_TINY = 1,
67 MYSQL_TYPE_SHORT = 2,
68 MYSQL_TYPE_LONG = 3,
69 MYSQL_TYPE_FLOAT = 4,
70 MYSQL_TYPE_DOUBLE = 5,
71 MYSQL_TYPE_NULL = 6,
72 MYSQL_TYPE_TIMESTAMP = 7,
73 MYSQL_TYPE_LONGLONG = 8,
74 MYSQL_TYPE_INT24 = 9,
75 MYSQL_TYPE_DATE = 10,
76 MYSQL_TYPE_TIME = 11,
77 MYSQL_TYPE_DATETIME = 12,
78 MYSQL_TYPE_YEAR = 13,
79 MYSQL_TYPE_NEWDATE = 14,
80 MYSQL_TYPE_VARCHAR = 15,
81 MYSQL_TYPE_BIT = 16,
82 MYSQL_TYPE_TIMESTAMP2 = 17,
83 MYSQL_TYPE_DATETIME2 = 18,
84 MYSQL_TYPE_TIME2 = 19,
85 MYSQL_TYPE_JSON = 245,
86 MYSQL_TYPE_NEWDECIMAL = 246,
87 MYSQL_TYPE_ENUM = 247,
88 MYSQL_TYPE_SET = 248,
89 MYSQL_TYPE_TINY_BLOB = 249,
90 MYSQL_TYPE_MEDIUM_BLOB = 250,
91 MYSQL_TYPE_LONG_BLOB = 251,
92 MYSQL_TYPE_BLOB = 252,
93 MYSQL_TYPE_VAR_STRING = 253,
94 MYSQL_TYPE_STRING = 254,
95 MYSQL_TYPE_GEOMETRY = 255,
96}
97#[repr(C)]
98#[derive(Debug, Copy, Clone)]
99pub struct st_vio {
100 _unused: [u8; 0],
101}
102pub type Vio = st_vio;
103#[repr(C)]
104pub struct st_net {
105 pub vio: *mut Vio,
106 pub buff: *mut ::std::os::raw::c_uchar,
107 pub buff_end: *mut ::std::os::raw::c_uchar,
108 pub write_pos: *mut ::std::os::raw::c_uchar,
109 pub read_pos: *mut ::std::os::raw::c_uchar,
110 pub fd: SOCKET,
111 pub remain_in_buf: ::std::os::raw::c_ulong,
112 pub length: ::std::os::raw::c_ulong,
113 pub buf_length: ::std::os::raw::c_ulong,
114 pub where_b: ::std::os::raw::c_ulong,
115 pub max_packet: ::std::os::raw::c_ulong,
116 pub max_packet_size: ::std::os::raw::c_ulong,
117 pub pkt_nr: ::std::os::raw::c_uint,
118 pub compress_pkt_nr: ::std::os::raw::c_uint,
119 pub write_timeout: ::std::os::raw::c_uint,
120 pub read_timeout: ::std::os::raw::c_uint,
121 pub retry_count: ::std::os::raw::c_uint,
122 pub fcntl: ::std::os::raw::c_int,
123 pub return_status: *mut ::std::os::raw::c_uint,
124 pub reading_or_writing: ::std::os::raw::c_uchar,
125 pub save_char: ::std::os::raw::c_char,
126 pub unused1: my_bool,
127 pub unused2: my_bool,
128 pub compress: my_bool,
129 pub unused3: my_bool,
130 pub unused: *mut ::std::os::raw::c_uchar,
131 pub last_errno: ::std::os::raw::c_uint,
132 pub error: ::std::os::raw::c_uchar,
133 pub unused4: my_bool,
134 pub unused5: my_bool,
135 pub last_error: [::std::os::raw::c_char; 512usize],
137 pub sqlstate: [::std::os::raw::c_char; 6usize],
139 pub extension: *mut ::std::os::raw::c_void,
148}
149#[test]
150fn bindgen_test_layout_st_net() {
151 assert_eq!(::std::mem::size_of::<st_net>() , 656usize , concat ! (
152 "Size of: " , stringify ! ( st_net ) ));
153 assert_eq! (::std::mem::align_of::<st_net>() , 8usize , concat ! (
154 "Alignment of " , stringify ! ( st_net ) ));
155 assert_eq! (unsafe {
156 & ( * ( 0 as * const st_net ) ) . vio as * const _ as usize }
157 , 0usize , concat ! (
158 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
159 stringify ! ( vio ) ));
160 assert_eq! (unsafe {
161 & ( * ( 0 as * const st_net ) ) . buff as * const _ as usize }
162 , 8usize , concat ! (
163 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
164 stringify ! ( buff ) ));
165 assert_eq! (unsafe {
166 & ( * ( 0 as * const st_net ) ) . buff_end as * const _ as
167 usize } , 16usize , concat ! (
168 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
169 stringify ! ( buff_end ) ));
170 assert_eq! (unsafe {
171 & ( * ( 0 as * const st_net ) ) . write_pos as * const _ as
172 usize } , 24usize , concat ! (
173 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
174 stringify ! ( write_pos ) ));
175 assert_eq! (unsafe {
176 & ( * ( 0 as * const st_net ) ) . read_pos as * const _ as
177 usize } , 32usize , concat ! (
178 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
179 stringify ! ( read_pos ) ));
180 assert_eq! (unsafe {
181 & ( * ( 0 as * const st_net ) ) . fd as * const _ as usize } ,
182 40usize , concat ! (
183 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
184 stringify ! ( fd ) ));
185 assert_eq! (unsafe {
186 & ( * ( 0 as * const st_net ) ) . remain_in_buf as * const _
187 as usize } , 48usize , concat ! (
188 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
189 stringify ! ( remain_in_buf ) ));
190 assert_eq! (unsafe {
191 & ( * ( 0 as * const st_net ) ) . length as * const _ as usize
192 } , 52usize , concat ! (
193 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
194 stringify ! ( length ) ));
195 assert_eq! (unsafe {
196 & ( * ( 0 as * const st_net ) ) . buf_length as * const _ as
197 usize } , 56usize , concat ! (
198 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
199 stringify ! ( buf_length ) ));
200 assert_eq! (unsafe {
201 & ( * ( 0 as * const st_net ) ) . where_b as * const _ as
202 usize } , 60usize , concat ! (
203 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
204 stringify ! ( where_b ) ));
205 assert_eq! (unsafe {
206 & ( * ( 0 as * const st_net ) ) . max_packet as * const _ as
207 usize } , 64usize , concat ! (
208 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
209 stringify ! ( max_packet ) ));
210 assert_eq! (unsafe {
211 & ( * ( 0 as * const st_net ) ) . max_packet_size as * const _
212 as usize } , 68usize , concat ! (
213 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
214 stringify ! ( max_packet_size ) ));
215 assert_eq! (unsafe {
216 & ( * ( 0 as * const st_net ) ) . pkt_nr as * const _ as usize
217 } , 72usize , concat ! (
218 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
219 stringify ! ( pkt_nr ) ));
220 assert_eq! (unsafe {
221 & ( * ( 0 as * const st_net ) ) . compress_pkt_nr as * const _
222 as usize } , 76usize , concat ! (
223 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
224 stringify ! ( compress_pkt_nr ) ));
225 assert_eq! (unsafe {
226 & ( * ( 0 as * const st_net ) ) . write_timeout as * const _
227 as usize } , 80usize , concat ! (
228 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
229 stringify ! ( write_timeout ) ));
230 assert_eq! (unsafe {
231 & ( * ( 0 as * const st_net ) ) . read_timeout as * const _ as
232 usize } , 84usize , concat ! (
233 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
234 stringify ! ( read_timeout ) ));
235 assert_eq! (unsafe {
236 & ( * ( 0 as * const st_net ) ) . retry_count as * const _ as
237 usize } , 88usize , concat ! (
238 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
239 stringify ! ( retry_count ) ));
240 assert_eq! (unsafe {
241 & ( * ( 0 as * const st_net ) ) . fcntl as * const _ as usize
242 } , 92usize , concat ! (
243 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
244 stringify ! ( fcntl ) ));
245 assert_eq! (unsafe {
246 & ( * ( 0 as * const st_net ) ) . return_status as * const _
247 as usize } , 96usize , concat ! (
248 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
249 stringify ! ( return_status ) ));
250 assert_eq! (unsafe {
251 & ( * ( 0 as * const st_net ) ) . reading_or_writing as *
252 const _ as usize } , 104usize , concat ! (
253 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
254 stringify ! ( reading_or_writing ) ));
255 assert_eq! (unsafe {
256 & ( * ( 0 as * const st_net ) ) . save_char as * const _ as
257 usize } , 105usize , concat ! (
258 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
259 stringify ! ( save_char ) ));
260 assert_eq! (unsafe {
261 & ( * ( 0 as * const st_net ) ) . unused1 as * const _ as
262 usize } , 106usize , concat ! (
263 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
264 stringify ! ( unused1 ) ));
265 assert_eq! (unsafe {
266 & ( * ( 0 as * const st_net ) ) . unused2 as * const _ as
267 usize } , 107usize , concat ! (
268 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
269 stringify ! ( unused2 ) ));
270 assert_eq! (unsafe {
271 & ( * ( 0 as * const st_net ) ) . compress as * const _ as
272 usize } , 108usize , concat ! (
273 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
274 stringify ! ( compress ) ));
275 assert_eq! (unsafe {
276 & ( * ( 0 as * const st_net ) ) . unused3 as * const _ as
277 usize } , 109usize , concat ! (
278 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
279 stringify ! ( unused3 ) ));
280 assert_eq! (unsafe {
281 & ( * ( 0 as * const st_net ) ) . unused as * const _ as usize
282 } , 112usize , concat ! (
283 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
284 stringify ! ( unused ) ));
285 assert_eq! (unsafe {
286 & ( * ( 0 as * const st_net ) ) . last_errno as * const _ as
287 usize } , 120usize , concat ! (
288 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
289 stringify ! ( last_errno ) ));
290 assert_eq! (unsafe {
291 & ( * ( 0 as * const st_net ) ) . error as * const _ as usize
292 } , 124usize , concat ! (
293 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
294 stringify ! ( error ) ));
295 assert_eq! (unsafe {
296 & ( * ( 0 as * const st_net ) ) . unused4 as * const _ as
297 usize } , 125usize , concat ! (
298 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
299 stringify ! ( unused4 ) ));
300 assert_eq! (unsafe {
301 & ( * ( 0 as * const st_net ) ) . unused5 as * const _ as
302 usize } , 126usize , concat ! (
303 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
304 stringify ! ( unused5 ) ));
305 assert_eq! (unsafe {
306 & ( * ( 0 as * const st_net ) ) . last_error as * const _ as
307 usize } , 127usize , concat ! (
308 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
309 stringify ! ( last_error ) ));
310 assert_eq! (unsafe {
311 & ( * ( 0 as * const st_net ) ) . sqlstate as * const _ as
312 usize } , 639usize , concat ! (
313 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
314 stringify ! ( sqlstate ) ));
315 assert_eq! (unsafe {
316 & ( * ( 0 as * const st_net ) ) . extension as * const _ as
317 usize } , 648usize , concat ! (
318 "Alignment of field: " , stringify ! ( st_net ) , "::" ,
319 stringify ! ( extension ) ));
320}
321pub type NET = st_net;
322#[repr(i32)]
323#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
324pub enum mysql_enum_shutdown_level {
325 SHUTDOWN_DEFAULT = 0,
326 SHUTDOWN_WAIT_CONNECTIONS = 1,
327 SHUTDOWN_WAIT_TRANSACTIONS = 2,
328 SHUTDOWN_WAIT_UPDATES = 8,
329 SHUTDOWN_WAIT_ALL_BUFFERS = 16,
330 SHUTDOWN_WAIT_CRITICAL_BUFFERS = 17,
331 KILL_QUERY = 254,
332 KILL_CONNECTION = 255,
333}
334#[repr(i32)]
335#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
336pub enum enum_mysql_set_option {
337 MYSQL_OPTION_MULTI_STATEMENTS_ON = 0,
338 MYSQL_OPTION_MULTI_STATEMENTS_OFF = 1,
339}
340#[repr(i32)]
341#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
342pub enum enum_session_state_type {
343 SESSION_TRACK_SYSTEM_VARIABLES = 0,
344 SESSION_TRACK_SCHEMA = 1,
345 SESSION_TRACK_STATE_CHANGE = 2,
346 SESSION_TRACK_GTIDS = 3,
347 SESSION_TRACK_TRANSACTION_CHARACTERISTICS = 4,
348 SESSION_TRACK_TRANSACTION_STATE = 5,
349}
350extern "C" {
351 pub fn mysql_errno_to_sqlstate(mysql_errno: ::std::os::raw::c_uint)
352 -> *const ::std::os::raw::c_char;
353}
354#[repr(i32)]
355#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
356pub enum enum_mysql_timestamp_type {
357 MYSQL_TIMESTAMP_NONE = -2,
358 MYSQL_TIMESTAMP_ERROR = -1,
359 MYSQL_TIMESTAMP_DATE = 0,
360 MYSQL_TIMESTAMP_DATETIME = 1,
361 MYSQL_TIMESTAMP_TIME = 2,
362}
363#[repr(C)]
364#[derive(Debug, Copy)]
365pub struct st_mysql_time {
366 pub year: ::std::os::raw::c_uint,
367 pub month: ::std::os::raw::c_uint,
368 pub day: ::std::os::raw::c_uint,
369 pub hour: ::std::os::raw::c_uint,
370 pub minute: ::std::os::raw::c_uint,
371 pub second: ::std::os::raw::c_uint,
372 pub second_part: ::std::os::raw::c_ulong,
374 pub neg: my_bool,
375 pub time_type: enum_mysql_timestamp_type,
376}
377#[test]
378fn bindgen_test_layout_st_mysql_time() {
379 assert_eq!(::std::mem::size_of::<st_mysql_time>() , 36usize , concat ! (
380 "Size of: " , stringify ! ( st_mysql_time ) ));
381 assert_eq! (::std::mem::align_of::<st_mysql_time>() , 4usize , concat ! (
382 "Alignment of " , stringify ! ( st_mysql_time ) ));
383 assert_eq! (unsafe {
384 & ( * ( 0 as * const st_mysql_time ) ) . year as * const _ as
385 usize } , 0usize , concat ! (
386 "Alignment of field: " , stringify ! ( st_mysql_time ) , "::"
387 , stringify ! ( year ) ));
388 assert_eq! (unsafe {
389 & ( * ( 0 as * const st_mysql_time ) ) . month as * const _ as
390 usize } , 4usize , concat ! (
391 "Alignment of field: " , stringify ! ( st_mysql_time ) , "::"
392 , stringify ! ( month ) ));
393 assert_eq! (unsafe {
394 & ( * ( 0 as * const st_mysql_time ) ) . day as * const _ as
395 usize } , 8usize , concat ! (
396 "Alignment of field: " , stringify ! ( st_mysql_time ) , "::"
397 , stringify ! ( day ) ));
398 assert_eq! (unsafe {
399 & ( * ( 0 as * const st_mysql_time ) ) . hour as * const _ as
400 usize } , 12usize , concat ! (
401 "Alignment of field: " , stringify ! ( st_mysql_time ) , "::"
402 , stringify ! ( hour ) ));
403 assert_eq! (unsafe {
404 & ( * ( 0 as * const st_mysql_time ) ) . minute as * const _
405 as usize } , 16usize , concat ! (
406 "Alignment of field: " , stringify ! ( st_mysql_time ) , "::"
407 , stringify ! ( minute ) ));
408 assert_eq! (unsafe {
409 & ( * ( 0 as * const st_mysql_time ) ) . second as * const _
410 as usize } , 20usize , concat ! (
411 "Alignment of field: " , stringify ! ( st_mysql_time ) , "::"
412 , stringify ! ( second ) ));
413 assert_eq! (unsafe {
414 & ( * ( 0 as * const st_mysql_time ) ) . second_part as *
415 const _ as usize } , 24usize , concat ! (
416 "Alignment of field: " , stringify ! ( st_mysql_time ) , "::"
417 , stringify ! ( second_part ) ));
418 assert_eq! (unsafe {
419 & ( * ( 0 as * const st_mysql_time ) ) . neg as * const _ as
420 usize } , 28usize , concat ! (
421 "Alignment of field: " , stringify ! ( st_mysql_time ) , "::"
422 , stringify ! ( neg ) ));
423 assert_eq! (unsafe {
424 & ( * ( 0 as * const st_mysql_time ) ) . time_type as * const
425 _ as usize } , 32usize , concat ! (
426 "Alignment of field: " , stringify ! ( st_mysql_time ) , "::"
427 , stringify ! ( time_type ) ));
428}
429impl Clone for st_mysql_time {
430 fn clone(&self) -> Self { *self }
431}
432pub type MYSQL_TIME = st_mysql_time;
433#[repr(C)]
434#[derive(Debug, Copy)]
435pub struct st_list {
436 pub prev: *mut st_list,
437 pub next: *mut st_list,
438 pub data: *mut ::std::os::raw::c_void,
439}
440#[test]
441fn bindgen_test_layout_st_list() {
442 assert_eq!(::std::mem::size_of::<st_list>() , 24usize , concat ! (
443 "Size of: " , stringify ! ( st_list ) ));
444 assert_eq! (::std::mem::align_of::<st_list>() , 8usize , concat ! (
445 "Alignment of " , stringify ! ( st_list ) ));
446 assert_eq! (unsafe {
447 & ( * ( 0 as * const st_list ) ) . prev as * const _ as usize
448 } , 0usize , concat ! (
449 "Alignment of field: " , stringify ! ( st_list ) , "::" ,
450 stringify ! ( prev ) ));
451 assert_eq! (unsafe {
452 & ( * ( 0 as * const st_list ) ) . next as * const _ as usize
453 } , 8usize , concat ! (
454 "Alignment of field: " , stringify ! ( st_list ) , "::" ,
455 stringify ! ( next ) ));
456 assert_eq! (unsafe {
457 & ( * ( 0 as * const st_list ) ) . data as * const _ as usize
458 } , 16usize , concat ! (
459 "Alignment of field: " , stringify ! ( st_list ) , "::" ,
460 stringify ! ( data ) ));
461}
462impl Clone for st_list {
463 fn clone(&self) -> Self { *self }
464}
465pub type LIST = st_list;
466#[repr(C)]
467#[derive(Debug, Copy)]
468pub struct st_mysql_client_plugin {
469 pub type_: ::std::os::raw::c_int,
470 pub interface_version: ::std::os::raw::c_uint,
471 pub name: *const ::std::os::raw::c_char,
472 pub author: *const ::std::os::raw::c_char,
473 pub desc: *const ::std::os::raw::c_char,
474 pub version: [::std::os::raw::c_uint; 3usize],
475 pub license: *const ::std::os::raw::c_char,
476 pub mysql_api: *mut ::std::os::raw::c_void,
477 pub init: ::std::option::Option<unsafe extern "C" fn(arg1:
478 *mut ::std::os::raw::c_char,
479 arg2: usize,
480 arg3:
481 ::std::os::raw::c_int,
482 arg4: va_list)
483 -> ::std::os::raw::c_int>,
484 pub deinit: ::std::option::Option<unsafe extern "C" fn()
485 -> ::std::os::raw::c_int>,
486 pub options: ::std::option::Option<unsafe extern "C" fn(option:
487 *const ::std::os::raw::c_char,
488 arg1:
489 *const ::std::os::raw::c_void)
490 -> ::std::os::raw::c_int>,
491}
492#[test]
493fn bindgen_test_layout_st_mysql_client_plugin() {
494 assert_eq!(::std::mem::size_of::<st_mysql_client_plugin>() , 88usize ,
495 concat ! ( "Size of: " , stringify ! ( st_mysql_client_plugin )
496 ));
497 assert_eq! (::std::mem::align_of::<st_mysql_client_plugin>() , 8usize ,
498 concat ! (
499 "Alignment of " , stringify ! ( st_mysql_client_plugin ) ));
500 assert_eq! (unsafe {
501 & ( * ( 0 as * const st_mysql_client_plugin ) ) . type_ as *
502 const _ as usize } , 0usize , concat ! (
503 "Alignment of field: " , stringify ! ( st_mysql_client_plugin
504 ) , "::" , stringify ! ( type_ ) ));
505 assert_eq! (unsafe {
506 & ( * ( 0 as * const st_mysql_client_plugin ) ) .
507 interface_version as * const _ as usize } , 4usize , concat !
508 (
509 "Alignment of field: " , stringify ! ( st_mysql_client_plugin
510 ) , "::" , stringify ! ( interface_version ) ));
511 assert_eq! (unsafe {
512 & ( * ( 0 as * const st_mysql_client_plugin ) ) . name as *
513 const _ as usize } , 8usize , concat ! (
514 "Alignment of field: " , stringify ! ( st_mysql_client_plugin
515 ) , "::" , stringify ! ( name ) ));
516 assert_eq! (unsafe {
517 & ( * ( 0 as * const st_mysql_client_plugin ) ) . author as *
518 const _ as usize } , 16usize , concat ! (
519 "Alignment of field: " , stringify ! ( st_mysql_client_plugin
520 ) , "::" , stringify ! ( author ) ));
521 assert_eq! (unsafe {
522 & ( * ( 0 as * const st_mysql_client_plugin ) ) . desc as *
523 const _ as usize } , 24usize , concat ! (
524 "Alignment of field: " , stringify ! ( st_mysql_client_plugin
525 ) , "::" , stringify ! ( desc ) ));
526 assert_eq! (unsafe {
527 & ( * ( 0 as * const st_mysql_client_plugin ) ) . version as *
528 const _ as usize } , 32usize , concat ! (
529 "Alignment of field: " , stringify ! ( st_mysql_client_plugin
530 ) , "::" , stringify ! ( version ) ));
531 assert_eq! (unsafe {
532 & ( * ( 0 as * const st_mysql_client_plugin ) ) . license as *
533 const _ as usize } , 48usize , concat ! (
534 "Alignment of field: " , stringify ! ( st_mysql_client_plugin
535 ) , "::" , stringify ! ( license ) ));
536 assert_eq! (unsafe {
537 & ( * ( 0 as * const st_mysql_client_plugin ) ) . mysql_api as
538 * const _ as usize } , 56usize , concat ! (
539 "Alignment of field: " , stringify ! ( st_mysql_client_plugin
540 ) , "::" , stringify ! ( mysql_api ) ));
541 assert_eq! (unsafe {
542 & ( * ( 0 as * const st_mysql_client_plugin ) ) . init as *
543 const _ as usize } , 64usize , concat ! (
544 "Alignment of field: " , stringify ! ( st_mysql_client_plugin
545 ) , "::" , stringify ! ( init ) ));
546 assert_eq! (unsafe {
547 & ( * ( 0 as * const st_mysql_client_plugin ) ) . deinit as *
548 const _ as usize } , 72usize , concat ! (
549 "Alignment of field: " , stringify ! ( st_mysql_client_plugin
550 ) , "::" , stringify ! ( deinit ) ));
551 assert_eq! (unsafe {
552 & ( * ( 0 as * const st_mysql_client_plugin ) ) . options as *
553 const _ as usize } , 80usize , concat ! (
554 "Alignment of field: " , stringify ! ( st_mysql_client_plugin
555 ) , "::" , stringify ! ( options ) ));
556}
557impl Clone for st_mysql_client_plugin {
558 fn clone(&self) -> Self { *self }
559}
560#[repr(C)]
561pub struct st_mysql {
562 pub net: NET,
563 pub connector_fd: *mut ::std::os::raw::c_uchar,
564 pub host: *mut ::std::os::raw::c_char,
565 pub user: *mut ::std::os::raw::c_char,
566 pub passwd: *mut ::std::os::raw::c_char,
567 pub unix_socket: *mut ::std::os::raw::c_char,
568 pub server_version: *mut ::std::os::raw::c_char,
569 pub host_info: *mut ::std::os::raw::c_char,
570 pub info: *mut ::std::os::raw::c_char,
571 pub db: *mut ::std::os::raw::c_char,
572 pub charset: *mut charset_info_st,
573 pub fields: *mut MYSQL_FIELD,
574 pub field_alloc: MEM_ROOT,
575 pub affected_rows: my_ulonglong,
576 pub insert_id: my_ulonglong,
577 pub extra_info: my_ulonglong,
578 pub thread_id: ::std::os::raw::c_ulong,
579 pub packet_length: ::std::os::raw::c_ulong,
580 pub port: ::std::os::raw::c_uint,
581 pub client_flag: ::std::os::raw::c_ulong,
582 pub server_capabilities: ::std::os::raw::c_ulong,
583 pub protocol_version: ::std::os::raw::c_uint,
584 pub field_count: ::std::os::raw::c_uint,
585 pub server_status: ::std::os::raw::c_uint,
586 pub server_language: ::std::os::raw::c_uint,
587 pub warning_count: ::std::os::raw::c_uint,
588 pub options: st_mysql_options,
589 pub status: mysql_status,
590 pub free_me: my_bool,
591 pub reconnect: my_bool,
592 pub scramble: [::std::os::raw::c_char; 21usize],
593 pub unused1: my_bool,
594 pub unused2: *mut ::std::os::raw::c_void,
595 pub unused3: *mut ::std::os::raw::c_void,
596 pub unused4: *mut ::std::os::raw::c_void,
597 pub unused5: *mut ::std::os::raw::c_void,
598 pub stmts: *mut LIST,
599 pub methods: *const st_mysql_methods,
600 pub thd: *mut ::std::os::raw::c_void,
601 pub unbuffered_fetch_owner: *mut my_bool,
602 pub info_buffer: *mut ::std::os::raw::c_char,
603 pub extension: *mut ::std::os::raw::c_void,
604}
605#[test]
606fn bindgen_test_layout_st_mysql() {
607 assert_eq!(::std::mem::size_of::<st_mysql>() , 1240usize , concat ! (
608 "Size of: " , stringify ! ( st_mysql ) ));
609 assert_eq! (::std::mem::align_of::<st_mysql>() , 8usize , concat ! (
610 "Alignment of " , stringify ! ( st_mysql ) ));
611 assert_eq! (unsafe {
612 & ( * ( 0 as * const st_mysql ) ) . net as * const _ as usize
613 } , 0usize , concat ! (
614 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
615 stringify ! ( net ) ));
616 assert_eq! (unsafe {
617 & ( * ( 0 as * const st_mysql ) ) . connector_fd as * const _
618 as usize } , 656usize , concat ! (
619 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
620 stringify ! ( connector_fd ) ));
621 assert_eq! (unsafe {
622 & ( * ( 0 as * const st_mysql ) ) . host as * const _ as usize
623 } , 664usize , concat ! (
624 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
625 stringify ! ( host ) ));
626 assert_eq! (unsafe {
627 & ( * ( 0 as * const st_mysql ) ) . user as * const _ as usize
628 } , 672usize , concat ! (
629 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
630 stringify ! ( user ) ));
631 assert_eq! (unsafe {
632 & ( * ( 0 as * const st_mysql ) ) . passwd as * const _ as
633 usize } , 680usize , concat ! (
634 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
635 stringify ! ( passwd ) ));
636 assert_eq! (unsafe {
637 & ( * ( 0 as * const st_mysql ) ) . unix_socket as * const _
638 as usize } , 688usize , concat ! (
639 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
640 stringify ! ( unix_socket ) ));
641 assert_eq! (unsafe {
642 & ( * ( 0 as * const st_mysql ) ) . server_version as * const
643 _ as usize } , 696usize , concat ! (
644 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
645 stringify ! ( server_version ) ));
646 assert_eq! (unsafe {
647 & ( * ( 0 as * const st_mysql ) ) . host_info as * const _ as
648 usize } , 704usize , concat ! (
649 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
650 stringify ! ( host_info ) ));
651 assert_eq! (unsafe {
652 & ( * ( 0 as * const st_mysql ) ) . info as * const _ as usize
653 } , 712usize , concat ! (
654 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
655 stringify ! ( info ) ));
656 assert_eq! (unsafe {
657 & ( * ( 0 as * const st_mysql ) ) . db as * const _ as usize }
658 , 720usize , concat ! (
659 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
660 stringify ! ( db ) ));
661 assert_eq! (unsafe {
662 & ( * ( 0 as * const st_mysql ) ) . charset as * const _ as
663 usize } , 728usize , concat ! (
664 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
665 stringify ! ( charset ) ));
666 assert_eq! (unsafe {
667 & ( * ( 0 as * const st_mysql ) ) . fields as * const _ as
668 usize } , 736usize , concat ! (
669 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
670 stringify ! ( fields ) ));
671 assert_eq! (unsafe {
672 & ( * ( 0 as * const st_mysql ) ) . field_alloc as * const _
673 as usize } , 744usize , concat ! (
674 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
675 stringify ! ( field_alloc ) ));
676 assert_eq! (unsafe {
677 & ( * ( 0 as * const st_mysql ) ) . affected_rows as * const _
678 as usize } , 832usize , concat ! (
679 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
680 stringify ! ( affected_rows ) ));
681 assert_eq! (unsafe {
682 & ( * ( 0 as * const st_mysql ) ) . insert_id as * const _ as
683 usize } , 840usize , concat ! (
684 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
685 stringify ! ( insert_id ) ));
686 assert_eq! (unsafe {
687 & ( * ( 0 as * const st_mysql ) ) . extra_info as * const _ as
688 usize } , 848usize , concat ! (
689 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
690 stringify ! ( extra_info ) ));
691 assert_eq! (unsafe {
692 & ( * ( 0 as * const st_mysql ) ) . thread_id as * const _ as
693 usize } , 856usize , concat ! (
694 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
695 stringify ! ( thread_id ) ));
696 assert_eq! (unsafe {
697 & ( * ( 0 as * const st_mysql ) ) . packet_length as * const _
698 as usize } , 860usize , concat ! (
699 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
700 stringify ! ( packet_length ) ));
701 assert_eq! (unsafe {
702 & ( * ( 0 as * const st_mysql ) ) . port as * const _ as usize
703 } , 864usize , concat ! (
704 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
705 stringify ! ( port ) ));
706 assert_eq! (unsafe {
707 & ( * ( 0 as * const st_mysql ) ) . client_flag as * const _
708 as usize } , 868usize , concat ! (
709 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
710 stringify ! ( client_flag ) ));
711 assert_eq! (unsafe {
712 & ( * ( 0 as * const st_mysql ) ) . server_capabilities as *
713 const _ as usize } , 872usize , concat ! (
714 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
715 stringify ! ( server_capabilities ) ));
716 assert_eq! (unsafe {
717 & ( * ( 0 as * const st_mysql ) ) . protocol_version as *
718 const _ as usize } , 876usize , concat ! (
719 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
720 stringify ! ( protocol_version ) ));
721 assert_eq! (unsafe {
722 & ( * ( 0 as * const st_mysql ) ) . field_count as * const _
723 as usize } , 880usize , concat ! (
724 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
725 stringify ! ( field_count ) ));
726 assert_eq! (unsafe {
727 & ( * ( 0 as * const st_mysql ) ) . server_status as * const _
728 as usize } , 884usize , concat ! (
729 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
730 stringify ! ( server_status ) ));
731 assert_eq! (unsafe {
732 & ( * ( 0 as * const st_mysql ) ) . server_language as * const
733 _ as usize } , 888usize , concat ! (
734 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
735 stringify ! ( server_language ) ));
736 assert_eq! (unsafe {
737 & ( * ( 0 as * const st_mysql ) ) . warning_count as * const _
738 as usize } , 892usize , concat ! (
739 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
740 stringify ! ( warning_count ) ));
741 assert_eq! (unsafe {
742 & ( * ( 0 as * const st_mysql ) ) . options as * const _ as
743 usize } , 896usize , concat ! (
744 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
745 stringify ! ( options ) ));
746 assert_eq! (unsafe {
747 & ( * ( 0 as * const st_mysql ) ) . status as * const _ as
748 usize } , 1128usize , concat ! (
749 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
750 stringify ! ( status ) ));
751 assert_eq! (unsafe {
752 & ( * ( 0 as * const st_mysql ) ) . free_me as * const _ as
753 usize } , 1132usize , concat ! (
754 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
755 stringify ! ( free_me ) ));
756 assert_eq! (unsafe {
757 & ( * ( 0 as * const st_mysql ) ) . reconnect as * const _ as
758 usize } , 1133usize , concat ! (
759 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
760 stringify ! ( reconnect ) ));
761 assert_eq! (unsafe {
762 & ( * ( 0 as * const st_mysql ) ) . scramble as * const _ as
763 usize } , 1134usize , concat ! (
764 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
765 stringify ! ( scramble ) ));
766 assert_eq! (unsafe {
767 & ( * ( 0 as * const st_mysql ) ) . unused1 as * const _ as
768 usize } , 1155usize , concat ! (
769 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
770 stringify ! ( unused1 ) ));
771 assert_eq! (unsafe {
772 & ( * ( 0 as * const st_mysql ) ) . unused2 as * const _ as
773 usize } , 1160usize , concat ! (
774 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
775 stringify ! ( unused2 ) ));
776 assert_eq! (unsafe {
777 & ( * ( 0 as * const st_mysql ) ) . unused3 as * const _ as
778 usize } , 1168usize , concat ! (
779 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
780 stringify ! ( unused3 ) ));
781 assert_eq! (unsafe {
782 & ( * ( 0 as * const st_mysql ) ) . unused4 as * const _ as
783 usize } , 1176usize , concat ! (
784 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
785 stringify ! ( unused4 ) ));
786 assert_eq! (unsafe {
787 & ( * ( 0 as * const st_mysql ) ) . unused5 as * const _ as
788 usize } , 1184usize , concat ! (
789 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
790 stringify ! ( unused5 ) ));
791 assert_eq! (unsafe {
792 & ( * ( 0 as * const st_mysql ) ) . stmts as * const _ as
793 usize } , 1192usize , concat ! (
794 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
795 stringify ! ( stmts ) ));
796 assert_eq! (unsafe {
797 & ( * ( 0 as * const st_mysql ) ) . methods as * const _ as
798 usize } , 1200usize , concat ! (
799 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
800 stringify ! ( methods ) ));
801 assert_eq! (unsafe {
802 & ( * ( 0 as * const st_mysql ) ) . thd as * const _ as usize
803 } , 1208usize , concat ! (
804 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
805 stringify ! ( thd ) ));
806 assert_eq! (unsafe {
807 & ( * ( 0 as * const st_mysql ) ) . unbuffered_fetch_owner as
808 * const _ as usize } , 1216usize , concat ! (
809 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
810 stringify ! ( unbuffered_fetch_owner ) ));
811 assert_eq! (unsafe {
812 & ( * ( 0 as * const st_mysql ) ) . info_buffer as * const _
813 as usize } , 1224usize , concat ! (
814 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
815 stringify ! ( info_buffer ) ));
816 assert_eq! (unsafe {
817 & ( * ( 0 as * const st_mysql ) ) . extension as * const _ as
818 usize } , 1232usize , concat ! (
819 "Alignment of field: " , stringify ! ( st_mysql ) , "::" ,
820 stringify ! ( extension ) ));
821}
822#[repr(C)]
823#[derive(Debug, Copy)]
824pub struct st_plugin_vio_info {
825 pub protocol: st_plugin_vio_info__bindgen_ty_1,
826 pub socket: ::std::os::raw::c_int,
828 pub handle: HANDLE,
830}
831pub const st_plugin_vio_info_MYSQL_VIO_INVALID:
832 st_plugin_vio_info__bindgen_ty_1 =
833 st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_INVALID;
834pub const st_plugin_vio_info_MYSQL_VIO_TCP: st_plugin_vio_info__bindgen_ty_1 =
835 st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_TCP;
836pub const st_plugin_vio_info_MYSQL_VIO_SOCKET:
837 st_plugin_vio_info__bindgen_ty_1 =
838 st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_SOCKET;
839pub const st_plugin_vio_info_MYSQL_VIO_PIPE: st_plugin_vio_info__bindgen_ty_1
840 =
841 st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_PIPE;
842pub const st_plugin_vio_info_MYSQL_VIO_MEMORY:
843 st_plugin_vio_info__bindgen_ty_1 =
844 st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_MEMORY;
845#[repr(i32)]
846#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
847pub enum st_plugin_vio_info__bindgen_ty_1 {
848 MYSQL_VIO_INVALID = 0,
849 MYSQL_VIO_TCP = 1,
850 MYSQL_VIO_SOCKET = 2,
851 MYSQL_VIO_PIPE = 3,
852 MYSQL_VIO_MEMORY = 4,
853}
854#[test]
855fn bindgen_test_layout_st_plugin_vio_info() {
856 assert_eq!(::std::mem::size_of::<st_plugin_vio_info>() , 16usize , concat
857 ! ( "Size of: " , stringify ! ( st_plugin_vio_info ) ));
858 assert_eq! (::std::mem::align_of::<st_plugin_vio_info>() , 8usize , concat
859 ! ( "Alignment of " , stringify ! ( st_plugin_vio_info ) ));
860 assert_eq! (unsafe {
861 & ( * ( 0 as * const st_plugin_vio_info ) ) . protocol as *
862 const _ as usize } , 0usize , concat ! (
863 "Alignment of field: " , stringify ! ( st_plugin_vio_info ) ,
864 "::" , stringify ! ( protocol ) ));
865 assert_eq! (unsafe {
866 & ( * ( 0 as * const st_plugin_vio_info ) ) . socket as *
867 const _ as usize } , 4usize , concat ! (
868 "Alignment of field: " , stringify ! ( st_plugin_vio_info ) ,
869 "::" , stringify ! ( socket ) ));
870 assert_eq! (unsafe {
871 & ( * ( 0 as * const st_plugin_vio_info ) ) . handle as *
872 const _ as usize } , 8usize , concat ! (
873 "Alignment of field: " , stringify ! ( st_plugin_vio_info ) ,
874 "::" , stringify ! ( handle ) ));
875}
876impl Clone for st_plugin_vio_info {
877 fn clone(&self) -> Self { *self }
878}
879pub type MYSQL_PLUGIN_VIO_INFO = st_plugin_vio_info;
880#[repr(C)]
884#[derive(Debug, Copy)]
885pub struct st_plugin_vio {
886 pub read_packet: ::std::option::Option<unsafe extern "C" fn(vio:
892 *mut st_plugin_vio,
893 buf:
894 *mut *mut ::std::os::raw::c_uchar)
895 -> ::std::os::raw::c_int>,
896 pub write_packet: ::std::option::Option<unsafe extern "C" fn(vio:
901 *mut st_plugin_vio,
902 packet:
903 *const ::std::os::raw::c_uchar,
904 packet_len:
905 ::std::os::raw::c_int)
906 -> ::std::os::raw::c_int>,
907 pub info: ::std::option::Option<unsafe extern "C" fn(vio:
912 *mut st_plugin_vio,
913 info:
914 *mut st_plugin_vio_info)>,
915}
916#[test]
917fn bindgen_test_layout_st_plugin_vio() {
918 assert_eq!(::std::mem::size_of::<st_plugin_vio>() , 24usize , concat ! (
919 "Size of: " , stringify ! ( st_plugin_vio ) ));
920 assert_eq! (::std::mem::align_of::<st_plugin_vio>() , 8usize , concat ! (
921 "Alignment of " , stringify ! ( st_plugin_vio ) ));
922 assert_eq! (unsafe {
923 & ( * ( 0 as * const st_plugin_vio ) ) . read_packet as *
924 const _ as usize } , 0usize , concat ! (
925 "Alignment of field: " , stringify ! ( st_plugin_vio ) , "::"
926 , stringify ! ( read_packet ) ));
927 assert_eq! (unsafe {
928 & ( * ( 0 as * const st_plugin_vio ) ) . write_packet as *
929 const _ as usize } , 8usize , concat ! (
930 "Alignment of field: " , stringify ! ( st_plugin_vio ) , "::"
931 , stringify ! ( write_packet ) ));
932 assert_eq! (unsafe {
933 & ( * ( 0 as * const st_plugin_vio ) ) . info as * const _ as
934 usize } , 16usize , concat ! (
935 "Alignment of field: " , stringify ! ( st_plugin_vio ) , "::"
936 , stringify ! ( info ) ));
937}
938impl Clone for st_plugin_vio {
939 fn clone(&self) -> Self { *self }
940}
941pub type MYSQL_PLUGIN_VIO = st_plugin_vio;
942extern "C" {
943 pub fn mysql_load_plugin(mysql: *mut st_mysql,
957 name: *const ::std::os::raw::c_char,
958 type_: ::std::os::raw::c_int,
959 argc: ::std::os::raw::c_int, ...)
960 -> *mut st_mysql_client_plugin;
961}
962extern "C" {
963 pub fn mysql_load_plugin_v(mysql: *mut st_mysql,
980 name: *const ::std::os::raw::c_char,
981 type_: ::std::os::raw::c_int,
982 argc: ::std::os::raw::c_int, args: va_list)
983 -> *mut st_mysql_client_plugin;
984}
985extern "C" {
986 pub fn mysql_client_find_plugin(mysql: *mut st_mysql,
997 name: *const ::std::os::raw::c_char,
998 type_: ::std::os::raw::c_int)
999 -> *mut st_mysql_client_plugin;
1000}
1001extern "C" {
1002 pub fn mysql_client_register_plugin(mysql: *mut st_mysql,
1017 plugin: *mut st_mysql_client_plugin)
1018 -> *mut st_mysql_client_plugin;
1019}
1020extern "C" {
1021 pub fn mysql_plugin_options(plugin: *mut st_mysql_client_plugin,
1034 option: *const ::std::os::raw::c_char,
1035 value: *const ::std::os::raw::c_void)
1036 -> ::std::os::raw::c_int;
1037}
1038#[repr(C)]
1039#[derive(Debug, Copy)]
1040pub struct st_mysql_field {
1041 pub name: *mut ::std::os::raw::c_char,
1042 pub org_name: *mut ::std::os::raw::c_char,
1043 pub table: *mut ::std::os::raw::c_char,
1044 pub org_table: *mut ::std::os::raw::c_char,
1045 pub db: *mut ::std::os::raw::c_char,
1046 pub catalog: *mut ::std::os::raw::c_char,
1047 pub def: *mut ::std::os::raw::c_char,
1048 pub length: ::std::os::raw::c_ulong,
1049 pub max_length: ::std::os::raw::c_ulong,
1050 pub name_length: ::std::os::raw::c_uint,
1051 pub org_name_length: ::std::os::raw::c_uint,
1052 pub table_length: ::std::os::raw::c_uint,
1053 pub org_table_length: ::std::os::raw::c_uint,
1054 pub db_length: ::std::os::raw::c_uint,
1055 pub catalog_length: ::std::os::raw::c_uint,
1056 pub def_length: ::std::os::raw::c_uint,
1057 pub flags: ::std::os::raw::c_uint,
1058 pub decimals: ::std::os::raw::c_uint,
1059 pub charsetnr: ::std::os::raw::c_uint,
1060 pub type_: enum_field_types,
1061 pub extension: *mut ::std::os::raw::c_void,
1062}
1063#[test]
1064fn bindgen_test_layout_st_mysql_field() {
1065 assert_eq!(::std::mem::size_of::<st_mysql_field>() , 120usize , concat ! (
1066 "Size of: " , stringify ! ( st_mysql_field ) ));
1067 assert_eq! (::std::mem::align_of::<st_mysql_field>() , 8usize , concat ! (
1068 "Alignment of " , stringify ! ( st_mysql_field ) ));
1069 assert_eq! (unsafe {
1070 & ( * ( 0 as * const st_mysql_field ) ) . name as * const _ as
1071 usize } , 0usize , concat ! (
1072 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1073 , stringify ! ( name ) ));
1074 assert_eq! (unsafe {
1075 & ( * ( 0 as * const st_mysql_field ) ) . org_name as * const
1076 _ as usize } , 8usize , concat ! (
1077 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1078 , stringify ! ( org_name ) ));
1079 assert_eq! (unsafe {
1080 & ( * ( 0 as * const st_mysql_field ) ) . table as * const _
1081 as usize } , 16usize , concat ! (
1082 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1083 , stringify ! ( table ) ));
1084 assert_eq! (unsafe {
1085 & ( * ( 0 as * const st_mysql_field ) ) . org_table as * const
1086 _ as usize } , 24usize , concat ! (
1087 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1088 , stringify ! ( org_table ) ));
1089 assert_eq! (unsafe {
1090 & ( * ( 0 as * const st_mysql_field ) ) . db as * const _ as
1091 usize } , 32usize , concat ! (
1092 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1093 , stringify ! ( db ) ));
1094 assert_eq! (unsafe {
1095 & ( * ( 0 as * const st_mysql_field ) ) . catalog as * const _
1096 as usize } , 40usize , concat ! (
1097 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1098 , stringify ! ( catalog ) ));
1099 assert_eq! (unsafe {
1100 & ( * ( 0 as * const st_mysql_field ) ) . def as * const _ as
1101 usize } , 48usize , concat ! (
1102 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1103 , stringify ! ( def ) ));
1104 assert_eq! (unsafe {
1105 & ( * ( 0 as * const st_mysql_field ) ) . length as * const _
1106 as usize } , 56usize , concat ! (
1107 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1108 , stringify ! ( length ) ));
1109 assert_eq! (unsafe {
1110 & ( * ( 0 as * const st_mysql_field ) ) . max_length as *
1111 const _ as usize } , 60usize , concat ! (
1112 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1113 , stringify ! ( max_length ) ));
1114 assert_eq! (unsafe {
1115 & ( * ( 0 as * const st_mysql_field ) ) . name_length as *
1116 const _ as usize } , 64usize , concat ! (
1117 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1118 , stringify ! ( name_length ) ));
1119 assert_eq! (unsafe {
1120 & ( * ( 0 as * const st_mysql_field ) ) . org_name_length as *
1121 const _ as usize } , 68usize , concat ! (
1122 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1123 , stringify ! ( org_name_length ) ));
1124 assert_eq! (unsafe {
1125 & ( * ( 0 as * const st_mysql_field ) ) . table_length as *
1126 const _ as usize } , 72usize , concat ! (
1127 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1128 , stringify ! ( table_length ) ));
1129 assert_eq! (unsafe {
1130 & ( * ( 0 as * const st_mysql_field ) ) . org_table_length as
1131 * const _ as usize } , 76usize , concat ! (
1132 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1133 , stringify ! ( org_table_length ) ));
1134 assert_eq! (unsafe {
1135 & ( * ( 0 as * const st_mysql_field ) ) . db_length as * const
1136 _ as usize } , 80usize , concat ! (
1137 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1138 , stringify ! ( db_length ) ));
1139 assert_eq! (unsafe {
1140 & ( * ( 0 as * const st_mysql_field ) ) . catalog_length as *
1141 const _ as usize } , 84usize , concat ! (
1142 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1143 , stringify ! ( catalog_length ) ));
1144 assert_eq! (unsafe {
1145 & ( * ( 0 as * const st_mysql_field ) ) . def_length as *
1146 const _ as usize } , 88usize , concat ! (
1147 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1148 , stringify ! ( def_length ) ));
1149 assert_eq! (unsafe {
1150 & ( * ( 0 as * const st_mysql_field ) ) . flags as * const _
1151 as usize } , 92usize , concat ! (
1152 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1153 , stringify ! ( flags ) ));
1154 assert_eq! (unsafe {
1155 & ( * ( 0 as * const st_mysql_field ) ) . decimals as * const
1156 _ as usize } , 96usize , concat ! (
1157 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1158 , stringify ! ( decimals ) ));
1159 assert_eq! (unsafe {
1160 & ( * ( 0 as * const st_mysql_field ) ) . charsetnr as * const
1161 _ as usize } , 100usize , concat ! (
1162 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1163 , stringify ! ( charsetnr ) ));
1164 assert_eq! (unsafe {
1165 & ( * ( 0 as * const st_mysql_field ) ) . type_ as * const _
1166 as usize } , 104usize , concat ! (
1167 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1168 , stringify ! ( type_ ) ));
1169 assert_eq! (unsafe {
1170 & ( * ( 0 as * const st_mysql_field ) ) . extension as * const
1171 _ as usize } , 112usize , concat ! (
1172 "Alignment of field: " , stringify ! ( st_mysql_field ) , "::"
1173 , stringify ! ( extension ) ));
1174}
1175impl Clone for st_mysql_field {
1176 fn clone(&self) -> Self { *self }
1177}
1178pub type MYSQL_FIELD = st_mysql_field;
1179pub type MYSQL_ROW = *mut *mut ::std::os::raw::c_char;
1180pub type MYSQL_FIELD_OFFSET = ::std::os::raw::c_uint;
1181pub type my_ulonglong = ::std::os::raw::c_ulonglong;
1182pub type PSI_memory_key = ::std::os::raw::c_uint;
1188#[repr(C)]
1189#[derive(Debug, Copy)]
1190pub struct st_used_mem {
1191 pub next: *mut st_used_mem,
1192 pub left: ::std::os::raw::c_uint,
1193 pub size: ::std::os::raw::c_uint,
1194}
1195#[test]
1196fn bindgen_test_layout_st_used_mem() {
1197 assert_eq!(::std::mem::size_of::<st_used_mem>() , 16usize , concat ! (
1198 "Size of: " , stringify ! ( st_used_mem ) ));
1199 assert_eq! (::std::mem::align_of::<st_used_mem>() , 8usize , concat ! (
1200 "Alignment of " , stringify ! ( st_used_mem ) ));
1201 assert_eq! (unsafe {
1202 & ( * ( 0 as * const st_used_mem ) ) . next as * const _ as
1203 usize } , 0usize , concat ! (
1204 "Alignment of field: " , stringify ! ( st_used_mem ) , "::" ,
1205 stringify ! ( next ) ));
1206 assert_eq! (unsafe {
1207 & ( * ( 0 as * const st_used_mem ) ) . left as * const _ as
1208 usize } , 8usize , concat ! (
1209 "Alignment of field: " , stringify ! ( st_used_mem ) , "::" ,
1210 stringify ! ( left ) ));
1211 assert_eq! (unsafe {
1212 & ( * ( 0 as * const st_used_mem ) ) . size as * const _ as
1213 usize } , 12usize , concat ! (
1214 "Alignment of field: " , stringify ! ( st_used_mem ) , "::" ,
1215 stringify ! ( size ) ));
1216}
1217impl Clone for st_used_mem {
1218 fn clone(&self) -> Self { *self }
1219}
1220pub type USED_MEM = st_used_mem;
1221#[repr(C)]
1222#[derive(Debug, Copy)]
1223pub struct st_mem_root {
1224 pub free: *mut USED_MEM,
1225 pub used: *mut USED_MEM,
1226 pub pre_alloc: *mut USED_MEM,
1227 pub min_malloc: usize,
1228 pub block_size: usize,
1229 pub block_num: ::std::os::raw::c_uint,
1230 pub first_block_usage: ::std::os::raw::c_uint,
1231 pub max_capacity: usize,
1232 pub allocated_size: usize,
1233 pub error_for_capacity_exceeded: my_bool,
1234 pub error_handler: ::std::option::Option<unsafe extern "C" fn()>,
1235 pub m_psi_key: PSI_memory_key,
1236}
1237#[test]
1238fn bindgen_test_layout_st_mem_root() {
1239 assert_eq!(::std::mem::size_of::<st_mem_root>() , 88usize , concat ! (
1240 "Size of: " , stringify ! ( st_mem_root ) ));
1241 assert_eq! (::std::mem::align_of::<st_mem_root>() , 8usize , concat ! (
1242 "Alignment of " , stringify ! ( st_mem_root ) ));
1243 assert_eq! (unsafe {
1244 & ( * ( 0 as * const st_mem_root ) ) . free as * const _ as
1245 usize } , 0usize , concat ! (
1246 "Alignment of field: " , stringify ! ( st_mem_root ) , "::" ,
1247 stringify ! ( free ) ));
1248 assert_eq! (unsafe {
1249 & ( * ( 0 as * const st_mem_root ) ) . used as * const _ as
1250 usize } , 8usize , concat ! (
1251 "Alignment of field: " , stringify ! ( st_mem_root ) , "::" ,
1252 stringify ! ( used ) ));
1253 assert_eq! (unsafe {
1254 & ( * ( 0 as * const st_mem_root ) ) . pre_alloc as * const _
1255 as usize } , 16usize , concat ! (
1256 "Alignment of field: " , stringify ! ( st_mem_root ) , "::" ,
1257 stringify ! ( pre_alloc ) ));
1258 assert_eq! (unsafe {
1259 & ( * ( 0 as * const st_mem_root ) ) . min_malloc as * const _
1260 as usize } , 24usize , concat ! (
1261 "Alignment of field: " , stringify ! ( st_mem_root ) , "::" ,
1262 stringify ! ( min_malloc ) ));
1263 assert_eq! (unsafe {
1264 & ( * ( 0 as * const st_mem_root ) ) . block_size as * const _
1265 as usize } , 32usize , concat ! (
1266 "Alignment of field: " , stringify ! ( st_mem_root ) , "::" ,
1267 stringify ! ( block_size ) ));
1268 assert_eq! (unsafe {
1269 & ( * ( 0 as * const st_mem_root ) ) . block_num as * const _
1270 as usize } , 40usize , concat ! (
1271 "Alignment of field: " , stringify ! ( st_mem_root ) , "::" ,
1272 stringify ! ( block_num ) ));
1273 assert_eq! (unsafe {
1274 & ( * ( 0 as * const st_mem_root ) ) . first_block_usage as *
1275 const _ as usize } , 44usize , concat ! (
1276 "Alignment of field: " , stringify ! ( st_mem_root ) , "::" ,
1277 stringify ! ( first_block_usage ) ));
1278 assert_eq! (unsafe {
1279 & ( * ( 0 as * const st_mem_root ) ) . max_capacity as * const
1280 _ as usize } , 48usize , concat ! (
1281 "Alignment of field: " , stringify ! ( st_mem_root ) , "::" ,
1282 stringify ! ( max_capacity ) ));
1283 assert_eq! (unsafe {
1284 & ( * ( 0 as * const st_mem_root ) ) . allocated_size as *
1285 const _ as usize } , 56usize , concat ! (
1286 "Alignment of field: " , stringify ! ( st_mem_root ) , "::" ,
1287 stringify ! ( allocated_size ) ));
1288 assert_eq! (unsafe {
1289 & ( * ( 0 as * const st_mem_root ) ) .
1290 error_for_capacity_exceeded as * const _ as usize } , 64usize
1291 , concat ! (
1292 "Alignment of field: " , stringify ! ( st_mem_root ) , "::" ,
1293 stringify ! ( error_for_capacity_exceeded ) ));
1294 assert_eq! (unsafe {
1295 & ( * ( 0 as * const st_mem_root ) ) . error_handler as *
1296 const _ as usize } , 72usize , concat ! (
1297 "Alignment of field: " , stringify ! ( st_mem_root ) , "::" ,
1298 stringify ! ( error_handler ) ));
1299 assert_eq! (unsafe {
1300 & ( * ( 0 as * const st_mem_root ) ) . m_psi_key as * const _
1301 as usize } , 80usize , concat ! (
1302 "Alignment of field: " , stringify ! ( st_mem_root ) , "::" ,
1303 stringify ! ( m_psi_key ) ));
1304}
1305impl Clone for st_mem_root {
1306 fn clone(&self) -> Self { *self }
1307}
1308pub type MEM_ROOT = st_mem_root;
1309#[repr(C)]
1310#[derive(Debug, Copy)]
1311pub struct st_mysql_rows {
1312 pub next: *mut st_mysql_rows,
1313 pub data: MYSQL_ROW,
1314 pub length: ::std::os::raw::c_ulong,
1315}
1316#[test]
1317fn bindgen_test_layout_st_mysql_rows() {
1318 assert_eq!(::std::mem::size_of::<st_mysql_rows>() , 24usize , concat ! (
1319 "Size of: " , stringify ! ( st_mysql_rows ) ));
1320 assert_eq! (::std::mem::align_of::<st_mysql_rows>() , 8usize , concat ! (
1321 "Alignment of " , stringify ! ( st_mysql_rows ) ));
1322 assert_eq! (unsafe {
1323 & ( * ( 0 as * const st_mysql_rows ) ) . next as * const _ as
1324 usize } , 0usize , concat ! (
1325 "Alignment of field: " , stringify ! ( st_mysql_rows ) , "::"
1326 , stringify ! ( next ) ));
1327 assert_eq! (unsafe {
1328 & ( * ( 0 as * const st_mysql_rows ) ) . data as * const _ as
1329 usize } , 8usize , concat ! (
1330 "Alignment of field: " , stringify ! ( st_mysql_rows ) , "::"
1331 , stringify ! ( data ) ));
1332 assert_eq! (unsafe {
1333 & ( * ( 0 as * const st_mysql_rows ) ) . length as * const _
1334 as usize } , 16usize , concat ! (
1335 "Alignment of field: " , stringify ! ( st_mysql_rows ) , "::"
1336 , stringify ! ( length ) ));
1337}
1338impl Clone for st_mysql_rows {
1339 fn clone(&self) -> Self { *self }
1340}
1341pub type MYSQL_ROWS = st_mysql_rows;
1342pub type MYSQL_ROW_OFFSET = *mut MYSQL_ROWS;
1343#[repr(C)]
1344#[derive(Debug, Copy, Clone)]
1345pub struct embedded_query_result {
1346 _unused: [u8; 0],
1347}
1348#[repr(C)]
1349#[derive(Debug, Copy)]
1350pub struct st_mysql_data {
1351 pub data: *mut MYSQL_ROWS,
1352 pub embedded_info: *mut embedded_query_result,
1353 pub alloc: MEM_ROOT,
1354 pub rows: my_ulonglong,
1355 pub fields: ::std::os::raw::c_uint,
1356 pub extension: *mut ::std::os::raw::c_void,
1357}
1358#[test]
1359fn bindgen_test_layout_st_mysql_data() {
1360 assert_eq!(::std::mem::size_of::<st_mysql_data>() , 128usize , concat ! (
1361 "Size of: " , stringify ! ( st_mysql_data ) ));
1362 assert_eq! (::std::mem::align_of::<st_mysql_data>() , 8usize , concat ! (
1363 "Alignment of " , stringify ! ( st_mysql_data ) ));
1364 assert_eq! (unsafe {
1365 & ( * ( 0 as * const st_mysql_data ) ) . data as * const _ as
1366 usize } , 0usize , concat ! (
1367 "Alignment of field: " , stringify ! ( st_mysql_data ) , "::"
1368 , stringify ! ( data ) ));
1369 assert_eq! (unsafe {
1370 & ( * ( 0 as * const st_mysql_data ) ) . embedded_info as *
1371 const _ as usize } , 8usize , concat ! (
1372 "Alignment of field: " , stringify ! ( st_mysql_data ) , "::"
1373 , stringify ! ( embedded_info ) ));
1374 assert_eq! (unsafe {
1375 & ( * ( 0 as * const st_mysql_data ) ) . alloc as * const _ as
1376 usize } , 16usize , concat ! (
1377 "Alignment of field: " , stringify ! ( st_mysql_data ) , "::"
1378 , stringify ! ( alloc ) ));
1379 assert_eq! (unsafe {
1380 & ( * ( 0 as * const st_mysql_data ) ) . rows as * const _ as
1381 usize } , 104usize , concat ! (
1382 "Alignment of field: " , stringify ! ( st_mysql_data ) , "::"
1383 , stringify ! ( rows ) ));
1384 assert_eq! (unsafe {
1385 & ( * ( 0 as * const st_mysql_data ) ) . fields as * const _
1386 as usize } , 112usize , concat ! (
1387 "Alignment of field: " , stringify ! ( st_mysql_data ) , "::"
1388 , stringify ! ( fields ) ));
1389 assert_eq! (unsafe {
1390 & ( * ( 0 as * const st_mysql_data ) ) . extension as * const
1391 _ as usize } , 120usize , concat ! (
1392 "Alignment of field: " , stringify ! ( st_mysql_data ) , "::"
1393 , stringify ! ( extension ) ));
1394}
1395impl Clone for st_mysql_data {
1396 fn clone(&self) -> Self { *self }
1397}
1398pub type MYSQL_DATA = st_mysql_data;
1399#[repr(i32)]
1400#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
1401pub enum mysql_option {
1402 MYSQL_OPT_CONNECT_TIMEOUT = 0,
1403 MYSQL_OPT_COMPRESS = 1,
1404 MYSQL_OPT_NAMED_PIPE = 2,
1405 MYSQL_INIT_COMMAND = 3,
1406 MYSQL_READ_DEFAULT_FILE = 4,
1407 MYSQL_READ_DEFAULT_GROUP = 5,
1408 MYSQL_SET_CHARSET_DIR = 6,
1409 MYSQL_SET_CHARSET_NAME = 7,
1410 MYSQL_OPT_LOCAL_INFILE = 8,
1411 MYSQL_OPT_PROTOCOL = 9,
1412 MYSQL_SHARED_MEMORY_BASE_NAME = 10,
1413 MYSQL_OPT_READ_TIMEOUT = 11,
1414 MYSQL_OPT_WRITE_TIMEOUT = 12,
1415 MYSQL_OPT_USE_RESULT = 13,
1416 MYSQL_OPT_USE_REMOTE_CONNECTION = 14,
1417 MYSQL_OPT_USE_EMBEDDED_CONNECTION = 15,
1418 MYSQL_OPT_GUESS_CONNECTION = 16,
1419 MYSQL_SET_CLIENT_IP = 17,
1420 MYSQL_SECURE_AUTH = 18,
1421 MYSQL_REPORT_DATA_TRUNCATION = 19,
1422 MYSQL_OPT_RECONNECT = 20,
1423 MYSQL_OPT_SSL_VERIFY_SERVER_CERT = 21,
1424 MYSQL_PLUGIN_DIR = 22,
1425 MYSQL_DEFAULT_AUTH = 23,
1426 MYSQL_OPT_BIND = 24,
1427 MYSQL_OPT_SSL_KEY = 25,
1428 MYSQL_OPT_SSL_CERT = 26,
1429 MYSQL_OPT_SSL_CA = 27,
1430 MYSQL_OPT_SSL_CAPATH = 28,
1431 MYSQL_OPT_SSL_CIPHER = 29,
1432 MYSQL_OPT_SSL_CRL = 30,
1433 MYSQL_OPT_SSL_CRLPATH = 31,
1434 MYSQL_OPT_CONNECT_ATTR_RESET = 32,
1435 MYSQL_OPT_CONNECT_ATTR_ADD = 33,
1436 MYSQL_OPT_CONNECT_ATTR_DELETE = 34,
1437 MYSQL_SERVER_PUBLIC_KEY = 35,
1438 MYSQL_ENABLE_CLEARTEXT_PLUGIN = 36,
1439 MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS = 37,
1440 MYSQL_OPT_SSL_ENFORCE = 38,
1441 MYSQL_OPT_MAX_ALLOWED_PACKET = 39,
1442 MYSQL_OPT_NET_BUFFER_LENGTH = 40,
1443 MYSQL_OPT_TLS_VERSION = 41,
1444 MYSQL_OPT_SSL_MODE = 42,
1445}
1446#[repr(C)]
1447#[derive(Debug, Copy, Clone)]
1448pub struct st_mysql_options_extention {
1449 _unused: [u8; 0],
1450}
1451#[repr(C)]
1452#[derive(Debug, Copy)]
1453pub struct st_mysql_options {
1454 pub connect_timeout: ::std::os::raw::c_uint,
1455 pub read_timeout: ::std::os::raw::c_uint,
1456 pub write_timeout: ::std::os::raw::c_uint,
1457 pub port: ::std::os::raw::c_uint,
1458 pub protocol: ::std::os::raw::c_uint,
1459 pub client_flag: ::std::os::raw::c_ulong,
1460 pub host: *mut ::std::os::raw::c_char,
1461 pub user: *mut ::std::os::raw::c_char,
1462 pub password: *mut ::std::os::raw::c_char,
1463 pub unix_socket: *mut ::std::os::raw::c_char,
1464 pub db: *mut ::std::os::raw::c_char,
1465 pub init_commands: *mut st_dynamic_array,
1466 pub my_cnf_file: *mut ::std::os::raw::c_char,
1467 pub my_cnf_group: *mut ::std::os::raw::c_char,
1468 pub charset_dir: *mut ::std::os::raw::c_char,
1469 pub charset_name: *mut ::std::os::raw::c_char,
1470 pub ssl_key: *mut ::std::os::raw::c_char,
1471 pub ssl_cert: *mut ::std::os::raw::c_char,
1472 pub ssl_ca: *mut ::std::os::raw::c_char,
1473 pub ssl_capath: *mut ::std::os::raw::c_char,
1474 pub ssl_cipher: *mut ::std::os::raw::c_char,
1475 pub shared_memory_base_name: *mut ::std::os::raw::c_char,
1476 pub max_allowed_packet: ::std::os::raw::c_ulong,
1477 pub use_ssl: my_bool,
1478 pub compress: my_bool,
1479 pub named_pipe: my_bool,
1480 pub unused1: my_bool,
1481 pub unused2: my_bool,
1482 pub unused3: my_bool,
1483 pub unused4: my_bool,
1484 pub methods_to_use: mysql_option,
1485 pub ci: st_mysql_options__bindgen_ty_1,
1486 pub unused5: my_bool,
1487 pub report_data_truncation: my_bool,
1488 pub local_infile_init: ::std::option::Option<unsafe extern "C" fn(arg1:
1489 *mut *mut ::std::os::raw::c_void,
1490 arg2:
1491 *const ::std::os::raw::c_char,
1492 arg3:
1493 *mut ::std::os::raw::c_void)
1494 ->
1495 ::std::os::raw::c_int>,
1496 pub local_infile_read: ::std::option::Option<unsafe extern "C" fn(arg1:
1497 *mut ::std::os::raw::c_void,
1498 arg2:
1499 *mut ::std::os::raw::c_char,
1500 arg3:
1501 ::std::os::raw::c_uint)
1502 ->
1503 ::std::os::raw::c_int>,
1504 pub local_infile_end: ::std::option::Option<unsafe extern "C" fn(arg1:
1505 *mut ::std::os::raw::c_void)>,
1506 pub local_infile_error: ::std::option::Option<unsafe extern "C" fn(arg1:
1507 *mut ::std::os::raw::c_void,
1508 arg2:
1509 *mut ::std::os::raw::c_char,
1510 arg3:
1511 ::std::os::raw::c_uint)
1512 ->
1513 ::std::os::raw::c_int>,
1514 pub local_infile_userdata: *mut ::std::os::raw::c_void,
1515 pub extension: *mut st_mysql_options_extention,
1516}
1517#[repr(C)]
1518#[derive(Debug, Copy)]
1519pub struct st_mysql_options__bindgen_ty_1 {
1520 pub client_ip: __BindgenUnionField<*mut ::std::os::raw::c_char>,
1521 pub bind_address: __BindgenUnionField<*mut ::std::os::raw::c_char>,
1522 pub bindgen_union_field: u64,
1523}
1524#[test]
1525fn bindgen_test_layout_st_mysql_options__bindgen_ty_1() {
1526 assert_eq!(::std::mem::size_of::<st_mysql_options__bindgen_ty_1>() ,
1527 8usize , concat ! (
1528 "Size of: " , stringify ! ( st_mysql_options__bindgen_ty_1 )
1529 ));
1530 assert_eq! (::std::mem::align_of::<st_mysql_options__bindgen_ty_1>() ,
1531 8usize , concat ! (
1532 "Alignment of " , stringify ! ( st_mysql_options__bindgen_ty_1
1533 ) ));
1534 assert_eq! (unsafe {
1535 & ( * ( 0 as * const st_mysql_options__bindgen_ty_1 ) ) .
1536 client_ip as * const _ as usize } , 0usize , concat ! (
1537 "Alignment of field: " , stringify ! (
1538 st_mysql_options__bindgen_ty_1 ) , "::" , stringify ! (
1539 client_ip ) ));
1540 assert_eq! (unsafe {
1541 & ( * ( 0 as * const st_mysql_options__bindgen_ty_1 ) ) .
1542 bind_address as * const _ as usize } , 0usize , concat ! (
1543 "Alignment of field: " , stringify ! (
1544 st_mysql_options__bindgen_ty_1 ) , "::" , stringify ! (
1545 bind_address ) ));
1546}
1547impl Clone for st_mysql_options__bindgen_ty_1 {
1548 fn clone(&self) -> Self { *self }
1549}
1550#[test]
1551fn bindgen_test_layout_st_mysql_options() {
1552 assert_eq!(::std::mem::size_of::<st_mysql_options>() , 232usize , concat !
1553 ( "Size of: " , stringify ! ( st_mysql_options ) ));
1554 assert_eq! (::std::mem::align_of::<st_mysql_options>() , 8usize , concat !
1555 ( "Alignment of " , stringify ! ( st_mysql_options ) ));
1556 assert_eq! (unsafe {
1557 & ( * ( 0 as * const st_mysql_options ) ) . connect_timeout as
1558 * const _ as usize } , 0usize , concat ! (
1559 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1560 "::" , stringify ! ( connect_timeout ) ));
1561 assert_eq! (unsafe {
1562 & ( * ( 0 as * const st_mysql_options ) ) . read_timeout as *
1563 const _ as usize } , 4usize , concat ! (
1564 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1565 "::" , stringify ! ( read_timeout ) ));
1566 assert_eq! (unsafe {
1567 & ( * ( 0 as * const st_mysql_options ) ) . write_timeout as *
1568 const _ as usize } , 8usize , concat ! (
1569 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1570 "::" , stringify ! ( write_timeout ) ));
1571 assert_eq! (unsafe {
1572 & ( * ( 0 as * const st_mysql_options ) ) . port as * const _
1573 as usize } , 12usize , concat ! (
1574 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1575 "::" , stringify ! ( port ) ));
1576 assert_eq! (unsafe {
1577 & ( * ( 0 as * const st_mysql_options ) ) . protocol as *
1578 const _ as usize } , 16usize , concat ! (
1579 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1580 "::" , stringify ! ( protocol ) ));
1581 assert_eq! (unsafe {
1582 & ( * ( 0 as * const st_mysql_options ) ) . client_flag as *
1583 const _ as usize } , 20usize , concat ! (
1584 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1585 "::" , stringify ! ( client_flag ) ));
1586 assert_eq! (unsafe {
1587 & ( * ( 0 as * const st_mysql_options ) ) . host as * const _
1588 as usize } , 24usize , concat ! (
1589 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1590 "::" , stringify ! ( host ) ));
1591 assert_eq! (unsafe {
1592 & ( * ( 0 as * const st_mysql_options ) ) . user as * const _
1593 as usize } , 32usize , concat ! (
1594 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1595 "::" , stringify ! ( user ) ));
1596 assert_eq! (unsafe {
1597 & ( * ( 0 as * const st_mysql_options ) ) . password as *
1598 const _ as usize } , 40usize , concat ! (
1599 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1600 "::" , stringify ! ( password ) ));
1601 assert_eq! (unsafe {
1602 & ( * ( 0 as * const st_mysql_options ) ) . unix_socket as *
1603 const _ as usize } , 48usize , concat ! (
1604 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1605 "::" , stringify ! ( unix_socket ) ));
1606 assert_eq! (unsafe {
1607 & ( * ( 0 as * const st_mysql_options ) ) . db as * const _ as
1608 usize } , 56usize , concat ! (
1609 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1610 "::" , stringify ! ( db ) ));
1611 assert_eq! (unsafe {
1612 & ( * ( 0 as * const st_mysql_options ) ) . init_commands as *
1613 const _ as usize } , 64usize , concat ! (
1614 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1615 "::" , stringify ! ( init_commands ) ));
1616 assert_eq! (unsafe {
1617 & ( * ( 0 as * const st_mysql_options ) ) . my_cnf_file as *
1618 const _ as usize } , 72usize , concat ! (
1619 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1620 "::" , stringify ! ( my_cnf_file ) ));
1621 assert_eq! (unsafe {
1622 & ( * ( 0 as * const st_mysql_options ) ) . my_cnf_group as *
1623 const _ as usize } , 80usize , concat ! (
1624 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1625 "::" , stringify ! ( my_cnf_group ) ));
1626 assert_eq! (unsafe {
1627 & ( * ( 0 as * const st_mysql_options ) ) . charset_dir as *
1628 const _ as usize } , 88usize , concat ! (
1629 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1630 "::" , stringify ! ( charset_dir ) ));
1631 assert_eq! (unsafe {
1632 & ( * ( 0 as * const st_mysql_options ) ) . charset_name as *
1633 const _ as usize } , 96usize , concat ! (
1634 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1635 "::" , stringify ! ( charset_name ) ));
1636 assert_eq! (unsafe {
1637 & ( * ( 0 as * const st_mysql_options ) ) . ssl_key as * const
1638 _ as usize } , 104usize , concat ! (
1639 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1640 "::" , stringify ! ( ssl_key ) ));
1641 assert_eq! (unsafe {
1642 & ( * ( 0 as * const st_mysql_options ) ) . ssl_cert as *
1643 const _ as usize } , 112usize , concat ! (
1644 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1645 "::" , stringify ! ( ssl_cert ) ));
1646 assert_eq! (unsafe {
1647 & ( * ( 0 as * const st_mysql_options ) ) . ssl_ca as * const
1648 _ as usize } , 120usize , concat ! (
1649 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1650 "::" , stringify ! ( ssl_ca ) ));
1651 assert_eq! (unsafe {
1652 & ( * ( 0 as * const st_mysql_options ) ) . ssl_capath as *
1653 const _ as usize } , 128usize , concat ! (
1654 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1655 "::" , stringify ! ( ssl_capath ) ));
1656 assert_eq! (unsafe {
1657 & ( * ( 0 as * const st_mysql_options ) ) . ssl_cipher as *
1658 const _ as usize } , 136usize , concat ! (
1659 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1660 "::" , stringify ! ( ssl_cipher ) ));
1661 assert_eq! (unsafe {
1662 & ( * ( 0 as * const st_mysql_options ) ) .
1663 shared_memory_base_name as * const _ as usize } , 144usize ,
1664 concat ! (
1665 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1666 "::" , stringify ! ( shared_memory_base_name ) ));
1667 assert_eq! (unsafe {
1668 & ( * ( 0 as * const st_mysql_options ) ) . max_allowed_packet
1669 as * const _ as usize } , 152usize , concat ! (
1670 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1671 "::" , stringify ! ( max_allowed_packet ) ));
1672 assert_eq! (unsafe {
1673 & ( * ( 0 as * const st_mysql_options ) ) . use_ssl as * const
1674 _ as usize } , 156usize , concat ! (
1675 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1676 "::" , stringify ! ( use_ssl ) ));
1677 assert_eq! (unsafe {
1678 & ( * ( 0 as * const st_mysql_options ) ) . compress as *
1679 const _ as usize } , 157usize , concat ! (
1680 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1681 "::" , stringify ! ( compress ) ));
1682 assert_eq! (unsafe {
1683 & ( * ( 0 as * const st_mysql_options ) ) . named_pipe as *
1684 const _ as usize } , 158usize , concat ! (
1685 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1686 "::" , stringify ! ( named_pipe ) ));
1687 assert_eq! (unsafe {
1688 & ( * ( 0 as * const st_mysql_options ) ) . unused1 as * const
1689 _ as usize } , 159usize , concat ! (
1690 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1691 "::" , stringify ! ( unused1 ) ));
1692 assert_eq! (unsafe {
1693 & ( * ( 0 as * const st_mysql_options ) ) . unused2 as * const
1694 _ as usize } , 160usize , concat ! (
1695 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1696 "::" , stringify ! ( unused2 ) ));
1697 assert_eq! (unsafe {
1698 & ( * ( 0 as * const st_mysql_options ) ) . unused3 as * const
1699 _ as usize } , 161usize , concat ! (
1700 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1701 "::" , stringify ! ( unused3 ) ));
1702 assert_eq! (unsafe {
1703 & ( * ( 0 as * const st_mysql_options ) ) . unused4 as * const
1704 _ as usize } , 162usize , concat ! (
1705 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1706 "::" , stringify ! ( unused4 ) ));
1707 assert_eq! (unsafe {
1708 & ( * ( 0 as * const st_mysql_options ) ) . methods_to_use as
1709 * const _ as usize } , 164usize , concat ! (
1710 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1711 "::" , stringify ! ( methods_to_use ) ));
1712 assert_eq! (unsafe {
1713 & ( * ( 0 as * const st_mysql_options ) ) . ci as * const _ as
1714 usize } , 168usize , concat ! (
1715 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1716 "::" , stringify ! ( ci ) ));
1717 assert_eq! (unsafe {
1718 & ( * ( 0 as * const st_mysql_options ) ) . unused5 as * const
1719 _ as usize } , 176usize , concat ! (
1720 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1721 "::" , stringify ! ( unused5 ) ));
1722 assert_eq! (unsafe {
1723 & ( * ( 0 as * const st_mysql_options ) ) .
1724 report_data_truncation as * const _ as usize } , 177usize ,
1725 concat ! (
1726 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1727 "::" , stringify ! ( report_data_truncation ) ));
1728 assert_eq! (unsafe {
1729 & ( * ( 0 as * const st_mysql_options ) ) . local_infile_init
1730 as * const _ as usize } , 184usize , concat ! (
1731 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1732 "::" , stringify ! ( local_infile_init ) ));
1733 assert_eq! (unsafe {
1734 & ( * ( 0 as * const st_mysql_options ) ) . local_infile_read
1735 as * const _ as usize } , 192usize , concat ! (
1736 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1737 "::" , stringify ! ( local_infile_read ) ));
1738 assert_eq! (unsafe {
1739 & ( * ( 0 as * const st_mysql_options ) ) . local_infile_end
1740 as * const _ as usize } , 200usize , concat ! (
1741 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1742 "::" , stringify ! ( local_infile_end ) ));
1743 assert_eq! (unsafe {
1744 & ( * ( 0 as * const st_mysql_options ) ) . local_infile_error
1745 as * const _ as usize } , 208usize , concat ! (
1746 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1747 "::" , stringify ! ( local_infile_error ) ));
1748 assert_eq! (unsafe {
1749 & ( * ( 0 as * const st_mysql_options ) ) .
1750 local_infile_userdata as * const _ as usize } , 216usize ,
1751 concat ! (
1752 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1753 "::" , stringify ! ( local_infile_userdata ) ));
1754 assert_eq! (unsafe {
1755 & ( * ( 0 as * const st_mysql_options ) ) . extension as *
1756 const _ as usize } , 224usize , concat ! (
1757 "Alignment of field: " , stringify ! ( st_mysql_options ) ,
1758 "::" , stringify ! ( extension ) ));
1759}
1760impl Clone for st_mysql_options {
1761 fn clone(&self) -> Self { *self }
1762}
1763#[repr(i32)]
1764#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
1765pub enum mysql_status {
1766 MYSQL_STATUS_READY = 0,
1767 MYSQL_STATUS_GET_RESULT = 1,
1768 MYSQL_STATUS_USE_RESULT = 2,
1769 MYSQL_STATUS_STATEMENT_GET_RESULT = 3,
1770}
1771#[repr(i32)]
1772#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
1773pub enum mysql_ssl_mode {
1774 SSL_MODE_DISABLED = 1,
1775 SSL_MODE_PREFERRED = 2,
1776 SSL_MODE_REQUIRED = 3,
1777 SSL_MODE_VERIFY_CA = 4,
1778 SSL_MODE_VERIFY_IDENTITY = 5,
1779}
1780#[repr(C)]
1781#[derive(Debug, Copy)]
1782pub struct character_set {
1783 pub number: ::std::os::raw::c_uint,
1784 pub state: ::std::os::raw::c_uint,
1785 pub csname: *const ::std::os::raw::c_char,
1786 pub name: *const ::std::os::raw::c_char,
1787 pub comment: *const ::std::os::raw::c_char,
1788 pub dir: *const ::std::os::raw::c_char,
1789 pub mbminlen: ::std::os::raw::c_uint,
1790 pub mbmaxlen: ::std::os::raw::c_uint,
1791}
1792#[test]
1793fn bindgen_test_layout_character_set() {
1794 assert_eq!(::std::mem::size_of::<character_set>() , 48usize , concat ! (
1795 "Size of: " , stringify ! ( character_set ) ));
1796 assert_eq! (::std::mem::align_of::<character_set>() , 8usize , concat ! (
1797 "Alignment of " , stringify ! ( character_set ) ));
1798 assert_eq! (unsafe {
1799 & ( * ( 0 as * const character_set ) ) . number as * const _
1800 as usize } , 0usize , concat ! (
1801 "Alignment of field: " , stringify ! ( character_set ) , "::"
1802 , stringify ! ( number ) ));
1803 assert_eq! (unsafe {
1804 & ( * ( 0 as * const character_set ) ) . state as * const _ as
1805 usize } , 4usize , concat ! (
1806 "Alignment of field: " , stringify ! ( character_set ) , "::"
1807 , stringify ! ( state ) ));
1808 assert_eq! (unsafe {
1809 & ( * ( 0 as * const character_set ) ) . csname as * const _
1810 as usize } , 8usize , concat ! (
1811 "Alignment of field: " , stringify ! ( character_set ) , "::"
1812 , stringify ! ( csname ) ));
1813 assert_eq! (unsafe {
1814 & ( * ( 0 as * const character_set ) ) . name as * const _ as
1815 usize } , 16usize , concat ! (
1816 "Alignment of field: " , stringify ! ( character_set ) , "::"
1817 , stringify ! ( name ) ));
1818 assert_eq! (unsafe {
1819 & ( * ( 0 as * const character_set ) ) . comment as * const _
1820 as usize } , 24usize , concat ! (
1821 "Alignment of field: " , stringify ! ( character_set ) , "::"
1822 , stringify ! ( comment ) ));
1823 assert_eq! (unsafe {
1824 & ( * ( 0 as * const character_set ) ) . dir as * const _ as
1825 usize } , 32usize , concat ! (
1826 "Alignment of field: " , stringify ! ( character_set ) , "::"
1827 , stringify ! ( dir ) ));
1828 assert_eq! (unsafe {
1829 & ( * ( 0 as * const character_set ) ) . mbminlen as * const _
1830 as usize } , 40usize , concat ! (
1831 "Alignment of field: " , stringify ! ( character_set ) , "::"
1832 , stringify ! ( mbminlen ) ));
1833 assert_eq! (unsafe {
1834 & ( * ( 0 as * const character_set ) ) . mbmaxlen as * const _
1835 as usize } , 44usize , concat ! (
1836 "Alignment of field: " , stringify ! ( character_set ) , "::"
1837 , stringify ! ( mbmaxlen ) ));
1838}
1839impl Clone for character_set {
1840 fn clone(&self) -> Self { *self }
1841}
1842pub type MY_CHARSET_INFO = character_set;
1843#[repr(C)]
1844#[derive(Debug, Copy, Clone)]
1845pub struct st_mysql_methods {
1846 _unused: [u8; 0],
1847}
1848#[repr(C)]
1849pub struct st_mysql_stmt {
1850 pub mem_root: MEM_ROOT,
1851 pub list: LIST,
1852 pub mysql: *mut MYSQL,
1853 pub params: *mut MYSQL_BIND,
1854 pub bind: *mut MYSQL_BIND,
1855 pub fields: *mut MYSQL_FIELD,
1856 pub result: MYSQL_DATA,
1857 pub data_cursor: *mut MYSQL_ROWS,
1858 pub read_row_func: ::std::option::Option<unsafe extern "C" fn(stmt:
1859 *mut st_mysql_stmt,
1860 row:
1861 *mut *mut ::std::os::raw::c_uchar)
1862 -> ::std::os::raw::c_int>,
1863 pub affected_rows: my_ulonglong,
1864 pub insert_id: my_ulonglong,
1865 pub stmt_id: ::std::os::raw::c_ulong,
1866 pub flags: ::std::os::raw::c_ulong,
1867 pub prefetch_rows: ::std::os::raw::c_ulong,
1868 pub server_status: ::std::os::raw::c_uint,
1869 pub last_errno: ::std::os::raw::c_uint,
1870 pub param_count: ::std::os::raw::c_uint,
1871 pub field_count: ::std::os::raw::c_uint,
1872 pub state: enum_mysql_stmt_state,
1873 pub last_error: [::std::os::raw::c_char; 512usize],
1874 pub sqlstate: [::std::os::raw::c_char; 6usize],
1875 pub send_types_to_server: my_bool,
1876 pub bind_param_done: my_bool,
1877 pub bind_result_done: ::std::os::raw::c_uchar,
1878 pub unbuffered_fetch_cancelled: my_bool,
1879 pub update_max_length: my_bool,
1880 pub extension: *mut st_mysql_stmt_extension,
1881}
1882#[test]
1883fn bindgen_test_layout_st_mysql_stmt() {
1884 assert_eq!(::std::mem::size_of::<st_mysql_stmt>() , 872usize , concat ! (
1885 "Size of: " , stringify ! ( st_mysql_stmt ) ));
1886 assert_eq! (::std::mem::align_of::<st_mysql_stmt>() , 8usize , concat ! (
1887 "Alignment of " , stringify ! ( st_mysql_stmt ) ));
1888 assert_eq! (unsafe {
1889 & ( * ( 0 as * const st_mysql_stmt ) ) . mem_root as * const _
1890 as usize } , 0usize , concat ! (
1891 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1892 , stringify ! ( mem_root ) ));
1893 assert_eq! (unsafe {
1894 & ( * ( 0 as * const st_mysql_stmt ) ) . list as * const _ as
1895 usize } , 88usize , concat ! (
1896 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1897 , stringify ! ( list ) ));
1898 assert_eq! (unsafe {
1899 & ( * ( 0 as * const st_mysql_stmt ) ) . mysql as * const _ as
1900 usize } , 112usize , concat ! (
1901 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1902 , stringify ! ( mysql ) ));
1903 assert_eq! (unsafe {
1904 & ( * ( 0 as * const st_mysql_stmt ) ) . params as * const _
1905 as usize } , 120usize , concat ! (
1906 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1907 , stringify ! ( params ) ));
1908 assert_eq! (unsafe {
1909 & ( * ( 0 as * const st_mysql_stmt ) ) . bind as * const _ as
1910 usize } , 128usize , concat ! (
1911 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1912 , stringify ! ( bind ) ));
1913 assert_eq! (unsafe {
1914 & ( * ( 0 as * const st_mysql_stmt ) ) . fields as * const _
1915 as usize } , 136usize , concat ! (
1916 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1917 , stringify ! ( fields ) ));
1918 assert_eq! (unsafe {
1919 & ( * ( 0 as * const st_mysql_stmt ) ) . result as * const _
1920 as usize } , 144usize , concat ! (
1921 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1922 , stringify ! ( result ) ));
1923 assert_eq! (unsafe {
1924 & ( * ( 0 as * const st_mysql_stmt ) ) . data_cursor as *
1925 const _ as usize } , 272usize , concat ! (
1926 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1927 , stringify ! ( data_cursor ) ));
1928 assert_eq! (unsafe {
1929 & ( * ( 0 as * const st_mysql_stmt ) ) . read_row_func as *
1930 const _ as usize } , 280usize , concat ! (
1931 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1932 , stringify ! ( read_row_func ) ));
1933 assert_eq! (unsafe {
1934 & ( * ( 0 as * const st_mysql_stmt ) ) . affected_rows as *
1935 const _ as usize } , 288usize , concat ! (
1936 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1937 , stringify ! ( affected_rows ) ));
1938 assert_eq! (unsafe {
1939 & ( * ( 0 as * const st_mysql_stmt ) ) . insert_id as * const
1940 _ as usize } , 296usize , concat ! (
1941 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1942 , stringify ! ( insert_id ) ));
1943 assert_eq! (unsafe {
1944 & ( * ( 0 as * const st_mysql_stmt ) ) . stmt_id as * const _
1945 as usize } , 304usize , concat ! (
1946 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1947 , stringify ! ( stmt_id ) ));
1948 assert_eq! (unsafe {
1949 & ( * ( 0 as * const st_mysql_stmt ) ) . flags as * const _ as
1950 usize } , 308usize , concat ! (
1951 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1952 , stringify ! ( flags ) ));
1953 assert_eq! (unsafe {
1954 & ( * ( 0 as * const st_mysql_stmt ) ) . prefetch_rows as *
1955 const _ as usize } , 312usize , concat ! (
1956 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1957 , stringify ! ( prefetch_rows ) ));
1958 assert_eq! (unsafe {
1959 & ( * ( 0 as * const st_mysql_stmt ) ) . server_status as *
1960 const _ as usize } , 316usize , concat ! (
1961 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1962 , stringify ! ( server_status ) ));
1963 assert_eq! (unsafe {
1964 & ( * ( 0 as * const st_mysql_stmt ) ) . last_errno as * const
1965 _ as usize } , 320usize , concat ! (
1966 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1967 , stringify ! ( last_errno ) ));
1968 assert_eq! (unsafe {
1969 & ( * ( 0 as * const st_mysql_stmt ) ) . param_count as *
1970 const _ as usize } , 324usize , concat ! (
1971 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1972 , stringify ! ( param_count ) ));
1973 assert_eq! (unsafe {
1974 & ( * ( 0 as * const st_mysql_stmt ) ) . field_count as *
1975 const _ as usize } , 328usize , concat ! (
1976 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1977 , stringify ! ( field_count ) ));
1978 assert_eq! (unsafe {
1979 & ( * ( 0 as * const st_mysql_stmt ) ) . state as * const _ as
1980 usize } , 332usize , concat ! (
1981 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1982 , stringify ! ( state ) ));
1983 assert_eq! (unsafe {
1984 & ( * ( 0 as * const st_mysql_stmt ) ) . last_error as * const
1985 _ as usize } , 336usize , concat ! (
1986 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1987 , stringify ! ( last_error ) ));
1988 assert_eq! (unsafe {
1989 & ( * ( 0 as * const st_mysql_stmt ) ) . sqlstate as * const _
1990 as usize } , 848usize , concat ! (
1991 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1992 , stringify ! ( sqlstate ) ));
1993 assert_eq! (unsafe {
1994 & ( * ( 0 as * const st_mysql_stmt ) ) . send_types_to_server
1995 as * const _ as usize } , 854usize , concat ! (
1996 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
1997 , stringify ! ( send_types_to_server ) ));
1998 assert_eq! (unsafe {
1999 & ( * ( 0 as * const st_mysql_stmt ) ) . bind_param_done as *
2000 const _ as usize } , 855usize , concat ! (
2001 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
2002 , stringify ! ( bind_param_done ) ));
2003 assert_eq! (unsafe {
2004 & ( * ( 0 as * const st_mysql_stmt ) ) . bind_result_done as *
2005 const _ as usize } , 856usize , concat ! (
2006 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
2007 , stringify ! ( bind_result_done ) ));
2008 assert_eq! (unsafe {
2009 & ( * ( 0 as * const st_mysql_stmt ) ) .
2010 unbuffered_fetch_cancelled as * const _ as usize } , 857usize
2011 , concat ! (
2012 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
2013 , stringify ! ( unbuffered_fetch_cancelled ) ));
2014 assert_eq! (unsafe {
2015 & ( * ( 0 as * const st_mysql_stmt ) ) . update_max_length as
2016 * const _ as usize } , 858usize , concat ! (
2017 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
2018 , stringify ! ( update_max_length ) ));
2019 assert_eq! (unsafe {
2020 & ( * ( 0 as * const st_mysql_stmt ) ) . extension as * const
2021 _ as usize } , 864usize , concat ! (
2022 "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::"
2023 , stringify ! ( extension ) ));
2024}
2025pub type MYSQL = st_mysql;
2026#[repr(C)]
2027#[derive(Debug, Copy)]
2028pub struct st_mysql_res {
2029 pub row_count: my_ulonglong,
2030 pub fields: *mut MYSQL_FIELD,
2031 pub data: *mut MYSQL_DATA,
2032 pub data_cursor: *mut MYSQL_ROWS,
2033 pub lengths: *mut ::std::os::raw::c_ulong,
2034 pub handle: *mut MYSQL,
2035 pub methods: *const st_mysql_methods,
2036 pub row: MYSQL_ROW,
2037 pub current_row: MYSQL_ROW,
2038 pub field_alloc: MEM_ROOT,
2039 pub field_count: ::std::os::raw::c_uint,
2040 pub current_field: ::std::os::raw::c_uint,
2041 pub eof: my_bool,
2042 pub unbuffered_fetch_cancelled: my_bool,
2043 pub extension: *mut ::std::os::raw::c_void,
2044}
2045#[test]
2046fn bindgen_test_layout_st_mysql_res() {
2047 assert_eq!(::std::mem::size_of::<st_mysql_res>() , 184usize , concat ! (
2048 "Size of: " , stringify ! ( st_mysql_res ) ));
2049 assert_eq! (::std::mem::align_of::<st_mysql_res>() , 8usize , concat ! (
2050 "Alignment of " , stringify ! ( st_mysql_res ) ));
2051 assert_eq! (unsafe {
2052 & ( * ( 0 as * const st_mysql_res ) ) . row_count as * const _
2053 as usize } , 0usize , concat ! (
2054 "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" ,
2055 stringify ! ( row_count ) ));
2056 assert_eq! (unsafe {
2057 & ( * ( 0 as * const st_mysql_res ) ) . fields as * const _ as
2058 usize } , 8usize , concat ! (
2059 "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" ,
2060 stringify ! ( fields ) ));
2061 assert_eq! (unsafe {
2062 & ( * ( 0 as * const st_mysql_res ) ) . data as * const _ as
2063 usize } , 16usize , concat ! (
2064 "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" ,
2065 stringify ! ( data ) ));
2066 assert_eq! (unsafe {
2067 & ( * ( 0 as * const st_mysql_res ) ) . data_cursor as * const
2068 _ as usize } , 24usize , concat ! (
2069 "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" ,
2070 stringify ! ( data_cursor ) ));
2071 assert_eq! (unsafe {
2072 & ( * ( 0 as * const st_mysql_res ) ) . lengths as * const _
2073 as usize } , 32usize , concat ! (
2074 "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" ,
2075 stringify ! ( lengths ) ));
2076 assert_eq! (unsafe {
2077 & ( * ( 0 as * const st_mysql_res ) ) . handle as * const _ as
2078 usize } , 40usize , concat ! (
2079 "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" ,
2080 stringify ! ( handle ) ));
2081 assert_eq! (unsafe {
2082 & ( * ( 0 as * const st_mysql_res ) ) . methods as * const _
2083 as usize } , 48usize , concat ! (
2084 "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" ,
2085 stringify ! ( methods ) ));
2086 assert_eq! (unsafe {
2087 & ( * ( 0 as * const st_mysql_res ) ) . row as * const _ as
2088 usize } , 56usize , concat ! (
2089 "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" ,
2090 stringify ! ( row ) ));
2091 assert_eq! (unsafe {
2092 & ( * ( 0 as * const st_mysql_res ) ) . current_row as * const
2093 _ as usize } , 64usize , concat ! (
2094 "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" ,
2095 stringify ! ( current_row ) ));
2096 assert_eq! (unsafe {
2097 & ( * ( 0 as * const st_mysql_res ) ) . field_alloc as * const
2098 _ as usize } , 72usize , concat ! (
2099 "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" ,
2100 stringify ! ( field_alloc ) ));
2101 assert_eq! (unsafe {
2102 & ( * ( 0 as * const st_mysql_res ) ) . field_count as * const
2103 _ as usize } , 160usize , concat ! (
2104 "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" ,
2105 stringify ! ( field_count ) ));
2106 assert_eq! (unsafe {
2107 & ( * ( 0 as * const st_mysql_res ) ) . current_field as *
2108 const _ as usize } , 164usize , concat ! (
2109 "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" ,
2110 stringify ! ( current_field ) ));
2111 assert_eq! (unsafe {
2112 & ( * ( 0 as * const st_mysql_res ) ) . eof as * const _ as
2113 usize } , 168usize , concat ! (
2114 "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" ,
2115 stringify ! ( eof ) ));
2116 assert_eq! (unsafe {
2117 & ( * ( 0 as * const st_mysql_res ) ) .
2118 unbuffered_fetch_cancelled as * const _ as usize } , 169usize
2119 , concat ! (
2120 "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" ,
2121 stringify ! ( unbuffered_fetch_cancelled ) ));
2122 assert_eq! (unsafe {
2123 & ( * ( 0 as * const st_mysql_res ) ) . extension as * const _
2124 as usize } , 176usize , concat ! (
2125 "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" ,
2126 stringify ! ( extension ) ));
2127}
2128impl Clone for st_mysql_res {
2129 fn clone(&self) -> Self { *self }
2130}
2131pub type MYSQL_RES = st_mysql_res;
2132extern "C" {
2133 pub fn mysql_server_init(argc: ::std::os::raw::c_int,
2134 argv: *mut *mut ::std::os::raw::c_char,
2135 groups: *mut *mut ::std::os::raw::c_char)
2136 -> ::std::os::raw::c_int;
2137}
2138extern "C" {
2139 pub fn mysql_server_end();
2140}
2141extern "C" {
2142 pub fn mysql_thread_init() -> my_bool;
2143}
2144extern "C" {
2145 pub fn mysql_thread_end();
2146}
2147extern "C" {
2148 pub fn mysql_num_rows(res: *mut MYSQL_RES) -> my_ulonglong;
2149}
2150extern "C" {
2151 pub fn mysql_num_fields(res: *mut MYSQL_RES) -> ::std::os::raw::c_uint;
2152}
2153extern "C" {
2154 pub fn mysql_eof(res: *mut MYSQL_RES) -> my_bool;
2155}
2156extern "C" {
2157 pub fn mysql_fetch_field_direct(res: *mut MYSQL_RES,
2158 fieldnr: ::std::os::raw::c_uint)
2159 -> *mut MYSQL_FIELD;
2160}
2161extern "C" {
2162 pub fn mysql_fetch_fields(res: *mut MYSQL_RES) -> *mut MYSQL_FIELD;
2163}
2164extern "C" {
2165 pub fn mysql_row_tell(res: *mut MYSQL_RES) -> MYSQL_ROW_OFFSET;
2166}
2167extern "C" {
2168 pub fn mysql_field_tell(res: *mut MYSQL_RES) -> MYSQL_FIELD_OFFSET;
2169}
2170extern "C" {
2171 pub fn mysql_field_count(mysql: *mut MYSQL) -> ::std::os::raw::c_uint;
2172}
2173extern "C" {
2174 pub fn mysql_affected_rows(mysql: *mut MYSQL) -> my_ulonglong;
2175}
2176extern "C" {
2177 pub fn mysql_insert_id(mysql: *mut MYSQL) -> my_ulonglong;
2178}
2179extern "C" {
2180 pub fn mysql_errno(mysql: *mut MYSQL) -> ::std::os::raw::c_uint;
2181}
2182extern "C" {
2183 pub fn mysql_error(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char;
2184}
2185extern "C" {
2186 pub fn mysql_sqlstate(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char;
2187}
2188extern "C" {
2189 pub fn mysql_warning_count(mysql: *mut MYSQL) -> ::std::os::raw::c_uint;
2190}
2191extern "C" {
2192 pub fn mysql_info(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char;
2193}
2194extern "C" {
2195 pub fn mysql_thread_id(mysql: *mut MYSQL) -> ::std::os::raw::c_ulong;
2196}
2197extern "C" {
2198 pub fn mysql_character_set_name(mysql: *mut MYSQL)
2199 -> *const ::std::os::raw::c_char;
2200}
2201extern "C" {
2202 pub fn mysql_set_character_set(mysql: *mut MYSQL,
2203 csname: *const ::std::os::raw::c_char)
2204 -> ::std::os::raw::c_int;
2205}
2206extern "C" {
2207 pub fn mysql_init(mysql: *mut MYSQL) -> *mut MYSQL;
2208}
2209extern "C" {
2210 pub fn mysql_ssl_set(mysql: *mut MYSQL,
2211 key: *const ::std::os::raw::c_char,
2212 cert: *const ::std::os::raw::c_char,
2213 ca: *const ::std::os::raw::c_char,
2214 capath: *const ::std::os::raw::c_char,
2215 cipher: *const ::std::os::raw::c_char) -> my_bool;
2216}
2217extern "C" {
2218 pub fn mysql_get_ssl_cipher(mysql: *mut MYSQL)
2219 -> *const ::std::os::raw::c_char;
2220}
2221extern "C" {
2222 pub fn mysql_change_user(mysql: *mut MYSQL,
2223 user: *const ::std::os::raw::c_char,
2224 passwd: *const ::std::os::raw::c_char,
2225 db: *const ::std::os::raw::c_char) -> my_bool;
2226}
2227extern "C" {
2228 pub fn mysql_real_connect(mysql: *mut MYSQL,
2229 host: *const ::std::os::raw::c_char,
2230 user: *const ::std::os::raw::c_char,
2231 passwd: *const ::std::os::raw::c_char,
2232 db: *const ::std::os::raw::c_char,
2233 port: ::std::os::raw::c_uint,
2234 unix_socket: *const ::std::os::raw::c_char,
2235 clientflag: ::std::os::raw::c_ulong)
2236 -> *mut MYSQL;
2237}
2238extern "C" {
2239 pub fn mysql_select_db(mysql: *mut MYSQL,
2240 db: *const ::std::os::raw::c_char)
2241 -> ::std::os::raw::c_int;
2242}
2243extern "C" {
2244 pub fn mysql_query(mysql: *mut MYSQL, q: *const ::std::os::raw::c_char)
2245 -> ::std::os::raw::c_int;
2246}
2247extern "C" {
2248 pub fn mysql_send_query(mysql: *mut MYSQL,
2249 q: *const ::std::os::raw::c_char,
2250 length: ::std::os::raw::c_ulong)
2251 -> ::std::os::raw::c_int;
2252}
2253extern "C" {
2254 pub fn mysql_real_query(mysql: *mut MYSQL,
2255 q: *const ::std::os::raw::c_char,
2256 length: ::std::os::raw::c_ulong)
2257 -> ::std::os::raw::c_int;
2258}
2259extern "C" {
2260 pub fn mysql_store_result(mysql: *mut MYSQL) -> *mut MYSQL_RES;
2261}
2262extern "C" {
2263 pub fn mysql_use_result(mysql: *mut MYSQL) -> *mut MYSQL_RES;
2264}
2265extern "C" {
2266 pub fn mysql_get_character_set_info(mysql: *mut MYSQL,
2267 charset: *mut MY_CHARSET_INFO);
2268}
2269extern "C" {
2270 pub fn mysql_session_track_get_first(mysql: *mut MYSQL,
2271 type_: enum_session_state_type,
2272 data:
2273 *mut *const ::std::os::raw::c_char,
2274 length: *mut usize)
2275 -> ::std::os::raw::c_int;
2276}
2277extern "C" {
2278 pub fn mysql_session_track_get_next(mysql: *mut MYSQL,
2279 type_: enum_session_state_type,
2280 data:
2281 *mut *const ::std::os::raw::c_char,
2282 length: *mut usize)
2283 -> ::std::os::raw::c_int;
2284}
2285extern "C" {
2286 pub fn mysql_set_local_infile_handler(mysql: *mut MYSQL,
2287 local_infile_init:
2288 ::std::option::Option<unsafe extern "C" fn(arg1:
2289 *mut *mut ::std::os::raw::c_void,
2290 arg2:
2291 *const ::std::os::raw::c_char,
2292 arg3:
2293 *mut ::std::os::raw::c_void)
2294 ->
2295 ::std::os::raw::c_int>,
2296 local_infile_read:
2297 ::std::option::Option<unsafe extern "C" fn(arg1:
2298 *mut ::std::os::raw::c_void,
2299 arg2:
2300 *mut ::std::os::raw::c_char,
2301 arg3:
2302 ::std::os::raw::c_uint)
2303 ->
2304 ::std::os::raw::c_int>,
2305 local_infile_end:
2306 ::std::option::Option<unsafe extern "C" fn(arg1:
2307 *mut ::std::os::raw::c_void)>,
2308 local_infile_error:
2309 ::std::option::Option<unsafe extern "C" fn(arg1:
2310 *mut ::std::os::raw::c_void,
2311 arg2:
2312 *mut ::std::os::raw::c_char,
2313 arg3:
2314 ::std::os::raw::c_uint)
2315 ->
2316 ::std::os::raw::c_int>,
2317 arg1: *mut ::std::os::raw::c_void);
2318}
2319extern "C" {
2320 pub fn mysql_set_local_infile_default(mysql: *mut MYSQL);
2321}
2322extern "C" {
2323 pub fn mysql_shutdown(mysql: *mut MYSQL,
2324 shutdown_level: mysql_enum_shutdown_level)
2325 -> ::std::os::raw::c_int;
2326}
2327extern "C" {
2328 pub fn mysql_dump_debug_info(mysql: *mut MYSQL) -> ::std::os::raw::c_int;
2329}
2330extern "C" {
2331 pub fn mysql_refresh(mysql: *mut MYSQL,
2332 refresh_options: ::std::os::raw::c_uint)
2333 -> ::std::os::raw::c_int;
2334}
2335extern "C" {
2336 pub fn mysql_kill(mysql: *mut MYSQL, pid: ::std::os::raw::c_ulong)
2337 -> ::std::os::raw::c_int;
2338}
2339extern "C" {
2340 pub fn mysql_set_server_option(mysql: *mut MYSQL,
2341 option: enum_mysql_set_option)
2342 -> ::std::os::raw::c_int;
2343}
2344extern "C" {
2345 pub fn mysql_ping(mysql: *mut MYSQL) -> ::std::os::raw::c_int;
2346}
2347extern "C" {
2348 pub fn mysql_stat(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char;
2349}
2350extern "C" {
2351 pub fn mysql_get_server_info(mysql: *mut MYSQL)
2352 -> *const ::std::os::raw::c_char;
2353}
2354extern "C" {
2355 pub fn mysql_get_client_info() -> *const ::std::os::raw::c_char;
2356}
2357extern "C" {
2358 pub fn mysql_get_client_version() -> ::std::os::raw::c_ulong;
2359}
2360extern "C" {
2361 pub fn mysql_get_host_info(mysql: *mut MYSQL)
2362 -> *const ::std::os::raw::c_char;
2363}
2364extern "C" {
2365 pub fn mysql_get_server_version(mysql: *mut MYSQL)
2366 -> ::std::os::raw::c_ulong;
2367}
2368extern "C" {
2369 pub fn mysql_get_proto_info(mysql: *mut MYSQL) -> ::std::os::raw::c_uint;
2370}
2371extern "C" {
2372 pub fn mysql_list_dbs(mysql: *mut MYSQL,
2373 wild: *const ::std::os::raw::c_char)
2374 -> *mut MYSQL_RES;
2375}
2376extern "C" {
2377 pub fn mysql_list_tables(mysql: *mut MYSQL,
2378 wild: *const ::std::os::raw::c_char)
2379 -> *mut MYSQL_RES;
2380}
2381extern "C" {
2382 pub fn mysql_list_processes(mysql: *mut MYSQL) -> *mut MYSQL_RES;
2383}
2384extern "C" {
2385 pub fn mysql_options(mysql: *mut MYSQL, option: mysql_option,
2386 arg: *const ::std::os::raw::c_void)
2387 -> ::std::os::raw::c_int;
2388}
2389extern "C" {
2390 pub fn mysql_options4(mysql: *mut MYSQL, option: mysql_option,
2391 arg1: *const ::std::os::raw::c_void,
2392 arg2: *const ::std::os::raw::c_void)
2393 -> ::std::os::raw::c_int;
2394}
2395extern "C" {
2396 pub fn mysql_get_option(mysql: *mut MYSQL, option: mysql_option,
2397 arg: *const ::std::os::raw::c_void)
2398 -> ::std::os::raw::c_int;
2399}
2400extern "C" {
2401 pub fn mysql_free_result(result: *mut MYSQL_RES);
2402}
2403extern "C" {
2404 pub fn mysql_data_seek(result: *mut MYSQL_RES, offset: my_ulonglong);
2405}
2406extern "C" {
2407 pub fn mysql_row_seek(result: *mut MYSQL_RES, offset: MYSQL_ROW_OFFSET)
2408 -> MYSQL_ROW_OFFSET;
2409}
2410extern "C" {
2411 pub fn mysql_field_seek(result: *mut MYSQL_RES,
2412 offset: MYSQL_FIELD_OFFSET) -> MYSQL_FIELD_OFFSET;
2413}
2414extern "C" {
2415 pub fn mysql_fetch_row(result: *mut MYSQL_RES) -> MYSQL_ROW;
2416}
2417extern "C" {
2418 pub fn mysql_fetch_lengths(result: *mut MYSQL_RES)
2419 -> *mut ::std::os::raw::c_ulong;
2420}
2421extern "C" {
2422 pub fn mysql_fetch_field(result: *mut MYSQL_RES) -> *mut MYSQL_FIELD;
2423}
2424extern "C" {
2425 pub fn mysql_list_fields(mysql: *mut MYSQL,
2426 table: *const ::std::os::raw::c_char,
2427 wild: *const ::std::os::raw::c_char)
2428 -> *mut MYSQL_RES;
2429}
2430extern "C" {
2431 pub fn mysql_escape_string(to: *mut ::std::os::raw::c_char,
2432 from: *const ::std::os::raw::c_char,
2433 from_length: ::std::os::raw::c_ulong)
2434 -> ::std::os::raw::c_ulong;
2435}
2436extern "C" {
2437 pub fn mysql_hex_string(to: *mut ::std::os::raw::c_char,
2438 from: *const ::std::os::raw::c_char,
2439 from_length: ::std::os::raw::c_ulong)
2440 -> ::std::os::raw::c_ulong;
2441}
2442extern "C" {
2443 pub fn mysql_real_escape_string(mysql: *mut MYSQL,
2444 to: *mut ::std::os::raw::c_char,
2445 from: *const ::std::os::raw::c_char,
2446 length: ::std::os::raw::c_ulong)
2447 -> ::std::os::raw::c_ulong;
2448}
2449extern "C" {
2450 pub fn mysql_real_escape_string_quote(mysql: *mut MYSQL,
2451 to: *mut ::std::os::raw::c_char,
2452 from: *const ::std::os::raw::c_char,
2453 length: ::std::os::raw::c_ulong,
2454 quote: ::std::os::raw::c_char)
2455 -> ::std::os::raw::c_ulong;
2456}
2457extern "C" {
2458 pub fn mysql_debug(debug: *const ::std::os::raw::c_char);
2459}
2460extern "C" {
2461 pub fn mysql_thread_safe() -> ::std::os::raw::c_uint;
2462}
2463extern "C" {
2464 pub fn mysql_embedded() -> my_bool;
2465}
2466extern "C" {
2467 pub fn mysql_read_query_result(mysql: *mut MYSQL) -> my_bool;
2468}
2469extern "C" {
2470 pub fn mysql_reset_connection(mysql: *mut MYSQL) -> ::std::os::raw::c_int;
2471}
2472#[repr(i32)]
2473#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
2474pub enum enum_mysql_stmt_state {
2475 MYSQL_STMT_INIT_DONE = 1,
2476 MYSQL_STMT_PREPARE_DONE = 2,
2477 MYSQL_STMT_EXECUTE_DONE = 3,
2478 MYSQL_STMT_FETCH_DONE = 4,
2479}
2480#[repr(C)]
2481#[derive(Debug, Copy)]
2482pub struct st_mysql_bind {
2483 pub length: *mut ::std::os::raw::c_ulong,
2484 pub is_null: *mut my_bool,
2485 pub buffer: *mut ::std::os::raw::c_void,
2486 pub error: *mut my_bool,
2487 pub row_ptr: *mut ::std::os::raw::c_uchar,
2488 pub store_param_func: ::std::option::Option<unsafe extern "C" fn(net:
2489 *mut NET,
2490 param:
2491 *mut st_mysql_bind)>,
2492 pub fetch_result: ::std::option::Option<unsafe extern "C" fn(arg1:
2493 *mut st_mysql_bind,
2494 arg2:
2495 *mut MYSQL_FIELD,
2496 row:
2497 *mut *mut ::std::os::raw::c_uchar)>,
2498 pub skip_result: ::std::option::Option<unsafe extern "C" fn(arg1:
2499 *mut st_mysql_bind,
2500 arg2:
2501 *mut MYSQL_FIELD,
2502 row:
2503 *mut *mut ::std::os::raw::c_uchar)>,
2504 pub buffer_length: ::std::os::raw::c_ulong,
2505 pub offset: ::std::os::raw::c_ulong,
2506 pub length_value: ::std::os::raw::c_ulong,
2507 pub param_number: ::std::os::raw::c_uint,
2508 pub pack_length: ::std::os::raw::c_uint,
2509 pub buffer_type: enum_field_types,
2510 pub error_value: my_bool,
2511 pub is_unsigned: my_bool,
2512 pub long_data_used: my_bool,
2513 pub is_null_value: my_bool,
2514 pub extension: *mut ::std::os::raw::c_void,
2515}
2516#[test]
2517fn bindgen_test_layout_st_mysql_bind() {
2518 assert_eq!(::std::mem::size_of::<st_mysql_bind>() , 104usize , concat ! (
2519 "Size of: " , stringify ! ( st_mysql_bind ) ));
2520 assert_eq! (::std::mem::align_of::<st_mysql_bind>() , 8usize , concat ! (
2521 "Alignment of " , stringify ! ( st_mysql_bind ) ));
2522 assert_eq! (unsafe {
2523 & ( * ( 0 as * const st_mysql_bind ) ) . length as * const _
2524 as usize } , 0usize , concat ! (
2525 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2526 , stringify ! ( length ) ));
2527 assert_eq! (unsafe {
2528 & ( * ( 0 as * const st_mysql_bind ) ) . is_null as * const _
2529 as usize } , 8usize , concat ! (
2530 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2531 , stringify ! ( is_null ) ));
2532 assert_eq! (unsafe {
2533 & ( * ( 0 as * const st_mysql_bind ) ) . buffer as * const _
2534 as usize } , 16usize , concat ! (
2535 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2536 , stringify ! ( buffer ) ));
2537 assert_eq! (unsafe {
2538 & ( * ( 0 as * const st_mysql_bind ) ) . error as * const _ as
2539 usize } , 24usize , concat ! (
2540 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2541 , stringify ! ( error ) ));
2542 assert_eq! (unsafe {
2543 & ( * ( 0 as * const st_mysql_bind ) ) . row_ptr as * const _
2544 as usize } , 32usize , concat ! (
2545 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2546 , stringify ! ( row_ptr ) ));
2547 assert_eq! (unsafe {
2548 & ( * ( 0 as * const st_mysql_bind ) ) . store_param_func as *
2549 const _ as usize } , 40usize , concat ! (
2550 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2551 , stringify ! ( store_param_func ) ));
2552 assert_eq! (unsafe {
2553 & ( * ( 0 as * const st_mysql_bind ) ) . fetch_result as *
2554 const _ as usize } , 48usize , concat ! (
2555 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2556 , stringify ! ( fetch_result ) ));
2557 assert_eq! (unsafe {
2558 & ( * ( 0 as * const st_mysql_bind ) ) . skip_result as *
2559 const _ as usize } , 56usize , concat ! (
2560 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2561 , stringify ! ( skip_result ) ));
2562 assert_eq! (unsafe {
2563 & ( * ( 0 as * const st_mysql_bind ) ) . buffer_length as *
2564 const _ as usize } , 64usize , concat ! (
2565 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2566 , stringify ! ( buffer_length ) ));
2567 assert_eq! (unsafe {
2568 & ( * ( 0 as * const st_mysql_bind ) ) . offset as * const _
2569 as usize } , 68usize , concat ! (
2570 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2571 , stringify ! ( offset ) ));
2572 assert_eq! (unsafe {
2573 & ( * ( 0 as * const st_mysql_bind ) ) . length_value as *
2574 const _ as usize } , 72usize , concat ! (
2575 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2576 , stringify ! ( length_value ) ));
2577 assert_eq! (unsafe {
2578 & ( * ( 0 as * const st_mysql_bind ) ) . param_number as *
2579 const _ as usize } , 76usize , concat ! (
2580 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2581 , stringify ! ( param_number ) ));
2582 assert_eq! (unsafe {
2583 & ( * ( 0 as * const st_mysql_bind ) ) . pack_length as *
2584 const _ as usize } , 80usize , concat ! (
2585 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2586 , stringify ! ( pack_length ) ));
2587 assert_eq! (unsafe {
2588 & ( * ( 0 as * const st_mysql_bind ) ) . buffer_type as *
2589 const _ as usize } , 84usize , concat ! (
2590 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2591 , stringify ! ( buffer_type ) ));
2592 assert_eq! (unsafe {
2593 & ( * ( 0 as * const st_mysql_bind ) ) . error_value as *
2594 const _ as usize } , 88usize , concat ! (
2595 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2596 , stringify ! ( error_value ) ));
2597 assert_eq! (unsafe {
2598 & ( * ( 0 as * const st_mysql_bind ) ) . is_unsigned as *
2599 const _ as usize } , 89usize , concat ! (
2600 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2601 , stringify ! ( is_unsigned ) ));
2602 assert_eq! (unsafe {
2603 & ( * ( 0 as * const st_mysql_bind ) ) . long_data_used as *
2604 const _ as usize } , 90usize , concat ! (
2605 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2606 , stringify ! ( long_data_used ) ));
2607 assert_eq! (unsafe {
2608 & ( * ( 0 as * const st_mysql_bind ) ) . is_null_value as *
2609 const _ as usize } , 91usize , concat ! (
2610 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2611 , stringify ! ( is_null_value ) ));
2612 assert_eq! (unsafe {
2613 & ( * ( 0 as * const st_mysql_bind ) ) . extension as * const
2614 _ as usize } , 96usize , concat ! (
2615 "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::"
2616 , stringify ! ( extension ) ));
2617}
2618impl Clone for st_mysql_bind {
2619 fn clone(&self) -> Self { *self }
2620}
2621pub type MYSQL_BIND = st_mysql_bind;
2622#[repr(C)]
2623#[derive(Debug, Copy, Clone)]
2624pub struct st_mysql_stmt_extension {
2625 _unused: [u8; 0],
2626}
2627pub type MYSQL_STMT = st_mysql_stmt;
2628#[repr(i32)]
2629#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
2630pub enum enum_stmt_attr_type {
2631 STMT_ATTR_UPDATE_MAX_LENGTH = 0,
2632 STMT_ATTR_CURSOR_TYPE = 1,
2633 STMT_ATTR_PREFETCH_ROWS = 2,
2634}
2635extern "C" {
2636 pub fn mysql_stmt_init(mysql: *mut MYSQL) -> *mut MYSQL_STMT;
2637}
2638extern "C" {
2639 pub fn mysql_stmt_prepare(stmt: *mut MYSQL_STMT,
2640 query: *const ::std::os::raw::c_char,
2641 length: ::std::os::raw::c_ulong)
2642 -> ::std::os::raw::c_int;
2643}
2644extern "C" {
2645 pub fn mysql_stmt_execute(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_int;
2646}
2647extern "C" {
2648 pub fn mysql_stmt_fetch(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_int;
2649}
2650extern "C" {
2651 pub fn mysql_stmt_fetch_column(stmt: *mut MYSQL_STMT,
2652 bind_arg: *mut MYSQL_BIND,
2653 column: ::std::os::raw::c_uint,
2654 offset: ::std::os::raw::c_ulong)
2655 -> ::std::os::raw::c_int;
2656}
2657extern "C" {
2658 pub fn mysql_stmt_store_result(stmt: *mut MYSQL_STMT)
2659 -> ::std::os::raw::c_int;
2660}
2661extern "C" {
2662 pub fn mysql_stmt_param_count(stmt: *mut MYSQL_STMT)
2663 -> ::std::os::raw::c_ulong;
2664}
2665extern "C" {
2666 pub fn mysql_stmt_attr_set(stmt: *mut MYSQL_STMT,
2667 attr_type: enum_stmt_attr_type,
2668 attr: *const ::std::os::raw::c_void)
2669 -> my_bool;
2670}
2671extern "C" {
2672 pub fn mysql_stmt_attr_get(stmt: *mut MYSQL_STMT,
2673 attr_type: enum_stmt_attr_type,
2674 attr: *mut ::std::os::raw::c_void) -> my_bool;
2675}
2676extern "C" {
2677 pub fn mysql_stmt_bind_param(stmt: *mut MYSQL_STMT, bnd: *mut MYSQL_BIND)
2678 -> my_bool;
2679}
2680extern "C" {
2681 pub fn mysql_stmt_bind_result(stmt: *mut MYSQL_STMT, bnd: *mut MYSQL_BIND)
2682 -> my_bool;
2683}
2684extern "C" {
2685 pub fn mysql_stmt_close(stmt: *mut MYSQL_STMT) -> my_bool;
2686}
2687extern "C" {
2688 pub fn mysql_stmt_reset(stmt: *mut MYSQL_STMT) -> my_bool;
2689}
2690extern "C" {
2691 pub fn mysql_stmt_free_result(stmt: *mut MYSQL_STMT) -> my_bool;
2692}
2693extern "C" {
2694 pub fn mysql_stmt_send_long_data(stmt: *mut MYSQL_STMT,
2695 param_number: ::std::os::raw::c_uint,
2696 data: *const ::std::os::raw::c_char,
2697 length: ::std::os::raw::c_ulong)
2698 -> my_bool;
2699}
2700extern "C" {
2701 pub fn mysql_stmt_result_metadata(stmt: *mut MYSQL_STMT)
2702 -> *mut MYSQL_RES;
2703}
2704extern "C" {
2705 pub fn mysql_stmt_param_metadata(stmt: *mut MYSQL_STMT) -> *mut MYSQL_RES;
2706}
2707extern "C" {
2708 pub fn mysql_stmt_errno(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_uint;
2709}
2710extern "C" {
2711 pub fn mysql_stmt_error(stmt: *mut MYSQL_STMT)
2712 -> *const ::std::os::raw::c_char;
2713}
2714extern "C" {
2715 pub fn mysql_stmt_sqlstate(stmt: *mut MYSQL_STMT)
2716 -> *const ::std::os::raw::c_char;
2717}
2718extern "C" {
2719 pub fn mysql_stmt_row_seek(stmt: *mut MYSQL_STMT,
2720 offset: MYSQL_ROW_OFFSET) -> MYSQL_ROW_OFFSET;
2721}
2722extern "C" {
2723 pub fn mysql_stmt_row_tell(stmt: *mut MYSQL_STMT) -> MYSQL_ROW_OFFSET;
2724}
2725extern "C" {
2726 pub fn mysql_stmt_data_seek(stmt: *mut MYSQL_STMT, offset: my_ulonglong);
2727}
2728extern "C" {
2729 pub fn mysql_stmt_num_rows(stmt: *mut MYSQL_STMT) -> my_ulonglong;
2730}
2731extern "C" {
2732 pub fn mysql_stmt_affected_rows(stmt: *mut MYSQL_STMT) -> my_ulonglong;
2733}
2734extern "C" {
2735 pub fn mysql_stmt_insert_id(stmt: *mut MYSQL_STMT) -> my_ulonglong;
2736}
2737extern "C" {
2738 pub fn mysql_stmt_field_count(stmt: *mut MYSQL_STMT)
2739 -> ::std::os::raw::c_uint;
2740}
2741extern "C" {
2742 pub fn mysql_commit(mysql: *mut MYSQL) -> my_bool;
2743}
2744extern "C" {
2745 pub fn mysql_rollback(mysql: *mut MYSQL) -> my_bool;
2746}
2747extern "C" {
2748 pub fn mysql_autocommit(mysql: *mut MYSQL, auto_mode: my_bool) -> my_bool;
2749}
2750extern "C" {
2751 pub fn mysql_more_results(mysql: *mut MYSQL) -> my_bool;
2752}
2753extern "C" {
2754 pub fn mysql_next_result(mysql: *mut MYSQL) -> ::std::os::raw::c_int;
2755}
2756extern "C" {
2757 pub fn mysql_stmt_next_result(stmt: *mut MYSQL_STMT)
2758 -> ::std::os::raw::c_int;
2759}
2760extern "C" {
2761 pub fn mysql_close(sock: *mut MYSQL);
2762}
2763#[repr(C)]
2764#[derive(Debug, Copy)]
2765pub struct charset_info_st {
2766 pub _address: u8,
2767}
2768impl Clone for charset_info_st {
2769 fn clone(&self) -> Self { *self }
2770}
2771#[repr(C)]
2772#[derive(Debug, Copy)]
2773pub struct st_dynamic_array {
2774 pub _address: u8,
2775}
2776impl Clone for st_dynamic_array {
2777 fn clone(&self) -> Self { *self }
2778}