When backend SSL connections were created, the connection creation was
done twice. This was due to the lacking detection of an already
established SSL connection.
* MXS-199: Support Causal Read in Read Write Splitting
* move most causal read logic into rwsplit router and get server type from monitor
* misc fix: remove new line
* refactor, move config to right place, replace ltrim with gwbuf_consume
* refacter a little for previous commit
* fix code style
Length-encoded strings should be consumed with the correct
functions. Doing pointer arithmetic with the same pointer as a parameter
appears to fail only on CentOS 6 whereas on newer systems it performs as
expected.
The result collection did not reset properly when a non-resultset was
returned for a request. As collected result need to be distinguishable
from single packet responses, a new buffer type was added.
The new buffer type is used by readwritesplit which uses result collection
for preparation of prepared statements.
Moved the current command tracking to the RWBackend class as the command
tracked by the protocol is can change before a response to the executed
command is received.
Removed a false debug assertion in the mxs_mysql_extract_ps_response
function that was triggered when a very large prepared statement response
was processed in multiple parts.
KILL commands are now sent to the backends in an asynchronous manner. As
the LocalClient class is used to connect to the servers, this will cause
an extra connection to be created on top of the original connections
created by the session.
If the user does not have the permissions to execute the KILL, the error
message is currently lost. This could be solved by adding a "result
handler" into the LocalClient class which is called with the result.