Oracle 5.0 Reference Manual page 1432

Table of Contents

Advertisement

Function
prepend(id,packet)
reset()
len()
For example, you could append a query packet to the
append():
proxy.queries:append(1,packet)
The optional third argument to
the result set through the
true:
proxy.queries:append( 1, packet, { resultset_is_needed = true } )
If that flag is
(the default), proxy will:
false
• Send the result set to the client as soon as it is received
• Reduce memory usage (because the result set is not stored internally for processing)
• Reduce latency of returning results to the client
• Pass data from server to client unaltered
The default mode is therefore quicker and useful if you only want to monitor the queries sent, and the
basic statistics.
To perform any kind of manipulation on the returned data, you must set the flag to true, which will:
• Store the result set so that it can be processed.
• Enable modification of the result set before it is returned to the client.
• Enable you to discard the result set instead of returning it to the client.
proxy.response
The
proxy.response
of forwarding a packet that you have received a backend server. The structure holds the response type
information, an optional error message, and the result set (rows/columns) to return.
The following table describes the attributes of the
Attribute
type
errmsg
resultset
When using
proxy.response
proxy.MYSQLD_PACKET_OK
MySQL Proxy Scripting
Description
query packet. The optional
options specific to this packet.
Prepends a query to the query queue. The
can use to recognize the query results when they are returned by the
server. The packet should be a properly formatted query packet.
Empties the query queue.
Returns the number of query packets in the queue.
should contain the options for the packet. To have access to
append()
read_query_result()
structure is used when you want to return your own MySQL response, instead
Description
The type of the response. The type must be either
MYSQLD_PACKET_OK
MYSQLD_PACKET_ERR, you should set the value of the
mysql.response.errmsg
A string containing the error message that will be returned to the client.
A structure containing the result set information (columns and rows),
identical to what would be returned when returning a results from a
query.
SELECT
you either set
proxy.response.type
and then build
resultset
1412
should be a table containing the
options
proxy.queries
function, set the
resultset_is_needed
structure.
proxy.response
or MYSQLD_PACKET_ERR. If the
with a suitable error message.
to contain the results to return, or set
is an identifier that you
id
queue by using the
to
flag to

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents