9172 Commits

Author SHA1 Message Date
Timofey Turenko
3c88bf1ec6
refactored tests (#147) 2017-12-08 12:23:04 +02:00
Esa Korhonen
c6daf8c26b MXS-1513: More accurate error messages
The failed query is now printed.
2017-12-07 10:54:30 +02:00
Esa Korhonen
b2bc087508 MXS-1491: Print failcount
Failcount is now printed in "show monitors". Also, when master goes down
but failover does not yet happen because failcount > 1, a message is
logged.
2017-12-07 10:05:45 +02:00
Markus Mäkelä
eda700e785 Don't use sqlite3_errstr
The function is not defined in older versions.
2017-12-05 13:49:00 +02:00
Timofey Turenko
0a23d526ff fix check for 'service' command in the upgrade test 2017-12-05 11:19:47 +02:00
Markus Mäkelä
9f11fdd2c1 Fix test failures
Use larger BLOB type for mxs812_1, the inserted value exceeds the normal
BLOB size.

Add a baseline check into bulk_insert to verify that direct connections
work (at the moment they don't, needs an investigation).

Updated parameter names in failover_mysqlmon_mrm.

Modified avro_alter to prevent data type conversion errors.
2017-12-05 09:43:06 +02:00
Markus Mäkelä
c03ce7ac7f Use correct database name for SQLite
The :memory: database was misspelled as :memory without the trailing
colon. This caused an actual on-disk database to be created instead of an
in-memory one.
2017-12-05 09:43:06 +02:00
Markus Mäkelä
ba02ffb0db Move resource.cc internals into a anonymous namespace
All internal code is now inside an anonymous namespace to prevent their
use outside of the compilation unit.

Also fixed the wrong return type of ResourceWatcher::etag.
2017-12-05 09:43:06 +02:00
Markus Mäkelä
08689d3bb2 MXS-1539: Execute all REST API commands in a worker thread
Executing the commands inside a worker thread allows further improvements
to job queuing but mainly it fixes the problem of loading users when
listeners are allocated at runtime.

When a runtime listener was being created, it was allocated in the admin
thread whereas the listeners created at startup were allocated in the
"main" thread. This caused a minor difference in how administrative
functions were handled by the REST API and MaxAdmin. The only real problem
is that listener allocation depends on being done inside a worker thread
as it lazily initializes some resources.
2017-12-05 09:43:06 +02:00
Markus Mäkelä
74ae3d9ff3 MXS-1539: Actually assign the allocated member pointer
The memory for the rate limit struct was allocated but it was not assigned
for the service. Also corrected a false debug assertion in
service_refresh_users.
2017-12-05 09:43:05 +02:00
Markus Mäkelä
a2d275aca3 MXS-1539: Make refresh rate limitations thread-specific
The refresh rate limitations are now also thread-specific. This is
required when the authentication data is partitioned on a per thread
basis.
2017-12-05 09:43:05 +02:00
Markus Mäkelä
4194c1c558 MXS-1539: Preliminary implementation of thread-local user cache
The thread-local user cache removes most of the cross-thread communication
from the user authentication at the cost of increased memory use and extra
network usage when users are loaded.
2017-12-05 09:43:05 +02:00
Markus Mäkelä
513220805b MXS-1539: Remove useless handles
The client handle was never used.
2017-12-05 09:43:05 +02:00
Esa Korhonen
046ed5c93d MXS-1513: mysql_mon.cc formatting changes
Ran astyle, cut some long lines.
2017-12-04 13:53:16 +02:00
Esa Korhonen
c0ab80e459 MXS-1513: Cleanup some messages, change function names
No real functionality changes.
2017-12-04 12:53:09 +02:00
Esa Korhonen
45834a89b5 MXS-1533: Rename "auto_join" to "auto_rejoin" 2017-12-04 09:59:29 +02:00
Markus Mäkelä
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
Esa Korhonen
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
Esa Korhonen
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
Johan Wikman
cf627203cb Fix issues revealed on CentOS6 2017-12-02 13:42:15 +02:00
MassimilianoPinto
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
MassimilianoPinto
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
Esa Korhonen
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
MassimilianoPinto
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
MassimilianoPinto
aa35b202ec Merge 2.1 into 2.2
Merge 2.1 into 2.2
2017-11-30 09:15:42 +01:00
Johan Wikman
0c2846e48f MXS-1512 Update release notes 2017-11-29 12:41:34 +02:00
Johan Wikman
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
Johan Wikman
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
Johan Wikman
02cf284b61 MXS-1512 Add mock Backend class that can generate resultsets 2017-11-29 12:41:34 +02:00
Johan Wikman
6d66ffe9f7 Use FilterModule::ConfigParameters in test_dbfwfilter 2017-11-29 12:41:34 +02:00
Johan Wikman
9aa4a2d1ff MXS-1512 Create parameters object from default parameters 2017-11-29 12:41:34 +02:00
Johan Wikman
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
MassimilianoPinto
8a10b72e4d Merge 2.1 in 2.2
Merge 2.1 in 2.2
2017-11-29 11:30:33 +01:00
MassimilianoPinto
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
Esa Korhonen
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
Esa Korhonen
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
Esa Korhonen
8966f36b1d MXS-1545: Fix remaining compile issues 2017-11-27 16:24:05 +02:00
MassimilianoPinto
520ee35bd2 MXS-1545: fix compile issue
MXS-1545: fix compile issue
2017-11-27 15:07:06 +01:00
MassimilianoPinto
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
MassimilianoPinto
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
Markus Mäkelä
a72956e2f3 Merge branch '2.1' into 2.2 2017-11-27 09:10:33 +02:00
Markus Mäkelä
a418804c83 Merge branch '2.0' into 2.1 2017-11-27 08:57:46 +02:00
Timofey Turenko
58984b71d8 fix paths 2017-11-27 08:37:35 +02:00
Timofey Turenko
e1711889b9 add upgrade test 2017-11-27 08:37:35 +02:00
Timofey Turenko
0c1b0648b6 add repo config file for mdbci generation 2017-11-27 08:37:35 +02:00
Timofey Turenko
6541f845ea add check for zypper and fix gpg repo sign 2017-11-27 08:37:34 +02:00
Timofey Turenko
6555fc0bab add MDBCI build scripts 2017-11-27 08:37:34 +02:00
Goltz, Immo [Extern]
b1f4d27eb1 Fix check_maxscale_resources.pl listernes parsing, close MXS-1531 2017-11-27 08:32:17 +02:00
Markus Mäkelä
098e9311c1 Update binlogrouter tutorial
Break lines at 80 characters. Add a Table of Contents and reorder sections
to have the actual tutorial part first.

Things that still need doing:

* Move limitations and other documentation to the actual router
  documentation

* Review and simplify examples
2017-11-24 14:50:07 +02:00
Markus Mäkelä
db559a9d61 Update binlogrouter documentation
Updated all examples to use parameters instead of router_options. Added a
more clear note about router_options being deprecated. Removed unnecessary
parameters from all examples.
2017-11-24 14:50:07 +02:00