Mysqlnd replication and load balancing plugin (
mysqlnd_ms
)
2632
Although setting
trx_stickiness=master
, the plugin cannot
be made aware of
autocommit
mode changes caused by SQL
statements such as
SET AUTOCOMMIT=0
.
20.7.6.6.6. Testing
Copyright 1997-2012 the PHP Documentation Group. [2230]
Note
The section applies to mysqlnd_ms 1.1.0 or newer, not the 1.0 series.
The PECL/mysqlnd_ms test suite is in the
tests/
directory of the source distribution. The test suite
consists of standard phpt tests, which are described on the PHP Quality Assurance Teams website.
Running the tests requires setting up one to four MySQL servers. Some tests don't connect to MySQL
at all. Others require one server for testing. Some require two distinct servers. In some cases two
servers are used to emulate a replication setup. In other cases a master and a slave of an existing
MySQL replication setup are required for testing. The tests will try to detect how many servers
and what kind of servers are given. If the required servers are not found, the test will be skipped
automatically.
Before running the tests, edit
tests/config.inc
to configure the MySQL servers to be used for
testing.
The most basic configuration is as follows.
putenv("MYSQL_TEST_HOST=localhost");
putenv("MYSQL_TEST_PORT=3306");
putenv("MYSQL_TEST_USER=root");
putenv("MYSQL_TEST_PASSWD=");
putenv("MYSQL_TEST_DB=test");
putenv("MYSQL_TEST_ENGINE=MyISAM");
putenv("MYSQL_TEST_SOCKET=");
putenv("MYSQL_TEST_SKIP_CONNECT_FAILURE=1");
putenv("MYSQL_TEST_CONNECT_FLAGS=0");
putenv("MYSQL_TEST_EXPERIMENTAL=0");
/* replication cluster emulation */
putenv("MYSQL_TEST_EMULATED_MASTER_HOST=". getenv("MYSQL_TEST_HOST"));
putenv("MYSQL_TEST_EMULATED_SLAVE_HOST=". getenv("MYSQL_TEST_HOST"));
/* real replication cluster */
putenv("MYSQL_TEST_MASTER_HOST=". getenv("MYSQL_TEST_EMULATED_MASTER_HOST"));
putenv("MYSQL_TEST_SLAVE_HOST=". getenv("MYSQL_TEST_EMULATED_SLAVE_HOST"));
MYSQL_TEST_HOST
,
MYSQL_TEST_PORT
and
MYSQL_TEST_SOCKET
define the hostname,
TCP/IP port and Unix domain socket of the default database server.
MYSQL_TEST_USER
and
MYSQL_TEST_PASSWD
contain the user and password needed to connect to the database/schema
configured with
MYSQL_TEST_DB
. All configured servers must have the same database user
configured to give access to the test database.
Using
host
,
host:port
or
host:/path/to/socket
syntax one can set an alternate host, host and
port or host and socket for any of the servers.
putenv("MYSQL_TEST_SLAVE_HOST=192.168.78.136:3307"));
putenv("MYSQL_TEST_MASTER_HOST=myserver_hostname:/path/to/socket"));
Содержание 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 ...