Working with MySQL Proxy, besides returning a dataset and an error you could also return a status of
successfully executed query, without a dataset being involved.
For example, every data modification query (INSERT, UPDATE,
DELETE, CREATE ..., DROP ...) returns such a result.
The procedure is similar to returning an error. You must return a
different response type and fill in the appropriate fields.
function affected_rows (rows, id)
proxy.response.type = proxy.MYSQLD_PACKET_OK
proxy.response.affected_rows = rows
proxy.response.insert_id = id
return proxy.PROXY_SEND_RESULT
end
If you call the above function with
return …[Read more]