This could happen if a session command triggers a master reconnection and
the connection fails while the history replay is ongoing. The code assumed
that history replay would only happen when a query was in the query queue.
This tells the user whether a session is using TLS or not. Currently, only
the client TLS cipher is shown in MaxCtrl as the backend ciphers require
additional formatting.
This helps reduce the effect that a hanging connection has on the whole
system.
Making this configurable shouldn't be needed as long as the rate of
authentication failures doesn't exceed an acceptable level. In most
practical cases allowing two seconds for authentication to complete should
be enough.
Intended to be used from fatal signal handlers. As the statement will
be returned only while classification is in process, if a statement
is returned, it is an indication that the crash was caused by the
classification.
This correctly triggers the session command response processing to accept
results from other servers than the current master backend if the session
can continue. If the session cannot continue, it will be stopped
immediately.
Fixed leak in load_utils.cc and the cache filter. Also changed all
instances of json_object_set with json_object_set_new to make sure it's
only used when the references are to be stolen.
By delaying the processing of a client DCB in the zombie queue, we avoid
initiating the shutdown process of the backend DCBs too early. This solves
the problem of the previous implementation where the session shutdown
proceeded too far before the delaying process started.
The fix isn't fully functional as closed DCBs never process the events
they receive. The mechanism would work if certain events would be
processed but they'll have to be fixed in a later release.
Connectors that wouldn't send the plugin name even when the plugin
authentication capability was enabled would have to do an extra step in
the authentication.
This prevents the server from selecting the charset under which the
queries are processed which can result in conflicts if the tables used are
not compatible with the charset of the string literals used in the query.
The diagnostics_json call could access the std::unordered_map at the same
time it was being updated by the monitoring thread. This leads to
undefined behavior which in the case of MXS-3059 manifested as a segfault.
The call to gwbuf_length will fail if the pointed to buffer isn't the head
of the chain. To prevent this, the length is calculated before the buffer
is appended.
Also fixed the use of gwbuf_append. The return value should be assigned
and the code shouldn't reply on the value passed to the function being
correct.
The code used a null GWBUF with gwbuf_append which causes a crash. The
return value of the function that used it was also not correctly handled
and would be mistaken for a different error.
If the protocol routes a COM_QUIT packet to the backend, it must not
generate a packet when it is shutting down. This could cause unexpected
write errors if the backend server managed to close the socket before the
write was done.
By deferring the closing of a DCB until the protocol tells that it's in a
stable state, we avoid closing the connection mid-authentication. This
makes sure that all connections have reached a stable state before they
are closed which in turn prevents the connections from counting towards
aborted connects (or failed authentications like it did with the old fix).
If a DCB is expecting a response from the server, it must not be placed
into the connection pool. This prevents the case where unexpected
responses would be delivered to DCBs taken out of the connection pool.
The shutdown signal handlers were installed before the workers were
initialized and weren't removed before the workers were deleted. This
would lead to a debug assertion and an eventual crash when a SIGTERM
signal was received outside of the expected scope.
The proper way to do this is to install the handlers only after the system
is up and running and to disable them as soon as the shutdown process
starts.
This mostly happened with the mxs621_unreadable_cnf test as it seemed to
receive a SIGTERM during the execution of the at-exit handlers.