Commit Graph

11112 Commits

Author SHA1 Message Date
2c1f79c5d1 MXS-1929: Add runtime creation of filters
Filters can now be created at runtime. This is not yet a usable feature
since the filters can't be added to services at runtime.
2018-07-31 09:41:05 +03:00
d6c378187c Use a more intrusive waiting in setup_binlog
As we know that the test doesn't rely on absolute binlog positions, we can
force synchronization by creating a table on the master and waiting until
that table is replicated to all slaves.
2018-07-31 09:41:05 +03:00
3817960658 MXS-1113 Add basic test
Add test case for text and binary protocol prepared statements in
schemarouter.
2018-07-30 17:22:28 +03:00
11d57a264c MXS-1113 Add support for prepared statements in schemarouter
Add support for binary protocol prepared statements for schemarouter.
This implementation doesn't yet attempt to handle all the edge cases.

Prepared statements are routed to the server that contains the affected
tables, the internal id from the server is then mapped to the session
command id that is inceremented for each prepared statement. This unique
session command id is returned to the client because internal id given
by server might be same around different servers and this way it is
possible to keep track of them and route them to the right servers when
executed.
2018-07-29 14:55:53 +03:00
adbc3a6749 MXS-1113 Add support for prepared statements in schemarouter
Implement handling of the text protocol part of the prepared statements
in schemarouter.
2018-07-29 14:21:55 +03:00
bfe5bcd7a7 Merge branch '2.2' into develop 2018-07-27 19:46:13 +03:00
2f8ebf7ce0 Merge branch '2.2.12' into 2.2 2018-07-27 19:46:01 +03:00
90477f9081 Update release date 2018-07-27 19:45:28 +03:00
fc672dc56e Update release documentation
Removed old and meanlingless parts from emails, added symlink creation.
2018-07-27 19:32:47 +03:00
ab4ae282a4 Merge branch '2.2' into develop 2018-07-27 14:59:49 +03:00
5612896b80 regenerate repo.d only for current target 2018-07-27 14:58:29 +03:00
d59917673d do not generate repo.d in run_test 2018-07-27 14:58:29 +03:00
d6be2cb70d fix typo in upgrade_test 2018-07-27 14:58:29 +03:00
81507349f3 remove reference to repo.d from upgrade_test 2018-07-27 14:58:29 +03:00
ba680b674d do not call mdbci repo config in build.sh and upgrade_test.sh 2018-07-27 14:58:29 +03:00
cfa07c69ff Clean up switchover_check_current()
Now uses MariaDBServer.
2018-07-27 11:20:23 +03:00
18bfca0533 Define inline functions for status variables
The functions are used in MariaDB Monitor.
2018-07-27 11:20:23 +03:00
27e668a3cb Set test timeout to 900 seconds
Any test that takes longer than 15 minutes to run is too long and should
explicitly set a longer timeout.
2018-07-26 16:32:46 +03:00
6c59da77fb Merge branch '2.2' into develop 2018-07-26 11:27:09 +03:00
571d52f557 Typo fix in logthrottling_test 2018-07-26 10:59:53 +03:00
4dc1638f78 Silence the -Wunused-result warning
-Wunused-result warning in test_logthrottling.cc was causing error when
trying to build MaxScale from source. This warning can be silenced with by
putting the function triggering the warning in if-clause.
2018-07-26 10:59:53 +03:00
e64e4bc34f Use the word REST API in documentation
The HTTP admin interface was ambiguous.
2018-07-26 10:59:53 +03:00
3243f741a0 MXS-1961 Standalone master loses master status when an alternative master emerges
Fixes the bug by requiring that only running slaves are considered when choosing a master.
2018-07-26 10:37:30 +03:00
fbce38878b Turn server status macros to functions 2018-07-25 11:19:47 +03:00
e2a913013a Update release procedure documentation
The documentation contents and upgrading documents no longer has a link to
the release notes.
2018-07-25 00:11:57 +03:00
10115601ca Add 2.2.12 release notes
Added release notes for the 2.2.12 release.
2018-07-25 00:07:09 +03:00
b421e56d1c Move execute_worker_task to MonitorInstance
The function is rather general and may of use to other monitor modules.
2018-07-24 15:07:18 +03:00
4b7cd7a281 Dump queue contents on unexpectedly NULL buffer
When the query queue does not contain a complete packet
(i.e. modutil_get_next_MySQL_packet return NULL), an informative dump of
how many bytes and what is stored is logged.
2018-07-24 09:51:48 +03:00
ea5c5f3a07 Never return NULL from gwbuf_make_contiguous
By aborting the process if memory runs out when a buffer needs to be made
contiguous, we rule out other, more subtle, errors. Failing as soon as a
possible when memory allocation fails gives better error messages.
2018-07-24 09:51:47 +03:00
896c7deb03 Use gwbuf_make_contiguous only with non-NULL buffers
A NULL buffer should never be made contiguous as that points to a flaw in
program logic.
2018-07-24 09:51:47 +03:00
37f32464f2 Rewrite mxs564_big_dump
Streamlined the test to perform as much testing as fast as possible. The
gradual ramp up did not provide any concrete benefits compared to testing
everything at once.

