You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-01 06:27:04 +03:00
Fixed build of manpages
To build manpages run cmake with option -DWITH_DOCS=ON. Creation of man pages requires Python3 and Docygen. The bundled manpaes were removed from repository.
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "docs"]
|
||||||
|
path = docs
|
||||||
|
url = https://github.com/mariadb-corporation/mariadb-connector-c.wiki.git
|
||||||
|
@ -53,6 +53,7 @@ ENDMACRO()
|
|||||||
### Options ###
|
### Options ###
|
||||||
IF(NOT WIN32)
|
IF(NOT WIN32)
|
||||||
ADD_OPTION(WITH_MYSQLCOMPAT "creates libmysql* symbolic links" OFF)
|
ADD_OPTION(WITH_MYSQLCOMPAT "creates libmysql* symbolic links" OFF)
|
||||||
|
ADD_OPTION(WITH_DOCS "creates manpages" OFF)
|
||||||
ELSE()
|
ELSE()
|
||||||
ADD_OPTION(WITH_MSI "Build MSI installation package" OFF)
|
ADD_OPTION(WITH_MSI "Build MSI installation package" OFF)
|
||||||
ADD_OPTION(WITH_SIGNCODE "digitally sign files" OFF)
|
ADD_OPTION(WITH_SIGNCODE "digitally sign files" OFF)
|
||||||
@ -147,7 +148,6 @@ IF(NOT CMAKE_BUILD_TYPE)
|
|||||||
SET(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
SET(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# various defines for generating include/mysql_version.h
|
|
||||||
INCLUDE(FindGit)
|
INCLUDE(FindGit)
|
||||||
IF(GIT_EXECUTABLE AND EXISTS ${CC_SOURCE_DIR}/.git)
|
IF(GIT_EXECUTABLE AND EXISTS ${CC_SOURCE_DIR}/.git)
|
||||||
EXECUTE_PROCESS(
|
EXECUTE_PROCESS(
|
||||||
@ -157,7 +157,12 @@ IF(GIT_EXECUTABLE AND EXISTS ${CC_SOURCE_DIR}/.git)
|
|||||||
IF(RES EQUAL 0)
|
IF(RES EQUAL 0)
|
||||||
STRING(REGEX REPLACE "\n$" "" CC_SOURCE_REVISION "${OUT}")
|
STRING(REGEX REPLACE "\n$" "" CC_SOURCE_REVISION "${OUT}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
EXECUTE_PROCESS(
|
||||||
|
COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
|
||||||
|
WORKING_DIRECTORY ${CC_SOURCE_DIR})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
# various defines for generating include/mysql_version.h
|
||||||
SET(PROTOCOL_VERSION 10) # we adapted new password option from PHP's mysqlnd !
|
SET(PROTOCOL_VERSION 10) # we adapted new password option from PHP's mysqlnd !
|
||||||
|
|
||||||
# if C/C is build as subproject inside MariaDB server tree we will
|
# if C/C is build as subproject inside MariaDB server tree we will
|
||||||
@ -439,14 +444,16 @@ IF(IS_DIRECTORY ${CC_SOURCE_DIR}/unittest)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(CLIENT_DOCS)
|
#IF(CLIENT_DOCS)
|
||||||
INSTALL(DIRECTORY ${CLIENT_DOCS}
|
# INSTALL(DIRECTORY ${CLIENT_DOCS}
|
||||||
DESTINATION ${DOCS_INSTALL_DIR_${INSTALL_LAYOUT}}
|
# DESTINATION ${DOCS_INSTALL_DIR_${INSTALL_LAYOUT}}
|
||||||
COMPONENT SharedLibraries)
|
# COMPONENT SharedLibraries)
|
||||||
ENDIF()
|
#ENDIF()
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
ADD_SUBDIRECTORY(man)
|
IF(WITH_DOCS)
|
||||||
|
ADD_SUBDIRECTORY(man)
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(WIN32 AND WITH_MSI AND CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
IF(WIN32 AND WITH_MSI AND CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
|
||||||
|
1
docs
Submodule
1
docs
Submodule
Submodule docs added at 7e12bcea26
@ -120,4 +120,16 @@ mysql_thread_init.3
|
|||||||
mysql_use_result.3
|
mysql_use_result.3
|
||||||
mysql_warning_count.3)
|
mysql_warning_count.3)
|
||||||
|
|
||||||
|
set(Python3_FIND_STRATEGY VERSION)
|
||||||
|
find_package (Python3 REQUIRED)
|
||||||
|
|
||||||
|
find_package(Doxygen REQUIRED)
|
||||||
|
|
||||||
|
ADD_CUSTOM_COMMAND(OUTPUT ${CC_MAN_PAGES_3}
|
||||||
|
COMMAND python3 ${CC_SOURCE_DIR}/scripts/create_man
|
||||||
|
--docs=${CC_SOURCE_DIR}/docs --funcs=${CC_BINARY_DIR}/manpages.list
|
||||||
|
--version=${CPACK_PACKAGE_VERSION} --out=${CC_BINARY_DIR}/man
|
||||||
|
DEPENDS ${CC_BINARY_DIR}/manpages.list)
|
||||||
|
ADD_CUSTOM_TARGET(docs ALL DEPENDS ${CC_MAN_PAGES_3})
|
||||||
|
|
||||||
INSTALL(FILES ${CC_MAN_PAGES_3} DESTINATION ${INSTALL_MANDIR}/man3 COMPONENT ManPagesDevelopment)
|
INSTALL(FILES ${CC_MAN_PAGES_3} DESTINATION ${INSTALL_MANDIR}/man3 COMPONENT ManPagesDevelopment)
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_cancel" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_cancel \- Immediately aborts a connection
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mariadb_cancel(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Immediately aborts a connection by making all subsequent read/write
|
|
||||||
operations fail.
|
|
||||||
\f[C]mariadb_cancel()\f[R] does not invalidate memory used for
|
|
||||||
\f[C]mysql\f[R] structure, nor close any communication channels.
|
|
||||||
To free the memory, \f[B]mysql_close(3)\f[R] must be called.
|
|
||||||
\f[C]mariadb_cancel()\f[R] is useful to break long queries in situations
|
|
||||||
where sending KILL is not possible.
|
|
||||||
.SS Parameter
|
|
||||||
.PP
|
|
||||||
\f[C]mysql\f[R] \- mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns zero on success or a non\-zero value on error.
|
|
||||||
.SS History
|
|
||||||
.PP
|
|
||||||
\f[C]mariadb_cancel()\f[R] was added in Connector/C 3.0
|
|
@ -1,29 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_connection" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_connection \- checks if the client is connected to a MariaDB
|
|
||||||
database server
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_bool mariadb_connection(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Checks if the client is connected to a MariaDB or MySQL database server.
|
|
||||||
.SS Parameter
|
|
||||||
.PP
|
|
||||||
\f[C]mysql\f[R] \- mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns a non zero value if connected to a MariaDB database server,
|
|
||||||
otherwise zero.
|
|
@ -1,32 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_check" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_check \- Checks if a dynamic column has correct format
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_dyncol.h>
|
|
||||||
|
|
||||||
enum enum_dyncol_func_result
|
|
||||||
mariadb_dyncol_check(DYNAMIC_COLUMN *str);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
The function \f[C]mariadb_dyncol_check()\f[R] checks if a dynamic column
|
|
||||||
has correct format.
|
|
||||||
This can be used e.g.\ to check if a blob contains a dynamic column.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]str\f[R]\- pointer to a \f[C]DYNAMIC_COLUMN\f[R] structure.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns \f[C]ER_DYNCOL_OK\f[R] if the dynamic column has correct format,
|
|
||||||
otherwise \f[C]ER_DYNCOL_FORMAT\f[R].
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_dyncol_count(3)\f[R]
|
|
@ -1,31 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_column_cmp_named" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_column_cmp_named \- Compare two column names
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_dyncol.h>
|
|
||||||
|
|
||||||
int mariadb_dyncol_column_cmp_named(const MYSQL_LEX_STRING *s1,
|
|
||||||
const MYSQL_LEX_STRING *s2);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Compares two dynamic column keys represented as a pointer to a
|
|
||||||
\f[C]MYSQL_LEX_STRING\f[R] structure.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]s1\f[R] \- First key
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]s2\f[R] \- Second key
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns an integer less than, equal to, or greater than zero if the
|
|
||||||
first bytes of \f[C]s1\f[R] is found, respectively, to be less than, to
|
|
||||||
match, or be greater than the first bytes of \f[C]s2\f[R].
|
|
@ -1,36 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_column_count" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_column_count \- Get number of columns in dynamic column
|
|
||||||
blob ## Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_dyncol.h>
|
|
||||||
|
|
||||||
enum enum_dyncol_func_result
|
|
||||||
mariadb_dyncol_column_count(DYNAMIC_COLUMN *str,
|
|
||||||
unsigned int *column_count);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Gets the number of columnns in a dynamic column blob.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*str\f[R] \- A pointer to a \f[C]DYNAMIC_COLUMN\f[R] structure
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]column_count\f[R] \- An unsigned integer pointer where the number
|
|
||||||
of columns will be stored.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns \f[C]ER_DYNCOL_OK\f[R] on success, otherwise error.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mariadb_dyncol_column_count()\f[R] doesn\[cq]t count NULL values.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
Dynamic Column Error Codes (dyncol_typesanddefs#error-codes)
|
|
@ -1,51 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_create_many_named" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_create_many_named \- Creates a dynamic column with named
|
|
||||||
keys
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_dyncol.h>
|
|
||||||
|
|
||||||
enum enum_dyncol_func_result
|
|
||||||
mariadb_dyncol_create_many_named(DYNAMIC_COLUMN *str,
|
|
||||||
uint column_count,
|
|
||||||
MYSQL_LEX_STRING *column_keys,
|
|
||||||
DYNAMIC_COLUMN_VALUE *values,
|
|
||||||
my_bool new_string);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Create a dynamic column from arrays of values and names.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*str\f[R] \- A pointer to a dynamic column structure
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]column_count\f[R] \- number of columns
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*column_keys\f[R] \- an array of column keys
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*values\f[R] \- an array of values
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]new_string\f[R] \- if set \f[C]str\f[R] will be reinitialized (not
|
|
||||||
freed) before usage
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns \f[C]ER_DYNCOL_OK\f[R] on success, otherwise error.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
To delete, update or insert new columns into an existing dynamic column
|
|
||||||
use <mariadb_dyncol_update_many_named> function
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
<mariadb_dyncol_create_many_num>
|
|
||||||
.IP \[bu] 2
|
|
||||||
<mariadb_dyncol_update_many_named>
|
|
||||||
.IP \[bu] 2
|
|
||||||
Dynamic Column Error Codes (dyncol_typesanddefs#error-codes)
|
|
@ -1,51 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_create_many_num" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_create_many_num \- Creates a dynamic column with numeric
|
|
||||||
keys
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_dyncol.h>
|
|
||||||
|
|
||||||
enum enum_dyncol_func_result
|
|
||||||
mariadb_dyncol_create_many_num(DYNAMIC_COLUMN *str,
|
|
||||||
uint column_count,
|
|
||||||
uint *column_numbers,
|
|
||||||
DYNAMIC_COLUMN_VALUE *values,
|
|
||||||
my_bool new_string);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Create a dynamic column from arrays of values and numb\['e]rs
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*str\f[R] \- A pointer to a dynamic column structure
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]column_count\f[R] \- number of columns
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*column_numbers\f[R] \- an array of column numbers
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*values\f[R] \- an array of values
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]new_string\f[R] \- if set \f[C]str\f[R] will be reinitialized (not
|
|
||||||
freed) before usage
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns \f[C]ER_DYNCOL_OK\f[R] on success, otherwise error.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
To delete, update or insert new columns into an existing dynamic column
|
|
||||||
use <mariadb_dyncol_update_many_num> function
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
<mariadb_dyncol_create_many_named>
|
|
||||||
.IP \[bu] 2
|
|
||||||
<mariadb_dyncol_update_many_num>
|
|
||||||
.IP \[bu] 2
|
|
||||||
Dynamic Column Error Codes (dyncol_typesanddefs#error-codes)
|
|
@ -1,33 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_exists_named" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_exists_named \- Check if column with given name exists.
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
enum enum_dyncol_func_result
|
|
||||||
mariadb_dyncol_exists_named(DYNAMIC_COLUMN *str,
|
|
||||||
MYSQL_LEX_STRING *column_key);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Checks if a column with the specified column key exists.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*str\f[R] \- Dynamic column
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*column_key\f[R] \- The column key to search for
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns \f[C]ER_DYNCOL_YES\f[R] if a column with given key exists,
|
|
||||||
\f[C]ER_DYNCOL_NO\f[R] if no column exists or error.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
<mariadb_dyncol_exists_num>
|
|
||||||
.IP \[bu] 2
|
|
||||||
Dynamic Column Error Codes (dyncol_typesanddefs#error-codes)
|
|
@ -1,33 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_exists_num" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_exists_num \- Check if column with given number exists.
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
enum enum_dyncol_func_result
|
|
||||||
mariadb_dyncol_exists_num(DYNAMIC_COLUMN *str,
|
|
||||||
uint column_number);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Checks if a column with the specified column key exists.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*str\f[R] \- Dynamic column
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]column_number\f[R] \- The column number to search for
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns \f[C]ER_DYNCOL_YES\f[R] if a column with given number exists,
|
|
||||||
\f[C]ER_DYNCOL_NO\f[R] if no column exists or error.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
<mariadb_dyncol_exists_named>
|
|
||||||
.IP \[bu] 2
|
|
||||||
Dynamic Column Error Codes (dyncol_typesanddefs#error-codes)
|
|
@ -1,30 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_free" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_free \- Free memory inside packed blob
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_dyncol.h>
|
|
||||||
|
|
||||||
void mariadb_dyncol_free(DYNAMIC_COLUMN *str)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Frees memory associated by the specified dynamic column
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*str\f[R] \- A pointer to a \f[C]DYNAMIC_COLUMN\f[R] structure
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mariadb_dyncol_free()\f[R] doesn\[cq]t free the memory of the
|
|
||||||
passed \f[C]DYNAMIC_COLUMN\f[R] structure but all memory of stored
|
|
||||||
columns.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_dyncol_init(3)\f[R]
|
|
@ -1,36 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_get_named" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_get_name \- Get value of a column with given key
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_dyncol.h>
|
|
||||||
|
|
||||||
enum enum_dyncol_func_result
|
|
||||||
mariadb_dyncol_get_named(DYNAMIC_COLUMN *str,
|
|
||||||
LEX_STRING *key,
|
|
||||||
DYNAMIC_COLUMN_VALUE *store_it_here)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns a dynamic column value by given key
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]str\f[R]: Dynamic column
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]name\f[R]: Name to search for
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]value\f[R]: Value of dynamic column
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns \f[C]ER_DYNCOL_OK\f[R]on success, otherwise error.
|
|
||||||
If the column name could not be found, value will be NULL
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_dyncol_get_num(3)\f[R]
|
|
@ -1,36 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_get_num" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_get_num \- Get value of a column with given number
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_dyncol.h>
|
|
||||||
|
|
||||||
enum enum_dyncol_func_result
|
|
||||||
mariadb_dyncol_get_num(DYNAMIC_COLUMN *str,
|
|
||||||
uint column_nr,
|
|
||||||
DYNAMIC_COLUMN_VALUE *store_it_here)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns a dynamic column value by given number
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]str\f[R]: Dynamic column
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]column_nr\f[R]: Number of column
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]value\f[R]: Value of dynamic column
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns \f[C]ER_DYNCOL_OK\f[R]on success, otherwise error.
|
|
||||||
If the column number could not be found, value will be NULL
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_dyncol_get_named(3)\f[R]
|
|
@ -1,29 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_has_names" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_has_names \- Checks if dynamic column uses named keys
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_dyncol.h>
|
|
||||||
|
|
||||||
my_bool mariadb_dyncol_has_names(DYNAMIC_COLUMN *str)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Checks if the specified dynamic column uses named keys.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]str\f[R]: Dynamic column
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns 1 if the specified dynamic column uses named keys, otherwise
|
|
||||||
zero.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_dyncol_get_named(3)\f[R]
|
|
@ -1,33 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_json" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_json \- Get content of a dynamic column in JSON format
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_dyncol.h>
|
|
||||||
|
|
||||||
enum enum_dyncol_func_result
|
|
||||||
mariadb_dyncol_json(DYNAMIC_COLUMN *str,
|
|
||||||
DYNAMIC_STRING *json)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Get content of a dynamic column in JSON format.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*str\f[R] \- Dynamic column
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*json\f[R] \- Pointer to a dynamic string which contains json
|
|
||||||
output
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns \f[C]ER_DYNCOL_OK\f[R]on success, otherwise error.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_dyncol_list_json(3)\f[R]
|
|
@ -1,43 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_list_named" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_list_named \- Lists column keys in dynamic column
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_dyncol.h>
|
|
||||||
|
|
||||||
enum enum_dyncol_func_result
|
|
||||||
mariadb_dyncol_list_named(DYNAMIC_COLUMN *str,
|
|
||||||
uint *column_count,
|
|
||||||
MYSQL_LEX_STRING **column_keys);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Lists the column keys inside a dynamic column.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
The application program needs to free the allocated memory for
|
|
||||||
\f[C]column_count\f[R] and \f[C]column_keys\f[R] parameter.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*str\f[R] \- Dynamic column
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*column_count\f[R] \- A pointer to an unsigned integer which stores
|
|
||||||
the number of columns
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]**column_keys\f[R] \- A pointer to an array of column keys, which
|
|
||||||
stores the keys
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns \f[C]ER_DYNCOL_OK\f[R] on success, otherwise error.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
<mariadb_dyncol_list_num>
|
|
||||||
.IP \[bu] 2
|
|
||||||
<mariadb_dyncol_list_json>
|
|
@ -1,43 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_list_num" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_list_num \- Lists numeric column keys in dynamic column
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_dyncol.h>
|
|
||||||
|
|
||||||
enum enum_dyncol_func_result
|
|
||||||
mariadb_dyncol_list_named(DYNAMIC_COLUMN *str,
|
|
||||||
uint *column_count,
|
|
||||||
uint **column_numbers);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Lists the column numbers inside a dynamic column.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*str\f[R] \- Dynamic column
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*column_count\f[R] \- A pointer to an unsigned integer which stores
|
|
||||||
the number of columns
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]**column_numbers\f[R] \- A pointer to an array of column numbers,
|
|
||||||
which stores the numbers
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns \f[C]ER_DYNCOL_OK\f[R] on success, otherwise error.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
The application program needs to free the allocated memory for
|
|
||||||
\f[C]column_count\f[R] and \f[C]column_numbers\f[R] parameter.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
<mariadb_dyncol_list_named>
|
|
||||||
.IP \[bu] 2
|
|
||||||
<mariadb_dyncol_list_json>
|
|
@ -1,50 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_unpack" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_unpack \- extracts keys and values of all columns
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_dyncol.h>
|
|
||||||
|
|
||||||
enum enum_dyncol_func_result
|
|
||||||
mariadb_dyncol_unpack(DYNAMIC_COLUMN *str,
|
|
||||||
uint *column_count,
|
|
||||||
MYSQL_LEX_STRING **column_keys,
|
|
||||||
DYNAMIC_COLUMN_VALUE **values);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
The \f[C]mariadb_dyncol_unpack()\f[R] function extracts all keys and
|
|
||||||
values of a dynamic column.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]str\f[R] \- Pointer to a \f[C]DYNAMIC_COLUMN\f[R] structure
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]column count\f[R] \- Pointer to an unsigned integer which will
|
|
||||||
receive the number of columns
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]column_keys\f[R] \- Pointer of an array of
|
|
||||||
\f[C]MYSQL_LEX_STRING\f[R] structures, which will contain the column
|
|
||||||
keys
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]values\f[R] \- Pointer of an array of
|
|
||||||
\f[C]DYNAMIC_COLUMN_VALUE\f[R] structures, which will contain the
|
|
||||||
values.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns \f[C]ER_DYNCOL_OK\f[R] on success, otherwise an error.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
The \f[C]column_keys\f[R] and \f[C]values\f[R] arrays will be allocated
|
|
||||||
by \f[C]mariadb_dyncol_unpack()\f[R] and must be freed by application.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_dyncol_get(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_dyncol_list(3)\f[R]
|
|
@ -1,47 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_update_many_named" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_update_many_named \- Update, insert or delete values in a
|
|
||||||
dynamic column
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_dyncol.h>
|
|
||||||
|
|
||||||
enum enum_dyncol_func_result
|
|
||||||
mariadb_dyncol_update_many_named(DYNAMIC_COLUMN *str,
|
|
||||||
uint column_count,
|
|
||||||
MYSQL_LEX_STRING *column_keys,
|
|
||||||
DYNAMIC_COLUMN_VALUE *values)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Add, delete or update columns in a dynamic column.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*str\f[R] \- A pointer to a dynamic column structure
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]column_count\f[R] \- number of columns
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*column_keys\f[R] \- an array of column keys
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*values\f[R] \- an array of values
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns \f[C]ER_DYNCOL_OK\f[R] on success, otherwise error.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
To delete a column, update its value to a \[lq]non\-value\[rq] of type
|
|
||||||
\f[C]DYN_COL_NULL\f[R]
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
<mariadb_dyncol_create_many_named>
|
|
||||||
.IP \[bu] 2
|
|
||||||
<mariadb_dyncol_update_many_num>
|
|
||||||
.IP \[bu] 2
|
|
||||||
Dynamic Column Error Codes (dyncol_typesanddefs#error-codes)
|
|
@ -1,47 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_dyncol_update_many_num" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_dyncol_update_many_num \- Update, insert or delete values in a
|
|
||||||
dynamic column using numeric keys
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_dyncol.h>
|
|
||||||
|
|
||||||
enum enum_dyncol_func_result
|
|
||||||
mariadb_dyncol_update_many_num(DYNAMIC_COLUMN *str,
|
|
||||||
uint column_count,
|
|
||||||
uint *column_keys,
|
|
||||||
DYNAMIC_COLUMN_VALUE *values)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Add, delete or update columns in a dynamic column with a numeric key.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*str\f[R] \- A pointer to a dynamic column structure
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]column_count\f[R] \- number of columns
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*column_keys\f[R] \- an array of column keys
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]*values\f[R] \- an array of values
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns \f[C]ER_DYNCOL_OK\f[R] on success, otherwise error.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
To delete a column, update its value to a \[lq]non\-value\[rq] of type
|
|
||||||
\f[C]DYN_COL_NULL\f[R]
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
<mariadb_dyncol_create_many_num>
|
|
||||||
.IP \[bu] 2
|
|
||||||
<mariadb_dyncol_update_many_named>
|
|
||||||
.IP \[bu] 2
|
|
||||||
Dynamic Column Error Codes (dyncol_typesanddefs#error-codes)
|
|
@ -1,92 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_field_attr" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_field_attr \- returns extended metadata information for
|
|
||||||
pluggable field types
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int *mariadb_field_attr(MARIADB_CONST_STRING *attr,
|
|
||||||
const MYSQL_FIELD *field,
|
|
||||||
enum mariadb_field_attr_t type)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns extended metadata information for pluggable field types like
|
|
||||||
JSON and GEOMETRY.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]attr\f[R]: A pointer which returns extended metadata information
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]field\f[R]: Specifies the field which contains extended metadata
|
|
||||||
information
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]type:\f[R] Specifies type of metadata information.
|
|
||||||
Supported types are \f[C]MARIADB_FIELD_METADATA_DATA_TYPE_NAME\f[R] and
|
|
||||||
\f[C]MARIADB_FIELD_METADATA_FORMAT_NAME\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns zero on success or non zero if the field doesn\[cq]t provide
|
|
||||||
extended metadata information.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
Pluggable field type support is available in MariaDB server version
|
|
||||||
10.5.2 and later
|
|
||||||
.IP \[bu] 2
|
|
||||||
To check if the server supports pluggable field types, check the
|
|
||||||
extended server capabilities which can be obtained by api function
|
|
||||||
\f[B]mariadb_get_info(3)\f[R]
|
|
||||||
.SS Example
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int display_extended_field_attribute(MYSQL *mysql)
|
|
||||||
{
|
|
||||||
MYSQL_RES *result;
|
|
||||||
MYSQL_FIELD *fields;
|
|
||||||
|
|
||||||
if (mysql_query(mysql, \[dq]CREATE TEMPORARY TABLE t1 (a POINT)\[dq]))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (mysql_query(mysql, \[dq]SELECT a FROM t1\[dq]))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (!(result= mysql_store_result(mysql)))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if ((fields= mysql_fetch_fields(result)))
|
|
||||||
{
|
|
||||||
MARIADB_CONST_STRING field_attr;
|
|
||||||
|
|
||||||
if (!mariadb_field_attr(&field_attr, &fields[0],
|
|
||||||
MARIADB_FIELD_ATTR_DATA_TYPE_NAME))
|
|
||||||
{
|
|
||||||
printf(\[dq]Extended field attribute: %s\[rs]n\[dq], field_attr.str);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mysql_free_result(result);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS History
|
|
||||||
.PP
|
|
||||||
mariadb_field_attr was added in MariaDB Connector/C 3.1.8
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_store_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_use_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_get_info(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_fetch_fields(3)\f[R]
|
|
@ -1,26 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_free_rpl_event" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_free_rpl_event \- free event memory
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_rpl.h>
|
|
||||||
|
|
||||||
void mariadb_free_rpl_event(MARIADB_RPL_EVENT *event)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Frees event memory.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]event\f[R] \- An event handle which was previously obtained by
|
|
||||||
\f[B]mariadb_rpl_fetch(3)\f[R].
|
|
||||||
.SS History
|
|
||||||
.PP
|
|
||||||
\f[C]mariadb_free_rpl_event\f[R] was added in MariaDB Connector/C 3.1.0
|
|
@ -1,325 +0,0 @@
|
|||||||
.\"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 <mysql.h>
|
|
||||||
|
|
||||||
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]
|
|
@ -1,36 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_reconnect" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_reconnect \- reconnects to a server
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_bool mariadb_reconnect(MYSQL * mysql)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
\f[C]mariadb_reconnect()\f[R] tries to reconnect to a server in case the
|
|
||||||
connection died due to timeout or other errors.
|
|
||||||
It uses the same credentials which were specified in
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
The function will return 0 on sucess, a non zero value on error
|
|
||||||
.PP
|
|
||||||
\f[B]Note\f[R]: The function will return an error, if the option
|
|
||||||
\f[C]MYSQL_OPT_RECONNECT\f[R] wasn\[cq]t set before.
|
|
||||||
.SS History
|
|
||||||
.PP
|
|
||||||
\f[C]mariadb_reconnect()\f[R] was added in MariaDB Connector/C 3.0
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_real_connect(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_optionsv(3)\f[R]
|
|
@ -1,31 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_rpl_close" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_rpl_close \- Closes replication stream
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_rpl.h>
|
|
||||||
|
|
||||||
void mariadb_rpl_close(MARIADB_RPL *rpl)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Closes a replication stream.
|
|
||||||
.SS Parameter
|
|
||||||
.PP
|
|
||||||
\f[C]rpl\f[R] \- A replication handle which was initialized by
|
|
||||||
\f[B]mariadb_rpl_init(3)\f[R] and connected by
|
|
||||||
\f[B]mariadb_rpl_open(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.PP
|
|
||||||
To close the connection to the server, the api function
|
|
||||||
\f[B]mariadb_close(3)\f[R] must be called.
|
|
||||||
.SS History
|
|
||||||
.PP
|
|
||||||
\f[C]mariadb_rpl_close\f[R] was added in MariaDB Connector/C 3.1
|
|
@ -1,42 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_rpl_fetch" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_rpl_fetch \- fetches next event from replication stream
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_rpl.h>
|
|
||||||
|
|
||||||
MARIADB_RPL_EVENT *mariadb_rpl_fetch(MARIADB_RPL *rpl, MARIADB_RPL_EVENT *event)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Fetches one event from the replication stream
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]rpl\f[R] \- A replication handle which was initialized by
|
|
||||||
\f[B]mariadb_rpl_init(3)\f[R] and connected by
|
|
||||||
\f[B]mariadb_rpl_open(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]event\f[R] \- An event which was returned by a previous call to
|
|
||||||
\f[C]mariadb_rpl_fetch\f[R].
|
|
||||||
If this value is \f[C]NULL\f[R] the function will allocate new memory
|
|
||||||
for the event, otherwise the passed event value will be overwritten.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
An event handle or NULL if EOF packet was received.
|
|
||||||
.SS Notes
|
|
||||||
.PP
|
|
||||||
Event memory needs to be freed by calling
|
|
||||||
\f[B]mariadb_rpl_free_event(3)\f[R].
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_rpl_free_event(3)\f[R]
|
|
||||||
.SS History
|
|
||||||
.PP
|
|
||||||
\f[C]mariadb_rpl_fetch\f[R] was added in MariaDB Connector/C 3.1.0
|
|
@ -1,74 +0,0 @@
|
|||||||
.\"t
|
|
||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_rpl_get_optionsv" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_rpl_get_optionsv \- get replication option value
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_rpl.h>
|
|
||||||
|
|
||||||
int mariadb_rpl_get_optionsv(MARIADB_RPL *rpl, enum mariadb_rpl_option option, ...)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]rpl\f[R] \- a replication handle which was previously allocated by
|
|
||||||
<mariadb_rpl_init>
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]option\f[R] \- The option to be set, followed by one or more values
|
|
||||||
.PP
|
|
||||||
.TS
|
|
||||||
tab(@);
|
|
||||||
lw(23.3n) lw(23.3n) lw(23.3n).
|
|
||||||
T{
|
|
||||||
Option
|
|
||||||
T}@T{
|
|
||||||
Type
|
|
||||||
T}@T{
|
|
||||||
Description
|
|
||||||
T}
|
|
||||||
_
|
|
||||||
T{
|
|
||||||
MARIADB_RPL_FILENAME
|
|
||||||
T}@T{
|
|
||||||
char **, size_t *
|
|
||||||
T}@T{
|
|
||||||
The name and name length of binglog file
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
MARIADB_RPL_START
|
|
||||||
T}@T{
|
|
||||||
unsigned long *
|
|
||||||
T}@T{
|
|
||||||
Start position
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
MARIADB_RPL_SERVER_ID
|
|
||||||
T}@T{
|
|
||||||
uint32_t *
|
|
||||||
T}@T{
|
|
||||||
Server id
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
MARIADB_RPL_FLAGS
|
|
||||||
T}@T{
|
|
||||||
uint32_t *
|
|
||||||
T}@T{
|
|
||||||
Flags
|
|
||||||
T}
|
|
||||||
.TE
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns zero on success, non zero on error.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_rpl_optionsv(3)\f[R]
|
|
||||||
.SS History
|
|
||||||
.PP
|
|
||||||
\f[C]mariadb_rpl_get_optionsv\f[R] was added in MariaDB Connector/C
|
|
||||||
3.1.0
|
|
@ -1,29 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_rpl_open" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_rpl_open \- opens a replication stream
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_rpl.h>
|
|
||||||
|
|
||||||
int mariadb_rpl_open(MARIADB_RPL *rpl)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Opens a replication stream
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]rpl\f[R] \- A replication handle which was previously initialized
|
|
||||||
by \f[B]mariadb_rpl_init(3)\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Zero on success, nonzero on error.
|
|
||||||
.SS History
|
|
||||||
.PP
|
|
||||||
\f[C]mariadb_rpl_open\f[R] was added in MariaDB Connector/C 3.1.0
|
|
@ -1,75 +0,0 @@
|
|||||||
.\"t
|
|
||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_rpl_optionsv" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_rpl_optionsv \- sets replication options
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mariadb_rpl.h>
|
|
||||||
|
|
||||||
int mariadb_rpl_optionsv(MARIADB_RPL *rpl, enum mariadb_rpl_option option, ...)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]rpl\f[R] \- a replication handle which was previously allocated by
|
|
||||||
<mariadb_rpl_init>
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]option\f[R] \- The option to be set, followed by one or more values
|
|
||||||
.PP
|
|
||||||
.TS
|
|
||||||
tab(@);
|
|
||||||
l l l.
|
|
||||||
T{
|
|
||||||
Option
|
|
||||||
T}@T{
|
|
||||||
Type
|
|
||||||
T}@T{
|
|
||||||
Description
|
|
||||||
T}
|
|
||||||
_
|
|
||||||
T{
|
|
||||||
MARIADB_RPL_FILENAME
|
|
||||||
T}@T{
|
|
||||||
char *
|
|
||||||
T}@T{
|
|
||||||
The name of binglog file
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
MARIADB_RPL_START
|
|
||||||
T}@T{
|
|
||||||
unsigned long
|
|
||||||
T}@T{
|
|
||||||
Start position
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
MARIADB_RPL_SERVER_ID
|
|
||||||
T}@T{
|
|
||||||
uint32_t
|
|
||||||
T}@T{
|
|
||||||
Server id
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
MARIADB_RPL_FLAGS
|
|
||||||
T}@T{
|
|
||||||
uint32_t
|
|
||||||
T}@T{
|
|
||||||
Flags
|
|
||||||
T}
|
|
||||||
.TE
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns zero on success, non zero on error.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_rpl_get_optionsv(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_rpl_open(3)\f[R]
|
|
||||||
.SS History
|
|
||||||
.PP
|
|
||||||
\f[C]mariadb_rpl_optionsv\f[R] was added in MariaDB Connector/C 3.1.0
|
|
@ -1,81 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_stmt_execute_direct" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_stmt_execute_direct \- prepares and executes a prepared
|
|
||||||
statement
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mariadb_stmt_execute_direct(MYSQL_STMT * stmt,
|
|
||||||
const char *query,
|
|
||||||
size_t length);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Prepares and executes a statement which was previously allocated by
|
|
||||||
\f[B]mysql_stmt_init(3)\f[R], using the current values of the parameter
|
|
||||||
variables if any parameters exist in the statement.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]stmt\f[R] \- A statement handle, which was previously allocated by
|
|
||||||
\f[B]mysql_stmt_init(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]query\f[R] SQL statement
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]length\f[R] Length of SQL statement
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns zero on success, non\-zero on failure.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
Since the number of parameter of the statement is unknown before
|
|
||||||
execution it is mandatory to set the number of parameters via the
|
|
||||||
\f[B]mysql_stmt_attr_set(3)\f[R] function.
|
|
||||||
.IP \[bu] 2
|
|
||||||
If the SQL statement is a zero\-terminated string, you can also pass
|
|
||||||
\f[C]\-1\f[R] as length.
|
|
||||||
.IP \[bu] 2
|
|
||||||
The statement handle is intended for one\-time execution.
|
|
||||||
Reusing the statement handle might lead to unexpected behavior.
|
|
||||||
.SS History
|
|
||||||
.PP
|
|
||||||
This function was added in Connector/C 3.0 and requires MariaDB 10.2 or
|
|
||||||
later versions.
|
|
||||||
.SS See Also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_stmt_attr_set(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_stmt_bind_param(3)\f[R]
|
|
||||||
.SS Example
|
|
||||||
.PP
|
|
||||||
\[ga]\[ga]\[ga]C static int execute_direct_example(MYSQL \f[I]mysql) {
|
|
||||||
MYSQL_STMT \f[R]stmt= mysql_stmt_init(mysql); MYSQL_BIND bind[2]; int
|
|
||||||
intval= 1; int param_count= 2; char *strval=
|
|
||||||
\[lq]execute_direct_example\[rq];
|
|
||||||
.PP
|
|
||||||
/* Direct execution without parameters */ if
|
|
||||||
(mariadb_stmt_execute_direct(stmt, \[lq]CREATE TABLE execute_direct (a
|
|
||||||
int, b varchar(30))\[rq], \-1)) goto error;
|
|
||||||
.PP
|
|
||||||
memset(&bind, 0, sizeof(MYSQL_BIND) * 2); bind[0].buffer_type=
|
|
||||||
MYSQL_TYPE_SHORT; bind[0].buffer= &intval; bind[1].buffer_type=
|
|
||||||
MYSQL_TYPE_STRING; bind[1].buffer= strval; bind[1].buffer_length=
|
|
||||||
strlen(strval);
|
|
||||||
.PP
|
|
||||||
/* set number of parameters */ if (mysql_stmt_attr_set(stmt,
|
|
||||||
STMT_ATTR_PREBIND_PARAMS, ¶m_count)) goto error;
|
|
||||||
.PP
|
|
||||||
/* bind parameters */ if (mysql_stmt_bind_param(stmt, bind)) goto error;
|
|
||||||
.PP
|
|
||||||
if (mariadb_stmt_execute_direct(stmt, \[lq]INSERT INTO execute_direct
|
|
||||||
VALUES (?,?)\[rq], \-1)) goto error;
|
|
||||||
.PP
|
|
||||||
mysql_stmt_close(stmt); return 0; error: printf(\[lq]Error: %s\[rq],
|
|
||||||
mysql_stmt_error(stmt)); mysql_stmt_close(stmt); return 1; }
|
|
@ -1,36 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mariadb_stmt_fetch_fields" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mariadb_stmt_fetch_fields \- Returns an array of fields containing the
|
|
||||||
column definitions ## Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
MYSQL_FIELD *mariadb_stmt_fetch_fields(MYSQL_STMT * stmt);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns an array of fields.
|
|
||||||
Each field contains the definition for a column of the result set.
|
|
||||||
If the statement doesn\[cq]t have a result set a NULL pointer will be
|
|
||||||
returned.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]stmt\f[R] \- A statement handle, which was previously allocated by
|
|
||||||
\f[B]mysql_stmt_init(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.PP
|
|
||||||
The number of fields can be obtained by
|
|
||||||
\f[B]mysql_stmt_field_count(3)\f[R]
|
|
||||||
.SS History
|
|
||||||
.PP
|
|
||||||
This function was added in MariaDB Connector/C 3.1.0
|
|
||||||
.SS See Also
|
|
||||||
.PP
|
|
||||||
*\f[B]mysql_stmt_field_count(3)\f[R]
|
|
@ -1,46 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_affected_rows" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_affected_rows \- returns the number of rows affected by the last
|
|
||||||
operation
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_ulonglong mysql_affected_rows(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns the number of affected rows by the last operation associated
|
|
||||||
with mysql, if the operation was an \[lq]upsert\[rq] (\f[C]INSERT\f[R],
|
|
||||||
\f[C]UPDATE\f[R], \f[C]DELETE\f[R] or \f[C]REPLACE\f[R]) statement, or
|
|
||||||
\-1 if the last operation failed.
|
|
||||||
.SS Parameters:
|
|
||||||
.PP
|
|
||||||
\f[C]mysql\f[R] is a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Notes:
|
|
||||||
.IP \[bu] 2
|
|
||||||
When using \f[C]UPDATE\f[R], MariaDB will not update columns where the
|
|
||||||
new value is the same as the old value.
|
|
||||||
This creates the possibility that mysql_affected_rows may not actually
|
|
||||||
equal the number of rows matched, only the number of rows that were
|
|
||||||
literally affected by the query.
|
|
||||||
.IP \[bu] 2
|
|
||||||
The \f[C]REPLACE\f[R] statement first deletes the record with the same
|
|
||||||
primary key and then inserts the new record.
|
|
||||||
This function returns the number of deleted records in addition to the
|
|
||||||
number of inserted records.
|
|
||||||
.SH Return value
|
|
||||||
.PP
|
|
||||||
Returns the number of affected rows or \-1 on error.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_num_rows(3)\f[R]
|
|
@ -1,82 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_autocommit" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_autocommit \- Toggles autocommit mode
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_bool mysql_autocommit(MYSQL * mysql, my_bool auto_mode);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Toggles autocommit mode on or off for the current database connection.
|
|
||||||
Autocommit mode will be set if mode=1 or unset if mode=0.
|
|
||||||
.SS Parameters:
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] is a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]auto_mode\f[R] \- whether to turn autocommit on or not.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
Autocommit mode only affects operations on transactional table types.
|
|
||||||
To determine the current state of autocommit mode use the SQL command
|
|
||||||
\f[C]SELECT \[at]\[at]autocommit\f[R] or check the server status (see
|
|
||||||
example below).
|
|
||||||
.IP \[bu] 2
|
|
||||||
Be aware: the [mysql_rollback()}(mysql_rollback() function will not work
|
|
||||||
if autocommit mode is switched on.
|
|
||||||
.SS Examples
|
|
||||||
.SS SQL
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
# Turn of autocmmit
|
|
||||||
SET AUTOCOMMIT=0;
|
|
||||||
|
|
||||||
# Retrieve autocommit
|
|
||||||
SELECT \[at]\[at]autocommit;
|
|
||||||
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
|
|
||||||
| \[at]\[at]autocommit |
|
|
||||||
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
|
|
||||||
| 0 |
|
|
||||||
+\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS MariaDB Connector/C
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
static int test_autocommit(MYSQL *mysql)
|
|
||||||
{
|
|
||||||
int rc;
|
|
||||||
unsigned int server_status;
|
|
||||||
|
|
||||||
/* Turn autocommit off */
|
|
||||||
rc= mysql_autocommit(mysql, 0);
|
|
||||||
if (rc)
|
|
||||||
return rc; /* Error */
|
|
||||||
|
|
||||||
/* If autocommit = 0 succeeded, the last OK packet updated the server status */
|
|
||||||
rc= mariadb_get_infov(mysql, MARIADB_CONNECTION_SERVER_STATUS, &server_status);
|
|
||||||
if (rc)
|
|
||||||
return rc; /* Error */
|
|
||||||
|
|
||||||
if (server_status & SERVER_STATUS_AUTOCOMMIT)
|
|
||||||
{
|
|
||||||
printf(\[dq]Error: autocommit is on\[rs]n\[dq]);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
printf(\[dq]OK: autocommit is off\[rs]n\[dq]);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
@ -1,62 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_change_user" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_change_user \- changes user and default database
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_bool mysql_change_user(MYSQL * mysql,
|
|
||||||
const char * user,
|
|
||||||
const char * passwd,
|
|
||||||
const char * db);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Changes the user and default database of the current connection.
|
|
||||||
.PP
|
|
||||||
In order to successfully change users a valid username and password
|
|
||||||
parameters must be provided and that user must have sufficient
|
|
||||||
permissions to access the desired database.
|
|
||||||
If for any reason authorization fails, the current user authentication
|
|
||||||
will remain.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] is a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]user\f[R] \- the user name for server authentication
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]passwd\f[R] \- the password for server authentication
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]db\f[R] \- the default database.
|
|
||||||
If desired, the NULL value may be passed resulting in only changing the
|
|
||||||
user and not selecting a database.
|
|
||||||
To select a database in this case use the \f[B]mysql_select_db(3)\f[R]
|
|
||||||
function.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
mysql_change_user will always cause the current database connection to
|
|
||||||
behave as if was a completely new database connection, regardless of if
|
|
||||||
the operation was completed successfully.
|
|
||||||
This reset includes performing a rollback on any active transactions,
|
|
||||||
closing all temporary tables, and unlocking all locked tables.
|
|
||||||
.IP \[bu] 2
|
|
||||||
To prevent denial of service and brute\-force attacks the server will
|
|
||||||
block the connection if \f[C]mysql_change_user()\f[R] failed three times
|
|
||||||
in a row
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns zero on success, nonzero if an error occurred.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_real_connect(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_select_db(3)\f[R]
|
|
@ -1,28 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_close" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_close \- Closes a previously opened connection
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
void mysql_close(MYSQL *mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Closes a previously opened connection and deallocates all memory.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
To reuse a connection handle after \f[C]mysql_close()\f[R] the handle
|
|
||||||
must be initialized again by \f[B]mysql_init(3)\f[R].
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_init(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_real_connect(3)\f[R]
|
|
@ -1,33 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_commit" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_commit \- Commits the current transaction
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_bool mysql_commit(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Commits the current transaction for the specified database connection.
|
|
||||||
Returns zero on success, nonzero if an error occurred.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] is a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.PP
|
|
||||||
Executing mysql_commit() will not affected the behaviour of autocommit.
|
|
||||||
This means, any update or insert statements following mysql_commit()
|
|
||||||
will be rolled back when the connection gets closed.
|
|
||||||
.PP
|
|
||||||
== See also * \f[B]mysql_autocommit(3)\f[R] *
|
|
||||||
\f[B]mysql_rollback(3)\f[R]
|
|
@ -1,39 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_data_seek" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_data_seek \- seeks to an offset
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
void mysql_data_seek(MYSQL_RES * result,
|
|
||||||
my_ulonglong offset);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
The mysql_data_seek() function seeks to an arbitrary function result
|
|
||||||
pointer specified by the offset in the result set.
|
|
||||||
Returns zero on success, nonzero if an error occurred.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]result\f[R] \- a result set identifier returned by
|
|
||||||
mysql_store_result().
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]offset\f[R] \- the field offset.
|
|
||||||
Must be between zero and the total number of rows minus one
|
|
||||||
(0..mysql_num_rows \- 1).
|
|
||||||
.SS Notes
|
|
||||||
.PP
|
|
||||||
This function can only be used with buffered result sets obtained from
|
|
||||||
the use of the \f[B]mysql_store_result(3)\f[R] function.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_num_rows(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_store_result(3)\f[R]
|
|
@ -1,29 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_eof" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_eof \- determines if the last row of a result set has been read
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_bool mysql_eof(MYSQL_RES *result);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Determines if the last row of a result set has been read.
|
|
||||||
.PP
|
|
||||||
\f[B]Notes:\f[R] * This function is deprecated and will be removed.
|
|
||||||
Instead determine the end of a result set by checking return value of
|
|
||||||
\f[B]mysql_fetch_row(3)\f[R].
|
|
||||||
* If a result set was acquired by \f[B]mysql_store_result(3)\f[R]
|
|
||||||
mysql_eof will always return true.
|
|
||||||
## Return value Returns true if the entire result set was read.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_fetch_row(3)\f[R]
|
|
@ -1,37 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_errno" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_errno \- returns the last error code for the most recent function
|
|
||||||
call
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
unsigned int mysql_errno(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns the last error code for the most recent function call that can
|
|
||||||
succeed or fail.
|
|
||||||
Zero means no error occurred.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] is a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
Client error codes are listed in \f[C]errmsg.h\f[R] header file, server
|
|
||||||
error codes are listed in \f[C]mysqld_error.h\f[R] header file of the
|
|
||||||
server source distribution.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_error(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_sqlstate(3)\f[R]
|
|
@ -1,41 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_error" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_error \- returns the last error message for the most recent
|
|
||||||
function call
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
const char * mysql_error(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns the last error message for the most recent function call that
|
|
||||||
can succeed or fail.
|
|
||||||
An empty string means no error occurred.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] is a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
Client error codes are listed in \f[C]errmsg.h\f[R] header file, server
|
|
||||||
error codes are listed in \f[C]mysqld_error.h\f[R] header file of the
|
|
||||||
server source distribution.
|
|
||||||
.IP \[bu] 2
|
|
||||||
Client error messages can be obtained by calling
|
|
||||||
\f[B]mariadb_get_infov(3)\f[R] and passing the parameter
|
|
||||||
\f[C]MARIADB_CLIENT_ERRORS\f[R]
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_errno(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_sqlstate(3)\f[R]
|
|
@ -1,49 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_fetch_field" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_fetch_field \- Returns the definition of one column of a result
|
|
||||||
set
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
MYSQL_FIELD * mysql_fetch_field(MYSQL_RES * result);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns the definition of one column of a result set as a pointer to a
|
|
||||||
MYSQL_FIELD structure.
|
|
||||||
Call this function repeatedly to retrieve information about all columns
|
|
||||||
in the result set.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]result\f[R] \- a result set identifier returned by
|
|
||||||
\f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
The field order will be reset if you execute a new SELECT query.
|
|
||||||
.IP \[bu] 2
|
|
||||||
In case only information for a specific field is required the field can
|
|
||||||
be selected by using the \f[B]mysql_field_seek(3)\f[R] function or
|
|
||||||
obtained by \f[B]mysql_fetch_field_direct(3)\f[R] function.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
a pointer of a \f[C]MYSQL_FIELD\f[R] structure, or NULL if there are no
|
|
||||||
more fields.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_field_seek(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_field_tell(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_fetch_field_direct(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_store_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_use_result(3)\f[R]
|
|
@ -1,36 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_fetch_field_direct" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_fetch_field_direct \- Returns a pointer to a MYSQL_FIELD structure
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
MYSQL_FIELD * mysql_fetch_field_direct(MYSQL_RES * res,
|
|
||||||
unsigned int fieldnr);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns a pointer to a \f[C]MYSQL_FIELD\f[R] structure which contains
|
|
||||||
field information from the specified result set.
|
|
||||||
### Parameter * \f[C]res\f[R] \- a result set identifier returned by
|
|
||||||
\f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R].
|
|
||||||
* \f[C]fieldnr\f[R] \- the field number.
|
|
||||||
This value must be within the range from 0 to number of fields \- 1 ###
|
|
||||||
Notes * The total number of fields can be obtained by
|
|
||||||
mysql_field_count()
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Pointer to a \f[C]MYSQL_FIELD\f[R] structure or \f[C]NULL\f[R] if an
|
|
||||||
invalid field number was specified
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_fetch_field(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_field_count(3)\f[R]
|
|
@ -1,41 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_fetch_fields" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_fetch_fields \- returns an array of fields
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
MYSQL_FIELD * mysql_fetch_fields(MYSQL_RES * res);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
This function serves an identical purpose to the
|
|
||||||
\f[B]mysql_fetch_field(3)\f[R] function with the single difference that
|
|
||||||
instead of returning one field at a time for each field, the fields are
|
|
||||||
returned as an array.
|
|
||||||
Each field contains the definition for a column of the result set.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]res\f[R] \- a result set identifier returned by
|
|
||||||
\f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.PP
|
|
||||||
The total number of fields can be obtained by
|
|
||||||
\f[B]mysql_field_count(3)\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
an array of type \f[C]MYSQL_FIELD\f[R].
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_fetch_field(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_fetch_field_direct(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_field_count(3)\f[R]
|
|
@ -1,41 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_fetch_lengths" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_fetch_lengths \- returns an array of length values for the current
|
|
||||||
row
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
unsigned long * mysql_fetch_lengths(MYSQL_RES * result);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
The \f[C]mysql_fetch_lengths()\f[R] function returns an array containing
|
|
||||||
the lengths of every column of the current row within the result set
|
|
||||||
(not including terminating zero character) or \f[C]NULL\f[R] if an error
|
|
||||||
occurred.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]result\f[R] \- a result set identifier returned by
|
|
||||||
\f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R].
|
|
||||||
### Notes \f[C]mysql_fetch_lengths()\f[R] is valid only for the current
|
|
||||||
row of the result set.
|
|
||||||
It returns \f[C]NULL\f[R] if you call it before calling
|
|
||||||
\f[B]mysql_fetch_row(3)\f[R] or after retrieving all rows in the result.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
An array of unsigned long values .
|
|
||||||
The size of the array can be determined by the number of fields in
|
|
||||||
current result set.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_field_count(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_fetch_row(3)\f[R]
|
|
@ -1,44 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_fetch_row" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_fetch_row \- fetches row of data from result set
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
MYSQL_ROW mysql_fetch_row(MYSQL_RES * result);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Fetches one row of data from the result set and returns it as an array
|
|
||||||
of char pointers (\f[C]MYSQL_ROW\f[R]), where each column is stored in
|
|
||||||
an offset starting from 0 (zero).
|
|
||||||
Each subsequent call to this function will return the next row within
|
|
||||||
the result set, or NULL if there are no more rows.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]result\f[R] \- a result set identifier returned by
|
|
||||||
\f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
If a column contains a \f[C]NULL\f[R] value the corresponding char
|
|
||||||
pointer will be set to \f[C]NULL\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
Memory associated to \f[C]MYSQL_ROW\f[R] will be freed when calling
|
|
||||||
\f[B]mysql_free_result(3)\f[R] function.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
A \f[C]MYSQL_ROW\f[R] structure (array of character pointers)
|
|
||||||
representing the data of the current row.
|
|
||||||
If there are no more rows available \f[C]NULL\f[R]will be returned.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_use_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_store_result(3)\f[R]
|
|
@ -1,43 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_field_count" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_field_count \- returns the number of columns for the most recent
|
|
||||||
statement
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
unsigned int mysql_field_count(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns the number of columns for the most recent statement on the
|
|
||||||
connection represented by the link parameter as an unsigned integer.
|
|
||||||
This function can be useful when using the
|
|
||||||
\f[B]mysql_store_result(3)\f[R] function to determine if the query
|
|
||||||
should have produced a non\-empty result set or not without knowing the
|
|
||||||
nature of the query.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] is a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.PP
|
|
||||||
The \f[C]mysql_field_count()\f[R] function should be used to determine
|
|
||||||
if there is a result set available.
|
|
||||||
.SS Return value:
|
|
||||||
.PP
|
|
||||||
The number of columns for the most recent statemet.
|
|
||||||
The value is zero, if the statemet didn\[cq]t produce a result set.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_store_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_use_result(3)\f[R]
|
|
@ -1,43 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_field_seek" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_field_seek \- sets the field cursor to given offset
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES * result,
|
|
||||||
MYSQL_FIELD_OFFSET offset);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Sets the field cursor to the given offset.
|
|
||||||
The next call to \f[B]mysql_fetch_field(3)\f[R] will retrieve the field
|
|
||||||
definition of the column associated with that offset.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]result\f[R] \- a result set identifier returned by
|
|
||||||
\f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]offset\f[R] \- the field number.
|
|
||||||
This number must be in the range from
|
|
||||||
\f[C]0\f[R]..\f[C]number of fields \- 1\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
The number of fields can be obtained from \f[B]mysql_field_count(3)\f[R]
|
|
||||||
\&.
|
|
||||||
.IP \[bu] 2
|
|
||||||
To move the field cursor to the first field offset parameter should be
|
|
||||||
zero.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns the previous value of the field cursor
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_field_tell(3)\f[R]
|
|
@ -1,32 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_field_tell" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_field_tell \- Returns offset of the field cursor
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
MYSQL_FIELD_OFFSET mysql_field_tell(MYSQL_RES * result);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Return the offset of the field cursor used for the last
|
|
||||||
\f[B]mysql_fetch_field(3)\f[R] call.
|
|
||||||
This value can be used as a parameter for the function
|
|
||||||
\f[B]mysql_field_seek(3)\f[R].
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]result\f[R] \- a result set identifier returned by
|
|
||||||
\f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns the current offset of the field cursor
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_field_seek(3)\f[R]
|
|
@ -1,36 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_free_result" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_free_result \- Frees result set
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
void mysql_free_result(MYSQL_RES * result);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Frees the memory associated with a result set.
|
|
||||||
Returns void.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]result\f[R] \- a result set identifier returned by
|
|
||||||
\f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
You should always free your result set with mysql_free_result() as soon
|
|
||||||
it\[cq]s not needed anymore
|
|
||||||
.IP \[bu] 2
|
|
||||||
Row values obtained by a prior \f[B]mysql_fetch_row(3)\f[R] call will
|
|
||||||
become invalid after calling mysql_free_result().
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_store_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_use_result(3)\f[R]
|
|
@ -1,39 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_get_character_set_info" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_get_character_set_info \- returns character set information
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
void mysql_get_character_set_info(MYSQL * mysql,
|
|
||||||
MY_CHARSET_INFO * charset);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns information about the current default character set for the
|
|
||||||
specified connection.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]charset\f[R] \- a pointer to a \f[C]MY_CHARSET_INFO\f[R] structure,
|
|
||||||
in which the information will be copied.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
A complete list of supported character sets in the client library is
|
|
||||||
listed in the function description for
|
|
||||||
\f[B]mysql_set_character_set(3)\f[R].
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_get_infov(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_set_character_set(3)\f[R]
|
|
@ -1,31 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_get_client_info" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_get_client_info \- returns client library version as string
|
|
||||||
representation
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
const char * mysql_get_client_info(void );
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns a string representing the client library version
|
|
||||||
.SS Notes
|
|
||||||
.PP
|
|
||||||
To obtain the numeric value of the client library version use
|
|
||||||
\f[B]mysql_get_client_version(3)\f[R].
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_get_client_version(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_get_host_info(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_get_proto_info(3)\f[R]
|
|
@ -1,32 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_get_client_version" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_get_client_version \- returns client version number
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
unsigned long mysql_get_client_version(void);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns a number representing the client library version.
|
|
||||||
The value has the format XXYYZZ: major version * 10000 + minor version *
|
|
||||||
100 + patch version.
|
|
||||||
### Notes * To obtain a string containing the client library version use
|
|
||||||
the \f[B]mysql_get_client_info(3)\f[R] function.
|
|
||||||
* Note: Since MariaDB Server 10.2.6 and MariaDB Connector/C 3.0.1 the
|
|
||||||
client library is bundled with server package and returns the server
|
|
||||||
package version.
|
|
||||||
To obtain the client version of the connector, please use the constant
|
|
||||||
\f[C]MARIADB_PACKAGE_VERSION_ID\f[R]
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
A long integer representing the client version
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_get_client_info(3)\f[R]
|
|
@ -1,32 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_get_host_info" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_get_host_info \- Returns host information
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
const char * mysql_get_host_info(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Describes the type of connection in use for the connection, including
|
|
||||||
the server host name.
|
|
||||||
Returns a string, or NULL if the connection is not valid.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns a string, describing host information or \f[C]NULL\f[R] if the
|
|
||||||
connection is not valid.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_get_server_version(3)\f[R]
|
|
@ -1,33 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_get_proto_info" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_get_proto_info \- Returns protocol version number
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
unsigned int mysql_get_proto_info(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns the protocol version number for the specified connection
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.PP
|
|
||||||
MariaDB Connector/C doesn\[cq]t support protocol version 9 and prior.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
The protocol version number in use
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_get_host_info(3)\f[R]
|
|
@ -1,37 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_get_server_info" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_get_server_info \- Returns server version as string
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
const char * mysql_get_server_info(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns the server version or \f[C]NULL\f[R] on failure.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.PP
|
|
||||||
To obtain the numeric server version please use
|
|
||||||
\f[B]mysql_get_server_version(3)\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns the server version as zero terminated string or \f[C]NULL\f[R]on
|
|
||||||
failure.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_get_server_info(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_get_client_info(3)\f[R]
|
|
@ -1,34 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_get_server_version" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_get_server_version \- returns numeric server version
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
unsigned long mysql_get_server_version(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns an integer representing the version of connected server.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.PP
|
|
||||||
The form of the version number is VERSION_MAJOR * 10000 + VERSION_MINOR
|
|
||||||
* 100 + VERSION_PATCH.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
The version number of the connected server
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_get_server_info(3)\f[R]
|
|
@ -1,33 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_get_socket" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_get_socket \- Returns the descriptor of the socket used for the
|
|
||||||
current connection
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_socket mysql_get_socket(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns the descriptor of the socket used for the current connection.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
A socket handle or INVALID_SOCKET (\-1) if the socket descriptor could
|
|
||||||
not be determined, e.g.\ if the connection doesn\[cq]t use a socket
|
|
||||||
connection.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_real_connect(3)\f[R]
|
|
@ -1,47 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_get_ssl_cipher" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_get_ssl_cipher \- returns the cipher suite in use
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
const char *mysql_get_ssl_cipher(MYSQL *mysql)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns the name of the currently used cipher suite of the secure
|
|
||||||
connection, or NULL for non TLS connections.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
For using \f[C]mysql_get_ssl_cipher()\f[R] MariaDB Connector/C must be
|
|
||||||
built with TLS/SSL support, otherwise the function will return NULL.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\[ga]mysql_get_ssl_cipher()\[cq] can be used to determine if the client
|
|
||||||
server connection is secure.
|
|
||||||
.IP \[bu] 2
|
|
||||||
Depending on the TLS library in use (OpenSSL, GnuTLS or Windows
|
|
||||||
Schannel) the name of the cipher suites may differ.
|
|
||||||
For example the cipher suite 0x002F
|
|
||||||
(\f[C]TLS_RSA_WITH_AES_128_CBC_SHA\f[R]) has different names:
|
|
||||||
\f[C]AES128\-SHA\f[R] for OpenSSL and Schannel and
|
|
||||||
\f[C]TLS_RSA_AES_128_CBC_SHA1\f[R] for GnuTLS.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns a zero terminated string containing the cipher suite used for a
|
|
||||||
secure connection, or \f[C]NULL\f[R] if connection doesn\[cq]t use
|
|
||||||
TLS/SSL.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_ssl_set(3)\f[R]
|
|
@ -1,41 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_hex_string" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_hex_string \- create a hexadecimal string
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
unsigned long mysql_hex_string(char * to,
|
|
||||||
const char * from,
|
|
||||||
unsigned long len);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
This function is used to create a hexadecimal string which can be used
|
|
||||||
in SQL statements.
|
|
||||||
e.g.\ \f[C]INSERT INTO my_blob VALUES(X\[aq]A0E1CD\[aq])\f[R].
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]to\f[R] \- result buffer
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]from\f[R] \- the string which will be encoded
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]len\f[R] \- length of the string (from)
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
The size of the buffer for the encoded string must be 2 * length + 1.
|
|
||||||
.IP \[bu] 2
|
|
||||||
The encoded string does not contain a leading X\[cq].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns the length of the encoded string without the trailing null
|
|
||||||
character.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_real_escape_string(3)\f[R]
|
|
@ -1,76 +0,0 @@
|
|||||||
.\"t
|
|
||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_info" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_info \- provides information about the last executed statement
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
const char * mysql_info(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
The \f[C]mysql_info()\f[R] function returns a string providing
|
|
||||||
information about the last statement executed.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.PP
|
|
||||||
Statements which do not fall into one of the preceding formats are not
|
|
||||||
supported (e.g.\ \f[C]SELECT\f[R]).
|
|
||||||
In these situations mysql_info() will return an empty string.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Zero terminated information string.
|
|
||||||
The information depends on statement type:
|
|
||||||
.PP
|
|
||||||
.TS
|
|
||||||
tab(@);
|
|
||||||
lw(35.0n) lw(35.0n).
|
|
||||||
T{
|
|
||||||
Query type
|
|
||||||
T}@T{
|
|
||||||
Example result string
|
|
||||||
T}
|
|
||||||
_
|
|
||||||
T{
|
|
||||||
\f[C]INSERT INTO...SELECT...\f[R]
|
|
||||||
T}@T{
|
|
||||||
Records: 100 Duplicates: 0 Warnings: 0
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]INSERT INTO...VALUES (...),(...),(...)\f[R]
|
|
||||||
T}@T{
|
|
||||||
Records: 3 Duplicates: 0 Warnings: 0
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]LOAD DATA INFILE\f[R]
|
|
||||||
T}@T{
|
|
||||||
Records: 1 Deleted: 0 Skipped: 0 Warnings: 0
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]ALTER TABLE ...\f[R]
|
|
||||||
T}@T{
|
|
||||||
Records: 3 Duplicates: 0 Warnings: 0
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]UPDATE ...\f[R]
|
|
||||||
T}@T{
|
|
||||||
Rows matched: 40 Changed: 40 Warnings: 0
|
|
||||||
T}
|
|
||||||
.TE
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_affected_rows(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_warning_count(3)\f[R]
|
|
@ -1,39 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_init" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_init \- Prepares and initializes a \f[C]MYSQL\f[R] structure
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
MYSQL *mysql_init(MYSQL *mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Prepares and initializes a \f[C]MYSQL\f[R] structure to be used with
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
If an address of a \f[C]MYSQL\f[R] structure was passed as parameter,
|
|
||||||
the structure will be initialized, if \f[C]NULL\f[R] was passed, a new
|
|
||||||
structure will be allocated and initialized.
|
|
||||||
.PP
|
|
||||||
\f[B]Notes:\f[R] * If parameter \f[C]mysql\f[R] is not \f[C]NULL\f[R]
|
|
||||||
\f[B]mysql_close(3)\f[R] API function will not release the memory * Any
|
|
||||||
subsequent calls to any function (except \f[B]mysql_optionsv(3)\f[R]
|
|
||||||
will fail until \f[B]mysql_real_connect(3)\f[R] was called.
|
|
||||||
* Memory allocated by \f[C]mysql_init()\f[R] must be freed with
|
|
||||||
\f[B]mysql_close(3)\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
The \f[C]mysql_init()\f[R] function returns an address of a
|
|
||||||
\f[C]MYSQL\f[R] structure, or NULL in case of memory allcation error.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_close(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_optionsv(3)\f[R]
|
|
@ -1,33 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_insert_id" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_insert_id \- returns the auto generated ID used in last statement
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_ulonglong mysql_insert_id(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns the auto generated ID generated by a SQL statement (usually
|
|
||||||
INSERT) on a table for a column defined with AUTO_INCREMENT attribute.
|
|
||||||
.SS Parameters:
|
|
||||||
.PP
|
|
||||||
\f[C]mysql\f[R] is a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SH Return value
|
|
||||||
.PP
|
|
||||||
Returns the value of the modified column with AUTO_INCREMENT attribute.
|
|
||||||
If the table doesn\[cq]t contain an auto_increment column or no
|
|
||||||
INSERT/UPDATE statement was executed, this function will return zero.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_query(3)\f[R]
|
|
@ -1,51 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_kill" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_kill \- Kills a connection
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_kill(MYSQL * mysql,
|
|
||||||
unsigned long);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
This function is used to ask the server to kill a MariaDB thread
|
|
||||||
specified by the processid parameter.
|
|
||||||
This value must be retrieved by [show\-processlist()](SHOW
|
|
||||||
PROCESSLIST]].
|
|
||||||
If trying to kill the own connection \f[B]mysql_thread_id(3)\f[R] should
|
|
||||||
be used.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
Returns 0 on success, otherwise nonzero.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]long\f[R] \- process id
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
To stop a running command without killing the connection use
|
|
||||||
\f[C]KILL QUERY\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
The \f[C]mysql_kill()\f[R] function only kills a connection, it
|
|
||||||
doesn\[cq]t free any memory \- this must be done explicitly by calling
|
|
||||||
\f[B]mysql_close(3)\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns zero on success, non zero on error.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_thread_id(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_close(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_cancel(3)\f[R]
|
|
@ -1,47 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_more_results" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_more_results \- indicates if one or more results are available
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_bool mysql_more_results(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Indicates if one or more result sets are available from a previous call
|
|
||||||
to \f[B]mysql_real_query(3)\f[R].
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
The function \f[B]mysql_set_server_option(3)\f[R] enables or disables
|
|
||||||
multi statement support.
|
|
||||||
.IP \[bu] 2
|
|
||||||
Multiple result sets can be obtained either by calling a stored
|
|
||||||
procedure or by executing concatenated statements,
|
|
||||||
e.g.\ \f[C]SELECT a FROM t1;SELECT b, c FROM t2\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns 1 if more result sets are available, otherwise zero.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_real_query(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_use_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_store_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_next_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_set_server_option(3)\f[R]
|
|
@ -1,45 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_next_result" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_next_result \- prepares next result set
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_next_result(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Prepares next result set from a previous call to
|
|
||||||
\f[B]mysql_real_query(3)\f[R] which can be retrieved by
|
|
||||||
\f[B]mysql_store_result(3)\f[R] or
|
|
||||||
[mysql_use_result()](()](mysql_use_result).
|
|
||||||
Returns zero on success, nonzero if an error occurred.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
If a multi query contains errors the return value of
|
|
||||||
\f[B]mysql_errno(3)\f[R] and \f[B]mysql_error(3)\f[R] might change and
|
|
||||||
there will be no result set available.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns zero on success, non zero value on error.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_real_query(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_store_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_use_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_more_results(3)\f[R]
|
|
@ -1,31 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_num_fields" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_num_fields \- Returns number of fields in a result set
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
unsigned int mysql_num_fields(MYSQL_RES * );
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns number of fields in a specified result set.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL RES *\f[R] \- A result set identifier returned by
|
|
||||||
\f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns number of fields.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_fetch_field(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_field_count(3)\f[R]
|
|
@ -1,35 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_num_rows" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_num_rows \- Returns number of rows in a result set.
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_ulonglong mysql_num_rows(MYSQL_RES * );
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns number of rows in a result set.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_RES\f[R] \- a result set identifier returned by
|
|
||||||
\f[B]mysql_store_result(3)\f[R] or \f[B]mysql_use_result(3)\f[R].
|
|
||||||
### Notes The behaviour of \f[C]mysql_num_rows()\f[R] depends on whether
|
|
||||||
buffered or unbuffered result sets are being used.
|
|
||||||
For unbuffered result sets, \f[C]mysql_num_rows()\f[R] will not return
|
|
||||||
the correct number of rows until all the rows in the result have been
|
|
||||||
retrieved.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_affected_rows(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_use_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_store_result(3)\f[R]
|
|
@ -1,37 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_options" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_options \- Used to set extra connect options and affect behavior
|
|
||||||
of a connection
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_options(MYSQL * mysql,
|
|
||||||
enum mysql_option,
|
|
||||||
const void * arg);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Used to set extra connect options and affect behavior for a connection.
|
|
||||||
This function may be called multiple times to set several options.
|
|
||||||
\f[C]mysql_options()\f[R] should be called after
|
|
||||||
\f[B]mysql_init(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.PP
|
|
||||||
This function is deprecated, new implementations should use
|
|
||||||
\f[B]mysql_optionsv(3)\f[R] api function instead.
|
|
||||||
.SS Options
|
|
||||||
.PP
|
|
||||||
An overview of the possible options can be found in the description of
|
|
||||||
the \f[B]mysql_optionsv(3)\f[R] API function.
|
|
||||||
.SS See Also
|
|
||||||
.PP
|
|
||||||
\f[I]\f[BI]mysql_init(3)\f[I] \f[R]\f[B]mysql_optionsv(3)\f[R]
|
|
||||||
*\f[B]mysql_real_connect(3)\f[R]
|
|
@ -1,38 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_options4" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_options4 \- Used to set extra connect options and affect behavior
|
|
||||||
of a connection
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_options4(MYSQL * mysql,
|
|
||||||
enum mysql_option,
|
|
||||||
const void * arg1,
|
|
||||||
const void * arg2);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Used to set extra connect options and affect behavior for a connection.
|
|
||||||
This function may be called multiple times to set several options.
|
|
||||||
\f[C]mysql_options()\f[R] should be called after
|
|
||||||
\f[B]mysql_init(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.PP
|
|
||||||
This function is deprecated, new implementations should use
|
|
||||||
\f[B]mysql_optionsv(3)\f[R] api function instead.
|
|
||||||
.SS Options
|
|
||||||
.PP
|
|
||||||
An overview of the possible options can be found in the description of
|
|
||||||
the \f[B]mysql_optionsv(3)\f[R] API function.
|
|
||||||
.SS See Also
|
|
||||||
.PP
|
|
||||||
\f[I]\f[BI]mysql_init(3)\f[I] \f[R]\f[B]mysql_optionsv(3)\f[R]
|
|
||||||
*\f[B]mysql_real_connect(3)\f[R]
|
|
@ -1,420 +0,0 @@
|
|||||||
.\"t
|
|
||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_optionsv" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_optionsv \- Used to set extra connect options and affect behavior
|
|
||||||
of a connection
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_optionsv(MYSQL * mysql,
|
|
||||||
enum mysql_option,
|
|
||||||
const void * arg,
|
|
||||||
...);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Used to set extra connect options and affect behavior for a connection.
|
|
||||||
This function may be called multiple times to set several options.
|
|
||||||
\f[C]mysql_optionsv()\f[R] should be called after
|
|
||||||
\f[B]mysql_init(3)\f[R].
|
|
||||||
.SS Options
|
|
||||||
.PP
|
|
||||||
The following table shows which variable type to use for each option.
|
|
||||||
.PP
|
|
||||||
.TS
|
|
||||||
tab(@);
|
|
||||||
lw(35.0n) lw(35.0n).
|
|
||||||
T{
|
|
||||||
Variable Type
|
|
||||||
T}@T{
|
|
||||||
Values
|
|
||||||
T}
|
|
||||||
_
|
|
||||||
T{
|
|
||||||
\f[C]my_bool\f[R]
|
|
||||||
T}@T{
|
|
||||||
\f[C]MYSQL_OPT_RECONNECT\f[R], \f[C]MYSQL_SECURE_AUTH\f[R],
|
|
||||||
\f[C]MYSQL_REPORT_DATA_TRUNCATION\f[R], \f[C]MYSQL_OPT_SSL_ENFORCE\f[R],
|
|
||||||
\f[C]MYSQL_OPT_SSL_VERIFY_SERVER_CERT\f[R]
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]unsigned int\f[R]
|
|
||||||
T}@T{
|
|
||||||
\f[C]MYSQL_OPT_PORT\f[R], \f[C]MYSQL_OPT_LOCAL_INFILE\f[R],
|
|
||||||
\f[C]MYSQL_OPT_CONNECT_TIMEOUT\f[R], \f[C]MYSQL_OPT_PROTOCOL\f[R],
|
|
||||||
\f[C]MYSQL_OPT_READ_TIMEOUT\f[R], \f[C]MYSQL_OPT_WRITE_TIMEOUT\f[R]
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]unsigned long\f[R]
|
|
||||||
T}@T{
|
|
||||||
\f[C]MYSQL_OPT_NET_BUFFER_LENGTH\f[R],
|
|
||||||
\f[C]MYSQL_OPT_MAX_ALLOWED_PACKET\f[R]
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]const char *\f[R]
|
|
||||||
T}@T{
|
|
||||||
\f[C]MYSQL_INIT_COMMAND\f[R], \f[C]MARIADB_OPT_UNIXSOCKET\f[R],
|
|
||||||
\f[C]MARIADB_OPT_PASSWORD\f[R] , \f[C]MARIADB_OPT_USER\f[R],
|
|
||||||
\f[C]MARIADB_OPT_HOST\f[R], \f[C]MARIADB_OPT_SCHEMA\f[R],
|
|
||||||
\f[C]MYSQL_OPT_SSL_KEY\f[R], \f[C]MYSQL_OPT_SSL_CERT\f[R],
|
|
||||||
\f[C]MYSQL_OPT_SSL_CA\f[R], \f[C]MYSQL_OPT_SSL_CAPATH\f[R],
|
|
||||||
\f[C]MYSQL_SET_CHARSET_NAME\f[R], \f[C]MYSQL_SET_CHARSET_DIR\f[R],
|
|
||||||
\f[C]MYSQL_OPT_SSL_CIPHER\f[R], \f[C]MYSQL_SHARED_MEMORY_BASE_NAME\f[R],
|
|
||||||
\f[C]MYSQL_PLUGIN_DIR\f[R], \f[C]MYSQL_DEFAULT_AUTH\f[R],
|
|
||||||
\f[C]MARIADB_OPT_SSL_FP\f[R], \f[C]MARIADB_OPT_SSL_FP_LIST\f[R],
|
|
||||||
\f[C]MARIADB_OPT_TLS_PASSPHRASE\f[R], \f[C]MARIADB_OPT_TLS_VERSION\f[R],
|
|
||||||
\f[C]MYSQL_OPT_BIND\f[R], \f[C]MYSQL_OPT_CONNECT_ATTR_DELETE\f[R],
|
|
||||||
\f[C]MYSQL_OPT_CONNECT_ATTR_ADD\f[R],
|
|
||||||
\f[C]MARIADB_OPT_CONNECTION_HANDLER\f[R],
|
|
||||||
\f[C]MYSQL_SERVER_PUBLIC_KEY\f[R], \f[C]MARIADB_OPT_RESTRICTED_AUTH\f[R]
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\-
|
|
||||||
T}@T{
|
|
||||||
\f[C]MYSQL_OPT_CONNECT_ATTR_RESET\f[R]
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
void *
|
|
||||||
T}@T{
|
|
||||||
\f[C]MARIADB_OPT_PROXY_HEADER\f[R]
|
|
||||||
T}
|
|
||||||
.TE
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_INIT_COMMAND\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Command(s) which will be executed when connecting and reconnecting to
|
|
||||||
the server.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_COMPRESS\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Use the compressed protocol for client server communication.
|
|
||||||
If the server doesn\[cq]t support compressed protocol, the default
|
|
||||||
protocol will be used.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_CONNECT_TIMEOUT\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Connect timeout in seconds.
|
|
||||||
This value will be passed as an unsigned ##int## parameter.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_LOCAL_INFILE\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Enable or disable the use of \f[C]LOAD DATA LOCAL INFILE\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_NAMED_PIPE\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
For Windows operating systems only: Use named pipes for client/server
|
|
||||||
communication.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_PROGRESS_CALLBACK\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specifies a callback function which will be able to visualize the
|
|
||||||
progress of certain long running statements
|
|
||||||
(i.e.\ \f[C]LOAD DATA LOCAL INFILE\f[R] or \f[C]ALTER TABLE\f[R]).
|
|
||||||
The callback function must be defined as followed:
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
static void report_progress(const MYSQL *mysql __attribute__((unused)),
|
|
||||||
uint stage, uint max_stage,
|
|
||||||
double progress __attribute__((unused)),
|
|
||||||
const char *proc_info __attribute__((unused)),
|
|
||||||
uint proc_info_length __attribute__((unused)))
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_PROTOCOL\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specify the type of client/server protocol.
|
|
||||||
Possible values are: \f[C]MYSQL_PROTOCOL_TCP\f[R],
|
|
||||||
\f[C]MYSQL_PROTOCOL_SOCKET\f[R], \f[C]MYSQL_PROTOCOL_PIPE\f[R] and
|
|
||||||
\f[C]MYSQL_PROTOCOL_MEMORY\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_RECONNECT\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Enable or disable automatic reconnect.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_READ_TIMEOUT\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specifies the timeout in seconds for reading packets from the server.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_WRITE_TIMEOUT\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specifies the timeout in seconds for sending packets to the server.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_READ_DEFAULT_FILE\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Read options from named configuration file.
|
|
||||||
To read from default \f[C]my.cnf\f[R] configuration file, a NULL pointer
|
|
||||||
has to be passed with option MYSQL_READ_DEFAULT_GROUP.
|
|
||||||
\f[B]Note:\f[R] MariaDB Connector/C will not read the configuration by
|
|
||||||
default.
|
|
||||||
If \f[C]MYSQL_READ_DEFAULT_FILE\f[R] is specified the following sections
|
|
||||||
will be always processed:
|
|
||||||
.IP \[bu] 2
|
|
||||||
[client]
|
|
||||||
.IP \[bu] 2
|
|
||||||
[client\-server]
|
|
||||||
.IP \[bu] 2
|
|
||||||
[client\-mariadb]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_READ_DEFAULT_GROUP\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Read options from the named group from default configuration
|
|
||||||
file (config_files) or the file specified with MYSQL_READ_DEFAULT_FILE.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_REPORT_DATA_TRUNCATION\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Enable or disable reporting data truncation errors for prepared
|
|
||||||
statements.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_BIND\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specify the network interface from which to connect to MariaDB Server.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_PLUGIN_DIR\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specify the location of client plugins.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_NONBLOCK\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specify stack size for non blocking operations.
|
|
||||||
The argument for MYSQL_OPT_NONBLOCK is the size of the stack used to
|
|
||||||
save the state of a non\-blocking operation while it is waiting for I/O
|
|
||||||
and the application is doing other processing.
|
|
||||||
Normally, applications will not have to change this, and it can be
|
|
||||||
passed as zero to use the default value.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MARIADB_OPT_CONNECTION_HANDLER\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specify the name of a connection handler plugin.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MARIADB_OPT_USERDATA\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Bundle user data to the current connection, e.g.\ for use in connection
|
|
||||||
handler plugins.
|
|
||||||
This option requires 4 parameters: connection, option, key and value:
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
mysql_optionsv(mysql, MARIADB_OPT_USERDATA, (void *)\[dq]ssh_user\[dq], (void *)ssh_user);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MARIADB_OPT_CONNECTION_READ_ONLY\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
This option is used by connection handler plugins and indicates that the
|
|
||||||
current connection will be used for read operations only.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
If this option is set, the client indicates that it will be able to
|
|
||||||
handle expired passwords by setting the
|
|
||||||
\f[C]CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS\f[R] capability flag.
|
|
||||||
If the password has expired and
|
|
||||||
\f[C]CLIENT_CAN_HANDLE_EXPIRED_PASSWORDS\f[R] is set, the server will
|
|
||||||
not return an error when connecting, but put the connection in sandbox
|
|
||||||
mode, where all commands will return error 1820
|
|
||||||
(\f[C]ER_MUST_CHANGE_PASSWORD\f[R]) unless a new password was set.
|
|
||||||
This option was added in MariaDB Connector/C 3.0.4
|
|
||||||
.SS TLS/SSL and Security options
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_SSL_KEY\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specify the name of a key for a secure connection.
|
|
||||||
If the key is protected with a passphrase, the passphrase needs to be
|
|
||||||
specified with \f[C]MARIADB_OPT_PASSPHRASE\f[R] option.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_SSL_CERT\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specify the name of a certificate for a secure connection.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_SSL_CA\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specify the name of a file which contains one or more trusted CAs.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_SSL_CAPATH\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specify the path which contains trusted CAs.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_SSL_CIPHER\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specify one or more (SSLv3, TLSv1.0 or TLSv1.2) cipher suites for TLS
|
|
||||||
encryption.
|
|
||||||
Even if Connector/C supports TLSv1.3 protocol, it is not possible yet to
|
|
||||||
specify TLSv1.3 cipher suites.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_SSL_CRL\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specify a file with a certificate revocation list.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_SSL_CRLPATH\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specify a directory with contains files with certificate revocation
|
|
||||||
lists.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MARIADB_OPT_SSL_FP\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specify the SHA1 fingerprint of a server certificate for validation
|
|
||||||
during the TLS handshake.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MARIADB_OPT_SSL_FP\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specify a file which contains one or more SHA1 fingerprints of server
|
|
||||||
certificates for validation during the TLS handshake.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MARIADB_OPT_SSL_PASPHRASE\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specify a passphrase for a passphrase protected client key.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_SSL_VERIFY_SERVER_CERT\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Enable (or disable) the verification of the hostname against common name
|
|
||||||
(CN) of the server\[cq]s host certificate.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_SERVER_PUBLIC_KEY\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specifies the name of the file which contains the RSA public key of the
|
|
||||||
database server.
|
|
||||||
The format of this file must be in PEM format.
|
|
||||||
This option is used by the caching_sha2_password plugin and was added in
|
|
||||||
Connector/C 3.1.0
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MARIADB_OPT_TLS_CIPHER_STRENGTH\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
This option is not in use anymore.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MARIADB_OPT_RESTRICTED_AUTH\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Specifies one or more comma separated authentication plugins which are
|
|
||||||
allowed for authentication.
|
|
||||||
If the database server asks for an authentication plugin not listed in
|
|
||||||
this option, MariaDB Connector/C will return an error.
|
|
||||||
This option was added in MariaDB Connector/C 3.3.0
|
|
||||||
.SS Proxy settings
|
|
||||||
.PP
|
|
||||||
As per the proxy protocol specification, the connecting client can
|
|
||||||
prefix its first packet with a proxy protocol header.
|
|
||||||
The server will parse the header and assume the client\[cq]s IP address
|
|
||||||
is the one set in the proxy header.
|
|
||||||
* \f[C]MARIADB_OPT_PROXY_HEADER\f[R] \- specifies the proxy header which
|
|
||||||
will be prefixed to the first packet.
|
|
||||||
Parameters are void * for the prefix buffer and size_t for length of the
|
|
||||||
buffer:
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
const char *hdr=\[dq]PROXY TCP4 192.168.0.1 192.168.0.11 56324 443\[rs]r\[rs]n\[dq];
|
|
||||||
mysql_optionsv(mysql, MARIADB_OPT_PROXY_HEADER, hdr, strlen(hdr));
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Connection Attributes
|
|
||||||
.PP
|
|
||||||
Connection attributes are stored in the \f[C]session_connect_attrs\f[R]
|
|
||||||
and \f[C]session_account_connect_attrs\f[R]Performance Schema tables.
|
|
||||||
By default, MariaDB Connector/C sends the following connection
|
|
||||||
attributes to the server: * \f[C]_client_name\f[R]: always
|
|
||||||
\[lq]libmariadb\[rq] * \f[C]_client_version\f[R]: version of MariaDB
|
|
||||||
Connector/C * \f[C]_os\f[R]: operation system * _pid: process id *
|
|
||||||
\f[C]_platform\f[R]: e.g.\ x86 or x64 * \f[C]_server_host\f[R]: the
|
|
||||||
hostname (as specified in mysql_real_connect).
|
|
||||||
This attribute was added in Connector/C 3.0.5
|
|
||||||
.PP
|
|
||||||
\f[B]Note:\f[R] If the Performance Schema is disabled, connection
|
|
||||||
attributes will not be stored on server.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_CONNECT_ATTR_DELETE\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Deletes a connection attribute for the given key.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_CONNECT_ATTR_ADD\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Adds a key/value pair to connection attributes.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]MYSQL_OPT_CONNECT_ATTR_RESET\f[R]
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
Clears the current list of connection attributes.
|
|
||||||
.SS See Also
|
|
||||||
.PP
|
|
||||||
\f[I]\f[BI]mysql_init(3)\f[I] \f[R]\f[B]mysql_real_connect(3)\f[R]
|
|
@ -1,44 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_ping" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_ping \- checks if the connection between client and server is
|
|
||||||
working
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_ping(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Checks whether the connection to the server is working.
|
|
||||||
If it has gone down, and global option reconnect is enabled an automatic
|
|
||||||
reconnection is attempted.
|
|
||||||
.PP
|
|
||||||
This function can be used by clients that remain idle for a long while,
|
|
||||||
to check whether the server has closed the connection and reconnect if
|
|
||||||
necessary.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
### Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
If a reconnect occurred the thread_id will change.
|
|
||||||
Also resources bundled to the connection (prepared statements, locks,
|
|
||||||
temporary tables, \&...) will be released.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns zero on success, nonzero if an error occured.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_optionsv(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_kill(3)\f[R]
|
|
@ -1,56 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_query" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_query \- executes a null terminated statement string
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_query(MYSQL * mysql,
|
|
||||||
const char * query);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Performs a statement pointed to by the null terminate string query
|
|
||||||
against the database.
|
|
||||||
Contrary to \f[B]mysql_real_query(3)\f[R], mysql_query() is not binary
|
|
||||||
safe.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]query\f[R] \-a null terminated string containing the statement to
|
|
||||||
be performed.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
For executing multi statements the statements within the null terminated
|
|
||||||
string statements must be separated by a semicolon.
|
|
||||||
.IP \[bu] 2
|
|
||||||
If your statement contains binary data you should use
|
|
||||||
\f[B]mysql_real_query(3)\f[R] or escape your data with
|
|
||||||
\f[B]mysql_hex_string(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
To determine if a statement returned a result set use the function
|
|
||||||
\f[B]mysql_field_count(3)\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns zero on success, non zero on failure.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_real_query(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_field_count(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_hex_string(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_use_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_store_result(3)\f[R]
|
|
@ -1,39 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_read_query_result" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_read_query_result \- waits for a server result or response package
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_bool mysql_read_query_result(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Waits for a server result set or response package from a previously
|
|
||||||
executed \f[B]mysql_send_query(3)\f[R].
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Zero on success, non zero on error.
|
|
||||||
.SS Example
|
|
||||||
.PP
|
|
||||||
For an example how to use \[cq]mysql_send_query()\[ga] in an event
|
|
||||||
driven model, please check Jan Kneschke\[cq]s Blog entry \[lq]Async
|
|
||||||
MySQL Queries with
|
|
||||||
C\-API\[rq] (https://jan.kneschke.de/projects/mysql/async-mysql-queries-with-c-api/).
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_real_query(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_send_query(3)\f[R]
|
|
@ -1,171 +0,0 @@
|
|||||||
.\"t
|
|
||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_real_connect" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_real_connect \- establishes a connection to a MariaDB database
|
|
||||||
server
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
MYSQL * mysql_real_connect(MYSQL *mysql,
|
|
||||||
const char *host,
|
|
||||||
const char *user,
|
|
||||||
const char *passwd,
|
|
||||||
const char *db,
|
|
||||||
unsigned int port,
|
|
||||||
const char *unix_socket,
|
|
||||||
unsigned long flags);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Establishes a connection to a database server.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]host\f[R] \- can be either a host name or an IP address.
|
|
||||||
Passing the NULL value or the string \[lq]localhost\[rq] to this
|
|
||||||
parameter, the local host is assumed.
|
|
||||||
When possible, pipes will be used instead of the TCP/IP protocol.
|
|
||||||
Since version 3.3.0 it is also possible to provide a comma separated
|
|
||||||
list of hosts for simple fail over in case of one or more hosts are not
|
|
||||||
available.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]user\f[R] \- the user name.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]passwd\f[R] \- If provided or NULL, the server will attempt to
|
|
||||||
authenticate the user against those user records which have no password
|
|
||||||
only.
|
|
||||||
This allows one username to be used with different permissions
|
|
||||||
(depending on if a password as provided or not).
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]db\f[R] \- if provided will specify the default database to be used
|
|
||||||
when performing queries.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]port\f[R] \- specifies the port number to attempt to connect to the
|
|
||||||
server.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]unix_socket\f[R] \- specifies the socket or named pipe that should
|
|
||||||
be used.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]flags\f[R] \- the flags allows various connection options to be set
|
|
||||||
.PD 0
|
|
||||||
.P
|
|
||||||
.PD
|
|
||||||
.PP
|
|
||||||
.TS
|
|
||||||
tab(@);
|
|
||||||
lw(35.0n) lw(35.0n).
|
|
||||||
T{
|
|
||||||
Flag
|
|
||||||
T}@T{
|
|
||||||
Description
|
|
||||||
T}
|
|
||||||
_
|
|
||||||
T{
|
|
||||||
\f[C]CLIENT_FOUND_ROWS\f[R]
|
|
||||||
T}@T{
|
|
||||||
Return the number of matched rows instead of number of changed rows.
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]CLIENT_NO_SCHEMA\f[R]
|
|
||||||
T}@T{
|
|
||||||
Forbids the use of database.tablename.column syntax and forces the SQL
|
|
||||||
parser to generate an error.
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]CLIENT_COMPRESS\f[R]
|
|
||||||
T}@T{
|
|
||||||
Use compression protocol
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]CLIENT_IGNORE_SPACE\f[R]
|
|
||||||
T}@T{
|
|
||||||
Allows spaces after function names.
|
|
||||||
All function names will become reserved words.
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]CLIENT_LOCAL_FILES\f[R]
|
|
||||||
T}@T{
|
|
||||||
Allows LOAD DATA LOCAL statements
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]CLIENT_MULTI_STATEMENTS\f[R]
|
|
||||||
T}@T{
|
|
||||||
Allows the client to send multiple statements in one command.
|
|
||||||
Statements will be divided by a semicolon.
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]CLIENT_MULTI_RESULTS\f[R]
|
|
||||||
T}@T{
|
|
||||||
Indicates that the client is able to handle multiple result sets from
|
|
||||||
stored procedures or multi statements.
|
|
||||||
This option will be automatically set if CLIENT_MULTI_STATEMENTS is set.
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]CLIENT_REMEMBER_OPTIONS\f[R]
|
|
||||||
T}@T{
|
|
||||||
Rembers options passed to \f[B]mysql_optionsv(3)\f[R] if a connect
|
|
||||||
attempt failed.
|
|
||||||
If MYSQL_OPTIONS_RECONNECT option was set to true, options will be saved
|
|
||||||
and used for reconnection.
|
|
||||||
T}
|
|
||||||
.TE
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
returns a connection handle (same as passed for 1st parameter) or NULL
|
|
||||||
on error.
|
|
||||||
On error, please check \f[B]mysql_errno(3)\f[R] and
|
|
||||||
\f[B]mysql_error(3)\f[R] functions for more information.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
The password doesn\[cq]t need to be encrypted before executing
|
|
||||||
mysql_real_connect().
|
|
||||||
This will be handled in the client server protocol.
|
|
||||||
.IP \[bu] 2
|
|
||||||
The connection handle can\[cq]t be reused for establishing a new
|
|
||||||
connection.
|
|
||||||
It must be closed and reinitialized before.
|
|
||||||
.IP \[bu] 2
|
|
||||||
mysql_real_connect() must complete successfully before you can execute
|
|
||||||
any other API functions beside \f[B]mysql_optionsv(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
host parameter may contain multiple host/port combinations (supported
|
|
||||||
since version 3.3.0).
|
|
||||||
The following syntax is required:
|
|
||||||
.RS 2
|
|
||||||
.IP \[bu] 2
|
|
||||||
hostname and port must be seperated by a colon (:)
|
|
||||||
.IP \[bu] 2
|
|
||||||
IPv6 addresses must be enclosed within square brackets
|
|
||||||
.IP \[bu] 2
|
|
||||||
hostname:port pairs must be be seperated by a comma (,)
|
|
||||||
.IP \[bu] 2
|
|
||||||
if only one host:port was specified, the host string needs to end with a
|
|
||||||
comma.
|
|
||||||
.IP \[bu] 2
|
|
||||||
if no port was specified, the default port will be used.
|
|
||||||
.PP
|
|
||||||
\f[B]Examples for failover host string:\f[R]
|
|
||||||
.PP
|
|
||||||
\f[C]host=[::1]:3306,192.168.0.1:3306,test.example.com\f[R]
|
|
||||||
.PP
|
|
||||||
\f[C]host=127.0.0.1:3306,\f[R]
|
|
||||||
.RE
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_init(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_close(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_reconnect(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_error(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_errno(3)\f[R]
|
|
@ -1,49 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_real_escape_string" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_real_escape_string \- escape string by taking into account
|
|
||||||
character set of connection
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
unsigned long mysql_real_escape_string(MYSQL * mysql,
|
|
||||||
char * to,
|
|
||||||
const char * from,
|
|
||||||
unsigned long);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
This function is used to create a legal SQL string that you can use in
|
|
||||||
an SQL statement.
|
|
||||||
The given string is encoded to an escaped SQL string, taking into
|
|
||||||
account the current character set of the connection.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]to\f[R] \- buffer for the encoded string.
|
|
||||||
The size of this buffer must be length * 2 + 1 bytes: in worst case
|
|
||||||
every character of the from string needs to be escaped.
|
|
||||||
Additionally a trailing 0 character will be appended.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]from\f[R] \- a string which will be encoded by
|
|
||||||
mysql_real_escape_string().
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]long\f[R] \- the length of the \f[C]from\f[R] string.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns the length of the encoded (to) string.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_escape_string(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_hex_string(3)\f[R]
|
|
@ -1,50 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_real_query" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_real_query \- execute a statement (binary safe)
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_real_query(MYSQL * mysql,
|
|
||||||
const char * query,
|
|
||||||
unsigned long length);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
mysql_real_query() is the binary safe function for performing a
|
|
||||||
statement on the database server.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]query\f[R] \- a string containing the statement to be performed.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]length\f[R] \- length of the string.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
Contrary to the \f[B]mysql_query(3)\f[R] function, mysql_real_query is
|
|
||||||
binary safe.
|
|
||||||
.IP \[bu] 2
|
|
||||||
To determine if mysql_real_query returns a result set use the
|
|
||||||
\f[B]mysql_num_fields(3)\f[R] function.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns zero on success, otherwise non zero.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_query(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_num_fields(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_use_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_store_result(3)\f[R]
|
|
@ -1,92 +0,0 @@
|
|||||||
.\"t
|
|
||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_refresh" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_refresh \- flushes information on the server
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_refresh(MYSQL * mysql, unsigned int options);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Flushes different types of information stored on the server.
|
|
||||||
The bit\-masked parameter options specify which kind of information will
|
|
||||||
be flushed.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]options\f[R] \- a bit masked composed integer.
|
|
||||||
See below.
|
|
||||||
.PP
|
|
||||||
\f[C]options\f[R] can be any combinationation of the following flags:
|
|
||||||
.PP
|
|
||||||
.TS
|
|
||||||
tab(@);
|
|
||||||
l l.
|
|
||||||
T{
|
|
||||||
Option
|
|
||||||
T}@T{
|
|
||||||
Description
|
|
||||||
T}
|
|
||||||
_
|
|
||||||
T{
|
|
||||||
\f[C]REFRESH_GRANT\f[R]
|
|
||||||
T}@T{
|
|
||||||
Refresh grant tables.
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]REFRESH_LOG\f[R]
|
|
||||||
T}@T{
|
|
||||||
Flush logs.
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]REFRESH_TABLES\f[R]
|
|
||||||
T}@T{
|
|
||||||
Flush table cache.
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]REFRESH_HOSTS\f[R]
|
|
||||||
T}@T{
|
|
||||||
Flush host cache.
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]REFRESH_STATUS\f[R]
|
|
||||||
T}@T{
|
|
||||||
Reset status variables.
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]REFRESH_THREADS\f[R]
|
|
||||||
T}@T{
|
|
||||||
Flush thread cache.
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]REFRESH_SLAVE\f[R]
|
|
||||||
T}@T{
|
|
||||||
Reset master server information and restart slaves.
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]REFRESH_MASTER\f[R]
|
|
||||||
T}@T{
|
|
||||||
Remove binary log files.
|
|
||||||
T}
|
|
||||||
.TE
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
To combine different values in the options parameter use the OR operator
|
|
||||||
`|'.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql_reload()\f[R] is an alias for mysql_refresh().
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns zero on success, otherwise non zero.
|
|
@ -1,48 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_reset_connection" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_reset_connection \- Resets connection and clears session state
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_reset_connection(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Resets the current connection and clears session state.
|
|
||||||
Similar to \f[B]mysql_change_user(3)\f[R] or
|
|
||||||
\f[B]mariadb_reconnect(3)\f[R], mysql_reset_connection() resets session
|
|
||||||
status, but without disconnecting, opening, or reauthenticating.
|
|
||||||
.PP
|
|
||||||
On client side mysql_reset_connection() * clears pending or unprocessed
|
|
||||||
result sets * clears status like affected_rows, info or last_insert_id *
|
|
||||||
invalidates active prepared statements
|
|
||||||
.PP
|
|
||||||
On server side mysql_reset_connection() * drops temporary table(s) *
|
|
||||||
rollbacks active transaction * resets autocommit mode * releases table
|
|
||||||
locks * initializes session variables (and sets them to the value of
|
|
||||||
corresponding global variables) * closes active prepared statements *
|
|
||||||
clears user variables
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns zero on success, non zero if an error occurred.
|
|
||||||
.SS History
|
|
||||||
.PP
|
|
||||||
This function was added in MariaDB Connector/C 3.0.0.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_cancel(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_kill(3)\f[R]
|
|
@ -1,34 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_rollback" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_rollback \- Rolls back the current transaction
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_bool mysql_rollback(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Rolls back the current transaction for the database.
|
|
||||||
Returns zero on success, nonzero if an error occurred.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
mysql_rollback() will not work as expected if autocommit mode was set or
|
|
||||||
the storage engine does not support transactions.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_commit(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_autocommit(3)\f[R]
|
|
@ -1,41 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_row_seek" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_row_seek \- Positions the row cursor to an arbitrary row
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
MYSQL_ROW_OFFSET mysql_row_seek(MYSQL_RES * result,
|
|
||||||
MYSQL_ROW_OFFSET offset);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Positions the row cursor to an arbitrary row in a result set which was
|
|
||||||
obtained by \f[B]mysql_store_result(3)\f[R].
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]result\f[R] \- a result set identifier returned by
|
|
||||||
\f[B]mysql_store_result(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]offset\f[R] \- row offset.
|
|
||||||
This value can be obtained either by mysql_row_seek() or
|
|
||||||
\f[B]mysql_row_tell(3)\f[R]
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
This function will not work if the result set was obtained by
|
|
||||||
\f[B]mysql_use_result(3)\f[R].
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns the previous row offset.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_store_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_row_tell(3)\f[R]
|
|
@ -1,34 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_row_tell" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_row_tell \- Returns row offset of a result cursor
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
MYSQL_ROW_OFFSET mysql_row_tell(MYSQL_RES * res);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns the row offset of a result cursor.
|
|
||||||
The returned offset value can be used to reposition the result cursor by
|
|
||||||
calling \f[B]mysql_row_seek(3)\f[R].
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]res\f[R] \- a result set identifier returned by
|
|
||||||
\f[B]mysql_store_result(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
This function will not work if the result set was obtained by
|
|
||||||
\f[B]mysql_use_result(3)\f[R].
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_store_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_row_seek(3)\f[R]
|
|
@ -1,84 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_select_db" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_select_db \- selects a database as default
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_select_db(MYSQL * mysql,
|
|
||||||
const char * db);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Selects a database as default.
|
|
||||||
Returns zero on success, non\-zero on failure
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] is a connection identifier, which was previously
|
|
||||||
allocated by \f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]db\f[R] \- the default database name
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
To retrieve the name of the default database either execute the SQL
|
|
||||||
command \f[C]SELECT DATABASE()\f[R] or retrieve the value via
|
|
||||||
\f[B]mariadb_get_infov(3)\f[R] API function.
|
|
||||||
.IP \[bu] 2
|
|
||||||
The default database can also be set by the db parameter in
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Examples
|
|
||||||
.SS SQL
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
# switch to default database test
|
|
||||||
USE test;
|
|
||||||
# check default database
|
|
||||||
SELECT DATABASE();
|
|
||||||
+\-\-\-\-\-\-\-\-\-\-\-\-+
|
|
||||||
| database() |
|
|
||||||
+\-\-\-\-\-\-\-\-\-\-\-\-+
|
|
||||||
| test |
|
|
||||||
+\-\-\-\-\-\-\-\-\-\-\-\-+
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS MariadDB Connector/C
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
static int set_default_db(MYSQL *mysql)
|
|
||||||
{
|
|
||||||
int rc;
|
|
||||||
char *default_db;
|
|
||||||
|
|
||||||
/* change default database to test */
|
|
||||||
rc= mysql_select_db(mysql, \[dq]test\[dq]);
|
|
||||||
if (rc)
|
|
||||||
return rc; /* Error */
|
|
||||||
|
|
||||||
/* get the default database */
|
|
||||||
rc= mariadb_get_infov(mysql, MARIADB_CONNECTION_SCHEMA, &default_db);
|
|
||||||
if (rc)
|
|
||||||
return rc; /* Error */
|
|
||||||
|
|
||||||
if (strcmp(\[dq]test\[dq], default_db) != NULL)
|
|
||||||
{
|
|
||||||
printf(\[dq]Wrong default database\[rs]n\[dq]);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
printf(\[dq]Default database: %s\[dq], default_db);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS See also
|
|
||||||
.PP
|
|
||||||
\f[B]mysql_real_connect(3)\f[R]
|
|
@ -1,52 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_send_query" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_send_query \- sends a SQL statement without waiting for server
|
|
||||||
reponse
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_send_query(MYSQL * mysql,
|
|
||||||
const char *query,
|
|
||||||
unsigned long length);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Sends a statement to the server, without waiting for the Server OK
|
|
||||||
packet and/or resultset.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]query\f[R] \- SQL statement
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]length\f[R] \- length of the SQL statement
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
The OK and result set package need to be retrieved by
|
|
||||||
\f[B]mysql_read_query_result(3)\f[R] function
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql_send_query()\f[R] can be used for semi asynchronous
|
|
||||||
operation.
|
|
||||||
While the function itself is blocking, an event driven application can
|
|
||||||
do other tasks until result set is available.
|
|
||||||
.SS Example
|
|
||||||
.PP
|
|
||||||
For an example how to use \[cq]mysql_send_query()\[ga] in an event
|
|
||||||
driven model, please check Jan Kneschke\[cq]s article \[lq]Async MySQL
|
|
||||||
Queries with
|
|
||||||
C\-API\[rq] (https://jan.kneschke.de/projects/mysql/async-mysql-queries-with-c-api/).
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
<mysql_real_query>
|
|
||||||
.IP \[bu] 2
|
|
||||||
<mysql_read_query_result>
|
|
@ -1,33 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_server_end" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_server_end \- Called when finished using MariaDB Connector/C
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
void mysql_server_end(void)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Call when finished using the library, such as after disconnecting from
|
|
||||||
the server.
|
|
||||||
For a client program, only cleans up by performing memory management
|
|
||||||
tasks.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql_library_end()\f[R] is an alias for
|
|
||||||
\f[C]mysql_server_end()\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
In MySQL Connector/C versions 3.0.1 to 3.0.4 it was not possible to call
|
|
||||||
multiple times \f[B]mysql_server_init(3)\f[R] and
|
|
||||||
\f[C]mysql_server_end()\f[R].
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_server_init(3)\f[R]
|
|
@ -1,38 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_server_init" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_server_init \- Initializes library
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_library_init(int argc __attribute__((unused)),
|
|
||||||
char **argv __attribute__((unused)),
|
|
||||||
char **groups __attribute__((unused)))
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Call to initialize the library before calling other functions.
|
|
||||||
.SS Parameters
|
|
||||||
.PP
|
|
||||||
All parameters are unused, they only exist for compatibility reasons.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
Call \f[B]mysql_server_end(3)\f[R] to clean up after completion.
|
|
||||||
.IP \[bu] 2
|
|
||||||
If the library was not explicetly initialized by
|
|
||||||
\f[C]mysql_server_init()\f[R] any call to \f[B]mysql_init(3)\f[R] will
|
|
||||||
automatically initialize the library.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql_library_init()\f[R] is an alias for
|
|
||||||
\f[C]mysql_server_init()\f[R]
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns zero for success, or nonzero if an error occurred.
|
|
||||||
## See also * \f[B]mysql_server_end(3)\f[R]
|
|
@ -1,74 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_session_track_get_first" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_session_track_get_first \- retrieves first session status change
|
|
||||||
information
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_session_track_get_first(MYSQL * mysql,
|
|
||||||
enum enum_session_state_type type,
|
|
||||||
const char **data,
|
|
||||||
size_t *length );
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
\f[C]mysql_session_track_get_first()\f[R] retrieves the first session
|
|
||||||
status change information received from the server.
|
|
||||||
.PP
|
|
||||||
Depending on the specified type the read only data pointer will contain
|
|
||||||
the following information: * \f[C]SESSION_TRACK_SCHEMA\f[R]: The name of
|
|
||||||
the default schema (database) *
|
|
||||||
\f[C]SESSION_TRACK_SYSTEM_VARIABLES\f[R]: If a session system variable
|
|
||||||
is changed, the first call contains the name of the changed system
|
|
||||||
variable, the second call contains the new value.
|
|
||||||
Both name and value are represented as strings.
|
|
||||||
* \f[C]SESSION_TRACK_STATE_CHANGE\f[R]: shows whether the session status
|
|
||||||
has changed.
|
|
||||||
The value is changed as string \[lq]1\[rq] (changed) or \[lq]0\[rq]
|
|
||||||
(unchanged).
|
|
||||||
.PP
|
|
||||||
Further data needs to be obtained by calling
|
|
||||||
\f[B]mysql_session_track_get_next(3)\f[R].
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]type\f[R] \- type of information.
|
|
||||||
Valid values are
|
|
||||||
.RS 2
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]SESSION_TRACK_SYSTEM_VARIABLES\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]SESSION_TRACK_SCHEMA\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]SESSION_TRACK_STATE_CHANGE\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]SESSION_TRACK_GTIDS\f[R] (unsupported)
|
|
||||||
.RE
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]data\f[R] \- pointer to data, which must be declared as
|
|
||||||
\f[C]const char *\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]length\f[R] \- pointer to a \f[C]size_t\f[R] variable, which will
|
|
||||||
contain the length of data
|
|
||||||
.SS Returns
|
|
||||||
.PP
|
|
||||||
Zero for success, nonzero if no session tracking information is
|
|
||||||
available.
|
|
||||||
.SS History
|
|
||||||
.PP
|
|
||||||
\f[C]mysql_session_track_get_first()\f[R] was added in Connector/C 3.0
|
|
||||||
and MariaDB Server 10.2.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_session_track_get_next(3)\f[R]
|
|
@ -1,62 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_session_track_get_next" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_session_track_get_next \- Retrieves the next session status change
|
|
||||||
information
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_session_track_get_next(MYSQL * mysql,
|
|
||||||
enum enum_session_state_type type,
|
|
||||||
const char **data,
|
|
||||||
size_t *length );
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
\f[C]mysql_session_track_get_next()\f[R] retrieves the session status
|
|
||||||
change information received from the server after a successful call to
|
|
||||||
\f[B]mysql_session_track_get_first(3)\f[R].
|
|
||||||
.PP
|
|
||||||
\f[C]mysql_session_track_get_next()\f[R] needs to be called repeatedly
|
|
||||||
until a non zero return value indicates end of data.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected bys
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]type\f[R] \- type of information.
|
|
||||||
Valid values are
|
|
||||||
.RS 2
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]SESSION_TRACK_SYSTEM_VARIABLES\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]SESSION_TRACK_SCHEMA\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]SESSION_TRACK_STATE_CHANGE\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]SESSION_TRACK_GTIDS\f[R] (unsupported)
|
|
||||||
.RE
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]data\f[R] \- pointer to data, which must be declared as
|
|
||||||
\f[C]const char *\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]length\f[R] \- pointer to a \f[C]size_t\f[R] variable, which will
|
|
||||||
contain the length of data
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Zero for success, nonzero if an error occurred.
|
|
||||||
.SS History
|
|
||||||
.PP
|
|
||||||
\f[C]mysql_session_track_get_next()\f[R] was added in Connector/C 3.0
|
|
||||||
and MariaDB Server 10.2.
|
|
||||||
.SS See also
|
|
||||||
.PP
|
|
||||||
\f[B]mysql_session_track_get_first(3)\f[R]
|
|
@ -1,251 +0,0 @@
|
|||||||
.\"t
|
|
||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_set_character_set" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_set_character_set \- Sets the default character set for connection
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_set_character_set(MYSQL * mysql,
|
|
||||||
const char * csname);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Sets the default
|
|
||||||
[data\-types\-character\-sets\-and\-collations()](character set]] for
|
|
||||||
the current connection.
|
|
||||||
Returns zero on success, non\-zero on failure.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
mysql_init() (mysql_init) or \f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]csname\f[R] \- character set name ### Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
It\[cq]s strongly recommended to use mysql_set_character_set() instead
|
|
||||||
of \f[C]SET NAMES ...\f[R] since \f[B]mysql_real_escape_string(3)\f[R]
|
|
||||||
might fail or deliver unexpected results.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Zero on success, non zero if an error occured
|
|
||||||
.SS Supported character sets
|
|
||||||
.PP
|
|
||||||
The client library supports the following character sets:
|
|
||||||
.PP
|
|
||||||
.TS
|
|
||||||
tab(@);
|
|
||||||
lw(35.0n) lw(35.0n).
|
|
||||||
T{
|
|
||||||
Character set
|
|
||||||
T}@T{
|
|
||||||
Description
|
|
||||||
T}
|
|
||||||
_
|
|
||||||
T{
|
|
||||||
armscii8
|
|
||||||
T}@T{
|
|
||||||
8 bit character set for Armenian
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
ascii
|
|
||||||
T}@T{
|
|
||||||
US ASCII character set
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
big5
|
|
||||||
T}@T{
|
|
||||||
2 byte character set for traditional Chinese, Hongkong, Macau and Taiwan
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
binary
|
|
||||||
T}@T{
|
|
||||||
8 bit binary character set
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
cp1250
|
|
||||||
T}@T{
|
|
||||||
Windows code page 1250 character set
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
cp1251
|
|
||||||
T}@T{
|
|
||||||
Windows code page 1251 character set
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
cp1256
|
|
||||||
T}@T{
|
|
||||||
Windows code page 1256 character set
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
cp1257
|
|
||||||
T}@T{
|
|
||||||
Windows code page 1257 character set
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
cp850
|
|
||||||
T}@T{
|
|
||||||
MS\-DOS Codepage 850 (Western Europe)
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
cp852
|
|
||||||
T}@T{
|
|
||||||
MS\-DOS Codepage 852 (Middle Europe)
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
cp866
|
|
||||||
T}@T{
|
|
||||||
MS\-DOS Codepage 866 (Russian)
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
cp932
|
|
||||||
T}@T{
|
|
||||||
Microsoft Codepage 932 (Extension to sjis)
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
dec8
|
|
||||||
T}@T{
|
|
||||||
DEC West European
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
eucjpms
|
|
||||||
T}@T{
|
|
||||||
UJIS for Windows Japanese
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
euckr
|
|
||||||
T}@T{
|
|
||||||
EUC KR\-Korean
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
gb2312
|
|
||||||
T}@T{
|
|
||||||
GB\-2312 simplified Chinese
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
gbk
|
|
||||||
T}@T{
|
|
||||||
GBK simplified Chinese
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
geostd8
|
|
||||||
T}@T{
|
|
||||||
GEOSTD8 Georgian
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
greek
|
|
||||||
T}@T{
|
|
||||||
ISO 8859\-7 Greek
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
hebrew
|
|
||||||
T}@T{
|
|
||||||
ISO 8859\-8 Hebrew
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
hp8
|
|
||||||
T}@T{
|
|
||||||
HP West European
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
keybcs2
|
|
||||||
T}@T{
|
|
||||||
DOS Kamenicky Czech\-Slovak
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
koi8r
|
|
||||||
T}@T{
|
|
||||||
KOI8\-R Relcom Russian
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
koi8u
|
|
||||||
T}@T{
|
|
||||||
KOI8\-U Ukrainian
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
latin1
|
|
||||||
T}@T{
|
|
||||||
CP1252 Western European
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
latin2
|
|
||||||
T}@T{
|
|
||||||
ISO 8859\-2 Central Europe
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
latin5
|
|
||||||
T}@T{
|
|
||||||
ISO 8859\-9 Turkish
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
latin7
|
|
||||||
T}@T{
|
|
||||||
ISO 8859\-13 Baltic
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
macce
|
|
||||||
T}@T{
|
|
||||||
MAC Central European
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
macroman
|
|
||||||
T}@T{
|
|
||||||
MAC Western European
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
sjis
|
|
||||||
T}@T{
|
|
||||||
SJIS for Windows Japanese
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
swe7
|
|
||||||
T}@T{
|
|
||||||
7\-bit Swedish
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
tis620
|
|
||||||
T}@T{
|
|
||||||
TIS620 Thai
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
ucs2
|
|
||||||
T}@T{
|
|
||||||
UCS\-2 Unicode
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
ujis
|
|
||||||
T}@T{
|
|
||||||
EUC\-JP Japanese
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
utf8
|
|
||||||
T}@T{
|
|
||||||
UTF\-8 Unicode
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
utf16
|
|
||||||
T}@T{
|
|
||||||
UTF\-16 Unicode
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
utf32
|
|
||||||
T}@T{
|
|
||||||
UTF\-32 Unicode
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
utf8mb4
|
|
||||||
T}@T{
|
|
||||||
UTF 4\-byte Unicode
|
|
||||||
T}
|
|
||||||
.TE
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_get_character_set_info(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_real_escape_string(3)\f[R]
|
|
@ -1,56 +0,0 @@
|
|||||||
.\"t
|
|
||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_set_server_option" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_set_server_option \- Sets server option
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_set_server_option(MYSQL * mysql,
|
|
||||||
enum enum_mysql_set_option);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Sets server option.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]enum_mysql_set_option\f[R] \- server option (see below) Server
|
|
||||||
option, which can be one of the following values:
|
|
||||||
.PP
|
|
||||||
.TS
|
|
||||||
tab(@);
|
|
||||||
l l.
|
|
||||||
T{
|
|
||||||
Option
|
|
||||||
T}@T{
|
|
||||||
Description
|
|
||||||
T}
|
|
||||||
_
|
|
||||||
T{
|
|
||||||
MYSQL_OPTION_MULTI_STATEMENTS_OFF
|
|
||||||
T}@T{
|
|
||||||
Disables multi statement support
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
MYSQL_OPTION_MULTI_STATEMENTS_ON
|
|
||||||
T}@T{
|
|
||||||
Enable multi statement support
|
|
||||||
T}
|
|
||||||
.TE
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns zero on success, non\-zero on failure.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_real_connect(3)\f[R]
|
|
@ -1,41 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_shutdown" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_shutdown \- Sends shutdown message to server
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
int mysql_shutdown(MYSQL * mysql,
|
|
||||||
enum mysql_enum_shutdown_level);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
This function is deprecated.
|
|
||||||
Instead please use SQL \f[C]SHUTDOWN\f[R] command.
|
|
||||||
.PP
|
|
||||||
Sends a shutdown message to the server.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected by
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql_enum_shutdown_level\f[R] \- currently only one shutdown
|
|
||||||
level, \f[C]SHUTDOWN_DEFAULT\f[R] is supported.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
To shutdown the database server, the user for the current connection
|
|
||||||
must have SHUTDOWN privileges.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns zero on success, non\-zero on failure.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_kill(3)\f[R]
|
|
@ -1,37 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_sqlstate" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_sqlstate \- returns SQLSTATE error code
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
const char * mysql_sqlstate(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns a string containing the SQLSTATE error code for the most
|
|
||||||
recently invoked function that can succeed or fail.
|
|
||||||
The error code consists of five characters.
|
|
||||||
`00000' means no error.
|
|
||||||
The values are specified by ANSI SQL and ODBC
|
|
||||||
.SS Parameter
|
|
||||||
.SS Notes
|
|
||||||
.PP
|
|
||||||
Please note that not all client library error codes are mapped to
|
|
||||||
SQLSTATE errors.
|
|
||||||
Errors which can\[cq]t be mapped will returned as value HY000.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
A string containing SQLSTATE error code.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_error(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_errno(3)\f[R]
|
|
@ -1,57 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_ssl_set" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_ssl_set \- Sets TLS/SSL options
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_bool mysql_ssl_set(MYSQL *mysql,
|
|
||||||
const char *key,
|
|
||||||
const char *cert,
|
|
||||||
const char *ca,
|
|
||||||
const char *capath,
|
|
||||||
const char *cipher)
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Used for establishing a secure TLS connection.
|
|
||||||
It must be called before attempting to use
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
TLS support must be enabled in the client library in order for the
|
|
||||||
function to have any effect.
|
|
||||||
.PP
|
|
||||||
NULL can be used for an unused parameter.
|
|
||||||
Always returns zero.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]key\f[R] \- path to the key file.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]cert\f[R] \- path to the certificate file.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]ca\f[R] \- path to the certificate authority file.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]capath\f[R] \- path to the directory containing the trusted TLS CA
|
|
||||||
certificates in PEM format.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]cipher\f[R] list of permitted (SSLv3, TLSv1.0 or TLSv1.2) cipher
|
|
||||||
suites to use for TLS encryption.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_real_connect(3)\f[R] will return an error if attempting to
|
|
||||||
connect and TLS is incorrectly set up.
|
|
||||||
.IP \[bu] 2
|
|
||||||
Even if Connector/C supports TLSv1.3 protocol, it is not possible yet to
|
|
||||||
specify TLSv1.3 cipher suites via \f[C]cipher\f[R] parameter.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_get_ssl_cipher(3)\f[R]
|
|
@ -1,35 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_stat" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_stat \- Returns current server status
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
const char * mysql_stat(MYSQL * mysql);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
mysql_stat() returns a string with the current server status for uptime,
|
|
||||||
threads, queries, open tables, flush tables and queries per second.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]mysql\f[R] \- a mysql handle, which was previously allocated by
|
|
||||||
\f[B]mysql_init(3)\f[R] and connected byy
|
|
||||||
\f[B]mysql_real_connect(3)\f[R].
|
|
||||||
.SS Notes
|
|
||||||
.PP
|
|
||||||
For a complete list of other status variables, you have to use the
|
|
||||||
[show\-status()](SHOW STATUS]] SQL command.
|
|
||||||
.SS Return value
|
|
||||||
.PP
|
|
||||||
Returns a string representing current server status.
|
|
||||||
.SS See also
|
|
||||||
.IP \[bu] 2
|
|
||||||
mysql_get_server_info() (mysql_get_server_info)
|
|
@ -1,42 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_stmt_affected_rows" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_stmt_affected_rows \- Returns the number of affected rows from
|
|
||||||
previous executed prepared statement
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_ulonglong mysql_stmt_affected_rows(MYSQL_STMT * stmt);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Returns the number of affected rows by the last prepared statement
|
|
||||||
associated with mysql, if the operation was an \[lq]upsert\[rq] (INSERT,
|
|
||||||
UPDATE, DELETE or REPLACE) statement, or \-1 if the last prepared
|
|
||||||
statement failed.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]stmt\f[R] \- a statement handle, which was previously allocated by
|
|
||||||
[mysql_stmt_init()](mysql_stmt_init().]]
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
When using \f[C]UPDATE\f[R], MariaDB will not update columns where the
|
|
||||||
new value is the same as the old value.
|
|
||||||
This creates the possibility that \f[C]mysql_stmt_affected_rows()\f[R]
|
|
||||||
may not actually equal the number of rows matched, only the number of
|
|
||||||
rows that were literally affected by the query.
|
|
||||||
.IP \[bu] 2
|
|
||||||
The \f[C]REPLACE\f[R] statement first deletes the record with the same
|
|
||||||
primary key and then inserts the new record.
|
|
||||||
This function returns the number of deleted records in addition to the
|
|
||||||
number of inserted records.
|
|
||||||
.SS See Also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_stmt_insert_id(3)\f[R]
|
|
@ -1,97 +0,0 @@
|
|||||||
.\"t
|
|
||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_stmt_attr_get" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_stmt_attr_get \- Gets the current value of a statement attribute
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_bool mysql_stmt_attr_get(MYSQL_STMT * stmt,
|
|
||||||
enum enum_stmt_attr_type,
|
|
||||||
void * attr);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Gets the current value of a statement attribute.
|
|
||||||
Returns zero on success, non zero on failure.
|
|
||||||
.SS Parameter
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]stmt\f[R] \- a statement handle, which was previously allocated by
|
|
||||||
\f[B]mysql_stmt_init(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]enum_stmt_attr_type\f[R] \- attribute.
|
|
||||||
See below.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]attr\f[R] \- pointer to a variable, which will contain the
|
|
||||||
attribute value.
|
|
||||||
.SS Attribute types
|
|
||||||
.PP
|
|
||||||
The \f[C]enum_stmt_attr_type\f[R] parameter has the following possible
|
|
||||||
values:
|
|
||||||
.PP
|
|
||||||
.TS
|
|
||||||
tab(@);
|
|
||||||
lw(23.3n) lw(23.3n) lw(23.3n).
|
|
||||||
T{
|
|
||||||
Value
|
|
||||||
T}@T{
|
|
||||||
Type
|
|
||||||
T}@T{
|
|
||||||
Description
|
|
||||||
T}
|
|
||||||
_
|
|
||||||
T{
|
|
||||||
\f[C]STMT_ATTR_UPDATE_MAX_LENGTH\f[R]
|
|
||||||
T}@T{
|
|
||||||
\f[C]my_bool *\f[R]
|
|
||||||
T}@T{
|
|
||||||
Indicates if \f[B]mysql_stmt_store_result(3)\f[R] will update the
|
|
||||||
max_length value of \f[C]MYSQL_FIELD\f[R] structures.
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]STMT_ATTR_CURSOR_TYPE\f[R]
|
|
||||||
T}@T{
|
|
||||||
\f[C]unsigned long *\f[R]
|
|
||||||
T}@T{
|
|
||||||
Possible values are \f[C]CURSOR_TYPE_READ_ONLY\f[R] or default value
|
|
||||||
\f[C]CURSOR_TYPE_NO_CURSOR\f[R].
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]STMT_ATTR_PREFETCH_ROWS\f[R]
|
|
||||||
T}@T{
|
|
||||||
\f[C]unsigned long *\f[R]
|
|
||||||
T}@T{
|
|
||||||
Number of rows which will be prefetched.
|
|
||||||
The default value is 1.
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]STMT_ATTR_PREBIND_PARAMS\f[R]
|
|
||||||
T}@T{
|
|
||||||
\f[C]unsigned int *\f[R]
|
|
||||||
T}@T{
|
|
||||||
Number of parameters used for \f[B]mariadb_stmt_execute_direct(3)\f[R]
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]STMT_ATTR_STATE\f[R]
|
|
||||||
T}@T{
|
|
||||||
\f[C]enum mysql_stmt_state *\f[R]
|
|
||||||
T}@T{
|
|
||||||
Status of prepared statement.
|
|
||||||
Possible values are defined in \f[C]enum mysql_stmt_state\f[R].
|
|
||||||
This option was added in MariaDB Connector/C 3.1.0
|
|
||||||
T}
|
|
||||||
.TE
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
Setting the number of prefetched rows will work only for read only
|
|
||||||
cursors.
|
|
||||||
.SS See Also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_stmt_attr_set(3)\f[R]
|
|
@ -1,131 +0,0 @@
|
|||||||
.\"t
|
|
||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_stmt_attr_set" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_stmt_attr_set \- Sets attribute of a statement
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_bool mysql_stmt_attr_set(MYSQL_STMT * stmt,
|
|
||||||
enum enum_stmt_attr_type,
|
|
||||||
const void * attr);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Used to modify the behavior of a prepared statement.
|
|
||||||
This function may be called multiple times to set several attributes.
|
|
||||||
Returns zero on success, non\-zero on failure.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]stmt\f[R] \- a statement handle, which was previously allocated by
|
|
||||||
\f[B]mysql_stmt_init(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]enum_stmt_attr_type\f[R] \- the attribute that you want to set.
|
|
||||||
See below.
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]attr\f[R] \- the value to assign to the attribute
|
|
||||||
.SS Attribute types
|
|
||||||
.PP
|
|
||||||
The \f[C]enum_stmt_attr_type\f[R] attribute can have one of the
|
|
||||||
following values:
|
|
||||||
.PP
|
|
||||||
.TS
|
|
||||||
tab(@);
|
|
||||||
lw(23.3n) lw(23.3n) lw(23.3n).
|
|
||||||
T{
|
|
||||||
Value
|
|
||||||
T}@T{
|
|
||||||
Type
|
|
||||||
T}@T{
|
|
||||||
Description
|
|
||||||
T}
|
|
||||||
_
|
|
||||||
T{
|
|
||||||
\f[C]STMT_ATTR_UPDATE_MAX_LENGTH\f[R]
|
|
||||||
T}@T{
|
|
||||||
\f[C]my_bool *\f[R]
|
|
||||||
T}@T{
|
|
||||||
If set to 1, \f[B]mysql_stmt_store_result(3)\f[R] will update the
|
|
||||||
max_length value of MYSQL_FIELD structures.
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]STMT_ATTR_CURSOR_TYPE\f[R]
|
|
||||||
T}@T{
|
|
||||||
\f[C]unsigned long *\f[R]
|
|
||||||
T}@T{
|
|
||||||
cursor type when \f[B]mysql_stmt_execute(3)\f[R] is invoked.
|
|
||||||
Possible values are \f[C]CURSOR_TYPE_READ_ONLY\f[R] or default value
|
|
||||||
\f[C]CURSOR_TYPE_NO_CURSOR\f[R].
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]STMT_ATTR_PREFETCH_ROWS\f[R]
|
|
||||||
T}@T{
|
|
||||||
\f[C]unsigned long *\f[R]
|
|
||||||
T}@T{
|
|
||||||
number of rows which will be prefetched.
|
|
||||||
The default value is 1.
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]STMT_ATTR_PREBIND_PARAMS\f[R]
|
|
||||||
T}@T{
|
|
||||||
\f[C]unsigned int *\f[R]
|
|
||||||
T}@T{
|
|
||||||
number of parameter markers when using
|
|
||||||
\f[B]mariadb_stmt_execute_direct(3)\f[R].
|
|
||||||
If the statement handle is reused it will be reset automatically to the
|
|
||||||
state after mysql_stmt_init().
|
|
||||||
This option was added in Connector/C 3.0
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]STMT_ATTR_ARRAY_SIZE\f[R]
|
|
||||||
T}@T{
|
|
||||||
\f[C]unsigned int *\f[R]
|
|
||||||
T}@T{
|
|
||||||
number of array elements.
|
|
||||||
This option was added in Connector/C 3.0 and requires MariaDB 10.2 or
|
|
||||||
later
|
|
||||||
T}
|
|
||||||
T{
|
|
||||||
\f[C]STMT_ATTR_ROW_SIZE\f[R]
|
|
||||||
T}@T{
|
|
||||||
\f[C]size_t *\f[R]
|
|
||||||
T}@T{
|
|
||||||
specifies size of a structure for row wise binding.
|
|
||||||
This length must include space for all of the bound parameters and any
|
|
||||||
padding of the structure or buffer to ensure that when the address of a
|
|
||||||
bound parameter is incremented with the specified length, the result
|
|
||||||
will point to the beginning of the same parameter in the next set of
|
|
||||||
parameters.
|
|
||||||
When using the sizeof operator in ANSI C, this behavior is guaranteed.
|
|
||||||
If the value is zero column\-wise binding will be used (default).
|
|
||||||
This option was added in Connector/C 3.0 and requires MariaDB 10.2 or
|
|
||||||
later
|
|
||||||
T}
|
|
||||||
.TE
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
If you use the \f[C]MYSQL_STMT_ATTR_CURSOR_TYPE\f[R] option with
|
|
||||||
\f[C]MYSQL_CURSOR_TYPE_READ_ONLY\f[R], a cursor is opened for the
|
|
||||||
statement when you invoke \f[B]mysql_stmt_execute(3)\f[R].
|
|
||||||
If there is already an open cursor from a previous
|
|
||||||
\f[B]mysql_stmt_execute(3)\f[R] call, it closes the cursor before
|
|
||||||
opening a new one.
|
|
||||||
\f[B]mysql_stmt_reset(3)\f[R] also closes any open cursor before
|
|
||||||
preparing the statement for re\-execution.
|
|
||||||
.IP \[bu] 2
|
|
||||||
If you open a cursor for a prepared statement it is unnecessary to call
|
|
||||||
\f[B]mysql_stmt_store_result(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_stmt_free_result(3)\f[R] closes any open cursor.
|
|
||||||
.SS See Also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_stmt_execute_direct(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_stmt_attr_get(3)\f[R]
|
|
@ -1,50 +0,0 @@
|
|||||||
.\" Automatically generated by Pandoc 2.5
|
|
||||||
.\"
|
|
||||||
.TH "mysql_stmt_bind_param" "3" "" "Version 3.3.1" "MariaDB Connector/C"
|
|
||||||
.hy
|
|
||||||
.SS Name
|
|
||||||
.PP
|
|
||||||
mysql_stmt_bind_param \- Binds parameter to a prepared statement
|
|
||||||
.SS Synopsis
|
|
||||||
.IP
|
|
||||||
.nf
|
|
||||||
\f[C]
|
|
||||||
#include <mysql.h>
|
|
||||||
|
|
||||||
my_bool mysql_stmt_bind_param(MYSQL_STMT * stmt,
|
|
||||||
MYSQL_BIND * bind);
|
|
||||||
\f[R]
|
|
||||||
.fi
|
|
||||||
.SS Description
|
|
||||||
.PP
|
|
||||||
Binds variables for parameter markers in the prepared statement that was
|
|
||||||
passed to \f[B]mysql_stmt_prepare(3)\f[R].
|
|
||||||
Returns zero on success, non\-zero on failure.
|
|
||||||
.SS Parameters
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]stmt\f[R] \- a statement handle, which was previously allocated by
|
|
||||||
\f[B]mysql_stmt_init(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[C]bind\f[R] \- an array of \f[C]MYSQL_BIND\f[R] structures.
|
|
||||||
The size of this array must be equal to the number of parameters.
|
|
||||||
.SS Notes
|
|
||||||
.IP \[bu] 2
|
|
||||||
The number of parameters can be obtained by
|
|
||||||
\f[B]mysql_stmt_param_count(3)\f[R].
|
|
||||||
.IP \[bu] 2
|
|
||||||
If the number of parameters is unknown, for example when using
|
|
||||||
\f[B]mariadb_stmt_execute_direct(3)\f[R], the number of parameters have
|
|
||||||
to be specified with the \f[B]mysql_stmt_attr_set(3)\f[R] function.
|
|
||||||
.SS See Also
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mariadb_stmt_execute_direct(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_stmt_prepare(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_stmt_bind_result(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_stmt_execute(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_stmt_param_count(3)\f[R]
|
|
||||||
.IP \[bu] 2
|
|
||||||
\f[B]mysql_stmt_send_long_data(3)\f[R]
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user