The number of written characters is now checked and should be lower than
compared bytes. The parameters to the dbusers.c query functions are now const
where possible.
Previously the users needed at least SELECT permission on the database level to
be able to connect with a default database through MaxScale. With this change,
the query that retrieves the database users has been changed to also include
table-level grants for users. This will allow users with grants to only some of
the tables in a database to be able to connect through MaxScale with a default
database.
The queries are now created at runtime to allow for a more varied syntax. This
removes the need to have separate query strings for the standard mysql.user
table and for the MySQL 5.7 version of it. In addition to this, the exclusion
of the root user is now done at the same time which removes the need to manually
form the query string.
The admin users are now encrypted with a more complex algorithm which reduces
the chance of two passwords generating the same hash by a significant amount.
Refer to the GNU libc manual for more details about the crypt function:
http://www.gnu.org/software/libc/manual/html_node/crypt.html
The checking of the master status and the possible error logging were done
in two different steps. This led to confusing error messages when the state
of the server changed between the check and the logging of the error message.
Systems that support systemd only use the systemd service files. For other
systems, System V style init scripts are installed. It is not recommended to
install both of them since it's possible that they will perform differently.
When a module is unregistered, it must be removed from the list.
Otherwise, if explicit unregistering of a module is made, there
will be a crash at shutdown when all modules are unregistered.
For external parsing there will be a separate process that handles
parse requests sent from MaxScale. From MaxScale's perspective there
will just be a specific query classifier plugin that upon startup
launches that external process and manages its lifetime. That is,
MaxScale proper will be completely oblivious of this arrangement.
The skeleton process introduced here does nothing; just sits in
a loop sleeping. The skeleton query classifier plugin currently
loads the MySQL embedded query classifier and performs parsing
using it. That way the external process based query classifier can
immediately be used.
Next step is to introduce process management into the picture without
actually moving the parsing anywhere.
Not finished yet. There are e.g. a number of functions that are only used
by the log manager. They could just as well be moved as private functions
to log_manager.cc.
Slist removed from skygw_utils and added as a separate component.
Nobody seems to be using it, so it could also simply be removed.
Left in place for the time being.
Shutting down monitors is not supposed to be done ofter so there is no true
benefit from keeping the connections open. With the refactoring of the monitor
interface, this can be done in a centralized place.
The dbfwfilter now uses flex to tokenize the rules and bison to process those
tokens into a language. This will make the syntax checks more robust and
the rule language easier to maintain. It also makes the processing of rules
easier to understand and removes most of the C language side checks for
correctness.
The old rule processing functions are still left intact and will be removed
at a later point.
When configured to log matching queries, the dbfwfilter will log all queries
that match a rule. The rule name, user name and the query itself are logged.
It is also possible to match all queries that do not match a rule. Only the user
name and query is logged in this mode.
The check for the server status explicitly denied servers that are both master
and slave from being chosed as candidates for queries. This is only a problem
when a user manually sets the server states to both master and slave.
The monitors resolve the replication topology based on the servers that
the monitors see and this always results in at least one slave server.
When a command that changes the session state is executed on all servers and
a slave server goes down, an error message was sent to the client even though
one wasn't expected. These appeared as odd connection errors on the client side.
When a query is being routed to the slave, it is not necessary to assert that
the master server's state is still master. It is possible that the master server
changes states while the query is being routed but that doesn't affect the query
being currently routed.
The master DCB was checked for NULL-ness but the proper way is to check if
the backend reference is closed. This will fix a debug assertion in addition
to possibly preventing crashes.
The FindMariaDBConnector.cmake file now checks if the found library actually is
the MariaDB Connector-C library. If the found library is not the MariaDB
Connector-C, it will be built from source.
When the shard maps are being updated they are set into a stale state. This
means that one client connection is updating the shard maps and the information
in the shard map is not the most recent. This does mean that the information
is valid and authentication should succeed even if the shard map is stale.
The include directories previously used by MaxScale were from the embedded
library. All parts of MaxScale apart from the query classifier now use
the client libraries.