Commit Graph

11797 Commits

Author SHA1 Message Date
62788f39e1 Make response time statistics worker-local
Given that the response times across threads are extremely likely to be
nearly identical, the data can be partitioned by worker thread.
2018-09-18 15:21:53 +03:00
675182e9eb Remove unremoved comment
The comment stated that it should be removed before being merged.
2018-09-18 15:21:53 +03:00
f066d154c6 MXS-1632: Use statistics.hh functions in routingworker.cc
The custom code for accessing member methods can be removed.
2018-09-18 15:21:53 +03:00
708dabd773 MXS-1632: Add statistics functions
The statistic.hh header defines a set of functions that complement the
standard library numeric functions. They differ from the standard library
functions in that they take a container reference and a pointer-to-member
as parameters and calculate the statistic based on the pointed-to member.
2018-09-18 15:21:52 +03:00
af2546a3bd add proper timeouts to different_size_* tests 2018-09-17 16:41:11 +03:00
47f3944f19 Merge branch '2.2' into develop 2018-09-17 13:11:40 +03:00
85d2655a51 Update MaxScale 2.2 version number 2018-09-17 13:09:55 +03:00
3b78996c4c Merge branch '2.2' into develop 2018-09-17 13:02:53 +03:00
81a18db18e Update release date 2018-09-17 12:52:25 +03:00
d6ce6e4289 MXS-2035: Fix available_when_donor
The parameter got broken by the previous change.
2018-09-15 01:22:39 +03:00
eeb61216de Add MariaDBMonitor Gtid unit test
Tests the class with different inputs. Also fixes a bug found by the test.
2018-09-14 17:31:00 +03:00
56c84541df MXS-1712 Add reset replication to MariaDB Monitor
The 'reset_replication' module command deletes all slave connections and binlogs,
sets gtid to sequence 0 and restarts replication from the given master. Should be
only used if gtid:s are incompatible but the actual data is known to be in sync.
2018-09-14 17:15:05 +03:00
cb54880b99 MXS-1937 Cleanup event handling
Event handling is now enabled by default. If the monitor cannot query the EVENTS-
table (most likely because of missing credentials), print an error suggesting to
turn the feature off.

When disabling events on a rejoining standalone server (likely a former master),
disable binlog event recording for the session. This prevents the ALTER EVENT
queries from generating binlog events.

Also added documentation and combined similar parts in the code.
2018-09-14 16:54:24 +03:00
4ba0112668 Deactive some uncrustify settings
This only deactivates some of the more heavy-handed features. All files have
been formatted with the new settings, which seems to have only affected lines
which were not formatted before.
2018-09-14 16:20:13 +03:00
b371e7ac9d Update release notes. 2018-09-14 10:43:14 +03:00
4e41978069 Merge branch '2.2' into develop 2018-09-14 10:41:43 +03:00
c600b8ab92 MXS-2046: Fix double freeing of GWBUF
The response buffer from the master was freed twice.
2018-09-13 20:38:55 +03:00
5e6abe71f1 Fix local_address
The test did not create a grant for the gateway IP address where the
client was connecting from.
2018-09-13 15:36:31 +03:00
bee7cc2002 MXS-2046: Fix additional memory leaks
A set of memory leaks were revealed by Valgrind.
2018-09-13 14:27:21 +03:00
8c561c6e55 Merge branch '2.2' into develop 2018-09-13 12:26:58 +02:00
ce602daf10 Enable log_info for bug664 2018-09-13 13:14:28 +03:00
fa96923983 MXS-2035: Add mariabackup support to Galeramon
The mariabackup is now treated the same way as xtrabackup.
2018-09-13 13:02:32 +03:00
a952255c19 MXS-2046: Fix binlogrouter memory leak
The client queries were never freed.
2018-09-13 13:02:31 +03:00
b3d6e49061 Shorten mysqlmon_failover_stress
The test fails since slaves are constantly going out-of-sync and cannot rejoin
the cluster. After three failovers, the cluster has three standalone server and
the monitor gets confused which server is the master. For now, limit the test to
two failovers.
2018-09-13 11:33:19 +03:00
d65d815b99 Add format attribute to test functions, fix resulting errors
Fixes mysqlmon_failover_stress.
2018-09-13 11:33:19 +03:00
7ec2f77708 Merge branch '2.2' into develop 2018-09-12 23:18:08 +03:00
e1f2b81734 Wait for monitor in bug547
The test expects the monitor to respond within 5 seconds. This is not
guaranteed to happen so waiting for a monitor interval instead of a
hard-coded duration provides for a more stable test.
2018-09-12 22:09:51 +03:00
b3e2bf58d9 Wait two monitor intervals in mysqlmon_failover_auto
The master failover require two monitor intervals to complete.
2018-09-12 22:09:51 +03:00
6f5d089131 Use expect in mxs1947_composite_roles
`assert` was renamed to `expect`.
2018-09-12 22:09:38 +03:00
96a78685bc Fix possible buffer overrun in readwritesplit
If the GWBUF length was larger than the stack buffer length, the code
would write past the buffer.
2018-09-12 22:09:38 +03:00
f6840fbded Remove implicit initialization of all maxscales
The extra maxscale instances are only started if the test explicitly
requests it.
2018-09-12 22:09:38 +03:00
643480240c Simplify MaxCtrl version extraction
Instead of using the correct version in in-source builds, a dummy file is
copied in place. This removes the need to explicitly include the
VERSION.cmake file.
2018-09-12 22:09:37 +03:00
077f344a20 MXS-2037 Add test case 2018-09-12 20:59:47 +03:00
12092d1a90 test_cycle_find.cc: Initialize the log 2018-09-12 14:23:09 +03:00
1bffb1c26d Fix release note generation script
The CMake command that reads the VERSION.cmake file needs to be executed
in the source root.
2018-09-12 11:05:17 +03:00
d04c7135b0 Update change log and release notes 2018-09-12 09:43:36 +03:00
d881630204 Allow programatic control of galera restarting
If a test program needs other than the default Galera config
(e.g. log_slave_updates enabled), then it should be able to
programmatically cause galera to be restarted as part of the
TestConnections construction.
2018-09-12 09:09:52 +03:00
9b0f016aba Fix minor formatting oversights
Code that was not formatted was merged into develop unformatted.
2018-09-12 08:58:15 +03:00
65c50ca8b7 Fix uncrustify script
Add explicit path to the root source directory and allow invocation from
other directories. Also included qc_sqlite sources but excluded the SQLite
sources. Explicitly define the configuration in the MaxScale sources as
the one that will be used.

Changed from N invocations of uncrustify to one invocation with all files
as the program arguments. This should give a slight speedup when
formatting all sources.
2018-09-12 08:58:15 +03:00
d7b7f43efb Rename misleading function
The expecting resultset function does not expect a resultset but a text
protocol result.
2018-09-12 08:44:31 +03:00
e15b0e2147 MXS-2041: Fix crash on failed schemarouter session
When the setting up of filters for a session fails, the DCB is closed and
the client DCB's session pointer is set to NULL. This needs to be checked
in the schemarouter before the `m_client->session` pointer is used.

The act of setting the session pointer to NULL should not be necessary as
the session is freed once the reference count drops down to zero. Due to
the fact that changing this would require moderate changes in session code
means that it should not be done in a patch release as the risks are too
high.
2018-09-12 08:44:31 +03:00
9c08d78304 Add missing error messages
If tee filter creation fails, it would not log an error message.
2018-09-12 08:44:31 +03:00
81a3c73c74 Fix assert -> expect breakage 2018-09-12 08:39:54 +03:00
fd176c4122 Merge branch '2.2' into develop 2018-09-11 12:57:19 +03:00
c04073a96c MXS-2040 Increase default monitor timeouts
All three timeouts are now three seconds. This should reduce the amount of
timeout errors users get during failover/switchover.
2018-09-11 12:31:41 +03:00
ad71655a36 MXS-2036 Redirect slaves with stopped SQL threads
This is somewhat questionable, as the slaves won't be able to really
replicate from the new master. However, not doing this causes the wrong
master to be selected after failover unless the new master has a majority
of slaves under it.
2018-09-11 10:27:31 +03:00
087272c3e4 fix multistatment hang (#180) 2018-09-11 08:39:12 +03:00
c878146c24 MXS-1947: Add test case
The test checks that composite roles work.
2018-09-10 21:47:47 +03:00
889877c0ab MXS-1947: Add support for composite roles
Added support for composite roles for 10.2 and newer versions. As
recursive CTEs are required to extract the role mappings, composite roles
aren't supported on 10.1.
2018-09-10 21:47:47 +03:00
9e0042b3b5 Fix symbolic VERSION file
The file is included from locations other than the source root. Due to
this, it needs to be prefixed with ${CMAKE_SOURCE_DIR}.
2018-09-10 21:47:03 +03:00