mysqlclient-sys-0.2.5/.appveyor.yml000064400000000000000000000026560072674642500155170ustar 00000000000000environment: matrix: - target: x86_64-pc-windows-gnu MYSQLCLIENT_LIB_DIR: C:\Program Files\MySQL\MySQL Server 5.7\lib - target: x86_64-pc-windows-msvc APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 MYSQLCLIENT_LIB_DIR: C:\Program Files\MySQL\MySQL Server 5.7\lib - target: x86_64-pc-windows-msvc RUSTFLAGS: -Ctarget-feature=+crt-static VCPKG_DEFAULT_TRIPLET: x64-windows-static - target: x86_64-pc-windows-msvc VCPKG_DEFAULT_TRIPLET: x64-windows VCPKGRS_DYNAMIC: 1 install: - curl -fsS --retry 3 --retry-connrefused -o rustup-init.exe https://win.rustup.rs/ # nightly is required for RUSTFLAGS=-Ctarget-feature=+crt-static until Rust 1.19 - if not defined RUSTFLAGS rustup-init -y --default-toolchain stable --default-host %target% - if defined RUSTFLAGS rustup-init -y --default-toolchain nightly --default-host %target% - set PATH=%PATH%;%USERPROFILE%\.cargo\bin - rustc -vV - cargo -vV # install vcpkg if required - if defined VCPKG_DEFAULT_TRIPLET git clone https://github.com/Microsoft/vcpkg c:\projects\vcpkg - if defined VCPKG_DEFAULT_TRIPLET c:\projects\vcpkg\bootstrap-vcpkg.bat - if defined VCPKG_DEFAULT_TRIPLET set VCPKG_ROOT=c:\projects\vcpkg - if defined VCPKG_DEFAULT_TRIPLET echo yes > %VCPKG_ROOT%\Downloads\AlwaysAllowDownloads - if defined VCPKG_DEFAULT_TRIPLET %VCPKG_ROOT%\vcpkg.exe install libmysql build: false test_script: - cargo test mysqlclient-sys-0.2.5/.cargo_vcs_info.json0000644000000001120000000000100142120ustar { "git": { "sha1": "9c4d0c26cc9751925940852602a88fb39878fbc0" } } mysqlclient-sys-0.2.5/.gitignore000064400000000000000000000000220072674642500150220ustar 00000000000000target Cargo.lock mysqlclient-sys-0.2.5/.travis.yml000064400000000000000000000003210072674642500151450ustar 00000000000000language: rust dist: trusty rust: - stable - beta - nightly os: - linux - osx before_script: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install mysql-connector-c ; fi script: - cargo test mysqlclient-sys-0.2.5/Cargo.toml0000644000000016020000000000100122150ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] name = "mysqlclient-sys" version = "0.2.5" authors = ["Sean Griffin "] build = "build.rs" links = "mysqlclient" description = "Auto-generated rust bindings for libmysqlclient" license = "MIT OR Apache-2.0" repository = "https://github.com/sgrif/mysqlclient-sys" [build-dependencies.pkg-config] version = "0.3.9" [target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg] version = "0.2.4" mysqlclient-sys-0.2.5/Cargo.toml.orig000064400000000000000000000006370072674642500157350ustar 00000000000000[package] name = "mysqlclient-sys" version = "0.2.5" authors = ["Sean Griffin "] description = "Auto-generated rust bindings for libmysqlclient" license = "MIT OR Apache-2.0" repository = "https://github.com/sgrif/mysqlclient-sys" build = "build.rs" links = "mysqlclient" [build-dependencies] pkg-config = "0.3.9" [target.'cfg(target_env = "msvc")'.build-dependencies] vcpkg = "0.2.4" mysqlclient-sys-0.2.5/LICENSE-APACHE000064400000000000000000000250120072674642500147640ustar 00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Copyright 2015-2017 Sean Griffin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. mysqlclient-sys-0.2.5/LICENSE-MIT000064400000000000000000000020740072674642500144770ustar 00000000000000The MIT License (MIT) Copyright (c) 2015-2017 Sean Griffin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. mysqlclient-sys-0.2.5/README.md000064400000000000000000000040240072674642500143170ustar 00000000000000mysqlclient-sys ====== Autogenerated Rust bindings for libmysql-client (`#include `) Building -------- For this crate to build, `libmysqlclient` must be installed on your system (`brew install mysql` on macOS, `apt-get install libmysqlclient-dev` on Ubuntu, included with the server distribution on Windows). Additionally, either `pkg-config` or `mysql_config` must be present and able to successfully locate `libmysqlclient`. The build script of the crate will attempt to find the lib path of libmysql-client using the following methods: - First, it will attempt to use pkg-config to locate it. All the config options, such as `PKG_CONFIG_ALLOW_CROSS`, `PKG_CONFIG_ALL_STATIC` etc., of the crate [pkg-config](http://alexcrichton.com/pkg-config-rs/pkg_config/index.html) apply. - MSVC ABI builds will then check for a [Vcpkg](https://github.com/Microsoft/vcpkg) installation using the [vcpkg cargo build helper](https://github.com/mcgoo/vcpkg-rs). Set the `VCKPG_ROOT` environment variable to point to your Vcpkg installation and run `vcpkg install libmysql:x64-windows` to install the required libraries. - If the library cannot be found using `pkg-config`, it will invoke the command `mysql_config --variable=pkglibdir` The bindings will be generated against the headers present on your system at compile time. We will attempt to determine the include directory by using the output of the first command in this list to return successfully: - `pkg-config --variable=includedir mysqlclient` - `mysql_config --variable=pkgincludedir` ## License Licensed under either of * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) at your option. ### Contribution Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. mysqlclient-sys-0.2.5/build.rs000064400000000000000000000026100072674642500145040ustar 00000000000000extern crate pkg_config; #[cfg(target_env = "msvc")] extern crate vcpkg; use std::env; use std::process::Command; fn main() { if pkg_config::probe_library("mysqlclient").is_ok() { // pkg_config did everything for us return } else if try_vcpkg() { // vcpkg did everything for us return; } else if let Ok(path) = env::var("MYSQLCLIENT_LIB_DIR") { println!("cargo:rustc-link-search=native={}", path); } else if let Some(path) = mysql_config_variable("pkglibdir") { println!("cargo:rustc-link-search=native={}", path); } if cfg!(all(windows, target_env="gnu")) { println!("cargo:rustc-link-lib=dylib=mysql"); } else if cfg!(all(windows, target_env="msvc")) { println!("cargo:rustc-link-lib=static=mysqlclient"); } else { println!("cargo:rustc-link-lib=mysqlclient"); } } fn mysql_config_variable(var_name: &str) -> Option { Command::new("mysql_config") .arg(format!("--variable={}", var_name)) .output() .into_iter() .filter(|output| output.status.success()) .flat_map(|output| String::from_utf8(output.stdout).ok()) .map(|output| output.trim().to_string()) .next() } #[cfg(target_env = "msvc")] fn try_vcpkg() -> bool { vcpkg::find_package("libmysql").is_ok() } #[cfg(not(target_env = "msvc"))] fn try_vcpkg() -> bool { false } mysqlclient-sys-0.2.5/src/bindings_macos.rs000064400000000000000000001471150072674642500171650ustar 00000000000000/* automatically generated by rust-bindgen */ #[repr(C)] pub struct __BindgenUnionField(::std::marker::PhantomData); impl __BindgenUnionField { #[inline] pub fn new() -> Self { __BindgenUnionField(::std::marker::PhantomData) } #[inline] pub unsafe fn as_ref(&self) -> &T { ::std::mem::transmute(self) } #[inline] pub unsafe fn as_mut(&mut self) -> &mut T { ::std::mem::transmute(self) } } impl ::std::default::Default for __BindgenUnionField { #[inline] fn default() -> Self { Self::new() } } impl ::std::clone::Clone for __BindgenUnionField { #[inline] fn clone(&self) -> Self { Self::new() } } impl ::std::marker::Copy for __BindgenUnionField {} impl ::std::fmt::Debug for __BindgenUnionField { fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { fmt.write_str("__BindgenUnionField") } } pub const MYSQL_SERVER_VERSION: &'static [u8; 7usize] = b"5.7.11\x00"; pub const MYSQL_BASE_VERSION: &'static [u8; 11usize] = b"mysqld-5.7\x00"; pub const MYSQL_SERVER_SUFFIX_DEF: &'static [u8; 1usize] = b"\x00"; pub const MYSQL_VERSION_ID: ::std::os::raw::c_uint = 50711; pub const MYSQL_PORT: ::std::os::raw::c_uint = 3306; pub const MYSQL_PORT_DEFAULT: ::std::os::raw::c_uint = 0; pub const MYSQL_UNIX_ADDR: &'static [u8; 16usize] = b"/tmp/mysql.sock\x00"; pub const MYSQL_CONFIG_NAME: &'static [u8; 3usize] = b"my\x00"; pub const MYSQL_COMPILATION_COMMENT: &'static [u8; 9usize] = b"Homebrew\x00"; pub const MYSQL_AUTODETECT_CHARSET_NAME: &'static [u8; 5usize] = b"auto\x00"; pub const MYSQL_ERRMSG_SIZE: ::std::os::raw::c_uint = 512; pub const MYSQL_STMT_HEADER: ::std::os::raw::c_uint = 4; pub const MYSQL_LONG_DATA_HEADER: ::std::os::raw::c_uint = 6; pub const MYSQL_CLIENT_reserved1: ::std::os::raw::c_uint = 0; pub const MYSQL_CLIENT_reserved2: ::std::os::raw::c_uint = 1; pub const MYSQL_CLIENT_AUTHENTICATION_PLUGIN: ::std::os::raw::c_uint = 2; pub const MYSQL_CLIENT_TRACE_PLUGIN: ::std::os::raw::c_uint = 3; pub const MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION: ::std::os::raw::c_uint = 256; pub const MYSQL_CLIENT_TRACE_PLUGIN_INTERFACE_VERSION: ::std::os::raw::c_uint = 256; pub const MYSQL_CLIENT_MAX_PLUGINS: ::std::os::raw::c_uint = 4; pub const MYSQL_USERNAME_LENGTH: ::std::os::raw::c_uint = 96; pub const MYSQL_NO_DATA: ::std::os::raw::c_uint = 100; pub const MYSQL_DATA_TRUNCATED: ::std::os::raw::c_uint = 101; pub type __darwin_size_t = ::std::os::raw::c_ulong; pub type my_bool = ::std::os::raw::c_char; pub type my_socket = ::std::os::raw::c_int; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum enum_field_types { MYSQL_TYPE_DECIMAL = 0, MYSQL_TYPE_TINY = 1, MYSQL_TYPE_SHORT = 2, MYSQL_TYPE_LONG = 3, MYSQL_TYPE_FLOAT = 4, MYSQL_TYPE_DOUBLE = 5, MYSQL_TYPE_NULL = 6, MYSQL_TYPE_TIMESTAMP = 7, MYSQL_TYPE_LONGLONG = 8, MYSQL_TYPE_INT24 = 9, MYSQL_TYPE_DATE = 10, MYSQL_TYPE_TIME = 11, MYSQL_TYPE_DATETIME = 12, MYSQL_TYPE_YEAR = 13, MYSQL_TYPE_NEWDATE = 14, MYSQL_TYPE_VARCHAR = 15, MYSQL_TYPE_BIT = 16, MYSQL_TYPE_TIMESTAMP2 = 17, MYSQL_TYPE_DATETIME2 = 18, MYSQL_TYPE_TIME2 = 19, MYSQL_TYPE_JSON = 245, MYSQL_TYPE_NEWDECIMAL = 246, MYSQL_TYPE_ENUM = 247, MYSQL_TYPE_SET = 248, MYSQL_TYPE_TINY_BLOB = 249, MYSQL_TYPE_MEDIUM_BLOB = 250, MYSQL_TYPE_LONG_BLOB = 251, MYSQL_TYPE_BLOB = 252, MYSQL_TYPE_VAR_STRING = 253, MYSQL_TYPE_STRING = 254, MYSQL_TYPE_GEOMETRY = 255, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct st_vio([u8; 0]); pub type Vio = st_vio; #[repr(C)] pub struct st_net { pub vio: *mut Vio, pub buff: *mut ::std::os::raw::c_uchar, pub buff_end: *mut ::std::os::raw::c_uchar, pub write_pos: *mut ::std::os::raw::c_uchar, pub read_pos: *mut ::std::os::raw::c_uchar, pub fd: my_socket, pub remain_in_buf: ::std::os::raw::c_ulong, pub length: ::std::os::raw::c_ulong, pub buf_length: ::std::os::raw::c_ulong, pub where_b: ::std::os::raw::c_ulong, pub max_packet: ::std::os::raw::c_ulong, pub max_packet_size: ::std::os::raw::c_ulong, pub pkt_nr: ::std::os::raw::c_uint, pub compress_pkt_nr: ::std::os::raw::c_uint, pub write_timeout: ::std::os::raw::c_uint, pub read_timeout: ::std::os::raw::c_uint, pub retry_count: ::std::os::raw::c_uint, pub fcntl: ::std::os::raw::c_int, pub return_status: *mut ::std::os::raw::c_uint, pub reading_or_writing: ::std::os::raw::c_uchar, pub save_char: ::std::os::raw::c_char, pub unused1: my_bool, pub unused2: my_bool, pub compress: my_bool, pub unused3: my_bool, pub unused: *mut ::std::os::raw::c_uchar, pub last_errno: ::std::os::raw::c_uint, pub error: ::std::os::raw::c_uchar, pub unused4: my_bool, pub unused5: my_bool, /** Client library error message buffer. Actually belongs to struct MYSQL. */ pub last_error: [::std::os::raw::c_char; 512usize], /** Client library sqlstate buffer. Set along with the error message. */ pub sqlstate: [::std::os::raw::c_char; 6usize], /** Extension pointer, for the caller private use. Any program linking with the networking library can use this pointer, which is handy when private connection specific data needs to be maintained. The mysqld server process uses this pointer internally, to maintain the server internal instrumentation for the connection. */ pub extension: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_st_net() { assert_eq!(::std::mem::size_of::(), 680usize); assert_eq!(::std::mem::align_of::(), 8usize); } pub type NET = st_net; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum mysql_enum_shutdown_level { SHUTDOWN_DEFAULT = 0, SHUTDOWN_WAIT_CONNECTIONS = 1, SHUTDOWN_WAIT_TRANSACTIONS = 2, SHUTDOWN_WAIT_UPDATES = 8, SHUTDOWN_WAIT_ALL_BUFFERS = 16, SHUTDOWN_WAIT_CRITICAL_BUFFERS = 17, KILL_QUERY = 254, KILL_CONNECTION = 255, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum enum_mysql_set_option { MYSQL_OPTION_MULTI_STATEMENTS_ON = 0, MYSQL_OPTION_MULTI_STATEMENTS_OFF = 1, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum enum_session_state_type { SESSION_TRACK_SYSTEM_VARIABLES = 0, SESSION_TRACK_SCHEMA = 1, SESSION_TRACK_STATE_CHANGE = 2, SESSION_TRACK_GTIDS = 3, SESSION_TRACK_TRANSACTION_CHARACTERISTICS = 4, SESSION_TRACK_TRANSACTION_STATE = 5, } extern "C" { pub fn mysql_errno_to_sqlstate(mysql_errno: ::std::os::raw::c_uint) -> *const ::std::os::raw::c_char; } #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum enum_mysql_timestamp_type { MYSQL_TIMESTAMP_NONE = -2, MYSQL_TIMESTAMP_ERROR = -1, MYSQL_TIMESTAMP_DATE = 0, MYSQL_TIMESTAMP_DATETIME = 1, MYSQL_TIMESTAMP_TIME = 2, } #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_time { pub year: ::std::os::raw::c_uint, pub month: ::std::os::raw::c_uint, pub day: ::std::os::raw::c_uint, pub hour: ::std::os::raw::c_uint, pub minute: ::std::os::raw::c_uint, pub second: ::std::os::raw::c_uint, /**< microseconds */ pub second_part: ::std::os::raw::c_ulong, pub neg: my_bool, pub time_type: enum_mysql_timestamp_type, } #[test] fn bindgen_test_layout_st_mysql_time() { assert_eq!(::std::mem::size_of::(), 40usize); assert_eq!(::std::mem::align_of::(), 8usize); } impl Clone for st_mysql_time { fn clone(&self) -> Self { *self } } pub type MYSQL_TIME = st_mysql_time; #[repr(C)] #[derive(Debug, Copy)] pub struct st_list { pub prev: *mut st_list, pub next: *mut st_list, pub data: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_st_list() { assert_eq!(::std::mem::size_of::(), 24usize); assert_eq!(::std::mem::align_of::(), 8usize); } impl Clone for st_list { fn clone(&self) -> Self { *self } } pub type LIST = st_list; pub type va_list = __builtin_va_list; #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_client_plugin { pub type_: ::std::os::raw::c_int, pub interface_version: ::std::os::raw::c_uint, pub name: *const ::std::os::raw::c_char, pub author: *const ::std::os::raw::c_char, pub desc: *const ::std::os::raw::c_char, pub version: [::std::os::raw::c_uint; 3usize], pub license: *const ::std::os::raw::c_char, pub mysql_api: *mut ::std::os::raw::c_void, pub init: ::std::option::Option ::std::os::raw::c_int>, pub deinit: ::std::option::Option ::std::os::raw::c_int>, pub options: ::std::option::Option ::std::os::raw::c_int>, } #[test] fn bindgen_test_layout_st_mysql_client_plugin() { assert_eq!(::std::mem::size_of::(), 88usize); assert_eq!(::std::mem::align_of::(), 8usize); } impl Clone for st_mysql_client_plugin { fn clone(&self) -> Self { *self } } #[repr(C)] pub struct st_mysql { pub net: NET, pub connector_fd: *mut ::std::os::raw::c_uchar, pub host: *mut ::std::os::raw::c_char, pub user: *mut ::std::os::raw::c_char, pub passwd: *mut ::std::os::raw::c_char, pub unix_socket: *mut ::std::os::raw::c_char, pub server_version: *mut ::std::os::raw::c_char, pub host_info: *mut ::std::os::raw::c_char, pub info: *mut ::std::os::raw::c_char, pub db: *mut ::std::os::raw::c_char, pub charset: *mut st_mysql_charset_info_st, pub fields: *mut MYSQL_FIELD, pub field_alloc: MEM_ROOT, pub affected_rows: my_ulonglong, pub insert_id: my_ulonglong, pub extra_info: my_ulonglong, pub thread_id: ::std::os::raw::c_ulong, pub packet_length: ::std::os::raw::c_ulong, pub port: ::std::os::raw::c_uint, pub client_flag: ::std::os::raw::c_ulong, pub server_capabilities: ::std::os::raw::c_ulong, pub protocol_version: ::std::os::raw::c_uint, pub field_count: ::std::os::raw::c_uint, pub server_status: ::std::os::raw::c_uint, pub server_language: ::std::os::raw::c_uint, pub warning_count: ::std::os::raw::c_uint, pub options: st_mysql_options, pub status: mysql_status, pub free_me: my_bool, pub reconnect: my_bool, pub scramble: [::std::os::raw::c_char; 21usize], pub unused1: my_bool, pub unused2: *mut ::std::os::raw::c_void, pub unused3: *mut ::std::os::raw::c_void, pub unused4: *mut ::std::os::raw::c_void, pub unused5: *mut ::std::os::raw::c_void, pub stmts: *mut LIST, pub methods: *const st_mysql_methods, pub thd: *mut ::std::os::raw::c_void, pub unbuffered_fetch_owner: *mut my_bool, pub info_buffer: *mut ::std::os::raw::c_char, pub extension: *mut ::std::os::raw::c_void, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct st_mysql_charset_info_st([u8; 0]); #[test] fn bindgen_test_layout_st_mysql() { assert_eq!(::std::mem::size_of::(), 1304usize); assert_eq!(::std::mem::align_of::(), 8usize); } #[repr(C)] #[derive(Debug, Copy)] pub struct st_plugin_vio_info { pub protocol: st_plugin_vio_info__bindgen_ty_1, /**< it's set, if the protocol is SOCKET or TCP */ pub socket: ::std::os::raw::c_int, } pub const st_plugin_vio_info_MYSQL_VIO_INVALID: st_plugin_vio_info__bindgen_ty_1 = st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_INVALID; pub const st_plugin_vio_info_MYSQL_VIO_TCP: st_plugin_vio_info__bindgen_ty_1 = st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_TCP; pub const st_plugin_vio_info_MYSQL_VIO_SOCKET: st_plugin_vio_info__bindgen_ty_1 = st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_SOCKET; pub const st_plugin_vio_info_MYSQL_VIO_PIPE: st_plugin_vio_info__bindgen_ty_1 = st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_PIPE; pub const st_plugin_vio_info_MYSQL_VIO_MEMORY: st_plugin_vio_info__bindgen_ty_1 = st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_MEMORY; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum st_plugin_vio_info__bindgen_ty_1 { MYSQL_VIO_INVALID = 0, MYSQL_VIO_TCP = 1, MYSQL_VIO_SOCKET = 2, MYSQL_VIO_PIPE = 3, MYSQL_VIO_MEMORY = 4, } #[test] fn bindgen_test_layout_st_plugin_vio_info() { assert_eq!(::std::mem::size_of::(), 8usize); assert_eq!(::std::mem::align_of::(), 4usize); } impl Clone for st_plugin_vio_info { fn clone(&self) -> Self { *self } } pub type MYSQL_PLUGIN_VIO_INFO = st_plugin_vio_info; /** Provides plugin access to communication channel */ #[repr(C)] #[derive(Debug, Copy)] pub struct st_plugin_vio { /** Plugin provides a pointer reference and this function sets it to the contents of any incoming packet. Returns the packet length, or -1 if the plugin should terminate. */ pub read_packet: ::std::option::Option ::std::os::raw::c_int>, /** Plugin provides a buffer with data and the length and this function sends it as a packet. Returns 0 on success, 1 on failure. */ pub write_packet: ::std::option::Option ::std::os::raw::c_int>, /** Fills in a st_plugin_vio_info structure, providing the information about the connection. */ pub info: ::std::option::Option, } #[test] fn bindgen_test_layout_st_plugin_vio() { assert_eq!(::std::mem::size_of::(), 24usize); assert_eq!(::std::mem::align_of::(), 8usize); } impl Clone for st_plugin_vio { fn clone(&self) -> Self { *self } } pub type MYSQL_PLUGIN_VIO = st_plugin_vio; extern "C" { /** loads a plugin and initializes it @param mysql MYSQL structure. @param name a name of the plugin to load @param type type of plugin that should be loaded, -1 to disable type check @param argc number of arguments to pass to the plugin initialization function @param ... arguments for the plugin initialization function @retval a pointer to the loaded plugin, or NULL in case of a failure */ pub fn mysql_load_plugin(mysql: *mut st_mysql, name: *const ::std::os::raw::c_char, type_: ::std::os::raw::c_int, argc: ::std::os::raw::c_int, ...) -> *mut st_mysql_client_plugin; } extern "C" { /** loads a plugin and initializes it, taking va_list as an argument This is the same as mysql_load_plugin, but take va_list instead of a list of arguments. @param mysql MYSQL structure. @param name a name of the plugin to load @param type type of plugin that should be loaded, -1 to disable type check @param argc number of arguments to pass to the plugin initialization function @param args arguments for the plugin initialization function @retval a pointer to the loaded plugin, or NULL in case of a failure */ pub fn mysql_load_plugin_v(mysql: *mut st_mysql, name: *const ::std::os::raw::c_char, type_: ::std::os::raw::c_int, argc: ::std::os::raw::c_int, args: *mut __va_list_tag) -> *mut st_mysql_client_plugin; } extern "C" { /** finds an already loaded plugin by name, or loads it, if necessary @param mysql MYSQL structure. @param name a name of the plugin to load @param type type of plugin that should be loaded @retval a pointer to the plugin, or NULL in case of a failure */ pub fn mysql_client_find_plugin(mysql: *mut st_mysql, name: *const ::std::os::raw::c_char, type_: ::std::os::raw::c_int) -> *mut st_mysql_client_plugin; } extern "C" { /** adds a plugin structure to the list of loaded plugins This is useful if an application has the necessary functionality (for example, a special load data handler) statically linked into the application binary. It can use this function to register the plugin directly, avoiding the need to factor it out into a shared object. @param mysql MYSQL structure. It is only used for error reporting @param plugin an st_mysql_client_plugin structure to register @retval a pointer to the plugin, or NULL in case of a failure */ pub fn mysql_client_register_plugin(mysql: *mut st_mysql, plugin: *mut st_mysql_client_plugin) -> *mut st_mysql_client_plugin; } extern "C" { /** set plugin options Can be used to set extra options and affect behavior for a plugin. This function may be called multiple times to set several options @param plugin an st_mysql_client_plugin structure @param option a string which specifies the option to set @param value value for the option. @retval 0 on success, 1 in case of failure **/ pub fn mysql_plugin_options(plugin: *mut st_mysql_client_plugin, option: *const ::std::os::raw::c_char, value: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int; } #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_field { pub name: *mut ::std::os::raw::c_char, pub org_name: *mut ::std::os::raw::c_char, pub table: *mut ::std::os::raw::c_char, pub org_table: *mut ::std::os::raw::c_char, pub db: *mut ::std::os::raw::c_char, pub catalog: *mut ::std::os::raw::c_char, pub def: *mut ::std::os::raw::c_char, pub length: ::std::os::raw::c_ulong, pub max_length: ::std::os::raw::c_ulong, pub name_length: ::std::os::raw::c_uint, pub org_name_length: ::std::os::raw::c_uint, pub table_length: ::std::os::raw::c_uint, pub org_table_length: ::std::os::raw::c_uint, pub db_length: ::std::os::raw::c_uint, pub catalog_length: ::std::os::raw::c_uint, pub def_length: ::std::os::raw::c_uint, pub flags: ::std::os::raw::c_uint, pub decimals: ::std::os::raw::c_uint, pub charsetnr: ::std::os::raw::c_uint, pub type_: enum_field_types, pub extension: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_st_mysql_field() { assert_eq!(::std::mem::size_of::(), 128usize); assert_eq!(::std::mem::align_of::(), 8usize); } impl Clone for st_mysql_field { fn clone(&self) -> Self { *self } } pub type MYSQL_FIELD = st_mysql_field; pub type MYSQL_ROW = *mut *mut ::std::os::raw::c_char; pub type MYSQL_FIELD_OFFSET = ::std::os::raw::c_uint; pub type my_ulonglong = ::std::os::raw::c_ulonglong; /** Instrumented memory key. To instrument memory, a memory key must be obtained using @c register_memory. Using a zero key always disable the instrumentation. */ pub type PSI_memory_key = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Copy)] pub struct st_used_mem { pub next: *mut st_used_mem, pub left: ::std::os::raw::c_uint, pub size: ::std::os::raw::c_uint, } #[test] fn bindgen_test_layout_st_used_mem() { assert_eq!(::std::mem::size_of::(), 16usize); assert_eq!(::std::mem::align_of::(), 8usize); } impl Clone for st_used_mem { fn clone(&self) -> Self { *self } } pub type USED_MEM = st_used_mem; #[repr(C)] #[derive(Debug, Copy)] pub struct st_mem_root { pub free: *mut USED_MEM, pub used: *mut USED_MEM, pub pre_alloc: *mut USED_MEM, pub min_malloc: usize, pub block_size: usize, pub block_num: ::std::os::raw::c_uint, pub first_block_usage: ::std::os::raw::c_uint, pub max_capacity: usize, pub allocated_size: usize, pub error_for_capacity_exceeded: my_bool, pub error_handler: ::std::option::Option, pub m_psi_key: PSI_memory_key, } #[test] fn bindgen_test_layout_st_mem_root() { assert_eq!(::std::mem::size_of::(), 88usize); assert_eq!(::std::mem::align_of::(), 8usize); } impl Clone for st_mem_root { fn clone(&self) -> Self { *self } } pub type MEM_ROOT = st_mem_root; #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_rows { pub next: *mut st_mysql_rows, pub data: MYSQL_ROW, pub length: ::std::os::raw::c_ulong, } #[test] fn bindgen_test_layout_st_mysql_rows() { assert_eq!(::std::mem::size_of::(), 24usize); assert_eq!(::std::mem::align_of::(), 8usize); } impl Clone for st_mysql_rows { fn clone(&self) -> Self { *self } } pub type MYSQL_ROWS = st_mysql_rows; pub type MYSQL_ROW_OFFSET = *mut MYSQL_ROWS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct embedded_query_result([u8; 0]); #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_data { pub data: *mut MYSQL_ROWS, pub embedded_info: *mut embedded_query_result, pub alloc: MEM_ROOT, pub rows: my_ulonglong, pub fields: ::std::os::raw::c_uint, pub extension: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_st_mysql_data() { assert_eq!(::std::mem::size_of::(), 128usize); assert_eq!(::std::mem::align_of::(), 8usize); } impl Clone for st_mysql_data { fn clone(&self) -> Self { *self } } pub type MYSQL_DATA = st_mysql_data; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum mysql_option { MYSQL_OPT_CONNECT_TIMEOUT = 0, MYSQL_OPT_COMPRESS = 1, MYSQL_OPT_NAMED_PIPE = 2, MYSQL_INIT_COMMAND = 3, MYSQL_READ_DEFAULT_FILE = 4, MYSQL_READ_DEFAULT_GROUP = 5, MYSQL_SET_CHARSET_DIR = 6, MYSQL_SET_CHARSET_NAME = 7, MYSQL_OPT_LOCAL_INFILE = 8, MYSQL_OPT_PROTOCOL = 9, MYSQL_SHARED_MEMORY_BASE_NAME = 10, MYSQL_OPT_READ_TIMEOUT = 11, MYSQL_OPT_WRITE_TIMEOUT = 12, MYSQL_OPT_USE_RESULT = 13, MYSQL_OPT_USE_REMOTE_CONNECTION = 14, MYSQL_OPT_USE_EMBEDDED_CONNECTION = 15, MYSQL_OPT_GUESS_CONNECTION = 16, MYSQL_SET_CLIENT_IP = 17, MYSQL_SECURE_AUTH = 18, MYSQL_REPORT_DATA_TRUNCATION = 19, MYSQL_OPT_RECONNECT = 20, MYSQL_OPT_SSL_VERIFY_SERVER_CERT = 21, MYSQL_PLUGIN_DIR = 22, MYSQL_DEFAULT_AUTH = 23, MYSQL_OPT_BIND = 24, MYSQL_OPT_SSL_KEY = 25, MYSQL_OPT_SSL_CERT = 26, MYSQL_OPT_SSL_CA = 27, MYSQL_OPT_SSL_CAPATH = 28, MYSQL_OPT_SSL_CIPHER = 29, MYSQL_OPT_SSL_CRL = 30, MYSQL_OPT_SSL_CRLPATH = 31, MYSQL_OPT_CONNECT_ATTR_RESET = 32, MYSQL_OPT_CONNECT_ATTR_ADD = 33, MYSQL_OPT_CONNECT_ATTR_DELETE = 34, MYSQL_SERVER_PUBLIC_KEY = 35, MYSQL_ENABLE_CLEARTEXT_PLUGIN = 36, MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS = 37, MYSQL_OPT_SSL_ENFORCE = 38, MYSQL_OPT_MAX_ALLOWED_PACKET = 39, MYSQL_OPT_NET_BUFFER_LENGTH = 40, MYSQL_OPT_TLS_VERSION = 41, MYSQL_OPT_SSL_MODE = 42, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct st_mysql_options_extention([u8; 0]); #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_options { pub connect_timeout: ::std::os::raw::c_uint, pub read_timeout: ::std::os::raw::c_uint, pub write_timeout: ::std::os::raw::c_uint, pub port: ::std::os::raw::c_uint, pub protocol: ::std::os::raw::c_uint, pub client_flag: ::std::os::raw::c_ulong, pub host: *mut ::std::os::raw::c_char, pub user: *mut ::std::os::raw::c_char, pub password: *mut ::std::os::raw::c_char, pub unix_socket: *mut ::std::os::raw::c_char, pub db: *mut ::std::os::raw::c_char, pub init_commands: *mut st_mysql_options_st_dynamic_array, pub my_cnf_file: *mut ::std::os::raw::c_char, pub my_cnf_group: *mut ::std::os::raw::c_char, pub charset_dir: *mut ::std::os::raw::c_char, pub charset_name: *mut ::std::os::raw::c_char, pub ssl_key: *mut ::std::os::raw::c_char, pub ssl_cert: *mut ::std::os::raw::c_char, pub ssl_ca: *mut ::std::os::raw::c_char, pub ssl_capath: *mut ::std::os::raw::c_char, pub ssl_cipher: *mut ::std::os::raw::c_char, pub shared_memory_base_name: *mut ::std::os::raw::c_char, pub max_allowed_packet: ::std::os::raw::c_ulong, pub use_ssl: my_bool, pub compress: my_bool, pub named_pipe: my_bool, pub unused1: my_bool, pub unused2: my_bool, pub unused3: my_bool, pub unused4: my_bool, pub methods_to_use: mysql_option, pub ci: st_mysql_options__bindgen_ty_1, pub unused5: my_bool, pub report_data_truncation: my_bool, pub local_infile_init: ::std::option::Option ::std::os::raw::c_int>, pub local_infile_read: ::std::option::Option ::std::os::raw::c_int>, pub local_infile_end: ::std::option::Option, pub local_infile_error: ::std::option::Option ::std::os::raw::c_int>, pub local_infile_userdata: *mut ::std::os::raw::c_void, pub extension: *mut st_mysql_options_extention, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct st_mysql_options_st_dynamic_array([u8; 0]); #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_options__bindgen_ty_1 { pub client_ip: __BindgenUnionField<*mut ::std::os::raw::c_char>, pub bind_address: __BindgenUnionField<*mut ::std::os::raw::c_char>, pub bindgen_union_field: u64, } #[test] fn bindgen_test_layout_st_mysql_options__bindgen_ty_1() { assert_eq!(::std::mem::size_of::(), 8usize); assert_eq!(::std::mem::align_of::(), 8usize); } impl Clone for st_mysql_options__bindgen_ty_1 { fn clone(&self) -> Self { *self } } #[test] fn bindgen_test_layout_st_mysql_options() { assert_eq!(::std::mem::size_of::(), 248usize); assert_eq!(::std::mem::align_of::(), 8usize); } impl Clone for st_mysql_options { fn clone(&self) -> Self { *self } } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum mysql_status { MYSQL_STATUS_READY = 0, MYSQL_STATUS_GET_RESULT = 1, MYSQL_STATUS_USE_RESULT = 2, MYSQL_STATUS_STATEMENT_GET_RESULT = 3, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum mysql_protocol_type { MYSQL_PROTOCOL_DEFAULT = 0, MYSQL_PROTOCOL_TCP = 1, MYSQL_PROTOCOL_SOCKET = 2, MYSQL_PROTOCOL_PIPE = 3, MYSQL_PROTOCOL_MEMORY = 4, } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum mysql_ssl_mode { SSL_MODE_DISABLED = 1, SSL_MODE_PREFERRED = 2, SSL_MODE_REQUIRED = 3, SSL_MODE_VERIFY_CA = 4, SSL_MODE_VERIFY_IDENTITY = 5, } #[repr(C)] #[derive(Debug, Copy)] pub struct character_set { pub number: ::std::os::raw::c_uint, pub state: ::std::os::raw::c_uint, pub csname: *const ::std::os::raw::c_char, pub name: *const ::std::os::raw::c_char, pub comment: *const ::std::os::raw::c_char, pub dir: *const ::std::os::raw::c_char, pub mbminlen: ::std::os::raw::c_uint, pub mbmaxlen: ::std::os::raw::c_uint, } #[test] fn bindgen_test_layout_character_set() { assert_eq!(::std::mem::size_of::(), 48usize); assert_eq!(::std::mem::align_of::(), 8usize); } impl Clone for character_set { fn clone(&self) -> Self { *self } } pub type MY_CHARSET_INFO = character_set; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct st_mysql_methods([u8; 0]); #[repr(C)] pub struct st_mysql_stmt { pub mem_root: MEM_ROOT, pub list: LIST, pub mysql: *mut MYSQL, pub params: *mut MYSQL_BIND, pub bind: *mut MYSQL_BIND, pub fields: *mut MYSQL_FIELD, pub result: MYSQL_DATA, pub data_cursor: *mut MYSQL_ROWS, pub read_row_func: ::std::option::Option ::std::os::raw::c_int>, pub affected_rows: my_ulonglong, pub insert_id: my_ulonglong, pub stmt_id: ::std::os::raw::c_ulong, pub flags: ::std::os::raw::c_ulong, pub prefetch_rows: ::std::os::raw::c_ulong, pub server_status: ::std::os::raw::c_uint, pub last_errno: ::std::os::raw::c_uint, pub param_count: ::std::os::raw::c_uint, pub field_count: ::std::os::raw::c_uint, pub state: enum_mysql_stmt_state, pub last_error: [::std::os::raw::c_char; 512usize], pub sqlstate: [::std::os::raw::c_char; 6usize], pub send_types_to_server: my_bool, pub bind_param_done: my_bool, pub bind_result_done: ::std::os::raw::c_uchar, pub unbuffered_fetch_cancelled: my_bool, pub update_max_length: my_bool, pub extension: *mut st_mysql_stmt_extension, } #[test] fn bindgen_test_layout_st_mysql_stmt() { assert_eq!(::std::mem::size_of::(), 880usize); assert_eq!(::std::mem::align_of::(), 8usize); } pub type MYSQL = st_mysql; #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_res { pub row_count: my_ulonglong, pub fields: *mut MYSQL_FIELD, pub data: *mut MYSQL_DATA, pub data_cursor: *mut MYSQL_ROWS, pub lengths: *mut ::std::os::raw::c_ulong, pub handle: *mut MYSQL, pub methods: *const st_mysql_methods, pub row: MYSQL_ROW, pub current_row: MYSQL_ROW, pub field_alloc: MEM_ROOT, pub field_count: ::std::os::raw::c_uint, pub current_field: ::std::os::raw::c_uint, pub eof: my_bool, pub unbuffered_fetch_cancelled: my_bool, pub extension: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_st_mysql_res() { assert_eq!(::std::mem::size_of::(), 184usize); assert_eq!(::std::mem::align_of::(), 8usize); } impl Clone for st_mysql_res { fn clone(&self) -> Self { *self } } pub type MYSQL_RES = st_mysql_res; extern "C" { pub fn mysql_server_init(argc: ::std::os::raw::c_int, argv: *mut *mut ::std::os::raw::c_char, groups: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_server_end(); } extern "C" { pub fn mysql_thread_init() -> my_bool; } extern "C" { pub fn mysql_thread_end(); } extern "C" { pub fn mysql_num_rows(res: *mut MYSQL_RES) -> my_ulonglong; } extern "C" { pub fn mysql_num_fields(res: *mut MYSQL_RES) -> ::std::os::raw::c_uint; } extern "C" { pub fn mysql_eof(res: *mut MYSQL_RES) -> my_bool; } extern "C" { pub fn mysql_fetch_field_direct(res: *mut MYSQL_RES, fieldnr: ::std::os::raw::c_uint) -> *mut MYSQL_FIELD; } extern "C" { pub fn mysql_fetch_fields(res: *mut MYSQL_RES) -> *mut MYSQL_FIELD; } extern "C" { pub fn mysql_row_tell(res: *mut MYSQL_RES) -> MYSQL_ROW_OFFSET; } extern "C" { pub fn mysql_field_tell(res: *mut MYSQL_RES) -> MYSQL_FIELD_OFFSET; } extern "C" { pub fn mysql_field_count(mysql: *mut MYSQL) -> ::std::os::raw::c_uint; } extern "C" { pub fn mysql_affected_rows(mysql: *mut MYSQL) -> my_ulonglong; } extern "C" { pub fn mysql_insert_id(mysql: *mut MYSQL) -> my_ulonglong; } extern "C" { pub fn mysql_errno(mysql: *mut MYSQL) -> ::std::os::raw::c_uint; } extern "C" { pub fn mysql_error(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_sqlstate(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_warning_count(mysql: *mut MYSQL) -> ::std::os::raw::c_uint; } extern "C" { pub fn mysql_info(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_thread_id(mysql: *mut MYSQL) -> ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_character_set_name(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_set_character_set(mysql: *mut MYSQL, csname: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_init(mysql: *mut MYSQL) -> *mut MYSQL; } extern "C" { pub fn mysql_ssl_set(mysql: *mut MYSQL, key: *const ::std::os::raw::c_char, cert: *const ::std::os::raw::c_char, ca: *const ::std::os::raw::c_char, capath: *const ::std::os::raw::c_char, cipher: *const ::std::os::raw::c_char) -> my_bool; } extern "C" { pub fn mysql_get_ssl_cipher(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_change_user(mysql: *mut MYSQL, user: *const ::std::os::raw::c_char, passwd: *const ::std::os::raw::c_char, db: *const ::std::os::raw::c_char) -> my_bool; } extern "C" { pub fn mysql_real_connect(mysql: *mut MYSQL, host: *const ::std::os::raw::c_char, user: *const ::std::os::raw::c_char, passwd: *const ::std::os::raw::c_char, db: *const ::std::os::raw::c_char, port: ::std::os::raw::c_uint, unix_socket: *const ::std::os::raw::c_char, clientflag: ::std::os::raw::c_ulong) -> *mut MYSQL; } extern "C" { pub fn mysql_select_db(mysql: *mut MYSQL, db: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_query(mysql: *mut MYSQL, q: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_send_query(mysql: *mut MYSQL, q: *const ::std::os::raw::c_char, length: ::std::os::raw::c_ulong) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_real_query(mysql: *mut MYSQL, q: *const ::std::os::raw::c_char, length: ::std::os::raw::c_ulong) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_store_result(mysql: *mut MYSQL) -> *mut MYSQL_RES; } extern "C" { pub fn mysql_use_result(mysql: *mut MYSQL) -> *mut MYSQL_RES; } extern "C" { pub fn mysql_get_character_set_info(mysql: *mut MYSQL, charset: *mut MY_CHARSET_INFO); } extern "C" { pub fn mysql_session_track_get_first(mysql: *mut MYSQL, type_: enum_session_state_type, data: *mut *const ::std::os::raw::c_char, length: *mut usize) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_session_track_get_next(mysql: *mut MYSQL, type_: enum_session_state_type, data: *mut *const ::std::os::raw::c_char, length: *mut usize) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_set_local_infile_handler(mysql: *mut MYSQL, local_infile_init: ::std::option::Option ::std::os::raw::c_int>, local_infile_read: ::std::option::Option ::std::os::raw::c_int>, local_infile_end: ::std::option::Option, local_infile_error: ::std::option::Option ::std::os::raw::c_int>, arg1: *mut ::std::os::raw::c_void); } extern "C" { pub fn mysql_set_local_infile_default(mysql: *mut MYSQL); } extern "C" { pub fn mysql_shutdown(mysql: *mut MYSQL, shutdown_level: mysql_enum_shutdown_level) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_dump_debug_info(mysql: *mut MYSQL) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_refresh(mysql: *mut MYSQL, refresh_options: ::std::os::raw::c_uint) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_kill(mysql: *mut MYSQL, pid: ::std::os::raw::c_ulong) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_set_server_option(mysql: *mut MYSQL, option: enum_mysql_set_option) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_ping(mysql: *mut MYSQL) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_stat(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_get_server_info(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_get_client_info() -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_get_client_version() -> ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_get_host_info(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_get_server_version(mysql: *mut MYSQL) -> ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_get_proto_info(mysql: *mut MYSQL) -> ::std::os::raw::c_uint; } extern "C" { pub fn mysql_list_dbs(mysql: *mut MYSQL, wild: *const ::std::os::raw::c_char) -> *mut MYSQL_RES; } extern "C" { pub fn mysql_list_tables(mysql: *mut MYSQL, wild: *const ::std::os::raw::c_char) -> *mut MYSQL_RES; } extern "C" { pub fn mysql_list_processes(mysql: *mut MYSQL) -> *mut MYSQL_RES; } extern "C" { pub fn mysql_options(mysql: *mut MYSQL, option: mysql_option, arg: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_options4(mysql: *mut MYSQL, option: mysql_option, arg1: *const ::std::os::raw::c_void, arg2: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_get_option(mysql: *mut MYSQL, option: mysql_option, arg: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_free_result(result: *mut MYSQL_RES); } extern "C" { pub fn mysql_data_seek(result: *mut MYSQL_RES, offset: my_ulonglong); } extern "C" { pub fn mysql_row_seek(result: *mut MYSQL_RES, offset: MYSQL_ROW_OFFSET) -> MYSQL_ROW_OFFSET; } extern "C" { pub fn mysql_field_seek(result: *mut MYSQL_RES, offset: MYSQL_FIELD_OFFSET) -> MYSQL_FIELD_OFFSET; } extern "C" { pub fn mysql_fetch_row(result: *mut MYSQL_RES) -> MYSQL_ROW; } extern "C" { pub fn mysql_fetch_lengths(result: *mut MYSQL_RES) -> *mut ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_fetch_field(result: *mut MYSQL_RES) -> *mut MYSQL_FIELD; } extern "C" { pub fn mysql_list_fields(mysql: *mut MYSQL, table: *const ::std::os::raw::c_char, wild: *const ::std::os::raw::c_char) -> *mut MYSQL_RES; } extern "C" { pub fn mysql_escape_string(to: *mut ::std::os::raw::c_char, from: *const ::std::os::raw::c_char, from_length: ::std::os::raw::c_ulong) -> ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_hex_string(to: *mut ::std::os::raw::c_char, from: *const ::std::os::raw::c_char, from_length: ::std::os::raw::c_ulong) -> ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_real_escape_string(mysql: *mut MYSQL, to: *mut ::std::os::raw::c_char, from: *const ::std::os::raw::c_char, length: ::std::os::raw::c_ulong) -> ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_real_escape_string_quote(mysql: *mut MYSQL, to: *mut ::std::os::raw::c_char, from: *const ::std::os::raw::c_char, length: ::std::os::raw::c_ulong, quote: ::std::os::raw::c_char) -> ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_debug(debug: *const ::std::os::raw::c_char); } extern "C" { pub fn mysql_thread_safe() -> ::std::os::raw::c_uint; } extern "C" { pub fn mysql_embedded() -> my_bool; } extern "C" { pub fn mysql_read_query_result(mysql: *mut MYSQL) -> my_bool; } extern "C" { pub fn mysql_reset_connection(mysql: *mut MYSQL) -> ::std::os::raw::c_int; } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum enum_mysql_stmt_state { MYSQL_STMT_INIT_DONE = 1, MYSQL_STMT_PREPARE_DONE = 2, MYSQL_STMT_EXECUTE_DONE = 3, MYSQL_STMT_FETCH_DONE = 4, } #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_bind { pub length: *mut ::std::os::raw::c_ulong, pub is_null: *mut my_bool, pub buffer: *mut ::std::os::raw::c_void, pub error: *mut my_bool, pub row_ptr: *mut ::std::os::raw::c_uchar, pub store_param_func: ::std::option::Option, pub fetch_result: ::std::option::Option, pub skip_result: ::std::option::Option, pub buffer_length: ::std::os::raw::c_ulong, pub offset: ::std::os::raw::c_ulong, pub length_value: ::std::os::raw::c_ulong, pub param_number: ::std::os::raw::c_uint, pub pack_length: ::std::os::raw::c_uint, pub buffer_type: enum_field_types, pub error_value: my_bool, pub is_unsigned: my_bool, pub long_data_used: my_bool, pub is_null_value: my_bool, pub extension: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_st_mysql_bind() { assert_eq!(::std::mem::size_of::(), 112usize); assert_eq!(::std::mem::align_of::(), 8usize); } impl Clone for st_mysql_bind { fn clone(&self) -> Self { *self } } pub type MYSQL_BIND = st_mysql_bind; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct st_mysql_stmt_extension([u8; 0]); pub type MYSQL_STMT = st_mysql_stmt; #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum enum_stmt_attr_type { STMT_ATTR_UPDATE_MAX_LENGTH = 0, STMT_ATTR_CURSOR_TYPE = 1, STMT_ATTR_PREFETCH_ROWS = 2, } extern "C" { pub fn mysql_stmt_init(mysql: *mut MYSQL) -> *mut MYSQL_STMT; } extern "C" { pub fn mysql_stmt_prepare(stmt: *mut MYSQL_STMT, query: *const ::std::os::raw::c_char, length: ::std::os::raw::c_ulong) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_stmt_execute(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_stmt_fetch(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_stmt_fetch_column(stmt: *mut MYSQL_STMT, bind_arg: *mut MYSQL_BIND, column: ::std::os::raw::c_uint, offset: ::std::os::raw::c_ulong) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_stmt_store_result(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_stmt_param_count(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_stmt_attr_set(stmt: *mut MYSQL_STMT, attr_type: enum_stmt_attr_type, attr: *const ::std::os::raw::c_void) -> my_bool; } extern "C" { pub fn mysql_stmt_attr_get(stmt: *mut MYSQL_STMT, attr_type: enum_stmt_attr_type, attr: *mut ::std::os::raw::c_void) -> my_bool; } extern "C" { pub fn mysql_stmt_bind_param(stmt: *mut MYSQL_STMT, bnd: *mut MYSQL_BIND) -> my_bool; } extern "C" { pub fn mysql_stmt_bind_result(stmt: *mut MYSQL_STMT, bnd: *mut MYSQL_BIND) -> my_bool; } extern "C" { pub fn mysql_stmt_close(stmt: *mut MYSQL_STMT) -> my_bool; } extern "C" { pub fn mysql_stmt_reset(stmt: *mut MYSQL_STMT) -> my_bool; } extern "C" { pub fn mysql_stmt_free_result(stmt: *mut MYSQL_STMT) -> my_bool; } extern "C" { pub fn mysql_stmt_send_long_data(stmt: *mut MYSQL_STMT, param_number: ::std::os::raw::c_uint, data: *const ::std::os::raw::c_char, length: ::std::os::raw::c_ulong) -> my_bool; } extern "C" { pub fn mysql_stmt_result_metadata(stmt: *mut MYSQL_STMT) -> *mut MYSQL_RES; } extern "C" { pub fn mysql_stmt_param_metadata(stmt: *mut MYSQL_STMT) -> *mut MYSQL_RES; } extern "C" { pub fn mysql_stmt_errno(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_uint; } extern "C" { pub fn mysql_stmt_error(stmt: *mut MYSQL_STMT) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_stmt_sqlstate(stmt: *mut MYSQL_STMT) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_stmt_row_seek(stmt: *mut MYSQL_STMT, offset: MYSQL_ROW_OFFSET) -> MYSQL_ROW_OFFSET; } extern "C" { pub fn mysql_stmt_row_tell(stmt: *mut MYSQL_STMT) -> MYSQL_ROW_OFFSET; } extern "C" { pub fn mysql_stmt_data_seek(stmt: *mut MYSQL_STMT, offset: my_ulonglong); } extern "C" { pub fn mysql_stmt_num_rows(stmt: *mut MYSQL_STMT) -> my_ulonglong; } extern "C" { pub fn mysql_stmt_affected_rows(stmt: *mut MYSQL_STMT) -> my_ulonglong; } extern "C" { pub fn mysql_stmt_insert_id(stmt: *mut MYSQL_STMT) -> my_ulonglong; } extern "C" { pub fn mysql_stmt_field_count(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_uint; } extern "C" { pub fn mysql_commit(mysql: *mut MYSQL) -> my_bool; } extern "C" { pub fn mysql_rollback(mysql: *mut MYSQL) -> my_bool; } extern "C" { pub fn mysql_autocommit(mysql: *mut MYSQL, auto_mode: my_bool) -> my_bool; } extern "C" { pub fn mysql_more_results(mysql: *mut MYSQL) -> my_bool; } extern "C" { pub fn mysql_next_result(mysql: *mut MYSQL) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_stmt_next_result(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_close(sock: *mut MYSQL); } #[repr(C)] #[derive(Debug, Copy)] pub struct __va_list_tag { pub gp_offset: ::std::os::raw::c_uint, pub fp_offset: ::std::os::raw::c_uint, pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } impl Clone for __va_list_tag { fn clone(&self) -> Self { *self } } pub type __builtin_va_list = [__va_list_tag; 1usize]; mysqlclient-sys-0.2.5/src/bindings_windows.rs000064400000000000000000003754370072674642500175670ustar 00000000000000/* automatically generated by rust-bindgen */ #[repr(C)] pub struct __BindgenUnionField(::std::marker::PhantomData); impl __BindgenUnionField { #[inline] pub fn new() -> Self { __BindgenUnionField(::std::marker::PhantomData) } #[inline] pub unsafe fn as_ref(&self) -> &T { ::std::mem::transmute(self) } #[inline] pub unsafe fn as_mut(&mut self) -> &mut T { ::std::mem::transmute(self) } } impl ::std::default::Default for __BindgenUnionField { #[inline] fn default() -> Self { Self::new() } } impl ::std::clone::Clone for __BindgenUnionField { #[inline] fn clone(&self) -> Self { Self::new() } } impl ::std::marker::Copy for __BindgenUnionField { } impl ::std::fmt::Debug for __BindgenUnionField { fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { fmt.write_str("__BindgenUnionField") } } pub const MYSQL_SERVER_VERSION: &'static [u8; 7usize] = b"5.7.17\x00"; pub const MYSQL_BASE_VERSION: &'static [u8; 11usize] = b"mysqld-5.7\x00"; pub const MYSQL_SERVER_SUFFIX_DEF: &'static [u8; 1usize] = b"\x00"; pub const MYSQL_VERSION_ID: ::std::os::raw::c_uint = 50717; pub const MYSQL_PORT: ::std::os::raw::c_uint = 3306; pub const MYSQL_PORT_DEFAULT: ::std::os::raw::c_uint = 0; pub const MYSQL_UNIX_ADDR: &'static [u8; 16usize] = b"/tmp/mysql.sock\x00"; pub const MYSQL_CONFIG_NAME: &'static [u8; 3usize] = b"my\x00"; pub const MYSQL_COMPILATION_COMMENT: &'static [u8; 20usize] = b"Source distribution\x00"; pub const MYSQL_AUTODETECT_CHARSET_NAME: &'static [u8; 5usize] = b"auto\x00"; pub const MYSQL_NAMEDPIPE: &'static [u8; 6usize] = b"MySQL\x00"; pub const MYSQL_SERVICENAME: &'static [u8; 6usize] = b"MySQL\x00"; pub const MYSQL_ERRMSG_SIZE: ::std::os::raw::c_uint = 512; pub const MYSQL_STMT_HEADER: ::std::os::raw::c_uint = 4; pub const MYSQL_LONG_DATA_HEADER: ::std::os::raw::c_uint = 6; pub const MYSQL_CLIENT_reserved1: ::std::os::raw::c_uint = 0; pub const MYSQL_CLIENT_reserved2: ::std::os::raw::c_uint = 1; pub const MYSQL_CLIENT_AUTHENTICATION_PLUGIN: ::std::os::raw::c_uint = 2; pub const MYSQL_CLIENT_TRACE_PLUGIN: ::std::os::raw::c_uint = 3; pub const MYSQL_CLIENT_AUTHENTICATION_PLUGIN_INTERFACE_VERSION: ::std::os::raw::c_uint = 256; pub const MYSQL_CLIENT_TRACE_PLUGIN_INTERFACE_VERSION: ::std::os::raw::c_uint = 256; pub const MYSQL_CLIENT_MAX_PLUGINS: ::std::os::raw::c_uint = 4; pub const MYSQL_USERNAME_LENGTH: ::std::os::raw::c_uint = 96; pub const MYSQL_NO_DATA: ::std::os::raw::c_uint = 100; pub const MYSQL_DATA_TRUNCATED: ::std::os::raw::c_uint = 101; pub type my_bool = ::std::os::raw::c_char; pub type va_list = *mut ::std::os::raw::c_char; pub type UINT_PTR = ::std::os::raw::c_ulonglong; pub type HANDLE = *mut ::std::os::raw::c_void; pub type SOCKET = UINT_PTR; #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum enum_field_types { MYSQL_TYPE_DECIMAL = 0, MYSQL_TYPE_TINY = 1, MYSQL_TYPE_SHORT = 2, MYSQL_TYPE_LONG = 3, MYSQL_TYPE_FLOAT = 4, MYSQL_TYPE_DOUBLE = 5, MYSQL_TYPE_NULL = 6, MYSQL_TYPE_TIMESTAMP = 7, MYSQL_TYPE_LONGLONG = 8, MYSQL_TYPE_INT24 = 9, MYSQL_TYPE_DATE = 10, MYSQL_TYPE_TIME = 11, MYSQL_TYPE_DATETIME = 12, MYSQL_TYPE_YEAR = 13, MYSQL_TYPE_NEWDATE = 14, MYSQL_TYPE_VARCHAR = 15, MYSQL_TYPE_BIT = 16, MYSQL_TYPE_TIMESTAMP2 = 17, MYSQL_TYPE_DATETIME2 = 18, MYSQL_TYPE_TIME2 = 19, MYSQL_TYPE_JSON = 245, MYSQL_TYPE_NEWDECIMAL = 246, MYSQL_TYPE_ENUM = 247, MYSQL_TYPE_SET = 248, MYSQL_TYPE_TINY_BLOB = 249, MYSQL_TYPE_MEDIUM_BLOB = 250, MYSQL_TYPE_LONG_BLOB = 251, MYSQL_TYPE_BLOB = 252, MYSQL_TYPE_VAR_STRING = 253, MYSQL_TYPE_STRING = 254, MYSQL_TYPE_GEOMETRY = 255, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct st_vio { _unused: [u8; 0], } pub type Vio = st_vio; #[repr(C)] pub struct st_net { pub vio: *mut Vio, pub buff: *mut ::std::os::raw::c_uchar, pub buff_end: *mut ::std::os::raw::c_uchar, pub write_pos: *mut ::std::os::raw::c_uchar, pub read_pos: *mut ::std::os::raw::c_uchar, pub fd: SOCKET, pub remain_in_buf: ::std::os::raw::c_ulong, pub length: ::std::os::raw::c_ulong, pub buf_length: ::std::os::raw::c_ulong, pub where_b: ::std::os::raw::c_ulong, pub max_packet: ::std::os::raw::c_ulong, pub max_packet_size: ::std::os::raw::c_ulong, pub pkt_nr: ::std::os::raw::c_uint, pub compress_pkt_nr: ::std::os::raw::c_uint, pub write_timeout: ::std::os::raw::c_uint, pub read_timeout: ::std::os::raw::c_uint, pub retry_count: ::std::os::raw::c_uint, pub fcntl: ::std::os::raw::c_int, pub return_status: *mut ::std::os::raw::c_uint, pub reading_or_writing: ::std::os::raw::c_uchar, pub save_char: ::std::os::raw::c_char, pub unused1: my_bool, pub unused2: my_bool, pub compress: my_bool, pub unused3: my_bool, pub unused: *mut ::std::os::raw::c_uchar, pub last_errno: ::std::os::raw::c_uint, pub error: ::std::os::raw::c_uchar, pub unused4: my_bool, pub unused5: my_bool, /** Client library error message buffer. Actually belongs to struct MYSQL. */ pub last_error: [::std::os::raw::c_char; 512usize], /** Client library sqlstate buffer. Set along with the error message. */ pub sqlstate: [::std::os::raw::c_char; 6usize], /** Extension pointer, for the caller private use. Any program linking with the networking library can use this pointer, which is handy when private connection specific data needs to be maintained. The mysqld server process uses this pointer internally, to maintain the server internal instrumentation for the connection. */ pub extension: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_st_net() { assert_eq!(::std::mem::size_of::() , 656usize , concat ! ( "Size of: " , stringify ! ( st_net ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( st_net ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . vio as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( vio ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . buff as * const _ as usize } , 8usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( buff ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . buff_end as * const _ as usize } , 16usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( buff_end ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . write_pos as * const _ as usize } , 24usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( write_pos ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . read_pos as * const _ as usize } , 32usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( read_pos ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . fd as * const _ as usize } , 40usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( fd ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . remain_in_buf as * const _ as usize } , 48usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( remain_in_buf ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . length as * const _ as usize } , 52usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( length ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . buf_length as * const _ as usize } , 56usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( buf_length ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . where_b as * const _ as usize } , 60usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( where_b ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . max_packet as * const _ as usize } , 64usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( max_packet ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . max_packet_size as * const _ as usize } , 68usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( max_packet_size ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . pkt_nr as * const _ as usize } , 72usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( pkt_nr ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . compress_pkt_nr as * const _ as usize } , 76usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( compress_pkt_nr ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . write_timeout as * const _ as usize } , 80usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( write_timeout ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . read_timeout as * const _ as usize } , 84usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( read_timeout ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . retry_count as * const _ as usize } , 88usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( retry_count ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . fcntl as * const _ as usize } , 92usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( fcntl ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . return_status as * const _ as usize } , 96usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( return_status ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . reading_or_writing as * const _ as usize } , 104usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( reading_or_writing ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . save_char as * const _ as usize } , 105usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( save_char ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . unused1 as * const _ as usize } , 106usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( unused1 ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . unused2 as * const _ as usize } , 107usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( unused2 ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . compress as * const _ as usize } , 108usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( compress ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . unused3 as * const _ as usize } , 109usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( unused3 ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . unused as * const _ as usize } , 112usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( unused ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . last_errno as * const _ as usize } , 120usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( last_errno ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . error as * const _ as usize } , 124usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( error ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . unused4 as * const _ as usize } , 125usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( unused4 ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . unused5 as * const _ as usize } , 126usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( unused5 ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . last_error as * const _ as usize } , 127usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( last_error ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . sqlstate as * const _ as usize } , 639usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( sqlstate ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_net ) ) . extension as * const _ as usize } , 648usize , concat ! ( "Alignment of field: " , stringify ! ( st_net ) , "::" , stringify ! ( extension ) )); } pub type NET = st_net; #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum mysql_enum_shutdown_level { SHUTDOWN_DEFAULT = 0, SHUTDOWN_WAIT_CONNECTIONS = 1, SHUTDOWN_WAIT_TRANSACTIONS = 2, SHUTDOWN_WAIT_UPDATES = 8, SHUTDOWN_WAIT_ALL_BUFFERS = 16, SHUTDOWN_WAIT_CRITICAL_BUFFERS = 17, KILL_QUERY = 254, KILL_CONNECTION = 255, } #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum enum_mysql_set_option { MYSQL_OPTION_MULTI_STATEMENTS_ON = 0, MYSQL_OPTION_MULTI_STATEMENTS_OFF = 1, } #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum enum_session_state_type { SESSION_TRACK_SYSTEM_VARIABLES = 0, SESSION_TRACK_SCHEMA = 1, SESSION_TRACK_STATE_CHANGE = 2, SESSION_TRACK_GTIDS = 3, SESSION_TRACK_TRANSACTION_CHARACTERISTICS = 4, SESSION_TRACK_TRANSACTION_STATE = 5, } extern "C" { pub fn mysql_errno_to_sqlstate(mysql_errno: ::std::os::raw::c_uint) -> *const ::std::os::raw::c_char; } #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum enum_mysql_timestamp_type { MYSQL_TIMESTAMP_NONE = -2, MYSQL_TIMESTAMP_ERROR = -1, MYSQL_TIMESTAMP_DATE = 0, MYSQL_TIMESTAMP_DATETIME = 1, MYSQL_TIMESTAMP_TIME = 2, } #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_time { pub year: ::std::os::raw::c_uint, pub month: ::std::os::raw::c_uint, pub day: ::std::os::raw::c_uint, pub hour: ::std::os::raw::c_uint, pub minute: ::std::os::raw::c_uint, pub second: ::std::os::raw::c_uint, /**< microseconds */ pub second_part: ::std::os::raw::c_ulong, pub neg: my_bool, pub time_type: enum_mysql_timestamp_type, } #[test] fn bindgen_test_layout_st_mysql_time() { assert_eq!(::std::mem::size_of::() , 36usize , concat ! ( "Size of: " , stringify ! ( st_mysql_time ) )); assert_eq! (::std::mem::align_of::() , 4usize , concat ! ( "Alignment of " , stringify ! ( st_mysql_time ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_time ) ) . year as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_time ) , "::" , stringify ! ( year ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_time ) ) . month as * const _ as usize } , 4usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_time ) , "::" , stringify ! ( month ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_time ) ) . day as * const _ as usize } , 8usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_time ) , "::" , stringify ! ( day ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_time ) ) . hour as * const _ as usize } , 12usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_time ) , "::" , stringify ! ( hour ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_time ) ) . minute as * const _ as usize } , 16usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_time ) , "::" , stringify ! ( minute ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_time ) ) . second as * const _ as usize } , 20usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_time ) , "::" , stringify ! ( second ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_time ) ) . second_part as * const _ as usize } , 24usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_time ) , "::" , stringify ! ( second_part ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_time ) ) . neg as * const _ as usize } , 28usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_time ) , "::" , stringify ! ( neg ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_time ) ) . time_type as * const _ as usize } , 32usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_time ) , "::" , stringify ! ( time_type ) )); } impl Clone for st_mysql_time { fn clone(&self) -> Self { *self } } pub type MYSQL_TIME = st_mysql_time; #[repr(C)] #[derive(Debug, Copy)] pub struct st_list { pub prev: *mut st_list, pub next: *mut st_list, pub data: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_st_list() { assert_eq!(::std::mem::size_of::() , 24usize , concat ! ( "Size of: " , stringify ! ( st_list ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( st_list ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_list ) ) . prev as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_list ) , "::" , stringify ! ( prev ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_list ) ) . next as * const _ as usize } , 8usize , concat ! ( "Alignment of field: " , stringify ! ( st_list ) , "::" , stringify ! ( next ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_list ) ) . data as * const _ as usize } , 16usize , concat ! ( "Alignment of field: " , stringify ! ( st_list ) , "::" , stringify ! ( data ) )); } impl Clone for st_list { fn clone(&self) -> Self { *self } } pub type LIST = st_list; #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_client_plugin { pub type_: ::std::os::raw::c_int, pub interface_version: ::std::os::raw::c_uint, pub name: *const ::std::os::raw::c_char, pub author: *const ::std::os::raw::c_char, pub desc: *const ::std::os::raw::c_char, pub version: [::std::os::raw::c_uint; 3usize], pub license: *const ::std::os::raw::c_char, pub mysql_api: *mut ::std::os::raw::c_void, pub init: ::std::option::Option ::std::os::raw::c_int>, pub deinit: ::std::option::Option ::std::os::raw::c_int>, pub options: ::std::option::Option ::std::os::raw::c_int>, } #[test] fn bindgen_test_layout_st_mysql_client_plugin() { assert_eq!(::std::mem::size_of::() , 88usize , concat ! ( "Size of: " , stringify ! ( st_mysql_client_plugin ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( st_mysql_client_plugin ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_client_plugin ) ) . type_ as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_client_plugin ) , "::" , stringify ! ( type_ ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_client_plugin ) ) . interface_version as * const _ as usize } , 4usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_client_plugin ) , "::" , stringify ! ( interface_version ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_client_plugin ) ) . name as * const _ as usize } , 8usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_client_plugin ) , "::" , stringify ! ( name ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_client_plugin ) ) . author as * const _ as usize } , 16usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_client_plugin ) , "::" , stringify ! ( author ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_client_plugin ) ) . desc as * const _ as usize } , 24usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_client_plugin ) , "::" , stringify ! ( desc ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_client_plugin ) ) . version as * const _ as usize } , 32usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_client_plugin ) , "::" , stringify ! ( version ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_client_plugin ) ) . license as * const _ as usize } , 48usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_client_plugin ) , "::" , stringify ! ( license ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_client_plugin ) ) . mysql_api as * const _ as usize } , 56usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_client_plugin ) , "::" , stringify ! ( mysql_api ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_client_plugin ) ) . init as * const _ as usize } , 64usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_client_plugin ) , "::" , stringify ! ( init ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_client_plugin ) ) . deinit as * const _ as usize } , 72usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_client_plugin ) , "::" , stringify ! ( deinit ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_client_plugin ) ) . options as * const _ as usize } , 80usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_client_plugin ) , "::" , stringify ! ( options ) )); } impl Clone for st_mysql_client_plugin { fn clone(&self) -> Self { *self } } #[repr(C)] pub struct st_mysql { pub net: NET, pub connector_fd: *mut ::std::os::raw::c_uchar, pub host: *mut ::std::os::raw::c_char, pub user: *mut ::std::os::raw::c_char, pub passwd: *mut ::std::os::raw::c_char, pub unix_socket: *mut ::std::os::raw::c_char, pub server_version: *mut ::std::os::raw::c_char, pub host_info: *mut ::std::os::raw::c_char, pub info: *mut ::std::os::raw::c_char, pub db: *mut ::std::os::raw::c_char, pub charset: *mut charset_info_st, pub fields: *mut MYSQL_FIELD, pub field_alloc: MEM_ROOT, pub affected_rows: my_ulonglong, pub insert_id: my_ulonglong, pub extra_info: my_ulonglong, pub thread_id: ::std::os::raw::c_ulong, pub packet_length: ::std::os::raw::c_ulong, pub port: ::std::os::raw::c_uint, pub client_flag: ::std::os::raw::c_ulong, pub server_capabilities: ::std::os::raw::c_ulong, pub protocol_version: ::std::os::raw::c_uint, pub field_count: ::std::os::raw::c_uint, pub server_status: ::std::os::raw::c_uint, pub server_language: ::std::os::raw::c_uint, pub warning_count: ::std::os::raw::c_uint, pub options: st_mysql_options, pub status: mysql_status, pub free_me: my_bool, pub reconnect: my_bool, pub scramble: [::std::os::raw::c_char; 21usize], pub unused1: my_bool, pub unused2: *mut ::std::os::raw::c_void, pub unused3: *mut ::std::os::raw::c_void, pub unused4: *mut ::std::os::raw::c_void, pub unused5: *mut ::std::os::raw::c_void, pub stmts: *mut LIST, pub methods: *const st_mysql_methods, pub thd: *mut ::std::os::raw::c_void, pub unbuffered_fetch_owner: *mut my_bool, pub info_buffer: *mut ::std::os::raw::c_char, pub extension: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_st_mysql() { assert_eq!(::std::mem::size_of::() , 1240usize , concat ! ( "Size of: " , stringify ! ( st_mysql ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( st_mysql ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . net as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( net ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . connector_fd as * const _ as usize } , 656usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( connector_fd ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . host as * const _ as usize } , 664usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( host ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . user as * const _ as usize } , 672usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( user ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . passwd as * const _ as usize } , 680usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( passwd ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . unix_socket as * const _ as usize } , 688usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( unix_socket ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . server_version as * const _ as usize } , 696usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( server_version ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . host_info as * const _ as usize } , 704usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( host_info ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . info as * const _ as usize } , 712usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( info ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . db as * const _ as usize } , 720usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( db ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . charset as * const _ as usize } , 728usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( charset ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . fields as * const _ as usize } , 736usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( fields ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . field_alloc as * const _ as usize } , 744usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( field_alloc ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . affected_rows as * const _ as usize } , 832usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( affected_rows ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . insert_id as * const _ as usize } , 840usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( insert_id ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . extra_info as * const _ as usize } , 848usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( extra_info ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . thread_id as * const _ as usize } , 856usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( thread_id ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . packet_length as * const _ as usize } , 860usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( packet_length ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . port as * const _ as usize } , 864usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( port ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . client_flag as * const _ as usize } , 868usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( client_flag ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . server_capabilities as * const _ as usize } , 872usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( server_capabilities ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . protocol_version as * const _ as usize } , 876usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( protocol_version ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . field_count as * const _ as usize } , 880usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( field_count ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . server_status as * const _ as usize } , 884usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( server_status ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . server_language as * const _ as usize } , 888usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( server_language ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . warning_count as * const _ as usize } , 892usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( warning_count ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . options as * const _ as usize } , 896usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( options ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . status as * const _ as usize } , 1128usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( status ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . free_me as * const _ as usize } , 1132usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( free_me ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . reconnect as * const _ as usize } , 1133usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( reconnect ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . scramble as * const _ as usize } , 1134usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( scramble ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . unused1 as * const _ as usize } , 1155usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( unused1 ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . unused2 as * const _ as usize } , 1160usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( unused2 ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . unused3 as * const _ as usize } , 1168usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( unused3 ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . unused4 as * const _ as usize } , 1176usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( unused4 ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . unused5 as * const _ as usize } , 1184usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( unused5 ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . stmts as * const _ as usize } , 1192usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( stmts ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . methods as * const _ as usize } , 1200usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( methods ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . thd as * const _ as usize } , 1208usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( thd ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . unbuffered_fetch_owner as * const _ as usize } , 1216usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( unbuffered_fetch_owner ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . info_buffer as * const _ as usize } , 1224usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( info_buffer ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql ) ) . extension as * const _ as usize } , 1232usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql ) , "::" , stringify ! ( extension ) )); } #[repr(C)] #[derive(Debug, Copy)] pub struct st_plugin_vio_info { pub protocol: st_plugin_vio_info__bindgen_ty_1, /**< it's set, if the protocol is SOCKET or TCP */ pub socket: ::std::os::raw::c_int, /**< it's set, if the protocol is PIPE or MEMORY */ pub handle: HANDLE, } pub const st_plugin_vio_info_MYSQL_VIO_INVALID: st_plugin_vio_info__bindgen_ty_1 = st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_INVALID; pub const st_plugin_vio_info_MYSQL_VIO_TCP: st_plugin_vio_info__bindgen_ty_1 = st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_TCP; pub const st_plugin_vio_info_MYSQL_VIO_SOCKET: st_plugin_vio_info__bindgen_ty_1 = st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_SOCKET; pub const st_plugin_vio_info_MYSQL_VIO_PIPE: st_plugin_vio_info__bindgen_ty_1 = st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_PIPE; pub const st_plugin_vio_info_MYSQL_VIO_MEMORY: st_plugin_vio_info__bindgen_ty_1 = st_plugin_vio_info__bindgen_ty_1::MYSQL_VIO_MEMORY; #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum st_plugin_vio_info__bindgen_ty_1 { MYSQL_VIO_INVALID = 0, MYSQL_VIO_TCP = 1, MYSQL_VIO_SOCKET = 2, MYSQL_VIO_PIPE = 3, MYSQL_VIO_MEMORY = 4, } #[test] fn bindgen_test_layout_st_plugin_vio_info() { assert_eq!(::std::mem::size_of::() , 16usize , concat ! ( "Size of: " , stringify ! ( st_plugin_vio_info ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( st_plugin_vio_info ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_plugin_vio_info ) ) . protocol as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_plugin_vio_info ) , "::" , stringify ! ( protocol ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_plugin_vio_info ) ) . socket as * const _ as usize } , 4usize , concat ! ( "Alignment of field: " , stringify ! ( st_plugin_vio_info ) , "::" , stringify ! ( socket ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_plugin_vio_info ) ) . handle as * const _ as usize } , 8usize , concat ! ( "Alignment of field: " , stringify ! ( st_plugin_vio_info ) , "::" , stringify ! ( handle ) )); } impl Clone for st_plugin_vio_info { fn clone(&self) -> Self { *self } } pub type MYSQL_PLUGIN_VIO_INFO = st_plugin_vio_info; /** Provides plugin access to communication channel */ #[repr(C)] #[derive(Debug, Copy)] pub struct st_plugin_vio { /** Plugin provides a pointer reference and this function sets it to the contents of any incoming packet. Returns the packet length, or -1 if the plugin should terminate. */ pub read_packet: ::std::option::Option ::std::os::raw::c_int>, /** Plugin provides a buffer with data and the length and this function sends it as a packet. Returns 0 on success, 1 on failure. */ pub write_packet: ::std::option::Option ::std::os::raw::c_int>, /** Fills in a st_plugin_vio_info structure, providing the information about the connection. */ pub info: ::std::option::Option, } #[test] fn bindgen_test_layout_st_plugin_vio() { assert_eq!(::std::mem::size_of::() , 24usize , concat ! ( "Size of: " , stringify ! ( st_plugin_vio ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( st_plugin_vio ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_plugin_vio ) ) . read_packet as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_plugin_vio ) , "::" , stringify ! ( read_packet ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_plugin_vio ) ) . write_packet as * const _ as usize } , 8usize , concat ! ( "Alignment of field: " , stringify ! ( st_plugin_vio ) , "::" , stringify ! ( write_packet ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_plugin_vio ) ) . info as * const _ as usize } , 16usize , concat ! ( "Alignment of field: " , stringify ! ( st_plugin_vio ) , "::" , stringify ! ( info ) )); } impl Clone for st_plugin_vio { fn clone(&self) -> Self { *self } } pub type MYSQL_PLUGIN_VIO = st_plugin_vio; extern "C" { /** loads a plugin and initializes it @param mysql MYSQL structure. @param name a name of the plugin to load @param type type of plugin that should be loaded, -1 to disable type check @param argc number of arguments to pass to the plugin initialization function @param ... arguments for the plugin initialization function @retval a pointer to the loaded plugin, or NULL in case of a failure */ pub fn mysql_load_plugin(mysql: *mut st_mysql, name: *const ::std::os::raw::c_char, type_: ::std::os::raw::c_int, argc: ::std::os::raw::c_int, ...) -> *mut st_mysql_client_plugin; } extern "C" { /** loads a plugin and initializes it, taking va_list as an argument This is the same as mysql_load_plugin, but take va_list instead of a list of arguments. @param mysql MYSQL structure. @param name a name of the plugin to load @param type type of plugin that should be loaded, -1 to disable type check @param argc number of arguments to pass to the plugin initialization function @param args arguments for the plugin initialization function @retval a pointer to the loaded plugin, or NULL in case of a failure */ pub fn mysql_load_plugin_v(mysql: *mut st_mysql, name: *const ::std::os::raw::c_char, type_: ::std::os::raw::c_int, argc: ::std::os::raw::c_int, args: va_list) -> *mut st_mysql_client_plugin; } extern "C" { /** finds an already loaded plugin by name, or loads it, if necessary @param mysql MYSQL structure. @param name a name of the plugin to load @param type type of plugin that should be loaded @retval a pointer to the plugin, or NULL in case of a failure */ pub fn mysql_client_find_plugin(mysql: *mut st_mysql, name: *const ::std::os::raw::c_char, type_: ::std::os::raw::c_int) -> *mut st_mysql_client_plugin; } extern "C" { /** adds a plugin structure to the list of loaded plugins This is useful if an application has the necessary functionality (for example, a special load data handler) statically linked into the application binary. It can use this function to register the plugin directly, avoiding the need to factor it out into a shared object. @param mysql MYSQL structure. It is only used for error reporting @param plugin an st_mysql_client_plugin structure to register @retval a pointer to the plugin, or NULL in case of a failure */ pub fn mysql_client_register_plugin(mysql: *mut st_mysql, plugin: *mut st_mysql_client_plugin) -> *mut st_mysql_client_plugin; } extern "C" { /** set plugin options Can be used to set extra options and affect behavior for a plugin. This function may be called multiple times to set several options @param plugin an st_mysql_client_plugin structure @param option a string which specifies the option to set @param value value for the option. @retval 0 on success, 1 in case of failure **/ pub fn mysql_plugin_options(plugin: *mut st_mysql_client_plugin, option: *const ::std::os::raw::c_char, value: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int; } #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_field { pub name: *mut ::std::os::raw::c_char, pub org_name: *mut ::std::os::raw::c_char, pub table: *mut ::std::os::raw::c_char, pub org_table: *mut ::std::os::raw::c_char, pub db: *mut ::std::os::raw::c_char, pub catalog: *mut ::std::os::raw::c_char, pub def: *mut ::std::os::raw::c_char, pub length: ::std::os::raw::c_ulong, pub max_length: ::std::os::raw::c_ulong, pub name_length: ::std::os::raw::c_uint, pub org_name_length: ::std::os::raw::c_uint, pub table_length: ::std::os::raw::c_uint, pub org_table_length: ::std::os::raw::c_uint, pub db_length: ::std::os::raw::c_uint, pub catalog_length: ::std::os::raw::c_uint, pub def_length: ::std::os::raw::c_uint, pub flags: ::std::os::raw::c_uint, pub decimals: ::std::os::raw::c_uint, pub charsetnr: ::std::os::raw::c_uint, pub type_: enum_field_types, pub extension: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_st_mysql_field() { assert_eq!(::std::mem::size_of::() , 120usize , concat ! ( "Size of: " , stringify ! ( st_mysql_field ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( st_mysql_field ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . name as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( name ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . org_name as * const _ as usize } , 8usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( org_name ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . table as * const _ as usize } , 16usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( table ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . org_table as * const _ as usize } , 24usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( org_table ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . db as * const _ as usize } , 32usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( db ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . catalog as * const _ as usize } , 40usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( catalog ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . def as * const _ as usize } , 48usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( def ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . length as * const _ as usize } , 56usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( length ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . max_length as * const _ as usize } , 60usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( max_length ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . name_length as * const _ as usize } , 64usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( name_length ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . org_name_length as * const _ as usize } , 68usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( org_name_length ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . table_length as * const _ as usize } , 72usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( table_length ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . org_table_length as * const _ as usize } , 76usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( org_table_length ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . db_length as * const _ as usize } , 80usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( db_length ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . catalog_length as * const _ as usize } , 84usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( catalog_length ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . def_length as * const _ as usize } , 88usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( def_length ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . flags as * const _ as usize } , 92usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( flags ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . decimals as * const _ as usize } , 96usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( decimals ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . charsetnr as * const _ as usize } , 100usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( charsetnr ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . type_ as * const _ as usize } , 104usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( type_ ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_field ) ) . extension as * const _ as usize } , 112usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_field ) , "::" , stringify ! ( extension ) )); } impl Clone for st_mysql_field { fn clone(&self) -> Self { *self } } pub type MYSQL_FIELD = st_mysql_field; pub type MYSQL_ROW = *mut *mut ::std::os::raw::c_char; pub type MYSQL_FIELD_OFFSET = ::std::os::raw::c_uint; pub type my_ulonglong = ::std::os::raw::c_ulonglong; /** Instrumented memory key. To instrument memory, a memory key must be obtained using @c register_memory. Using a zero key always disable the instrumentation. */ pub type PSI_memory_key = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Copy)] pub struct st_used_mem { pub next: *mut st_used_mem, pub left: ::std::os::raw::c_uint, pub size: ::std::os::raw::c_uint, } #[test] fn bindgen_test_layout_st_used_mem() { assert_eq!(::std::mem::size_of::() , 16usize , concat ! ( "Size of: " , stringify ! ( st_used_mem ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( st_used_mem ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_used_mem ) ) . next as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_used_mem ) , "::" , stringify ! ( next ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_used_mem ) ) . left as * const _ as usize } , 8usize , concat ! ( "Alignment of field: " , stringify ! ( st_used_mem ) , "::" , stringify ! ( left ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_used_mem ) ) . size as * const _ as usize } , 12usize , concat ! ( "Alignment of field: " , stringify ! ( st_used_mem ) , "::" , stringify ! ( size ) )); } impl Clone for st_used_mem { fn clone(&self) -> Self { *self } } pub type USED_MEM = st_used_mem; #[repr(C)] #[derive(Debug, Copy)] pub struct st_mem_root { pub free: *mut USED_MEM, pub used: *mut USED_MEM, pub pre_alloc: *mut USED_MEM, pub min_malloc: usize, pub block_size: usize, pub block_num: ::std::os::raw::c_uint, pub first_block_usage: ::std::os::raw::c_uint, pub max_capacity: usize, pub allocated_size: usize, pub error_for_capacity_exceeded: my_bool, pub error_handler: ::std::option::Option, pub m_psi_key: PSI_memory_key, } #[test] fn bindgen_test_layout_st_mem_root() { assert_eq!(::std::mem::size_of::() , 88usize , concat ! ( "Size of: " , stringify ! ( st_mem_root ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( st_mem_root ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mem_root ) ) . free as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_mem_root ) , "::" , stringify ! ( free ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mem_root ) ) . used as * const _ as usize } , 8usize , concat ! ( "Alignment of field: " , stringify ! ( st_mem_root ) , "::" , stringify ! ( used ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mem_root ) ) . pre_alloc as * const _ as usize } , 16usize , concat ! ( "Alignment of field: " , stringify ! ( st_mem_root ) , "::" , stringify ! ( pre_alloc ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mem_root ) ) . min_malloc as * const _ as usize } , 24usize , concat ! ( "Alignment of field: " , stringify ! ( st_mem_root ) , "::" , stringify ! ( min_malloc ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mem_root ) ) . block_size as * const _ as usize } , 32usize , concat ! ( "Alignment of field: " , stringify ! ( st_mem_root ) , "::" , stringify ! ( block_size ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mem_root ) ) . block_num as * const _ as usize } , 40usize , concat ! ( "Alignment of field: " , stringify ! ( st_mem_root ) , "::" , stringify ! ( block_num ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mem_root ) ) . first_block_usage as * const _ as usize } , 44usize , concat ! ( "Alignment of field: " , stringify ! ( st_mem_root ) , "::" , stringify ! ( first_block_usage ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mem_root ) ) . max_capacity as * const _ as usize } , 48usize , concat ! ( "Alignment of field: " , stringify ! ( st_mem_root ) , "::" , stringify ! ( max_capacity ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mem_root ) ) . allocated_size as * const _ as usize } , 56usize , concat ! ( "Alignment of field: " , stringify ! ( st_mem_root ) , "::" , stringify ! ( allocated_size ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mem_root ) ) . error_for_capacity_exceeded as * const _ as usize } , 64usize , concat ! ( "Alignment of field: " , stringify ! ( st_mem_root ) , "::" , stringify ! ( error_for_capacity_exceeded ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mem_root ) ) . error_handler as * const _ as usize } , 72usize , concat ! ( "Alignment of field: " , stringify ! ( st_mem_root ) , "::" , stringify ! ( error_handler ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mem_root ) ) . m_psi_key as * const _ as usize } , 80usize , concat ! ( "Alignment of field: " , stringify ! ( st_mem_root ) , "::" , stringify ! ( m_psi_key ) )); } impl Clone for st_mem_root { fn clone(&self) -> Self { *self } } pub type MEM_ROOT = st_mem_root; #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_rows { pub next: *mut st_mysql_rows, pub data: MYSQL_ROW, pub length: ::std::os::raw::c_ulong, } #[test] fn bindgen_test_layout_st_mysql_rows() { assert_eq!(::std::mem::size_of::() , 24usize , concat ! ( "Size of: " , stringify ! ( st_mysql_rows ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( st_mysql_rows ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_rows ) ) . next as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_rows ) , "::" , stringify ! ( next ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_rows ) ) . data as * const _ as usize } , 8usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_rows ) , "::" , stringify ! ( data ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_rows ) ) . length as * const _ as usize } , 16usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_rows ) , "::" , stringify ! ( length ) )); } impl Clone for st_mysql_rows { fn clone(&self) -> Self { *self } } pub type MYSQL_ROWS = st_mysql_rows; pub type MYSQL_ROW_OFFSET = *mut MYSQL_ROWS; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct embedded_query_result { _unused: [u8; 0], } #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_data { pub data: *mut MYSQL_ROWS, pub embedded_info: *mut embedded_query_result, pub alloc: MEM_ROOT, pub rows: my_ulonglong, pub fields: ::std::os::raw::c_uint, pub extension: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_st_mysql_data() { assert_eq!(::std::mem::size_of::() , 128usize , concat ! ( "Size of: " , stringify ! ( st_mysql_data ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( st_mysql_data ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_data ) ) . data as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_data ) , "::" , stringify ! ( data ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_data ) ) . embedded_info as * const _ as usize } , 8usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_data ) , "::" , stringify ! ( embedded_info ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_data ) ) . alloc as * const _ as usize } , 16usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_data ) , "::" , stringify ! ( alloc ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_data ) ) . rows as * const _ as usize } , 104usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_data ) , "::" , stringify ! ( rows ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_data ) ) . fields as * const _ as usize } , 112usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_data ) , "::" , stringify ! ( fields ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_data ) ) . extension as * const _ as usize } , 120usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_data ) , "::" , stringify ! ( extension ) )); } impl Clone for st_mysql_data { fn clone(&self) -> Self { *self } } pub type MYSQL_DATA = st_mysql_data; #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum mysql_option { MYSQL_OPT_CONNECT_TIMEOUT = 0, MYSQL_OPT_COMPRESS = 1, MYSQL_OPT_NAMED_PIPE = 2, MYSQL_INIT_COMMAND = 3, MYSQL_READ_DEFAULT_FILE = 4, MYSQL_READ_DEFAULT_GROUP = 5, MYSQL_SET_CHARSET_DIR = 6, MYSQL_SET_CHARSET_NAME = 7, MYSQL_OPT_LOCAL_INFILE = 8, MYSQL_OPT_PROTOCOL = 9, MYSQL_SHARED_MEMORY_BASE_NAME = 10, MYSQL_OPT_READ_TIMEOUT = 11, MYSQL_OPT_WRITE_TIMEOUT = 12, MYSQL_OPT_USE_RESULT = 13, MYSQL_OPT_USE_REMOTE_CONNECTION = 14, MYSQL_OPT_USE_EMBEDDED_CONNECTION = 15, MYSQL_OPT_GUESS_CONNECTION = 16, MYSQL_SET_CLIENT_IP = 17, MYSQL_SECURE_AUTH = 18, MYSQL_REPORT_DATA_TRUNCATION = 19, MYSQL_OPT_RECONNECT = 20, MYSQL_OPT_SSL_VERIFY_SERVER_CERT = 21, MYSQL_PLUGIN_DIR = 22, MYSQL_DEFAULT_AUTH = 23, MYSQL_OPT_BIND = 24, MYSQL_OPT_SSL_KEY = 25, MYSQL_OPT_SSL_CERT = 26, MYSQL_OPT_SSL_CA = 27, MYSQL_OPT_SSL_CAPATH = 28, MYSQL_OPT_SSL_CIPHER = 29, MYSQL_OPT_SSL_CRL = 30, MYSQL_OPT_SSL_CRLPATH = 31, MYSQL_OPT_CONNECT_ATTR_RESET = 32, MYSQL_OPT_CONNECT_ATTR_ADD = 33, MYSQL_OPT_CONNECT_ATTR_DELETE = 34, MYSQL_SERVER_PUBLIC_KEY = 35, MYSQL_ENABLE_CLEARTEXT_PLUGIN = 36, MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS = 37, MYSQL_OPT_SSL_ENFORCE = 38, MYSQL_OPT_MAX_ALLOWED_PACKET = 39, MYSQL_OPT_NET_BUFFER_LENGTH = 40, MYSQL_OPT_TLS_VERSION = 41, MYSQL_OPT_SSL_MODE = 42, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct st_mysql_options_extention { _unused: [u8; 0], } #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_options { pub connect_timeout: ::std::os::raw::c_uint, pub read_timeout: ::std::os::raw::c_uint, pub write_timeout: ::std::os::raw::c_uint, pub port: ::std::os::raw::c_uint, pub protocol: ::std::os::raw::c_uint, pub client_flag: ::std::os::raw::c_ulong, pub host: *mut ::std::os::raw::c_char, pub user: *mut ::std::os::raw::c_char, pub password: *mut ::std::os::raw::c_char, pub unix_socket: *mut ::std::os::raw::c_char, pub db: *mut ::std::os::raw::c_char, pub init_commands: *mut st_dynamic_array, pub my_cnf_file: *mut ::std::os::raw::c_char, pub my_cnf_group: *mut ::std::os::raw::c_char, pub charset_dir: *mut ::std::os::raw::c_char, pub charset_name: *mut ::std::os::raw::c_char, pub ssl_key: *mut ::std::os::raw::c_char, pub ssl_cert: *mut ::std::os::raw::c_char, pub ssl_ca: *mut ::std::os::raw::c_char, pub ssl_capath: *mut ::std::os::raw::c_char, pub ssl_cipher: *mut ::std::os::raw::c_char, pub shared_memory_base_name: *mut ::std::os::raw::c_char, pub max_allowed_packet: ::std::os::raw::c_ulong, pub use_ssl: my_bool, pub compress: my_bool, pub named_pipe: my_bool, pub unused1: my_bool, pub unused2: my_bool, pub unused3: my_bool, pub unused4: my_bool, pub methods_to_use: mysql_option, pub ci: st_mysql_options__bindgen_ty_1, pub unused5: my_bool, pub report_data_truncation: my_bool, pub local_infile_init: ::std::option::Option ::std::os::raw::c_int>, pub local_infile_read: ::std::option::Option ::std::os::raw::c_int>, pub local_infile_end: ::std::option::Option, pub local_infile_error: ::std::option::Option ::std::os::raw::c_int>, pub local_infile_userdata: *mut ::std::os::raw::c_void, pub extension: *mut st_mysql_options_extention, } #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_options__bindgen_ty_1 { pub client_ip: __BindgenUnionField<*mut ::std::os::raw::c_char>, pub bind_address: __BindgenUnionField<*mut ::std::os::raw::c_char>, pub bindgen_union_field: u64, } #[test] fn bindgen_test_layout_st_mysql_options__bindgen_ty_1() { assert_eq!(::std::mem::size_of::() , 8usize , concat ! ( "Size of: " , stringify ! ( st_mysql_options__bindgen_ty_1 ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( st_mysql_options__bindgen_ty_1 ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options__bindgen_ty_1 ) ) . client_ip as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options__bindgen_ty_1 ) , "::" , stringify ! ( client_ip ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options__bindgen_ty_1 ) ) . bind_address as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options__bindgen_ty_1 ) , "::" , stringify ! ( bind_address ) )); } impl Clone for st_mysql_options__bindgen_ty_1 { fn clone(&self) -> Self { *self } } #[test] fn bindgen_test_layout_st_mysql_options() { assert_eq!(::std::mem::size_of::() , 232usize , concat ! ( "Size of: " , stringify ! ( st_mysql_options ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( st_mysql_options ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . connect_timeout as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( connect_timeout ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . read_timeout as * const _ as usize } , 4usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( read_timeout ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . write_timeout as * const _ as usize } , 8usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( write_timeout ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . port as * const _ as usize } , 12usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( port ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . protocol as * const _ as usize } , 16usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( protocol ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . client_flag as * const _ as usize } , 20usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( client_flag ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . host as * const _ as usize } , 24usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( host ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . user as * const _ as usize } , 32usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( user ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . password as * const _ as usize } , 40usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( password ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . unix_socket as * const _ as usize } , 48usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( unix_socket ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . db as * const _ as usize } , 56usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( db ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . init_commands as * const _ as usize } , 64usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( init_commands ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . my_cnf_file as * const _ as usize } , 72usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( my_cnf_file ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . my_cnf_group as * const _ as usize } , 80usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( my_cnf_group ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . charset_dir as * const _ as usize } , 88usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( charset_dir ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . charset_name as * const _ as usize } , 96usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( charset_name ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . ssl_key as * const _ as usize } , 104usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( ssl_key ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . ssl_cert as * const _ as usize } , 112usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( ssl_cert ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . ssl_ca as * const _ as usize } , 120usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( ssl_ca ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . ssl_capath as * const _ as usize } , 128usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( ssl_capath ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . ssl_cipher as * const _ as usize } , 136usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( ssl_cipher ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . shared_memory_base_name as * const _ as usize } , 144usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( shared_memory_base_name ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . max_allowed_packet as * const _ as usize } , 152usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( max_allowed_packet ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . use_ssl as * const _ as usize } , 156usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( use_ssl ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . compress as * const _ as usize } , 157usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( compress ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . named_pipe as * const _ as usize } , 158usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( named_pipe ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . unused1 as * const _ as usize } , 159usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( unused1 ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . unused2 as * const _ as usize } , 160usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( unused2 ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . unused3 as * const _ as usize } , 161usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( unused3 ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . unused4 as * const _ as usize } , 162usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( unused4 ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . methods_to_use as * const _ as usize } , 164usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( methods_to_use ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . ci as * const _ as usize } , 168usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( ci ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . unused5 as * const _ as usize } , 176usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( unused5 ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . report_data_truncation as * const _ as usize } , 177usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( report_data_truncation ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . local_infile_init as * const _ as usize } , 184usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( local_infile_init ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . local_infile_read as * const _ as usize } , 192usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( local_infile_read ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . local_infile_end as * const _ as usize } , 200usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( local_infile_end ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . local_infile_error as * const _ as usize } , 208usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( local_infile_error ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . local_infile_userdata as * const _ as usize } , 216usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( local_infile_userdata ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_options ) ) . extension as * const _ as usize } , 224usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_options ) , "::" , stringify ! ( extension ) )); } impl Clone for st_mysql_options { fn clone(&self) -> Self { *self } } #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum mysql_status { MYSQL_STATUS_READY = 0, MYSQL_STATUS_GET_RESULT = 1, MYSQL_STATUS_USE_RESULT = 2, MYSQL_STATUS_STATEMENT_GET_RESULT = 3, } #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum mysql_ssl_mode { SSL_MODE_DISABLED = 1, SSL_MODE_PREFERRED = 2, SSL_MODE_REQUIRED = 3, SSL_MODE_VERIFY_CA = 4, SSL_MODE_VERIFY_IDENTITY = 5, } #[repr(C)] #[derive(Debug, Copy)] pub struct character_set { pub number: ::std::os::raw::c_uint, pub state: ::std::os::raw::c_uint, pub csname: *const ::std::os::raw::c_char, pub name: *const ::std::os::raw::c_char, pub comment: *const ::std::os::raw::c_char, pub dir: *const ::std::os::raw::c_char, pub mbminlen: ::std::os::raw::c_uint, pub mbmaxlen: ::std::os::raw::c_uint, } #[test] fn bindgen_test_layout_character_set() { assert_eq!(::std::mem::size_of::() , 48usize , concat ! ( "Size of: " , stringify ! ( character_set ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( character_set ) )); assert_eq! (unsafe { & ( * ( 0 as * const character_set ) ) . number as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( character_set ) , "::" , stringify ! ( number ) )); assert_eq! (unsafe { & ( * ( 0 as * const character_set ) ) . state as * const _ as usize } , 4usize , concat ! ( "Alignment of field: " , stringify ! ( character_set ) , "::" , stringify ! ( state ) )); assert_eq! (unsafe { & ( * ( 0 as * const character_set ) ) . csname as * const _ as usize } , 8usize , concat ! ( "Alignment of field: " , stringify ! ( character_set ) , "::" , stringify ! ( csname ) )); assert_eq! (unsafe { & ( * ( 0 as * const character_set ) ) . name as * const _ as usize } , 16usize , concat ! ( "Alignment of field: " , stringify ! ( character_set ) , "::" , stringify ! ( name ) )); assert_eq! (unsafe { & ( * ( 0 as * const character_set ) ) . comment as * const _ as usize } , 24usize , concat ! ( "Alignment of field: " , stringify ! ( character_set ) , "::" , stringify ! ( comment ) )); assert_eq! (unsafe { & ( * ( 0 as * const character_set ) ) . dir as * const _ as usize } , 32usize , concat ! ( "Alignment of field: " , stringify ! ( character_set ) , "::" , stringify ! ( dir ) )); assert_eq! (unsafe { & ( * ( 0 as * const character_set ) ) . mbminlen as * const _ as usize } , 40usize , concat ! ( "Alignment of field: " , stringify ! ( character_set ) , "::" , stringify ! ( mbminlen ) )); assert_eq! (unsafe { & ( * ( 0 as * const character_set ) ) . mbmaxlen as * const _ as usize } , 44usize , concat ! ( "Alignment of field: " , stringify ! ( character_set ) , "::" , stringify ! ( mbmaxlen ) )); } impl Clone for character_set { fn clone(&self) -> Self { *self } } pub type MY_CHARSET_INFO = character_set; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct st_mysql_methods { _unused: [u8; 0], } #[repr(C)] pub struct st_mysql_stmt { pub mem_root: MEM_ROOT, pub list: LIST, pub mysql: *mut MYSQL, pub params: *mut MYSQL_BIND, pub bind: *mut MYSQL_BIND, pub fields: *mut MYSQL_FIELD, pub result: MYSQL_DATA, pub data_cursor: *mut MYSQL_ROWS, pub read_row_func: ::std::option::Option ::std::os::raw::c_int>, pub affected_rows: my_ulonglong, pub insert_id: my_ulonglong, pub stmt_id: ::std::os::raw::c_ulong, pub flags: ::std::os::raw::c_ulong, pub prefetch_rows: ::std::os::raw::c_ulong, pub server_status: ::std::os::raw::c_uint, pub last_errno: ::std::os::raw::c_uint, pub param_count: ::std::os::raw::c_uint, pub field_count: ::std::os::raw::c_uint, pub state: enum_mysql_stmt_state, pub last_error: [::std::os::raw::c_char; 512usize], pub sqlstate: [::std::os::raw::c_char; 6usize], pub send_types_to_server: my_bool, pub bind_param_done: my_bool, pub bind_result_done: ::std::os::raw::c_uchar, pub unbuffered_fetch_cancelled: my_bool, pub update_max_length: my_bool, pub extension: *mut st_mysql_stmt_extension, } #[test] fn bindgen_test_layout_st_mysql_stmt() { assert_eq!(::std::mem::size_of::() , 872usize , concat ! ( "Size of: " , stringify ! ( st_mysql_stmt ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( st_mysql_stmt ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . mem_root as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( mem_root ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . list as * const _ as usize } , 88usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( list ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . mysql as * const _ as usize } , 112usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( mysql ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . params as * const _ as usize } , 120usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( params ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . bind as * const _ as usize } , 128usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( bind ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . fields as * const _ as usize } , 136usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( fields ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . result as * const _ as usize } , 144usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( result ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . data_cursor as * const _ as usize } , 272usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( data_cursor ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . read_row_func as * const _ as usize } , 280usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( read_row_func ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . affected_rows as * const _ as usize } , 288usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( affected_rows ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . insert_id as * const _ as usize } , 296usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( insert_id ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . stmt_id as * const _ as usize } , 304usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( stmt_id ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . flags as * const _ as usize } , 308usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( flags ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . prefetch_rows as * const _ as usize } , 312usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( prefetch_rows ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . server_status as * const _ as usize } , 316usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( server_status ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . last_errno as * const _ as usize } , 320usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( last_errno ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . param_count as * const _ as usize } , 324usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( param_count ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . field_count as * const _ as usize } , 328usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( field_count ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . state as * const _ as usize } , 332usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( state ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . last_error as * const _ as usize } , 336usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( last_error ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . sqlstate as * const _ as usize } , 848usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( sqlstate ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . send_types_to_server as * const _ as usize } , 854usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( send_types_to_server ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . bind_param_done as * const _ as usize } , 855usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( bind_param_done ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . bind_result_done as * const _ as usize } , 856usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( bind_result_done ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . unbuffered_fetch_cancelled as * const _ as usize } , 857usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( unbuffered_fetch_cancelled ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . update_max_length as * const _ as usize } , 858usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( update_max_length ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_stmt ) ) . extension as * const _ as usize } , 864usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_stmt ) , "::" , stringify ! ( extension ) )); } pub type MYSQL = st_mysql; #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_res { pub row_count: my_ulonglong, pub fields: *mut MYSQL_FIELD, pub data: *mut MYSQL_DATA, pub data_cursor: *mut MYSQL_ROWS, pub lengths: *mut ::std::os::raw::c_ulong, pub handle: *mut MYSQL, pub methods: *const st_mysql_methods, pub row: MYSQL_ROW, pub current_row: MYSQL_ROW, pub field_alloc: MEM_ROOT, pub field_count: ::std::os::raw::c_uint, pub current_field: ::std::os::raw::c_uint, pub eof: my_bool, pub unbuffered_fetch_cancelled: my_bool, pub extension: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_st_mysql_res() { assert_eq!(::std::mem::size_of::() , 184usize , concat ! ( "Size of: " , stringify ! ( st_mysql_res ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( st_mysql_res ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_res ) ) . row_count as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" , stringify ! ( row_count ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_res ) ) . fields as * const _ as usize } , 8usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" , stringify ! ( fields ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_res ) ) . data as * const _ as usize } , 16usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" , stringify ! ( data ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_res ) ) . data_cursor as * const _ as usize } , 24usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" , stringify ! ( data_cursor ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_res ) ) . lengths as * const _ as usize } , 32usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" , stringify ! ( lengths ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_res ) ) . handle as * const _ as usize } , 40usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" , stringify ! ( handle ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_res ) ) . methods as * const _ as usize } , 48usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" , stringify ! ( methods ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_res ) ) . row as * const _ as usize } , 56usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" , stringify ! ( row ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_res ) ) . current_row as * const _ as usize } , 64usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" , stringify ! ( current_row ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_res ) ) . field_alloc as * const _ as usize } , 72usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" , stringify ! ( field_alloc ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_res ) ) . field_count as * const _ as usize } , 160usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" , stringify ! ( field_count ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_res ) ) . current_field as * const _ as usize } , 164usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" , stringify ! ( current_field ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_res ) ) . eof as * const _ as usize } , 168usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" , stringify ! ( eof ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_res ) ) . unbuffered_fetch_cancelled as * const _ as usize } , 169usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" , stringify ! ( unbuffered_fetch_cancelled ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_res ) ) . extension as * const _ as usize } , 176usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_res ) , "::" , stringify ! ( extension ) )); } impl Clone for st_mysql_res { fn clone(&self) -> Self { *self } } pub type MYSQL_RES = st_mysql_res; extern "C" { pub fn mysql_server_init(argc: ::std::os::raw::c_int, argv: *mut *mut ::std::os::raw::c_char, groups: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_server_end(); } extern "C" { pub fn mysql_thread_init() -> my_bool; } extern "C" { pub fn mysql_thread_end(); } extern "C" { pub fn mysql_num_rows(res: *mut MYSQL_RES) -> my_ulonglong; } extern "C" { pub fn mysql_num_fields(res: *mut MYSQL_RES) -> ::std::os::raw::c_uint; } extern "C" { pub fn mysql_eof(res: *mut MYSQL_RES) -> my_bool; } extern "C" { pub fn mysql_fetch_field_direct(res: *mut MYSQL_RES, fieldnr: ::std::os::raw::c_uint) -> *mut MYSQL_FIELD; } extern "C" { pub fn mysql_fetch_fields(res: *mut MYSQL_RES) -> *mut MYSQL_FIELD; } extern "C" { pub fn mysql_row_tell(res: *mut MYSQL_RES) -> MYSQL_ROW_OFFSET; } extern "C" { pub fn mysql_field_tell(res: *mut MYSQL_RES) -> MYSQL_FIELD_OFFSET; } extern "C" { pub fn mysql_field_count(mysql: *mut MYSQL) -> ::std::os::raw::c_uint; } extern "C" { pub fn mysql_affected_rows(mysql: *mut MYSQL) -> my_ulonglong; } extern "C" { pub fn mysql_insert_id(mysql: *mut MYSQL) -> my_ulonglong; } extern "C" { pub fn mysql_errno(mysql: *mut MYSQL) -> ::std::os::raw::c_uint; } extern "C" { pub fn mysql_error(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_sqlstate(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_warning_count(mysql: *mut MYSQL) -> ::std::os::raw::c_uint; } extern "C" { pub fn mysql_info(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_thread_id(mysql: *mut MYSQL) -> ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_character_set_name(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_set_character_set(mysql: *mut MYSQL, csname: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_init(mysql: *mut MYSQL) -> *mut MYSQL; } extern "C" { pub fn mysql_ssl_set(mysql: *mut MYSQL, key: *const ::std::os::raw::c_char, cert: *const ::std::os::raw::c_char, ca: *const ::std::os::raw::c_char, capath: *const ::std::os::raw::c_char, cipher: *const ::std::os::raw::c_char) -> my_bool; } extern "C" { pub fn mysql_get_ssl_cipher(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_change_user(mysql: *mut MYSQL, user: *const ::std::os::raw::c_char, passwd: *const ::std::os::raw::c_char, db: *const ::std::os::raw::c_char) -> my_bool; } extern "C" { pub fn mysql_real_connect(mysql: *mut MYSQL, host: *const ::std::os::raw::c_char, user: *const ::std::os::raw::c_char, passwd: *const ::std::os::raw::c_char, db: *const ::std::os::raw::c_char, port: ::std::os::raw::c_uint, unix_socket: *const ::std::os::raw::c_char, clientflag: ::std::os::raw::c_ulong) -> *mut MYSQL; } extern "C" { pub fn mysql_select_db(mysql: *mut MYSQL, db: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_query(mysql: *mut MYSQL, q: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_send_query(mysql: *mut MYSQL, q: *const ::std::os::raw::c_char, length: ::std::os::raw::c_ulong) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_real_query(mysql: *mut MYSQL, q: *const ::std::os::raw::c_char, length: ::std::os::raw::c_ulong) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_store_result(mysql: *mut MYSQL) -> *mut MYSQL_RES; } extern "C" { pub fn mysql_use_result(mysql: *mut MYSQL) -> *mut MYSQL_RES; } extern "C" { pub fn mysql_get_character_set_info(mysql: *mut MYSQL, charset: *mut MY_CHARSET_INFO); } extern "C" { pub fn mysql_session_track_get_first(mysql: *mut MYSQL, type_: enum_session_state_type, data: *mut *const ::std::os::raw::c_char, length: *mut usize) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_session_track_get_next(mysql: *mut MYSQL, type_: enum_session_state_type, data: *mut *const ::std::os::raw::c_char, length: *mut usize) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_set_local_infile_handler(mysql: *mut MYSQL, local_infile_init: ::std::option::Option ::std::os::raw::c_int>, local_infile_read: ::std::option::Option ::std::os::raw::c_int>, local_infile_end: ::std::option::Option, local_infile_error: ::std::option::Option ::std::os::raw::c_int>, arg1: *mut ::std::os::raw::c_void); } extern "C" { pub fn mysql_set_local_infile_default(mysql: *mut MYSQL); } extern "C" { pub fn mysql_shutdown(mysql: *mut MYSQL, shutdown_level: mysql_enum_shutdown_level) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_dump_debug_info(mysql: *mut MYSQL) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_refresh(mysql: *mut MYSQL, refresh_options: ::std::os::raw::c_uint) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_kill(mysql: *mut MYSQL, pid: ::std::os::raw::c_ulong) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_set_server_option(mysql: *mut MYSQL, option: enum_mysql_set_option) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_ping(mysql: *mut MYSQL) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_stat(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_get_server_info(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_get_client_info() -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_get_client_version() -> ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_get_host_info(mysql: *mut MYSQL) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_get_server_version(mysql: *mut MYSQL) -> ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_get_proto_info(mysql: *mut MYSQL) -> ::std::os::raw::c_uint; } extern "C" { pub fn mysql_list_dbs(mysql: *mut MYSQL, wild: *const ::std::os::raw::c_char) -> *mut MYSQL_RES; } extern "C" { pub fn mysql_list_tables(mysql: *mut MYSQL, wild: *const ::std::os::raw::c_char) -> *mut MYSQL_RES; } extern "C" { pub fn mysql_list_processes(mysql: *mut MYSQL) -> *mut MYSQL_RES; } extern "C" { pub fn mysql_options(mysql: *mut MYSQL, option: mysql_option, arg: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_options4(mysql: *mut MYSQL, option: mysql_option, arg1: *const ::std::os::raw::c_void, arg2: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_get_option(mysql: *mut MYSQL, option: mysql_option, arg: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_free_result(result: *mut MYSQL_RES); } extern "C" { pub fn mysql_data_seek(result: *mut MYSQL_RES, offset: my_ulonglong); } extern "C" { pub fn mysql_row_seek(result: *mut MYSQL_RES, offset: MYSQL_ROW_OFFSET) -> MYSQL_ROW_OFFSET; } extern "C" { pub fn mysql_field_seek(result: *mut MYSQL_RES, offset: MYSQL_FIELD_OFFSET) -> MYSQL_FIELD_OFFSET; } extern "C" { pub fn mysql_fetch_row(result: *mut MYSQL_RES) -> MYSQL_ROW; } extern "C" { pub fn mysql_fetch_lengths(result: *mut MYSQL_RES) -> *mut ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_fetch_field(result: *mut MYSQL_RES) -> *mut MYSQL_FIELD; } extern "C" { pub fn mysql_list_fields(mysql: *mut MYSQL, table: *const ::std::os::raw::c_char, wild: *const ::std::os::raw::c_char) -> *mut MYSQL_RES; } extern "C" { pub fn mysql_escape_string(to: *mut ::std::os::raw::c_char, from: *const ::std::os::raw::c_char, from_length: ::std::os::raw::c_ulong) -> ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_hex_string(to: *mut ::std::os::raw::c_char, from: *const ::std::os::raw::c_char, from_length: ::std::os::raw::c_ulong) -> ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_real_escape_string(mysql: *mut MYSQL, to: *mut ::std::os::raw::c_char, from: *const ::std::os::raw::c_char, length: ::std::os::raw::c_ulong) -> ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_real_escape_string_quote(mysql: *mut MYSQL, to: *mut ::std::os::raw::c_char, from: *const ::std::os::raw::c_char, length: ::std::os::raw::c_ulong, quote: ::std::os::raw::c_char) -> ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_debug(debug: *const ::std::os::raw::c_char); } extern "C" { pub fn mysql_thread_safe() -> ::std::os::raw::c_uint; } extern "C" { pub fn mysql_embedded() -> my_bool; } extern "C" { pub fn mysql_read_query_result(mysql: *mut MYSQL) -> my_bool; } extern "C" { pub fn mysql_reset_connection(mysql: *mut MYSQL) -> ::std::os::raw::c_int; } #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum enum_mysql_stmt_state { MYSQL_STMT_INIT_DONE = 1, MYSQL_STMT_PREPARE_DONE = 2, MYSQL_STMT_EXECUTE_DONE = 3, MYSQL_STMT_FETCH_DONE = 4, } #[repr(C)] #[derive(Debug, Copy)] pub struct st_mysql_bind { pub length: *mut ::std::os::raw::c_ulong, pub is_null: *mut my_bool, pub buffer: *mut ::std::os::raw::c_void, pub error: *mut my_bool, pub row_ptr: *mut ::std::os::raw::c_uchar, pub store_param_func: ::std::option::Option, pub fetch_result: ::std::option::Option, pub skip_result: ::std::option::Option, pub buffer_length: ::std::os::raw::c_ulong, pub offset: ::std::os::raw::c_ulong, pub length_value: ::std::os::raw::c_ulong, pub param_number: ::std::os::raw::c_uint, pub pack_length: ::std::os::raw::c_uint, pub buffer_type: enum_field_types, pub error_value: my_bool, pub is_unsigned: my_bool, pub long_data_used: my_bool, pub is_null_value: my_bool, pub extension: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_st_mysql_bind() { assert_eq!(::std::mem::size_of::() , 104usize , concat ! ( "Size of: " , stringify ! ( st_mysql_bind ) )); assert_eq! (::std::mem::align_of::() , 8usize , concat ! ( "Alignment of " , stringify ! ( st_mysql_bind ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . length as * const _ as usize } , 0usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( length ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . is_null as * const _ as usize } , 8usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( is_null ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . buffer as * const _ as usize } , 16usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( buffer ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . error as * const _ as usize } , 24usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( error ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . row_ptr as * const _ as usize } , 32usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( row_ptr ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . store_param_func as * const _ as usize } , 40usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( store_param_func ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . fetch_result as * const _ as usize } , 48usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( fetch_result ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . skip_result as * const _ as usize } , 56usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( skip_result ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . buffer_length as * const _ as usize } , 64usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( buffer_length ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . offset as * const _ as usize } , 68usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( offset ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . length_value as * const _ as usize } , 72usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( length_value ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . param_number as * const _ as usize } , 76usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( param_number ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . pack_length as * const _ as usize } , 80usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( pack_length ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . buffer_type as * const _ as usize } , 84usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( buffer_type ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . error_value as * const _ as usize } , 88usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( error_value ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . is_unsigned as * const _ as usize } , 89usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( is_unsigned ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . long_data_used as * const _ as usize } , 90usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( long_data_used ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . is_null_value as * const _ as usize } , 91usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( is_null_value ) )); assert_eq! (unsafe { & ( * ( 0 as * const st_mysql_bind ) ) . extension as * const _ as usize } , 96usize , concat ! ( "Alignment of field: " , stringify ! ( st_mysql_bind ) , "::" , stringify ! ( extension ) )); } impl Clone for st_mysql_bind { fn clone(&self) -> Self { *self } } pub type MYSQL_BIND = st_mysql_bind; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct st_mysql_stmt_extension { _unused: [u8; 0], } pub type MYSQL_STMT = st_mysql_stmt; #[repr(i32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum enum_stmt_attr_type { STMT_ATTR_UPDATE_MAX_LENGTH = 0, STMT_ATTR_CURSOR_TYPE = 1, STMT_ATTR_PREFETCH_ROWS = 2, } extern "C" { pub fn mysql_stmt_init(mysql: *mut MYSQL) -> *mut MYSQL_STMT; } extern "C" { pub fn mysql_stmt_prepare(stmt: *mut MYSQL_STMT, query: *const ::std::os::raw::c_char, length: ::std::os::raw::c_ulong) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_stmt_execute(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_stmt_fetch(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_stmt_fetch_column(stmt: *mut MYSQL_STMT, bind_arg: *mut MYSQL_BIND, column: ::std::os::raw::c_uint, offset: ::std::os::raw::c_ulong) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_stmt_store_result(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_stmt_param_count(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_ulong; } extern "C" { pub fn mysql_stmt_attr_set(stmt: *mut MYSQL_STMT, attr_type: enum_stmt_attr_type, attr: *const ::std::os::raw::c_void) -> my_bool; } extern "C" { pub fn mysql_stmt_attr_get(stmt: *mut MYSQL_STMT, attr_type: enum_stmt_attr_type, attr: *mut ::std::os::raw::c_void) -> my_bool; } extern "C" { pub fn mysql_stmt_bind_param(stmt: *mut MYSQL_STMT, bnd: *mut MYSQL_BIND) -> my_bool; } extern "C" { pub fn mysql_stmt_bind_result(stmt: *mut MYSQL_STMT, bnd: *mut MYSQL_BIND) -> my_bool; } extern "C" { pub fn mysql_stmt_close(stmt: *mut MYSQL_STMT) -> my_bool; } extern "C" { pub fn mysql_stmt_reset(stmt: *mut MYSQL_STMT) -> my_bool; } extern "C" { pub fn mysql_stmt_free_result(stmt: *mut MYSQL_STMT) -> my_bool; } extern "C" { pub fn mysql_stmt_send_long_data(stmt: *mut MYSQL_STMT, param_number: ::std::os::raw::c_uint, data: *const ::std::os::raw::c_char, length: ::std::os::raw::c_ulong) -> my_bool; } extern "C" { pub fn mysql_stmt_result_metadata(stmt: *mut MYSQL_STMT) -> *mut MYSQL_RES; } extern "C" { pub fn mysql_stmt_param_metadata(stmt: *mut MYSQL_STMT) -> *mut MYSQL_RES; } extern "C" { pub fn mysql_stmt_errno(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_uint; } extern "C" { pub fn mysql_stmt_error(stmt: *mut MYSQL_STMT) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_stmt_sqlstate(stmt: *mut MYSQL_STMT) -> *const ::std::os::raw::c_char; } extern "C" { pub fn mysql_stmt_row_seek(stmt: *mut MYSQL_STMT, offset: MYSQL_ROW_OFFSET) -> MYSQL_ROW_OFFSET; } extern "C" { pub fn mysql_stmt_row_tell(stmt: *mut MYSQL_STMT) -> MYSQL_ROW_OFFSET; } extern "C" { pub fn mysql_stmt_data_seek(stmt: *mut MYSQL_STMT, offset: my_ulonglong); } extern "C" { pub fn mysql_stmt_num_rows(stmt: *mut MYSQL_STMT) -> my_ulonglong; } extern "C" { pub fn mysql_stmt_affected_rows(stmt: *mut MYSQL_STMT) -> my_ulonglong; } extern "C" { pub fn mysql_stmt_insert_id(stmt: *mut MYSQL_STMT) -> my_ulonglong; } extern "C" { pub fn mysql_stmt_field_count(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_uint; } extern "C" { pub fn mysql_commit(mysql: *mut MYSQL) -> my_bool; } extern "C" { pub fn mysql_rollback(mysql: *mut MYSQL) -> my_bool; } extern "C" { pub fn mysql_autocommit(mysql: *mut MYSQL, auto_mode: my_bool) -> my_bool; } extern "C" { pub fn mysql_more_results(mysql: *mut MYSQL) -> my_bool; } extern "C" { pub fn mysql_next_result(mysql: *mut MYSQL) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_stmt_next_result(stmt: *mut MYSQL_STMT) -> ::std::os::raw::c_int; } extern "C" { pub fn mysql_close(sock: *mut MYSQL); } #[repr(C)] #[derive(Debug, Copy)] pub struct charset_info_st { pub _address: u8, } impl Clone for charset_info_st { fn clone(&self) -> Self { *self } } #[repr(C)] #[derive(Debug, Copy)] pub struct st_dynamic_array { pub _address: u8, } impl Clone for st_dynamic_array { fn clone(&self) -> Self { *self } } mysqlclient-sys-0.2.5/src/lib.rs000064400000000000000000000002560072674642500147460ustar 00000000000000#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)] #[cfg(not(windows))] include!("bindings_macos.rs"); #[cfg(windows)] include!("bindings_windows.rs");