From 06eaf7232e9a920468c0f8d74dcf2fe8b555501c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 14:24:36 +0200 Subject: Adding upstream version 1:10.11.6. Signed-off-by: Daniel Baumann --- libmariadb/man/mariadb_get_infov.3 | 325 +++++++++++++++++++++++++++++++++++++ 1 file changed, 325 insertions(+) create mode 100644 libmariadb/man/mariadb_get_infov.3 (limited to 'libmariadb/man/mariadb_get_infov.3') diff --git a/libmariadb/man/mariadb_get_infov.3 b/libmariadb/man/mariadb_get_infov.3 new file mode 100644 index 00000000..309cb936 --- /dev/null +++ b/libmariadb/man/mariadb_get_infov.3 @@ -0,0 +1,325 @@ +.\"t +.\" Automatically generated by Pandoc 2.5 +.\" +.TH "mariadb_get_infov" "3" "" "Version 3.3.1" "MariaDB Connector/C" +.hy +.SS Name +.PP +mariadb_get_infov \- retrieves generic or connection releated +information +.SS Synopsis +.IP +.nf +\f[C] +#include + +int mariadb_get_infov(MYSQL * mysql, + enum mariadb_value value, + void * arg, + ...); +\f[R] +.fi +.SH Description +.PP +Retrieves generic or connection specific information. +\f[C]arg\f[R] (and further arguments) must be a pointer to a variable of +the type appropriate for the \f[C]value\f[R] argument. +The following table shows which variable type to use for each value. +.PP +.TS +tab(@); +lw(35.0n) lw(35.0n). +T{ +Variable Type +T}@T{ +Values +T} +_ +T{ +\f[C]unsigned int\f[R] +T}@T{ +\f[C]MARIADB_CLIENT_VERSION_ID\f[R], +\f[C]MARIADB_CONNECTION_ASYNC_TIMEOUT\f[R], +\f[C]MARIADB_CONNECTION_ASYNC_TIMEOUT_MS\f[R], +\f[C]MARIADB_CONNECTION_ERROR_ID\f[R], +\f[C]MARIADB_CONNECTION_PORT\f[R], +\f[C]MARIADB_CONNECTION_PROTOCOL_VERSION_ID\f[R], +\f[C]MARIADB_CONNECTION_PVIO_TYPE\f[R], +\f[C]MARIADB_CONNECTION_SERVER_STATUS\f[R], +\f[C]MARIADB_CONNECTION_SERVER_VERSION_ID\f[R], +\f[C]MARIADB_CONNECTION_TLS_VERSION_ID\f[R] +T} +T{ +\f[C]unsigned long\f[R] +T}@T{ +\f[C]MARIADB_CONNECTION_CLIENT_CAPABILITIES\f[R], +\f[C]MARIADB_CONNECTION_EXTENDED_SERVER_CAPABILITIES\f[R], +\f[C]MARIADB_CONNECTION_SERVER_CAPABILITIES\f[R] +T} +T{ +\f[C]size_t\f[R] +T}@T{ +\f[C]MARIADB_MAX_ALLOWED_PACKET\f[R], +\f[C]MARIADB_NET_BUFFER_LENGTH\f[R] +T} +T{ +\f[C]const char *\f[R] +T}@T{ +\f[C]MARIADB_CLIENT_VERSION\f[R], \f[C]MARIADB_TLS_VERSION\f[R], +\f[C]MARIADB_CONNECTION_ERROR\f[R], \f[C]MARIADB_CONNECTION_HOST\f[R], +\f[C]MARIADB_CONNECTION_INFO\f[R], \f[C]MARIADB_CONNECTION_SCHEMA\f[R], +\f[C]MARIADB_CONNECTION_SERVER_TYPE\f[R], +\f[C]MARIADB_CONNECTION_SERVER_VERSION\f[R], +\f[C]MARIADB_CONNECTION_SQLSTATE\f[R], +\f[C]MARIADB_CONNECTION_SSL_CIPHER\f[R], +\f[C]MARIADB_CONNECTION_TLS_VERSION\f[R], +\f[C]MARIADB_CONNECTUION_UNIX_SOCKET\f[R], +\f[C]MARIADB_CONNECTION_USER\f[R], +T} +T{ +\f[C]const char **\f[R] +T}@T{ +\f[C]MARIADB_CLIENT_ERRORS\f[R] +T} +T{ +\f[C]const *MY_CHARSET_INFO\f[R] +T}@T{ +\f[C]MARIADB_CHARSET_NAME\f[R], +\f[C]MARIADB_CONNECTION_CHARSET_INFO\f[R] +T} +T{ +\f[C]my_socket\f[R] +T}@T{ +\f[C]MARIADB_CONNECTION_SOCKET\f[R] +T} +.TE +.SS Value types +.SS Generic information +.PP +For these information types parameter \f[C]mysql\f[R] needs to be set to +NULL. +.IP \[bu] 2 +\f[C]MARIADB_CHARSET_NAME\f[R] +.PD 0 +.P +.PD +Retrieves the charset information for a character set by it\[cq]s +literal representation. +.IP \[bu] 2 +\f[C]MARIADB_CLIENT_ERRORS\f[R] +.PD 0 +.P +.PD +Retrieve array of client errors. +This can be used in plugins to set global error messages (which are not +exported by MariaDB Connector/C). +.IP \[bu] 2 +\f[C]MARIADB_CLIENT_VERSION\f[R] +.PD 0 +.P +.PD +The client version in literal representation. +.IP \[bu] 2 +\f[C]MARIADB_CLIENT_VERSION_ID\f[R] +.PD 0 +.P +.PD +The client version in numeric format. +.IP \[bu] 2 +\f[C]MARIADB_MAX_ALLOWED_PACKET\f[R] +.PD 0 +.P +.PD +Retrieves value of maximum allowed packet size. +.IP \[bu] 2 +\f[C]MARIADB_NET_BUFFER_LENGTH\f[R] +.PD 0 +.P +.PD +Retrieves the length of net buffer. +.IP \[bu] 2 +\f[C]MARIADB_SSL_LIBRARY\f[R] +.PD 0 +.P +.PD +The TLS library MariaDB Connector/C is compiled against. +.SS Connection related information +.PP +For these information types parameter mysql must be represent a valid +connection handle which was allocated by \f[B]mysql_init(3)\f[R]. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_ASYNC_TIMEOUT\f[R] +.PD 0 +.P +.PD +Retrieves the timeout for non blocking calls in seconds. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_ASYNC_TIMEOUT_MS\f[R] +.PD 0 +.P +.PD +Retrieves the timeout for non blocking calls in milliseconds. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_CHARSET_INFO\f[R] +.PD 0 +.P +.PD +Retrieves character set information for given connection. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_CLIENT_CAPABILITIES\f[R] +.PD 0 +.P +.PD +Returns the handshak capability flags] of the client. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_ERROR\f[R] +.PD 0 +.P +.PD +Retrieves error message for last used command. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_ERROR_ID\f[R] +.PD 0 +.P +.PD +Retrieves error number for last used command. +*\f[C]MARIADB_CONNECTION_EXTENDED_SERVER_CAPABILITIES\f[R] +.PD 0 +.P +.PD +Returns the extended capability flags of the connected MariaDB server +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_HOST\f[R] +.PD 0 +.P +.PD +Returns host name of the connected MariaDB server +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_INFO\f[R] +.PD 0 +.P +.PD +Retrieves generic info for last used command. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_PORT\f[R] +.PD 0 +.P +.PD +Retrieves the port number of server host. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_PROTOCOL_VERSION_ID\f[R] +.PD 0 +.P +.PD +Retrieves the protocol version number. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_PVIO_TYPE\f[R] +.PD 0 +.P +.PD +Retrieves the pvio plugin used for specified connection. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_SCHEMA\f[R] +.PD 0 +.P +.PD +Retrieves the current schema. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_SERVER_CAPABILITIES\f[R] +.PD 0 +.P +.PD +Retrievrs the capability flags of the connected server. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_SERVER_STATUS\f[R] +.PD 0 +.P +.PD +Returns server status after last operation. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_SERVER_TYPE\f[R] +.PD 0 +.P +.PD +Retrieves the type of the server. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_SERVER_VERSION\f[R] +.PD 0 +.P +.PD +Retrieves the server version in literal format. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_SERVER_VERSION_ID\f[R] +.PD 0 +.P +.PD +Retrieves the server version in numeric format. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_SOCKET\f[R] +.PD 0 +.P +.PD +Retrieves the handle (socket) for given connection. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_SQLSTATE\f[R] +.PD 0 +.P +.PD +Retrieves current sqlstate information for last used command. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_SSL_CIPHER\f[R] +.PD 0 +.P +.PD +Retrieves the TLS/SSL cipher in use. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_TLS_VERSION\f[R] +.PD 0 +.P +.PD +Retrieves the TLS protocol version used in literal format. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_TLS_VERSION_ID\f[R] +.PD 0 +.P +.PD +Retrieves the TLS protocol version used in numeric format. +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_UNIX_SOCKET\f[R] +.PD 0 +.P +.PD +Retrieves the file name of the unix socket +.IP \[bu] 2 +\f[C]MARIADB_CONNECTION_USER\f[R] +.PD 0 +.P +.PD +Retrieves connection\[cq]s user name. +.SS Returns +.PP +Returns zero on success, non zero if an error occurred (e.g.\ if an +invalid option was specified), +.SS Source file +.IP +.nf +\f[C] + +## History +This function was added in MariaDB Connector/C 3.0, + +## Examples +\f[R] +.fi +.PP +/* get server port for current connection \f[I]/ unsigned int port; +mariadb_get_infov(mysql, MARIADB_CONNECTION_PORT, (void \f[R])&port); +.IP +.nf +\f[C] +\f[R] +.fi +.PP +/* get user name for current connection \f[I]/ const char \f[R]user; +mariadb_get_infov(mysql, MARIADB_CONNECTION_USER, (void \f[I])&user); +\[ga]\[ga]\[ga] ## See also \f[R] \f[B]mysql_get_optionv(3)\f[R] -- cgit v1.2.3