7427 Commits

Author SHA1 Message Date
Johan Wikman
9d35c705f3 Update 2.1.10 release notes 2017-10-24 10:31:51 +03:00
Markus Mäkelä
aa3764db3c Let MaxScale build the Jansson library
The CMake files in MaxScale automatically download the correct version of
the Jansson library when it is configured. The build scripts used the
default branch which can change.
2017-10-23 13:29:52 +03:00
Markus Mäkelä
ee635f59f3 Update MaxScale manpage
The manpage now only links to the relevant online documentation.
2017-10-21 15:08:03 +03:00
Markus Mäkelä
ff8916046c Add link to documentation in --help output
The link points to the MaxScale 2.1 documentation root.
2017-10-21 14:55:56 +03:00
Markus Mäkelä
eac6d239fc MXS-1468: Fix created monitor serialization
When servers were added to monitors that were created at runtime, the
server list serialization overwrote the original persisted configuration
of the monitor. To solve this problem, the serialization of the server
list and the monitor parameters were combined.
2017-10-11 11:30:58 +03:00
Markus Mäkelä
e94dc2aade MXS-1468: Add test case
Added test case that reproduces the bug.
2017-10-11 11:29:02 +03:00
Markus Mäkelä
617abd0d52 Fix read of uninitialized memory when DNS lookup fails
If the DNS lookup fails, the destination string buffer is used as-is and
thus it needs to be initialized to an empty string.
2017-10-04 00:45:05 +03:00
Markus Mäkelä
9280f1a5d7 MXS-1367: Add timeouts for retried queries
The total timeout for the retrying of interrupted queries can now be
configured with the `query_retry_timeout` parameter. It controls the total
timeout in seconds that the query can take.

The actual connection, read and write timeouts of the connector aren't a
good configuration value to use for abstracted queries as the time that it
takes to execute a query can be composed of both connections, reads and
writes. This is caused by the usage of MYSQL_OPT_RECONNECT that hides the
fact that the connector reconnects to the server when a query is
attempted.
2017-10-03 13:03:49 +03:00
Markus Mäkelä
67ef7bd058 MXS-1367: Take mxs_mysql_query into use
The use of a wrapper function allows automated retrying of the queries
without requiring any changes to the code that uses it.
2017-10-03 10:57:12 +03:00
Markus Mäkelä
f1f8a4b5b2 MXS-1367: Retry interrupted queries
The new `query_retries` parameter controls how many times an interrupted
query is retried. This retrying of interrupted queries will reduce the
rate of false positives that MaxScale monitors detect.
2017-10-03 10:57:10 +03:00
Markus Mäkelä
0cd62c6f29 Make bug509 more Galera friendly
The test now skips execution of inserts to separate nodes. This should
guarantee that the nodes are synced at all times.

The test now does the inserts and selects inside a transaction to force
the reads to the same node where the inserts are done.
2017-10-02 11:50:55 +03:00
Markus Mäkelä
4f675997fb Use correct binlog position in mm_mysqlmon
Position 310 is not guaranteed to always exist on the master if the binlog
is just created. Position 4 will always be a valid position.
2017-10-02 11:22:13 +03:00
Markus Mäkelä
6a33e55b6f Backport no_vm_revert option
The VM revert on test failure was added to 2.1 but it was only disabled in
2.2.
2017-10-02 10:55:00 +03:00
Markus Mäkelä
1772cc9021 Move blr_set_checksum into blr.h
The function is used in two different files so it needs to be in the
header.
2017-10-02 10:47:27 +03:00
Markus Mäkelä
6f84f960ff Add fatal signal hanlder to TestConnections
The tests now print a stack trace to standard output if it receives a
fatal signal. This will help debug test failures caused by broken tests
and unexpected results.
2017-10-02 10:32:46 +03:00
Markus Mäkelä
1fd50222f8 Remove .secrets on test startup
The `.secrets` file does not match shell globbing by default so it should
be explicitly removed.
2017-10-02 10:01:54 +03:00
Markus Mäkelä
d3acb9573f Do minor improvements to monitor tests
The mm test was on the heavy side and the workload can be reduced for the
sake of testing only the functionality.

The mm_mysqlmon test did not check the initial state of the
server. Although not necessary, adding it will help detect test failures
caused by broken replication.

mxs1457_ignore_deleted did not stop the monitors before breaking the
replication and attempting to use MaxScale. As the test expects
authentication to work regardless of the actual state of the servers, the
monitors need to be disabled before a query is attempted.
2017-10-02 00:49:17 +03:00
Markus Mäkelä
af08647fa2 Add variadic ssh function to mariadb_nodes
The ssh_node function now supports printf style arguments. This is used to
simplify command execution on the nodes.

Curreltny, in addition to its old usage, it is used to drop extra
databases when replication is started.
2017-10-01 10:49:11 +03:00
Markus Mäkelä
69557c650e Fix stack trace generation
The stack traces weren't logged as the LOG_ALERT priority wasn't enabled
by default. As an alert is intended to be something that must leave a
trace somewhere, and as such, it must not be possible to disable it. For
this reason, it is acceptable to always log the message if the priority is
LOG_ALERT.

Added the -rdynamic linker flag so that all symbols are exported when
linking MaxScale.

