7283 Commits

Author SHA1 Message Date
Markus Mäkelä
448d56a273 Disable replication_manager and fix mxs1323_stress false positive
The replication_manager is only designed for systems that have yum
installed which means it will always fail on non-RHEL/CentOS systems.

The query threads in mxs1323_stress were not checking whether the test had
ended while they were executing the queries. This caused test timeouts as
the queries can take a relatively long time.
2017-07-27 09:26:27 +03:00
Markus Mäkelä
e48fb6a071 Assume that the test database exists
The tests should not drop the test database and then recreate it. This
adds an unnecessary burden on replication which will cause false positives
when replication is not fast enough.

This is commit `2410c23e6664bef7e449dfd5a767121f309559fe` from develop
cherry-picked to 2.1.
2017-07-27 09:26:27 +03:00
Markus Mäkelä
563fdb4db5 Backport testing fixes to 2.1
Some of the testing fixes weren't included into 2.1 and due to that, a few
of the tests appear to fail.
2017-07-27 09:26:27 +03:00
Markus Mäkelä
e26ec4f8b9 MXS-1329: Only parse text protocol statements
The query classifier should only be used to parse text protocol
statements. The insertstream filter exploited the fact that any statements
that the filter did not expect would be classified as an unknown
commands. This led to repetitive error messages with binary protocol
statements.
2017-07-27 09:26:27 +03:00
Markus Mäkelä
fc81a8097f Add missing length and real_type fields to cdc_schema.go
The Go version of the CDC schema generator was missing the new `length`
and `real_type` fields.
2017-07-25 21:08:50 +03:00
Markus Mäkelä
ba3912ddb4 MXS-1326: Fix postrm script
The script could only work on RPM based systems as DEB based uninstall
scripts are called with different parameters, namely "remove" instead of
"0".
2017-07-25 11:25:43 +03:00
Markus Mäkelä
f16e93c112 MXS-1285: Check that upstart config exists before copying it
The existence of the file should be checked before it is copied. Otherwise
the installation will produce errors.
2017-07-25 11:25:43 +03:00
Markus Mäkelä
ed44c45be1 MXS-1323: Fix crash on attempted retry of read
When a backend is waiting for a response but no statement is stored for
the session, the buffer where the stored statement is copied is not
modified. This means that it needs to be initialized to a NULL value.

Added a test that checks that the behavior works as expected even with
persistent connections. A second test reproduces the crash by executing
parallel SET commands while slaves are blocked.

There is still a behavioral problem in readwritesplit. If a session
command is being executed and it fails on a slave, an error is sent to the
client. In this case it would not be necessary to close the session if the
master is still alive.
2017-07-25 11:25:43 +03:00
Markus Mäkelä
2148d78d3f MXS-1324: Fix build scripts for Debian-based systems
The avrorouter dependencies weren't correctly built for Debian-based
systems. This is due to the different way Debian and RHEL store libraries.
2017-07-25 11:25:43 +03:00
Johan Wikman
17a09412cc Update ChangeLog and Upgrading 2017-07-25 10:42:18 +03:00
Johan Wikman
6ac3484e31 Update 2.1.5 version number 2017-07-25 10:42:18 +03:00
Markus Mäkelä
24d20d2a1b Increse timeouts for mxs1071_maxrows
As the test does a lot of large inserts, the timeouts can be triggered at
times when the test is not actually stuck but just waiting for the insert
to complete. Increasing the timeout from 10 to 30 seconds should give it
enough time to finish processing.
2017-07-24 13:55:17 +03:00
Markus Mäkelä
7e38d8f6b7 Enable info log for mariadb_tests_hartmut_galera
The test fails for unknown reasons from time to time and enabling the info
log level should help resolve it.
2017-07-24 12:59:11 +03:00
Markus Mäkelä
f76e4cd61d Fix GCC 7 and OpenSSL 1.1 build failures
Fedora 26 and Debian 9 have both GCC 7 and OpenSSL 1.1. These fixes add
support for the newer versions of these libraries.
2017-07-24 10:38:47 +03:00
Markus Mäkelä
07a5cba2de MXS-1319: Set SQL_MODE for all internal connections
When an internal connection is created, the SQL_MODE of the connection
should be set to a known default. The empty SQL_MODE allows consistent
functionality for all backend server versions.
2017-07-18 11:21:33 +03:00
Markus Mäkelä
9752068444 MXS-1318: Use certificate chains instead of individual files
Using SSL_CTX_use_certificate_chain_file instead of
SSL_CTX_use_certificate_file allows the use of certificate chains. This is
the method that the OpenSSL documentation recommends:

