Commit Graph

9528 Commits

Author SHA1 Message Date
1febafabf3 Crash after double close on debug builds
When a double close is detected in a debug build, a debug assertion is
triggered. This will generate a core dump which should help investigate
the double close.
2018-01-31 13:38:45 +02:00
26d3de7a3b Skip parsing when in read-only transaction
As chages to the transaction state are detected by the protocol level
mini-parser, there's no need to fully classify queries inside read-only
transactions. This should be a good performance boost for loads that
heavily use read-only transactions.
2018-01-31 13:38:45 +02:00
d506f01de9 Add basic MaxCtrl test
The test does a very minimal check for MaxCtrl functionality.
2018-01-31 13:38:28 +02:00
4b7c334c1b Add a timeout to mxs1585
The test will hang if one of the threads doesn't exit. To detect failures
faster, a timeout is needed.
2018-01-31 13:38:28 +02:00
f53e112bf4 Don't write errors to dummy sessions
If a DCB is closed before a response to the handshake packet is received,
the DCB's session will point to the dummy session. In this case no error
should be written to the DCB.
2018-01-31 13:38:28 +02:00
255250652d Refactor pre-switchover, add similar checks as in failover
Now detects some erroneous situations before starting switchover.
Switchover can be activated without specifying current master.
In this case, the cluster master server is selected.
2018-01-31 10:40:09 +02:00
ea58b16a7a Add missing include for vector
The vector header was not included in dbfwfilter.hh.
2018-01-30 19:14:28 +02:00
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
3dfb972d87 Merge branch '2.1' into 2.2 2018-01-30 16:28:11 +02:00
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
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
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
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
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
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
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
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
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
f9cc2d5bbb use 'mdbci destroy' instead of 'vagrant destroy' (#163)
use mdbci destroy instead of vagrant destroy
2018-01-30 15:48:05 +02:00
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
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
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
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
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
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
ab0ea417ae Fix typo in maxctrl/CMakeLists.txt
The correct command is `message`.
2018-01-30 07:56:48 +02:00
b5a291bb78 Update ChangeLog, Add Release Notes for 2.2 2018-01-29 16:14:42 +02:00
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
5212b67bb2 Update 2.2 version number 2018-01-29 15:33:29 +02:00
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
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
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
9ded584836 Check that all slaves use gtid replication before performing failover 2018-01-29 13:33:16 +02:00
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
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
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
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
4dc9b56d29 Fix check_backend
Fixed the core generation and removed obsolete files.
2018-01-26 10:41:34 +02:00
dcd57ea21b MXS-1623 Expose descriptor counts through maxadmin 2018-01-26 10:25:19 +02:00
11b0f84b8e MXS-1623 Maintain count of current/total descriptors 2018-01-26 10:25:19 +02:00
3da4aa1665 Remove trailing whitespace in check_backend
Removed trailing whitespace in check_backend
2018-01-26 10:23:05 +02:00
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
c86ee1f53a Clarify documentation on verify_master_failure 2018-01-25 11:54:59 +02:00
d681d0f2fa Add manual rejoin tests 2018-01-25 11:49:37 +02:00
9093f19c8b Clean up atomic_load-functions 2018-01-25 10:52:03 +02:00
b8c78ca9fe Remove erroneous casts 2018-01-25 10:52:03 +02:00
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
ed81757c04 Ensure that right close is called 2018-01-24 09:31:22 +02:00
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
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