As the stack trace is printed in a signal handler, the first attempt
should be to print the stack trace to the standard output. This way the
output is printed before an attempt to use malloc is made when it is
logged to the logfile.
2017-09-30 12:37:40 +03:00
Markus Mäkelä
94a55f6602 Add missing declaration of blr_set_checksum
The function was used before it was declared.
2017-09-30 08:37:12 +03:00
MassimilianoPinto
1827f042e8 MXS-1459: Assign binlog checksum value at startup
Binlog checksum default value is wrong if a slave connects with
checksum = NONE before master registration or master is not accessible
at startup
2017-09-29 18:57:09 +02:00
MassimilianoPinto
32709b3e46 MXS-1458: Mark backend server as inactive if router is not configured.
MXS-1458: Mark backend server as inactive if router is not configured.
2017-09-28 10:01:29 +02:00
Markus Mäkelä
016ad77b62 MXS-1457: Inject service credentials if no users are loaded
If the authenticator option is enabled, no users are loaded and no errors
have occurred in the user loading process, the service credentials are
injected.
2017-09-27 20:00:39 +03:00
Markus Mäkelä
395b445336 MXS-1457: Ignore removed servers when loading users
When users are loaded, removed or deleted servers are ignored.
2017-09-27 19:28:05 +03:00
Markus Mäkelä
099c2f87bc MXS-1457: Add test case
Added a test that reproduces the problem.
2017-09-27 19:28:05 +03:00
Johan Wikman
e97f26f170 Add MaxScale 2.1.10 release notes
Update change log and upgrading as well.
2017-09-27 12:59:20 +03:00
Johan Wikman
23fb0bf928 MXS-1449 Firewall: Allow 'USE <db>'
When the database firewall filter is used in white-list mode,
'USE <db>' should be allowed. When connecting, it is always
possible to specify the database anyway so restricting
'USE <db>' serves no purpose.
2017-09-27 12:59:20 +03:00
Johan Wikman
c1a7008479 MXS-1449 Sort case statements
Faster to later check for something specific.
2017-09-27 12:59:20 +03:00
Markus Mäkelä
f06c34f66c MXS-1456: Fix crash on empty script value
If a script variable resolves to an empty string, the replacement attempt
will fail with an out-of-memory error. The following realloc call will
fail as it requires a positive value for the new size.
2017-09-27 10:32:26 +03:00
Johan Wikman
df4f3cb302 MXS-1450 Remove leading whitespace
Leading whitespace is removed from a sent maxadmin command
before the command is interpreted.
2017-09-26 13:47:08 +03:00
Johan Wikman
bfe387b73f MXS-1450 Remove manual history, sort includes
Remove manually maintained revision history and sort include
files.
2017-09-26 13:43:59 +03:00
Johan Wikman
4220e3ca6a MXS-1450 Add more string trimming functions
- trim_leading
- trim_trailing

Implemented trim in terms of trim_leading and trim_trailing
2017-09-26 13:36:10 +03:00
Johan Wikman
bb95074e88 MXS-1450 Add test case for trim 2017-09-26 13:19:09 +03:00
Johan Wikman
e0dcb2da38 Update version number 2017-09-26 10:44:19 +03:00
Markus Mäkelä
753c61997d MXS-1451: Expand test case
The test now checks that both users with passwords and users without
passwords work through MaxScale when skip_authentication is enabled. In
addition to this, the test also makes sure that the wrong password and a
missing password are properly detected.
2017-09-26 07:48:45 +03:00
Markus Mäkelä
2079bba49c MXS-1451: Calculate password even with skip_authentication=true
The result of the authentication should be ignored but the scramble that
is calculated as a side-effect still needs to be stored. This can be done
by altering the SQL used to get the matching row to only match on the
username, not the network address.

Also expanded the test case to cover the use of bad credentials.
2017-09-25 19:00:44 +03:00
Markus Mäkelä
6601f15ff8 MXS-1451: Add test case
Added test case for MXS-1451 that reproduces the problem.
2017-09-25 13:27:55 +03:00
Johan Wikman
f5b329a0a3 Update 2.1.9 release date 2017-09-25 12:05:40 +03:00
Johan Wikman
8d136d7979 Scripts work without . in the PATH
Scripts work without . in the path and also if invoked from anywhere.
2017-09-21 10:13:12 +03:00
Johan Wikman
c015adfe92 Update 2.1 release notes 2017-09-21 10:08:50 +03:00
Markus Mäkelä
db7e2c2ffb Use /usr/bin/env perl instead of /bin/perl
This allows Perl to be installed in other locations.
2017-09-21 09:51:58 +03:00
Markus Mäkelä
eb3a9667fc Discard connections on interrupted COM_CHANGE_USER
Close the connection if a COM_QUIT is received while the COM_CHANGE_USER
is in progress.
2017-09-21 09:25:56 +03:00
Markus Mäkelä
b2d53a963a Fix the bug listing script
The script had the Markdown links in the wrong order.
2017-09-21 09:25:32 +03:00
Markus Mäkelä
9c0dbb5511 Add 2.1.9 release notes
Added 2.1.9 release notes.
2017-09-21 09:25:32 +03:00
Johan Wikman
2067079a44 Update ChangeLog and Upgrading 2017-09-20 12:31:02 +03:00
Johan Wikman
f5cbd4a0bc Fix links
The link syntax was the wrong way around.
2017-09-20 12:27:18 +03:00
Markus Mäkelä
481ad080ef MXS-1295: Add test case
The test case checks that the strict_sp_calls parameter works as expected.
2017-09-20 11:18:16 +03:00
Markus Mäkelä
9046db06c5 MXS-1295: Add strict_sp_calls parameter
The new parameter allows the session to be "locked" to the master server
after a stored procedure is called. This will keep the session state
consistent if the stored procedure call modifies the state of the session.
2017-09-20 11:18:16 +03:00
Johan Wikman
9d9cffe4c7 MXS-1377 Always delete the pid-file
Earlier the pid-file was deleted only if the MaxScale startup
succeeded and MaxScale exited in normal fashion.
2017-09-20 10:57:13 +03:00
Johan Wikman
b5ec55dea8 Update version to 2.1.9 2017-09-20 10:51:48 +03:00