https://wiki.openssl.org/index.php/Manual%3ASSL_CTX_use_certificate%283%29
2017-07-18 10:07:41 +03:00
Markus Mäkelä
00f046da1b MXS-1316: Read the raw input in cdc_kafka_producer.py
The input can be read as raw bytes since kafka expects the data to be of
type bytes instead of str.
2017-07-13 13:27:51 +03:00
Markus Mäkelä
fd77b18c49 Remove false debug assertion in avrorouter
The asserted value can be false without it being an error. When a table is
re-mapped to a different position, there is no guarantee that the previous
value has not been reused by another table.
2017-07-13 12:30:24 +03:00
Markus Mäkelä
01b611d895 MXS-1312: Add tests for permission type rule
The test checks that rules with only optional parts defined work.
2017-07-07 16:52:17 +03:00
Markus Mäkelä
26f8f9d869 MXS-1311: Add tests for keywords as function parameters
The dbfwfilter tests now test the function type rule with keywords as
parameters.
2017-07-07 16:46:54 +03:00
Markus Mäkelä
d47e32966f MXS-1312: Make the permission rule the default type
If a rule is defined with only an optional part, it should be of the
permission type. This type is used to signal that the rule matches if the
optional constraints are fulfilled.

Due to refactoring, the default type was changed from RT_PERMISSION to
RT_UNDEFINED.
2017-07-07 15:44:37 +03:00
Markus Mäkelä
9c4711aac8 MXS-1311: Allow backtick quoted values for function rules
The function rules can now take keywords as arguments if they are quoted
by backticks.
2017-07-07 15:17:57 +03:00
Markus Mäkelä
f3e98745bd MXS-1313: Fix updating of server character sets
The server character set is now updated every time a connection is created
with mxs_mysql_real_connect.
2017-07-07 14:52:15 +03:00
Markus Mäkelä
66048cf094 Add 2.1.5 release notes
Added release notes for 2.1.5.
2017-07-06 11:03:44 +03:00
Markus Mäkelä
9618e63b5f MXS-1310: Add deterministic conflict resolution
The schemarouter can now resolve database mapping conflicts in a
deterministic manner. This will fix the problem of central databases which
are replicated shards being assigned in a non-deterministic manner.
2017-07-05 19:19:49 +03:00
Markus Mäkelä
a23e81c438 Add test for MXS-1310
Added test that checks how the use of implicit databases is handled in
schemarouter.
2017-07-05 08:42:52 +03:00
Markus Mäkelä
0c33572a96 MXS-1310: Detect implicit database usage
When the current database is implicitly used in a query that also uses an
explicit database, it must be routed to the shard which has the current
database.

