9522 Commits

Author SHA1 Message Date
Markus Mäkelä
ea58b16a7a Add missing include for vector
The vector header was not included in dbfwfilter.hh.
2018-01-30 19:14:28 +02:00
Esa Korhonen
c7474e439e Print new parameters during diagnostics
Also, copy using strdup instead since config_copy_string()
returns null for empty strings.
2018-01-30 18:40:33 +02:00
Markus Mäkelä
3dfb972d87 Merge branch '2.1' into 2.2 2018-01-30 16:28:11 +02:00
Markus Mäkelä
6dcc71d862 MXS-1621: Fix minor bugs caused by previous changes
Used the correct value in table_create_alloc and remove unused
parameter. Use the pre-calculated end pointer when looking for events.
Always use the column count of the TABLE_MAP event as all mismatches are
detected earlier.
2018-01-30 15:59:06 +02:00
Markus Mäkelä
66ec4792cd MXS-1575: Fix DATETIME handling
DATETIME values in old formats should always be 8 bytes long. This is how
MariaDB 10.2 stores them and only DATETIME2 values are stored with a
fractional part.
2018-01-30 15:59:05 +02:00
Markus Mäkelä
93923acafb MXS-1621: Skip unneeded ALTER TABLE operations
Some ALTER TABLE operations (e.g. ADD INDEX) are not useful to the
avrorouter. These need to be detected and skipped.
2018-01-30 15:59:05 +02:00
Markus Mäkelä
e14710ab2b Fix ALTER TABLE detection regex
The regular expression expected that the COLUMN keyword was always
present.
2018-01-30 15:59:05 +02:00
Markus Mäkelä
df86ee3579 Fix buffer overflow assertions
The buffer overflow assertions were off by one: The data pointer can be
equal to the end pointer when the last column of the row is processed.
2018-01-30 15:59:05 +02:00
Markus Mäkelä
9146a215f7 Fix DDL table identifier parsing
The parsing was inadequate and did not support all forms of quoted
identifiers.
2018-01-30 15:59:05 +02:00
Markus Mäkelä
b7e475f316 MXS-1621: Detect TABLE_MAP ↔ TABLE_CREATE column count mismatch
If the TABLE_MAP and TABLE_CREATE have different column counts, an error
is logged and the row events are skipped.
2018-01-30 15:59:05 +02:00
Markus Mäkelä
c000b3186c MXS-1575: Fix optional COLUMN keywork handling
The COLUMN keyword is optional and cannot be assumed to exist.
2018-01-30 15:59:05 +02:00
Markus Mäkelä
8dfb1d0113 MXS-1621: Add ALTER TABLE ... [FIRST | AFTER col ] parsing
The parser checks whether the FIRST or AFTER keywords are used and, if
AFTER is used, extracts the relevant column name.

