├── plugins ├── plugin.def ├── pvio │ ├── pvio_plugin.def │ └── CMakeLists.txt ├── auth │ ├── ref10 │ │ ├── crypto_verify.h │ │ ├── d.h │ │ ├── d2.h │ │ ├── sqrtm1.h │ │ ├── api.h │ │ ├── ge_p2_0.c │ │ ├── crypto_hash_sha512.h │ │ ├── crypto_verify_32.h │ │ ├── crypto_int32.h │ │ ├── crypto_int64.h │ │ ├── crypto_uint32.h │ │ ├── crypto_uint64.h │ │ ├── ge_p3_0.c │ │ ├── ge_precomp_0.c │ │ ├── ge_p2_dbl.c │ │ ├── ge_add.c │ │ ├── ge_sub.c │ │ ├── ge_madd.c │ │ ├── ge_msub.c │ │ ├── ge_p3_dbl.c │ │ ├── fe_pow22523.c │ │ ├── fe_invert.c │ │ ├── ge_p3_to_p2.c │ │ ├── ge_p1p1_to_p2.c │ │ ├── fe_0.c │ │ ├── fe_1.c │ │ ├── ge_p1p1_to_p3.c │ │ ├── ge_tobytes.c │ │ ├── ge_p3_tobytes.c │ │ ├── ge_p3_to_cached.c │ │ ├── fe_isnegative.c │ │ ├── fe_isnonzero.c │ │ ├── crypto_sign.h │ │ ├── sc.h │ │ ├── keypair.c │ │ ├── fe_copy.c │ │ ├── verify.c │ │ ├── open.c │ │ ├── sign.c │ │ ├── fe_neg.c │ │ ├── ge_frombytes.c │ │ ├── fe_add.c │ │ ├── fe_sub.c │ │ └── fe_cmov.c │ ├── common.h │ ├── ed25519_common.h │ ├── gssapi_errmsg.h │ └── sspi_common.h ├── connection │ └── CMakeLists.txt ├── CMakeLists.txt ├── io │ └── CMakeLists.txt └── compress │ └── CMakeLists.txt ├── include ├── ma_server_error.h ├── ma_hash.h ├── ma_pthread.h └── mariadb_version.h.in ├── external └── zlib │ ├── zlib.3.pdf │ ├── win32 │ ├── VisualC.txt │ └── zlib1.rc │ ├── old │ ├── README │ ├── os2 │ │ └── zlib.def │ ├── descrip.mms │ └── Makefile.emx │ ├── nintendods │ └── README │ ├── zlib.pc.in │ ├── zlib.pc.cmakein │ ├── inffast.h │ ├── gzclose.c │ ├── LICENSE │ ├── adler32_simd.h │ ├── watcom │ ├── watcom_l.mak │ └── watcom_f.mak │ └── msdos │ └── Makefile.emx ├── .gitmodules ├── win ├── packaging │ ├── WixUIBannerBmp.jpg │ └── WixUIDialogBmp.jpg └── resource.rc.in ├── cmake ├── libressl_version.c ├── misc.cmake ├── FindHogweed.cmake ├── sign.cmake ├── FindZStd.cmake ├── linux_x86_toolchain.cmake ├── FindNettle.cmake ├── SearchLibrary.cmake ├── install_plugins.cmake ├── check_functions.cmake ├── ConnectorName.cmake ├── export.cmake ├── COPYING-CMAKE-SCRIPTS └── symlink.cmake ├── unittest ├── libmariadb │ ├── fingerprint.list.in │ ├── certs │ │ └── server-cert.crl │ └── conc336.c └── mytap │ ├── CMakeLists.txt │ └── t │ └── basic-t.c ├── libmariadb ├── win32_errmsg.h └── bmove_upp.c ├── win-iconv ├── iconv.h └── mlang.h ├── appveyor-download.bat ├── README ├── benchmark ├── build.sh ├── installation.sh └── launch.sh ├── man ├── mariadb_free_rpl_event.3 ├── mariadb_rpl_open.3 ├── mysql_close.3 ├── mysql_stmt_param_metadata.3 ├── mariadb_dyncol_has_names.3 ├── mysql_stmt_free_result.3 ├── mariadb_connection.3 ├── mariadb_rpl_close.3 ├── mysql_get_client_info.3 ├── mysql_num_fields.3 ├── mariadb_dyncol_free.3 ├── mysql_eof.3 ├── mariadb_dyncol_json.3 ├── mysql_get_proto_info.3 ├── mysql_field_tell.3 ├── mysql_server_end.3 ├── mysql_row_tell.3 ├── mysql_get_socket.3 ├── mysql_get_host_info.3 ├── mysql_get_server_version.3 ├── mariadb_dyncol_check.3 ├── mariadb_dyncol_exists_num.3 ├── mysql_rollback.3 ├── mariadb_dyncol_exists_named.3 ├── mariadb_dyncol_column_cmp_named.3 ├── mysql_stat.3 ├── mysql_sqlstate.3 ├── mysql_thread_end.3 ├── mysql_commit.3 ├── mysql_free_result.3 ├── mariadb_stmt_fetch_fields.3 ├── mysql_get_server_info.3 ├── mariadb_reconnect.3 ├── mariadb_dyncol_get_named.3 ├── mariadb_dyncol_get_num.3 ├── mysql_insert_id.3 ├── mysql_stmt_param_count.3 ├── mysql_errno.3 ├── mysql_num_rows.3 ├── mysql_stmt_num_rows.3 ├── mysql_thread_id.3 ├── mysql_get_client_version.3 ├── mariadb_dyncol_column_count.3 ├── mysql_stmt_errno.3 ├── mysql_stmt_row_tell.3 ├── mariadb_cancel.3 ├── mysql_stmt_field_count.3 ├── mysql_options.3 ├── mysql_stmt_sqlstate.3 ├── mysql_data_seek.3 ├── mysql_stmt_close.3 ├── mysql_warning_count.3 ├── mysql_options4.3 ├── mysql_stmt_row_seek.3 ├── mysql_row_seek.3 ├── mysql_shutdown.3 ├── mysql_stmt_warning_count.3 ├── mysql_stmt_more_results.3 ├── mysql_stmt_store_result.3 ├── mysql_fetch_fields.3 ├── mysql_server_init.3 ├── mysql_stmt_data_seek.3 ├── mysql_read_query_result.3 ├── mysql_thread_init.3 ├── mysql_stmt_error.3 ├── mysql_hex_string.3 ├── mysql_fetch_field_direct.3 ├── mysql_error.3 ├── mysql_get_character_set_info.3 ├── mysql_stmt_insert_id.3 ├── mysql_store_result.3 ├── mysql_set_server_option.3 ├── mysql_stmt_init.3 ├── mariadb_rpl_fetch.3 ├── mysql_stmt_next_result.3 ├── mariadb_dyncol_list_named.3 ├── mariadb_dyncol_list_num.3 ├── mysql_ping.3 ├── mysql_stmt_execute.3 ├── mysql_stmt_reset.3 ├── mysql_field_seek.3 ├── mysql_next_result.3 ├── mysql_fetch_lengths.3 ├── mysql_init.3 ├── mysql_stmt_fetch_column.3 ├── mysql_field_count.3 ├── mysql_stmt_bind_result.3 ├── mysql_more_results.3 ├── mariadb_dyncol_update_many_named.3 ├── mariadb_dyncol_update_many_num.3 ├── mysql_real_query.3 ├── mysql_fetch_row.3 ├── mysql_kill.3 ├── mysql_fetch_field.3 ├── mysql_stmt_fetch.3 ├── mysql_stmt_affected_rows.3 ├── mysql_use_result.3 ├── mysql_affected_rows.3 ├── mysql_get_ssl_cipher.3 ├── mariadb_dyncol_create_many_num.3 ├── mariadb_dyncol_create_many_named.3 ├── mysql_reset_connection.3 ├── mysql_stmt_bind_param.3 ├── mariadb_dyncol_unpack.3 ├── mariadb_rpl_get_optionsv.3 ├── mysql_send_query.3 ├── mysql_real_escape_string.3 ├── mysql_query.3 ├── mysql_stmt_send_long_data.3 └── mysql_stmt_result_metadata.3 ├── mariadb_config └── libmariadb.pc.in ├── client └── CMakeLists.txt ├── .travis.yml └── appveyor.yml /plugins/plugin.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | _mysql_client_plugin_declaration_ DATA 3 | -------------------------------------------------------------------------------- /plugins/pvio/pvio_plugin.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | _mysql_client_plugin_declaration_ DATA 3 | -------------------------------------------------------------------------------- /include/ma_server_error.h: -------------------------------------------------------------------------------- 1 | /* This file exists for compatibility only */ 2 | #include "mysqld_error.h" 3 | -------------------------------------------------------------------------------- /plugins/auth/ref10/crypto_verify.h: -------------------------------------------------------------------------------- 1 | int crypto_verify(const unsigned char *x,const unsigned char *y); 2 | -------------------------------------------------------------------------------- /plugins/auth/ref10/d.h: -------------------------------------------------------------------------------- 1 | -10913610,13857413,-15372611,6949391,114729,-8787816,-6275908,-3247719,-18696448,-12055116 2 | -------------------------------------------------------------------------------- /plugins/auth/ref10/d2.h: -------------------------------------------------------------------------------- 1 | -21827239,-5839606,-30745221,13898782,229458,15978800,-12551817,-6495438,29715968,9444199 2 | -------------------------------------------------------------------------------- /plugins/auth/ref10/sqrtm1.h: -------------------------------------------------------------------------------- 1 | -32595792,-7943725,9377950,3500415,12389472,-272473,-25146209,-2005654,326686,11406482 2 | -------------------------------------------------------------------------------- /external/zlib/zlib.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariadb-corporation/mariadb-connector-c/HEAD/external/zlib/zlib.3.pdf -------------------------------------------------------------------------------- /plugins/auth/ref10/api.h: -------------------------------------------------------------------------------- 1 | #define CRYPTO_PUBLICKEYBYTES 32 2 | #define CRYPTO_BYTES 64 3 | #define CRYPTO_DETERMINISTIC 1 4 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "docs"] 2 | path = docs 3 | url = https://github.com/mariadb-corporation/mariadb-connector-c.wiki.git 4 | -------------------------------------------------------------------------------- /win/packaging/WixUIBannerBmp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariadb-corporation/mariadb-connector-c/HEAD/win/packaging/WixUIBannerBmp.jpg -------------------------------------------------------------------------------- /win/packaging/WixUIDialogBmp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariadb-corporation/mariadb-connector-c/HEAD/win/packaging/WixUIDialogBmp.jpg -------------------------------------------------------------------------------- /plugins/auth/ref10/ge_p2_0.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | void ge_p2_0(ge_p2 *h) 4 | { 5 | fe_0(h->X); 6 | fe_1(h->Y); 7 | fe_1(h->Z); 8 | } 9 | -------------------------------------------------------------------------------- /plugins/auth/ref10/crypto_hash_sha512.h: -------------------------------------------------------------------------------- 1 | #include 2 | #define crypto_hash_sha512(DST,SRC,SLEN) ma_hash(MA_HASH_SHA512, SRC, SLEN, DST) 3 | -------------------------------------------------------------------------------- /plugins/auth/ref10/crypto_verify_32.h: -------------------------------------------------------------------------------- 1 | #define crypto_verify_32 crypto_verify 2 | int crypto_verify(const unsigned char *x,const unsigned char *y); 3 | -------------------------------------------------------------------------------- /cmake/libressl_version.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | printf("%s", LIBRESSL_VERSION_TEXT); 7 | } 8 | -------------------------------------------------------------------------------- /plugins/auth/ref10/crypto_int32.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | typedef int32_t crypto_int32; 4 | 5 | #define select ed25519_select 6 | -------------------------------------------------------------------------------- /plugins/auth/ref10/crypto_int64.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | typedef int64_t crypto_int64; 4 | 5 | #define select ed25519_select 6 | -------------------------------------------------------------------------------- /plugins/auth/ref10/crypto_uint32.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | typedef uint32_t crypto_uint32; 4 | 5 | #define select ed25519_select 6 | -------------------------------------------------------------------------------- /plugins/auth/ref10/crypto_uint64.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | typedef uint64_t crypto_uint64; 4 | 5 | #define select ed25519_select 6 | -------------------------------------------------------------------------------- /unittest/libmariadb/fingerprint.list.in: -------------------------------------------------------------------------------- 1 | 86DD6D764C0CA47C5014E1E7802674BFDB674ED3 2 | @SSL_CERT_FINGER_PRINT@ 3 | 73F1FEC1FE041473563BFF2D624B88F6CFCFE626 4 | 5 | -------------------------------------------------------------------------------- /external/zlib/win32/VisualC.txt: -------------------------------------------------------------------------------- 1 | 2 | To build zlib using the Microsoft Visual C++ environment, 3 | use the appropriate project from the contrib/vstudio/ directory. 4 | -------------------------------------------------------------------------------- /libmariadb/win32_errmsg.h: -------------------------------------------------------------------------------- 1 | #include 2 | void ma_format_win32_error(char* buf, size_t buflen, DWORD code, _Printf_format_string_ const char* fmt, ...); 3 | -------------------------------------------------------------------------------- /external/zlib/old/README: -------------------------------------------------------------------------------- 1 | This directory contains files that have not been updated for zlib 1.2.x 2 | 3 | (Volunteers are encouraged to help clean this up. Thanks.) 4 | -------------------------------------------------------------------------------- /plugins/auth/common.h: -------------------------------------------------------------------------------- 1 | /** Maximal length of the target name */ 2 | #define PRINCIPAL_NAME_MAX 256 3 | /** Maximal length of the mech string */ 4 | #define MECH_NAME_MAX 30 5 | -------------------------------------------------------------------------------- /plugins/auth/ref10/ge_p3_0.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | void ge_p3_0(ge_p3 *h) 4 | { 5 | fe_0(h->X); 6 | fe_1(h->Y); 7 | fe_1(h->Z); 8 | fe_0(h->T); 9 | } 10 | -------------------------------------------------------------------------------- /plugins/auth/ref10/ge_precomp_0.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | void ge_precomp_0(ge_precomp *h) 4 | { 5 | fe_1(h->yplusx); 6 | fe_1(h->yminusx); 7 | fe_0(h->xy2d); 8 | } 9 | -------------------------------------------------------------------------------- /plugins/auth/ref10/ge_p2_dbl.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = 2 * p 5 | */ 6 | 7 | void ge_p2_dbl(ge_p1p1 *r,const ge_p2 *p) 8 | { 9 | fe t0; 10 | #include "ge_p2_dbl.h" 11 | } 12 | -------------------------------------------------------------------------------- /plugins/auth/ref10/ge_add.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p + q 5 | */ 6 | 7 | void ge_add(ge_p1p1 *r,const ge_p3 *p,const ge_cached *q) 8 | { 9 | fe t0; 10 | #include "ge_add.h" 11 | } 12 | -------------------------------------------------------------------------------- /plugins/auth/ref10/ge_sub.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p - q 5 | */ 6 | 7 | void ge_sub(ge_p1p1 *r,const ge_p3 *p,const ge_cached *q) 8 | { 9 | fe t0; 10 | #include "ge_sub.h" 11 | } 12 | -------------------------------------------------------------------------------- /plugins/auth/ref10/ge_madd.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p + q 5 | */ 6 | 7 | void ge_madd(ge_p1p1 *r,const ge_p3 *p,const ge_precomp *q) 8 | { 9 | fe t0; 10 | #include "ge_madd.h" 11 | } 12 | -------------------------------------------------------------------------------- /plugins/auth/ref10/ge_msub.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p - q 5 | */ 6 | 7 | void ge_msub(ge_p1p1 *r,const ge_p3 *p,const ge_precomp *q) 8 | { 9 | fe t0; 10 | #include "ge_msub.h" 11 | } 12 | -------------------------------------------------------------------------------- /plugins/auth/ref10/ge_p3_dbl.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = 2 * p 5 | */ 6 | 7 | void ge_p3_dbl(ge_p1p1 *r,const ge_p3 *p) 8 | { 9 | ge_p2 q; 10 | ge_p3_to_p2(&q,p); 11 | ge_p2_dbl(r,&q); 12 | } 13 | -------------------------------------------------------------------------------- /plugins/auth/ref10/fe_pow22523.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | void fe_pow22523(fe out,const fe z) 4 | { 5 | fe t0; 6 | fe t1; 7 | fe t2; 8 | int i; 9 | 10 | #include "pow22523.h" 11 | 12 | return; 13 | } 14 | -------------------------------------------------------------------------------- /plugins/auth/ref10/fe_invert.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | void fe_invert(fe out,const fe z) 4 | { 5 | fe t0; 6 | fe t1; 7 | fe t2; 8 | fe t3; 9 | int i; 10 | 11 | #include "pow225521.h" 12 | 13 | return; 14 | } 15 | -------------------------------------------------------------------------------- /plugins/auth/ref10/ge_p3_to_p2.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p 5 | */ 6 | 7 | extern void ge_p3_to_p2(ge_p2 *r,const ge_p3 *p) 8 | { 9 | fe_copy(r->X,p->X); 10 | fe_copy(r->Y,p->Y); 11 | fe_copy(r->Z,p->Z); 12 | } 13 | -------------------------------------------------------------------------------- /external/zlib/nintendods/README: -------------------------------------------------------------------------------- 1 | This Makefile requires devkitARM (http://www.devkitpro.org/category/devkitarm/) and works inside "contrib/nds". It is based on a devkitARM template. 2 | 3 | Eduardo Costa 4 | January 3, 2009 5 | 6 | -------------------------------------------------------------------------------- /plugins/auth/ref10/ge_p1p1_to_p2.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p 5 | */ 6 | 7 | extern void ge_p1p1_to_p2(ge_p2 *r,const ge_p1p1 *p) 8 | { 9 | fe_mul(r->X,p->X,p->T); 10 | fe_mul(r->Y,p->Y,p->Z); 11 | fe_mul(r->Z,p->Z,p->T); 12 | } 13 | -------------------------------------------------------------------------------- /plugins/auth/ref10/fe_0.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = 0 5 | */ 6 | 7 | void fe_0(fe h) 8 | { 9 | h[0] = 0; 10 | h[1] = 0; 11 | h[2] = 0; 12 | h[3] = 0; 13 | h[4] = 0; 14 | h[5] = 0; 15 | h[6] = 0; 16 | h[7] = 0; 17 | h[8] = 0; 18 | h[9] = 0; 19 | } 20 | -------------------------------------------------------------------------------- /plugins/auth/ref10/fe_1.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = 1 5 | */ 6 | 7 | void fe_1(fe h) 8 | { 9 | h[0] = 1; 10 | h[1] = 0; 11 | h[2] = 0; 12 | h[3] = 0; 13 | h[4] = 0; 14 | h[5] = 0; 15 | h[6] = 0; 16 | h[7] = 0; 17 | h[8] = 0; 18 | h[9] = 0; 19 | } 20 | -------------------------------------------------------------------------------- /plugins/auth/ref10/ge_p1p1_to_p3.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p 5 | */ 6 | 7 | extern void ge_p1p1_to_p3(ge_p3 *r,const ge_p1p1 *p) 8 | { 9 | fe_mul(r->X,p->X,p->T); 10 | fe_mul(r->Y,p->Y,p->Z); 11 | fe_mul(r->Z,p->Z,p->T); 12 | fe_mul(r->T,p->X,p->Y); 13 | } 14 | -------------------------------------------------------------------------------- /plugins/connection/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Replication 2 | REGISTER_PLUGIN(TARGET replication 3 | TYPE CONNECTION 4 | CONFIGURATIONS STATIC DYNAMIC OFF 5 | DEFAULT OFF 6 | SOURCES ${CC_SOURCE_DIR}/plugins/connection/replication.c) 7 | -------------------------------------------------------------------------------- /plugins/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(PLUGIN_EXTRA_FILES ${CC_SOURCE_DIR}/libmariadb/ma_errmsg.c) 2 | 3 | 4 | FILE(GLOB plugin_dirs ${CC_SOURCE_DIR}/plugins/*) 5 | FOREACH(dir ${plugin_dirs}) 6 | IF (EXISTS ${dir}/CMakeLists.txt) 7 | INCLUDE(${dir}/CMakeLists.txt) 8 | ENDIF() 9 | ENDFOREACH() 10 | -------------------------------------------------------------------------------- /plugins/auth/ref10/ge_tobytes.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | void ge_tobytes(unsigned char *s,const ge_p2 *h) 4 | { 5 | fe recip; 6 | fe x; 7 | fe y; 8 | 9 | fe_invert(recip,h->Z); 10 | fe_mul(x,h->X,recip); 11 | fe_mul(y,h->Y,recip); 12 | fe_tobytes(s,y); 13 | s[31] ^= fe_isnegative(x) << 7; 14 | } 15 | -------------------------------------------------------------------------------- /plugins/auth/ref10/ge_p3_tobytes.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | void ge_p3_tobytes(unsigned char *s,const ge_p3 *h) 4 | { 5 | fe recip; 6 | fe x; 7 | fe y; 8 | 9 | fe_invert(recip,h->Z); 10 | fe_mul(x,h->X,recip); 11 | fe_mul(y,h->Y,recip); 12 | fe_tobytes(s,y); 13 | s[31] ^= fe_isnegative(x) << 7; 14 | } 15 | -------------------------------------------------------------------------------- /external/zlib/zlib.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | sharedlibdir=@sharedlibdir@ 5 | includedir=@includedir@ 6 | 7 | Name: zlib 8 | Description: zlib compression library 9 | Version: @VERSION@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -lz 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /plugins/auth/ref10/ge_p3_to_cached.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | /* 4 | r = p 5 | */ 6 | 7 | static const fe d2 = { 8 | #include "d2.h" 9 | } ; 10 | 11 | extern void ge_p3_to_cached(ge_cached *r,const ge_p3 *p) 12 | { 13 | fe_add(r->YplusX,p->Y,p->X); 14 | fe_sub(r->YminusX,p->Y,p->X); 15 | fe_copy(r->Z,p->Z); 16 | fe_mul(r->T2d,p->T,d2); 17 | } 18 | -------------------------------------------------------------------------------- /plugins/auth/ref10/fe_isnegative.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | return 1 if f is in {1,3,5,...,q-2} 5 | return 0 if f is in {0,2,4,...,q-1} 6 | 7 | Preconditions: 8 | |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. 9 | */ 10 | 11 | int fe_isnegative(const fe f) 12 | { 13 | unsigned char s[32]; 14 | fe_tobytes(s,f); 15 | return s[0] & 1; 16 | } 17 | -------------------------------------------------------------------------------- /external/zlib/zlib.pc.cmakein: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=@CMAKE_INSTALL_PREFIX@ 3 | libdir=@INSTALL_LIB_DIR@ 4 | sharedlibdir=@INSTALL_LIB_DIR@ 5 | includedir=@INSTALL_INC_DIR@ 6 | 7 | Name: zlib 8 | Description: zlib compression library 9 | Version: @VERSION@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -lz 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /plugins/auth/ref10/fe_isnonzero.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | #include "crypto_verify_32.h" 3 | 4 | /* 5 | return 1 if f == 0 6 | return 0 if f != 0 7 | 8 | Preconditions: 9 | |f| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. 10 | */ 11 | 12 | static const unsigned char zero[32]; 13 | 14 | int fe_isnonzero(const fe f) 15 | { 16 | unsigned char s[32]; 17 | fe_tobytes(s,f); 18 | return crypto_verify_32(s,zero); 19 | } 20 | -------------------------------------------------------------------------------- /win-iconv/iconv.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIBICONV_H 2 | #define _LIBICONV_H 3 | #include 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | typedef void* iconv_t; 8 | iconv_t iconv_open(const char *tocode, const char *fromcode); 9 | int iconv_close(iconv_t cd); 10 | size_t iconv(iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | #endif//_LIBICONV_H -------------------------------------------------------------------------------- /plugins/auth/ref10/crypto_sign.h: -------------------------------------------------------------------------------- 1 | int crypto_sign_keypair( 2 | unsigned char *pk, 3 | unsigned char *pw, unsigned long long pwlen 4 | ); 5 | int ma_crypto_sign( 6 | unsigned char *sm, unsigned char *pk, 7 | const unsigned char *m, unsigned long long mlen, 8 | const unsigned char *pw, unsigned long long pwlen 9 | ); 10 | int crypto_sign_open( 11 | unsigned char *sm, unsigned long long smlen, 12 | const unsigned char *pk 13 | ); 14 | -------------------------------------------------------------------------------- /cmake/misc.cmake: -------------------------------------------------------------------------------- 1 | IF ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_LESS "2.8.7") 2 | FUNCTION(MESSAGE1 id out) 3 | MESSAGE(STATUS "${out}") 4 | ENDFUNCTION() 5 | ELSE() 6 | FUNCTION(MESSAGE1 id out) 7 | STRING(MD5 hash "${out}") 8 | IF(NOT __msg1_${id} STREQUAL "${hash}") 9 | MESSAGE(STATUS "${out}") 10 | ENDIF() 11 | SET(__msg1_${id} ${hash} CACHE INTERNAL "") 12 | ENDFUNCTION() 13 | ENDIF() 14 | -------------------------------------------------------------------------------- /plugins/auth/ref10/sc.h: -------------------------------------------------------------------------------- 1 | #ifndef SC_H 2 | #define SC_H 3 | 4 | /* 5 | The set of scalars is \Z/l 6 | where l = 2^252 + 27742317777372353535851937790883648493. 7 | */ 8 | 9 | #define sc_reduce crypto_sign_ed25519_ref10_sc_reduce 10 | #define sc_muladd crypto_sign_ed25519_ref10_sc_muladd 11 | 12 | extern void sc_reduce(unsigned char *); 13 | extern void sc_muladd(unsigned char *,const unsigned char *,const unsigned char *,const unsigned char *); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /external/zlib/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start); 12 | -------------------------------------------------------------------------------- /plugins/auth/ref10/keypair.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "crypto_sign.h" 3 | #include "crypto_hash_sha512.h" 4 | #include "ge.h" 5 | 6 | int crypto_sign_keypair( 7 | unsigned char *pk, 8 | unsigned char *pw, unsigned long long pwlen 9 | ) 10 | { 11 | unsigned char az[64]; 12 | ge_p3 A; 13 | 14 | crypto_hash_sha512(az,pw,pwlen); 15 | az[0] &= 248; 16 | az[31] &= 63; 17 | az[31] |= 64; 18 | 19 | ge_scalarmult_base(&A,az); 20 | ge_p3_tobytes(pk,&A); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /appveyor-download.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set archive=http://ftp.hosteurope.de/mirror/archive.mariadb.org//mariadb-%DB%/winx64-packages/mariadb-%DB%-winx64.msi 3 | set last=http://mirror.i3d.net/pub/mariadb//mariadb-%DB%/winx64-packages/mariadb-%DB%-winx64.msi 4 | 5 | curl -fLsS -o server.msi %archive% 6 | 7 | if %ERRORLEVEL% == 0 goto end 8 | 9 | curl -fLsS -o server.msi %last% 10 | if %ERRORLEVEL% == 0 goto end 11 | 12 | echo Failure Reason Given is %errorlevel% 13 | exit /b %errorlevel% 14 | 15 | :end 16 | echo "File found". 17 | -------------------------------------------------------------------------------- /plugins/io/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | IF (WITH_CURL) 2 | INCLUDE(FindCURL) 3 | IF(CURL_FOUND) 4 | 5 | ADD_DEFINITIONS(-DHAVE_REMOTEIO=1) 6 | #remote io plugin 7 | REGISTER_PLUGIN(TARGET remote_io 8 | TYPE REMOTEIO 9 | CONFIGURATIONS DYNAMIC STATIC OFF 10 | DEFAULT DYNAMIC 11 | SOURCES ${CC_SOURCE_DIR}/plugins/io/remote_io.c 12 | INCLUDES ${CURL_INCLUDE_DIR} 13 | LIBRARIES ${CURL_LIBRARIES}) 14 | ENDIF() 15 | ENDIF() 16 | -------------------------------------------------------------------------------- /cmake/FindHogweed.cmake: -------------------------------------------------------------------------------- 1 | # - Find Hogweed 2 | # 3 | # HOGWEED_LIBRARIES - List of libraries when using libhogweed. 4 | # HOGWEED_FOUND - True if libhogweed found. 5 | 6 | IF (HOGWEED_FOUND) 7 | SET(HOGWEED_FIND_QUIETLY TRUE) 8 | ENDIF (HOGWEED_FOUND) 9 | 10 | FIND_LIBRARY(HOGWEED_LIBRARY NAMES hogweed libhogweed) 11 | 12 | INCLUDE(FindPackageHandleStandardArgs) 13 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(HOGWEED DEFAULT_MSG HOGWEED_LIBRARY) 14 | 15 | IF(HOGWEED_FOUND) 16 | SET(HOGWEED_LIBRARIES ${HOGWEED_LIBRARY}) 17 | ENDIF(HOGWEED_FOUND) 18 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | This is LGPL MariaDB client library that can be used to connect to a 2 | MariaDB or MySQL database server. 3 | 4 | This code is based on the LGPL libmysql client library from MySQL 3.23 5 | and PHP's mysqlnd extension. 6 | 7 | This product includes PHP software, freely available from 8 | 9 | 10 | If you want to be part of this development effort, you can discuss this at 11 | maria-developers@lists.launchpad.org. 12 | 13 | To report a bug you'll need to signup for an account at https://jira.mariadb.org 14 | 15 | The MariaDB team 16 | -------------------------------------------------------------------------------- /benchmark/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | mkdir bld 6 | cd bld 7 | sudo cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local 8 | sudo cmake --build . --config Release --target install 9 | sudo apt-get -f -y install linux-tools-common linux-gcp linux-tools-$(uname -r) 10 | 11 | echo $LD_LIBRARY_PATH 12 | export LD_LIBRARY_PATH=/usr/local/lib 13 | 14 | sudo install /usr/local/lib/mariadb/libmariadb.so /usr/lib 15 | sudo install -d /usr/lib/mariadb 16 | sudo install -d /usr/lib/mariadb/plugin 17 | 18 | 19 | sudo apt install libmysqlclient-dev 20 | -------------------------------------------------------------------------------- /include/ma_hash.h: -------------------------------------------------------------------------------- 1 | #ifndef _ma_hash_h_ 2 | #define _ma_hash_h_ 3 | 4 | /*! Hash algorithms */ 5 | #define MA_HASH_MD5 1 6 | #define MA_HASH_SHA1 2 7 | #define MA_HASH_SHA224 3 8 | #define MA_HASH_SHA256 4 9 | #define MA_HASH_SHA384 5 10 | #define MA_HASH_SHA512 6 11 | 12 | /*! Hash digest sizes */ 13 | #define MA_MD5_HASH_SIZE 16 14 | #define MA_SHA1_HASH_SIZE 20 15 | #define MA_SHA224_HASH_SIZE 28 16 | #define MA_SHA256_HASH_SIZE 32 17 | #define MA_SHA384_HASH_SIZE 48 18 | #define MA_SHA512_HASH_SIZE 64 19 | 20 | #define MA_MAX_HASH_SIZE 64 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /plugins/auth/ref10/fe_copy.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = f 5 | */ 6 | 7 | void fe_copy(fe h,const fe f) 8 | { 9 | crypto_int32 f0 = f[0]; 10 | crypto_int32 f1 = f[1]; 11 | crypto_int32 f2 = f[2]; 12 | crypto_int32 f3 = f[3]; 13 | crypto_int32 f4 = f[4]; 14 | crypto_int32 f5 = f[5]; 15 | crypto_int32 f6 = f[6]; 16 | crypto_int32 f7 = f[7]; 17 | crypto_int32 f8 = f[8]; 18 | crypto_int32 f9 = f[9]; 19 | h[0] = f0; 20 | h[1] = f1; 21 | h[2] = f2; 22 | h[3] = f3; 23 | h[4] = f4; 24 | h[5] = f5; 25 | h[6] = f6; 26 | h[7] = f7; 27 | h[8] = f8; 28 | h[9] = f9; 29 | } 30 | -------------------------------------------------------------------------------- /cmake/sign.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2013-2016 MariaDB Corporation AB 3 | # 4 | # Redistribution and use is allowed according to the terms of the New 5 | # BSD license. 6 | # For details see the COPYING-CMAKE-SCRIPTS file. 7 | # 8 | IF(COMMAND SIGN_TARGET) 9 | # Do not override server's SIGN_TARGET macro 10 | RETURN() 11 | ENDIF() 12 | 13 | MACRO(SIGN_TARGET target) 14 | IF(WITH_SIGNCODE) 15 | IF(WIN32) 16 | SET(target_file $) 17 | ADD_CUSTOM_COMMAND(TARGET ${target} COMMAND signtool ARGS sign ${SIGN_OPTIONS} ${target_file}) 18 | ENDIF() 19 | ENDIF() 20 | ENDMACRO() 21 | -------------------------------------------------------------------------------- /man/mariadb_free_rpl_event.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_free_rpl_event" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_free_rpl_event \- free event memory 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | void mariadb_free_rpl_event(MARIADB_RPL_EVENT *event) 12 | .EE 13 | .SS Description 14 | Frees event memory. 15 | .SS Parameter 16 | .IP \[bu] 2 17 | \f[CR]event\f[R] \- An event handle which was previously obtained by 18 | \f[B]mariadb_rpl_fetch(3)\f[R]. 19 | .SS History 20 | \f[CR]mariadb_free_rpl_event\f[R] was added in MariaDB Connector/C 3.1.0 21 | -------------------------------------------------------------------------------- /cmake/FindZStd.cmake: -------------------------------------------------------------------------------- 1 | # - Find zstd 2 | # Find the zstd compression library and includes 3 | # 4 | # ZSTD_INCLUDE_DIRS - where to find zstd.h, etc. 5 | # ZSTD_LIBRARIES - List of libraries when using zstd. 6 | # ZSTD_FOUND - True if zstd found. 7 | 8 | find_path(ZSTD_INCLUDE_DIRS 9 | NAMES zstd.h 10 | HINTS ${ZSTD_ROOT_DIR}/include) 11 | 12 | find_library(ZSTD_LIBRARIES 13 | NAMES zstd zstd_static 14 | HINTS ${ZSTD_ROOT_DIR}/lib) 15 | 16 | include(FindPackageHandleStandardArgs) 17 | find_package_handle_standard_args(ZSTD DEFAULT_MSG ZSTD_LIBRARIES ZSTD_INCLUDE_DIRS) 18 | 19 | mark_as_advanced( 20 | ZSTD_LIBRARIES 21 | ZSTD_INCLUDE_DIRS) 22 | -------------------------------------------------------------------------------- /benchmark/installation.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | # Check out the library. 6 | git clone https://github.com/google/benchmark.git 7 | # Go to the library root directory 8 | cd benchmark 9 | # Make a build directory to place the build output. 10 | cmake -E make_directory "build" 11 | # Generate build system files with cmake, and download any dependencies. 12 | cmake -E chdir "build" cmake -DBENCHMARK_DOWNLOAD_DEPENDENCIES=on -DCMAKE_BUILD_TYPE=Release ../ 13 | # or, starting with CMake 3.13, use a simpler form: 14 | # cmake -DCMAKE_BUILD_TYPE=Release -S . -B "build" 15 | # Build the library. 16 | cmake --build "build" --config Release 17 | 18 | -------------------------------------------------------------------------------- /cmake/linux_x86_toolchain.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2013-2016 MariaDB Corporation AB 3 | # 4 | # Redistribution and use is allowed according to the terms of the New 5 | # BSD license. 6 | # For details see the COPYING-CMAKE-SCRIPTS file. 7 | # 8 | # toolchain file for building a 32bit version on a 64bit host 9 | 10 | # Usage: 11 | # cmake -DCMAKE_TOOLCHAIN_FILE=linux_86.toolchain.cmake 12 | 13 | set(CMAKE_SYSTEM_NAME Linux) 14 | set(CMAKE_SYSTEM_VERSION 1) 15 | set(CMAKE_SYSTEM_PROCESSOR "i686") 16 | 17 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags") 18 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags") 19 | -------------------------------------------------------------------------------- /mariadb_config/libmariadb.pc.in: -------------------------------------------------------------------------------- 1 | # 2 | # pkg_config.pc.in 3 | # 4 | # pkg_config configuration file 5 | # For a detailed description of options, please visit 6 | # Dan Nicholson’s Guide to pkg-config (http://www.freedesktop.org/wiki/Software/pkg-config/) 7 | # 8 | 9 | prefix=@CMAKE_INSTALL_PREFIX@ 10 | includedir=${prefix}/@INSTALL_INCLUDEDIR@/@SUFFIX_INSTALL_DIR@ 11 | libdir=${prefix}/@INSTALL_LIBDIR@/@SUFFIX_INSTALL_DIR@ 12 | 13 | Name: libmariadb 14 | Version: @CPACK_PACKAGE_VERSION@ 15 | Description: MariaDB Connector/C dynamic library 16 | Cflags: -I${includedir} 17 | Libs: -L${libdir} -lmariadb 18 | Libs.private: @extra_dynamic_LDFLAGS@ 19 | 20 | 21 | -------------------------------------------------------------------------------- /plugins/auth/ref10/verify.c: -------------------------------------------------------------------------------- 1 | #include "crypto_verify.h" 2 | 3 | int crypto_verify(const unsigned char *x,const unsigned char *y) 4 | { 5 | unsigned int differentbits = 0; 6 | #define F(i) differentbits |= x[i] ^ y[i]; 7 | F(0) 8 | F(1) 9 | F(2) 10 | F(3) 11 | F(4) 12 | F(5) 13 | F(6) 14 | F(7) 15 | F(8) 16 | F(9) 17 | F(10) 18 | F(11) 19 | F(12) 20 | F(13) 21 | F(14) 22 | F(15) 23 | F(16) 24 | F(17) 25 | F(18) 26 | F(19) 27 | F(20) 28 | F(21) 29 | F(22) 30 | F(23) 31 | F(24) 32 | F(25) 33 | F(26) 34 | F(27) 35 | F(28) 36 | F(29) 37 | F(30) 38 | F(31) 39 | return (1 & ((differentbits - 1) >> 8)) - 1; 40 | } 41 | -------------------------------------------------------------------------------- /man/mariadb_rpl_open.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_rpl_open" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_rpl_open \- opens a replication stream 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | int mariadb_rpl_open(MARIADB_RPL *rpl) 12 | .EE 13 | .SS Description 14 | Opens a replication stream 15 | .SS Parameter 16 | .IP \[bu] 2 17 | \f[CR]rpl\f[R] \- A replication handle which was previously initialized 18 | by \f[B]mariadb_rpl_init(3)\f[R]. 19 | .SS Return value 20 | Zero on success, nonzero on error. 21 | .SS History 22 | \f[CR]mariadb_rpl_open\f[R] was added in MariaDB Connector/C 3.1.0 23 | -------------------------------------------------------------------------------- /man/mysql_close.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_close" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_close \- Closes a previously opened connection 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | void mysql_close(MYSQL *mysql); 12 | .EE 13 | .SS Description 14 | Closes a previously opened connection and deallocates all memory. 15 | .SS Notes 16 | .IP \[bu] 2 17 | To reuse a connection handle after \f[CR]mysql_close()\f[R] the handle 18 | must be initialized again by \f[B]mysql_init(3)\f[R]. 19 | .SS See also 20 | .IP \[bu] 2 21 | \f[B]mysql_init(3)\f[R] 22 | .IP \[bu] 2 23 | \f[B]mysql_real_connect(3)\f[R] 24 | -------------------------------------------------------------------------------- /man/mysql_stmt_param_metadata.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_param_metadata" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_param_metadata \- This function does nothing! 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | MYSQL_RES * mysql_stmt_param_metadata(MYSQL_STMT * stmt); 12 | .EE 13 | .SS Description 14 | This function does nothing, it\[cq]s not implemented now and reserved 15 | for future use. 16 | .SS Parameter 17 | .IP \[bu] 2 18 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 19 | \f[B]mysql_stmt_init(3)\f[R]. 20 | .SS Return value 21 | Always returns \f[CR]NULL\f[R]. 22 | -------------------------------------------------------------------------------- /cmake/FindNettle.cmake: -------------------------------------------------------------------------------- 1 | # - Find Nettle 2 | # 3 | # NETTLE_INCLUDE_DIR - where to find , etc. 4 | # NETTLE_LIBRARIES - List of libraries when using libnettle. 5 | # NETTLE_FOUND - True if libnettle found. 6 | 7 | IF (NETTLE_INCLUDE_DIR) 8 | SET(NETTLE_FIND_QUIETLY TRUE) 9 | ENDIF (NETTLE_INCLUDE_DIR) 10 | 11 | FIND_PATH(NETTLE_INCLUDE_DIR nettle/md5.h nettle/ripemd160.h nettle/sha.h) 12 | FIND_LIBRARY(NETTLE_LIBRARY NAMES nettle libnettle) 13 | 14 | INCLUDE(FindPackageHandleStandardArgs) 15 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(NETTLE DEFAULT_MSG NETTLE_LIBRARY NETTLE_INCLUDE_DIR) 16 | 17 | IF(NETTLE_FOUND) 18 | SET(NETTLE_LIBRARIES ${NETTLE_LIBRARY}) 19 | ENDIF(NETTLE_FOUND) 20 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_has_names.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_has_names" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_has_names \- Checks if dynamic column uses named keys 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | my_bool mariadb_dyncol_has_names(DYNAMIC_COLUMN *str) 12 | .EE 13 | .SS Description 14 | Checks if the specified dynamic column uses named keys. 15 | .SS Parameter 16 | .IP \[bu] 2 17 | \f[CR]str\f[R]: Dynamic column 18 | .SS Return value 19 | Returns 1 if the specified dynamic column uses named keys, otherwise 20 | zero. 21 | .SS See also 22 | .IP \[bu] 2 23 | \f[B]mariadb_dyncol_get_named(3)\f[R] 24 | -------------------------------------------------------------------------------- /man/mysql_stmt_free_result.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_free_result" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_free_result \- Frees stored result set memory of a prepared 6 | statement 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | void mysql_stmt_free_result(MYSQL_STMT * stmt); 13 | .EE 14 | .SS Description 15 | Frees stored result memory of a prepared statement. 16 | .SS Parameter 17 | .IP \[bu] 2 18 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 19 | \f[B]mysql_stmt_init(3)\f[R]. 20 | .SS Return value 21 | Returns void 22 | .SS See Also 23 | .IP \[bu] 2 24 | \f[B]mysql_stmt_store_result(3)\f[R] 25 | -------------------------------------------------------------------------------- /client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | INCLUDE_DIRECTORIES(${CC_SOURCE_DIR}/include) 2 | 3 | IF(WIN32) 4 | SET_VERSION_INFO("TARGET:mariadb_client_plugin_info" 5 | "FILE_TYPE:VFT_APP" 6 | "SOURCE_FILE:client/ma_plugin_info.c" 7 | "ORIGINAL_FILE_NAME:mariadb_client_plugin_info.exe" 8 | "FILE_DESCRIPTION:Client plugin viewer") 9 | ENDIF() 10 | 11 | ADD_EXECUTABLE(mariadb_client_plugin_info ${mariadb_client_plugin_info_RC} ma_plugin_info.c) 12 | TARGET_LINK_LIBRARIES(mariadb_client_plugin_info mariadbclient) 13 | 14 | INSTALL(TARGETS mariadb_client_plugin_info 15 | DESTINATION ${INSTALL_BINDIR} 16 | COMPONENT SharedLibraries) 17 | SIGN_TARGET(mariadb_client_plugin_info) 18 | -------------------------------------------------------------------------------- /man/mariadb_connection.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_connection" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_connection \- checks if the client is connected to a MariaDB 6 | database server 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | my_bool mariadb_connection(MYSQL * mysql); 13 | .EE 14 | .SS Description 15 | Checks if the client is connected to a MariaDB or MySQL database server. 16 | .SS Parameter 17 | \f[CR]mysql\f[R] \- mysql handle, which was previously allocated by 18 | \f[B]mysql_init(3)\f[R] and connected by 19 | \f[B]mysql_real_connect(3)\f[R]. 20 | .SS Return value 21 | Returns a non zero value if connected to a MariaDB database server, 22 | otherwise zero. 23 | -------------------------------------------------------------------------------- /man/mariadb_rpl_close.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_rpl_close" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_rpl_close \- Closes replication stream 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | void mariadb_rpl_close(MARIADB_RPL *rpl) 12 | .EE 13 | .SS Description 14 | Closes a replication stream. 15 | .SS Parameter 16 | \f[CR]rpl\f[R] \- A replication handle which was initialized by 17 | \f[B]mariadb_rpl_init(3)\f[R] and connected by 18 | \f[B]mariadb_rpl_open(3)\f[R]. 19 | .SS Notes 20 | To close the connection to the server, the api function 21 | \f[B]mariadb_close(3)\f[R] must be called. 22 | .SS History 23 | \f[CR]mariadb_rpl_close\f[R] was added in MariaDB Connector/C 3.1 24 | -------------------------------------------------------------------------------- /man/mysql_get_client_info.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_get_client_info" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_get_client_info \- returns client library version as string 6 | representation 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | const char * mysql_get_client_info(void ); 13 | .EE 14 | .SS Description 15 | Returns a string representing the client library version 16 | .SS Notes 17 | To obtain the numeric value of the client library version use 18 | \f[B]mysql_get_client_version(3)\f[R]. 19 | .SS See also 20 | .IP \[bu] 2 21 | \f[B]mysql_get_client_version(3)\f[R] 22 | .IP \[bu] 2 23 | \f[B]mysql_get_host_info(3)\f[R] 24 | .IP \[bu] 2 25 | \f[B]mysql_get_proto_info(3)\f[R] 26 | -------------------------------------------------------------------------------- /man/mysql_num_fields.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_num_fields" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_num_fields \- Returns number of fields in a result set 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | unsigned int mysql_num_fields(MYSQL_RES * ); 12 | .EE 13 | .SS Description 14 | Returns number of fields in a specified result set. 15 | .SS Parameter 16 | .IP \[bu] 2 17 | \f[CR]MYSQL RES *\f[R] \- A result set identifier returned by 18 | \f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R]. 19 | .SS Return value 20 | Returns number of fields. 21 | .SS See also 22 | .IP \[bu] 2 23 | \f[B]mysql_fetch_field(3)\f[R] 24 | .IP \[bu] 2 25 | \f[B]mysql_field_count(3)\f[R] 26 | -------------------------------------------------------------------------------- /external/zlib/gzclose.c: -------------------------------------------------------------------------------- 1 | /* gzclose.c -- zlib gzclose() function 2 | * Copyright (C) 2004, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | #include "gzguts.h" 7 | 8 | /* gzclose() is in a separate file so that it is linked in only if it is used. 9 | That way the other gzclose functions can be used instead to avoid linking in 10 | unneeded compression or decompression routines. */ 11 | int ZEXPORT gzclose(gzFile file) { 12 | #ifndef NO_GZCOMPRESS 13 | gz_statep state; 14 | 15 | if (file == NULL) 16 | return Z_STREAM_ERROR; 17 | state = (gz_statep)file; 18 | 19 | return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); 20 | #else 21 | return gzclose_r(file); 22 | #endif 23 | } 24 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_free.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_free" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_free \- Free memory inside packed blob 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | void mariadb_dyncol_free(DYNAMIC_COLUMN *str) 12 | .EE 13 | .SS Description 14 | Frees memory associated by the specified dynamic column 15 | .SS Parameter 16 | .IP \[bu] 2 17 | \f[CR]*str\f[R] \- A pointer to a \f[CR]DYNAMIC_COLUMN\f[R] structure 18 | .SS Notes 19 | .IP \[bu] 2 20 | \f[CR]mariadb_dyncol_free()\f[R] doesn\[cq]t free the memory of the 21 | passed \f[CR]DYNAMIC_COLUMN\f[R] structure but all memory of stored 22 | columns. 23 | .SS See also 24 | .IP \[bu] 2 25 | \f[B]mariadb_dyncol_init(3)\f[R] 26 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | version: ~> 1.0 3 | 4 | cache: 5 | apt: true 6 | ccache: true 7 | directories: 8 | - $HOME/docker 9 | 10 | before_install: 11 | - |- 12 | if [ -z "$server_branch" ] ; then 13 | case $TRAVIS_OS_NAME in 14 | windows) 15 | choco install python --version=3.12.0 16 | python --version 17 | ;; 18 | esac 19 | fi 20 | 21 | env: 22 | global: local=0 DB=testc CLEAR_TEXT=0 23 | 24 | import: mariadb-corporation/connector-test-machine:common-build.yml@master 25 | 26 | jobs: 27 | include: 28 | - stage: Community 29 | env: srv=mariadb v=10.11 local=1 TEST_OPTION=--ps-protocol 30 | name: "CS 10.11 with ps-protocol" 31 | - env: server_branch=11.4 32 | name: "11.4 Server unit testing" 33 | 34 | script: ./travis.sh 35 | -------------------------------------------------------------------------------- /plugins/compress/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(COMPRESS_PLUGIN_DIR ${CC_SOURCE_DIR}/plugins/compress) 2 | 3 | INCLUDE_DIRECTORIES(${COMPRESS_PLUGIN_DIR}) 4 | INCLUDE_DIRECTORIES(${CC_SOURCE_DIR}/include) 5 | 6 | #zlib compression 7 | 8 | REGISTER_PLUGIN(TARGET zlib 9 | TYPE COMPRESSION 10 | CONFIGURATIONS STATIC 11 | DEFAULT STATIC 12 | SOURCES ${COMPRESS_PLUGIN_DIR}/c_zlib.c) 13 | 14 | #zstd compression 15 | IF(${ZSTD_FOUND}) 16 | INCLUDE_DIRECTORIES(${ZSTD_INCLUDE_DIRS}) 17 | REGISTER_PLUGIN(TARGET zstd 18 | TYPE COMPRESSION 19 | CONFIGURATIONS DYNAMIC STATIC OFF 20 | DEFAULT DYNAMIC 21 | SOURCES ${COMPRESS_PLUGIN_DIR}/c_zstd.c 22 | LIBRARIES ${ZSTD_LIBRARIES}) 23 | ENDIF() 24 | -------------------------------------------------------------------------------- /man/mysql_eof.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_eof" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_eof \- determines if the last row of a result set has been read 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | my_bool mysql_eof(MYSQL_RES *result); 12 | .EE 13 | .SS Description 14 | Determines if the last row of a result set has been read. 15 | .PP 16 | \f[B]Notes:\f[R] * This function is deprecated and will be removed. 17 | Instead determine the end of a result set by checking return value of 18 | \f[B]mysql_fetch_row(3)\f[R]. 19 | * If a result set was acquired by \f[B]mysql_store_result(3)\f[R] 20 | mysql_eof will always return true. 21 | ## Return value Returns true if the entire result set was read. 22 | .SS See also 23 | .IP \[bu] 2 24 | \f[B]mysql_fetch_row(3)\f[R] 25 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_json.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_json" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_json \- Get content of a dynamic column in JSON format 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | \f[B]enum\f[R] enum_dyncol_func_result 12 | mariadb_dyncol_json(DYNAMIC_COLUMN *str, 13 | DYNAMIC_STRING *json) 14 | .EE 15 | .SS Description 16 | Get content of a dynamic column in JSON format. 17 | .SS Parameter 18 | .IP \[bu] 2 19 | \f[CR]*str\f[R] \- Dynamic column 20 | .IP \[bu] 2 21 | \f[CR]*json\f[R] \- Pointer to a dynamic string which contains json 22 | output 23 | .SS Return value 24 | Returns \f[CR]ER_DYNCOL_OK\f[R]on success, otherwise error. 25 | .SS See also 26 | .IP \[bu] 2 27 | \f[B]mariadb_dyncol_list_json(3)\f[R] 28 | -------------------------------------------------------------------------------- /man/mysql_get_proto_info.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_get_proto_info" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_get_proto_info \- Returns protocol version number 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | unsigned int mysql_get_proto_info(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | Returns the protocol version number for the specified connection 15 | .SS Parameter 16 | .IP \[bu] 2 17 | \f[CR]mysql\f[R] \- a connection identifier, which was previously 18 | allocated by \f[B]mysql_init(3)\f[R] and connected by 19 | \f[B]mysql_real_connect(3)\f[R]. 20 | .SS Notes 21 | MariaDB Connector/C doesn\[cq]t support protocol version 9 and prior. 22 | .SS Return value 23 | The protocol version number in use 24 | .SS See also 25 | .IP \[bu] 2 26 | \f[B]mysql_get_host_info(3)\f[R] 27 | -------------------------------------------------------------------------------- /man/mysql_field_tell.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_field_tell" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_field_tell \- Returns offset of the field cursor 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | MYSQL_FIELD_OFFSET mysql_field_tell(MYSQL_RES * result); 12 | .EE 13 | .SS Description 14 | Return the offset of the field cursor used for the last 15 | \f[B]mysql_fetch_field(3)\f[R] call. 16 | This value can be used as a parameter for the function 17 | \f[B]mysql_field_seek(3)\f[R]. 18 | .SS Parameter 19 | .IP \[bu] 2 20 | \f[CR]result\f[R] \- a result set identifier returned by 21 | \f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R]. 22 | .SS Return value 23 | Returns the current offset of the field cursor 24 | .SS See also 25 | .IP \[bu] 2 26 | \f[B]mysql_field_seek(3)\f[R] 27 | -------------------------------------------------------------------------------- /plugins/auth/ref10/open.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "crypto_sign.h" 3 | #include "crypto_hash_sha512.h" 4 | #include "crypto_verify_32.h" 5 | #include "ge.h" 6 | #include "sc.h" 7 | 8 | int crypto_sign_open( 9 | unsigned char *sm, unsigned long long smlen, 10 | const unsigned char *pk 11 | ) 12 | { 13 | unsigned char scopy[32]; 14 | unsigned char h[64]; 15 | unsigned char rcheck[32]; 16 | ge_p3 A; 17 | ge_p2 R; 18 | 19 | if (smlen < 64) goto badsig; 20 | if (sm[63] & 224) goto badsig; 21 | if (ge_frombytes_negate_vartime(&A,pk) != 0) goto badsig; 22 | 23 | memmove(scopy,sm + 32,32); 24 | 25 | memmove(sm + 32,pk,32); 26 | crypto_hash_sha512(h,sm,smlen); 27 | sc_reduce(h); 28 | 29 | ge_double_scalarmult_vartime(&R,h,&A,scopy); 30 | ge_tobytes(rcheck,&R); 31 | if (crypto_verify_32(rcheck,sm) == 0) 32 | return 0; 33 | 34 | badsig: 35 | return -1; 36 | } 37 | -------------------------------------------------------------------------------- /man/mysql_server_end.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_server_end" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_server_end \- Called when finished using MariaDB Connector/C 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | void mysql_server_end(void) 12 | .EE 13 | .SS Description 14 | Call when finished using the library, such as after disconnecting from 15 | the server. 16 | For a client program, only cleans up by performing memory management 17 | tasks. 18 | .SS Notes 19 | .IP \[bu] 2 20 | \f[CR]mysql_library_end()\f[R] is an alias for 21 | \f[CR]mysql_server_end()\f[R]. 22 | .IP \[bu] 2 23 | In MySQL Connector/C versions 3.0.1 to 3.0.4 it was not possible to call 24 | multiple times \f[B]mysql_server_init(3)\f[R] and 25 | \f[CR]mysql_server_end()\f[R]. 26 | .SS See also 27 | .IP \[bu] 2 28 | \f[B]mysql_server_init(3)\f[R] 29 | -------------------------------------------------------------------------------- /man/mysql_row_tell.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_row_tell" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_row_tell \- Returns row offset of a result cursor 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | MYSQL_ROW_OFFSET mysql_row_tell(MYSQL_RES * res); 12 | .EE 13 | .SS Description 14 | Returns the row offset of a result cursor. 15 | The returned offset value can be used to reposition the result cursor by 16 | calling \f[B]mysql_row_seek(3)\f[R]. 17 | .SS Parameter 18 | .IP \[bu] 2 19 | \f[CR]res\f[R] \- a result set identifier returned by 20 | \f[B]mysql_store_result(3)\f[R]. 21 | .SS Notes 22 | .IP \[bu] 2 23 | This function will not work if the result set was obtained by 24 | \f[B]mysql_use_result(3)\f[R]. 25 | .SS See also 26 | .IP \[bu] 2 27 | \f[B]mysql_store_result(3)\f[R] 28 | .IP \[bu] 2 29 | \f[B]mysql_row_seek(3)\f[R] 30 | -------------------------------------------------------------------------------- /man/mysql_get_socket.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_get_socket" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_get_socket \- Returns the descriptor of the socket used for the 6 | current connection 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | my_socket mysql_get_socket(MYSQL * mysql); 13 | .EE 14 | .SS Description 15 | Returns the descriptor of the socket used for the current connection. 16 | .SS Parameter 17 | .IP \[bu] 2 18 | \f[CR]mysql\f[R] \- a mysql handle, which was previously allocated by 19 | \f[B]mysql_init(3)\f[R] and connected by 20 | \f[B]mysql_real_connect(3)\f[R]. 21 | .SS Return value 22 | A socket handle or INVALID_SOCKET (\-1) if the socket descriptor could 23 | not be determined, e.g.\ if the connection doesn\[cq]t use a socket 24 | connection. 25 | .SS See also 26 | .IP \[bu] 2 27 | \f[B]mysql_real_connect(3)\f[R] 28 | -------------------------------------------------------------------------------- /man/mysql_get_host_info.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_get_host_info" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_get_host_info \- Returns host information 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | const char * mysql_get_host_info(MYSQL * mysql); 11 | .EE 12 | .SS Description 13 | Describes the type of connection in use for the connection, including 14 | the server host name. 15 | Returns a string, or NULL if the connection is not valid. 16 | .SS Parameter 17 | .IP \[bu] 2 18 | \f[CR]mysql\f[R] \- a connection identifier, which was previously 19 | allocated by \f[B]mysql_init(3)\f[R] and connected by 20 | \f[B]mysql_real_connect(3)\f[R]. 21 | .SS Return value 22 | Returns a string, describing host information or \f[CR]NULL\f[R] if the 23 | connection is not valid. 24 | .SS See also 25 | .IP \[bu] 2 26 | \f[B]mysql_get_server_version(3)\f[R] 27 | -------------------------------------------------------------------------------- /man/mysql_get_server_version.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_get_server_version" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_get_server_version \- returns numeric server version 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | unsigned long mysql_get_server_version(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | Returns an integer representing the version of connected server. 15 | .SS Parameter 16 | .IP \[bu] 2 17 | \f[CR]mysql\f[R] \- a connection identifier, which was previously 18 | allocated by \f[B]mysql_init(3)\f[R] and connected by 19 | \f[B]mysql_real_connect(3)\f[R]. 20 | .SS Notes 21 | The form of the version number is VERSION_MAJOR * 10000 + VERSION_MINOR 22 | * 100 + VERSION_PATCH. 23 | .SS Return value 24 | The version number of the connected server 25 | .SS See also 26 | .IP \[bu] 2 27 | \f[B]mysql_get_server_info(3)\f[R] 28 | -------------------------------------------------------------------------------- /unittest/mytap/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2007 MySQL AB 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | 17 | INCLUDE_DIRECTORIES(${CC_SOURCE_DIR}/include ${CC_SOURCE_DIR}/zlib 18 | ${CC_BINARY_DIR}/include) 19 | ADD_LIBRARY(cctap tap.c) 20 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_check.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_check" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_check \- Checks if a dynamic column has correct format 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | \f[B]enum\f[R] enum_dyncol_func_result 12 | mariadb_dyncol_check(DYNAMIC_COLUMN *str); 13 | .EE 14 | .SS Description 15 | The function \f[CR]mariadb_dyncol_check()\f[R] checks if a dynamic 16 | column has correct format. 17 | This can be used e.g.\ to check if a blob contains a dynamic column. 18 | .SS Parameter 19 | .IP \[bu] 2 20 | \f[CR]str\f[R]\- pointer to a \f[CR]DYNAMIC_COLUMN\f[R] structure. 21 | .SS Return value 22 | Returns \f[CR]ER_DYNCOL_OK\f[R] if the dynamic column has correct 23 | format, otherwise \f[CR]ER_DYNCOL_FORMAT\f[R]. 24 | .SS See also 25 | .IP \[bu] 2 26 | \f[B]mariadb_dyncol_count(3)\f[R] 27 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_exists_num.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_exists_num" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_exists_num \- Check if column with given number exists. 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | \f[B]enum\f[R] enum_dyncol_func_result 10 | mariadb_dyncol_exists_num(DYNAMIC_COLUMN *str, 11 | uint column_number); 12 | .EE 13 | .SS Description 14 | Checks if a column with the specified column key exists. 15 | .SS Parameter 16 | .IP \[bu] 2 17 | \f[CR]*str\f[R] \- Dynamic column 18 | .IP \[bu] 2 19 | \f[CR]column_number\f[R] \- The column number to search for 20 | .SS Return value 21 | Returns \f[CR]ER_DYNCOL_YES\f[R] if a column with given number exists, 22 | \f[CR]ER_DYNCOL_NO\f[R] if no column exists or error. 23 | .SS See also 24 | .IP \[bu] 2 25 | mariadb_dyncol_exists_named 26 | .IP \[bu] 2 27 | Dynamic Column Error Codes 28 | -------------------------------------------------------------------------------- /man/mysql_rollback.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_rollback" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_rollback \- Rolls back the current transaction 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | my_bool mysql_rollback(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | Rolls back the current transaction for the database. 15 | Returns zero on success, nonzero if an error occurred. 16 | .SS Parameter 17 | .IP \[bu] 2 18 | \f[CR]mysql\f[R] \- a mysql handle, which was previously allocated by 19 | \f[B]mysql_init(3)\f[R] and connected by 20 | \f[B]mysql_real_connect(3)\f[R]. 21 | .SS Notes 22 | .IP \[bu] 2 23 | mysql_rollback() will not work as expected if autocommit mode was set or 24 | the storage engine does not support transactions. 25 | .SS See also 26 | .IP \[bu] 2 27 | \f[B]mysql_commit(3)\f[R] 28 | .IP \[bu] 2 29 | \f[B]mysql_autocommit(3)\f[R] 30 | -------------------------------------------------------------------------------- /cmake/SearchLibrary.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2013-2016 MariaDB Corporation AB 3 | # 4 | # Redistribution and use is allowed according to the terms of the New 5 | # BSD license. 6 | # For details see the COPYING-CMAKE-SCRIPTS file. 7 | # 8 | INCLUDE(CheckFunctionExists) 9 | INCLUDE(CheckLibraryExists) 10 | 11 | FUNCTION(SEARCH_LIBRARY library_name function liblist) 12 | IF(${${library_name}}) 13 | RETURN() 14 | ENDIF() 15 | CHECK_FUNCTION_EXISTS(${function} IS_${function}_LIBC_FUNC) 16 | IF(IS_${function}_LIBC_FUNC) 17 | SET(${library_name} "" PARENT_SCOPE) 18 | RETURN() 19 | ENDIF() 20 | FOREACH(lib ${liblist}) 21 | CHECK_LIBRARY_EXISTS(${lib} ${function} "" HAVE_${function}_IN_${lib}) 22 | IF(HAVE_${function}_IN_${lib}) 23 | SET(${library_name} ${lib} PARENT_SCOPE) 24 | SET(HAVE_${library_name} 1 PARENT_SCOPE) 25 | RETURN() 26 | ENDIF() 27 | ENDFOREACH() 28 | ENDFUNCTION() 29 | 30 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_exists_named.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_exists_named" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_exists_named \- Check if column with given name exists. 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | \f[B]enum\f[R] enum_dyncol_func_result 10 | mariadb_dyncol_exists_named(DYNAMIC_COLUMN *str, 11 | MYSQL_LEX_STRING *column_key); 12 | .EE 13 | .SS Description 14 | Checks if a column with the specified column key exists. 15 | .SS Parameter 16 | .IP \[bu] 2 17 | \f[CR]*str\f[R] \- Dynamic column 18 | .IP \[bu] 2 19 | \f[CR]*column_key\f[R] \- The column key to search for 20 | .SS Return value 21 | Returns \f[CR]ER_DYNCOL_YES\f[R] if a column with given key exists, 22 | \f[CR]ER_DYNCOL_NO\f[R] if no column exists or error. 23 | .SS See also 24 | .IP \[bu] 2 25 | mariadb_dyncol_exists_num 26 | .IP \[bu] 2 27 | Dynamic Column Error Codes 28 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_column_cmp_named.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_column_cmp_named" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_column_cmp_named \- Compare two column names 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | int mariadb_dyncol_column_cmp_named(const MYSQL_LEX_STRING *s1, 12 | const MYSQL_LEX_STRING *s2); 13 | .EE 14 | .SS Description 15 | Compares two dynamic column keys represented as a pointer to a 16 | \f[CR]MYSQL_LEX_STRING\f[R] structure. 17 | .SS Parameter 18 | .IP \[bu] 2 19 | \f[CR]s1\f[R] \- First key 20 | .IP \[bu] 2 21 | \f[CR]s2\f[R] \- Second key 22 | .SS Return value 23 | Returns an integer less than, equal to, or greater than zero if the 24 | first bytes of \f[CR]s1\f[R] is found, respectively, to be less than, to 25 | match, or be greater than the first bytes of \f[CR]s2\f[R]. 26 | -------------------------------------------------------------------------------- /man/mysql_stat.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stat" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stat \- Returns current server status 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | const char * mysql_stat(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | mysql_stat() returns a string with the current server status for uptime, 15 | threads, queries, open tables, flush tables and queries per second. 16 | .SS Parameter 17 | .IP \[bu] 2 18 | \f[CR]mysql\f[R] \- a mysql handle, which was previously allocated by 19 | \f[B]mysql_init(3)\f[R] and connected byy 20 | \f[B]mysql_real_connect(3)\f[R]. 21 | .SS Notes 22 | For a complete list of other status variables, you have to use the 23 | [show\-status()](SHOW STATUS]] SQL command. 24 | .SS Return value 25 | Returns a string representing current server status. 26 | .SS See also 27 | .IP \[bu] 2 28 | mysql_get_server_info() 29 | -------------------------------------------------------------------------------- /man/mysql_sqlstate.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_sqlstate" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_sqlstate \- returns SQLSTATE error code 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | const char * mysql_sqlstate(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | Returns a string containing the SQLSTATE error code for the most 15 | recently invoked function that can succeed or fail. 16 | The error code consists of five characters. 17 | `00000' means no error. 18 | The values are specified by ANSI SQL and ODBC 19 | .SS Parameter 20 | .SS Notes 21 | Please note that not all client library error codes are mapped to 22 | SQLSTATE errors. 23 | Errors which can\[cq]t be mapped will returned as value HY000. 24 | .SS Return value 25 | A string containing SQLSTATE error code. 26 | .SS See also 27 | .IP \[bu] 2 28 | \f[B]mysql_error(3)\f[R] 29 | .IP \[bu] 2 30 | \f[B]mysql_errno(3)\f[R] 31 | -------------------------------------------------------------------------------- /man/mysql_thread_end.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_thread_end" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_thread_end \- Releases thread specific memory 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | void mysql_thread_end(void ); 12 | .EE 13 | .SS Description 14 | The mysql_thread_end() function needs to be called before a client 15 | thread ends. 16 | It will release thread specific memory, which was allocated by a 17 | previous \f[B]mysql_thread_init(3)\f[R] call. 18 | Returns void. 19 | .SS Notes 20 | Unlike \f[B]mysql_thread_init(3)\f[R] mysql_thread_end() will not be 21 | invoked automatically if the thread ends. 22 | To avoid memory leaks mysql_thread_end() must be called explicitly. 23 | .SS History 24 | This function is deprecated since MariaDB Connector/C 3.0.0. 25 | .SS See also 26 | .IP \[bu] 2 27 | \f[B]mysql_thread_init(3)\f[R] 28 | .IP \[bu] 2 29 | \f[B]mysql_thread_safe(3)\f[R] 30 | -------------------------------------------------------------------------------- /plugins/pvio/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(PVIO_DIR ${CC_SOURCE_DIR}/plugins/pvio) 2 | 3 | INCLUDE_DIRECTORIES(${PVIO_DIR}) 4 | INCLUDE_DIRECTORIES(${CC_SOURCE_DIR}/include) 5 | 6 | #native password 7 | REGISTER_PLUGIN(TARGET pvio_socket 8 | TYPE PVIO 9 | CONFIGURATIONS STATIC DYNAMIC DEFAULT 10 | DEFAULT STATIC 11 | SOURCES ${CC_SOURCE_DIR}/plugins/pvio/pvio_socket.c) 12 | 13 | IF(WIN32) 14 | # named pipe 15 | REGISTER_PLUGIN(TARGET pvio_npipe 16 | TYPE PVIO 17 | CONFIGURATIONS STATIC DYNAMIC DEFAULT 18 | DEFAULT STATIC 19 | SOURCES ${CC_SOURCE_DIR}/plugins/pvio/pvio_npipe.c) 20 | 21 | # shared memory 22 | REGISTER_PLUGIN(TARGET pvio_shmem 23 | TYPE PVIO 24 | CONFIGURATIONS STATIC DYNAMIC DEFAULT 25 | DEFAULT DYNAMIC 26 | SOURCES ${CC_SOURCE_DIR}/plugins/pvio/pvio_shmem.c) 27 | ENDIF() 28 | -------------------------------------------------------------------------------- /cmake/install_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2013-2016 MariaDB Corporation AB 3 | # 4 | # Redistribution and use is allowed according to the terms of the New 5 | # BSD license. 6 | # For details see the COPYING-CMAKE-SCRIPTS file. 7 | # 8 | # plugin installation 9 | 10 | MACRO(INSTALL_PLUGIN name binary_dir) 11 | INSTALL(TARGETS ${name} COMPONENT ClientPlugins DESTINATION ${INSTALL_PLUGINDIR}) 12 | IF(MSVC) 13 | INSTALL(FILES $ COMPONENT Debuginfo 14 | DESTINATION symbols CONFIGURATIONS Debug RelWithDebInfo) 15 | ENDIF() 16 | IF(WIN32) 17 | FILE(APPEND ${CC_BINARY_DIR}/win/packaging/plugin.conf "\n") 18 | FILE(APPEND ${CC_BINARY_DIR}/win/packaging/plugin.conf "\n") 19 | ENDIF() 20 | ENDMACRO() 21 | -------------------------------------------------------------------------------- /man/mysql_commit.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_commit" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_commit \- Commits the current transaction 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | my_bool mysql_commit(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | Commits the current transaction for the specified database connection. 15 | Returns zero on success, nonzero if an error occurred. 16 | .SS Parameters 17 | .IP \[bu] 2 18 | \f[CR]mysql\f[R] is a connection identifier, which was previously 19 | allocated by \f[B]mysql_init(3)\f[R] and connected by 20 | \f[B]mysql_real_connect(3)\f[R]. 21 | .SS Notes 22 | Executing mysql_commit() will not affected the behaviour of autocommit. 23 | This means, any update or insert statements following mysql_commit() 24 | will be rolled back when the connection gets closed. 25 | .PP 26 | == See also * \f[B]mysql_autocommit(3)\f[R] * 27 | \f[B]mysql_rollback(3)\f[R] 28 | -------------------------------------------------------------------------------- /man/mysql_free_result.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_free_result" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_free_result \- Frees result set 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | void mysql_free_result(MYSQL_RES * result); 12 | .EE 13 | .SS Description 14 | Frees the memory associated with a result set. 15 | Returns void. 16 | .SS Parameters 17 | .IP \[bu] 2 18 | \f[CR]result\f[R] \- a result set identifier returned by 19 | \f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R]. 20 | .SS Notes 21 | .IP \[bu] 2 22 | You should always free your result set with mysql_free_result() as soon 23 | it\[cq]s not needed anymore 24 | .IP \[bu] 2 25 | Row values obtained by a prior \f[B]mysql_fetch_row(3)\f[R] call will 26 | become invalid after calling mysql_free_result(). 27 | .SS See also 28 | .IP \[bu] 2 29 | \f[B]mysql_store_result(3)\f[R] 30 | .IP \[bu] 2 31 | \f[B]mysql_use_result(3)\f[R] 32 | -------------------------------------------------------------------------------- /man/mariadb_stmt_fetch_fields.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_stmt_fetch_fields" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_stmt_fetch_fields \- Returns an array of fields containing the 6 | column definitions ## Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | MYSQL_FIELD *mariadb_stmt_fetch_fields(MYSQL_STMT * stmt); 12 | .EE 13 | .SS Description 14 | Returns an array of fields. 15 | Each field contains the definition for a column of the result set. 16 | If the statement doesn\[cq]t have a result set a NULL pointer will be 17 | returned. 18 | .SS Parameter 19 | .IP \[bu] 2 20 | \f[CR]stmt\f[R] \- A statement handle, which was previously allocated by 21 | \f[B]mysql_stmt_init(3)\f[R]. 22 | .SS Notes 23 | The number of fields can be obtained by 24 | \f[B]mysql_stmt_field_count(3)\f[R] 25 | .SS History 26 | This function was added in MariaDB Connector/C 3.1.0 27 | .SS See Also 28 | *\f[B]mysql_stmt_field_count(3)\f[R] 29 | -------------------------------------------------------------------------------- /man/mysql_get_server_info.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_get_server_info" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_get_server_info \- Returns server version as string 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | const char * mysql_get_server_info(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | Returns the server version or \f[CR]NULL\f[R] on failure. 15 | .SS Parameter 16 | .IP \[bu] 2 17 | \f[CR]mysql\f[R] \- a connection identifier, which was previously 18 | allocated by \f[B]mysql_init(3)\f[R] and connected by 19 | \f[B]mysql_real_connect(3)\f[R]. 20 | .SS Notes 21 | To obtain the numeric server version please use 22 | \f[B]mysql_get_server_version(3)\f[R]. 23 | .SS Return value 24 | Returns the server version as zero terminated string or 25 | \f[CR]NULL\f[R]on failure. 26 | .SS See also 27 | .IP \[bu] 2 28 | \f[B]mysql_get_server_info(3)\f[R] 29 | .IP \[bu] 2 30 | \f[B]mysql_get_client_info(3)\f[R] 31 | -------------------------------------------------------------------------------- /man/mariadb_reconnect.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_reconnect" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_reconnect \- reconnects to a server 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | my_bool mariadb_reconnect(MYSQL * mysql) 12 | .EE 13 | .SS Description 14 | \f[CR]mariadb_reconnect()\f[R] tries to reconnect to a server in case 15 | the connection died due to timeout or other errors. 16 | It uses the same credentials which were specified in 17 | \f[B]mysql_real_connect(3)\f[R]. 18 | .SS Return value 19 | The function will return 0 on success, a non zero value on error 20 | .PP 21 | \f[B]Note\f[R]: The function will return an error, if the option 22 | \f[CR]MYSQL_OPT_RECONNECT\f[R] wasn\[cq]t set before. 23 | .SS History 24 | \f[CR]mariadb_reconnect()\f[R] was added in MariaDB Connector/C 3.0 25 | .SS See also 26 | .IP \[bu] 2 27 | \f[B]mysql_real_connect(3)\f[R] 28 | .IP \[bu] 2 29 | \f[B]mysql_optionsv(3)\f[R] 30 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_get_named.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_get_named" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_get_name \- Get value of a column with given key 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | \f[B]enum\f[R] enum_dyncol_func_result 12 | mariadb_dyncol_get_named(DYNAMIC_COLUMN *str, 13 | LEX_STRING *key, 14 | DYNAMIC_COLUMN_VALUE *store_it_here) 15 | .EE 16 | .SS Description 17 | Returns a dynamic column value by given key 18 | .SS Parameter 19 | .IP \[bu] 2 20 | \f[CR]str\f[R]: Dynamic column 21 | .IP \[bu] 2 22 | \f[CR]name\f[R]: Name to search for 23 | .IP \[bu] 2 24 | \f[CR]value\f[R]: Value of dynamic column 25 | .SS Return value 26 | Returns \f[CR]ER_DYNCOL_OK\f[R]on success, otherwise error. 27 | If the column name could not be found, value will be NULL 28 | .SS See also 29 | .IP \[bu] 2 30 | \f[B]mariadb_dyncol_get_num(3)\f[R] 31 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_get_num.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_get_num" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_get_num \- Get value of a column with given number 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | \f[B]enum\f[R] enum_dyncol_func_result 12 | mariadb_dyncol_get_num(DYNAMIC_COLUMN *str, 13 | uint column_nr, 14 | DYNAMIC_COLUMN_VALUE *store_it_here) 15 | .EE 16 | .SS Description 17 | Returns a dynamic column value by given number 18 | .SS Parameter 19 | .IP \[bu] 2 20 | \f[CR]str\f[R]: Dynamic column 21 | .IP \[bu] 2 22 | \f[CR]column_nr\f[R]: Number of column 23 | .IP \[bu] 2 24 | \f[CR]value\f[R]: Value of dynamic column 25 | .SS Return value 26 | Returns \f[CR]ER_DYNCOL_OK\f[R]on success, otherwise error. 27 | If the column number could not be found, value will be NULL 28 | .SS See also 29 | .IP \[bu] 2 30 | \f[B]mariadb_dyncol_get_named(3)\f[R] 31 | -------------------------------------------------------------------------------- /man/mysql_insert_id.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_insert_id" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_insert_id \- returns the auto generated ID used in last statement 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | my_ulonglong mysql_insert_id(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | Returns the auto generated ID generated by a SQL statement (usually 15 | INSERT) on a table for a column defined with AUTO_INCREMENT attribute. 16 | .SS Parameters: 17 | \f[CR]mysql\f[R] is a connection identifier, which was previously 18 | allocated by \f[B]mysql_init(3)\f[R] and connected by 19 | \f[B]mysql_real_connect(3)\f[R]. 20 | .SH Return value 21 | Returns the value of the modified column with AUTO_INCREMENT attribute. 22 | If the table doesn\[cq]t contain an auto_increment column or no 23 | INSERT/UPDATE statement was executed, this function will return zero. 24 | .SS See also 25 | .IP \[bu] 2 26 | \f[B]mysql_query(3)\f[R] 27 | -------------------------------------------------------------------------------- /man/mysql_stmt_param_count.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_param_count" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_param_count \- Returns number of parameters 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | unsigned long mysql_stmt_param_count(MYSQL_STMT * stmt); 12 | .EE 13 | .SS Description 14 | Returns the number of parameter markers present in the prepared 15 | statement. 16 | Parameter markers are specified as \f[CR]?\f[R] (question mark) 17 | .SS Parameter 18 | .IP \[bu] 2 19 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 20 | \f[B]mysql_stmt_init(3)\f[R]. 21 | .SS Return value 22 | The number of parameter markers in prepared statement. 23 | .SS Notes 24 | .IP \[bu] 2 25 | This function will not deliver a valid result until 26 | mysql_stmt_prepare()() was called. 27 | .SS See Also 28 | .IP \[bu] 2 29 | mysql_stmt_prepare()() 30 | .IP \[bu] 2 31 | \f[B]mysql_stmt_field_count(3)\f[R] 32 | -------------------------------------------------------------------------------- /plugins/auth/ref10/sign.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "crypto_sign.h" 3 | #include "crypto_hash_sha512.h" 4 | #include "ge.h" 5 | #include "sc.h" 6 | 7 | int ma_crypto_sign( 8 | unsigned char *sm, unsigned char *pk, 9 | const unsigned char *m,unsigned long long mlen, 10 | const unsigned char *pw,unsigned long long pwlen 11 | ) 12 | { 13 | unsigned char az[64]; 14 | unsigned char nonce[64]; 15 | unsigned char hram[64]; 16 | ge_p3 A, R; 17 | 18 | crypto_hash_sha512(az,pw,pwlen); 19 | az[0] &= 248; 20 | az[31] &= 63; 21 | az[31] |= 64; 22 | 23 | memmove(sm + 64,m,mlen); 24 | memmove(sm + 32,az + 32,32); 25 | crypto_hash_sha512(nonce,sm + 32,mlen + 32); 26 | 27 | ge_scalarmult_base(&A,az); 28 | ge_p3_tobytes(sm + 32,&A); 29 | memmove(pk, sm + 32, 32); 30 | 31 | sc_reduce(nonce); 32 | ge_scalarmult_base(&R,nonce); 33 | ge_p3_tobytes(sm,&R); 34 | 35 | crypto_hash_sha512(hram,sm,mlen + 64); 36 | sc_reduce(hram); 37 | sc_muladd(sm + 32,hram,az,nonce); 38 | 39 | return 0; 40 | } 41 | -------------------------------------------------------------------------------- /external/zlib/old/os2/zlib.def: -------------------------------------------------------------------------------- 1 | ; 2 | ; Slightly modified version of ../nt/zlib.dnt :-) 3 | ; 4 | 5 | LIBRARY Z 6 | DESCRIPTION "Zlib compression library for OS/2" 7 | CODE PRELOAD MOVEABLE DISCARDABLE 8 | DATA PRELOAD MOVEABLE MULTIPLE 9 | 10 | EXPORTS 11 | adler32 12 | compress 13 | crc32 14 | deflate 15 | deflateCopy 16 | deflateEnd 17 | deflateInit2_ 18 | deflateInit_ 19 | deflateParams 20 | deflateReset 21 | deflateSetDictionary 22 | gzclose 23 | gzdopen 24 | gzerror 25 | gzflush 26 | gzopen 27 | gzread 28 | gzwrite 29 | inflate 30 | inflateEnd 31 | inflateInit2_ 32 | inflateInit_ 33 | inflateReset 34 | inflateSetDictionary 35 | inflateSync 36 | uncompress 37 | zlibVersion 38 | gzprintf 39 | gzputc 40 | gzgetc 41 | gzseek 42 | gzrewind 43 | gztell 44 | gzeof 45 | gzsetparams 46 | zError 47 | inflateSyncPoint 48 | get_crc_table 49 | compress2 50 | gzputs 51 | gzgets 52 | -------------------------------------------------------------------------------- /man/mysql_errno.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_errno" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_errno \- returns the last error code for the most recent function 6 | call 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | unsigned int mysql_errno(MYSQL * mysql); 13 | .EE 14 | .SS Description 15 | Returns the last error code for the most recent function call that can 16 | succeed or fail. 17 | Zero means no error occurred. 18 | .SS Parameter 19 | .IP \[bu] 2 20 | \f[CR]mysql\f[R] is a connection identifier, which was previously 21 | allocated by \f[B]mysql_init(3)\f[R] and connected by 22 | \f[B]mysql_real_connect(3)\f[R]. 23 | .SS Notes 24 | .IP \[bu] 2 25 | Client error codes are listed in \f[CR]errmsg.h\f[R] header file, server 26 | error codes are listed in \f[CR]mysqld_error.h\f[R] header file of the 27 | server source distribution. 28 | .SS See also 29 | .IP \[bu] 2 30 | \f[B]mysql_error(3)\f[R] 31 | .IP \[bu] 2 32 | \f[B]mysql_sqlstate(3)\f[R] 33 | -------------------------------------------------------------------------------- /man/mysql_num_rows.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_num_rows" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_num_rows \- Returns number of rows in a result set. 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | my_ulonglong mysql_num_rows(MYSQL_RES * ); 12 | .EE 13 | .SS Description 14 | Returns number of rows in a result set. 15 | .SS Parameters 16 | .IP \[bu] 2 17 | \f[CR]MYSQL_RES\f[R] \- a result set identifier returned by 18 | \f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R]. 19 | ### Notes The behaviour of \f[CR]mysql_num_rows()\f[R] depends on 20 | whether buffered or unbuffered result sets are being used. 21 | For unbuffered result sets, \f[CR]mysql_num_rows()\f[R] will not return 22 | the correct number of rows until all the rows in the result have been 23 | retrieved. 24 | .SS See also 25 | .IP \[bu] 2 26 | \f[B]mysql_affected_rows(3)\f[R] 27 | .IP \[bu] 2 28 | \f[B]mysql_use_result(3)\f[R] 29 | .IP \[bu] 2 30 | \f[B]mysql_store_result(3)\f[R] 31 | -------------------------------------------------------------------------------- /cmake/check_functions.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2013-2016 MariaDB Corporation AB 3 | # 4 | # Redistribution and use is allowed according to the terms of the New 5 | # BSD license. 6 | # For details see the COPYING-CMAKE-SCRIPTS file. 7 | # 8 | 9 | # This file is included by CMakeLists.txt and 10 | # checks for various functions. 11 | # You will find the appropriate defines in 12 | # include/my_config.h.in 13 | 14 | INCLUDE(CheckFunctionExists) 15 | 16 | CHECK_FUNCTION_EXISTS (alloca HAVE_ALLOCA) 17 | CHECK_FUNCTION_EXISTS (dlerror HAVE_DLERROR) 18 | CHECK_FUNCTION_EXISTS (dlopen HAVE_DLOPEN) 19 | CHECK_FUNCTION_EXISTS (fcntl HAVE_FCNTL) 20 | CHECK_FUNCTION_EXISTS (memcpy HAVE_MEMCPY) 21 | CHECK_FUNCTION_EXISTS (nl_langinfo HAVE_NL_LANGINFO) 22 | CHECK_FUNCTION_EXISTS (setlocale HAVE_SETLOCALE) 23 | CHECK_FUNCTION_EXISTS (poll HAVE_POLL) 24 | CHECK_FUNCTION_EXISTS (getpwuid HAVE_GETPWUID) 25 | 26 | IF(HAVE_FILE_UCONTEXT_H) 27 | CHECK_FUNCTION_EXISTS (makecontext HAVE_UCONTEXT_H) 28 | ENDIF() 29 | 30 | CHECK_FUNCTION_EXISTS (cuserid HAVE_CUSERID) -------------------------------------------------------------------------------- /benchmark/launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | sudo cpupower frequency-set --governor performance || true 6 | 7 | 8 | g++ main-benchmark.cc -std=c++11 -isystem benchmark/include -Lbenchmark/build/src -I/usr/local/include/mariadb -I/usr/local/include/mariadb/mysql -L/usr/local/lib/mariadb/ -lmariadb -lbenchmark -lpthread -o main-benchmark 9 | ./main-benchmark --benchmark_repetitions=30 --benchmark_time_unit=us --benchmark_min_warmup_time=10 --benchmark_counters_tabular=true --benchmark_format=json --benchmark_out=mariadb.json 10 | 11 | 12 | g++ main-benchmark.cc -std=c++11 -isystem benchmark/include -Lbenchmark/build/src -lbenchmark -lpthread -DBENCHMARK_MYSQL -lmysqlclient -o main-benchmark 13 | ./main-benchmark --benchmark_repetitions=30 --benchmark_time_unit=us --benchmark_min_warmup_time=10 --benchmark_counters_tabular=true --benchmark_format=json --benchmark_out=mysql.json 14 | 15 | 16 | pip3 install -r benchmark/requirements.txt 17 | benchmark/tools/compare.py -a --no-utest benchmarksfiltered ./mysql.json MySQL ./mariadb.json MariaDB 18 | -------------------------------------------------------------------------------- /man/mysql_stmt_num_rows.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_num_rows" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_num_rows \- Returns number of rows in a prepared statement 6 | result set 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | unsigned long long mysql_stmt_num_rows(MYSQL_STMT * stmt); 13 | .EE 14 | .SS Description 15 | Returns the number of rows in the result set. 16 | The use of mysql_stmt_num_rows() depends on whether or not you used 17 | \f[B]mysql_stmt_store_result(3)\f[R] to buffer the entire result set in 18 | the statement handle. 19 | .SS Parameter 20 | .IP \[bu] 2 21 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 22 | \f[B]mysql_stmt_init(3)\f[R]. 23 | .SS Return value 24 | Number of rows in the result set 25 | .SS Notes 26 | .IP \[bu] 2 27 | If you use \f[B]mysql_stmt_store_result(3)\f[R], mysql_stmt_num_rows() 28 | may be called immediately. 29 | .SS See Also 30 | .IP \[bu] 2 31 | \f[B]mysql_stmt_store_result(3)\f[R] 32 | -------------------------------------------------------------------------------- /man/mysql_thread_id.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_thread_id" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_thread_id \- Returns id of the current connection 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | unsigned long mysql_thread_id(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | The mysql_thread_id() function returns the thread id for the current 15 | connection. 16 | .SS Parameter 17 | .IP \[bu] 2 18 | \f[CR]mysql\f[R] \- a mysql handle, which was previously allocated by 19 | \f[B]mysql_init(3)\f[R] and connected by 20 | \f[B]mysql_real_connect(3)\f[R]. 21 | ### Notes 22 | .IP \[bu] 2 23 | The current connection can be killed with \f[B]mysql_kill(3)\f[R]. 24 | .IP \[bu] 2 25 | If reconnect option is enabled the thread id might change if the client 26 | reconnects to the server. 27 | .SS Return value 28 | Returns the thread id of the current connection. 29 | .SS See also 30 | .IP \[bu] 2 31 | \f[B]mysql_kill(3)\f[R] 32 | .IP \[bu] 2 33 | \f[B]mysql_options(3)\f[R] 34 | -------------------------------------------------------------------------------- /cmake/ConnectorName.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2013-2016 MariaDB Corporation AB 3 | # 4 | # Redistribution and use is allowed according to the terms of the New 5 | # BSD license. 6 | # For details see the COPYING-CMAKE-SCRIPTS file. 7 | # 8 | MACRO(GET_CONNECTOR_PACKAGE_NAME name) 9 | # check if we have 64bit 10 | IF(SIZEOF_VOIDP EQUAL 8) 11 | SET(IS64 1) 12 | ENDIF() 13 | 14 | SET (PLATFORM_NAME ${CMAKE_SYSTEM_NAME}) 15 | SET (MACHINE_NAME ${CMAKE_SYSTEM_PROCESSOR}) 16 | SET (CONCAT_SIGN "-") 17 | 18 | IF(CMAKE_SYSTEM_NAME MATCHES "Windows") 19 | SET(PLATFORM_NAME "win") 20 | SET(CONCAT_SIGN "") 21 | IF(IS64) 22 | IF(CMAKE_C_COMPILER_ARCHITECTURE_ID) 23 | STRING(TOLOWER "${CMAKE_C_COMPILER_ARCHITECTURE_ID}" MACHINE_NAME) 24 | ELSE() 25 | SET(MACHINE_NAME x64) 26 | ENDIF() 27 | ELSE() 28 | SET(MACHINE_NAME "32") 29 | ENDIF() 30 | ENDIF() 31 | 32 | SET(product_name "mysql-connector-c-${CPACK_PACKAGE_VERSION}-${PLATFORM_NAME}${CONCAT_SIGN}${MACHINE_NAME}") 33 | STRING(TOLOWER ${product_name} ${name}) 34 | ENDMACRO() 35 | -------------------------------------------------------------------------------- /man/mysql_get_client_version.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_get_client_version" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_get_client_version \- returns client version number 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | unsigned long mysql_get_client_version(void); 10 | .EE 11 | .SS Description 12 | Returns a number representing the client library version. 13 | The value has the format XXYYZZ: major version * 10000 + minor version * 14 | 100 + patch version. 15 | ### Notes * To obtain a string containing the client library version use 16 | the \f[B]mysql_get_client_info(3)\f[R] function. 17 | * Note: Since MariaDB Server 10.2.6 and MariaDB Connector/C 3.0.1 the 18 | client library is bundled with server package and returns the server 19 | package version. 20 | To obtain the client version of the connector, please use the constant 21 | \f[CR]MARIADB_PACKAGE_VERSION_ID\f[R] 22 | .SS Return value 23 | A long integer representing the client version 24 | .SS See also 25 | .IP \[bu] 2 26 | \f[B]mysql_get_client_info(3)\f[R] 27 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_column_count.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_column_count" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_column_count \- Get number of columns in dynamic column 6 | blob ## Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | \f[B]enum\f[R] enum_dyncol_func_result 12 | mariadb_dyncol_column_count(DYNAMIC_COLUMN *str, 13 | unsigned int *column_count); 14 | .EE 15 | .SS Description 16 | Gets the number of columnns in a dynamic column blob. 17 | .SS Parameter 18 | .IP \[bu] 2 19 | \f[CR]*str\f[R] \- A pointer to a \f[CR]DYNAMIC_COLUMN\f[R] structure 20 | .IP \[bu] 2 21 | \f[CR]column_count\f[R] \- An unsigned integer pointer where the number 22 | of columns will be stored. 23 | .SS Return value 24 | Returns \f[CR]ER_DYNCOL_OK\f[R] on success, otherwise error. 25 | .SS Notes 26 | .IP \[bu] 2 27 | \f[CR]mariadb_dyncol_column_count()\f[R] doesn\[cq]t count NULL values. 28 | .SS See also 29 | .IP \[bu] 2 30 | Dynamic Column Error Codes 31 | -------------------------------------------------------------------------------- /man/mysql_stmt_errno.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_errno" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_errno \- Returns error code for the last statement error 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | unsigned int mysql_stmt_errno(MYSQL_STMT * stmt); 12 | .EE 13 | .SS Description 14 | Returns the error code for the most recently invoked statement function 15 | that can succeed or fail. 16 | .SS Parameter 17 | .IP \[bu] 2 18 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 19 | \f[B]mysql_stmt_init(3)\f[R]. 20 | .SS Return value 21 | Returns error code. 22 | A zero value means that no error occurred. 23 | .SS Notes 24 | .IP \[bu] 2 25 | Client error messages are listed in \f[CR]errmsg.h\f[R] header file, 26 | server error messages are listed in \f[CR]mysqld_error.h\f[R] header 27 | file of the server source distribution. 28 | .SS See Also 29 | .IP \[bu] 2 30 | \f[B]mysql_stmt_error(3)\f[R], 31 | .IP \[bu] 2 32 | \f[B]mysql_stmt_sqlstate(3)\f[R] 33 | -------------------------------------------------------------------------------- /plugins/auth/ref10/fe_neg.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = -f 5 | 6 | Preconditions: 7 | |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 8 | 9 | Postconditions: 10 | |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 11 | */ 12 | 13 | void fe_neg(fe h,const fe f) 14 | { 15 | crypto_int32 f0 = f[0]; 16 | crypto_int32 f1 = f[1]; 17 | crypto_int32 f2 = f[2]; 18 | crypto_int32 f3 = f[3]; 19 | crypto_int32 f4 = f[4]; 20 | crypto_int32 f5 = f[5]; 21 | crypto_int32 f6 = f[6]; 22 | crypto_int32 f7 = f[7]; 23 | crypto_int32 f8 = f[8]; 24 | crypto_int32 f9 = f[9]; 25 | crypto_int32 h0 = -f0; 26 | crypto_int32 h1 = -f1; 27 | crypto_int32 h2 = -f2; 28 | crypto_int32 h3 = -f3; 29 | crypto_int32 h4 = -f4; 30 | crypto_int32 h5 = -f5; 31 | crypto_int32 h6 = -f6; 32 | crypto_int32 h7 = -f7; 33 | crypto_int32 h8 = -f8; 34 | crypto_int32 h9 = -f9; 35 | h[0] = h0; 36 | h[1] = h1; 37 | h[2] = h2; 38 | h[3] = h3; 39 | h[4] = h4; 40 | h[5] = h5; 41 | h[6] = h6; 42 | h[7] = h7; 43 | h[8] = h8; 44 | h[9] = h9; 45 | } 46 | -------------------------------------------------------------------------------- /man/mysql_stmt_row_tell.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_row_tell" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_row_tell \- Returns position of row cursor 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | MYSQL_ROW_OFFSET mysql_stmt_row_tell(MYSQL_STMT * stmt); 12 | .EE 13 | .SS Description 14 | Returns the row offset of a result cursor. 15 | The returned offset value can be used to reposition the result cursor by 16 | calling \f[B]mysql_stmt_row_seek(3)\f[R]. 17 | .SS Parameter 18 | .IP \[bu] 2 19 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 20 | \f[B]mysql_stmt_init(3)\f[R]. 21 | .SS Return value 22 | Returns the current position of the row cursor. 23 | .SS Notes 24 | .IP \[bu] 2 25 | This function can be used for buffered result sets only, which can be 26 | obtained by executing the \f[B]mysql_stmt_store_result(3)\f[R] function. 27 | .SS See Also 28 | .IP \[bu] 2 29 | \f[B]mysql_stmt_row_seek(3)\f[R] 30 | .IP \[bu] 2 31 | \f[B]mysql_stmt_store_result(3)\f[R] 32 | -------------------------------------------------------------------------------- /man/mariadb_cancel.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_cancel" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_cancel \- Immediately aborts a connection 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | int mariadb_cancel(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | Immediately aborts a connection by making all subsequent read/write 15 | operations fail. 16 | \f[CR]mariadb_cancel()\f[R] does not invalidate memory used for 17 | \f[CR]mysql\f[R] structure, nor close any communication channels. 18 | To free the memory, \f[B]mysql_close(3)\f[R] must be called. 19 | \f[CR]mariadb_cancel()\f[R] is useful to break long queries in 20 | situations where sending KILL is not possible. 21 | .SS Parameter 22 | \f[CR]mysql\f[R] \- mysql handle, which was previously allocated by 23 | \f[B]mysql_init(3)\f[R] and connected by 24 | \f[B]mysql_real_connect(3)\f[R]. 25 | .SS Return value 26 | Returns zero on success or a non\-zero value on error. 27 | .SS History 28 | \f[CR]mariadb_cancel()\f[R] was added in Connector/C 3.0 29 | -------------------------------------------------------------------------------- /man/mysql_stmt_field_count.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_field_count" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_field_count \- Returns the number of fields in a result set 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | unsigned int mysql_stmt_field_count(MYSQL_STMT * stmt); 12 | .EE 13 | .SS Description 14 | Returns the number of fields in a result set of a prepared statement. 15 | .SS Return value 16 | Number of fields or zero if the prepared statement has no result set. 17 | .SS Parameter 18 | .IP \[bu] 2 19 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 20 | \f[B]mysql_stmt_init(3)\f[R]. 21 | .SS Notes 22 | .IP \[bu] 2 23 | The number of fields will be available after calling 24 | \f[B]mysql_stmt_prepare(3)\f[R] 25 | .IP \[bu] 2 26 | \f[CR]mysql_stmt_field_count()\f[R] returns zero for statements which 27 | don\[cq]t produce a result set. 28 | .SS See Also 29 | .IP \[bu] 2 30 | \f[B]mysql_stmt_prepare(3)\f[R] 31 | .IP \[bu] 2 32 | \f[B]mysql_stmt_param_count(3)\f[R] 33 | -------------------------------------------------------------------------------- /man/mysql_options.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_options" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_options \- Used to set extra connect options and affect behavior 6 | of a connection 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | int mysql_options(MYSQL * mysql, 13 | \f[B]enum\f[R] mysql_option, 14 | const void * arg); 15 | .EE 16 | .SS Description 17 | Used to set extra connect options and affect behavior for a connection. 18 | This function may be called multiple times to set several options. 19 | \f[CR]mysql_options()\f[R] should be called after 20 | \f[B]mysql_init(3)\f[R]. 21 | .SS Notes 22 | This function is deprecated, new implementations should use 23 | \f[B]mysql_optionsv(3)\f[R] api function instead. 24 | .SS Options 25 | An overview of the possible options can be found in the description of 26 | the \f[B]mysql_optionsv(3)\f[R] API function. 27 | .SS See Also 28 | \f[I]\f[BI]mysql_init(3)\f[I] \f[R]\f[B]mysql_optionsv(3)\f[R] 29 | *\f[B]mysql_real_connect(3)\f[R] 30 | -------------------------------------------------------------------------------- /man/mysql_stmt_sqlstate.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_sqlstate" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_sqlstate \- Returns SQLSTATE error from previous statement 6 | operation. 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | const char * mysql_stmt_sqlstate(MYSQL_STMT * stmt); 13 | .EE 14 | .SS Description 15 | Returns a string containing the SQLSTATE error code for the most 16 | recently invoked prepared statement function that can succeed or fail. 17 | ## Parameter * \f[CR]stmt\f[R] \- a statement handle, which was 18 | previously allocated by \f[B]mysql_stmt_init(3)\f[R]. 19 | ## Return value Returns a 5 digit error code. 20 | `00000' means no error. 21 | The values are specified by ANSI SQL and ODBC. 22 | .SS Notes 23 | Please note that not all client library error codes are mapped to 24 | SQLSTATE errors. 25 | Errors which can\[cq]t be mapped will returned as value HY000. 26 | .SS See Also 27 | .IP \[bu] 2 28 | \f[B]mysql_stmt_errno(3)\f[R] 29 | .IP \[bu] 2 30 | \f[B]mysql_stmt_error(3)\f[R] 31 | -------------------------------------------------------------------------------- /external/zlib/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright notice: 2 | 3 | (C) 1995-2022 Jean-loup Gailly and Mark Adler 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | Jean-loup Gailly Mark Adler 22 | jloup@gzip.org madler@alumni.caltech.edu 23 | -------------------------------------------------------------------------------- /unittest/libmariadb/certs/server-cert.crl: -------------------------------------------------------------------------------- 1 | -----BEGIN X509 CRL----- 2 | MIICxTCBrgIBATANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNlcnQxCzAJ 3 | BgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVsc2lua2kx 4 | EDAOBgNVBAoMB01hcmlhREIXDTIwMDMwMzAzMDMwM1oXDTQwMDIyNzAzMDMwM1ow 5 | FDASAgEBFw0yMDAzMDMwMzAzMDNaoA4wDDAKBgNVHRQEAwIBATANBgkqhkiG9w0B 6 | AQsFAAOCAgEAFsQCul/9vZ1qSxnYoVVlHPspJ6JFgg0kEK5ZQsiGaAKyvV1d9xpT 7 | uu1FxOEajbeOGdGk9kRqy928KFynPSTpWphl+bJ2E+uey4a9PTgAlxPEcdbnGf2f 8 | 1je7i0pOlOximKkeRb8GB4EwNvS9MPKd2pkJnGgIK6eyTtOnKgvmkA3vwXIqB1wJ 9 | dbQMscQlWyCN7lz5A2D6T9xOYY5gKthBAdM73OgzivGKJekoCCirGqVjA7Kurpmt 10 | zV+UbDrHqxsBB4BS+X4sFp7n9K4dqD/acR7aYsjpxKUzc43rEzuTE8flQw1Hzk/h 11 | lGJKg0XfIs2ol7zSeADocZMQR8G0wpeFsz5abm5/oCQ007Rxn+2d/8ZPfOw75u2p 12 | vdcOARoU1q1qF1lGL3x5PFpam693VxB07js3qi6sCqJjsVETAmz08Bvck0+HeHpr 13 | nyQndk7EZPl7W+8Ls68kZZB+77DDNS9Gwb8BQxzazuvN4G6DQsZLYNhWyV6vPeOt 14 | sJF7mdvr4PElbtNG1WQFySt7SJKaA21hG1qVUqto8ZTd+/KU5b7MMnTM7nxFXQ3a 15 | WwHq79xK1xC4f87rrc423yYEjAQkb/1NSseGa/gfqo6wRcxXbRQETq2r9KIsLwAN 16 | sK1gO7Cl0SW9PtrCF4lWNOES9iSZ3BaacOHT7kD8qoBAL83CIlDFgWg= 17 | -----END X509 CRL----- 18 | -------------------------------------------------------------------------------- /man/mysql_data_seek.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_data_seek" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_data_seek \- seeks to an offset 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | void mysql_data_seek(MYSQL_RES * result, 12 | my_ulonglong offset); 13 | .EE 14 | .SS Description 15 | The mysql_data_seek() function seeks to an arbitrary function result 16 | pointer specified by the offset in the result set. 17 | Returns zero on success, nonzero if an error occurred. 18 | .SS Parameters 19 | .IP \[bu] 2 20 | \f[CR]result\f[R] \- a result set identifier returned by 21 | mysql_store_result(). 22 | .IP \[bu] 2 23 | \f[CR]offset\f[R] \- the field offset. 24 | Must be between zero and the total number of rows minus one 25 | (0..mysql_num_rows \- 1). 26 | .SS Notes 27 | This function can only be used with buffered result sets obtained from 28 | the use of the \f[B]mysql_store_result(3)\f[R] function. 29 | .SS See also 30 | .IP \[bu] 2 31 | \f[B]mysql_num_rows(3)\f[R] 32 | .IP \[bu] 2 33 | \f[B]mysql_store_result(3)\f[R] 34 | -------------------------------------------------------------------------------- /man/mysql_stmt_close.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_close" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_close \- Closes a prepared statement 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | my_bool mysql_stmt_close(MYSQL_STMT * stmt); 12 | .EE 13 | .SS Description 14 | Closes a prepared statement and deallocates the statement handle. 15 | If the current statement has pending or unread results, this function 16 | cancels them so that the next query can be executed. 17 | .SS Parameter 18 | .IP \[bu] 2 19 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 20 | \f[B]mysql_stmt_init(3)\f[R]. 21 | .SS Return value 22 | Returns zero on success, nonzero on error (when communicating with the 23 | server). 24 | The statement is deallocated, regardless of the error. 25 | .SS Notes 26 | .IP \[bu] 2 27 | If you want to reuse the statement handle with a different SQL command, 28 | use \f[B]mysql_stmt_reset(3)\f[R]. 29 | .SS See Also 30 | .IP \[bu] 2 31 | \f[B]mysql_stmt_init(3)\f[R] 32 | .IP \[bu] 2 33 | \f[B]mysql_stmt_reset(3)\f[R] 34 | -------------------------------------------------------------------------------- /man/mysql_warning_count.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_warning_count" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_warning_count \- Returns the number of warnings 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | unsigned int mysql_warning_count(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | Returns the number of warnings from the last executed query, or zero if 15 | there are no warnings. 16 | .SS Parameter 17 | .IP \[bu] 2 18 | \f[CR]mysql\f[R] \- a mysql handle, which was previously allocated by 19 | \f[B]mysql_init(3)\f[R] and connected by 20 | \f[B]mysql_real_connect(3)\f[R]. 21 | .SS Notes 22 | .IP \[bu] 2 23 | For retrieving warning messages you should use the SQL command 24 | \f[CR]SHOW WARNINGS\f[R]. 25 | .IP \[bu] 2 26 | If SQL_MODE \f[CR]TRADITIONAL\f[R] is enabled an error instead of 27 | warning will be returned. 28 | For detailed information check the server documentation. 29 | .SS Return value 30 | Returns the number of warnings 31 | .SS See also 32 | .IP \[bu] 2 33 | \f[B]mysql_error(3)\f[R] 34 | .IP \[bu] 2 35 | \f[B]mysql_errno(3)\f[R] 36 | -------------------------------------------------------------------------------- /man/mysql_options4.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_options4" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_options4 \- Used to set extra connect options and affect behavior 6 | of a connection 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | int mysql_options4(MYSQL * mysql, 13 | \f[B]enum\f[R] mysql_option, 14 | const void * arg1, 15 | const void * arg2); 16 | .EE 17 | .SS Description 18 | Used to set extra connect options and affect behavior for a connection. 19 | This function may be called multiple times to set several options. 20 | \f[CR]mysql_options()\f[R] should be called after 21 | \f[B]mysql_init(3)\f[R]. 22 | .SS Notes 23 | This function is deprecated, new implementations should use 24 | \f[B]mysql_optionsv(3)\f[R] api function instead. 25 | .SS Options 26 | An overview of the possible options can be found in the description of 27 | the \f[B]mysql_optionsv(3)\f[R] API function. 28 | .SS See Also 29 | \f[I]\f[BI]mysql_init(3)\f[I] \f[R]\f[B]mysql_optionsv(3)\f[R] 30 | *\f[B]mysql_real_connect(3)\f[R] 31 | -------------------------------------------------------------------------------- /man/mysql_stmt_row_seek.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_row_seek" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_row_seek \- Positions row cursor. 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | MYSQL_ROW_OFFSET mysql_stmt_row_seek(MYSQL_STMT * stmt, 12 | MYSQL_ROW_OFFSET offset); 13 | .EE 14 | .SS Description 15 | Positions the row cursor to an arbitrary row in a result set which was 16 | obtained by \f[B]mysql_stmt_store_result(3)\f[R]. 17 | .SS Parameter 18 | .IP \[bu] 2 19 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 20 | \f[B]mysql_stmt_init(3)\f[R]. 21 | .IP \[bu] 2 22 | \f[CR]offset\f[R] \- row offset. 23 | This value can be obtained either by mysql_stmt_row_seek() or 24 | \f[B]mysql_stmt_row_tell(3)\f[R]. 25 | .SS Return value 26 | Returns the previous row offset. 27 | .SS Notes 28 | The result set must be obtained by \f[B]mysql_use_result(3)\f[R]. 29 | .SS See Also 30 | .IP \[bu] 2 31 | \f[B]mysql_stmt_row_tell(3)\f[R] 32 | .IP \[bu] 2 33 | \f[B]mysql_stmt_store_result(3)\f[R] 34 | -------------------------------------------------------------------------------- /man/mysql_row_seek.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_row_seek" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_row_seek \- Positions the row cursor to an arbitrary row 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | MYSQL_ROW_OFFSET mysql_row_seek(MYSQL_RES * result, 12 | MYSQL_ROW_OFFSET offset); 13 | .EE 14 | .SS Description 15 | Positions the row cursor to an arbitrary row in a result set which was 16 | obtained by \f[B]mysql_store_result(3)\f[R]. 17 | .SS Parameter 18 | .IP \[bu] 2 19 | \f[CR]result\f[R] \- a result set identifier returned by 20 | \f[B]mysql_store_result(3)\f[R]. 21 | .IP \[bu] 2 22 | \f[CR]offset\f[R] \- row offset. 23 | This value can be obtained either by mysql_row_seek() or 24 | \f[B]mysql_row_tell(3)\f[R] 25 | .SS Notes 26 | .IP \[bu] 2 27 | This function will not work if the result set was obtained by 28 | \f[B]mysql_use_result(3)\f[R]. 29 | .SS Return value 30 | Returns the previous row offset. 31 | .SS See also 32 | .IP \[bu] 2 33 | \f[B]mysql_store_result(3)\f[R] 34 | .IP \[bu] 2 35 | \f[B]mysql_row_tell(3)\f[R] 36 | -------------------------------------------------------------------------------- /man/mysql_shutdown.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_shutdown" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_shutdown \- Sends shutdown message to server 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | int mysql_shutdown(MYSQL * mysql, 12 | \f[B]enum\f[R] mysql_enum_shutdown_level); 13 | .EE 14 | .SS Description 15 | This function is deprecated. 16 | Instead please use SQL \f[CR]SHUTDOWN\f[R] command. 17 | .PP 18 | Sends a shutdown message to the server. 19 | .SS Parameter 20 | .IP \[bu] 2 21 | \f[CR]mysql\f[R] \- a mysql handle, which was previously allocated by 22 | \f[B]mysql_init(3)\f[R] and connected by 23 | \f[B]mysql_real_connect(3)\f[R]. 24 | .IP \[bu] 2 25 | \f[CR]mysql_enum_shutdown_level\f[R] \- currently only one shutdown 26 | level, \f[CR]SHUTDOWN_DEFAULT\f[R] is supported. 27 | .SS Notes 28 | .IP \[bu] 2 29 | To shutdown the database server, the user for the current connection 30 | must have SHUTDOWN privileges. 31 | .SS Return value 32 | Returns zero on success, non\-zero on failure. 33 | .SS See also 34 | .IP \[bu] 2 35 | \f[B]mysql_kill(3)\f[R] 36 | -------------------------------------------------------------------------------- /man/mysql_stmt_warning_count.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_warning_count" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_warning_count \- Returns the number of warnings from the last 6 | executed statement. 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | unsigned int mysql_stmt_warning_count(MYSQL_STMT * stmt); 13 | .EE 14 | .SS Description 15 | Returns the number of warnings from the last executed statement, or zero 16 | if there are no warnings. 17 | ## Parameter * \f[CR]stmt\f[R] \- a statement handle, which was 18 | previously allocated by \f[B]mysql_stmt_init(3)\f[R]. 19 | .SS Return value 20 | Returns the number of warnings. 21 | .SS Notes 22 | .IP \[bu] 2 23 | For retrieving warning messages you should use the SQL command 24 | \f[CR]SHOW WARNINGS\f[R]. 25 | .IP \[bu] 2 26 | If SQL_MODE \f[CR]TRADITIONAL\f[R] is enabled an error instead of 27 | warning will be returned. 28 | For detailed information check the server documentation. 29 | ## History This function was added in Connector/C 3.0. 30 | .SS See Also 31 | .IP \[bu] 2 32 | \f[B]mysql_warning_count(3)\f[R] 33 | -------------------------------------------------------------------------------- /man/mysql_stmt_more_results.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_more_results" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_more_results \- indicates if one or more results from a 6 | previously executed prepared statement are available 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | my_bool mysql_stmt_more_results(MYSQL_STMT * stmt); 13 | .EE 14 | .SS Description 15 | Indicates if one or more result sets are available from a previous call 16 | to \f[B]mysql_stmt_execute(3)\f[R]. 17 | .SS Parameter 18 | .IP \[bu] 2 19 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 20 | mysql_stmt_init() and executed by \f[B]mysql_stmt_execute(3)\f[R]. 21 | .SS Notes 22 | .IP \[bu] 2 23 | Multiple result sets can be obtained by calling a stored procedure. 24 | Executing concatenated statements is not supported in prepared statement 25 | protocol. 26 | .SS Return value 27 | Returns 1 if more result sets are available, otherwise zero. 28 | .SS See also 29 | .IP \[bu] 2 30 | \f[B]mysql_stmt_next_result(3)\f[R] 31 | .IP \[bu] 2 32 | \f[B]mysql_stmt_store_result(3)\f[R] 33 | -------------------------------------------------------------------------------- /man/mysql_stmt_store_result.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_store_result" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_store_result \- Transfers a result set from a prepared 6 | statement 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | int mysql_stmt_store_result(MYSQL_STMT * stmt); 13 | .EE 14 | .SS Description 15 | You must call mysql_stmt_store_result() for every query that 16 | successfully produces a result set only if you want to buffer the 17 | complete result set by the client, so that the subsequent 18 | \f[B]mysql_stmt_fetch(3)\f[R] call returns buffered data. 19 | .SS Parameter 20 | .IP \[bu] 2 21 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 22 | \f[B]mysql_stmt_init(3)\f[R]. 23 | .SS Return value 24 | Returns zero on success, nonzero if an error occurred. 25 | ## Notes * You can detect whether the statement produced a result set by 26 | checking the return value of \f[B]mysql_stmt_field_count(3)\f[R] 27 | function. 28 | .SS See Also 29 | .IP \[bu] 2 30 | \f[B]mysql_stmt_field_count(3)\f[R] 31 | .IP \[bu] 2 32 | \f[B]mysql_stmt_fetch(3)\f[R] 33 | -------------------------------------------------------------------------------- /man/mysql_fetch_fields.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_fetch_fields" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_fetch_fields \- returns an array of fields 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | MYSQL_FIELD * mysql_fetch_fields(MYSQL_RES * res); 12 | .EE 13 | .SS Description 14 | This function serves an identical purpose to the 15 | \f[B]mysql_fetch_field(3)\f[R] function with the single difference that 16 | instead of returning one field at a time for each field, the fields are 17 | returned as an array. 18 | Each field contains the definition for a column of the result set. 19 | .SS Parameters 20 | .IP \[bu] 2 21 | \f[CR]res\f[R] \- a result set identifier returned by 22 | \f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R]. 23 | .SS Notes 24 | The total number of fields can be obtained by 25 | \f[B]mysql_field_count(3)\f[R]. 26 | .SS Return value 27 | an array of type \f[CR]MYSQL_FIELD\f[R]. 28 | .SS See also 29 | .IP \[bu] 2 30 | \f[B]mysql_fetch_field(3)\f[R] 31 | .IP \[bu] 2 32 | \f[B]mysql_fetch_field_direct(3)\f[R] 33 | .IP \[bu] 2 34 | \f[B]mysql_field_count(3)\f[R] 35 | -------------------------------------------------------------------------------- /man/mysql_server_init.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_server_init" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_server_init \- Initializes library 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | int mysql_library_init(int argc __attribute__((unused)), 12 | char **argv __attribute__((unused)), 13 | char **groups __attribute__((unused))) 14 | .EE 15 | .SS Description 16 | Call to initialize the library before calling other functions. 17 | .SS Parameters 18 | All parameters are unused, they only exist for compatibility reasons. 19 | .SS Notes 20 | .IP \[bu] 2 21 | Call \f[B]mysql_server_end(3)\f[R] to clean up after completion. 22 | .IP \[bu] 2 23 | If the library was not explicitly initialized by 24 | \f[CR]mysql_server_init()\f[R] any call to \f[B]mysql_init(3)\f[R] will 25 | automatically initialize the library. 26 | .IP \[bu] 2 27 | \f[CR]mysql_library_init()\f[R] is an alias for 28 | \f[CR]mysql_server_init()\f[R] 29 | .SS Return value 30 | Returns zero for success, or nonzero if an error occurred. 31 | ## See also * \f[B]mysql_server_end(3)\f[R] 32 | -------------------------------------------------------------------------------- /man/mysql_stmt_data_seek.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_data_seek" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_data_seek \- Seeks to an arbitrary row in statement result 6 | set 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | void mysql_stmt_data_seek(MYSQL_STMT * stmt, 13 | my_ulonglong offset); 14 | .EE 15 | .SS Description 16 | Seeks to an arbitrary row in statement result set obtained by a previous 17 | call to \f[B]mysql_stmt_store_result(3)\f[R]. 18 | .SS Parameter 19 | .IP \[bu] 2 20 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 21 | \f[B]mysql_stmt_init(3)\f[R]. 22 | .IP \[bu] 2 23 | \f[CR]offset\f[R] \- row offset. 24 | This value must between 0 and number of rows \- 1. 25 | .SS Return value 26 | Returns void 27 | .SS Notes 28 | .IP \[bu] 2 29 | The number of rows can be obtained with the function 30 | \f[B]mysql_stmt_num_rows(3)\f[R]. 31 | .SS See Also 32 | .IP \[bu] 2 33 | \f[B]mysql_stmt_row_tell(3)\f[R] 34 | .IP \[bu] 2 35 | \f[B]mysql_stmt_store_result(3)\f[R] 36 | .IP \[bu] 2 37 | \f[B]mysql_stmt_num_rows(3)\f[R] 38 | -------------------------------------------------------------------------------- /man/mysql_read_query_result.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_read_query_result" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_read_query_result \- waits for a server result or response package 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | my_bool mysql_read_query_result(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | Waits for a server result set or response package from a previously 15 | executed \f[B]mysql_send_query(3)\f[R]. 16 | .SS Parameters 17 | .IP \[bu] 2 18 | \f[CR]mysql\f[R] \- a mysql handle, which was previously allocated by 19 | \f[B]mysql_init(3)\f[R] and connected by 20 | \f[B]mysql_real_connect(3)\f[R]. 21 | .SS Return value 22 | Zero on success, non zero on error. 23 | .SS Example 24 | For an example how to use \[cq]mysql_send_query()\[ga] in an event 25 | driven model, please check Jan Kneschke\[cq]s Blog entry \c 26 | .UR https://jan.kneschke.de/projects/mysql/async-mysql-queries-with-c-api/ 27 | \[lq]Async MySQL Queries with C\-API\[rq] 28 | .UE \c 29 | \&. 30 | .SS See also 31 | .IP \[bu] 2 32 | \f[B]mysql_real_query(3)\f[R] 33 | .IP \[bu] 2 34 | \f[B]mysql_send_query(3)\f[R] 35 | -------------------------------------------------------------------------------- /man/mysql_thread_init.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_thread_init" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_thread_init \- initialize thread 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | my_bool mysql_thread_init(void ); 12 | .EE 13 | .SS Description 14 | Thread initialization for multi threaded clients. 15 | Multi threaded clients should call mysql_thread_init() at the beginning 16 | of the thread initialization to initialize thread specific client 17 | library variables. 18 | If mysql_thread_init() was not called explicitly, it will be called 19 | automatically by \f[B]mysql_init(3)\f[R] or 20 | \f[B]mysql_real_connect(3)\f[R]. 21 | .SS Notes 22 | Before a client thread ends the \f[B]mysql_thread_end(3)\f[R] function 23 | must be called to release memory \- otherwise the client library will 24 | report an error. 25 | .SS Return value 26 | Returns zero if successful or 1 if an error occurred. 27 | .SS History 28 | This function is deprecated since MariaDB Connector/C 3.0.0. 29 | .SS See also 30 | .IP \[bu] 2 31 | \f[B]mysql_thread_end(3)\f[R] 32 | .IP \[bu] 2 33 | \f[B]mysql_thread_safe(3)\f[R] 34 | -------------------------------------------------------------------------------- /unittest/mytap/t/basic-t.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2006 MySQL AB 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #include "my_config.h" 17 | 18 | #include 19 | #include "../tap.h" 20 | 21 | int main() { 22 | plan(5); 23 | ok(1 == 1, "testing basic functions"); 24 | ok(2 == 2, " "); 25 | ok(3 == 3, NULL); 26 | if (1 == 1) 27 | skip(2, "Sensa fragoli"); 28 | else { 29 | ok(1 == 2, "Should not be run at all"); 30 | ok(1, "This one neither"); 31 | } 32 | return exit_status(); 33 | } 34 | -------------------------------------------------------------------------------- /man/mysql_stmt_error.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_error" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_error \- Returns a string description for the last statement 6 | error 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | const char * mysql_stmt_error(MYSQL_STMT * stmt); 13 | .EE 14 | .SS Description 15 | Returns a string containing the error message for the most recently 16 | invoked statement function that can succeed or fail. 17 | The string will be empty if no error occurred. 18 | .SS Parameter 19 | .IP \[bu] 2 20 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 21 | \f[B]mysql_stmt_init(3)\f[R]. 22 | .SS Return value 23 | .IP \[bu] 2 24 | A string describing the last error or an empty string if no error 25 | occurred. 26 | .SS Notes 27 | .IP \[bu] 2 28 | Client error messages are listed in the \f[CR]errmsg.h\f[R] header file, 29 | server error messages are listed in the \f[CR]mysqld_error.h\f[R] header 30 | file of the server source distribution. 31 | .SS See Also 32 | .IP \[bu] 2 33 | \f[B]mysql_stmt_errno(3)\f[R] 34 | .IP \[bu] 2 35 | \f[B]mysql_stmt_sqlstate(3)\f[R] 36 | -------------------------------------------------------------------------------- /man/mysql_hex_string.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_hex_string" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_hex_string \- create a hexadecimal string 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | unsigned long mysql_hex_string(char * to, 11 | const char * from, 12 | unsigned long len); 13 | .EE 14 | .SS Description 15 | This function is used to create a hexadecimal string which can be used 16 | in SQL statements. 17 | e.g.\ \f[CR]INSERT INTO my_blob VALUES(X\[aq]A0E1CD\[aq])\f[R]. 18 | .SS Parameter 19 | .IP \[bu] 2 20 | \f[CR]to\f[R] \- result buffer 21 | .IP \[bu] 2 22 | \f[CR]from\f[R] \- the string which will be encoded 23 | .IP \[bu] 2 24 | \f[CR]len\f[R] \- length of the string (from) 25 | .SS Notes 26 | .IP \[bu] 2 27 | The size of the buffer for the encoded string must be 2 * length + 1. 28 | .IP \[bu] 2 29 | The encoded string does not contain a leading X\[cq]. 30 | .SS Return value 31 | Returns the length of the encoded string without the trailing null 32 | character. 33 | .SS See also 34 | .IP \[bu] 2 35 | \f[B]mysql_real_escape_string(3)\f[R] 36 | -------------------------------------------------------------------------------- /man/mysql_fetch_field_direct.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_fetch_field_direct" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_fetch_field_direct \- Returns a pointer to a MYSQL_FIELD structure 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | MYSQL_FIELD * mysql_fetch_field_direct(MYSQL_RES * res, 12 | unsigned int fieldnr); 13 | .EE 14 | .SS Description 15 | Returns a pointer to a \f[CR]MYSQL_FIELD\f[R] structure which contains 16 | field information from the specified result set. 17 | ### Parameter * \f[CR]res\f[R] \- a result set identifier returned by 18 | \f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R]. 19 | * \f[CR]fieldnr\f[R] \- the field number. 20 | This value must be within the range from 0 to number of fields \- 1 ### 21 | Notes * The total number of fields can be obtained by 22 | mysql_field_count() 23 | .SS Return value 24 | Pointer to a \f[CR]MYSQL_FIELD\f[R] structure or \f[CR]NULL\f[R] if an 25 | invalid field number was specified 26 | .SS See also 27 | .IP \[bu] 2 28 | \f[B]mysql_fetch_field(3)\f[R] 29 | .IP \[bu] 2 30 | \f[B]mysql_field_count(3)\f[R] 31 | -------------------------------------------------------------------------------- /man/mysql_error.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_error" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_error \- returns the last error message for the most recent 6 | function call 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | const char * mysql_error(MYSQL * mysql); 13 | .EE 14 | .SS Description 15 | Returns the last error message for the most recent function call that 16 | can succeed or fail. 17 | An empty string means no error occurred. 18 | .SS Parameter 19 | .IP \[bu] 2 20 | \f[CR]mysql\f[R] is a connection identifier, which was previously 21 | allocated by \f[B]mysql_init(3)\f[R] and connected by 22 | \f[B]mysql_real_connect(3)\f[R]. 23 | .SS Notes 24 | .IP \[bu] 2 25 | Client error codes are listed in \f[CR]errmsg.h\f[R] header file, server 26 | error codes are listed in \f[CR]mysqld_error.h\f[R] header file of the 27 | server source distribution. 28 | .IP \[bu] 2 29 | Client error messages can be obtained by calling 30 | \f[B]mariadb_get_infov(3)\f[R] and passing the parameter 31 | \f[CR]MARIADB_CLIENT_ERRORS\f[R] 32 | .SS See also 33 | .IP \[bu] 2 34 | \f[B]mysql_errno(3)\f[R] 35 | .IP \[bu] 2 36 | \f[B]mysql_sqlstate(3)\f[R] 37 | -------------------------------------------------------------------------------- /man/mysql_get_character_set_info.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_get_character_set_info" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_get_character_set_info \- returns character set information 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | void mysql_get_character_set_info(MYSQL * mysql, 12 | MY_CHARSET_INFO * charset); 13 | .EE 14 | .SS Description 15 | Returns information about the current default character set for the 16 | specified connection. 17 | .SS Parameters 18 | .IP \[bu] 2 19 | \f[CR]mysql\f[R] \- a connection identifier, which was previously 20 | allocated by \f[B]mysql_init(3)\f[R] and connected by 21 | \f[B]mysql_real_connect(3)\f[R]. 22 | .IP \[bu] 2 23 | \f[CR]charset\f[R] \- a pointer to a \f[CR]MY_CHARSET_INFO\f[R] 24 | structure, in which the information will be copied. 25 | .SS Notes 26 | .IP \[bu] 2 27 | A complete list of supported character sets in the client library is 28 | listed in the function description for 29 | \f[B]mysql_set_character_set(3)\f[R]. 30 | .SS See also 31 | .IP \[bu] 2 32 | \f[B]mariadb_get_infov(3)\f[R] 33 | .IP \[bu] 2 34 | \f[B]mysql_set_character_set(3)\f[R] 35 | -------------------------------------------------------------------------------- /man/mysql_stmt_insert_id.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_insert_id" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_insert_id \- Returns the auto generated id from previously 6 | executed prepared statement. 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | my_ulonglong mysql_stmt_insert_id(MYSQL_STMT * stmt); 13 | .EE 14 | .SS Description 15 | The \f[CR]mysql_stmt_insert_id()\f[R] function returns the ID generated 16 | by a prepared statement on a table with a column having the 17 | \f[CR]AUTO_INCREMENT\f[R] attribute. 18 | ## Parameter * \f[CR]stmt\f[R] \- a statement handle, which was 19 | previously allocated by \f[B]mysql_stmt_init(3)\f[R]. 20 | ## Return value Returns the auto generated id from previously executed 21 | prepared statement. 22 | If the last query wasn\[cq]t an INSERT or UPDATE statement or if the 23 | modified table does not have a column with the AUTO_INCREMENT attribute, 24 | this function will return zero. 25 | .SS Notes 26 | .IP \[bu] 2 27 | When performing a multi insert prepared statement, 28 | mysql_stmt_insert_id() will return the value of the first row. 29 | .SS See Also 30 | .IP \[bu] 2 31 | \f[B]mysql_insert_id(3)\f[R] 32 | -------------------------------------------------------------------------------- /plugins/auth/ref10/ge_frombytes.c: -------------------------------------------------------------------------------- 1 | #include "ge.h" 2 | 3 | static const fe d = { 4 | #include "d.h" 5 | } ; 6 | 7 | static const fe sqrtm1 = { 8 | #include "sqrtm1.h" 9 | } ; 10 | 11 | int ge_frombytes_negate_vartime(ge_p3 *h,const unsigned char *s) 12 | { 13 | fe u; 14 | fe v; 15 | fe v3; 16 | fe vxx; 17 | fe check; 18 | 19 | fe_frombytes(h->Y,s); 20 | fe_1(h->Z); 21 | fe_sq(u,h->Y); 22 | fe_mul(v,u,d); 23 | fe_sub(u,u,h->Z); /* u = y^2-1 */ 24 | fe_add(v,v,h->Z); /* v = dy^2+1 */ 25 | 26 | fe_sq(v3,v); 27 | fe_mul(v3,v3,v); /* v3 = v^3 */ 28 | fe_sq(h->X,v3); 29 | fe_mul(h->X,h->X,v); 30 | fe_mul(h->X,h->X,u); /* x = uv^7 */ 31 | 32 | fe_pow22523(h->X,h->X); /* x = (uv^7)^((q-5)/8) */ 33 | fe_mul(h->X,h->X,v3); 34 | fe_mul(h->X,h->X,u); /* x = uv^3(uv^7)^((q-5)/8) */ 35 | 36 | fe_sq(vxx,h->X); 37 | fe_mul(vxx,vxx,v); 38 | fe_sub(check,vxx,u); /* vx^2-u */ 39 | if (fe_isnonzero(check)) { 40 | fe_add(check,vxx,u); /* vx^2+u */ 41 | if (fe_isnonzero(check)) return -1; 42 | fe_mul(h->X,h->X,sqrtm1); 43 | } 44 | 45 | if (fe_isnegative(h->X) == (s[31] >> 7)) 46 | fe_neg(h->X,h->X); 47 | 48 | fe_mul(h->T,h->X,h->Y); 49 | return 0; 50 | } 51 | -------------------------------------------------------------------------------- /man/mysql_store_result.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_store_result" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_store_result \- returns a buffered result set 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | MYSQL_RES * mysql_store_result(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | Returns a buffered resultset from the last executed query. 15 | ### Notes 16 | .IP \[bu] 2 17 | mysql_field_count() indicates if there will be a result set available. 18 | .IP \[bu] 2 19 | The memory allocated by mysql_store_result() needs to be released by 20 | calling the function \f[B]mysql_free_result(3)\f[R]. 21 | .SS Parameters 22 | .IP \[bu] 2 23 | \f[CR]mysql\f[R] is a connection identifier, which was previously 24 | allocated by \f[B]mysql_init(3)\f[R] and connected by 25 | \f[B]mysql_real_connect(3)\f[R]. 26 | .SS Return value 27 | Returns a buffered result set or NULL in case an error occurred or if 28 | the query didn\[cq]t return data (e.g.\ when executing an INSERT, 29 | UPDATE, DELETE or REPLACE statement). 30 | ## See also * \f[B]mysql_free_result(3)\f[R] * 31 | \f[B]mysql_use_result(3)\f[R] * \f[B]mysql_real_query(3)\f[R] * 32 | \f[B]mysql_field_count(3)\f[R] 33 | -------------------------------------------------------------------------------- /plugins/auth/ed25519_common.h: -------------------------------------------------------------------------------- 1 | /************************************************************************************ 2 | Copyright (C) 2017-2022 MariaDB Corporation AB 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Library General Public 6 | License as published by the Free Software Foundation; either 7 | version 2 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public 15 | License along with this library; if not see 16 | or write to the Free Software Foundation, Inc., 17 | 51 Franklin St., Fifth Floor, Boston, MA 02110, USA 18 | *************************************************************************************/ 19 | 20 | #include 21 | #include 22 | 23 | #include "ref10/api.h" 24 | #include "ref10/crypto_sign.h" 25 | 26 | #define NONCE_BYTES 32 27 | -------------------------------------------------------------------------------- /cmake/export.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2013-2016 MariaDB Corporation AB 3 | # 4 | # Redistribution and use is allowed according to the terms of the New 5 | # BSD license. 6 | # For details see the COPYING-CMAKE-SCRIPTS file. 7 | # 8 | MACRO(CREATE_EXPORT_FILE op outfile version symbols alias_version) 9 | IF(WIN32) 10 | SET(EXPORT_CONTENT "EXPORTS\n") 11 | FOREACH(exp_symbol ${symbols}) 12 | SET(EXPORT_CONTENT ${EXPORT_CONTENT} "${exp_symbol}\n") 13 | ENDFOREACH() 14 | ELSE() 15 | SET(EXPORT_CONTENT "VERSION {\n${version} {\nglobal:\n") 16 | FOREACH(exp_symbol ${symbols}) 17 | SET(EXPORT_CONTENT "${EXPORT_CONTENT} ${exp_symbol}\\;\n") 18 | ENDFOREACH() 19 | SET(EXPORT_CONTENT "${EXPORT_CONTENT}local:\n *\\;\n}\\;\n") 20 | IF ("${alias_version}" STRGREATER "") 21 | SET(EXPORT_CONTENT "${EXPORT_CONTENT}${alias_version} {\n}\\;\n}\\;\n") 22 | FOREACH(exp_symbol ${symbols}) 23 | SET(EXPORT_CONTENT "${EXPORT_CONTENT}\"${exp_symbol}@${alias_version}\" = ${exp_symbol}\\;\n") 24 | ENDFOREACH() 25 | ELSE() 26 | SET(EXPORT_CONTENT "${EXPORT_CONTENT}}\\;\n") 27 | ENDIF() 28 | ENDIF() 29 | FILE(${op} ${CMAKE_CURRENT_BINARY_DIR}/${outfile} ${EXPORT_CONTENT}) 30 | ENDMACRO() 31 | -------------------------------------------------------------------------------- /man/mysql_set_server_option.3: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" Automatically generated by Pandoc 3.5 3 | .\" 4 | .TH "mysql_set_server_option" "3" "" "Version 3.4" "MariaDB Connector/C" 5 | .SS Name 6 | mysql_set_server_option \- Sets server option 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | int mysql_set_server_option(MYSQL * mysql, 13 | \f[B]enum\f[R] enum_mysql_set_option); 14 | .EE 15 | .SS Description 16 | Sets server option. 17 | .SS Parameters 18 | .IP \[bu] 2 19 | \f[CR]mysql\f[R] \- a mysql handle, which was previously allocated by 20 | \f[B]mysql_init(3)\f[R] and connected by 21 | \f[B]mysql_real_connect(3)\f[R]. 22 | .IP \[bu] 2 23 | \f[CR]enum_mysql_set_option\f[R] \- server option (see below) Server 24 | option, which can be one of the following values: 25 | .PP 26 | .TS 27 | tab(@); 28 | l l. 29 | T{ 30 | Option 31 | T}@T{ 32 | Description 33 | T} 34 | _ 35 | T{ 36 | MYSQL_OPTION_MULTI_STATEMENTS_OFF 37 | T}@T{ 38 | Disables multi statement support 39 | T} 40 | T{ 41 | MYSQL_OPTION_MULTI_STATEMENTS_ON 42 | T}@T{ 43 | Enable multi statement support 44 | T} 45 | .TE 46 | .SS Return value 47 | Returns zero on success, non\-zero on failure. 48 | .SS See also 49 | .IP \[bu] 2 50 | \f[B]mysql_real_connect(3)\f[R] 51 | -------------------------------------------------------------------------------- /man/mysql_stmt_init.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_init" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_init \- Initializes a prepared statement handle 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | MYSQL_STMT * mysql_stmt_init(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | Initializes and allocates memory for a prepared statement. 15 | .SS Parameter 16 | .IP \[bu] 2 17 | \f[CR]mysql\f[R] \- a mysql handle, which was previously allocated by 18 | \f[B]mysql_init(3)\f[R] and connected by 19 | \f[B]mysql_real_connect(3)\f[R]. 20 | .SS Return value 21 | Returns a pointer to a \f[CR]MYSQL_STMT\f[R] structure or 22 | \f[CR]NULL\f[R] if an error occurred. 23 | .SS Notes 24 | .IP \[bu] 2 25 | Members of the \f[CR]MYSQL_STMT\f[R] structure are not intended for 26 | application use. 27 | .IP \[bu] 2 28 | A statement handle which was allocated by mysql_stmt_init() needs to be 29 | freed with \f[B]mysql_stmt_close(3)\f[R]. 30 | .IP \[bu] 2 31 | Any subsequent calls to any mysql_stmt function will fail until 32 | \f[B]mysql_stmt_prepare(3)\f[R] was called. 33 | .SS See Also 34 | .IP \[bu] 2 35 | \f[B]mysql_stmt_close(3)\f[R] 36 | .IP \[bu] 2 37 | \f[B]mysql_stmt_prepare(3)\f[R] 38 | -------------------------------------------------------------------------------- /win-iconv/mlang.h: -------------------------------------------------------------------------------- 1 | HRESULT WINAPI ConvertINetString( 2 | LPDWORD lpdwMode, 3 | DWORD dwSrcEncoding, 4 | DWORD dwDstEncoding, 5 | LPCSTR lpSrcStr, 6 | LPINT lpnSrcSize, 7 | LPBYTE lpDstStr, 8 | LPINT lpnDstSize 9 | ); 10 | 11 | HRESULT WINAPI ConvertINetMultiByteToUnicode( 12 | LPDWORD lpdwMode, 13 | DWORD dwSrcEncoding, 14 | LPCSTR lpSrcStr, 15 | LPINT lpnMultiCharCount, 16 | LPWSTR lpDstStr, 17 | LPINT lpnWideCharCount 18 | ); 19 | 20 | HRESULT WINAPI ConvertINetUnicodeToMultiByte( 21 | LPDWORD lpdwMode, 22 | DWORD dwEncoding, 23 | LPCWSTR lpSrcStr, 24 | LPINT lpnWideCharCount, 25 | LPSTR lpDstStr, 26 | LPINT lpnMultiCharCount 27 | ); 28 | 29 | HRESULT WINAPI IsConvertINetStringAvailable( 30 | DWORD dwSrcEncoding, 31 | DWORD dwDstEncoding 32 | ); 33 | 34 | HRESULT WINAPI LcidToRfc1766A( 35 | LCID Locale, 36 | LPSTR pszRfc1766, 37 | int nChar 38 | ); 39 | 40 | HRESULT WINAPI LcidToRfc1766W( 41 | LCID Locale, 42 | LPWSTR pszRfc1766, 43 | int nChar 44 | ); 45 | 46 | HRESULT WINAPI Rfc1766ToLcidA( 47 | LCID *pLocale, 48 | LPSTR pszRfc1766 49 | ); 50 | 51 | HRESULT WINAPI Rfc1766ToLcidW( 52 | LCID *pLocale, 53 | LPWSTR pszRfc1766 54 | ); 55 | -------------------------------------------------------------------------------- /man/mariadb_rpl_fetch.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_rpl_fetch" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_rpl_fetch \- fetches next event from replication stream 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | MARIADB_RPL_EVENT *mariadb_rpl_fetch(MARIADB_RPL *rpl, MARIADB_RPL_EVENT *event) 12 | .EE 13 | .SS Description 14 | Fetches one event from the replication stream 15 | .SS Parameter 16 | .IP \[bu] 2 17 | \f[CR]rpl\f[R] \- A replication handle which was initialized by 18 | \f[B]mariadb_rpl_init(3)\f[R] and connected by 19 | \f[B]mariadb_rpl_open(3)\f[R]. 20 | .IP \[bu] 2 21 | \f[CR]event\f[R] \- An event which was returned by a previous call to 22 | \f[CR]mariadb_rpl_fetch\f[R]. 23 | If this value is \f[CR]NULL\f[R] the function will allocate new memory 24 | for the event, otherwise the passed event value will be overwritten. 25 | .SS Return value 26 | An event handle or NULL if EOF packet was received. 27 | .SS Notes 28 | Event memory needs to be freed by calling 29 | \f[B]mariadb_rpl_free_event(3)\f[R]. 30 | .SS See also 31 | .IP \[bu] 2 32 | \f[B]mariadb_rpl_free_event(3)\f[R] 33 | .SS History 34 | \f[CR]mariadb_rpl_fetch\f[R] was added in MariaDB Connector/C 3.1.0 35 | -------------------------------------------------------------------------------- /man/mysql_stmt_next_result.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_next_result" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_next_result \- prepares next result set of a prepared 6 | statement 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | int mysql_stmt_next_result(MYSQL_STMT * stmt); 13 | .EE 14 | .SS Description 15 | Prepares next result set from a previous call to 16 | \f[B]mysql_stmt_execute(3)\f[R] which can be retrieved by 17 | \f[B]mysql_stmt_store_result(3)\f[R]. 18 | .SS Parameter 19 | .IP \[bu] 2 20 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 21 | [mysql_stmt_init()](mysql_stmt_init().]] 22 | .SS Return value 23 | Returns zero on success, nonzero if an error occurred. 24 | .SS Notes 25 | .IP \[bu] 2 26 | The function \f[B]mysql_stmt_more_results(3)\f[R] indicates if further 27 | result sets are available. 28 | .IP \[bu] 2 29 | If the execution of a stored procedure produced multiple result sets the 30 | return value of \f[B]mysql_stmt_errno(3)\f[R]/error() might change and 31 | there will be no result set available. 32 | .SS See also 33 | .IP \[bu] 2 34 | \f[B]mysql_stmt_execute(3)\f[R] 35 | .IP \[bu] 2 36 | \f[B]mysql_stmt_more_results(3)\f[R] 37 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_list_named.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_list_named" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_list_named \- Lists column keys in dynamic column 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | \f[B]enum\f[R] enum_dyncol_func_result 12 | mariadb_dyncol_list_named(DYNAMIC_COLUMN *str, 13 | uint *column_count, 14 | MYSQL_LEX_STRING **column_keys); 15 | .EE 16 | .SS Description 17 | Lists the column keys inside a dynamic column. 18 | .SS Notes 19 | .IP \[bu] 2 20 | The application program needs to free the allocated memory for 21 | \f[CR]column_count\f[R] and \f[CR]column_keys\f[R] parameter. 22 | .SS Parameter 23 | .IP \[bu] 2 24 | \f[CR]*str\f[R] \- Dynamic column 25 | .IP \[bu] 2 26 | \f[CR]*column_count\f[R] \- A pointer to an unsigned integer which 27 | stores the number of columns 28 | .IP \[bu] 2 29 | \f[CR]**column_keys\f[R] \- A pointer to an array of column keys, which 30 | stores the keys 31 | .SS Return value 32 | Returns \f[CR]ER_DYNCOL_OK\f[R] on success, otherwise error. 33 | .SS See also 34 | .IP \[bu] 2 35 | mariadb_dyncol_list_num 36 | .IP \[bu] 2 37 | mariadb_dyncol_list_json 38 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_list_num.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_list_num" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_list_num \- Lists numeric column keys in dynamic column 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | \f[B]enum\f[R] enum_dyncol_func_result 12 | mariadb_dyncol_list_named(DYNAMIC_COLUMN *str, 13 | uint *column_count, 14 | uint **column_numbers); 15 | .EE 16 | .SS Description 17 | Lists the column numbers inside a dynamic column. 18 | .SS Parameter 19 | .IP \[bu] 2 20 | \f[CR]*str\f[R] \- Dynamic column 21 | .IP \[bu] 2 22 | \f[CR]*column_count\f[R] \- A pointer to an unsigned integer which 23 | stores the number of columns 24 | .IP \[bu] 2 25 | \f[CR]**column_numbers\f[R] \- A pointer to an array of column numbers, 26 | which stores the numbers 27 | .SS Return value 28 | Returns \f[CR]ER_DYNCOL_OK\f[R] on success, otherwise error. 29 | .SS Notes 30 | .IP \[bu] 2 31 | The application program needs to free the allocated memory for 32 | \f[CR]column_count\f[R] and \f[CR]column_numbers\f[R] parameter. 33 | .SS See also 34 | .IP \[bu] 2 35 | mariadb_dyncol_list_named 36 | .IP \[bu] 2 37 | mariadb_dyncol_list_json 38 | -------------------------------------------------------------------------------- /man/mysql_ping.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_ping" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_ping \- checks if the connection between client and server is 6 | working 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | int mysql_ping(MYSQL * mysql); 13 | .EE 14 | .SS Description 15 | Checks whether the connection to the server is working. 16 | If it has gone down, and global option reconnect is enabled an automatic 17 | reconnection is attempted. 18 | .PP 19 | This function can be used by clients that remain idle for a long while, 20 | to check whether the server has closed the connection and reconnect if 21 | necessary. 22 | .SS Parameters 23 | .IP \[bu] 2 24 | \f[CR]mysql\f[R] \- a mysql handle, which was previously allocated by 25 | \f[B]mysql_init(3)\f[R] and connected by 26 | \f[B]mysql_real_connect(3)\f[R]. 27 | ### Notes 28 | .IP \[bu] 2 29 | If a reconnect occurred the thread_id will change. 30 | Also resources bundled to the connection (prepared statements, locks, 31 | temporary tables, \&...) 32 | will be released. 33 | .SS Return value 34 | Returns zero on success, nonzero if an error occurred. 35 | .SS See also 36 | .IP \[bu] 2 37 | \f[B]mysql_optionsv(3)\f[R] 38 | .IP \[bu] 2 39 | \f[B]mysql_kill(3)\f[R] 40 | -------------------------------------------------------------------------------- /man/mysql_stmt_execute.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_execute" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_execute \- Executes a prepared statement 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | int mysql_stmt_execute(MYSQL_STMT * stmt); 12 | .EE 13 | .SS Description 14 | Executes a prepared statement which was previously prepared by 15 | \f[B]mysql_stmt_prepare(3)\f[R]. 16 | When executed any parameter markers which exist will automatically be 17 | replaced with the appropriate data. 18 | .SS Parameter 19 | .IP \[bu] 2 20 | \f[CR]stmt\f[R] \- A statement handle, which was previously allocated by 21 | \f[B]mysql_stmt_init(3)\f[R]. 22 | .SS Return value 23 | Returns zero on success, non\-zero on failure. 24 | .SS Notes 25 | .IP \[bu] 2 26 | If the statement is UPDATE, REPLACE, DELETE or INSERT, the total number 27 | of affected rows can be determined by using the 28 | \f[B]mysql_stmt_affected_rows(3)\f[R] function. 29 | Likewise, if the query yields a result set the 30 | \f[B]mysql_stmt_fetch(3)\f[R] function is used. 31 | .SS See Also 32 | .IP \[bu] 2 33 | \f[B]mariadb_stmt_execute_direct(3)\f[R] 34 | .IP \[bu] 2 35 | \f[B]mysql_stmt_prepare(3)\f[R] 36 | .IP \[bu] 2 37 | \f[B]mysql_stmt_bind_param(3)\f[R] 38 | -------------------------------------------------------------------------------- /man/mysql_stmt_reset.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_reset" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_reset \- Resets a prepared statement 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | my_bool mysql_stmt_reset(MYSQL_STMT * stmt); 12 | .EE 13 | .SS Description 14 | Resets a prepared statement on client and server to state after prepare. 15 | .SS Parameter 16 | .IP \[bu] 2 17 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 18 | \f[B]mysql_stmt_init(3)\f[R]. 19 | Returns zero on success, nonzero if an error occurred. 20 | .SS Return value 21 | Returns zero on success, 1 if an error occurred. 22 | .SS Notes 23 | .IP \[bu] 2 24 | \f[CR]mysql_stmt_reset()\f[R] resets the statement on the server, 25 | unbuffered result sets and errors. 26 | Bindings and stored result sets will not be cleared. 27 | The latter one will be cleared when re\-executing or closing the 28 | prepared statement. 29 | .IP \[bu] 2 30 | To reprepare a prepared statement with another SQL statement use 31 | \f[B]mysql_stmt_prepare(3)\f[R]. 32 | .SS See Also 33 | .IP \[bu] 2 34 | \f[B]mysql_stmt_close(3)\f[R] 35 | .IP \[bu] 2 36 | \f[B]mysql_stmt_prepare(3)\f[R] 37 | .IP \[bu] 2 38 | \f[B]mysql_stmt_execute(3)\f[R] 39 | -------------------------------------------------------------------------------- /win/resource.rc.in: -------------------------------------------------------------------------------- 1 | #include "winver.h" 2 | 3 | VS_VERSION_INFO VERSIONINFO 4 | FILEVERSION @MAJOR_FILE_VERSION@,@MINOR_FILE_VERSION@,@PATCH_FILE_VERSION@,@TINY_FILE_VERSION@ 5 | PRODUCTVERSION @MAJOR_FILE_VERSION@,@MINOR_FILE_VERSION@,@PATCH_FILE_VERSION@,@TINY_FILE_VERSION@ 6 | FILEFLAGSMASK 0x3fL 7 | #ifdef _DEBUG 8 | FILEFLAGS 0x1L 9 | #else 10 | FILEFLAGS 0x0L 11 | #endif 12 | FILEOS 0x40004L 13 | FILETYPE @FILE_TYPE@ 14 | FILESUBTYPE 0x0L 15 | BEGIN 16 | BLOCK "StringFileInfo" 17 | BEGIN 18 | BLOCK "040904B0" 19 | BEGIN 20 | VALUE "CompanyName", "MariaDB Corporation AB" 21 | VALUE "FileDescription", "@FILE_DESCRIPTION@" 22 | VALUE "FileVersion", "@CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@.@CPACK_PACKAGE_VERSION_PATCH@.@FILE_VERSION@" 23 | VALUE "LegalCopyright", "2013-2018 MariaDB Corporation Ab" 24 | VALUE "ProductName", "MariaDB Connector/C" 25 | VALUE "ProductVersion", "@CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@.@CPACK_PACKAGE_VERSION_PATCH@" 26 | VALUE "OriginalFilename", "@ORIGINAL_FILE_NAME@" 27 | END 28 | END 29 | BLOCK "VarFileInfo" 30 | BEGIN 31 | VALUE "Translation", 0x409, 1200 32 | END 33 | END 34 | 35 | -------------------------------------------------------------------------------- /man/mysql_field_seek.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_field_seek" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_field_seek \- sets the field cursor to given offset 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES * result, 12 | MYSQL_FIELD_OFFSET offset); 13 | .EE 14 | .SS Description 15 | Sets the field cursor to the given offset. 16 | The next call to \f[B]mysql_fetch_field(3)\f[R] will retrieve the field 17 | definition of the column associated with that offset. 18 | .SS Parameters 19 | .IP \[bu] 2 20 | \f[CR]result\f[R] \- a result set identifier returned by 21 | \f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R]. 22 | .IP \[bu] 2 23 | \f[CR]offset\f[R] \- the field number. 24 | This number must be in the range from 25 | \f[CR]0\f[R]..\f[CR]number of fields \- 1\f[R]. 26 | .SS Notes 27 | .IP \[bu] 2 28 | The number of fields can be obtained from \f[B]mysql_field_count(3)\f[R] 29 | \&. 30 | .IP \[bu] 2 31 | To move the field cursor to the first field offset parameter should be 32 | zero. 33 | .SS Return value 34 | Returns the previous value of the field cursor 35 | .SS See also 36 | .IP \[bu] 2 37 | \f[B]mysql_field_tell(3)\f[R] 38 | -------------------------------------------------------------------------------- /man/mysql_next_result.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_next_result" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_next_result \- prepares next result set 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | int mysql_next_result(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | Prepares next result set from a previous call to 15 | \f[B]mysql_real_query(3)\f[R] which can be retrieved by 16 | \f[B]mysql_store_result(3)\f[R] or 17 | [mysql_use_result()](()](mysql_use_result). 18 | Returns zero on success, nonzero if an error occurred. 19 | .SS Parameter 20 | .IP \[bu] 2 21 | \f[CR]mysql\f[R] \- a mysql handle, which was previously allocated by 22 | \f[B]mysql_init(3)\f[R] and connected by 23 | \f[B]mysql_real_connect(3)\f[R]. 24 | .SS Notes 25 | .IP \[bu] 2 26 | If a multi query contains errors the return value of 27 | \f[B]mysql_errno(3)\f[R] and \f[B]mysql_error(3)\f[R] might change and 28 | there will be no result set available. 29 | .SS Return value 30 | Returns zero on success, non zero value on error. 31 | .SS See also 32 | .IP \[bu] 2 33 | \f[B]mysql_real_query(3)\f[R] 34 | .IP \[bu] 2 35 | \f[B]mysql_store_result(3)\f[R] 36 | .IP \[bu] 2 37 | \f[B]mysql_use_result(3)\f[R] 38 | .IP \[bu] 2 39 | \f[B]mysql_more_results(3)\f[R] 40 | -------------------------------------------------------------------------------- /external/zlib/win32/zlib1.rc: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../zlib.h" 3 | 4 | #ifdef GCC_WINDRES 5 | VS_VERSION_INFO VERSIONINFO 6 | #else 7 | VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 8 | #endif 9 | FILEVERSION ZLIB_VER_MAJOR,ZLIB_VER_MINOR,ZLIB_VER_REVISION,0 10 | PRODUCTVERSION ZLIB_VER_MAJOR,ZLIB_VER_MINOR,ZLIB_VER_REVISION,0 11 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 12 | #ifdef _DEBUG 13 | FILEFLAGS 1 14 | #else 15 | FILEFLAGS 0 16 | #endif 17 | FILEOS VOS__WINDOWS32 18 | FILETYPE VFT_DLL 19 | FILESUBTYPE 0 // not used 20 | BEGIN 21 | BLOCK "StringFileInfo" 22 | BEGIN 23 | BLOCK "040904E4" 24 | //language ID = U.S. English, char set = Windows, Multilingual 25 | BEGIN 26 | VALUE "FileDescription", "zlib data compression library\0" 27 | VALUE "FileVersion", ZLIB_VERSION "\0" 28 | VALUE "InternalName", "zlib1.dll\0" 29 | VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" 30 | VALUE "OriginalFilename", "zlib1.dll\0" 31 | VALUE "ProductName", "zlib\0" 32 | VALUE "ProductVersion", ZLIB_VERSION "\0" 33 | VALUE "Comments", "For more information visit http://www.zlib.net/\0" 34 | END 35 | END 36 | BLOCK "VarFileInfo" 37 | BEGIN 38 | VALUE "Translation", 0x0409, 1252 39 | END 40 | END 41 | -------------------------------------------------------------------------------- /man/mysql_fetch_lengths.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_fetch_lengths" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_fetch_lengths \- returns an array of length values for the current 6 | row 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | unsigned long * mysql_fetch_lengths(MYSQL_RES * result); 13 | .EE 14 | .SS Description 15 | The \f[CR]mysql_fetch_lengths()\f[R] function returns an array 16 | containing the lengths of every column of the current row within the 17 | result set (not including terminating zero character) or \f[CR]NULL\f[R] 18 | if an error occurred. 19 | .SS Parameter 20 | .IP \[bu] 2 21 | \f[CR]result\f[R] \- a result set identifier returned by 22 | \f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R]. 23 | ### Notes \f[CR]mysql_fetch_lengths()\f[R] is valid only for the current 24 | row of the result set. 25 | It returns \f[CR]NULL\f[R] if you call it before calling 26 | \f[B]mysql_fetch_row(3)\f[R] or after retrieving all rows in the result. 27 | .SS Return value 28 | An array of unsigned long values . 29 | The size of the array can be determined by the number of fields in 30 | current result set. 31 | .SS See also 32 | .IP \[bu] 2 33 | \f[B]mysql_field_count(3)\f[R] 34 | .IP \[bu] 2 35 | \f[B]mysql_fetch_row(3)\f[R] 36 | -------------------------------------------------------------------------------- /man/mysql_init.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_init" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_init \- Prepares and initializes a \f[CR]MYSQL\f[R] structure 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | MYSQL *mysql_init(MYSQL *mysql); 12 | .EE 13 | .SS Description 14 | Prepares and initializes a \f[CR]MYSQL\f[R] structure to be used with 15 | \f[B]mysql_real_connect(3)\f[R]. 16 | If an address of a \f[CR]MYSQL\f[R] structure was passed as parameter, 17 | the structure will be initialized, if \f[CR]NULL\f[R] was passed, a new 18 | structure will be allocated and initialized. 19 | .PP 20 | \f[B]Notes:\f[R] * If parameter \f[CR]mysql\f[R] is not \f[CR]NULL\f[R] 21 | \f[B]mysql_close(3)\f[R] API function will not release the memory * Any 22 | subsequent calls to any function (except \f[B]mysql_optionsv(3)\f[R] 23 | will fail until \f[B]mysql_real_connect(3)\f[R] was called. 24 | * Memory allocated by \f[CR]mysql_init()\f[R] must be freed with 25 | \f[B]mysql_close(3)\f[R]. 26 | .SS Return value 27 | The \f[CR]mysql_init()\f[R] function returns an address of a 28 | \f[CR]MYSQL\f[R] structure, or NULL in case of memory allcation error. 29 | .SS See also 30 | .IP \[bu] 2 31 | \f[B]mysql_close(3)\f[R] 32 | .IP \[bu] 2 33 | \f[B]mysql_optionsv(3)\f[R] 34 | -------------------------------------------------------------------------------- /man/mysql_stmt_fetch_column.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_fetch_column" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_fetch_column \- Fetches a single column into bind buffer 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | int mysql_stmt_fetch_column(MYSQL_STMT * stmt, 12 | MYSQL_BIND * bind_arg, 13 | unsigned int column, 14 | unsigned long offset); 15 | .EE 16 | .SS Description 17 | This function can be used to fetch large data of a single column in 18 | pieces. 19 | .SS Parameter 20 | .IP \[bu] 2 21 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 22 | \f[B]mysql_stmt_init(3)\f[R]. 23 | .IP \[bu] 2 24 | \f[CR]bind_arg\f[R] \- a pointer to a MYSQL_BIND structure. 25 | .IP \[bu] 2 26 | \f[CR]column\f[R] \- number of column, first column is numbered zero. 27 | .IP \[bu] 2 28 | \f[CR]offset\f[R] \- offset at which to begin retrieving data. 29 | .SS Return value 30 | Returns zero on success, non\-zero on failure. 31 | .SS Notes 32 | .IP \[bu] 2 33 | The size of the buffer is specified within MYSQL_BIND structure. 34 | .SS See Also 35 | .IP \[bu] 2 36 | \f[B]mysql_stmt_fetch(3)\f[R] 37 | .IP \[bu] 2 38 | \f[B]mysql_stmt_send_long_data(3)\f[R] 39 | -------------------------------------------------------------------------------- /man/mysql_field_count.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_field_count" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_field_count \- returns the number of columns for the most recent 6 | statement 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | unsigned int mysql_field_count(MYSQL * mysql); 13 | .EE 14 | .SS Description 15 | Returns the number of columns for the most recent statement on the 16 | connection represented by the link parameter as an unsigned integer. 17 | This function can be useful when using the 18 | \f[B]mysql_store_result(3)\f[R] function to determine if the query 19 | should have produced a non\-empty result set or not without knowing the 20 | nature of the query. 21 | .SS Parameters 22 | .IP \[bu] 2 23 | \f[CR]mysql\f[R] is a connection identifier, which was previously 24 | allocated by \f[B]mysql_init(3)\f[R] and connected by 25 | \f[B]mysql_real_connect(3)\f[R]. 26 | .SS Notes 27 | The \f[CR]mysql_field_count()\f[R] function should be used to determine 28 | if there is a result set available. 29 | .SS Return value: 30 | The number of columns for the most recent statement. 31 | The value is zero, if the statement didn\[cq]t produce a result set. 32 | .SS See also 33 | .IP \[bu] 2 34 | \f[B]mysql_store_result(3)\f[R] 35 | .IP \[bu] 2 36 | \f[B]mysql_use_result(3)\f[R] 37 | -------------------------------------------------------------------------------- /man/mysql_stmt_bind_result.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_bind_result" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_bind_result \- binds result columns to variables 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | my_bool mysql_stmt_bind_result(MYSQL_STMT * stmt, 12 | MYSQL_BIND * bind); 13 | .EE 14 | .SS Description 15 | Binds columns in the result set to variables. 16 | Returns zero on success, non\-zero on failure. 17 | .SS Parameters 18 | .IP \[bu] 2 19 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 20 | \f[B]mysql_stmt_init(3)\f[R]. 21 | .IP \[bu] 2 22 | \f[CR]bind\f[R] \- an array of [MYSQL_BIND]] structures. 23 | The size of this array must be equal to the number of columns in result 24 | set. 25 | .SS Notes 26 | .IP \[bu] 2 27 | To determine the number of columns in result set use 28 | \f[B]mysql_stmt_field_count(3)\f[R]. 29 | .IP \[bu] 2 30 | A column can be bound or rebound at any time, even after a result set 31 | has been partially retrieved. 32 | The new binding takes effect the next time \f[B]mysql_stmt_fetch(3)\f[R] 33 | is called. 34 | .SS See Also 35 | .IP \[bu] 2 36 | \f[B]mysql_stmt_field_count(3)\f[R] 37 | .IP \[bu] 2 38 | \f[B]mysql_stmt_execute(3)\f[R] 39 | .IP \[bu] 2 40 | \f[B]mysql_stmt_fetch(3)\f[R] 41 | -------------------------------------------------------------------------------- /libmariadb/bmove_upp.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB 2 | 3 | This library is free software; you can redistribute it and/or 4 | modify it under the terms of the GNU Library General Public 5 | License as published by the Free Software Foundation; either 6 | version 2 of the License, or (at your option) any later version. 7 | 8 | This library is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | Library General Public License for more details. 12 | 13 | You should have received a copy of the GNU Library General Public 14 | License along with this library; if not, write to the Free 15 | Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 16 | MA 02111-1301, USA */ 17 | 18 | /* File : bmove.c 19 | Author : Michael widenius 20 | Updated: 1987-03-20 21 | Defines: bmove_upp() 22 | 23 | bmove_upp(dst, src, len) moves exactly "len" bytes from the source 24 | "src-len" to the destination "dst-len" counting downwards. 25 | */ 26 | 27 | #include 28 | #include "ma_string.h" 29 | 30 | void ma_bmove_upp(register char *dst, register const char *src, register size_t len) 31 | { 32 | while (len-- != 0) *--dst = *--src; 33 | } 34 | -------------------------------------------------------------------------------- /man/mysql_more_results.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_more_results" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_more_results \- indicates if one or more results are available 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | my_bool mysql_more_results(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | Indicates if one or more result sets are available from a previous call 15 | to \f[B]mysql_real_query(3)\f[R]. 16 | .SS Parameter 17 | .IP \[bu] 2 18 | \f[CR]mysql\f[R] \- a connection identifier, which was previously 19 | allocated by \f[B]mysql_init(3)\f[R] and connected by 20 | \f[B]mysql_real_connect(3)\f[R]. 21 | .SS Notes 22 | .IP \[bu] 2 23 | The function \f[B]mysql_set_server_option(3)\f[R] enables or disables 24 | multi statement support. 25 | .IP \[bu] 2 26 | Multiple result sets can be obtained either by calling a stored 27 | procedure or by executing concatenated statements, 28 | e.g.\ \f[CR]SELECT a FROM t1;SELECT b, c FROM t2\f[R]. 29 | .SS Return value 30 | Returns 1 if more result sets are available, otherwise zero. 31 | .SS See also 32 | .IP \[bu] 2 33 | \f[B]mysql_real_query(3)\f[R] 34 | .IP \[bu] 2 35 | \f[B]mysql_use_result(3)\f[R] 36 | .IP \[bu] 2 37 | \f[B]mysql_store_result(3)\f[R] 38 | .IP \[bu] 2 39 | \f[B]mysql_next_result(3)\f[R] 40 | .IP \[bu] 2 41 | \f[B]mysql_set_server_option(3)\f[R] 42 | -------------------------------------------------------------------------------- /unittest/libmariadb/conc336.c: -------------------------------------------------------------------------------- 1 | #include "my_test.h" 2 | 3 | #define MAX_COUNT 2000 4 | 5 | int main(int argc, char *argv[]) { 6 | 7 | MYSQL *mysql; 8 | int i; 9 | my_bool verify=0; 10 | 11 | if (argc > 1) 12 | get_options(argc, argv); 13 | 14 | get_envvars(); 15 | 16 | if (IS_XPAND()) 17 | SKIP_XPAND; 18 | 19 | if (IS_SKYSQL(hostname)) 20 | return 0; 21 | 22 | SKIP_TRAVIS(); 23 | 24 | if (IS_XPAND()) 25 | SKIP_XPAND; 26 | 27 | diag("hostname: %s", hostname); 28 | 29 | for (i = 0; i < MAX_COUNT; ++i) { 30 | 31 | if (mysql_library_init(-1, NULL, NULL) != 0) { 32 | diag("mysql_library_init failed"); 33 | return 1; 34 | } 35 | 36 | mysql = mysql_init(NULL); 37 | if (!mysql) { 38 | diag("mysql_init failed"); 39 | return 1; 40 | } 41 | 42 | if (force_tls) 43 | mysql_options(mysql, MYSQL_OPT_SSL_ENFORCE, &force_tls); 44 | mysql_optionsv(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &verify); 45 | 46 | if (!mysql_real_connect(mysql, hostname, username, password, schema, port, socketname, 0)) { 47 | diag("mysql_real_connect failed: %s", mysql_error(mysql)); 48 | return 1; 49 | } 50 | 51 | if (mysql_query(mysql, "SELECT NULL LIMIT 0") != 0) { 52 | diag("mysql_query failed: %s", mysql_error(mysql)); 53 | return 1; 54 | } 55 | 56 | mysql_close(mysql); 57 | mysql_library_end(); 58 | 59 | } 60 | 61 | return 0; 62 | 63 | } 64 | -------------------------------------------------------------------------------- /cmake/COPYING-CMAKE-SCRIPTS: -------------------------------------------------------------------------------- 1 | Redistribution and use in source and binary forms, with or without 2 | modification, are permitted provided that the following conditions 3 | are met: 4 | 5 | 1. Redistributions of source code must retain the copyright 6 | notice, this list of conditions and the following disclaimer. 7 | 2. Redistributions in binary form must reproduce the copyright 8 | notice, this list of conditions and the following disclaimer in the 9 | documentation and/or other materials provided with the distribution. 10 | 3. The name of the author may not be used to endorse or promote products 11 | derived from this software without specific prior written permission. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 14 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 15 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16 | IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 17 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 18 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_update_many_named.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_update_many_named" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_update_many_named \- Update, insert or delete values in a 6 | dynamic column 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | \f[B]enum\f[R] enum_dyncol_func_result 13 | mariadb_dyncol_update_many_named(DYNAMIC_COLUMN *str, 14 | uint column_count, 15 | MYSQL_LEX_STRING *column_keys, 16 | DYNAMIC_COLUMN_VALUE *values) 17 | .EE 18 | .SS Description 19 | Add, delete or update columns in a dynamic column. 20 | .SS Parameter 21 | .IP \[bu] 2 22 | \f[CR]*str\f[R] \- A pointer to a dynamic column structure 23 | .IP \[bu] 2 24 | \f[CR]column_count\f[R] \- number of columns 25 | .IP \[bu] 2 26 | \f[CR]*column_keys\f[R] \- an array of column keys 27 | .IP \[bu] 2 28 | \f[CR]*values\f[R] \- an array of values 29 | .SS Return value 30 | Returns \f[CR]ER_DYNCOL_OK\f[R] on success, otherwise error. 31 | .SS Notes 32 | .IP \[bu] 2 33 | To delete a column, update its value to a \[lq]non\-value\[rq] of type 34 | \f[CR]DYN_COL_NULL\f[R] 35 | .SS See also 36 | .IP \[bu] 2 37 | mariadb_dyncol_create_many_named 38 | .IP \[bu] 2 39 | mariadb_dyncol_update_many_num 40 | .IP \[bu] 2 41 | Dynamic Column Error Codes 42 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_update_many_num.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_update_many_num" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_update_many_num \- Update, insert or delete values in a 6 | dynamic column using numeric keys 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | \f[B]enum\f[R] enum_dyncol_func_result 13 | mariadb_dyncol_update_many_num(DYNAMIC_COLUMN *str, 14 | uint column_count, 15 | uint *column_keys, 16 | DYNAMIC_COLUMN_VALUE *values) 17 | .EE 18 | .SS Description 19 | Add, delete or update columns in a dynamic column with a numeric key. 20 | .SS Parameter 21 | .IP \[bu] 2 22 | \f[CR]*str\f[R] \- A pointer to a dynamic column structure 23 | .IP \[bu] 2 24 | \f[CR]column_count\f[R] \- number of columns 25 | .IP \[bu] 2 26 | \f[CR]*column_keys\f[R] \- an array of column keys 27 | .IP \[bu] 2 28 | \f[CR]*values\f[R] \- an array of values 29 | .SS Return value 30 | Returns \f[CR]ER_DYNCOL_OK\f[R] on success, otherwise error. 31 | .SS Notes 32 | .IP \[bu] 2 33 | To delete a column, update its value to a \[lq]non\-value\[rq] of type 34 | \f[CR]DYN_COL_NULL\f[R] 35 | .SS See also 36 | .IP \[bu] 2 37 | mariadb_dyncol_create_many_num 38 | .IP \[bu] 2 39 | mariadb_dyncol_update_many_named 40 | .IP \[bu] 2 41 | Dynamic Column Error Codes 42 | -------------------------------------------------------------------------------- /man/mysql_real_query.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_real_query" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_real_query \- execute a statement (binary safe) 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | int mysql_real_query(MYSQL * mysql, 12 | const char * query, 13 | unsigned long length); 14 | .EE 15 | .SS Description 16 | mysql_real_query() is the binary safe function for performing a 17 | statement on the database server. 18 | .SS Parameter 19 | .IP \[bu] 2 20 | \f[CR]mysql\f[R] \- a mysql handle, which was previously allocated by 21 | \f[B]mysql_init(3)\f[R] and connected by 22 | \f[B]mysql_real_connect(3)\f[R]. 23 | .IP \[bu] 2 24 | \f[CR]query\f[R] \- a string containing the statement to be performed. 25 | .IP \[bu] 2 26 | \f[CR]length\f[R] \- length of the string. 27 | .SS Notes 28 | .IP \[bu] 2 29 | Contrary to the \f[B]mysql_query(3)\f[R] function, mysql_real_query is 30 | binary safe. 31 | .IP \[bu] 2 32 | To determine if mysql_real_query returns a result set use the 33 | \f[B]mysql_num_fields(3)\f[R] function. 34 | .SS Return value 35 | Returns zero on success, otherwise non zero. 36 | .SS See also 37 | .IP \[bu] 2 38 | \f[B]mysql_query(3)\f[R] 39 | .IP \[bu] 2 40 | \f[B]mysql_num_fields(3)\f[R] 41 | .IP \[bu] 2 42 | \f[B]mysql_use_result(3)\f[R] 43 | .IP \[bu] 2 44 | \f[B]mysql_store_result(3)\f[R] 45 | -------------------------------------------------------------------------------- /cmake/symlink.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2013-2016 MariaDB Corporation AB 3 | # 4 | # Redistribution and use is allowed according to the terms of the New 5 | # BSD license. 6 | # For details see the COPYING-CMAKE-SCRIPTS file. 7 | # 8 | MACRO(create_symlink symlink_name target install_path) 9 | # According to cmake documentation symlinks work on unix systems only 10 | IF(UNIX) 11 | # Get target components 12 | ADD_CUSTOM_COMMAND( 13 | OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${symlink_name} 14 | COMMAND ${CMAKE_COMMAND} ARGS -E remove -f ${symlink_name} 15 | COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink $ ${symlink_name} 16 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 17 | DEPENDS ${target} 18 | ) 19 | 20 | ADD_CUSTOM_TARGET(SYM_${symlink_name} 21 | ALL 22 | DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${symlink_name}) 23 | SET_TARGET_PROPERTIES(SYM_${symlink_name} PROPERTIES CLEAN_DIRECT_OUTPUT 1) 24 | 25 | IF(CMAKE_GENERATOR MATCHES "Xcode") 26 | # For Xcode, replace project config with install config 27 | STRING(REPLACE "${CMAKE_CFG_INTDIR}" 28 | "\${CMAKE_INSTALL_CONFIG_NAME}" output ${CMAKE_CURRENT_BINARY_DIR}/${symlink_name}) 29 | ENDIF() 30 | 31 | # presumably this will be used for libmysql*.so symlinks 32 | INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${symlink_name} DESTINATION ${install_path} 33 | COMPONENT Development) 34 | ENDIF() 35 | ENDMACRO() 36 | -------------------------------------------------------------------------------- /man/mysql_fetch_row.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_fetch_row" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_fetch_row \- fetches row of data from result set 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | MYSQL_ROW mysql_fetch_row(MYSQL_RES * result); 12 | .EE 13 | .SS Description 14 | Fetches one row of data from the result set and returns it as an array 15 | of char pointers (\f[CR]MYSQL_ROW\f[R]), where each column is stored in 16 | an offset starting from 0 (zero). 17 | Each subsequent call to this function will return the next row within 18 | the result set, or NULL if there are no more rows. 19 | .SS Parameter 20 | .IP \[bu] 2 21 | \f[CR]result\f[R] \- a result set identifier returned by 22 | \f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R]. 23 | .SS Notes 24 | .IP \[bu] 2 25 | If a column contains a \f[CR]NULL\f[R] value the corresponding char 26 | pointer will be set to \f[CR]NULL\f[R]. 27 | .IP \[bu] 2 28 | Memory associated to \f[CR]MYSQL_ROW\f[R] will be freed when calling 29 | \f[B]mysql_free_result(3)\f[R] function. 30 | .SS Return value 31 | A \f[CR]MYSQL_ROW\f[R] structure (array of character pointers) 32 | representing the data of the current row. 33 | If there are no more rows available \f[CR]NULL\f[R]will be returned. 34 | .SS See also 35 | .IP \[bu] 2 36 | \f[B]mysql_use_result(3)\f[R] 37 | .IP \[bu] 2 38 | \f[B]mysql_store_result(3)\f[R] 39 | -------------------------------------------------------------------------------- /man/mysql_kill.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_kill" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_kill \- Kills a connection 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | int mysql_kill(MYSQL * mysql, 12 | unsigned long); 13 | .EE 14 | .SS Description 15 | This function is used to ask the server to kill a MariaDB thread 16 | specified by the processid parameter. 17 | This value must be retrieved by [show\-processlist()](SHOW 18 | PROCESSLIST]]. 19 | If trying to kill the own connection \f[B]mysql_thread_id(3)\f[R] should 20 | be used. 21 | .SS Parameter 22 | .IP \[bu] 2 23 | \f[CR]mysql\f[R] \- a connection identifier, which was previously 24 | allocated by \f[B]mysql_init(3)\f[R] and connected by 25 | \f[B]mysql_real_connect(3)\f[R]. 26 | Returns 0 on success, otherwise nonzero. 27 | .IP \[bu] 2 28 | \f[CR]long\f[R] \- process id 29 | .SS Notes 30 | .IP \[bu] 2 31 | To stop a running command without killing the connection use 32 | \f[CR]KILL QUERY\f[R]. 33 | .IP \[bu] 2 34 | The \f[CR]mysql_kill()\f[R] function only kills a connection, it 35 | doesn\[cq]t free any memory \- this must be done explicitly by calling 36 | \f[B]mysql_close(3)\f[R]. 37 | .SS Return value 38 | Returns zero on success, non zero on error. 39 | .SS See also 40 | .IP \[bu] 2 41 | \f[B]mysql_thread_id(3)\f[R] 42 | .IP \[bu] 2 43 | \f[B]mysql_close(3)\f[R] 44 | .IP \[bu] 2 45 | \f[B]mariadb_cancel(3)\f[R] 46 | -------------------------------------------------------------------------------- /man/mysql_fetch_field.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_fetch_field" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_fetch_field \- Returns the definition of one column of a result 6 | set 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | MYSQL_FIELD * mysql_fetch_field(MYSQL_RES * result); 13 | .EE 14 | .SS Description 15 | Returns the definition of one column of a result set as a pointer to a 16 | MYSQL_FIELD structure. 17 | Call this function repeatedly to retrieve information about all columns 18 | in the result set. 19 | .SS Parameters 20 | .IP \[bu] 2 21 | \f[CR]result\f[R] \- a result set identifier returned by 22 | \f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R]. 23 | .SS Notes 24 | .IP \[bu] 2 25 | The field order will be reset if you execute a new SELECT query. 26 | .IP \[bu] 2 27 | In case only information for a specific field is required the field can 28 | be selected by using the \f[B]mysql_field_seek(3)\f[R] function or 29 | obtained by \f[B]mysql_fetch_field_direct(3)\f[R] function. 30 | .SS Return value 31 | a pointer of a \f[CR]MYSQL_FIELD\f[R] structure, or NULL if there are no 32 | more fields. 33 | .SS See also 34 | .IP \[bu] 2 35 | \f[B]mysql_field_seek(3)\f[R] 36 | .IP \[bu] 2 37 | \f[B]mysql_field_tell(3)\f[R] 38 | .IP \[bu] 2 39 | \f[B]mysql_fetch_field_direct(3)\f[R] 40 | .IP \[bu] 2 41 | \f[B]mysql_store_result(3)\f[R] 42 | .IP \[bu] 2 43 | \f[B]mysql_use_result(3)\f[R] 44 | -------------------------------------------------------------------------------- /man/mysql_stmt_fetch.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_fetch" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_fetch \- Fetches result set row from a prepared statement 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | int mysql_stmt_fetch(MYSQL_STMT * stmt); 12 | .EE 13 | .SS Description 14 | Fetch the result from a prepared statement into the buffer bound by 15 | [mysql_stmt_bind_result()}(mysql_stmt_bind_result). 16 | .SS Parameter 17 | .IP \[bu] 2 18 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 19 | \f[B]mysql_stmt_init(3)\f[R]. 20 | .SS Return value 21 | Returns \f[CR]0\f[R] for success, \f[CR]MYSQL_NO_DATA\f[R] if the end of 22 | the result set has been reached, or \f[CR]MYSQL_DATA_TRUNCATION\f[R] if 23 | one or more values are truncated. 24 | .SS Notes 25 | .IP \[bu] 2 26 | Note that all columns must be bound by the application before calling 27 | mysql_stmt_fetch(). 28 | .IP \[bu] 2 29 | Data are transferred unbuffered without calling 30 | \f[B]mysql_stmt_store_result(3)\f[R] which can decrease performance (but 31 | reduces memory cost). 32 | .IP \[bu] 2 33 | Truncation reporting must be enabled by function 34 | \f[B]mysql_optionsv(3)\f[R] with option 35 | \f[CR]MYSQL_REPORT_DATA_TRUNCATION\f[R] 36 | .SS See Also 37 | .IP \[bu] 2 38 | \f[B]mysql_stmt_prepare(3)\f[R] 39 | .IP \[bu] 2 40 | \f[B]mysql_stmt_bind_result(3)\f[R] 41 | .IP \[bu] 2 42 | \f[B]mysql_stmt_execute(3)\f[R] 43 | -------------------------------------------------------------------------------- /man/mysql_stmt_affected_rows.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_affected_rows" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_affected_rows \- Returns the number of affected rows from 6 | previous executed prepared statement 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | my_ulonglong mysql_stmt_affected_rows(MYSQL_STMT * stmt); 13 | .EE 14 | .SS Description 15 | Returns the number of affected rows by the last prepared statement 16 | associated with mysql, if the operation was an \[lq]upsert\[rq] (INSERT, 17 | UPDATE, DELETE or REPLACE) statement, or \-1 if the last prepared 18 | statement failed. 19 | .SS Parameter 20 | .IP \[bu] 2 21 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 22 | [mysql_stmt_init()](mysql_stmt_init().]] 23 | .SS Notes 24 | .IP \[bu] 2 25 | When using \f[CR]UPDATE\f[R], MariaDB will not update columns where the 26 | new value is the same as the old value. 27 | This creates the possibility that \f[CR]mysql_stmt_affected_rows()\f[R] 28 | may not actually equal the number of rows matched, only the number of 29 | rows that were literally affected by the query. 30 | .IP \[bu] 2 31 | The \f[CR]REPLACE\f[R] statement first deletes the record with the same 32 | primary key and then inserts the new record. 33 | This function returns the number of deleted records in addition to the 34 | number of inserted records. 35 | .SS See Also 36 | .IP \[bu] 2 37 | \f[B]mysql_stmt_insert_id(3)\f[R] 38 | -------------------------------------------------------------------------------- /plugins/auth/ref10/fe_add.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = f + g 5 | Can overlap h with f or g. 6 | 7 | Preconditions: 8 | |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 9 | |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 10 | 11 | Postconditions: 12 | |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. 13 | */ 14 | 15 | void fe_add(fe h,const fe f,const fe g) 16 | { 17 | crypto_int32 f0 = f[0]; 18 | crypto_int32 f1 = f[1]; 19 | crypto_int32 f2 = f[2]; 20 | crypto_int32 f3 = f[3]; 21 | crypto_int32 f4 = f[4]; 22 | crypto_int32 f5 = f[5]; 23 | crypto_int32 f6 = f[6]; 24 | crypto_int32 f7 = f[7]; 25 | crypto_int32 f8 = f[8]; 26 | crypto_int32 f9 = f[9]; 27 | crypto_int32 g0 = g[0]; 28 | crypto_int32 g1 = g[1]; 29 | crypto_int32 g2 = g[2]; 30 | crypto_int32 g3 = g[3]; 31 | crypto_int32 g4 = g[4]; 32 | crypto_int32 g5 = g[5]; 33 | crypto_int32 g6 = g[6]; 34 | crypto_int32 g7 = g[7]; 35 | crypto_int32 g8 = g[8]; 36 | crypto_int32 g9 = g[9]; 37 | crypto_int32 h0 = f0 + g0; 38 | crypto_int32 h1 = f1 + g1; 39 | crypto_int32 h2 = f2 + g2; 40 | crypto_int32 h3 = f3 + g3; 41 | crypto_int32 h4 = f4 + g4; 42 | crypto_int32 h5 = f5 + g5; 43 | crypto_int32 h6 = f6 + g6; 44 | crypto_int32 h7 = f7 + g7; 45 | crypto_int32 h8 = f8 + g8; 46 | crypto_int32 h9 = f9 + g9; 47 | h[0] = h0; 48 | h[1] = h1; 49 | h[2] = h2; 50 | h[3] = h3; 51 | h[4] = h4; 52 | h[5] = h5; 53 | h[6] = h6; 54 | h[7] = h7; 55 | h[8] = h8; 56 | h[9] = h9; 57 | } 58 | -------------------------------------------------------------------------------- /plugins/auth/ref10/fe_sub.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | h = f - g 5 | Can overlap h with f or g. 6 | 7 | Preconditions: 8 | |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 9 | |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. 10 | 11 | Postconditions: 12 | |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. 13 | */ 14 | 15 | void fe_sub(fe h,const fe f,const fe g) 16 | { 17 | crypto_int32 f0 = f[0]; 18 | crypto_int32 f1 = f[1]; 19 | crypto_int32 f2 = f[2]; 20 | crypto_int32 f3 = f[3]; 21 | crypto_int32 f4 = f[4]; 22 | crypto_int32 f5 = f[5]; 23 | crypto_int32 f6 = f[6]; 24 | crypto_int32 f7 = f[7]; 25 | crypto_int32 f8 = f[8]; 26 | crypto_int32 f9 = f[9]; 27 | crypto_int32 g0 = g[0]; 28 | crypto_int32 g1 = g[1]; 29 | crypto_int32 g2 = g[2]; 30 | crypto_int32 g3 = g[3]; 31 | crypto_int32 g4 = g[4]; 32 | crypto_int32 g5 = g[5]; 33 | crypto_int32 g6 = g[6]; 34 | crypto_int32 g7 = g[7]; 35 | crypto_int32 g8 = g[8]; 36 | crypto_int32 g9 = g[9]; 37 | crypto_int32 h0 = f0 - g0; 38 | crypto_int32 h1 = f1 - g1; 39 | crypto_int32 h2 = f2 - g2; 40 | crypto_int32 h3 = f3 - g3; 41 | crypto_int32 h4 = f4 - g4; 42 | crypto_int32 h5 = f5 - g5; 43 | crypto_int32 h6 = f6 - g6; 44 | crypto_int32 h7 = f7 - g7; 45 | crypto_int32 h8 = f8 - g8; 46 | crypto_int32 h9 = f9 - g9; 47 | h[0] = h0; 48 | h[1] = h1; 49 | h[2] = h2; 50 | h[3] = h3; 51 | h[4] = h4; 52 | h[5] = h5; 53 | h[6] = h6; 54 | h[7] = h7; 55 | h[8] = h8; 56 | h[9] = h9; 57 | } 58 | -------------------------------------------------------------------------------- /include/ma_pthread.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB 2 | 2016 MariaDB Corporation AB 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Library General Public 6 | License as published by the Free Software Foundation; either 7 | version 2 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public 15 | License along with this library; if not, write to the Free 16 | Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | MA 02111-1301, USA */ 18 | 19 | /* Defines to make different thread packages compatible */ 20 | 21 | #ifndef _my_pthread_h 22 | #define _my_pthread_h 23 | 24 | #if defined(_WIN32) 25 | #include 26 | typedef CRITICAL_SECTION pthread_mutex_t; 27 | #define pthread_mutex_init(A,B) InitializeCriticalSection(A) 28 | #define pthread_mutex_lock(A) (EnterCriticalSection(A),0) 29 | #define pthread_mutex_unlock(A) LeaveCriticalSection(A) 30 | #define pthread_mutex_destroy(A) DeleteCriticalSection(A) 31 | #define pthread_self() GetCurrentThreadId() 32 | #endif /* defined(_WIN32) */ 33 | 34 | #endif /* _my_ptread_h */ 35 | -------------------------------------------------------------------------------- /man/mysql_use_result.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_use_result" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_use_result \- returns an unbuffered result set 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | MYSQL_RES * mysql_use_result(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | Used to initiate the retrieval of a result set from the last query 15 | executed using the mysql_real_query() function on the database 16 | connection. 17 | Either this or the \f[B]mysql_store_result(3)\f[R] function must be 18 | called before the results of a query can be retrieved, and one or the 19 | other must be called to prevent the next query on that database 20 | connection from failing. 21 | .SS Parameters 22 | .IP \[bu] 2 23 | \f[CR]mysql\f[R] is a connection identifier, which was previously 24 | allocated by \f[B]mysql_init(3)\f[R] and connected by 25 | \f[B]mysql_real_connect(3)\f[R]. 26 | .SS Notes 27 | The mysql_use_result() function does not transfer the entire result set. 28 | Hence several functions like \f[B]mysql_num_rows(3)\f[R] or 29 | \f[B]mysql_data_seek(3)\f[R] cannot be used. 30 | mysql_use_result() will block the current connection until all result 31 | sets are retrieved or result set was released by 32 | \f[B]mysql_free_result(3)\f[R]. 33 | .SS Return value 34 | Returns an unbuffered result set or \f[CR]NULL\f[R] if an error 35 | occurred. 36 | .SS See also 37 | .IP \[bu] 2 38 | \f[B]mysql_store_result(3)\f[R] 39 | .IP \[bu] 2 40 | \f[B]mysql_free_result(3)\f[R] 41 | -------------------------------------------------------------------------------- /external/zlib/adler32_simd.h: -------------------------------------------------------------------------------- 1 | /* adler32_simd.h 2 | * 3 | * (C) 1995-2013 Jean-loup Gailly and Mark Adler 4 | * 5 | * This software is provided 'as-is', without any express or implied 6 | * warranty. In no event will the authors be held liable for any damages 7 | * arising from the use of this software. 8 | * 9 | * Permission is granted to anyone to use this software for any purpose, 10 | * including commercial applications, and to alter it and redistribute it 11 | * freely, subject to the following restrictions: 12 | * 13 | * 1. The origin of this software must not be misrepresented; you must not 14 | * claim that you wrote the original software. If you use this software 15 | * in a product, an acknowledgment in the product documentation would be 16 | * appreciated but is not required. 17 | * 2. Altered source versions must be plainly marked as such, and must not be 18 | * misrepresented as being the original software. 19 | * 3. This notice may not be removed or altered from any source distribution. 20 | * 21 | * Jean-loup Gailly Mark Adler 22 | * jloup@gzip.org madler@alumni.caltech.edu 23 | * 24 | * Copyright 2017 The Chromium Authors. All rights reserved. 25 | * Use of this source code is governed by a BSD-style license that can be 26 | * found in the Chromium source repository LICENSE file. 27 | */ 28 | 29 | #include 30 | 31 | #include "zconf.h" 32 | #include "zutil.h" 33 | 34 | uint32_t ZLIB_INTERNAL adler32_simd_( 35 | uint32_t adler, 36 | const unsigned char *buf, 37 | unsigned long len); 38 | -------------------------------------------------------------------------------- /plugins/auth/gssapi_errmsg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015, Shuang Qiu, Robbie Harwood, 2 | Vladislav Vaintroub & MariaDB Corporation 3 | 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, 10 | this list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | extern void gssapi_errmsg(OM_uint32 major, OM_uint32 minor, char *buf, size_t size); 30 | -------------------------------------------------------------------------------- /man/mysql_affected_rows.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_affected_rows" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_affected_rows \- returns the number of rows affected by the last 6 | operation 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | my_ulonglong mysql_affected_rows(MYSQL * mysql); 13 | .EE 14 | .SS Description 15 | Returns the number of affected rows by the last operation associated 16 | with mysql, if the operation was an \[lq]upsert\[rq] (\f[CR]INSERT\f[R], 17 | \f[CR]UPDATE\f[R], \f[CR]DELETE\f[R] or \f[CR]REPLACE\f[R]) statement, 18 | or \-1 if the last operation failed. 19 | .SS Parameters: 20 | \f[CR]mysql\f[R] is a connection identifier, which was previously 21 | allocated by \f[B]mysql_init(3)\f[R] and connected by 22 | \f[B]mysql_real_connect(3)\f[R]. 23 | .SS Notes: 24 | .IP \[bu] 2 25 | When using \f[CR]UPDATE\f[R], MariaDB will not update columns where the 26 | new value is the same as the old value. 27 | This creates the possibility that mysql_affected_rows may not actually 28 | equal the number of rows matched, only the number of rows that were 29 | literally affected by the query. 30 | .IP \[bu] 2 31 | The \f[CR]REPLACE\f[R] statement first deletes the record with the same 32 | primary key and then inserts the new record. 33 | This function returns the number of deleted records in addition to the 34 | number of inserted records. 35 | .SH Return value 36 | Returns the number of affected rows or \-1 on error. 37 | .SS See also 38 | .IP \[bu] 2 39 | \f[B]mysql_num_rows(3)\f[R] 40 | -------------------------------------------------------------------------------- /plugins/auth/ref10/fe_cmov.c: -------------------------------------------------------------------------------- 1 | #include "fe.h" 2 | 3 | /* 4 | Replace (f,g) with (g,g) if b == 1; 5 | replace (f,g) with (f,g) if b == 0. 6 | 7 | Preconditions: b in {0,1}. 8 | */ 9 | 10 | void fe_cmov(fe f,const fe g,unsigned int b) 11 | { 12 | crypto_int32 f0 = f[0]; 13 | crypto_int32 f1 = f[1]; 14 | crypto_int32 f2 = f[2]; 15 | crypto_int32 f3 = f[3]; 16 | crypto_int32 f4 = f[4]; 17 | crypto_int32 f5 = f[5]; 18 | crypto_int32 f6 = f[6]; 19 | crypto_int32 f7 = f[7]; 20 | crypto_int32 f8 = f[8]; 21 | crypto_int32 f9 = f[9]; 22 | crypto_int32 g0 = g[0]; 23 | crypto_int32 g1 = g[1]; 24 | crypto_int32 g2 = g[2]; 25 | crypto_int32 g3 = g[3]; 26 | crypto_int32 g4 = g[4]; 27 | crypto_int32 g5 = g[5]; 28 | crypto_int32 g6 = g[6]; 29 | crypto_int32 g7 = g[7]; 30 | crypto_int32 g8 = g[8]; 31 | crypto_int32 g9 = g[9]; 32 | crypto_int32 x0 = f0 ^ g0; 33 | crypto_int32 x1 = f1 ^ g1; 34 | crypto_int32 x2 = f2 ^ g2; 35 | crypto_int32 x3 = f3 ^ g3; 36 | crypto_int32 x4 = f4 ^ g4; 37 | crypto_int32 x5 = f5 ^ g5; 38 | crypto_int32 x6 = f6 ^ g6; 39 | crypto_int32 x7 = f7 ^ g7; 40 | crypto_int32 x8 = f8 ^ g8; 41 | crypto_int32 x9 = f9 ^ g9; 42 | b = -b; 43 | x0 &= b; 44 | x1 &= b; 45 | x2 &= b; 46 | x3 &= b; 47 | x4 &= b; 48 | x5 &= b; 49 | x6 &= b; 50 | x7 &= b; 51 | x8 &= b; 52 | x9 &= b; 53 | f[0] = f0 ^ x0; 54 | f[1] = f1 ^ x1; 55 | f[2] = f2 ^ x2; 56 | f[3] = f3 ^ x3; 57 | f[4] = f4 ^ x4; 58 | f[5] = f5 ^ x5; 59 | f[6] = f6 ^ x6; 60 | f[7] = f7 ^ x7; 61 | f[8] = f8 ^ x8; 62 | f[9] = f9 ^ x9; 63 | } 64 | -------------------------------------------------------------------------------- /man/mysql_get_ssl_cipher.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_get_ssl_cipher" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_get_ssl_cipher \- returns the cipher suite in use 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | const char *mysql_get_ssl_cipher(MYSQL *mysql) 12 | .EE 13 | .SS Description 14 | Returns the name of the currently used cipher suite of the secure 15 | connection, or NULL for non TLS connections. 16 | .SS Parameter 17 | .IP \[bu] 2 18 | \f[CR]mysql\f[R] \- a connection identifier, which was previously 19 | allocated by \f[B]mysql_init(3)\f[R] and connected by 20 | \f[B]mysql_real_connect(3)\f[R]. 21 | .SS Notes 22 | .IP \[bu] 2 23 | For using \f[CR]mysql_get_ssl_cipher()\f[R] MariaDB Connector/C must be 24 | built with TLS/SSL support, otherwise the function will return NULL. 25 | .IP \[bu] 2 26 | \[ga]mysql_get_ssl_cipher()\[cq] can be used to determine if the client 27 | server connection is secure. 28 | .IP \[bu] 2 29 | Depending on the TLS library in use (OpenSSL, GnuTLS or Windows 30 | Schannel) the name of the cipher suites may differ. 31 | For example the cipher suite 0x002F 32 | (\f[CR]TLS_RSA_WITH_AES_128_CBC_SHA\f[R]) has different names: 33 | \f[CR]AES128\-SHA\f[R] for OpenSSL and Schannel and 34 | \f[CR]TLS_RSA_AES_128_CBC_SHA1\f[R] for GnuTLS. 35 | .SS Return value 36 | Returns a zero terminated string containing the cipher suite used for a 37 | secure connection, or \f[CR]NULL\f[R] if connection doesn\[cq]t use 38 | TLS/SSL. 39 | .SS See also 40 | .IP \[bu] 2 41 | \f[B]mysql_ssl_set(3)\f[R] 42 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_create_many_num.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_create_many_num" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_create_many_num \- Creates a dynamic column with numeric 6 | keys 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | \f[B]enum\f[R] enum_dyncol_func_result 13 | mariadb_dyncol_create_many_num(DYNAMIC_COLUMN *str, 14 | uint column_count, 15 | uint *column_numbers, 16 | DYNAMIC_COLUMN_VALUE *values, 17 | my_bool new_string); 18 | .EE 19 | .SS Description 20 | Create a dynamic column from arrays of values and numbérs 21 | .SS Parameter 22 | .IP \[bu] 2 23 | \f[CR]*str\f[R] \- A pointer to a dynamic column structure 24 | .IP \[bu] 2 25 | \f[CR]column_count\f[R] \- number of columns 26 | .IP \[bu] 2 27 | \f[CR]*column_numbers\f[R] \- an array of column numbers 28 | .IP \[bu] 2 29 | \f[CR]*values\f[R] \- an array of values 30 | .IP \[bu] 2 31 | \f[CR]new_string\f[R] \- if set \f[CR]str\f[R] will be reinitialized 32 | (not freed) before usage 33 | .SS Return value 34 | Returns \f[CR]ER_DYNCOL_OK\f[R] on success, otherwise error. 35 | .SS Notes 36 | .IP \[bu] 2 37 | To delete, update or insert new columns into an existing dynamic column 38 | use mariadb_dyncol_update_many_num function 39 | .SS See also 40 | .IP \[bu] 2 41 | mariadb_dyncol_create_many_named 42 | .IP \[bu] 2 43 | mariadb_dyncol_update_many_num 44 | .IP \[bu] 2 45 | Dynamic Column Error Codes 46 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: 3.0.8;{build} 2 | branches: 3 | only: 4 | - 3.1 5 | environment: 6 | matrix: 7 | - DB: '10.2.38' 8 | APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 9 | CMAKE_PARAM: 'Visual Studio 15 2017 Win64' 10 | - DB: '10.3.29' 11 | APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 12 | CMAKE_PARAM: 'Visual Studio 15 2017 Win64' 13 | - DB: '10.4.19' 14 | APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 15 | CMAKE_PARAM: 'Visual Studio 15 2017 Win64' 16 | - DB: '10.5.10' 17 | APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 18 | CMAKE_PARAM: 'Visual Studio 15 2017 Win64' 19 | 20 | 21 | configuration: RelWithDebInfo 22 | clone_folder: c:\projects\mariadb-connector-c 23 | before_build: 24 | - cmd: appveyor-download.bat 25 | - cmd: msiexec /i server.msi INSTALLDIR=c:\projects\server SERVICENAME=mariadb ALLOWREMOTEROOTACCESS=true /qn 26 | - cmd: "\"c:\\projects\\server\\bin\\mysql.exe\" -e \"create database testc\" --user=root" 27 | - cmd: set MARIADB_CC_TEST=1 28 | - cmd: set MYSQL_TEST_USER=root 29 | - cmd: set MYSQL_TEST_HOST=127.0.0.1 30 | - cmd: set MYSQL_TEST_PASSWD= 31 | - cmd: set MYSQL_TEST_PORT=3306 32 | - cmd: set MYSQL_TEST_DB=testc 33 | - cmd: cmake -G "%CMAKE_PARAM%" -DCMAKE_BUILD_TYPE=RelWithDebInfo 34 | build: 35 | project: mariadb-connector-c.sln 36 | parallel: true 37 | verbosity: minimal 38 | test_script: 39 | - cmd: cd c:\projects\mariadb-connector-c\unittest\libmariadb 40 | - cmd: set MARIADB_PLUGIN_DIR=cd c:\projects\mariadb-connector-c\plugins\lib\RelWithDebInfo 41 | - cmd: ctest -V 42 | -------------------------------------------------------------------------------- /external/zlib/watcom/watcom_l.mak: -------------------------------------------------------------------------------- 1 | # Makefile for zlib 2 | # OpenWatcom large model 3 | # Last updated: 28-Dec-2005 4 | 5 | # To use, do "wmake -f watcom_l.mak" 6 | 7 | C_SOURCE = adler32.c compress.c crc32.c deflate.c & 8 | gzclose.c gzlib.c gzread.c gzwrite.c & 9 | infback.c inffast.c inflate.c inftrees.c & 10 | trees.c uncompr.c zutil.c 11 | 12 | OBJS = adler32.obj compress.obj crc32.obj deflate.obj & 13 | gzclose.obj gzlib.obj gzread.obj gzwrite.obj & 14 | infback.obj inffast.obj inflate.obj inftrees.obj & 15 | trees.obj uncompr.obj zutil.obj 16 | 17 | CC = wcc 18 | LINKER = wcl 19 | CFLAGS = -zq -ml -s -bt=dos -oilrtfm -fr=nul -wx 20 | ZLIB_LIB = zlib_l.lib 21 | 22 | .C.OBJ: 23 | $(CC) $(CFLAGS) $[@ 24 | 25 | all: $(ZLIB_LIB) example.exe minigzip.exe 26 | 27 | $(ZLIB_LIB): $(OBJS) 28 | wlib -b -c $(ZLIB_LIB) -+adler32.obj -+compress.obj -+crc32.obj 29 | wlib -b -c $(ZLIB_LIB) -+gzclose.obj -+gzlib.obj -+gzread.obj -+gzwrite.obj 30 | wlib -b -c $(ZLIB_LIB) -+deflate.obj -+infback.obj 31 | wlib -b -c $(ZLIB_LIB) -+inffast.obj -+inflate.obj -+inftrees.obj 32 | wlib -b -c $(ZLIB_LIB) -+trees.obj -+uncompr.obj -+zutil.obj 33 | 34 | example.exe: $(ZLIB_LIB) example.obj 35 | $(LINKER) -fe=example.exe example.obj $(ZLIB_LIB) 36 | 37 | minigzip.exe: $(ZLIB_LIB) minigzip.obj 38 | $(LINKER) -fe=minigzip.exe minigzip.obj $(ZLIB_LIB) 39 | 40 | clean: .SYMBOLIC 41 | del *.obj 42 | del $(ZLIB_LIB) 43 | @echo Cleaning done 44 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_create_many_named.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_create_many_named" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_create_many_named \- Creates a dynamic column with named 6 | keys 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | \f[B]enum\f[R] enum_dyncol_func_result 13 | mariadb_dyncol_create_many_named(DYNAMIC_COLUMN *str, 14 | uint column_count, 15 | MYSQL_LEX_STRING *column_keys, 16 | DYNAMIC_COLUMN_VALUE *values, 17 | my_bool new_string); 18 | .EE 19 | .SS Description 20 | Create a dynamic column from arrays of values and names. 21 | .SS Parameter 22 | .IP \[bu] 2 23 | \f[CR]*str\f[R] \- A pointer to a dynamic column structure 24 | .IP \[bu] 2 25 | \f[CR]column_count\f[R] \- number of columns 26 | .IP \[bu] 2 27 | \f[CR]*column_keys\f[R] \- an array of column keys 28 | .IP \[bu] 2 29 | \f[CR]*values\f[R] \- an array of values 30 | .IP \[bu] 2 31 | \f[CR]new_string\f[R] \- if set \f[CR]str\f[R] will be reinitialized 32 | (not freed) before usage 33 | .SS Return value 34 | Returns \f[CR]ER_DYNCOL_OK\f[R] on success, otherwise error. 35 | .SS Notes 36 | .IP \[bu] 2 37 | To delete, update or insert new columns into an existing dynamic column 38 | use mariadb_dyncol_update_many_named function 39 | .SS See also 40 | .IP \[bu] 2 41 | mariadb_dyncol_create_many_num 42 | .IP \[bu] 2 43 | mariadb_dyncol_update_many_named 44 | .IP \[bu] 2 45 | Dynamic Column Error Codes 46 | -------------------------------------------------------------------------------- /man/mysql_reset_connection.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_reset_connection" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_reset_connection \- Resets connection and clears session state 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | int mysql_reset_connection(MYSQL * mysql); 12 | .EE 13 | .SS Description 14 | Resets the current connection and clears session state. 15 | Similar to \f[B]mysql_change_user(3)\f[R] or 16 | \f[B]mariadb_reconnect(3)\f[R], mysql_reset_connection() resets session 17 | status, but without disconnecting, opening, or reauthenticating. 18 | .PP 19 | On client side mysql_reset_connection() * clears pending or unprocessed 20 | result sets * clears status like affected_rows, info or last_insert_id * 21 | invalidates active prepared statements 22 | .PP 23 | On server side mysql_reset_connection() * drops temporary table(s) * 24 | rollbacks active transaction * resets autocommit mode * releases table 25 | locks * initializes session variables (and sets them to the value of 26 | corresponding global variables) * closes active prepared statements * 27 | clears user variables 28 | .SS Parameter 29 | .IP \[bu] 2 30 | \f[CR]mysql\f[R] \- a mysql handle, which was previously allocated by 31 | \f[B]mysql_init(3)\f[R] and connected by 32 | \f[B]mysql_real_connect(3)\f[R]. 33 | .SS Return value 34 | Returns zero on success, non zero if an error occurred. 35 | .SS History 36 | This function was added in MariaDB Connector/C 3.0.0. 37 | .SS See also 38 | .IP \[bu] 2 39 | \f[B]mariadb_cancel(3)\f[R] 40 | .IP \[bu] 2 41 | \f[B]mysql_kill(3)\f[R] 42 | -------------------------------------------------------------------------------- /man/mysql_stmt_bind_param.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_bind_param" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_bind_param \- Binds parameter to a prepared statement 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | my_bool mysql_stmt_bind_param(MYSQL_STMT * stmt, 12 | MYSQL_BIND * bind); 13 | .EE 14 | .SS Description 15 | Binds variables for parameter markers in the prepared statement that was 16 | passed to \f[B]mysql_stmt_prepare(3)\f[R]. 17 | Returns zero on success, non\-zero on failure. 18 | .SS Parameters 19 | .IP \[bu] 2 20 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 21 | \f[B]mysql_stmt_init(3)\f[R]. 22 | .IP \[bu] 2 23 | \f[CR]bind\f[R] \- an array of \f[CR]MYSQL_BIND\f[R] structures. 24 | The size of this array must be equal to the number of parameters. 25 | .SS Notes 26 | .IP \[bu] 2 27 | The number of parameters can be obtained by 28 | \f[B]mysql_stmt_param_count(3)\f[R]. 29 | .IP \[bu] 2 30 | If the number of parameters is unknown, for example when using 31 | \f[B]mariadb_stmt_execute_direct(3)\f[R], the number of parameters have 32 | to be specified with the \f[B]mysql_stmt_attr_set(3)\f[R] function. 33 | .SS See Also 34 | .IP \[bu] 2 35 | \f[B]mariadb_stmt_execute_direct(3)\f[R] 36 | .IP \[bu] 2 37 | \f[B]mysql_stmt_prepare(3)\f[R] 38 | .IP \[bu] 2 39 | \f[B]mysql_stmt_bind_result(3)\f[R] 40 | .IP \[bu] 2 41 | \f[B]mysql_stmt_execute(3)\f[R] 42 | .IP \[bu] 2 43 | \f[B]mysql_stmt_param_count(3)\f[R] 44 | .IP \[bu] 2 45 | \f[B]mysql_stmt_send_long_data(3)\f[R] 46 | -------------------------------------------------------------------------------- /man/mariadb_dyncol_unpack.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mariadb_dyncol_unpack" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mariadb_dyncol_unpack \- extracts keys and values of all columns 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | \f[B]enum\f[R] enum_dyncol_func_result 12 | mariadb_dyncol_unpack(DYNAMIC_COLUMN *str, 13 | uint *column_count, 14 | MYSQL_LEX_STRING **column_keys, 15 | DYNAMIC_COLUMN_VALUE **values); 16 | .EE 17 | .SS Description 18 | The \f[CR]mariadb_dyncol_unpack()\f[R] function extracts all keys and 19 | values of a dynamic column. 20 | .SS Parameter 21 | .IP \[bu] 2 22 | \f[CR]str\f[R] \- Pointer to a \f[CR]DYNAMIC_COLUMN\f[R] structure 23 | .IP \[bu] 2 24 | \f[CR]column count\f[R] \- Pointer to an unsigned integer which will 25 | receive the number of columns 26 | .IP \[bu] 2 27 | \f[CR]column_keys\f[R] \- Pointer of an array of 28 | \f[CR]MYSQL_LEX_STRING\f[R] structures, which will contain the column 29 | keys 30 | .IP \[bu] 2 31 | \f[CR]values\f[R] \- Pointer of an array of 32 | \f[CR]DYNAMIC_COLUMN_VALUE\f[R] structures, which will contain the 33 | values. 34 | .SS Return value 35 | Returns \f[CR]ER_DYNCOL_OK\f[R] on success, otherwise an error. 36 | .SS Notes 37 | .IP \[bu] 2 38 | The \f[CR]column_keys\f[R] and \f[CR]values\f[R] arrays will be 39 | allocated by \f[CR]mariadb_dyncol_unpack()\f[R] and must be freed by 40 | application. 41 | .SS See also 42 | .IP \[bu] 2 43 | \f[B]mariadb_dyncol_get(3)\f[R] 44 | .IP \[bu] 2 45 | \f[B]mariadb_dyncol_list(3)\f[R] 46 | -------------------------------------------------------------------------------- /man/mariadb_rpl_get_optionsv.3: -------------------------------------------------------------------------------- 1 | '\" t 2 | .\" Automatically generated by Pandoc 3.5 3 | .\" 4 | .TH "mariadb_rpl_get_optionsv" "3" "" "Version 3.4" "MariaDB Connector/C" 5 | .SS Name 6 | mariadb_rpl_get_optionsv \- get replication option value 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | int mariadb_rpl_get_optionsv(MARIADB_RPL *rpl, \f[B]enum\f[R] mariadb_rpl_option option, ...) 13 | .EE 14 | .SS Parameter 15 | .IP \[bu] 2 16 | \f[CR]rpl\f[R] \- a replication handle which was previously allocated by 17 | mariadb_rpl_init 18 | .IP \[bu] 2 19 | \f[CR]option\f[R] \- The option to be set, followed by one or more 20 | values 21 | .PP 22 | .TS 23 | tab(@); 24 | lw(23.3n) lw(23.3n) lw(23.3n). 25 | T{ 26 | Option 27 | T}@T{ 28 | Type 29 | T}@T{ 30 | Description 31 | T} 32 | _ 33 | T{ 34 | MARIADB_RPL_FILENAME 35 | T}@T{ 36 | char **, size_t * 37 | T}@T{ 38 | The name and name length of binglog file 39 | T} 40 | T{ 41 | MARIADB_RPL_START 42 | T}@T{ 43 | unsigned long * 44 | T}@T{ 45 | Start position 46 | T} 47 | T{ 48 | MARIADB_RPL_SERVER_ID 49 | T}@T{ 50 | uint32_t * 51 | T}@T{ 52 | Server id 53 | T} 54 | T{ 55 | MARIADB_RPL_FLAGS 56 | T}@T{ 57 | uint32_t * 58 | T}@T{ 59 | Flags 60 | T} 61 | T{ 62 | MARIADB_RPL_SEMI_SYNC 63 | T}@T{ 64 | uint32_t * 65 | T}@T{ 66 | Semi sync replication, 1= ON, 0= OFF. 67 | (This option was added in version 3.3.6). 68 | T} 69 | .TE 70 | .SS Return value 71 | Returns zero on success, non zero on error. 72 | .SS See also 73 | .IP \[bu] 2 74 | \f[B]mariadb_rpl_optionsv(3)\f[R] 75 | .SS History 76 | \f[CR]mariadb_rpl_get_optionsv\f[R] was added in MariaDB Connector/C 77 | 3.1.0 78 | -------------------------------------------------------------------------------- /include/mariadb_version.h.in: -------------------------------------------------------------------------------- 1 | /* Copyright Abandoned 1996, 1999, 2001 MySQL AB 2 | This file is public domain and comes with NO WARRANTY of any kind */ 3 | 4 | /* Version numbers for protocol & mysqld */ 5 | 6 | #ifndef _mariadb_version_h_ 7 | #define _mariadb_version_h_ 8 | 9 | #ifdef _CUSTOMCONFIG_ 10 | #include 11 | #else 12 | #define PROTOCOL_VERSION @PROTOCOL_VERSION@ 13 | #define MARIADB_CLIENT_VERSION_STR "@MARIADB_CLIENT_VERSION@" 14 | #define MARIADB_BASE_VERSION "@MARIADB_BASE_VERSION@" 15 | #define MARIADB_VERSION_ID @MARIADB_VERSION_ID@ 16 | #define MARIADB_PORT @MARIADB_PORT@ 17 | #define MARIADB_UNIX_ADDR "@MARIADB_UNIX_ADDR@" 18 | #ifndef MYSQL_UNIX_ADDR 19 | #define MYSQL_UNIX_ADDR MARIADB_UNIX_ADDR 20 | #endif 21 | #ifndef MYSQL_PORT 22 | #define MYSQL_PORT MARIADB_PORT 23 | #endif 24 | 25 | #define MYSQL_CONFIG_NAME "my" 26 | #define MYSQL_VERSION_ID @MARIADB_VERSION_ID@ 27 | #define MYSQL_SERVER_VERSION "@MARIADB_CLIENT_VERSION@-MariaDB" 28 | 29 | #define MARIADB_PACKAGE_VERSION "@CPACK_PACKAGE_VERSION@" 30 | #define MARIADB_PACKAGE_VERSION_ID @MARIADB_PACKAGE_VERSION_ID@ 31 | #define MARIADB_SYSTEM_TYPE "@CMAKE_SYSTEM_NAME@" 32 | #define MARIADB_MACHINE_TYPE "@CMAKE_SYSTEM_PROCESSOR@" 33 | #define MARIADB_PLUGINDIR "@CMAKE_INSTALL_PREFIX@/@INSTALL_PLUGINDIR@" 34 | 35 | /* mysqld compile time options */ 36 | #ifndef MYSQL_CHARSET 37 | #define MYSQL_CHARSET "@default_charset@" 38 | #endif 39 | #endif 40 | 41 | /* Source information */ 42 | #define CC_SOURCE_REVISION "@CC_SOURCE_REVISION@" 43 | 44 | #endif /* _mariadb_version_h_ */ 45 | -------------------------------------------------------------------------------- /external/zlib/watcom/watcom_f.mak: -------------------------------------------------------------------------------- 1 | # Makefile for zlib 2 | # OpenWatcom flat model 3 | # Last updated: 28-Dec-2005 4 | 5 | # To use, do "wmake -f watcom_f.mak" 6 | 7 | C_SOURCE = adler32.c compress.c crc32.c deflate.c & 8 | gzclose.c gzlib.c gzread.c gzwrite.c & 9 | infback.c inffast.c inflate.c inftrees.c & 10 | trees.c uncompr.c zutil.c 11 | 12 | OBJS = adler32.obj compress.obj crc32.obj deflate.obj & 13 | gzclose.obj gzlib.obj gzread.obj gzwrite.obj & 14 | infback.obj inffast.obj inflate.obj inftrees.obj & 15 | trees.obj uncompr.obj zutil.obj 16 | 17 | CC = wcc386 18 | LINKER = wcl386 19 | CFLAGS = -zq -mf -3r -fp3 -s -bt=dos -oilrtfm -fr=nul -wx 20 | ZLIB_LIB = zlib_f.lib 21 | 22 | .C.OBJ: 23 | $(CC) $(CFLAGS) $[@ 24 | 25 | all: $(ZLIB_LIB) example.exe minigzip.exe 26 | 27 | $(ZLIB_LIB): $(OBJS) 28 | wlib -b -c $(ZLIB_LIB) -+adler32.obj -+compress.obj -+crc32.obj 29 | wlib -b -c $(ZLIB_LIB) -+gzclose.obj -+gzlib.obj -+gzread.obj -+gzwrite.obj 30 | wlib -b -c $(ZLIB_LIB) -+deflate.obj -+infback.obj 31 | wlib -b -c $(ZLIB_LIB) -+inffast.obj -+inflate.obj -+inftrees.obj 32 | wlib -b -c $(ZLIB_LIB) -+trees.obj -+uncompr.obj -+zutil.obj 33 | 34 | example.exe: $(ZLIB_LIB) example.obj 35 | $(LINKER) -ldos32a -fe=example.exe example.obj $(ZLIB_LIB) 36 | 37 | minigzip.exe: $(ZLIB_LIB) minigzip.obj 38 | $(LINKER) -ldos32a -fe=minigzip.exe minigzip.obj $(ZLIB_LIB) 39 | 40 | clean: .SYMBOLIC 41 | del *.obj 42 | del $(ZLIB_LIB) 43 | @echo Cleaning done 44 | -------------------------------------------------------------------------------- /man/mysql_send_query.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_send_query" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_send_query \- sends a SQL statement without waiting for server 6 | response 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | int mysql_send_query(MYSQL * mysql, 13 | const char *query, 14 | unsigned long length); 15 | .EE 16 | .SS Description 17 | Sends a statement to the server, without waiting for the Server OK 18 | packet and/or resultset. 19 | .SS Parameters 20 | .IP \[bu] 2 21 | \f[CR]mysql\f[R] \- a mysql handle, which was previously allocated by 22 | \f[B]mysql_init(3)\f[R] and connected by 23 | \f[B]mysql_real_connect(3)\f[R]. 24 | .IP \[bu] 2 25 | \f[CR]query\f[R] \- SQL statement 26 | .IP \[bu] 2 27 | \f[CR]length\f[R] \- length of the SQL statement 28 | .SS Notes 29 | .IP \[bu] 2 30 | The OK and result set package need to be retrieved by 31 | \f[B]mysql_read_query_result(3)\f[R] function 32 | .IP \[bu] 2 33 | \f[CR]mysql_send_query()\f[R] can be used for semi asynchronous 34 | operation. 35 | While the function itself is blocking, an event driven application can 36 | do other tasks until result set is available. 37 | .SS Example 38 | For an example how to use \[cq]mysql_send_query()\[ga] in an event 39 | driven model, please check Jan Kneschke\[cq]s article \c 40 | .UR https://jan.kneschke.de/projects/mysql/async-mysql-queries-with-c-api/ 41 | \[lq]Async MySQL Queries with C\-API\[rq] 42 | .UE \c 43 | \&. 44 | .SS See also 45 | .IP \[bu] 2 46 | mysql_real_query 47 | .IP \[bu] 2 48 | mysql_read_query_result 49 | -------------------------------------------------------------------------------- /man/mysql_real_escape_string.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_real_escape_string" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_real_escape_string \- escape string by taking into account 6 | character set of connection 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | unsigned long mysql_real_escape_string(MYSQL * mysql, 13 | char * to, 14 | const char * from, 15 | unsigned long); 16 | .EE 17 | .SS Description 18 | This function is used to create a legal SQL string that you can use in 19 | an SQL statement. 20 | The given string is encoded to an escaped SQL string, taking into 21 | account the current character set of the connection. 22 | .SS Parameter 23 | .IP \[bu] 2 24 | \f[CR]mysql\f[R] \- a mysql handle, which was previously allocated by 25 | \f[B]mysql_init(3)\f[R] and connected by 26 | \f[B]mysql_real_connect(3)\f[R]. 27 | .IP \[bu] 2 28 | \f[CR]to\f[R] \- buffer for the encoded string. 29 | The size of this buffer must be length * 2 + 1 bytes: in worst case 30 | every character of the from string needs to be escaped. 31 | Additionally a trailing 0 character will be appended. 32 | .IP \[bu] 2 33 | \f[CR]from\f[R] \- a string which will be encoded by 34 | mysql_real_escape_string(). 35 | .IP \[bu] 2 36 | \f[CR]long\f[R] \- the length of the \f[CR]from\f[R] string. 37 | .SS Return value 38 | Returns the length of the encoded (to) string. 39 | .SS See also 40 | .IP \[bu] 2 41 | \f[B]mysql_escape_string(3)\f[R] 42 | .IP \[bu] 2 43 | \f[B]mysql_hex_string(3)\f[R] 44 | -------------------------------------------------------------------------------- /man/mysql_query.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_query" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_query \- executes a null terminated statement string 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | int mysql_query(MYSQL * mysql, 12 | const char * query); 13 | .EE 14 | .SS Description 15 | Performs a statement pointed to by the null terminate string query 16 | against the database. 17 | Contrary to \f[B]mysql_real_query(3)\f[R], mysql_query() is not binary 18 | safe. 19 | .SS Parameter 20 | .IP \[bu] 2 21 | \f[CR]mysql\f[R] \- a mysql handle, which was previously allocated by 22 | \f[B]mysql_init(3)\f[R] and connected by 23 | \f[B]mysql_real_connect(3)\f[R]. 24 | .IP \[bu] 2 25 | \f[CR]query\f[R] \-a null terminated string containing the statement to 26 | be performed. 27 | .SS Notes 28 | .IP \[bu] 2 29 | For executing multi statements the statements within the null terminated 30 | string statements must be separated by a semicolon. 31 | .IP \[bu] 2 32 | If your statement contains binary data you should use 33 | \f[B]mysql_real_query(3)\f[R] or escape your data with 34 | \f[B]mysql_hex_string(3)\f[R]. 35 | .IP \[bu] 2 36 | To determine if a statement returned a result set use the function 37 | \f[B]mysql_field_count(3)\f[R]. 38 | .SS Return value 39 | Returns zero on success, non zero on failure. 40 | .SS See also 41 | .IP \[bu] 2 42 | \f[B]mysql_real_query(3)\f[R] 43 | .IP \[bu] 2 44 | \f[B]mysql_field_count(3)\f[R] 45 | .IP \[bu] 2 46 | \f[B]mysql_hex_string(3)\f[R] 47 | .IP \[bu] 2 48 | \f[B]mysql_use_result(3)\f[R] 49 | .IP \[bu] 2 50 | \f[B]mysql_store_result(3)\f[R] 51 | -------------------------------------------------------------------------------- /man/mysql_stmt_send_long_data.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_send_long_data" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_send_long_data \- Sends data in chunks 6 | .SS Synopsis 7 | .IP 8 | .EX 9 | #include \f[B]\f[R] 10 | 11 | my_bool mysql_stmt_send_long_data(MYSQL_STMT * stmt, 12 | unsigned int, 13 | const char * data, 14 | unsigned long); 15 | .EE 16 | .SS Description 17 | Allows sending parameter data to the server in pieces (or chunks), 18 | e.g.\ if the size of a blob exceeds the size of max_allowed_packet size. 19 | This function can be called multiple times to send the parts of a 20 | character or binary data value for a column, which must be one of the 21 | \f[CR]TEXT\f[R] or \f[CR]BLOB\f[R] datatypes. 22 | .SS Parameter 23 | .IP \[bu] 2 24 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 25 | \f[B]mysql_stmt_init(3)\f[R]. 26 | .IP \[bu] 2 27 | \f[CR]param_no\f[R] \- indicates which parameter to associate the data 28 | with. 29 | Parameters are numbered beginning with 0. 30 | .IP \[bu] 2 31 | \f[CR]data\f[R] \- a buffer containing the data to send. 32 | .IP \[bu] 2 33 | \f[CR]long\f[R] \- size of the data buffer. 34 | .SS Return value 35 | Returns zero on success, nonzero if an error occurred. 36 | .SS Notes 37 | .IP \[bu] 2 38 | \f[CR]mysql_stmt_send_long_data()\f[R] must be called before 39 | \f[B]mysql_stmt_execute(3)\f[R]. 40 | .IP \[bu] 2 41 | bound variables for this column will be ignored when calling 42 | \f[B]mysql_stmt_execute(3)\f[R]. 43 | .SS See also 44 | .IP \[bu] 2 45 | \f[B]mysql_stmt_execute(3)\f[R]. 46 | -------------------------------------------------------------------------------- /external/zlib/old/descrip.mms: -------------------------------------------------------------------------------- 1 | # descrip.mms: MMS description file for building zlib on VMS 2 | # written by Martin P.J. Zinser 3 | 4 | cc_defs = 5 | c_deb = 6 | 7 | .ifdef __DECC__ 8 | pref = /prefix=all 9 | .endif 10 | 11 | OBJS = adler32.obj, compress.obj, crc32.obj, gzio.obj, uncompr.obj,\ 12 | deflate.obj, trees.obj, zutil.obj, inflate.obj, infblock.obj,\ 13 | inftrees.obj, infcodes.obj, infutil.obj, inffast.obj 14 | 15 | CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF) 16 | 17 | all : example.exe minigzip.exe 18 | @ write sys$output " Example applications available" 19 | libz.olb : libz.olb($(OBJS)) 20 | @ write sys$output " libz available" 21 | 22 | example.exe : example.obj libz.olb 23 | link example,libz.olb/lib 24 | 25 | minigzip.exe : minigzip.obj libz.olb 26 | link minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib 27 | 28 | clean : 29 | delete *.obj;*,libz.olb;* 30 | 31 | 32 | # Other dependencies. 33 | adler32.obj : zutil.h zlib.h zconf.h 34 | compress.obj : zlib.h zconf.h 35 | crc32.obj : zutil.h zlib.h zconf.h 36 | deflate.obj : deflate.h zutil.h zlib.h zconf.h 37 | example.obj : zlib.h zconf.h 38 | gzio.obj : zutil.h zlib.h zconf.h 39 | infblock.obj : zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h 40 | infcodes.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h 41 | inffast.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h 42 | inflate.obj : zutil.h zlib.h zconf.h infblock.h 43 | inftrees.obj : zutil.h zlib.h zconf.h inftrees.h 44 | infutil.obj : zutil.h zlib.h zconf.h inftrees.h infutil.h 45 | minigzip.obj : zlib.h zconf.h 46 | trees.obj : deflate.h zutil.h zlib.h zconf.h 47 | uncompr.obj : zlib.h zconf.h 48 | zutil.obj : zutil.h zlib.h zconf.h 49 | -------------------------------------------------------------------------------- /plugins/auth/sspi_common.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015, Shuang Qiu, Robbie Harwood, 2 | Vladislav Vaintroub & MariaDB Corporation 3 | 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, 10 | this list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | */ 28 | 29 | #define SECURITY_WIN32 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #define SSPI_MAX_TOKEN_SIZE 50000 37 | #define SEC_ERROR(err) ((err) < 0) 38 | extern void sspi_errmsg(int err, char *buf, size_t size); 39 | -------------------------------------------------------------------------------- /external/zlib/msdos/Makefile.emx: -------------------------------------------------------------------------------- 1 | # Makefile for zlib. Modified for emx 0.9c by Chr. Spieler, 6/17/98. 2 | # Copyright (C) 1995-1998 Jean-loup Gailly. 3 | # For conditions of distribution and use, see copyright notice in zlib.h 4 | 5 | # To compile, or to compile and test, type: 6 | # 7 | # make -fmakefile.emx; make test -fmakefile.emx 8 | # 9 | 10 | CC=gcc 11 | 12 | #CFLAGS=-MMD -O 13 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 14 | #CFLAGS=-MMD -g -DZLIB_DEBUG 15 | CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ 16 | -Wstrict-prototypes -Wmissing-prototypes 17 | 18 | # If cp.exe is available, replace "copy /Y" with "cp -fp" . 19 | CP=copy /Y 20 | # If gnu install.exe is available, replace $(CP) with ginstall. 21 | INSTALL=$(CP) 22 | # The default value of RM is "rm -f." If "rm.exe" is found, comment out: 23 | RM=del 24 | LDLIBS=-L. -lzlib 25 | LD=$(CC) -s -o 26 | LDSHARED=$(CC) 27 | 28 | INCL=zlib.h zconf.h 29 | LIBS=zlib.a 30 | 31 | AR=ar rcs 32 | 33 | prefix=/usr/local 34 | exec_prefix = $(prefix) 35 | 36 | OBJS = adler32.o compress.o crc32.o gzclose.o gzlib.o gzread.o gzwrite.o \ 37 | uncompr.o deflate.o trees.o zutil.o inflate.o infback.o inftrees.o inffast.o 38 | 39 | TEST_OBJS = example.o minigzip.o 40 | 41 | all: example.exe minigzip.exe 42 | 43 | test: all 44 | ./example 45 | echo hello world | .\minigzip | .\minigzip -d 46 | 47 | %.o : %.c 48 | $(CC) $(CFLAGS) -c $< -o $@ 49 | 50 | zlib.a: $(OBJS) 51 | $(AR) $@ $(OBJS) 52 | 53 | %.exe : %.o $(LIBS) 54 | $(LD) $@ $< $(LDLIBS) 55 | 56 | 57 | .PHONY : clean 58 | 59 | clean: 60 | $(RM) *.d 61 | $(RM) *.o 62 | $(RM) *.exe 63 | $(RM) zlib.a 64 | $(RM) foo.gz 65 | 66 | DEPS := $(wildcard *.d) 67 | ifneq ($(DEPS),) 68 | include $(DEPS) 69 | endif 70 | -------------------------------------------------------------------------------- /man/mysql_stmt_result_metadata.3: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 3.5 2 | .\" 3 | .TH "mysql_stmt_result_metadata" "3" "" "Version 3.4" "MariaDB Connector/C" 4 | .SS Name 5 | mysql_stmt_result_metadata \- Returns result set metadata from a 6 | prepared statement. 7 | .SS Synopsis 8 | .IP 9 | .EX 10 | #include \f[B]\f[R] 11 | 12 | MYSQL_RES * mysql_stmt_result_metadata(MYSQL_STMT * stmt); 13 | .EE 14 | .SS Description 15 | If a statement passed to \f[B]mysql_stmt_prepare(3)\f[R] is one that 16 | produces a result set, mysql_stmt_result_metadata() returns the result 17 | set that can be used to process the meta information such as total 18 | number of fields and individual field information. 19 | .SS Parameter 20 | .IP \[bu] 2 21 | \f[CR]stmt\f[R] \- a statement handle, which was previously allocated by 22 | \f[B]mysql_stmt_init(3)\f[R]. 23 | .SS Return value 24 | Returns a result set that can be used to process metadata information. 25 | .SS Notes 26 | .IP \[bu] 2 27 | The result set returned by mysql_stmt_result_metadata() contains only 28 | metadata. 29 | It does not contain any row results. 30 | The rows are obtained by \f[B]mysql_stmt_fetch(3)\f[R]. 31 | .IP \[bu] 2 32 | This result set pointer can be passed as an argument to any of the 33 | field\-based functions that process result set metadata, such as: 34 | \f[B]mysql_num_fields(3)\f[R], \f[B]mysql_fetch_field(3)\f[R], 35 | \f[B]mysql_fetch_field_direct(3)\f[R], \f[B]mysql_fetch_fields(3)\f[R], 36 | \f[B]mysql_field_count(3)\f[R], \f[B]mysql_field_seek(3)\f[R], 37 | \f[B]mysql_field_tell(3)\f[R], \f[B]mysql_free_result(3)\f[R] 38 | .SS See Also 39 | .IP \[bu] 2 40 | \f[B]mariadb_stmt_fetch_fields(3)\f[R] 41 | .IP \[bu] 2 42 | \f[B]mysql_free_result(3)\f[R] 43 | .IP \[bu] 2 44 | \f[B]mysql_stmt_prepare(3)\f[R] 45 | -------------------------------------------------------------------------------- /external/zlib/old/Makefile.emx: -------------------------------------------------------------------------------- 1 | # Makefile for zlib. Modified for emx/rsxnt by Chr. Spieler, 6/16/98. 2 | # Copyright (C) 1995-1998 Jean-loup Gailly. 3 | # For conditions of distribution and use, see copyright notice in zlib.h 4 | 5 | # To compile, or to compile and test, type: 6 | # 7 | # make -fmakefile.emx; make test -fmakefile.emx 8 | # 9 | 10 | CC=gcc -Zwin32 11 | 12 | #CFLAGS=-MMD -O 13 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 14 | #CFLAGS=-MMD -g -DZLIB_DEBUG 15 | CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ 16 | -Wstrict-prototypes -Wmissing-prototypes 17 | 18 | # If cp.exe is available, replace "copy /Y" with "cp -fp" . 19 | CP=copy /Y 20 | # If gnu install.exe is available, replace $(CP) with ginstall. 21 | INSTALL=$(CP) 22 | # The default value of RM is "rm -f." If "rm.exe" is found, comment out: 23 | RM=del 24 | LDLIBS=-L. -lzlib 25 | LD=$(CC) -s -o 26 | LDSHARED=$(CC) 27 | 28 | INCL=zlib.h zconf.h 29 | LIBS=zlib.a 30 | 31 | AR=ar rcs 32 | 33 | prefix=/usr/local 34 | exec_prefix = $(prefix) 35 | 36 | OBJS = adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o \ 37 | gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o 38 | 39 | TEST_OBJS = example.o minigzip.o 40 | 41 | all: example.exe minigzip.exe 42 | 43 | test: all 44 | ./example 45 | echo hello world | .\minigzip | .\minigzip -d 46 | 47 | %.o : %.c 48 | $(CC) $(CFLAGS) -c $< -o $@ 49 | 50 | zlib.a: $(OBJS) 51 | $(AR) $@ $(OBJS) 52 | 53 | %.exe : %.o $(LIBS) 54 | $(LD) $@ $< $(LDLIBS) 55 | 56 | 57 | .PHONY : clean 58 | 59 | clean: 60 | $(RM) *.d 61 | $(RM) *.o 62 | $(RM) *.exe 63 | $(RM) zlib.a 64 | $(RM) foo.gz 65 | 66 | DEPS := $(wildcard *.d) 67 | ifneq ($(DEPS),) 68 | include $(DEPS) 69 | endif 70 | --------------------------------------------------------------------------------