In order to be able to protect the interface so that mistyped argument
do not endanger MaxScale yet still allow the developer access a router
option has been added that gives the debugcli two modes.
Supports pulling binlogs from the master, caching to a local file and relaying to a slave.
Only tested with a single slave and a single MaxScale thread.
. That means that (at least) the first packet in the message is response to session command. Then if the response is alread
y forwarded to client it is discarded. Otherwise it is routed to client and the command is marked as responded so that the o
ther backend knows to discard its duplicate response.
For each session command a sescmd property is created and added to the end of list of session commands. List is owned by router client session and it includes all session commands from the beginning of router session.
Router maintains an individual session command cursor for each backend. A cursor refers to the first session command which the corresponding backend server haven't yet responded yet.
When response message arrives at any time from backend, first it is checked whether backend's cursor is active. Cursor is active if a session command is routed to backend and the backend haven't responded to it yet. If cursor is active, next it is checked whether the current session command property has been responded by other backend. If both are true, then response message is sent to client as is. If session command response is routed to client already, the arrived response is discarded.
This implementation doesn't guarantee execution order between session commands and queries
if other backend server lags behind in session command execution.
In poll.c : moved processing of EPOLLERR and EPOLLHUP after processing of EPOLLIN and EPOLLOUT.
This ensures that COM_QUIT messages are read and routed forward before signals arrive (from local client/backend).
nection router stream is used and with read/write split router individual statements are passed to router.
Added new function to ROUTER_OBJECT : uint8_t (*getCapabilities)(ROUTER *instance, void* router_session); which is implemented in every route
r.
Added support for multi-statement packets in rwsplit router. In other words, if network packet includes multiple mysql statements, they are separated and passed to router one by one.
Multi-packet statements (those which exceeds network packet boundaries) are _not_ supported yet.
Added support for multi-statement packets.
This is an intermediate commit to save work. Code is not cleaned and there are debug prints and prototypes to be removed.
At service startup service->rate_limit.last is set back to
USERS_REFRESH_TIME
This allows reloading users’ table as soon as possible
Fixed mysql_users_alloc instead of users_alloc in replace_mysql_users()
and added MYSQL_USER_MAXLEN where missing