The old DATETIME format wasn't processed properly which caused a
corruption of following events.
A BLOB type value could be non-NULL but still have no data. In this case,
the value should be stored as a null Avro value.
Using the class RouterSession and the template Router, a router
module can be defined. The way they are intended to be used are
as follows:
class MyRouterSession : public maxscale::RouterSession
{
...
};
class MyRouter : public maxscale::Router<MyRouter, MyRouterSession>
{
...
}
...
extern "C" MXS_MODULE* MXS_CREATE_MODULE()
{
static MXS_MODULE module =
{
...
&MyRouter::s_object,
...
};
return &module;
}
When MaxScale is started, it will attempt to create the PID directory. If
the directory does not exist and MaxScale is able to create it, MaxScale
will successfully start whereas it previously failed to do so.
If MaxScale lacks the permissions to create the directory, an error
message is printed to the user explaining the reason why MaxScale fails to
start.
The thread id is copied to a local variable to avoid having
__tls_get_addr from unnecessarily being called over and over
again. Together that used to amount to some 1% of the execution
time.
These fixes prevent loops turning into eternal loops when
optimizations have been turned on.
The right remedy is to remove the internal locks from hashtable
and use external locks instead.
Due to the changes in the threading model, the DCB write code can be
simplified by a great amount.
Since only one thread can write to a DCB, it's safe to assume that no new
data is added to the write queue of a DCB while it is being drained. This
removes the need for the code that tracks whether a concurrent DCB write
attempt was made.
Because the high and low water callbacks weren't used by any module, it is
safe to remove them. They offer no real benefits over the drain callback.
Thread-safe version of strerror; thread local buffer used for storing
the message. The performance penalty of a thread local buffer is not
likely to be significant, since this is only called in an error
situation that anyway is likely to interrupt the normal processing.
The DECIMAL type was not correctly converted to positive integers. The
0x80 bit was set only for negative numbers when it needed to be XOR-ed for
all values.
The DECIMAL value type is now properly handled in Avrorouter. It is
processed into an Avro double value when before it was ignored and
replaced with a zero integer.
Backported to the 2.0 branch.
The allocation of the thread_data that is populated by the polling
mechanism must now succeed, or the process will exit. It's very
unlikely it would ever fail and it is unlikely MaxScale could would
function if it it did fail. Consequently, checks for its validity,
which anyway weren't done correctly everywhere, could be removed.
If MaxScale is started without the appropriate permissions to the paths
pointed by default values, the debug assertion fails even though the
parameter is valid but not usable.
The random number generator can be initialized when MaxScale's other
systems are being initialized. This removes the need to initialized it
when the function is used for the first time.
Removed unused spinlocks from DCBs, sessions and the MySQL protocol
structs. They were used in a context where only one thread has access to
the structure.
Removed unused member variables from DCBs.
The authenticators should have a similar way to print diagnostic
information as filter and routers do. This allows the authenticators to
print the users in their own format.
In the future, all the diagnostic entry points should be changed so that
they return a structure that contains the information in a standard
form. This information can then be formatted in different ways by other
modules.
The get_users function now combines the functionality of the old get_users
and get_all_users. This removes large parts of similar code.
Removed the listener resources as MySQLAuth was the only one that used it.
In a configuration with multiple services, one with connection_timeout and
others without it, the connections to non-connection_timeout services
would get immediately closed due to integer overflow.
As the DCBs are "owned" by threads and are handled without locks, no
cross-thread access to those DCBs should be done. Due to this, the show
persistent command for maxadmin has to be changed to show only the size of
the pool.