Mysqlnd replication and load balancing plugin (
mysqlnd_ms
)
2639
20.7.6.8.2.
mysqlnd_ms_get_last_used_connection
Copyright 1997-2012 the PHP Documentation Group. [2230]
•
mysqlnd_ms_get_last_used_connection
Returns an array which describes the last used connection
Description
array mysqlnd_ms_get_last_used_connection(
mixed connection);
Returns an array which describes the last used connection from the plugins connection pool currently
pointed to by the user connection handle. If using the plugin, a user connection handle represents a
pool of database connections. It is not possible to tell from the user connection handles properties to
which database server from the pool the user connection handle points.
The function can be used to debug or monitor PECL mysqlnd_ms.
Parameters
connection
A MySQL connection handle obtained from any of the connect
functions of the
mysqli
,
mysql
or
PDO_MYSQL
extensions.
Return Values
FALSE
on error. Otherwise, an array which describes the connection used to execute the last
statement on.
Array which describes the connection.
Property Description
Version
scheme
Connection scheme. Either
tcp://host:port
or
unix://
host:socket
. If you want to distinguish connections from each
other use a combination of
scheme
and
thread_id
as a unique key.
Neither
scheme
nor
thread_id
alone are sufficient to distinguish
two connections from each other. Two servers may assign the same
thread_id
to two different connections. Thus, connections in the
pool may have the same
thread_id
. Also, do not rely on uniqueness
of
scheme
in a pool. Your QA engineers may use the same MySQL
server instance for two distinct logical roles and add it multiple times to
the pool. This hack is used, for example, in the test suite.
Since 1.1.0.
host
Database server host used with the connection. The host is only set
with TCP/IP connections. It is empty with Unix domain or Windows
named pipe connections,
Since 1.1.0.
host_info
A character string representing the server hostname and the
connection type.
Since 1.1.2.
port
Database server port used with the connection.
Since 1.1.0.
socket_or_pipe
Unix domain socket or Windows named pipe used with the connection.
The value is empty for TCP/IP connections.
Since 1.1.2.
thread_id
Connection thread id.
Since 1.1.0.
last_message
Info message obtained from the MySQL C API function mysql_info().
Please, see
mysqli_info
for a description.
Since 1.1.0.
errno
Error code.
Since 1.1.0.
error
Error message.
Since 1.1.0.
sqlstate
Error SQLstate code.
Since 1.1.0.
Notes
Содержание 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 ...