Bug #49318 Provide errmsg in the object input to read_query_result()
Submitted: 2 Dec 2009 0:13 Modified: 3 Dec 2009 8:27
Reporter: Lachlan Mulcahy Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Proxy: Core Severity:S4 (Feature request)
Version:0.7.2 OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: proxy scripting lua

[2 Dec 2009 0:13] Lachlan Mulcahy
Description:
Currently the object passed into read_query_result() provides:

id, query, query_time, resultset, response_time

There is no good way to access the error message returned when queries resulted in an error.

There is the (currently) undocumented resultset.raw, but I'm not entirely sure of the contents and it is not very user friendly.

How to repeat:
n/a

Suggested fix:
It would be good to have access to errmsg for cases when an error has been returned.

Perhaps also for consistency "type" should be exposed equal to either MYSQLD_PACKET_ERR, MYSQLD_PACKET_OK, etc. (although this is available via resultset.query_status)

The point here is to more closely mirror the proxy.response structure.
[3 Dec 2009 8:27] Valeriy Kravchuk
Thank you for the feature request.