Oracle 5.0 Reference Manual page 2644

Table of Contents

Advertisement

Mysqlnd replication and load balancing plugin (mysqlnd_ms)
bool
lazy_connections
string
server_charset
Setting
to any other value but disabled,
failover
loop_before_master
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
with string escaping and servers using different default charsets.
The setting has been introduced in 1.4.0. It is recommended to set it
if using lazy connections.
The
server_charset
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.
2624
will not emit any warning or error.
to overcome potential problems
setting serves two purposes. It acts as
or
master

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents