7295 Commits

Author SHA1 Message Date
Markus Mäkelä
931ca0f497 Stop timeout in avro_alter before fixing replication
The resetting of the replication can take some time. By disabling the
timeout during the reset, false positives are less likely.
2017-07-31 09:42:03 +03:00
Markus Mäkelä
f95fff6632 Stop replication before configuring binlogrouter
The replication needs to be stopped before the binlogrouter is started. If
the replication is stopped after this, it is possible that two servers
with the same value of server_id attempt to register as slaves which
causes the later of them to fail.
2017-07-31 09:42:03 +03:00
Markus Mäkelä
174dad4b5b Fix master server version checks in tests
The master server version was not processed adequately and false positives
of old master versions were possible.
2017-07-31 09:42:03 +03:00
Markus Mäkelä
af99ab3b72 Print the JSON in avro_alter
The test now prints the output in avro_alter. The replicate_from_master
function also stops maxscale before removing the files.
2017-07-31 09:42:03 +03:00
Markus Mäkelä
d0d19f3ded Tune timeouts for bug662
The timeouts were a bit too demanding and increasing them should lower the
rate of false positives.
2017-07-31 09:42:01 +03:00
Markus Mäkelä
fcabda15a8 MXS-1335: Disable root_node_as_master by default
Enabling the option hinders the use of maintenance mode with the root
master node in most use-cases.

This behavior occurs due to the fact that the maintenance mode causes a
server to be treted as if it was down. The Galera monitor waits for the
cluster to reorganize before assigning a new master node. This is correct
(but very unexpected) behavior for single instance use-cases.
2017-07-28 11:52:49 +03:00
Markus Mäkelä
6d9500d898 Add links to release notes in Changelog.md
The Markdown links do not work as the release note files do not exist but
the resulting KB links do work.
2017-07-28 09:47:24 +03:00
Markus Mäkelä
0256be660f Fix missing zlib in build scripts
The zlib library wasn't explicitly installed which caused it to fail on
Debian 9.
2017-07-27 16:49:45 +03:00
Markus Mäkelä
08c51aa598 Remove broken links
The links in old upgrading guides and the changelog pointed to documents
that do not exist.
2017-07-27 16:19:50 +03:00
Markus Mäkelä
86994457e1 Update 2.1.5 release notes
Added all fixed bugs and short descriptions of the major changes.
2017-07-27 16:19:50 +03:00
Johan Wikman
4985bf9b6e MXS-1328 Mark regexp functions as builtin functions
Regexp functions were not listed among the builtin read-only
functions and consequently any SELECT using one of those was
routed to master.
2017-07-27 09:58:32 +03:00
Johan Wikman
d54616f075 Update 2.1.5 release notes 2017-07-27 09:58:32 +03:00
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