![background image](http://html1.mh-extra.com/html/oracle/5-0/5-0_reference-manual_16461961434.webp)
MySQL Proxy Scripting
1414
Attribute
Description
insert_id
The last insert ID for an auto-incremented column in a table.
query_status
The status of the query operation. You can use the
MYSQLD_PACKET_OK
or
MYSQLD_PACKET_ERR
constants to populate
this parameter.
For an example showing how to use this structure, see
proxy.response
[1412]
.
Proxy Return State Constants
The following constants are used internally by the proxy to specify the response to send to the client or
server. All constants are exposed as values within the main
proxy
table.
Constant
Description
PROXY_SEND_QUERY
Causes the proxy to send the current contents of the queries queue to
the server.
PROXY_SEND_RESULT
Causes the proxy to send a result set back to the client.
PROXY_IGNORE_RESULT
Causes the proxy to drop the result set (nothing is returned to the
client).
As constants, these entities are available without qualification in the Lua scripts. For example, at the
end of the
read_query_result()
you might return
PROXY_IGNORE_RESULT:
return proxy.PROXY_IGNORE_RESULT
Packet State Constants
The following states describe the status of a network packet. These items are entries within the main
proxy
table.
Constant
Description
MYSQLD_PACKET_OK
The packet is OK
MYSQLD_PACKET_ERR
The packet contains error information
MYSQLD_PACKET_RAW
The packet contains raw data
Backend State/Type Constants
The following constants are used either to define the status or type of the backend MySQL server to
which the proxy is connected. These items are entries within the main
proxy
table.
Constant
Description
BACKEND_STATE_UNKNOWN
The current status is unknown
BACKEND_STATE_UP
The backend is known to be up (available)
BACKEND_STATE_DOWN
The backend is known to be down (unavailable)
BACKEND_TYPE_UNKNOWN
Backend type is unknown
BACKEND_TYPE_RW
Backend is available for read/write
BACKEND_TYPE_RO
Backend is available only for read-only use
Server Command Constants
The values described in the table below are used in the packets exchanged between the client and
server to identify the information in the rest of the packet. These items are entries within the main
proxy
table. The packet type is defined as the first character in the sent packet. For example, when
intercepting packets from the client to edit or monitor a query, you would check that the first byte of the
packet was of type
proxy.COM_QUERY
.
Содержание 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 ...