Bug #45417 Proxy should return "normal" SQLStates/Error Codes when all backends are down
Submitted: 9 Jun 22:50 Modified: 10 Jun 7:15
Reporter: Mark Matthews
Status: Verified
Category:Proxy: Core Severity:S2 (Serious)
Version:0.8.0 OS:Any
Assigned to: MEM Agent Devs Target Version:
Tags: windmill
Triage: Needs Triage: D3 (Medium)

[9 Jun 22:50] Mark Matthews
Description:
Proxy returns an error message with a non-standard SQLState (and a message in what looks
to be wrong form, because clients are not extracting SQLStates from the message itself)
when all backends are down:

"#07000(proxy) all backends are down"

This causes issues with clients that have "retry" logic, as they won't cover these
"custom" SQL States. 

We should consider using the normal "08S..." states for communications failures, or
discuss with the connector team one which can be used for this state.

Therefore, at least in failure modes, the proxy is *not* transparent from an
application's point of view.

How to repeat:
Configure the proxy to use a non-existent backend. Inspect the error message returned.
It's not "08S..." or "HY000", which are states clients will look for.
[10 Jun 7:15] Sveta Smirnova
Thank you for the report.

Verified as described.
[11 Jun 16:42] Kay Roepke
A link to the list of SQL states:
http://dev.mysql.com/doc/refman/5.1/en/error-messages-server.html

Whoever is working on this needs to either figure out which ones apply or seek feedback
from the Connectors group.
[14 Jul 17:00] Enterprise Tools JIRA Robot
Heidi Bergh-Hoff writes: 
Mark Matthews: could you please suggest what error code should be returned?  What do the
connectors expect to get?