Apart from listeners, all DCBs will be assigned to the current
thread. This simplifies the addition of DCBs to worker threads.
Also performed a small cleanup of poll_add_dcb to make it more readable.
Thread-local non-POD types are not supported on CentOS 6 and thus they
need to be replaced with pointers to the relevant objects and initialized
at runtime.
In addition to this, functor objects don't appear to work as expected in
CentOS 6 and replacing them with a simple for-loop seems to work.
The test attempted to copy the generated CSV file from the MaxScale server
when in fact it was on the master server. Removed HEAVY label from the
test as it takes about 10 seconds to run.
Cherry-picked from commit f80cde2af149fda9c47d8f9131f82527b76af487.
When the SSL fails to initialize, the errors from OpenSSL should be
logged. This helps to diagnose what is wrong if the error relates to the
certificate files or private keys.
Cleaned up the documentation and reformatted the parameter list of
listener creation to be made out of links.
Added some comments to the resource declarations in resource.cc to prevent
the order of them from being altered.
The servers resource now shows the SSL parameters in the example
output. It also lists the parameters in the list of valid values for
parameters in the server creation section.
Added missing SSL parameters to servers resource output as well as added
the processing of these parameters when servers are created. It is
preferable to define servers as either encrypter or plain and to prevent
the modification of this at runtime.
The authentication errors were not sent as the connection was closed
immediately. The reason for this was the fact that if a client request
uploaded data with bad credentials, MaxScale would not send a response if
the connection was kept open. Closing the socket solved the hang but
caused confusing errors on the client side.
The libmicrohttpd library appears to require full processing of any data
uploaded by a client request before a request can be sent. With this
change, the clients receive proper authentication errors in all cases.
The enabled admins for the Linux users were shown as basic users. This was
caused by the separation of the two admin types.
Added tests that check that enabled Linux accounts show the correct type
in the output.
Now it is also possible to ensure that a DCB stays alive while
a task referring to it is posted from one worker to another.
That will be implemented in a subsequent commit.
The polling mechanism can now optionally be used for managing
the lifetime of an object placed into the poll set.
If a MXS_POLL_DATA has a non-null 'free', then the reference count
of the data will be increased before calling the handler and
decreased after. In that case, if the reference count reaches 0,
the free function will be called.
Note that the reference counts of *all* MXS_POLL_DATAs returned
by 'epoll_wait' will be increased before the events are delivered
to the handlers individually for each MXS_POLL_DATA, and then once
all events have been delivered, the reference count of each
MXS_POLL_DATA will be decreased.
This ensure that if there are interdependencies between different
MXS_POLL_DATAs returned by one call to 'epoll_wait', the case that
an MXS_POLL_DATA is deleted before its events have been delivered
can be avoided by using the reference count for lifetime management.
In subsequent commits, the reference count will be taken into use
in the lifetime management of DCBs.
With GTID master registration always get filename from GTID repo.
The filestem option is not written if binlog_name is not set: this is
not needed by GTID registration.
router->fileroot is set when last name is loaded from GTID repo.
The basic rule type that matches everything was not created when a rule
with only an optional part was defined. This caused a crash when only one
rule with only an optional part was created. This was caused by the
expectation that the list of rules was never empty.
Reloading of rules now properly uses the current rule file if no argument
was provided. The rule version counter also used atomic operations for the
sake of correctness.
The rule parsing is now only required for DML type statements that should
be fully parsed.