Testing MySQL Connector/C
2129
Table 20.29. Build Options for MySQL Connector/C
Build Option
Description
-DWITH_OPENSSL=1
Enable dynamic linking to the system OpenSSL library.
-DWITH_EXTERNAL_ZLIB=1
Enable dynamic linking to the system Zlib library.
20.4.6. Testing MySQL Connector/C
To test MySQL Connector/C, a running MySQL server instance must be available. Before you run the
test suite, specify the following environment variables:
•
MYSQL_TEST_HOST
: The host where the MySQL server is running (default
localhost
)
•
MYSQL_TEST_USER
: The user name of the MySQL account to use
•
MYSQL_TEST_PASSWD
: The password of the MySQL account to use
•
MYSQL_TEST_PORT
: The TCP/IP port to connect to
•
MYSQL_TEST_SOCKET
: The socket file to connect to
•
MYSQL_TEST_DB
: The default database to use (default
test
)
To run the test suite, execute
ctest
from the command line:
shell>
ctest
20.4.7. Building MySQL Connector/C Applications
For instructions on building C applications to use MySQL Connector/C, see
Section 20.6.3.1, “Building
C API Client Programs”
. To enable your compiler to find the header and library files under the directory
where you installed MySQL Connector/C, specify the appropriate compile-time options, as indicated in
that section.
20.5. libmysqld, the Embedded MySQL Server Library
The embedded MySQL server library is NOT part of MySQL 5.0. It is part of previous editions
and will be included in future versions, starting with MySQL 5.1. You can find appropriate
documentation in the corresponding manuals for these versions. In this manual, only an
overview of the embedded library is provided.
The embedded MySQL server library makes it possible to run a full-featured MySQL server inside a
client application. The main benefits are increased speed and more simple management for embedded
applications.
The embedded server library is based on the client/server version of MySQL, which is written in C/C++.
Consequently, the embedded server also is written in C/C++. There is no embedded server available in
other languages.
The API is identical for the embedded MySQL version and the client/server version. To change an old
threaded application to use the embedded library, you normally only have to add calls to the following
functions.
Table 20.30. MySQL Embedded Server Library Functions
Function
When to Call
mysql_library_init()
Call it before any other MySQL function is called, preferably early in the
main()
function.
mysql_library_end()
Call it before your program exits.
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...