As cross-shard joins are not supported, the safest, and possibly the most
expected course of action to take, is to route it to the so-called default
shard. The default shard is the shard that contains the database that is
currently set as the active database with a COM_INIT_DB, a text protocol
USE <database> query or it was set at connection time.
2017-07-04 23:21:04 +03:00
Markus Mäkelä
5ed6483f01 Fix avro CREATE TABLE message
The string was assumed to be null-terminated when in reality it was not.
2017-07-04 12:21:25 +03:00
Markus Mäkelä
5c50045227 Fix ALTER TABLE regression in avrorouter
The avrorouter failed to detect ALTER TABLE statements which caused a
regression. Extended the alter table tests to parse the JSON for more
strict validation of test results.
2017-07-04 09:31:11 +03:00
Markus Mäkelä
c952b6805e Add MXS-1308 to release notes
Added MXS-1308 to release notes.
2017-07-03 14:23:21 +03:00
Markus Mäkelä
d4a51a048a Update release date 2017-07-03 13:46:10 +03:00
Markus Mäkelä
ff22243955 MXS-1308: Fix crash with multimaster=true
The multimaster node detection uses stacks to sort the node groups. The
size of this stack was always assumed to be positive but it was possible
that it dropped down to -1 causing a crash when the stack was accessed
with the index number.
2017-07-03 02:44:37 +03:00
Markus Mäkelä
31504585fc Fix connect_to_nonexisting_db
The test dropped the 'test' database which is heavily used both for
checking functionality and running tests. A better alternative is to use a
custom database that is only used by this test.
2017-06-30 18:41:13 +03:00
Markus Mäkelä
322fae8326 Add wrapper functions for buffer and original IV access
Added functions for accessing the buffer and original IV. This hides the
changes introduced in OpenSSL 1.1.
2017-06-30 10:46:05 +03:00
Markus Mäkelä
a47d4c40f5 Abstract EVP cipher context creation
The EVP_CIPHER_CTX is now created inside a wrapper function to add support
for OpenSSL 1.1. Also fixed improper use of the EVP_CIPHER_CTX internals
in binlogrouter.
2017-06-30 10:46:04 +03:00
Markus Mäkelä
469b432ebe Detect and handle OpenSSL 1.1
OpenSSL 1.1 supports most of the native threading libraries, including
pthread. This means that only versions before 1.1 need the thread handling
code.
2017-06-30 10:42:20 +03:00
Johan Wikman
92d9356968 Update release notes, change log and upgrading 2017-06-28 12:13:10 +02:00
Markus Mäkelä
8e3d4d9dd2 MXS-1298: Fix typo in avro error message
Changed 'numer' to 'number'.
2017-06-28 11:52:50 +03:00
Markus Mäkelä
2bc5188dae MXS-1304: Don't null-terminate buffers in gw_str_xor
The gw_str_xor function is used only for doing XOR operations on binary
buffers.
2017-06-28 11:36:17 +03:00
Markus Mäkelä
40b1739249 MXS-1299: Fix CREATE TABLE t1 LIKE t2 processing
The creation of tables from other tables was not working even though the
information was available inside the avrorouter.
2017-06-28 11:25:57 +03:00
Markus Mäkelä
84925b3f10 Merge branch '2.0' into 2.1 2017-06-28 10:59:06 +03:00
Markus Mäkelä
9b0631f30b MXS-1289: Fix crash on TABLE_MAP with ID > 1024
The active table map was acquired with a modulo operation on the size of
the array instead of the number of elements.
2017-06-28 08:49:57 +03:00
Markus Mäkelä
7bb76f52e5 Disable ssl_load_galera test
The normal replication version of the test is disabled so there is no
reason to have the Galera version enabled.
2017-06-28 08:10:49 +03:00
Markus Mäkelä
dc849d1c0f MXS-1291: Attempt to bind on 0.0.0.0 when :: fails
If binding on the IPv6 all interfaces address fails, MaxScale will attempt
to bind on the IPv4 address.
2017-06-27 21:27:20 +03:00
Markus Mäkelä
1df8fda93f Merge branch '2.0' into 2.1 2017-06-27 20:52:58 +03:00
Markus Mäkelä
cd09e65714 MXS-1296: Always use a case-insensitive parser
The two cases where the case-sensitive parser functions were used don't
appear to hold any special meaning. The case-insensitive function should
be used as it implements a superset of functionality compared to the
case-sensitive version.
2017-06-26 21:05:42 +03:00
Timofey Turenko
9737ffe092 Fix masking tests
The masking filter now has a default fill value, so that if a
provided value does not match, then "X" is used.

The tests were modified to use "Y" as an explicitly provided
fill value (to distinguish from the default "X") and the results
were the default fill value would kick in were modified accordingly.
2017-06-26 12:22:39 +02:00
Johan Wikman
90ab2bc106 Update 2.1 version 2017-06-26 12:09:18 +03:00
Johan Wikman
500f79a150 MXS-1296: Test that lc statements are parsed correctly
The transaction boundary parser - TrxBoundaryParser - must handle
upper and lowercase statements correctly.
2017-06-26 10:57:27 +03:00
Markus Mäkelä
bd1da82c96 Fix cdc_schema.py
There's no need to use Python 3 for the script and using it introduces
problems due to the poor availability of MySQL Connector/Python for
Python3.

ENUM, SET and DECIMAL values should have a length of -1 as the length is
meaningless for these types.
2017-06-23 11:10:41 +03:00