mysqlclient_sys_ext/
bindings_macos.rs

1/* automatically generated by rust-bindgen */
2
3#[repr(C)]
4pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
5impl<T> __BindgenUnionField<T> {
6    #[inline]
7    pub fn new() -> Self {
8        __BindgenUnionField(::std::marker::PhantomData)
9    }
10    #[inline]
11    pub unsafe fn as_ref(&self) -> &T {
12        ::std::mem::transmute(self)
13    }
14    #[inline]
15    pub unsafe fn as_mut(&mut self) -> &mut T {
16        ::std::mem::transmute(self)
17    }
18}
19impl<T> ::std::default::Default for __BindgenUnionField<T> {
20    #[inline]
21    fn default() -> Self {
22        Self::new()
23    }
24}
25impl<T> ::std::clone::Clone for __BindgenUnionField<T> {
26    #[inline]
27    fn clone(&self) -> Self {
28        Self::new()
29    }
30}
31impl<T> ::std::marker::Copy for __BindgenUnionField<T> {}
32impl<T> ::std::fmt::Debug for __BindgenUnionField<T> {
33    fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
34        fmt.write_str("__BindgenUnionField")
35    }
36}
37pub const MYSQL_SERVER_VERSION: &'static [u8; 7usize] = b"5.7.11\x00";
38pub const MYSQL_BASE_VERSION: &'static [u8; 11usize] = b"mysqld-5.7\x00";
39pub const MYSQL_SERVER_SUFFIX_DEF: &'static [u8; 1usize] = b"\x00";
40pub const MYSQL_VERSION_ID: ::std::os::raw::c_uint = 50711;
41pub const MYSQL_PORT: ::std::os::raw::c_uint = 3306;
42pub const MYSQL_PORT_DEFAULT: ::std::os::raw::c_uint = 0;
43pub const MYSQL_UNIX_ADDR: &'static [u8; 16usize] = b"/tmp/mysql.sock\x00";
44pub const MYSQL_CONFIG_NAME: &'static [u8; 3usize] = b"my\x00";
45pub const MYSQL_COMPILATION_COMMENT: &'static [u8; 9usize] = b"Homebrew\x00";
46pub const MYSQL_AUTODETECT_CHARSET_NAME: &'static [u8; 5usize] = b"auto\x00";
47pub const MYSQL_ERRMSG_SIZE: ::std::os::raw::c_uint = 512;
48pub const MYSQL_STMT_HEADER: ::std::os::raw::c_uint = 4;
49pub const MYSQL_LONG_DATA_HEADER: ::std::os::raw::c_uint = 6;
50pub const MYSQL_CLIENT_reserved1: ::std::os::raw::c_uint = 0;
51pub const MYSQL_CLIENT_reserved2: ::std::os::raw::c_uint = 1;
52pub const MYSQL_CLIENT_AUTHENTICATION_PLUGIN: ::std::os::raw::c_uint = 2;
53pub const MYSQL_CLIENT_TRACE_PLUGIN: ::std::os::raw::c_uint = 3;
54pub const MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION: ::std::os::raw::c_uint = 256;
55pub const MYSQL_CLIENT_TRACE_PLUGIN_INTERFACE_VERSION: ::std::os::raw::c_uint = 256;
56pub const MYSQL_CLIENT_MAX_PLUGINS: ::std::os::raw::c_uint = 4;
57pub const MYSQL_USERNAME_LENGTH: ::std::os::raw::c_uint = 96;
58pub const MYSQL_NO_DATA: ::std::os::raw::c_uint = 100;
59pub const MYSQL_DATA_TRUNCATED: ::std::os::raw::c_uint = 101;
60pub type __darwin_size_t = ::std::os::raw::c_ulong;
61pub type my_bool = ::std::os::raw::c_char;
62pub type my_socket = ::std::os::raw::c_int;
63#[repr(u32)]
64#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
65pub enum enum_field_types {
66    MYSQL_TYPE_DECIMAL = 0,
67    MYSQL_TYPE_TINY = 1,
68    MYSQL_TYPE_SHORT = 2,
69    MYSQL_TYPE_LONG = 3,
70    MYSQL_TYPE_FLOAT = 4,
71    MYSQL_TYPE_DOUBLE = 5,
72    MYSQL_TYPE_NULL = 6,
73    MYSQL_TYPE_TIMESTAMP = 7,
74    MYSQL_TYPE_LONGLONG = 8,
75    MYSQL_TYPE_INT24 = 9,
76    MYSQL_TYPE_DATE = 10,
77    MYSQL_TYPE_TIME = 11,
78    MYSQL_TYPE_DATETIME = 12,
79    MYSQL_TYPE_YEAR = 13,
80    MYSQL_TYPE_NEWDATE = 14,
81    MYSQL_TYPE_VARCHAR = 15,
82    MYSQL_TYPE_BIT = 16,
83    MYSQL_TYPE_TIMESTAMP2 = 17,
84    MYSQL_TYPE_DATETIME2 = 18,
85    MYSQL_TYPE_TIME2 = 19,
86    MYSQL_TYPE_JSON = 245,
87    MYSQL_TYPE_NEWDECIMAL = 246,
88    MYSQL_TYPE_ENUM = 247,
89    MYSQL_TYPE_SET = 248,
90    MYSQL_TYPE_TINY_BLOB = 249,
91    MYSQL_TYPE_MEDIUM_BLOB = 250,
92    MYSQL_TYPE_LONG_BLOB = 251,
93    MYSQL_TYPE_BLOB = 252,
94    MYSQL_TYPE_VAR_STRING = 253,
95    MYSQL_TYPE_STRING = 254,
96    MYSQL_TYPE_GEOMETRY = 255,
97}
98#[repr(C)]
99#[derive(Debug, Copy, Clone)]
100pub struct st_vio([u8; 0]);
101pub type Vio = st_vio;
102#[repr(C)]
103pub struct st_net {
104    pub vio: *mut Vio,
105    pub buff: *mut ::std::os::raw::c_uchar,
106    pub buff_end: *mut ::std::os::raw::c_uchar,
107    pub write_pos: *mut ::std::os::raw::c_uchar,
108    pub read_pos: *mut ::std::os::raw::c_uchar,
109    pub fd: my_socket,
110    pub remain_in_buf: ::std::os::raw::c_ulong,
111    pub length: ::std::os::raw::c_ulong,
112    pub buf_length: ::std::os::raw::c_ulong,
113    pub where_b: ::std::os::raw::c_ulong,
114    pub max_packet: ::std::os::raw::c_ulong,
115    pub max_packet_size: ::std::os::raw::c_ulong,
116    pub pkt_nr: ::std::os::raw::c_uint,
117    pub compress_pkt_nr: ::std::os::raw::c_uint,
118    pub write_timeout: ::std::os::raw::c_uint,
119    pub read_timeout: ::std::os::raw::c_uint,
120    pub retry_count: ::std::os::raw::c_uint,
121    pub fcntl: ::std::os::raw::c_int,
122    pub return_status: *mut ::std::os::raw::c_uint,
123    pub reading_or_writing: ::std::os::raw::c_uchar,
124    pub save_char: ::std::os::raw::c_char,
125    pub unused1: my_bool,
126    pub unused2: my_bool,
127    pub compress: my_bool,
128    pub unused3: my_bool,
129    pub unused: *mut ::std::os::raw::c_uchar,
130    pub last_errno: ::std::os::raw::c_uint,
131    pub error: ::std::os::raw::c_uchar,
132    pub unused4: my_bool,
133    pub unused5: my_bool,
134    /** Client library error message buffer. Actually belongs to struct MYSQL. */
135    pub last_error: [::std::os::raw::c_char; 512usize],
136    /** Client library sqlstate buffer. Set along with the error message. */
137    pub sqlstate: [::std::os::raw::c_char; 6usize],
138    /**
139    Extension pointer, for the caller private use.
140    Any program linking with the networking library can use this pointer,
141    which is handy when private connection specific data needs to be
142    maintained.
143    The mysqld server process uses this pointer internally,
144    to maintain the server internal instrumentation for the connection.
145  */
146    pub extension: *mut ::std::os::raw::c_void,
147}
148#[test]
149fn bindgen_test_layout_st_net() {
150    assert_eq!(::std::mem::size_of::<st_net>(), 680usize);
151    assert_eq!(::std::mem::align_of::<st_net>(), 8usize);
152}
153pub type NET = st_net;
154#[repr(u32)]
155#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
156pub enum mysql_enum_shutdown_level {
157    SHUTDOWN_DEFAULT = 0,
158    SHUTDOWN_WAIT_CONNECTIONS = 1,
159    SHUTDOWN_WAIT_TRANSACTIONS = 2,
160    SHUTDOWN_WAIT_UPDATES = 8,
161    SHUTDOWN_WAIT_ALL_BUFFERS = 16,
162    SHUTDOWN_WAIT_CRITICAL_BUFFERS = 17,
163    KILL_QUERY = 254,
164    KILL_CONNECTION = 255,
165}
166#[repr(u32)]
167#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
168pub enum enum_mysql_set_option {
169    MYSQL_OPTION_MULTI_STATEMENTS_ON = 0,
170    MYSQL_OPTION_MULTI_STATEMENTS_OFF = 1,
171}
172#[repr(u32)]
173#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
174pub enum enum_session_state_type {
175    SESSION_TRACK_SYSTEM_VARIABLES = 0,
176    SESSION_TRACK_SCHEMA = 1,
177    SESSION_TRACK_STATE_CHANGE = 2,
178    SESSION_TRACK_GTIDS = 3,
179    SESSION_TRACK_TRANSACTION_CHARACTERISTICS = 4,
180    SESSION_TRACK_TRANSACTION_STATE = 5,
181}
182extern "C" {
183    pub fn mysql_errno_to_sqlstate(mysql_errno: ::std::os::raw::c_uint)
184                                   -> *const ::std::os::raw::c_char;
185}
186#[repr(i32)]
187#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
188pub enum enum_mysql_timestamp_type {
189    MYSQL_TIMESTAMP_NONE = -2,
190    MYSQL_TIMESTAMP_ERROR = -1,
191    MYSQL_TIMESTAMP_DATE = 0,
192    MYSQL_TIMESTAMP_DATETIME = 1,
193    MYSQL_TIMESTAMP_TIME = 2,
194}
195#[repr(C)]
196#[derive(Debug, Copy)]
197pub struct st_mysql_time {
198    pub year: ::std::os::raw::c_uint,
199    pub month: ::std::os::raw::c_uint,
200    pub day: ::std::os::raw::c_uint,
201    pub hour: ::std::os::raw::c_uint,
202    pub minute: ::std::os::raw::c_uint,
203    pub second: ::std::os::raw::c_uint,
204    /**< microseconds */
205    pub second_part: ::std::os::raw::c_ulong,
206    pub neg: my_bool,
207    pub time_type: enum_mysql_timestamp_type,
208}
209#[test]
210fn bindgen_test_layout_st_mysql_time() {
211    assert_eq!(::std::mem::size_of::<st_mysql_time>(), 40usize);
212    assert_eq!(::std::mem::align_of::<st_mysql_time>(), 8usize);
213}
214impl Clone for st_mysql_time {
215    fn clone(&self) -> Self {
216        *self
217    }
218}
219pub type MYSQL_TIME = st_mysql_time;
220#[repr(C)]
221#[derive(Debug, Copy)]
222pub struct st_list {
223    pub prev: *mut st_list,
224    pub next: *mut st_list,
225    pub data: *mut ::std::os::raw::c_void,
226}
227#[test]
228fn bindgen_test_layout_st_list() {
229    assert_eq!(::std::mem::size_of::<st_list>(), 24usize);
230    assert_eq!(::std::mem::align_of::<st_list>(), 8usize);
231}
232impl Clone for st_list {
233    fn clone(&self) -> Self {
234        *self
235    }
236}
237pub type LIST = st_list;
238pub type va_list = __builtin_va_list;
239#[repr(C)]
240#[derive(Debug, Copy)]
241pub struct st_mysql_client_plugin {
242    pub type_: ::std::os::raw::c_int,
243    pub interface_version: ::std::os::raw::c_uint,
244    pub name: *const ::std::os::raw::c_char,
245    pub author: *const ::std::os::raw::c_char,
246    pub desc: *const ::std::os::raw::c_char,
247    pub version: [::std::os::raw::c_uint; 3usize],
248    pub license: *const ::std::os::raw::c_char,
249    pub mysql_api: *mut ::std::os::raw::c_void,
250    pub init: ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_char,
251                                                         arg2: usize,
252                                                         arg3: ::std::os::raw::c_int,
253                                                         arg4: *mut __va_list_tag)
254                                                         -> ::std::os::raw::c_int>,
255    pub deinit: ::std::option::Option<unsafe extern "C" fn() -> ::std::os::raw::c_int>,
256    pub options: ::std::option::Option<unsafe extern "C" fn(option: *const ::std::os::raw::c_char,
257                                                            arg1: *const ::std::os::raw::c_void)
258                                                            -> ::std::os::raw::c_int>,
259}
260#[test]
261fn bindgen_test_layout_st_mysql_client_plugin() {
262    assert_eq!(::std::mem::size_of::<st_mysql_client_plugin>(), 88usize);
263    assert_eq!(::std::mem::align_of::<st_mysql_client_plugin>(), 8usize);
264}
265impl Clone for st_mysql_client_plugin {
266    fn clone(&self) -> Self {
267        *self
268    }
269}
270#[repr(C)]
271pub struct st_mysql {
272    pub net: NET,
273    pub connector_fd: *mut ::std::os::raw::c_uchar,
274    pub host: *mut ::std::os::raw::c_char,
275    pub user: *mut ::std::os::raw::c_char,
276    pub passwd: *mut ::std::os::raw::c_char,
277    pub unix_socket: *mut ::std::os::raw::c_char,
278    pub server_version: *mut ::std::os::raw::c_char,
279    pub host_info: *mut ::std::os::raw::c_char,
280    pub info: *mut ::std::os::raw::c_char,
281    pub db: *mut ::std::os::raw::c_char,
282    pub charset: *mut st_mysql_charset_info_st,
283    pub fields: *mut MYSQL_FIELD,
284    pub field_alloc: MEM_ROOT,
285    pub affected_rows: my_ulonglong,
286    pub insert_id: my_ulonglong,
287    pub extra_info: my_ulonglong,
288    pub thread_id: ::std::os::raw::c_ulong,
289    pub packet_length: ::std::os::raw::c_ulong,
290    pub port: ::std::os::raw::c_uint,
291    pub client_flag: ::std::os::raw::c_ulong,
292    pub server_capabilities: ::std::os::raw::c_ulong,
293    pub protocol_version: ::std::os::raw::c_uint,
294    pub field_count: ::std::os::raw::c_uint,
295    pub server_status: ::std::os::raw::c_uint,
296    pub server_language: ::std::os::raw::c_uint,
297    pub warning_count: ::std::os::raw::c_uint,
298    pub options: st_mysql_options,
299    pub status: mysql_status,
300    pub free_me: my_bool,
301    pub reconnect: my_bool,
302    pub scramble: [::std::os::raw::c_char; 21usize],
303    pub unused1: my_bool,
304    pub unused2: *mut ::std::os::raw::c_void,
305    pub unused3: *mut ::std::os::raw::c_void,
306    pub unused4: *mut ::std::os::raw::c_void,
307    pub unused5: *mut ::std::os::raw::c_void,
308    pub stmts: *mut LIST,
309    pub methods: *const st_mysql_methods,
310    pub thd: *mut ::std::os::raw::c_void,
311    pub unbuffered_fetch_owner: *mut my_bool,
312    pub info_buffer: *mut ::std::os::raw::c_char,
313    pub extension: *mut ::std::os::raw::c_void,
314}
315#[repr(C)]
316#[derive(Debug, Copy, Clone)]
317pub struct st_mysql_charset_info_st([u8; 0]);
318#[test]
319fn bindgen_test_layout_st_mysql() {
320    assert_eq!(::std::mem::size_of::<st_mysql>(), 1304usize);
321    assert_eq!(::std::mem::align_of::<st_mysql>(), 8usize);
322}
323#[repr(C)]
324#[derive(Debug, Copy)]
325pub struct st_plugin_vio_info {
326    pub protocol: st_plugin_vio_info__bindgen_ty_1,
327    /**< it's set, if the protocol is SOCKET or TCP */
328    pub socket: ::std::os::raw::c_int,
329}
330pub const st_plugin_vio_info_MYSQL_VIO_INVALID: st_plugin_vio_info__bindgen_ty_1 =
331    st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_INVALID;
332pub const st_plugin_vio_info_MYSQL_VIO_TCP: st_plugin_vio_info__bindgen_ty_1 =
333    st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_TCP;
334pub const st_plugin_vio_info_MYSQL_VIO_SOCKET: st_plugin_vio_info__bindgen_ty_1 =
335    st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_SOCKET;
336pub const st_plugin_vio_info_MYSQL_VIO_PIPE: st_plugin_vio_info__bindgen_ty_1 =
337    st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_PIPE;
338pub const st_plugin_vio_info_MYSQL_VIO_MEMORY: st_plugin_vio_info__bindgen_ty_1 =
339    st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_MEMORY;
340#[repr(u32)]
341#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
342pub enum st_plugin_vio_info__bindgen_ty_1 {
343    MYSQL_VIO_INVALID = 0,
344    MYSQL_VIO_TCP = 1,
345    MYSQL_VIO_SOCKET = 2,
346    MYSQL_VIO_PIPE = 3,
347    MYSQL_VIO_MEMORY = 4,
348}
349#[test]
350fn bindgen_test_layout_st_plugin_vio_info() {
351    assert_eq!(::std::mem::size_of::<st_plugin_vio_info>(), 8usize);
352    assert_eq!(::std::mem::align_of::<st_plugin_vio_info>(), 4usize);
353}
354impl Clone for st_plugin_vio_info {
355    fn clone(&self) -> Self {
356        *self
357    }
358}
359pub type MYSQL_PLUGIN_VIO_INFO = st_plugin_vio_info;
360/**
361  Provides plugin access to communication channel
362*/
363#[repr(C)]
364#[derive(Debug, Copy)]
365pub struct st_plugin_vio {
366    /**
367    Plugin provides a pointer reference and this function sets it to the
368    contents of any incoming packet. Returns the packet length, or -1 if
369    the plugin should terminate.
370  */
371    pub read_packet:
372        ::std::option::Option<unsafe extern "C" fn(vio: *mut st_plugin_vio,
373                                                   buf: *mut *mut ::std::os::raw::c_uchar)
374                                                   -> ::std::os::raw::c_int>,
375    /**
376    Plugin provides a buffer with data and the length and this
377    function sends it as a packet. Returns 0 on success, 1 on failure.
378  */
379    pub write_packet:
380        ::std::option::Option<unsafe extern "C" fn(vio: *mut st_plugin_vio,
381                                                   packet: *const ::std::os::raw::c_uchar,
382                                                   packet_len: ::std::os::raw::c_int)
383                                                   -> ::std::os::raw::c_int>,
384    /**
385    Fills in a st_plugin_vio_info structure, providing the information
386    about the connection.
387  */
388    pub info: ::std::option::Option<unsafe extern "C" fn(vio: *mut st_plugin_vio,
389                                                             info: *mut st_plugin_vio_info)>,
390}
391#[test]
392fn bindgen_test_layout_st_plugin_vio() {
393    assert_eq!(::std::mem::size_of::<st_plugin_vio>(), 24usize);
394    assert_eq!(::std::mem::align_of::<st_plugin_vio>(), 8usize);
395}
396impl Clone for st_plugin_vio {
397    fn clone(&self) -> Self {
398        *self
399    }
400}
401pub type MYSQL_PLUGIN_VIO = st_plugin_vio;
402extern "C" {
403    /**
404  loads a plugin and initializes it
405
406  @param mysql  MYSQL structure.
407  @param name   a name of the plugin to load
408  @param type   type of plugin that should be loaded, -1 to disable type check
409  @param argc   number of arguments to pass to the plugin initialization
410                function
411  @param ...    arguments for the plugin initialization function
412
413  @retval
414  a pointer to the loaded plugin, or NULL in case of a failure
415*/
416    pub fn mysql_load_plugin(mysql: *mut st_mysql,
417                             name: *const ::std::os::raw::c_char,
418                             type_: ::std::os::raw::c_int,
419                             argc: ::std::os::raw::c_int,
420                             ...)
421                             -> *mut st_mysql_client_plugin;
422}
423extern "C" {
424    /**
425  loads a plugin and initializes it, taking va_list as an argument
426
427  This is the same as mysql_load_plugin, but take va_list instead of
428  a list of arguments.
429
430  @param mysql  MYSQL structure.
431  @param name   a name of the plugin to load
432  @param type   type of plugin that should be loaded, -1 to disable type check
433  @param argc   number of arguments to pass to the plugin initialization
434                function
435  @param args   arguments for the plugin initialization function
436
437  @retval
438  a pointer to the loaded plugin, or NULL in case of a failure
439*/
440    pub fn mysql_load_plugin_v(mysql: *mut st_mysql,
441                               name: *const ::std::os::raw::c_char,
442                               type_: ::std::os::raw::c_int,
443                               argc: ::std::os::raw::c_int,
444                               args: *mut __va_list_tag)
445                               -> *mut st_mysql_client_plugin;
446}
447extern "C" {
448    /**
449  finds an already loaded plugin by name, or loads it, if necessary
450
451  @param mysql  MYSQL structure.
452  @param name   a name of the plugin to load
453  @param type   type of plugin that should be loaded
454
455  @retval
456  a pointer to the plugin, or NULL in case of a failure
457*/
458    pub fn mysql_client_find_plugin(mysql: *mut st_mysql,
459                                    name: *const ::std::os::raw::c_char,
460                                    type_: ::std::os::raw::c_int)
461                                    -> *mut st_mysql_client_plugin;
462}
463extern "C" {
464    /**
465  adds a plugin structure to the list of loaded plugins
466
467  This is useful if an application has the necessary functionality
468  (for example, a special load data handler) statically linked into
469  the application binary. It can use this function to register the plugin
470  directly, avoiding the need to factor it out into a shared object.
471
472  @param mysql  MYSQL structure. It is only used for error reporting
473  @param plugin an st_mysql_client_plugin structure to register
474
475  @retval
476  a pointer to the plugin, or NULL in case of a failure
477*/
478    pub fn mysql_client_register_plugin(mysql: *mut st_mysql,
479                                        plugin: *mut st_mysql_client_plugin)
480                                        -> *mut st_mysql_client_plugin;
481}
482extern "C" {
483    /**
484  set plugin options
485
486  Can be used to set extra options and affect behavior for a plugin.
487  This function may be called multiple times to set several options
488
489  @param plugin an st_mysql_client_plugin structure
490  @param option a string which specifies the option to set
491  @param value  value for the option.
492
493  @retval 0 on success, 1 in case of failure
494**/
495    pub fn mysql_plugin_options(plugin: *mut st_mysql_client_plugin,
496                                option: *const ::std::os::raw::c_char,
497                                value: *const ::std::os::raw::c_void)
498                                -> ::std::os::raw::c_int;
499}
500#[repr(C)]
501#[derive(Debug, Copy)]
502pub struct st_mysql_field {
503    pub name: *mut ::std::os::raw::c_char,
504    pub org_name: *mut ::std::os::raw::c_char,
505    pub table: *mut ::std::os::raw::c_char,
506    pub org_table: *mut ::std::os::raw::c_char,
507    pub db: *mut ::std::os::raw::c_char,
508    pub catalog: *mut ::std::os::raw::c_char,
509    pub def: *mut ::std::os::raw::c_char,
510    pub length: ::std::os::raw::c_ulong,
511    pub max_length: ::std::os::raw::c_ulong,
512    pub name_length: ::std::os::raw::c_uint,
513    pub org_name_length: ::std::os::raw::c_uint,
514    pub table_length: ::std::os::raw::c_uint,
515    pub org_table_length: ::std::os::raw::c_uint,
516    pub db_length: ::std::os::raw::c_uint,
517    pub catalog_length: ::std::os::raw::c_uint,
518    pub def_length: ::std::os::raw::c_uint,
519    pub flags: ::std::os::raw::c_uint,
520    pub decimals: ::std::os::raw::c_uint,
521    pub charsetnr: ::std::os::raw::c_uint,
522    pub type_: enum_field_types,
523    pub extension: *mut ::std::os::raw::c_void,
524}
525#[test]
526fn bindgen_test_layout_st_mysql_field() {
527    assert_eq!(::std::mem::size_of::<st_mysql_field>(), 128usize);
528    assert_eq!(::std::mem::align_of::<st_mysql_field>(), 8usize);
529}
530impl Clone for st_mysql_field {
531    fn clone(&self) -> Self {
532        *self
533    }
534}
535pub type MYSQL_FIELD = st_mysql_field;
536pub type MYSQL_ROW = *mut *mut ::std::os::raw::c_char;
537pub type MYSQL_FIELD_OFFSET = ::std::os::raw::c_uint;
538pub type my_ulonglong = ::std::os::raw::c_ulonglong;
539/**
540  Instrumented memory key.
541  To instrument memory, a memory key must be obtained using @c register_memory.
542  Using a zero key always disable the instrumentation.
543*/
544pub type PSI_memory_key = ::std::os::raw::c_uint;
545#[repr(C)]
546#[derive(Debug, Copy)]
547pub struct st_used_mem {
548    pub next: *mut st_used_mem,
549    pub left: ::std::os::raw::c_uint,
550    pub size: ::std::os::raw::c_uint,
551}
552#[test]
553fn bindgen_test_layout_st_used_mem() {
554    assert_eq!(::std::mem::size_of::<st_used_mem>(), 16usize);
555    assert_eq!(::std::mem::align_of::<st_used_mem>(), 8usize);
556}
557impl Clone for st_used_mem {
558    fn clone(&self) -> Self {
559        *self
560    }
561}
562pub type USED_MEM = st_used_mem;
563#[repr(C)]
564#[derive(Debug, Copy)]
565pub struct st_mem_root {
566    pub free: *mut USED_MEM,
567    pub used: *mut USED_MEM,
568    pub pre_alloc: *mut USED_MEM,
569    pub min_malloc: usize,
570    pub block_size: usize,
571    pub block_num: ::std::os::raw::c_uint,
572    pub first_block_usage: ::std::os::raw::c_uint,
573    pub max_capacity: usize,
574    pub allocated_size: usize,
575    pub error_for_capacity_exceeded: my_bool,
576    pub error_handler: ::std::option::Option<unsafe extern "C" fn()>,
577    pub m_psi_key: PSI_memory_key,
578}
579#[test]
580fn bindgen_test_layout_st_mem_root() {
581    assert_eq!(::std::mem::size_of::<st_mem_root>(), 88usize);
582    assert_eq!(::std::mem::align_of::<st_mem_root>(), 8usize);
583}
584impl Clone for st_mem_root {
585    fn clone(&self) -> Self {
586        *self
587    }
588}
589pub type MEM_ROOT = st_mem_root;
590#[repr(C)]
591#[derive(Debug, Copy)]
592pub struct st_mysql_rows {
593    pub next: *mut st_mysql_rows,
594    pub data: MYSQL_ROW,
595    pub length: ::std::os::raw::c_ulong,
596}
597#[test]
598fn bindgen_test_layout_st_mysql_rows() {
599    assert_eq!(::std::mem::size_of::<st_mysql_rows>(), 24usize);
600    assert_eq!(::std::mem::align_of::<st_mysql_rows>(), 8usize);
601}
602impl Clone for st_mysql_rows {
603    fn clone(&self) -> Self {
604        *self
605    }
606}
607pub type MYSQL_ROWS = st_mysql_rows;
608pub type MYSQL_ROW_OFFSET = *mut MYSQL_ROWS;
609#[repr(C)]
610#[derive(Debug, Copy, Clone)]
611pub struct embedded_query_result([u8; 0]);
612#[repr(C)]
613#[derive(Debug, Copy)]
614pub struct st_mysql_data {
615    pub data: *mut MYSQL_ROWS,
616    pub embedded_info: *mut embedded_query_result,
617    pub alloc: MEM_ROOT,
618    pub rows: my_ulonglong,
619    pub fields: ::std::os::raw::c_uint,
620    pub extension: *mut ::std::os::raw::c_void,
621}
622#[test]
623fn bindgen_test_layout_st_mysql_data() {
624    assert_eq!(::std::mem::size_of::<st_mysql_data>(), 128usize);
625    assert_eq!(::std::mem::align_of::<st_mysql_data>(), 8usize);
626}
627impl Clone for st_mysql_data {
628    fn clone(&self) -> Self {
629        *self
630    }
631}
632pub type MYSQL_DATA = st_mysql_data;
633#[repr(u32)]
634#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
635pub enum mysql_option {
636    MYSQL_OPT_CONNECT_TIMEOUT = 0,
637    MYSQL_OPT_COMPRESS = 1,
638    MYSQL_OPT_NAMED_PIPE = 2,
639    MYSQL_INIT_COMMAND = 3,
640    MYSQL_READ_DEFAULT_FILE = 4,
641    MYSQL_READ_DEFAULT_GROUP = 5,
642    MYSQL_SET_CHARSET_DIR = 6,
643    MYSQL_SET_CHARSET_NAME = 7,
644    MYSQL_OPT_LOCAL_INFILE = 8,
645    MYSQL_OPT_PROTOCOL = 9,
646    MYSQL_SHARED_MEMORY_BASE_NAME = 10,
647    MYSQL_OPT_READ_TIMEOUT = 11,
648    MYSQL_OPT_WRITE_TIMEOUT = 12,
649    MYSQL_OPT_USE_RESULT = 13,
650    MYSQL_OPT_USE_REMOTE_CONNECTION = 14,
651    MYSQL_OPT_USE_EMBEDDED_CONNECTION = 15,
652    MYSQL_OPT_GUESS_CONNECTION = 16,
653    MYSQL_SET_CLIENT_IP = 17,
654    MYSQL_SECURE_AUTH = 18,
655    MYSQL_REPORT_DATA_TRUNCATION = 19,
656    MYSQL_OPT_RECONNECT = 20,
657    MYSQL_OPT_SSL_VERIFY_SERVER_CERT = 21,
658    MYSQL_PLUGIN_DIR = 22,
659    MYSQL_DEFAULT_AUTH = 23,
660    MYSQL_OPT_BIND = 24,
661    MYSQL_OPT_SSL_KEY = 25,
662    MYSQL_OPT_SSL_CERT = 26,
663    MYSQL_OPT_SSL_CA = 27,
664    MYSQL_OPT_SSL_CAPATH = 28,
665    MYSQL_OPT_SSL_CIPHER = 29,
666    MYSQL_OPT_SSL_CRL = 30,
667    MYSQL_OPT_SSL_CRLPATH = 31,
668    MYSQL_OPT_CONNECT_ATTR_RESET = 32,
669    MYSQL_OPT_CONNECT_ATTR_ADD = 33,
670    MYSQL_OPT_CONNECT_ATTR_DELETE = 34,
671    MYSQL_SERVER_PUBLIC_KEY = 35,
672    MYSQL_ENABLE_CLEARTEXT_PLUGIN = 36,
673    MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS = 37,
674    MYSQL_OPT_SSL_ENFORCE = 38,
675    MYSQL_OPT_MAX_ALLOWED_PACKET = 39,
676    MYSQL_OPT_NET_BUFFER_LENGTH = 40,
677    MYSQL_OPT_TLS_VERSION = 41,
678    MYSQL_OPT_SSL_MODE = 42,
679}
680#[repr(C)]
681#[derive(Debug, Copy, Clone)]
682pub struct st_mysql_options_extention([u8; 0]);
683#[repr(C)]
684#[derive(Debug, Copy)]
685pub struct st_mysql_options {
686    pub connect_timeout: ::std::os::raw::c_uint,
687    pub read_timeout: ::std::os::raw::c_uint,
688    pub write_timeout: ::std::os::raw::c_uint,
689    pub port: ::std::os::raw::c_uint,
690    pub protocol: ::std::os::raw::c_uint,
691    pub client_flag: ::std::os::raw::c_ulong,
692    pub host: *mut ::std::os::raw::c_char,
693    pub user: *mut ::std::os::raw::c_char,
694    pub password: *mut ::std::os::raw::c_char,
695    pub unix_socket: *mut ::std::os::raw::c_char,
696    pub db: *mut ::std::os::raw::c_char,
697    pub init_commands: *mut st_mysql_options_st_dynamic_array,
698    pub my_cnf_file: *mut ::std::os::raw::c_char,
699    pub my_cnf_group: *mut ::std::os::raw::c_char,
700    pub charset_dir: *mut ::std::os::raw::c_char,
701    pub charset_name: *mut ::std::os::raw::c_char,
702    pub ssl_key: *mut ::std::os::raw::c_char,
703    pub ssl_cert: *mut ::std::os::raw::c_char,
704    pub ssl_ca: *mut ::std::os::raw::c_char,
705    pub ssl_capath: *mut ::std::os::raw::c_char,
706    pub ssl_cipher: *mut ::std::os::raw::c_char,
707    pub shared_memory_base_name: *mut ::std::os::raw::c_char,
708    pub max_allowed_packet: ::std::os::raw::c_ulong,
709    pub use_ssl: my_bool,
710    pub compress: my_bool,
711    pub named_pipe: my_bool,
712    pub unused1: my_bool,
713    pub unused2: my_bool,
714    pub unused3: my_bool,
715    pub unused4: my_bool,
716    pub methods_to_use: mysql_option,
717    pub ci: st_mysql_options__bindgen_ty_1,
718    pub unused5: my_bool,
719    pub report_data_truncation: my_bool,
720    pub local_infile_init:
721        ::std::option::Option<unsafe extern "C" fn(arg1: *mut *mut ::std::os::raw::c_void,
722                                                   arg2: *const ::std::os::raw::c_char,
723                                                   arg3: *mut ::std::os::raw::c_void)
724                                                   -> ::std::os::raw::c_int>,
725    pub local_infile_read:
726        ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void,
727                                                   arg2: *mut ::std::os::raw::c_char,
728                                                   arg3: ::std::os::raw::c_uint)
729                                                   -> ::std::os::raw::c_int>,
730    pub local_infile_end:
731        ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>,
732    pub local_infile_error:
733        ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void,
734                                                   arg2: *mut ::std::os::raw::c_char,
735                                                   arg3: ::std::os::raw::c_uint)
736                                                   -> ::std::os::raw::c_int>,
737    pub local_infile_userdata: *mut ::std::os::raw::c_void,
738    pub extension: *mut st_mysql_options_extention,
739}
740#[repr(C)]
741#[derive(Debug, Copy, Clone)]
742pub struct st_mysql_options_st_dynamic_array([u8; 0]);
743#[repr(C)]
744#[derive(Debug, Copy)]
745pub struct st_mysql_options__bindgen_ty_1 {
746    pub client_ip: __BindgenUnionField<*mut ::std::os::raw::c_char>,
747    pub bind_address: __BindgenUnionField<*mut ::std::os::raw::c_char>,
748    pub bindgen_union_field: u64,
749}
750#[test]
751fn bindgen_test_layout_st_mysql_options__bindgen_ty_1() {
752    assert_eq!(::std::mem::size_of::<st_mysql_options__bindgen_ty_1>(),
753               8usize);
754    assert_eq!(::std::mem::align_of::<st_mysql_options__bindgen_ty_1>(),
755               8usize);
756}
757impl Clone for st_mysql_options__bindgen_ty_1 {
758    fn clone(&self) -> Self {
759        *self
760    }
761}
762#[test]
763fn bindgen_test_layout_st_mysql_options() {
764    assert_eq!(::std::mem::size_of::<st_mysql_options>(), 248usize);
765    assert_eq!(::std::mem::align_of::<st_mysql_options>(), 8usize);
766}
767impl Clone for st_mysql_options {
768    fn clone(&self) -> Self {
769        *self
770    }
771}
772#[repr(u32)]
773#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
774pub enum mysql_status {
775    MYSQL_STATUS_READY = 0,
776    MYSQL_STATUS_GET_RESULT = 1,
777    MYSQL_STATUS_USE_RESULT = 2,
778    MYSQL_STATUS_STATEMENT_GET_RESULT = 3,
779}
780#[repr(u32)]
781#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
782pub enum mysql_protocol_type {
783    MYSQL_PROTOCOL_DEFAULT = 0,
784    MYSQL_PROTOCOL_TCP = 1,
785    MYSQL_PROTOCOL_SOCKET = 2,
786    MYSQL_PROTOCOL_PIPE = 3,
787    MYSQL_PROTOCOL_MEMORY = 4,
788}
789#[repr(u32)]
790#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
791pub enum mysql_ssl_mode {
792    SSL_MODE_DISABLED = 1,
793    SSL_MODE_PREFERRED = 2,
794    SSL_MODE_REQUIRED = 3,
795    SSL_MODE_VERIFY_CA = 4,
796    SSL_MODE_VERIFY_IDENTITY = 5,
797}
798#[repr(C)]
799#[derive(Debug, Copy)]
800pub struct character_set {
801    pub number: ::std::os::raw::c_uint,
802    pub state: ::std::os::raw::c_uint,
803    pub csname: *const ::std::os::raw::c_char,
804    pub name: *const ::std::os::raw::c_char,
805    pub comment: *const ::std::os::raw::c_char,
806    pub dir: *const ::std::os::raw::c_char,
807    pub mbminlen: ::std::os::raw::c_uint,
808    pub mbmaxlen: ::std::os::raw::c_uint,
809}
810#[test]
811fn bindgen_test_layout_character_set() {
812    assert_eq!(::std::mem::size_of::<character_set>(), 48usize);
813    assert_eq!(::std::mem::align_of::<character_set>(), 8usize);
814}
815impl Clone for character_set {
816    fn clone(&self) -> Self {
817        *self
818    }
819}
820pub type MY_CHARSET_INFO = character_set;
821#[repr(C)]
822#[derive(Debug, Copy, Clone)]
823pub struct st_mysql_methods([u8; 0]);
824#[repr(C)]
825pub struct st_mysql_stmt {
826    pub mem_root: MEM_ROOT,
827    pub list: LIST,
828    pub mysql: *mut MYSQL,
829    pub params: *mut MYSQL_BIND,
830    pub bind: *mut MYSQL_BIND,
831    pub fields: *mut MYSQL_FIELD,
832    pub result: MYSQL_DATA,
833    pub data_cursor: *mut MYSQL_ROWS,
834    pub read_row_func:
835        ::std::option::Option<unsafe extern "C" fn(stmt: *mut st_mysql_stmt,
836                                                   row: *mut *mut ::std::os::raw::c_uchar)
837                                                   -> ::std::os::raw::c_int>,
838    pub affected_rows: my_ulonglong,
839    pub insert_id: my_ulonglong,
840    pub stmt_id: ::std::os::raw::c_ulong,
841    pub flags: ::std::os::raw::c_ulong,
842    pub prefetch_rows: ::std::os::raw::c_ulong,
843    pub server_status: ::std::os::raw::c_uint,
844    pub last_errno: ::std::os::raw::c_uint,
845    pub param_count: ::std::os::raw::c_uint,
846    pub field_count: ::std::os::raw::c_uint,
847    pub state: enum_mysql_stmt_state,
848    pub last_error: [::std::os::raw::c_char; 512usize],
849    pub sqlstate: [::std::os::raw::c_char; 6usize],
850    pub send_types_to_server: my_bool,
851    pub bind_param_done: my_bool,
852    pub bind_result_done: ::std::os::raw::c_uchar,
853    pub unbuffered_fetch_cancelled: my_bool,
854    pub update_max_length: my_bool,
855    pub extension: *mut st_mysql_stmt_extension,
856}
857#[test]
858fn bindgen_test_layout_st_mysql_stmt() {
859    assert_eq!(::std::mem::size_of::<st_mysql_stmt>(), 880usize);
860    assert_eq!(::std::mem::align_of::<st_mysql_stmt>(), 8usize);
861}
862pub type MYSQL = st_mysql;
863#[repr(C)]
864#[derive(Debug, Copy)]
865pub struct st_mysql_res {
866    pub row_count: my_ulonglong,
867    pub fields: *mut MYSQL_FIELD,
868    pub data: *mut MYSQL_DATA,
869    pub data_cursor: *mut MYSQL_ROWS,
870    pub lengths: *mut ::std::os::raw::c_ulong,
871    pub handle: *mut MYSQL,
872    pub methods: *const st_mysql_methods,
873    pub row: MYSQL_ROW,
874    pub current_row: MYSQL_ROW,
875    pub field_alloc: MEM_ROOT,
876    pub field_count: ::std::os::raw::c_uint,
877    pub current_field: ::std::os::raw::c_uint,
878    pub eof: my_bool,
879    pub unbuffered_fetch_cancelled: my_bool,
880    pub extension: *mut ::std::os::raw::c_void,
881}
882#[test]
883fn bindgen_test_layout_st_mysql_res() {
884    assert_eq!(::std::mem::size_of::<st_mysql_res>(), 184usize);
885    assert_eq!(::std::mem::align_of::<st_mysql_res>(), 8usize);
886}
887impl Clone for st_mysql_res {
888    fn clone(&self) -> Self {
889        *self
890    }
891}
892pub type MYSQL_RES = st_mysql_res;
893extern "C" {
894    pub fn mysql_server_init(argc: ::std::os::raw::c_int,
895                             argv: *mut *mut ::std::os::raw::c_char,
896                             groups: *mut *mut ::std::os::raw::c_char)
897                             -> ::std::os::raw::c_int;
898}
899extern "C" {
900    pub fn mysql_server_end();
901}
902extern "C" {
903    pub fn mysql_thread_init() -> my_bool;
904}
905extern "C" {
906    pub fn mysql_thread_end();
907}
908extern "C" {
909    pub fn mysql_num_rows(res: *mut MYSQL_RES) -> my_ulonglong;
910}
911extern "C" {
912    pub fn mysql_num_fields(res: *mut MYSQL_RES) -> ::std::os::raw::c_uint;
913}
914extern "C" {
915    pub fn mysql_eof(res: *mut MYSQL_RES) -> my_bool;
916}
917extern "C" {
918    pub fn mysql_fetch_field_direct(res: *mut MYSQL_RES,
919                                    fieldnr: ::std::os::raw::c_uint)
920                                    -> *mut MYSQL_FIELD;
921}
922extern "C" {
923    pub fn mysql_fetch_fields(res: *mut MYSQL_RES) -> *mut MYSQL_FIELD;
924}
925extern "C" {
926    pub fn mysql_row_tell(res: *mut MYSQL_RES) -> MYSQL_ROW_OFFSET;
927}
928extern "C" {
929    pub fn mysql_field_tell(res: *mut MYSQL_RES) -> MYSQL_FIELD_OFFSET;
930}
931extern "C" {
932    pub fn mysql_field_count(mysql: *mut MYSQL) -> ::std::os::raw::c_uint;
933}
934extern "C" {
935    pub fn mysql_affected_rows(mysql: *mut MYSQL) -> my_ulonglong;
936}
937extern "C" {
938    pub fn mysql_insert_id(mysql: *mut MYSQL) -> my_ulonglong;
939}
940extern "C" {
941    pub fn mysql_errno(mysql: *mut MYSQL) -> ::std::os::raw::c_uint;
942}
943extern "C" {
944    pub fn mysql_error(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char;
945}
946extern "C" {
947    pub fn mysql_sqlstate(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char;
948}
949extern "C" {
950    pub fn mysql_warning_count(mysql: *mut MYSQL) -> ::std::os::raw::c_uint;
951}
952extern "C" {
953    pub fn mysql_info(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char;
954}
955extern "C" {
956    pub fn mysql_thread_id(mysql: *mut MYSQL) -> ::std::os::raw::c_ulong;
957}
958extern "C" {
959    pub fn mysql_character_set_name(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char;
960}
961extern "C" {
962    pub fn mysql_set_character_set(mysql: *mut MYSQL,
963                                   csname: *const ::std::os::raw::c_char)
964                                   -> ::std::os::raw::c_int;
965}
966extern "C" {
967    pub fn mysql_init(mysql: *mut MYSQL) -> *mut MYSQL;
968}
969extern "C" {
970    pub fn mysql_ssl_set(mysql: *mut MYSQL,
971                         key: *const ::std::os::raw::c_char,
972                         cert: *const ::std::os::raw::c_char,
973                         ca: *const ::std::os::raw::c_char,
974                         capath: *const ::std::os::raw::c_char,
975                         cipher: *const ::std::os::raw::c_char)
976                         -> my_bool;
977}
978extern "C" {
979    pub fn mysql_get_ssl_cipher(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char;
980}
981extern "C" {
982    pub fn mysql_change_user(mysql: *mut MYSQL,
983                             user: *const ::std::os::raw::c_char,
984                             passwd: *const ::std::os::raw::c_char,
985                             db: *const ::std::os::raw::c_char)
986                             -> my_bool;
987}
988extern "C" {
989    pub fn mysql_real_connect(mysql: *mut MYSQL,
990                              host: *const ::std::os::raw::c_char,
991                              user: *const ::std::os::raw::c_char,
992                              passwd: *const ::std::os::raw::c_char,
993                              db: *const ::std::os::raw::c_char,
994                              port: ::std::os::raw::c_uint,
995                              unix_socket: *const ::std::os::raw::c_char,
996                              clientflag: ::std::os::raw::c_ulong)
997                              -> *mut MYSQL;
998}
999extern "C" {
1000    pub fn mysql_select_db(mysql: *mut MYSQL,
1001                           db: *const ::std::os::raw::c_char)
1002                           -> ::std::os::raw::c_int;
1003}
1004extern "C" {
1005    pub fn mysql_query(mysql: *mut MYSQL,
1006                       q: *const ::std::os::raw::c_char)
1007                       -> ::std::os::raw::c_int;
1008}
1009extern "C" {
1010    pub fn mysql_send_query(mysql: *mut MYSQL,
1011                            q: *const ::std::os::raw::c_char,
1012                            length: ::std::os::raw::c_ulong)
1013                            -> ::std::os::raw::c_int;
1014}
1015extern "C" {
1016    pub fn mysql_real_query(mysql: *mut MYSQL,
1017                            q: *const ::std::os::raw::c_char,
1018                            length: ::std::os::raw::c_ulong)
1019                            -> ::std::os::raw::c_int;
1020}
1021extern "C" {
1022    pub fn mysql_store_result(mysql: *mut MYSQL) -> *mut MYSQL_RES;
1023}
1024extern "C" {
1025    pub fn mysql_use_result(mysql: *mut MYSQL) -> *mut MYSQL_RES;
1026}
1027extern "C" {
1028    pub fn mysql_get_character_set_info(mysql: *mut MYSQL, charset: *mut MY_CHARSET_INFO);
1029}
1030extern "C" {
1031    pub fn mysql_session_track_get_first(mysql: *mut MYSQL,
1032                                         type_: enum_session_state_type,
1033                                         data: *mut *const ::std::os::raw::c_char,
1034                                         length: *mut usize)
1035                                         -> ::std::os::raw::c_int;
1036}
1037extern "C" {
1038    pub fn mysql_session_track_get_next(mysql: *mut MYSQL,
1039                                        type_: enum_session_state_type,
1040                                        data: *mut *const ::std::os::raw::c_char,
1041                                        length: *mut usize)
1042                                        -> ::std::os::raw::c_int;
1043}
1044extern "C" {
1045    pub fn mysql_set_local_infile_handler(mysql: *mut MYSQL,
1046                                          local_infile_init:
1047                                              ::std::option::Option<unsafe extern "C" fn(arg1:
1048                                                                                             *mut *mut ::std::os::raw::c_void,
1049                                                                                         arg2:
1050                                                                                             *const ::std::os::raw::c_char,
1051                                                                                         arg3:
1052                                                                                             *mut ::std::os::raw::c_void)
1053                                                                        ->
1054                                                                            ::std::os::raw::c_int>,
1055                                          local_infile_read:
1056                                              ::std::option::Option<unsafe extern "C" fn(arg1:
1057                                                                                             *mut ::std::os::raw::c_void,
1058                                                                                         arg2:
1059                                                                                             *mut ::std::os::raw::c_char,
1060                                                                                         arg3:
1061                                                                                             ::std::os::raw::c_uint)
1062                                                                        ->
1063                                                                            ::std::os::raw::c_int>,
1064                                          local_infile_end:
1065                                              ::std::option::Option<unsafe extern "C" fn(arg1:
1066                                                                                             *mut ::std::os::raw::c_void)>,
1067                                          local_infile_error:
1068                                              ::std::option::Option<unsafe extern "C" fn(arg1:
1069                                                                                             *mut ::std::os::raw::c_void,
1070                                                                                         arg2:
1071                                                                                             *mut ::std::os::raw::c_char,
1072                                                                                         arg3:
1073                                                                                             ::std::os::raw::c_uint)
1074                                                                        ->
1075                                                                            ::std::os::raw::c_int>,
1076arg1: *mut ::std::os::raw::c_void);
1077}
1078extern "C" {
1079    pub fn mysql_set_local_infile_default(mysql: *mut MYSQL);
1080}
1081extern "C" {
1082    pub fn mysql_shutdown(mysql: *mut MYSQL,
1083                          shutdown_level: mysql_enum_shutdown_level)
1084                          -> ::std::os::raw::c_int;
1085}
1086extern "C" {
1087    pub fn mysql_dump_debug_info(mysql: *mut MYSQL) -> ::std::os::raw::c_int;
1088}
1089extern "C" {
1090    pub fn mysql_refresh(mysql: *mut MYSQL,
1091                         refresh_options: ::std::os::raw::c_uint)
1092                         -> ::std::os::raw::c_int;
1093}
1094extern "C" {
1095    pub fn mysql_kill(mysql: *mut MYSQL, pid: ::std::os::raw::c_ulong) -> ::std::os::raw::c_int;
1096}
1097extern "C" {
1098    pub fn mysql_set_server_option(mysql: *mut MYSQL,
1099                                   option: enum_mysql_set_option)
1100                                   -> ::std::os::raw::c_int;
1101}
1102extern "C" {
1103    pub fn mysql_ping(mysql: *mut MYSQL) -> ::std::os::raw::c_int;
1104}
1105extern "C" {
1106    pub fn mysql_stat(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char;
1107}
1108extern "C" {
1109    pub fn mysql_get_server_info(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char;
1110}
1111extern "C" {
1112    pub fn mysql_get_client_info() -> *const ::std::os::raw::c_char;
1113}
1114extern "C" {
1115    pub fn mysql_get_client_version() -> ::std::os::raw::c_ulong;
1116}
1117extern "C" {
1118    pub fn mysql_get_host_info(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char;
1119}
1120extern "C" {
1121    pub fn mysql_get_server_version(mysql: *mut MYSQL) -> ::std::os::raw::c_ulong;
1122}
1123extern "C" {
1124    pub fn mysql_get_proto_info(mysql: *mut MYSQL) -> ::std::os::raw::c_uint;
1125}
1126extern "C" {
1127    pub fn mysql_list_dbs(mysql: *mut MYSQL,
1128                          wild: *const ::std::os::raw::c_char)
1129                          -> *mut MYSQL_RES;
1130}
1131extern "C" {
1132    pub fn mysql_list_tables(mysql: *mut MYSQL,
1133                             wild: *const ::std::os::raw::c_char)
1134                             -> *mut MYSQL_RES;
1135}
1136extern "C" {
1137    pub fn mysql_list_processes(mysql: *mut MYSQL) -> *mut MYSQL_RES;
1138}
1139extern "C" {
1140    pub fn mysql_options(mysql: *mut MYSQL,
1141                         option: mysql_option,
1142                         arg: *const ::std::os::raw::c_void)
1143                         -> ::std::os::raw::c_int;
1144}
1145extern "C" {
1146    pub fn mysql_options4(mysql: *mut MYSQL,
1147                          option: mysql_option,
1148                          arg1: *const ::std::os::raw::c_void,
1149                          arg2: *const ::std::os::raw::c_void)
1150                          -> ::std::os::raw::c_int;
1151}
1152extern "C" {
1153    pub fn mysql_get_option(mysql: *mut MYSQL,
1154                            option: mysql_option,
1155                            arg: *const ::std::os::raw::c_void)
1156                            -> ::std::os::raw::c_int;
1157}
1158extern "C" {
1159    pub fn mysql_free_result(result: *mut MYSQL_RES);
1160}
1161extern "C" {
1162    pub fn mysql_data_seek(result: *mut MYSQL_RES, offset: my_ulonglong);
1163}
1164extern "C" {
1165    pub fn mysql_row_seek(result: *mut MYSQL_RES, offset: MYSQL_ROW_OFFSET) -> MYSQL_ROW_OFFSET;
1166}
1167extern "C" {
1168    pub fn mysql_field_seek(result: *mut MYSQL_RES,
1169                            offset: MYSQL_FIELD_OFFSET)
1170                            -> MYSQL_FIELD_OFFSET;
1171}
1172extern "C" {
1173    pub fn mysql_fetch_row(result: *mut MYSQL_RES) -> MYSQL_ROW;
1174}
1175extern "C" {
1176    pub fn mysql_fetch_lengths(result: *mut MYSQL_RES) -> *mut ::std::os::raw::c_ulong;
1177}
1178extern "C" {
1179    pub fn mysql_fetch_field(result: *mut MYSQL_RES) -> *mut MYSQL_FIELD;
1180}
1181extern "C" {
1182    pub fn mysql_list_fields(mysql: *mut MYSQL,
1183                             table: *const ::std::os::raw::c_char,
1184                             wild: *const ::std::os::raw::c_char)
1185                             -> *mut MYSQL_RES;
1186}
1187extern "C" {
1188    pub fn mysql_escape_string(to: *mut ::std::os::raw::c_char,
1189                               from: *const ::std::os::raw::c_char,
1190                               from_length: ::std::os::raw::c_ulong)
1191                               -> ::std::os::raw::c_ulong;
1192}
1193extern "C" {
1194    pub fn mysql_hex_string(to: *mut ::std::os::raw::c_char,
1195                            from: *const ::std::os::raw::c_char,
1196                            from_length: ::std::os::raw::c_ulong)
1197                            -> ::std::os::raw::c_ulong;
1198}
1199extern "C" {
1200    pub fn mysql_real_escape_string(mysql: *mut MYSQL,
1201                                    to: *mut ::std::os::raw::c_char,
1202                                    from: *const ::std::os::raw::c_char,
1203                                    length: ::std::os::raw::c_ulong)
1204                                    -> ::std::os::raw::c_ulong;
1205}
1206extern "C" {
1207    pub fn mysql_real_escape_string_quote(mysql: *mut MYSQL,
1208                                          to: *mut ::std::os::raw::c_char,
1209                                          from: *const ::std::os::raw::c_char,
1210                                          length: ::std::os::raw::c_ulong,
1211                                          quote: ::std::os::raw::c_char)
1212                                          -> ::std::os::raw::c_ulong;
1213}
1214extern "C" {
1215    pub fn mysql_debug(debug: *const ::std::os::raw::c_char);
1216}
1217extern "C" {
1218    pub fn mysql_thread_safe() -> ::std::os::raw::c_uint;
1219}
1220extern "C" {
1221    pub fn mysql_embedded() -> my_bool;
1222}
1223extern "C" {
1224    pub fn mysql_read_query_result(mysql: *mut MYSQL) -> my_bool;
1225}
1226extern "C" {
1227    pub fn mysql_reset_connection(mysql: *mut MYSQL) -> ::std::os::raw::c_int;
1228}
1229#[repr(u32)]
1230#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
1231pub enum enum_mysql_stmt_state {
1232    MYSQL_STMT_INIT_DONE = 1,
1233    MYSQL_STMT_PREPARE_DONE = 2,
1234    MYSQL_STMT_EXECUTE_DONE = 3,
1235    MYSQL_STMT_FETCH_DONE = 4,
1236}
1237#[repr(C)]
1238#[derive(Debug, Copy)]
1239pub struct st_mysql_bind {
1240    pub length: *mut ::std::os::raw::c_ulong,
1241    pub is_null: *mut my_bool,
1242    pub buffer: *mut ::std::os::raw::c_void,
1243    pub error: *mut my_bool,
1244    pub row_ptr: *mut ::std::os::raw::c_uchar,
1245    pub store_param_func:
1246        ::std::option::Option<unsafe extern "C" fn(net: *mut NET, param: *mut st_mysql_bind)>,
1247    pub fetch_result:
1248        ::std::option::Option<unsafe extern "C" fn(arg1: *mut st_mysql_bind,
1249                                                   arg2: *mut MYSQL_FIELD,
1250                                                   row: *mut *mut ::std::os::raw::c_uchar)>,
1251    pub skip_result:
1252        ::std::option::Option<unsafe extern "C" fn(arg1: *mut st_mysql_bind,
1253                                                   arg2: *mut MYSQL_FIELD,
1254                                                   row: *mut *mut ::std::os::raw::c_uchar)>,
1255    pub buffer_length: ::std::os::raw::c_ulong,
1256    pub offset: ::std::os::raw::c_ulong,
1257    pub length_value: ::std::os::raw::c_ulong,
1258    pub param_number: ::std::os::raw::c_uint,
1259    pub pack_length: ::std::os::raw::c_uint,
1260    pub buffer_type: enum_field_types,
1261    pub error_value: my_bool,
1262    pub is_unsigned: my_bool,
1263    pub long_data_used: my_bool,
1264    pub is_null_value: my_bool,
1265    pub extension: *mut ::std::os::raw::c_void,
1266}
1267#[test]
1268fn bindgen_test_layout_st_mysql_bind() {
1269    assert_eq!(::std::mem::size_of::<st_mysql_bind>(), 112usize);
1270    assert_eq!(::std::mem::align_of::<st_mysql_bind>(), 8usize);
1271}
1272impl Clone for st_mysql_bind {
1273    fn clone(&self) -> Self {
1274        *self
1275    }
1276}
1277pub type MYSQL_BIND = st_mysql_bind;
1278#[repr(C)]
1279#[derive(Debug, Copy, Clone)]
1280pub struct st_mysql_stmt_extension([u8; 0]);
1281pub type MYSQL_STMT = st_mysql_stmt;
1282#[repr(u32)]
1283#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
1284pub enum enum_stmt_attr_type {
1285    STMT_ATTR_UPDATE_MAX_LENGTH = 0,
1286    STMT_ATTR_CURSOR_TYPE = 1,
1287    STMT_ATTR_PREFETCH_ROWS = 2,
1288}
1289extern "C" {
1290    pub fn mysql_stmt_init(mysql: *mut MYSQL) -> *mut MYSQL_STMT;
1291}
1292extern "C" {
1293    pub fn mysql_stmt_prepare(stmt: *mut MYSQL_STMT,
1294                              query: *const ::std::os::raw::c_char,
1295                              length: ::std::os::raw::c_ulong)
1296                              -> ::std::os::raw::c_int;
1297}
1298extern "C" {
1299    pub fn mysql_stmt_execute(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_int;
1300}
1301extern "C" {
1302    pub fn mysql_stmt_fetch(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_int;
1303}
1304extern "C" {
1305    pub fn mysql_stmt_fetch_column(stmt: *mut MYSQL_STMT,
1306                                   bind_arg: *mut MYSQL_BIND,
1307                                   column: ::std::os::raw::c_uint,
1308                                   offset: ::std::os::raw::c_ulong)
1309                                   -> ::std::os::raw::c_int;
1310}
1311extern "C" {
1312    pub fn mysql_stmt_store_result(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_int;
1313}
1314extern "C" {
1315    pub fn mysql_stmt_param_count(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_ulong;
1316}
1317extern "C" {
1318    pub fn mysql_stmt_attr_set(stmt: *mut MYSQL_STMT,
1319                               attr_type: enum_stmt_attr_type,
1320                               attr: *const ::std::os::raw::c_void)
1321                               -> my_bool;
1322}
1323extern "C" {
1324    pub fn mysql_stmt_attr_get(stmt: *mut MYSQL_STMT,
1325                               attr_type: enum_stmt_attr_type,
1326                               attr: *mut ::std::os::raw::c_void)
1327                               -> my_bool;
1328}
1329extern "C" {
1330    pub fn mysql_stmt_bind_param(stmt: *mut MYSQL_STMT, bnd: *mut MYSQL_BIND) -> my_bool;
1331}
1332extern "C" {
1333    pub fn mysql_stmt_bind_result(stmt: *mut MYSQL_STMT, bnd: *mut MYSQL_BIND) -> my_bool;
1334}
1335extern "C" {
1336    pub fn mysql_stmt_close(stmt: *mut MYSQL_STMT) -> my_bool;
1337}
1338extern "C" {
1339    pub fn mysql_stmt_reset(stmt: *mut MYSQL_STMT) -> my_bool;
1340}
1341extern "C" {
1342    pub fn mysql_stmt_free_result(stmt: *mut MYSQL_STMT) -> my_bool;
1343}
1344extern "C" {
1345    pub fn mysql_stmt_send_long_data(stmt: *mut MYSQL_STMT,
1346                                     param_number: ::std::os::raw::c_uint,
1347                                     data: *const ::std::os::raw::c_char,
1348                                     length: ::std::os::raw::c_ulong)
1349                                     -> my_bool;
1350}
1351extern "C" {
1352    pub fn mysql_stmt_result_metadata(stmt: *mut MYSQL_STMT) -> *mut MYSQL_RES;
1353}
1354extern "C" {
1355    pub fn mysql_stmt_param_metadata(stmt: *mut MYSQL_STMT) -> *mut MYSQL_RES;
1356}
1357extern "C" {
1358    pub fn mysql_stmt_errno(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_uint;
1359}
1360extern "C" {
1361    pub fn mysql_stmt_error(stmt: *mut MYSQL_STMT) -> *const ::std::os::raw::c_char;
1362}
1363extern "C" {
1364    pub fn mysql_stmt_sqlstate(stmt: *mut MYSQL_STMT) -> *const ::std::os::raw::c_char;
1365}
1366extern "C" {
1367    pub fn mysql_stmt_row_seek(stmt: *mut MYSQL_STMT,
1368                               offset: MYSQL_ROW_OFFSET)
1369                               -> MYSQL_ROW_OFFSET;
1370}
1371extern "C" {
1372    pub fn mysql_stmt_row_tell(stmt: *mut MYSQL_STMT) -> MYSQL_ROW_OFFSET;
1373}
1374extern "C" {
1375    pub fn mysql_stmt_data_seek(stmt: *mut MYSQL_STMT, offset: my_ulonglong);
1376}
1377extern "C" {
1378    pub fn mysql_stmt_num_rows(stmt: *mut MYSQL_STMT) -> my_ulonglong;
1379}
1380extern "C" {
1381    pub fn mysql_stmt_affected_rows(stmt: *mut MYSQL_STMT) -> my_ulonglong;
1382}
1383extern "C" {
1384    pub fn mysql_stmt_insert_id(stmt: *mut MYSQL_STMT) -> my_ulonglong;
1385}
1386extern "C" {
1387    pub fn mysql_stmt_field_count(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_uint;
1388}
1389extern "C" {
1390    pub fn mysql_commit(mysql: *mut MYSQL) -> my_bool;
1391}
1392extern "C" {
1393    pub fn mysql_rollback(mysql: *mut MYSQL) -> my_bool;
1394}
1395extern "C" {
1396    pub fn mysql_autocommit(mysql: *mut MYSQL, auto_mode: my_bool) -> my_bool;
1397}
1398extern "C" {
1399    pub fn mysql_more_results(mysql: *mut MYSQL) -> my_bool;
1400}
1401extern "C" {
1402    pub fn mysql_next_result(mysql: *mut MYSQL) -> ::std::os::raw::c_int;
1403}
1404extern "C" {
1405    pub fn mysql_stmt_next_result(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_int;
1406}
1407extern "C" {
1408    pub fn mysql_close(sock: *mut MYSQL);
1409}
1410#[repr(C)]
1411#[derive(Debug, Copy)]
1412pub struct __va_list_tag {
1413    pub gp_offset: ::std::os::raw::c_uint,
1414    pub fp_offset: ::std::os::raw::c_uint,
1415    pub overflow_arg_area: *mut ::std::os::raw::c_void,
1416    pub reg_save_area: *mut ::std::os::raw::c_void,
1417}
1418impl Clone for __va_list_tag {
1419    fn clone(&self) -> Self {
1420        *self
1421    }
1422}
1423pub type __builtin_va_list = [__va_list_tag; 1usize];