The service permission checks did not check for SELECT privileges on
mysql.tables_priv which caused confusing error messages. The database
grant erros also did not log the MySQL error message which is often very
helpful when resolving permission errors.
It is possible that messages logged immediately before exiting are not flushed
to disk. Flushing all logs before exiting from the main function guarantees
that any relevant log messages are flushed to disk.
The starting of a service without listeners would fail but there wouldn't be
any log messages about the reason of the failure. In addition to this, MaxScale
would try to restart the service periodically which would lead to unnecessary
error messages.
With this change, missing listeners for services are considered configuration
errors.
Renamed is_mysql_comment_start to is_mysql_statement_end because it checks
whether a statement truly ends instead of just checking comment block starts.
The calculations for buffer length in readwritesplit now use the payload size
instead of the buffer size.
The C style comments were not ignored and the -- style comments
did not check for the trailing whitespace and made return values char*.
The creation of a stored procedure would prevent sessions from using
any of the slave servers because readwritesplit would interpret
the creation statement as a multi-statement query.
Parts of modutil and readwritesplit now compare pointers to pointers instead of
converting pointers to integers.
The monitor permission checks didn't use the standard connection timeouts but
used hard-coded values. The config.c tried to connect to the embedded library
but since it is not used by it anymore, it always fails.
MaxScaleUptime() renamed to maxscale_uptime() and moved from
gateway.c (MaxScale main) to misc.c, which is included in the
maxscale_common library. That way the symbol will be available
at link-time and will thus not prevent the use of the linker
flags -Wl,-z,defs (resolve all symbols at link-time) when
linking a module that uses maxscale_uptime().
Due to an include conflict between /usr/include/poll.h and
maxscale/server/include/poll.h the latter was moved to
maxscale/server/include/maxscale/poll.h.
Once 1.4 is out, all maxscale header files will be moved to that
same sub-directory. That will prevent include conflicts and also
make it easy to see which include files belong to maxscale and
which do not.
The default pathname for maxkeys was a hardcoded value and it didn't use
the default directory location functions. If encrypted passwords were used
nothing was written into the log.
The write queue spinlock was released in dcb_write_tidy_up without first
acquiring it. This caused a crash when two threads try to interact with
the write queue at the same time.
The old message logged the function name and thread ID which are not useful
to the end user. The thread ID should only be printed for debugging purposes,
not general error messages.
Both the passwords and temporary files of the embedded library were stored
in the same directory. Now the directories are separated and the embedded
library uses the temporary directory. The datadir cleanup also now only
cleans up the temporary data directory.
The schemarouter checks if the service has this parameter and if it
is not there, it is automatically enabled. The parameter was not
added as a qualified service parameter so the router couldn't see
the parameter as defined even if it was.
The monitor timeouts can now be larger than the monitor interval. This will
allow the combination of low monitoring intervals and large network timeouts.
If a network experiences some periodic lag, it is desirable to allow large
timeout values.
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.