Added a test case that checks that the parsing works and detects the
correct column names.
2018-01-30 15:59:05 +02:00
Timofey Turenko
f9cc2d5bbb
use 'mdbci destroy' instead of 'vagrant destroy' (#163)
use mdbci destroy instead of vagrant destroy
2018-01-30 15:48:05 +02:00
Johan Wikman
6410b4f19a MXS-1633 Turn off collecting of sqlite3 memstats
According to customer reports collecting the statistics has a significant
impact on the performance. As we don't need that information we can just
as well turn off that.

Further, since maxscale-common now links to the sqlite3-library, no
module needs to do that explicitly.
2018-01-30 13:58:37 +02:00
Markus Mäkelä
5bc945df3f Allow monitor to stabilize in mxs1516
The test needs to give the monitor enough time to detect the change in the
replication topology in order for it to work.
2018-01-30 11:08:41 +02:00
Markus Mäkelä
524e55bf52 Sync slaves before checking MaxScale is alive
Synchronizing the slaves before checking that MaxScale is still alive
makes sure the slave servers have settled down to a known state.
2018-01-30 11:08:41 +02:00
Markus Mäkelä
cbfee5698f Fix CDC::connect
The function used the m_fd member variable before it was updated to point
to the actual file descriptor of the connection. This caused the test to
fail.

Also fixed the nointr_write function to correctly process multiple
consecutive writes.
2018-01-30 11:08:41 +02:00
Markus Mäkelä
b7af191f40 Improve CDC connector error messages
A more precise error message is now returned if authentication times out.
2018-01-30 11:08:41 +02:00
Markus Mäkelä
1a33c1caef Build CDC connector into the core test library
The CDC connector can be build directly into the core testing library for
testing purposes. This way we remove an unnecessary dependency on a
library. This commit fixes the linkage failure of the cdc_datatypes test.
2018-01-30 11:08:41 +02:00
Markus Mäkelä
ab0ea417ae Fix typo in maxctrl/CMakeLists.txt
The correct command is `message`.
2018-01-30 07:56:48 +02:00
Johan Wikman
b5a291bb78 Update ChangeLog, Add Release Notes for 2.2 2018-01-29 16:14:42 +02:00
Esa Korhonen
e455e8d43c Simplify monitor start and stop during switchover/failover
If these operations failed, the monitor could be left stopped.
2018-01-29 15:44:32 +02:00
Johan Wikman
5212b67bb2 Update 2.2 version number 2018-01-29 15:33:29 +02:00
Johan Wikman
ef1ec2e524 MXS-1591 Mark GET_LOCK(...) et.al. as WRITE
The follwing statements

    SELECT GET_LOCK('lock1',10);
    SELECT IS_FREE_LOCK('lock1');
    SELECT IS_USED_LOCK('lock1');
    SELECT RELEASE_LOCK('lock1');

are now classified as QUERY_TYPE_READ|QUERY_TYPE_WRITE. That will
make cooperative locking work if these functions are used inside
non-read-only transactions and outside transanctions.
2018-01-29 15:25:21 +02:00
Johan Wikman
0db538db9a MXS-1583 Treat independent 'users' line in OR-fashion
If there are several 'users' lines in a rule file, for a particular
user, the rules each matching line will be checked independently
until a rule match is found.

That is, the rules of each 'users' line are treated in an OR-fashion
with respect to each other.
2018-01-29 15:25:21 +02:00
Johan Wikman
cf0d745c14 MXS-1583 Add test that exposes the behaviour
This will fail with MaxScale 2.2.1.
2018-01-29 15:25:21 +02:00
Esa Korhonen
9ded584836 Check that all slaves use gtid replication before performing failover 2018-01-29 13:33:16 +02:00
Markus Mäkelä
6068850b18 MXS-1627: Only load users that use default auth plugin
The list of users that is used for authentication shoudl only consist of
users that do not use an explicit authentication plugin. This way
authentication fails before any connections to the backend servers are
done.
2018-01-29 13:10:19 +02:00
Markus Mäkelä
9b5d4d129e MXS-1630: Combine MaxCtrl into the main package
Added MaxCtrl to the core package. Removed the old packages from build
scripts.
2018-01-29 11:23:00 +02:00
Markus Mäkelä
ef5c8d3114 MXS-1631: Update handshake version string
Updated handshake version string to 5.5.5-10.2.12. This will signal that
MaxScale is capable of behaving like a fully-fledged 10.2 server.
2018-01-29 11:23:00 +02:00
Esa Korhonen
e918810a4f MXS-1604: PAMAuth Use "mysql" as default service name, fix authentication data updating
If a user has an empty service name, use "mysql" as default.

Authentication data was only updated inside get_pam_user_services() if no service
was found. It was possible that the PAM service changed but the old service
would be used for authenticating, causing a false negative.

Now, the auth data is updated outside the function if authentication fails for
any reason. The new service data is compared to the old and if equal, password
check is not attempted again. This gives a false negative only if user password
has changed after the previous attempt.

Also, fixed some comments.
2018-01-26 11:00:04 +02:00
Markus Mäkelä
4dc9b56d29 Fix check_backend
Fixed the core generation and removed obsolete files.
2018-01-26 10:41:34 +02:00
Johan Wikman
dcd57ea21b MXS-1623 Expose descriptor counts through maxadmin 2018-01-26 10:25:19 +02:00
Johan Wikman
11b0f84b8e MXS-1623 Maintain count of current/total descriptors 2018-01-26 10:25:19 +02:00
Markus Mäkelä
3da4aa1665 Remove trailing whitespace in check_backend
Removed trailing whitespace in check_backend
2018-01-26 10:23:05 +02:00
Timofey Turenko
4e9a5af926 add execution of add_core_conf.sh to 'check_backend' to set up core dump saving 2018-01-26 09:35:02 +02:00
Esa Korhonen
c86ee1f53a Clarify documentation on verify_master_failure 2018-01-25 11:54:59 +02:00
Esa Korhonen
d681d0f2fa Add manual rejoin tests 2018-01-25 11:49:37 +02:00
Johan Wikman
9093f19c8b Clean up atomic_load-functions 2018-01-25 10:52:03 +02:00
Johan Wikman
b8c78ca9fe Remove erroneous casts 2018-01-25 10:52:03 +02:00
Markus Mäkelä
522cbab23d Make the CDC connector C++0x compliant
As CentOS 6 is supported, the CDC connector ought to build on non-C++11
systems.
2018-01-24 11:01:22 +02:00
Johan Wikman
ed81757c04 Ensure that right close is called 2018-01-24 09:31:22 +02:00
Markus Mäkelä
c96d27a495 MXS-1538: Use the integrated CDC connector
Now that the connector resides in the same repository, it can be built as
a library for the tests. Installing the development package is one option
but it would unnecessarily complicate the build process.
2018-01-23 16:32:48 +02:00
Markus Mäkelä
f45911caf8 Extend galera_priority test case
The test now verifies that the node priorities are in effect even after
MaxScale is restarted.
2018-01-23 16:32:48 +02:00
Esa Korhonen
257034bf3e Clarify master failure verification
The two previous functions were somewhat overlapping.
2018-01-23 16:14:50 +02:00
Esa Korhonen
a25e90643a Add documentation on manual rejoin 2018-01-23 15:47:49 +02:00
Markus Mäkelä
653b8429d4 Extend cdc_datatypes test
The test now also checks DATE, DATETIME and TIMESTAMP types.
2018-01-23 10:50:39 +02:00
Markus Mäkelä
9d4e41259c Add missing CMakeLists.txt
The connectors directory file wasn't added.
2018-01-23 10:32:51 +02:00
Markus Mäkelä
c85f83fa2b Fix strcpy overlap in binlogrouter
The source and destination buffers could overlap which is why an
intermediate buffer is required.
2018-01-23 09:26:22 +02:00
Markus Mäkelä
c893e354a9 Add missing variable
The numlocks variable is used when older OpenSSL versions are used.
2018-01-23 09:26:02 +02:00