Mysqlnd replication and load balancing plugin (
mysqlnd_ms
)
2615
}
}
}
}
The callback is supposed to return a host to run the query on. The
host URI is to be taken from the master and slave connection lists
passed to the callback function. If callback returns a value neither
found in the master nor in the slave connection lists the plugin
will emit an error of the type
E_RECOVERABLE_ERROR
The error
may read like
(mysqlnd_ms) User filter callback has
returned an unknown server. The server 'server
that is not in master or slave list' can neither
be found in the master list nor in the slave list
.
If the application catches the error to ignore it, follow up errors may
be set on the connection handle, for example,
(mysqlnd_ms) No
connection selected by the last filter
with the error
code
2000
and the sqlstate
HY000
. Furthermore a warning may be
emitted.
Referencing a non-existing function as a callback will result in
any error of the type
E_RECOVERABLE_ERROR
whenever the
plugin tries to callback function. The error message may reads
like:
(mysqlnd_ms) Specified callback (pick_server)
is not a valid callback
. If the application catches the
error to ignore it, follow up errors may be set on the connection
handle, for example,
(mysqlnd_ms) Specified callback
(pick_server) is not a valid callback
with the error
code
2000
and the sqlstate
HY000
. Furthermore a warning may be
emitted.
The following parameters are passed from the plugin to the callback.
Parameter
Description
Version
connected_host
URI of the currently connected database
server.
Since 1.1.0.
query
Query string of the statement for which a
server needs to be picked.
Since 1.1.0.
masters
List of master servers to choose from. Note,
that the list of master servers may not be
identical to the list of configured master
servers if the filter is not the first in the filter
chain. Previously run filters may have reduced
the master list already.
Since 1.1.0.
slaves
List of slave servers to choose from. Note, that
the list of master servers may not be identical
to the list of configured master servers if
the filter is not the first in the filter chain.
Previously run filters may have reduced the
master list already.
Since 1.1.0.
last_used_connection
URI of the server of the connection used to
execute the previous statement on.
Since 1.1.0.
in_transaction
Boolean flag indicating whether the statement
is part of an open transaction. If autocommit
Since 1.1.0.
Содержание 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 ...