Replaced structures with C++11 alternatives where possible and removed
unused, redundant or dead code.
2018-07-24 09:51:47 +03:00
bbe4f42935 Add more packet splitting debug assertions
Having more debug assertions in functions that split packets guarantees
that they work as expected.
2018-07-24 09:51:47 +03:00
d68f20b75b Also copy version files for MaxCtrl builds
When MaxCtrl is being built, the source is copied into the build directory
to prevent polluting the source tree with node_modules. This means that
any relative references MaxCtrl builds make outside of the maxctrl
directory must be copied to the build directory.
2018-07-24 09:51:46 +03:00
21eef8a670 MXS-1985: Kill connections inside workers
The LocalClient micro-client required a reference to the session that was
valid at construction time. This is the reason why the previous
implementation used dcb_foreach to first gather the targets and then
execute queries on them. By replacing this reference with pointers to the
raw data it requires, we lift the requirement of the orignating session
being alive at construction time.

Now that the LocalClient no longer holds a reference to the session, the
killing of the connection does not have to be done on the same thread that
started the process. This prevents the deadlock that occurred when
concurrect dcb_foreach calls were made.

Replaced the unused dcb_foreach_parallel with a version of dcb_foreach
that allows iteration of DCBs local to this worker. The dcb_foreach_local
is the basis upon which all DCB access outside of administrative tasks
should be built on.

This change will introduce a regression in functionality: The client will
no longer receive an error if no connections match the KILL query
criteria. This is done to avoid having to synchronize the workers after
they have performed the killing of their own connections.
2018-07-24 09:51:46 +03:00
101dad74a7 MXS-1985: Add debug assertions to dcb_foreach
The dcb_foreach function is not safe to use from multiple threads at the
same time. This should be asserted by checking that the function is called
only from the main worker.

The addition of this assertion also implies that only administrative
operations should use the dcb_foreach function. To accommodate this
change, the KILL command iteration needs to be adjusted.
2018-07-24 09:51:45 +03:00
30ac15817f Assert that query queue contains complete packets
The query queue in readwritesplit must not contain partial packets. If it
does, something is broken as only complete packets should ever be in it.
2018-07-24 09:51:45 +03:00
ee6e2b28b2 MXS-1985: Add concurrent KILL test case
The test case runs parallel KILL queries and reproduces the problem.
2018-07-24 09:51:35 +03:00
b5584e3fd0 Backport test utility functions
The resultset processing functions are helpful in writing tests that
process resultsets.
2018-07-24 09:51:35 +03:00
6b8d9dc5d9 Print an error on invalid request JSON
When a request to the REST API is made with invalid JSON, it's hard to see
why the request fails due to the fact that no error is sent.
2018-07-24 09:51:35 +03:00
609a6723a8 MXS-1950: Log error on failed COM_CHANGE_USER
If a client is executing a COM_CHANGE_USER command and the
reauthentication of the client fails, no error message would be logged
about the failure of the reauthentication process and only a routing
failure message would be logged.
2018-07-24 09:51:33 +03:00
27084f1368 Handle the situation where the previous master is reselected 2018-07-23 12:17:00 +03:00
f8898a1562 Update MariaDB-Monitor documentation
Added explanation on master selection.
2018-07-20 17:44:26 +03:00
382a017518 A master which is down for longer than failcount is considered an invalid master
If auto_failover is disabled and an alternative master exists, the
monitor will swap the master. This may break replication, but the
situation requires that the dba has set up a cluster with multiple
masters.
2018-07-20 15:47:23 +03:00
c9570ff616 Check failover applicability to the cluster every turn
This should give an advance warning if a user tries to activate auto_failover
on a cluster which does not support it.
2018-07-20 15:33:47 +03:00
862ae099b0 Construct diagnostics results in the monitor thread
MariaDBMonitor diagnostics printing is unsafe as some of the read
fields are arrays. To be on the safe side, the fields are now read
in the monitor worker thread.

Since diagnostics must work even for stopped monitors, a worker task
is used. In practice, it usually runs when the monitor is sleeping.
2018-07-20 10:18:58 +03:00
590df89dbc Fix mm_mysqlmon test
Because of monitor changes, the test had wrong assumptions.
Renamed the test and updated it to use MaxCtrl for some queries.

Also, changed the type of the cycle container in the monitor to an
ordered map so that results are predictable.
2018-07-18 16:32:16 +03:00
bf3a683395 Update MariaDB-Monitor.md
Added missing RELOAD privilege to monitor docs.
2018-07-18 16:28:45 +03:00
ddcaa5603b Update Configuring-MariaDB-Monitor.md
Added the missing RELOAD privilege.
2018-07-18 16:28:45 +03:00
7f1f65b411 Update Configuring-MariaDB-Monitor.md
Added a note to monitor creation tutorial about automated failover.
2018-07-18 16:28:45 +03:00
f41cbaf2fc Update MaxScale-Tutorial.md
Added a clarifying comment about where the users must be created.
2018-07-18 16:28:45 +03:00