Merge branch '2.1' into 2.2

This commit is contained in:
Markus Mäkelä 2017-10-30 11:01:19 +02:00
commit a971aa25da
10 changed files with 91 additions and 107 deletions

View File

@ -136,12 +136,14 @@ then
exit 1
fi
mkdir -p jansson/build
pushd jansson/build
cd jansson
git checkout v2.9
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_C_FLAGS=-fPIC -DJANSSON_INSTALL_LIB_DIR=$install_libdir
make
sudo make install
popd
cd ../../
# Avro C API
wget -r -l1 -nH --cut-dirs=2 --no-parent -A.tar.gz --no-directories http://mirror.netinch.com/pub/apache/avro/stable/c

View File

@ -1,4 +1,4 @@
# MariaDB MaxScale 2.1.10 Release Notes
# MariaDB MaxScale 2.1.10 Release Notes -- 2017-10-30
Release 2.1.10 is a GA release.
@ -40,10 +40,14 @@ To enable this functionality, add `query_retries=<number-of-retries>` under the
[Here is a list of bugs fixed in MaxScale 2.1.10.](https://jira.mariadb.org/issues/?jql=project%20%3D%20MXS%20AND%20issuetype%20%3D%20Bug%20AND%20status%20%3D%20Closed%20AND%20fixVersion%20%3D%202.1.10)
* [MXS-1468](https://jira.mariadb.org/browse/MXS-1468) Using dynamic commands to create readwritesplit configs fail after restart
* [MXS-1459](https://jira.mariadb.org/browse/MXS-1459) Binlog checksum default value is wrong if a slave connects with checksum = NONE before master registration or master is not accessible at startup
* [MXS-1457](https://jira.mariadb.org/browse/MXS-1457) Deleted servers are not ignored when users are loaded
* [MXS-1456](https://jira.mariadb.org/browse/MXS-1456) OOM when script variable is empty
* [MXS-1451](https://jira.mariadb.org/browse/MXS-1451) Password is not stored with skip_authentication=true
* [MXS-1450](https://jira.mariadb.org/browse/MXS-1450) Maxadmin commands with a leading space are silently ignored
* [MXS-1449](https://jira.mariadb.org/browse/MXS-1449) Database change not allowed
* [MXS-1163](https://jira.mariadb.org/browse/MXS-1163) Log flood using binlog server on Ubuntu Yakkety Yak
## Packaging

View File

@ -1,115 +1,35 @@
.TH maxscale 1
.SH NAME
maxscale - An intelligent database proxy
.SH SYNOPSIS
.B maxscale
[\fIOPTIONS...\fR]
.SH DESCRIPTION
MariaDB MaxScale is a database proxy that forwards database statements to one or
more database servers.
MariaDB MaxScale is an intelligent database proxy that allows the forwarding
of database statements to one or more database servers using complex rules, a
semantic understanding of the database statements and the roles of the various
servers within the backend cluster of databases.
The forwarding is performed using rules based on the semantic understanding of
the database statements and on the roles of the servers within the backend
cluster of databases.
MariaDB MaxScale is designed to provide load balancing and high availability
functionality transparently to the applications. In addition it provides
a highly scalable and flexible architecture, with plugin components to
support different protocols and routing decisions.
MariaDB MaxScale is designed to provide, transparently to applications, load
balancing and high availability functionality. MariaDB MaxScale has a scalable
and flexible architecture, with plugin components to support different protocols
and routing approaches.
.SH OPTIONS
.TP
.BR "-c, --config-check"
Validate configuration file and exit.
.TP
.BR "-d, --nodaemon"
Run MaxScale in the terminal process.
.TP
.BR -f " \fIFILE\fB, --config=\fIFILE\fR"
Relative or absolute pathname of MaxScale configuration file to load.
.TP
.BR -l "[\fIfile|shm|stdout\fB], --log=[\fIfile|shm|stdout\fB]"
Log to file, shared memory or standard output. The default is to log to file.
.TP
.BR -L " \fIPATH\fB, --logdir=\fIPATH\fB"
Path to log file directory.
.TP
.BR -A " \fIPATH\fB, --cachedir=\fIPATH\fB"
Path to cache directory. This is where MaxScale stores cached authentication data.
.TP
.BR -B " \fIPATH\fB, --libdir=\fIPATH\fB"
Path to module directory. Modules are only searched from this folder.
.TP
.BR -C " \fIPATH\fB, --configdir=\fIPATH\fB"
Path to configuration file directory. MaxScale will look for the \fImaxscale.cnf\fR file from this folder.
.TP
.BR -D " \fIPATH\fB, --datadir=\fIPATH\fB"
Path to data directory. This is where the embedded mysql tables are stored in addition to other MaxScale specific data.
.TP
.BR -E " \fIPATH\fB, --execdir=\fIPATH\fB"
Location of the executable files. When internal processes are launched from within MaxScale the binaries are assumed to be in this directory. If you have a custom location for binary executable files you need to add this parameter.
.TP
.BR -F " \fIPATH\fB, --persistdir=\fIPATH\fB"
Location of persisted configuration files. These files are created when configuration is changed during runtime so that the changes may be reapplied at startup.
.TP
.BR -M " \fIPATH\fB, --module_configdir=\fIPATH\fB"
Location of module configuration files.
.TP
.BR -H " \fIPATH\fB, --connector_plugindir=\fIPATH\fB"
Location of MariaDB Connector-C plugin.
.TP
.BR -N " \fIPATH\fB, --language=\fIPATH\fB"
Location of errmsg.sys file.
.TP
.BR -P " \fIPATH\fB, --piddir=\fIPATH\fB"
Location of MaxScale's PID file.
.TP
.BR -R " \fIPATH\fB, --basedir=\fIPATH\fB"
Base path for all other paths.
.TP
.BR -U " \fIUSER\fB, --user=\fIUSER\fB"
Run MaxScale as another user. The user ID and group ID of this user are used to run MaxScale.
.TP
.BR -s " [\fIyes\fB|\fIno\fB], --syslog=[\fIyes\fB|\fIno\fB]"
Log messages to syslog.
.TP
.BR -S " [\fIyes\fB|\fIno\fB], \fB--maxlog=[\fIyes\fB|\fIno\fB]"
Log messages to MaxScale's own log files.
.TP
.BR -G " [\fIyes\fB|\fIno\fB], \fB--log_augmentation=[\fI0\fB|\fI1\fB]"
Augment messages with the name of the function where the message was logged (default: 0)"
.TP
.BR -g " [\fIyes\fB|\fIno\fB], \fB--debug=[\fIArg1\fB,\fIArg2,...\fB]"
Enable or disable debug features. Supported arguments:
\fBdisable-module-unloading \fRShared libraries are not unloaded on exit, may give better Valgrind leak reports.
\fBenable-module-unloading \fREnable unloading. Default setting.
.TP
.BR "-v, --version"
Print version information and exit.
.TP
.BR "-V, --version-full"
Print full version information including the Git commit the binary was built from and exit.
.TP
.BR "-?, --help"
Show the help information for MaxScale and exit.
.SH EXAMPLES
Tutorials on GitHub:
Quickstart Guide:
.RS
.I https://github.com/mariadb-corporation/MaxScale/blob/2.1/Documentation/Documentation-Contents.md#tutorials
.I https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-22-setting-up-mariadb-maxscale/
.RE
.SH SEE ALSO
The MariaDB MaxScale documentation on the MariaDB Knowledge Base:
Installation Guide:
.RS
.I https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale/
.I https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-22-mariadb-maxscale-installation-guide/
.RE
The MariaDB MaxScale documentation on GitHub:
MaxScale Documentation:
.RS
.I https://github.com/mariadb-corporation/MaxScale/blob/2.1/Documentation/Documentation-Contents.md
.I https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-22-contents/
.RE
.SH BUGS
You can see a list of known bugs and report new bugs at:

View File

@ -501,6 +501,10 @@ add_test_executable(mxs1451_skip_auth.cpp mxs1451_skip_auth mxs1451_skip_auth LA
# https://jira.mariadb.org/browse/MXS-1457
add_test_executable(mxs1457_ignore_deleted.cpp mxs1457_ignore_deleted mxs1457_ignore_deleted LABELS REPL_BACKEND)
# MXS-1468: Using dynamic commands to create readwritesplit configs fail after restart
# https://jira.mariadb.org/browse/MXS-1468
add_test_executable(mxs1468.cpp mxs1468 mxs1468 LABELS REPL_BACKEND)
# 'namedserverfilter' test
add_test_executable(namedserverfilter.cpp namedserverfilter namedserverfilter LABELS namedserverfilter LIGHT REPL_BACKEND)

View File

@ -0,0 +1,18 @@
[maxscale]
threads=###threads###
[rwsplit-service]
type=service
router=readwritesplit
user=maxskysql
passwd=skysql
[CLI]
type=service
router=cli
[CLI Listener]
type=listener
service=CLI
protocol=maxscaled
socket=default

View File

@ -0,0 +1,37 @@
/**
* MXS-1468: Using dynamic commands to create readwritesplit configs fail after restart
*
* https://jira.mariadb.org/browse/MXS-1468
*/
#include "testconnections.h"
int main(int argc, char** argv)
{
TestConnections test(argc, argv);
test.verbose = true;
test.ssh_maxscale(true,
"maxadmin create monitor cluster-monitor mysqlmon;"
"maxadmin alter monitor cluster-monitor user=maxskysql password=skysql monitor_interval=1000;"
"maxadmin restart monitor cluster-monitor;"
"maxadmin create listener rwsplit-service rwsplit-listener 0.0.0.0 4006;"
"maxadmin create listener rwsplit-service rwsplit-listener2 0.0.0.0 4008;"
"maxadmin create listener rwsplit-service rwsplit-listener3 0.0.0.0 4009;"
"maxadmin list listeners;"
"maxadmin create server prod_mysql01 %s 3306;"
"maxadmin create server prod_mysql02 %s 3306;"
"maxadmin create server prod_mysql03 %s 3306;"
"maxadmin list servers;"
"maxadmin add server prod_mysql02 cluster-monitor rwsplit-service;"
"maxadmin add server prod_mysql01 cluster-monitor rwsplit-service;"
"maxadmin add server prod_mysql03 cluster-monitor rwsplit-service;"
"maxadmin list servers;", test.repl->IP[0], test.repl->IP[1], test.repl->IP[2]);
test.verbose = false;
test.tprintf("Restarting MaxScale");
test.add_result(test.restart_maxscale(), "Restart should succeed");
test.check_maxscale_alive();
return test.global_result;
}

View File

@ -1043,7 +1043,8 @@ static void usage(void)
"if '--basedir /path/maxscale' is specified, then, for instance, the log\n"
"dir will be '/path/maxscale/var/log/maxscale', the config dir will be\n"
"'/path/maxscale/etc' and the default config file will be\n"
"'/path/maxscale/etc/maxscale.cnf'.\n",
"'/path/maxscale/etc/maxscale.cnf'.\n\n"
"MaxScale documentation: https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-21/ \n",
get_configdir(), default_cnf_fname,
get_configdir(), get_logdir(), get_cachedir(), get_libdir(),
get_datadir(), get_execdir(), get_langdir(), get_piddir(),

View File

@ -230,7 +230,7 @@ int validate_mysql_user(MYSQL_AUTH* instance, DCB *dcb, MYSQL_session *session,
* Try authentication with the hostname instead of the IP. We do this only
* as a last resort so we avoid the high cost of the DNS lookup.
*/
char client_hostname[MYSQL_HOST_MAXLEN];
char client_hostname[MYSQL_HOST_MAXLEN] = "";
get_hostname(dcb, client_hostname, sizeof(client_hostname) - 1);
sprintf(sql, mysqlauth_validate_user_query, session->user, client_hostname,

View File

@ -569,7 +569,7 @@ int extract_type_length(const char* ptr, char *dest)
/** Skip characters until we either hit a whitespace character or the start
* of the length definition. */
while (*ptr && !isspace(*ptr) && *ptr != '(')
while (*ptr && isalpha(*ptr))
{
ptr++;
}

View File

@ -62,8 +62,7 @@
* 11/07/2016 Massimiliano Pinto Added SSL backend support
* 24/08/2016 Massimiliano Pinto Added slave notification via CS_WAIT_DATA
* 16/09/2016 Massimiliano Pinto Special events created by MaxScale are not sent to slaves:
* MARIADB10_START_ENCRYPTION_EVENT or IGNORABLE_EVENT
* Events with LOG_EVENT_IGNORABLE_F are skipped as well.
* MARIADB10_START_ENCRYPTION_EVENT or IGNORABLE_EVENT.
*
* @endverbatim
*/
@ -2374,8 +2373,7 @@ blr_slave_catchup(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, bool large)
/* Don't sent special events generated by MaxScale */
if (hdr.event_type == MARIADB10_START_ENCRYPTION_EVENT ||
hdr.event_type == IGNORABLE_EVENT ||
(hdr.flags & LOG_EVENT_IGNORABLE_F))
hdr.event_type == IGNORABLE_EVENT)
{
/* In case of file rotation or pos = 4 the events
* are sent from position 4 and the new FDE at pos 4 is read.