Mysqlnd replication and load balancing plugin (
mysqlnd_ms
)
2624
Setting
failover
to any other value but
disabled
,
master
or
loop_before_master
will not emit any warning or error.
lazy_connections
bool
Controls the use of lazy connections. Lazy connections are
connections which are not opened before the client sends the first
connection. Lazy connections are a default.
It is strongly recommended to use lazy connections. Lazy
connections help to keep the number of open connections low.
If you disable lazy connections and, for example, configure one
MySQL replication master server and two MySQL replication slaves,
the plugin will open three connections upon the first call to a connect
function although the application might use the master connection
only.
Lazy connections bare a risk if you make heavy use of actions which
change the state of a connection. The plugin does not dispatch
all state changing actions to all connections from the connection
pool. The few dispatched actions are applied to already opened
connections only. Lazy connections opened in the future are not
affected. Only some settings are "remembered" and applied when
lazy connections are opened.
Example 20.287. Disabling lazy connection
{
"myapp": {
"master": {
"master_0": {
"host": "localhost"
}
},
"slave": {
"slave_0": {
"host": "192.168.78.136",
"port": "3306"
}
},
"lazy_connections": 0
}
}
Please, see also
server_charset
to overcome potential problems
with string escaping and servers using different default charsets.
server_charset
string
The setting has been introduced in 1.4.0. It is recommended to set it
if using lazy connections.
The
server_charset
setting serves two purposes. It acts as
a fallback charset to be used for string escaping done before a
connection has been established and it helps to avoid escaping
pitfalls in heterogeneous environments which servers using different
default charsets.
String escaping takes a connections charset into account. String
escaping is not possible before a connection has been opened
and the connections charset is known. The use of lazy connections
delays the actual opening of connections until a statement is send.
Содержание 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 ...