Oracle 5.0 Reference Manual page 2652

Table of Contents

Advertisement

20.7.6.6.6. Testing
Copyright 1997-2012 the PHP Documentation Group. [2230]
The PECL/mysqlnd_ms test suite is in the
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
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,
TCP/IP port and Unix domain socket of the default database server.
MYSQL_TEST_PASSWD
configured with MYSQL_TEST_DB. All configured servers must have the same database user
configured to give access to the test database.
Using host,
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"));
Mysqlnd replication and load balancing plugin (mysqlnd_ms)
Although setting trx_stickiness=master, the plugin cannot
be made aware of
statements such as
Note
The section applies to mysqlnd_ms 1.1.0 or newer, not the 1.0 series.
tests/config.inc
MYSQL_TEST_PORT
contain the user and password needed to connect to the database/schema
or
host:port
host:/path/to/socket
autocommit
SET
AUTOCOMMIT=0.
directory of the source distribution. The test suite
tests/
to configure the MySQL servers to be used for
and
MYSQL_TEST_SOCKET
syntax one can set an alternate host, host and
2632
mode changes caused by SQL
define the hostname,
and
MYSQL_TEST_USER

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents