Commit Graph

5761 Commits

Author SHA1 Message Date
046ed5c93d MXS-1513: mysql_mon.cc formatting changes
Ran astyle, cut some long lines.
2017-12-04 13:53:16 +02:00
c0ab80e459 MXS-1513: Cleanup some messages, change function names
No real functionality changes.
2017-12-04 12:53:09 +02:00
45834a89b5 MXS-1533: Rename "auto_join" to "auto_rejoin" 2017-12-04 09:59:29 +02:00
8084491d53 Fix build failure with GCC7
The format checks in GCC7 reported truncation in a snprintf call.
2017-12-04 09:56:50 +02:00
508ce3a703 MXS-1491: Failover can be executed manually
Also, renamed config setting "failover" to "auto_failover". Removed
setting "switchover" as it is now always enabled.
2017-12-04 09:41:00 +02:00
90f6d78a58 MXS-1533: Add automatic join feature
When enabled, the monitor will redirect servers to replicate from the
current master. Standalone servers and servers replicating from a slave
are redirected.
2017-12-04 09:37:16 +02:00
cf627203cb Fix issues revealed on CentOS6 2017-12-02 13:42:15 +02:00
574af7762d MXS-1545: handling of slave file EOF refactoring
MXS-1545: handling of slave file EOF refactoring.

Some slave/router state are now checked before any WARN/ERROR messages
about slave file EOF.

The missing “next_file” is always logged with warn.
2017-12-01 14:02:02 +01:00
d4c0d74ab4 MXS-1530: check ANNOTATE_ROWS flag in connecting slave
MXS-1530: check ANNOTATE_ROWS flag in connecting slave.

In MariaDB 10.2.4 replicate_annotate_row_events and
binlog_annotate_row_events have default to ON: this change checks
whether the connecting slave is not has ANNOTATE_ROWS in
blr_slave_binlog_dump(), those ANNOTATE_ROWS events can be sent or not
to the slave.
2017-11-30 16:34:24 +01:00
4cb50f48ad MXS-1533: Fix relay master identification and root master detection
Relay master servers must now have a running slave. Also, fix cluster master
detection in get_replication_tree().
2017-11-30 16:16:19 +02:00
36129466e5 MXS-1545: fix file pointer reuse in blr_open_binlog
When binlog storage is TREE the check for existing BLFILE should use
gtid info in addition to strcmp
2017-11-30 09:47:02 +01:00
aa35b202ec Merge 2.1 into 2.2
Merge 2.1 into 2.2
2017-11-30 09:15:42 +01:00
481892b452 MXS-1512 Add test case for cache options
Here's now tested that the cache properly deals with the configuration
setting "cache_in_transactions" and the current transaction state.
2017-11-29 12:41:34 +02:00
b225eeff2c MXS-1512 Allow autocommit and trx state to be set for a session
When mocking you want to be able to set explicitly how a filter
session should see the current context.
2017-11-29 12:41:34 +02:00
02cf284b61 MXS-1512 Add mock Backend class that can generate resultsets 2017-11-29 12:41:34 +02:00
6d66ffe9f7 Use FilterModule::ConfigParameters in test_dbfwfilter 2017-11-29 12:41:34 +02:00
9aa4a2d1ff MXS-1512 Create parameters object from default parameters 2017-11-29 12:41:34 +02:00
7ae2acecf7 MXS-1512 Take module object type as template argument
Makes it possible to move the module object pointer into the
SpecificModule template.
2017-11-29 12:41:34 +02:00
8a10b72e4d Merge 2.1 in 2.2
Merge 2.1 in 2.2
2017-11-29 11:30:33 +01:00
ba22e3b1db MXS-154: make gtid and file MARIADB_GTID_INFO fields static
gtid and file MARIADB_GTID_INFO fields are now a fixed size
2017-11-27 18:05:13 +01:00
23cd294dad MXS-1533: Better handling of multi-domain gtids
If the gtid_domain_pos of the master is ever modified,
gtid-variables will have multiple domains. Generally, we are
only interested in the most recent domain. This is tracked in
gtid_domain_id:s and the value of the master is used for
filtering the correct domain from all gtid-values.

Also, use gtid_current_pos instead of gtid_slave_pos. The
advantage of current_pos is that the same variable works also
for master servers. The gtid-handling is now more thorough and
detects some weird situations.
2017-11-27 16:31:13 +02:00
15e330e127 MXS-1533: Save gtid_domain_id and server version to MySqlServerInfo
Cleaned the surrounding code, as it was querying server
version twice.
2017-11-27 16:30:43 +02:00
8966f36b1d MXS-1545: Fix remaining compile issues 2017-11-27 16:24:05 +02:00
520ee35bd2 MXS-1545: fix compile issue
MXS-1545: fix compile issue
2017-11-27 15:07:06 +01:00
7f6b40e710 MXS-1545: Fix sequence number for blr_slave_abort_dump_request()
blr_slave_abort_dump_request() is now called with right slave->seqno
value.

Added error messaged replication stop for GTID maps reading failure
2017-11-27 10:02:26 +01:00
e9cf0c0f86 MXS-1545: use GTID file info in blr_binlog_file_exists
MXS-1545: use GTID file info in blr_binlog_file_exists instead of log
filename
2017-11-27 09:51:07 +01:00
a72956e2f3 Merge branch '2.1' into 2.2 2017-11-27 09:10:33 +02:00
7c21eb3ec4 Do not force router_options usage
The usage of the router_options has become optional in 2.1. This means
that the binlogrouter should not fail to start if no router_options are
defined.

Also lowered the error about master.ini to a warning as it is expected to
happen on a fresh installation.
2017-11-24 14:50:07 +02:00
927b4addc8 MXS-1530: check ANNOTATE_ROWS flag in connecting slave
MXS-1530: check ANNOTATE_ROWS flag in connecting slave.

In MariaDB 10.2.4 replicate_annotate_row_events and
binlog_annotate_row_events have default to ON: this change checks
whether the connecting slave is not has ANNOTATE_ROWS in
blr_slave_binlog_dump(), those ANNOTATE_ROWS events can be sent or not
to the slave.
2017-11-24 09:38:17 +01:00
dc2286c774 MXS-1513: Obay user-given new master server
If given a readily selected master server, Switchover will use it
as the new master. If the given server is invalid, nothing will
happen and an error is returned.
2017-11-23 13:37:42 +02:00
e0818fdbeb Fix include path error 2017-11-23 12:55:24 +02:00
396b81f336 Fix in-source builds
The internal header directory conflicted with in-source builds causing a
build failure. This is fixed by renaming the internal header directory to
something other than maxscale.

The renaming pointed out a few problems in a couple of source files that
appeared to include internal headers when the headers were in fact public
headers.

Fixed maxctrl in-source builds by making the copying of the sources
optional.
2017-11-22 18:40:18 +02:00
6054fa0957 Add dependency on libmicrohttpd for maxscale-common
The core library needs to be built after libmicrohttpd.
2017-11-22 18:37:45 +02:00
c38fbd0b74 Move utility and mock classes to .../filter/test
The utility and mock classes created for the testing of dbfwfilter
will be used for testing certain aspects of the cache filter.
Consequently better to move them somewhere outside dbfwfilter.
Sofar they will be built separately for each filter.
2017-11-22 10:00:34 +02:00
70bf901102 Fix build failures caused by merge
A variable was not added that was used and a comparison between signed and
unsigned integers was made.
2017-11-21 16:54:24 +02:00
afcb708e6e Merge branch '2.1' into 2.2 2017-11-21 16:49:21 +02:00
bc7209c04e cache: Update test-program due to qc-changes
In 2.2 it is no longer possible to know where a particular column
appears. Hence the result when a column appears amongst the selected
columns and the where-clause must be the same.
2017-11-20 15:21:46 +02:00
fc8c25803a cache: Perform thread initialization in test program 2017-11-20 15:19:54 +02:00
cd89b976a9 cache: Fix iteration of rules
Incrementation of index ended up outside iteration block at
earlier refactoring.
2017-11-20 15:18:17 +02:00
604502e1cb MXS-1461 Template Module -> class Module + template SpecificModule 2017-11-20 13:14:02 +02:00
25e288b571 MXS-1461 Add firewall test cases 2017-11-20 13:14:02 +02:00
8abe5a659e MXS-1461 Allow user and host to be exluded in test cases 2017-11-20 13:14:02 +02:00
a596e1a77c MXS-1461 Move client data to Client
The user and host are now in Client.
2017-11-20 13:14:02 +02:00
083c3bcad7 MXS-1461 Rename Upstream to Client 2017-11-20 13:14:02 +02:00
a35a4c7e9f MXS-1461 Modify mock classes 2017-11-20 13:14:02 +02:00
8fba2a8049 MXS-1461 Add local firewall filter tests
Only two now, more to be added.
2017-11-20 13:14:02 +02:00
da989d636e MXS-1461 Add TempFile
Class for creating a temporary file.
2017-11-20 13:14:02 +02:00
edb271fa8e MXS-1461 Modify some mock-classes 2017-11-20 13:14:02 +02:00
843c9b0ce1 MXS-1461 Add mock Upstream class
Upstream can be used as the upstream filter of a filter to
be tested.
2017-11-20 13:14:02 +02:00
8aeb49cffa MXS-1461 Add FilterModule class 2017-11-20 13:14:02 +02:00