7566 Commits

Author SHA1 Message Date
Markus Mäkelä
dbad6b737d Detect redundant table map events
When two identical tables are mapped into the same slot, the newer one is
ignored.
2018-01-15 16:15:20 +02:00
Markus Mäkelä
5e4b7ae7c7 Fix memory leak in avrorouter
The TABLE_MAP freeing function leaked memory.
2018-01-15 16:15:20 +02:00
Markus Mäkelä
f2771d5ad8 Remove obsolete message
The warning that a schema already exists is obsolete as mapped tables are
now always opened instead of being reused. This causes the schema checks
to be done for each mapped table.
2018-01-15 16:15:19 +02:00
Johan Wikman
398dbbc66d Update 2.1 version number 2018-01-08 14:28:13 +02:00
Markus Mäkelä
a8876fbcb8 Add CONTRIBUTING document and pull request template
These templates allow for easier pull requests.
2018-01-08 14:07:31 +02:00
Markus Mäkelä
0416d66bcb Set query classifier with an absolute path in tests
Setting the query classifier with an absolute path makes it easier to
manage test setup without having to manually resolve the relative path to
the query classifier from the test source directory.
2018-01-08 09:41:24 +02:00
Markus Mäkelä
579dca0750 Log to stdout in unit tests
The log manager will log to stdout to work around directory and file
permissions.
2018-01-05 16:12:54 +02:00
Markus Mäkelä
3f78dbc923 Improve avrorouter assertion output
When an assertion fails due to an overflow of the event buffer, all
processed values for that event are dumped.

This commit also enables the assertions even for non-debug builds which
should speed up the elimination process for bugs in the avrorouter. The
overhead of doing this is minimal as the output is already gathered for
the INFO level logging.
2018-01-05 13:39:57 +02:00
Markus Mäkelä
e5b5303137 Initialize the query classifier in tests
The test initialization function now loads the query classifier.
2018-01-05 12:57:09 +02:00
Markus Mäkelä
ce1c45828a MXS-1575: Fix CREATE TABLE processing
The CREATE TABLE processing failed to identify the explicit database names
that were generated by mysqldump.
2018-01-05 12:50:39 +02:00
Markus Mäkelä
c64fd4f39f MXS-1543: Add test case
Added test case that checks that statement based replication is detected.
2018-01-05 12:50:39 +02:00
Markus Mäkelä
95ad3aa7df MXS-1543: Log a warning if STATEMENT or MIXED is used
If avrorouter suspects that statement based or mixed replication formats
are being used, it logs a warning.
2018-01-05 12:50:39 +02:00
Markus Mäkelä
e310bbbe53 Initialize query classifier in housekeeper thread
The query classifier was not initialized for the housekeeper thread. This
means that tasks could not use the query classifier and as the avro
conversion is done inside a task, it can't use it.
2018-01-05 12:50:39 +02:00
Markus Mäkelä
a732a4c9a2 Fix packaging when both RPM and DEB tools are installed
If both RPM and DEB tools are installed, only DEB packages should be
generated.
2018-01-05 12:50:39 +02:00
Johan Wikman
583c63e7e1 Merge branch '2.1.13' into 2.1 2018-01-05 09:49:39 +02:00
Johan Wikman
87d729a4f9 Update 2.1.13 release date 2018-01-05 09:48:37 +02:00
Timofey Turenko
1bd20cd2eb temopary disable snapshot revert due to Galera failures 2018-01-05 09:40:41 +02:00
Markus Mäkelä
e9fceff8ce Fix log manager race condition
The log manager could send two messages if a log message was posted soon
before the log manager was stopped. This caused a debug assertion which
then manifested as a deadlock inside the log manager.
2018-01-04 10:27:56 +02:00
Timofey Turenko
e0a584a626 add ulimit setting for tests 2018-01-03 14:12:43 +02:00
Markus Mäkelä
3bba88408c Remove random sleep interval from acquire_lock
The function caused problems with tests and the random sleep is truly not
needed (legacy code and it doesn't bring any visible benefits).
2018-01-03 13:08:46 +02:00
Markus Mäkelä
00ca809963 MXS-1542: Add test case
Added test case that checks whether UTF16 strings work. The test is
expected to fail.
2018-01-03 10:37:25 +02:00
Markus Mäkelä
b5914df4f9 Add documentation on how to reset the conversion process
The resetting of the conversion process is now documented.
2018-01-03 09:55:18 +02:00
Markus Mäkelä
f5484a1011 MXS-1576: Add purge command to avrorouter
The `purge` command can be used to reset the conversion
process. Currently, executing the `purge` module command and restarting
MaxScale is the only correct way to reset the conversion process.
2018-01-03 09:44:41 +02:00
Markus Mäkelä
a86b81824f MXS-1575: Add extra debug assertions
Added more debug assertions to JSON serialization of the Avro schema. Also
checked that the column count for the TABLE_CREATE object matches that of
the TABLE_MAP object.
2018-01-03 09:44:41 +02:00
Markus Mäkelä
5c624f9dda Print output for failed unit tests
Add arguments so that CTest prints the output of the test if it fails.
2018-01-03 09:44:17 +02:00
Markus Mäkelä
9a8bf8555a Update release notes
Added MXS-1516 to the release notes.
2018-01-02 11:08:09 +02:00
Markus Mäkelä
bacc11d28e MXS-1516: Validate the connection on each query
A subset of the checks done at connection creation time need to be done at
query routing time. This guarantees that the connection is closed if the
server no longer qualifies as a valid candidate.

Added teset case that checks that a change in the replication topology
correctly breaks the connection.
2018-01-02 11:03:36 +02:00
Markus Mäkelä
3f0ef7481e Fix test build failure
The ssh_node_f function does not exist in 2.1.
2018-01-02 10:10:25 +02:00
Timofey Turenko
aed66e28f6 remove unnecessary template copying from upgrade_test.sh 2018-01-02 08:30:36 +02:00
Timofey Turenko
6645281aeb add killing mysqld process after snapshot revert 2018-01-02 07:32:44 +02:00
Johan Wikman
bac3b95f0e Add 2.1.13 Release Notes, update ChangeLog and Upgrading 2017-12-29 12:32:33 +02:00
Johan Wikman
7d4fcf9e89 Update MaxScale 2.1 version number
2.1.13
2017-12-29 12:28:35 +02:00
Markus Mäkelä
8ac5c3d377 MXS-1585: Make the test more precise
The test now more precisely exercises the code where the crash happened.
2017-12-29 11:04:13 +02:00
Markus Mäkelä
ee8161af83 Fix mxs1509
Temporarily disable the multi-source part of the test. Explicitly set
gtid_slave_pos when changing master. Add missing parameter to
configuration.
2017-12-29 11:01:07 +02:00
Markus Mäkelä
95983ddaf4 Fix unit test failures
When the unit tests were run without installing the libraries in their
final locations, the loading of the modules would fail. Using locations
relative to the build directory allows unit testing without having to
install the libraries.
2017-12-29 10:09:16 +02:00
Markus Mäkelä
a46881c0cc MXS-1585: Check that the master refence is in use
The check for the current master backend did not see if the backend was
actually in use. This would be the case when the backend would be
originally in use but would be later disabled.
2017-12-29 10:05:19 +02:00
Markus Mäkelä
b543f37a11 Run unit tests for each build
The unit tests must pass for the build to successfully continue.
2017-12-27 17:21:42 +02:00
Markus Mäkelä
5ede5a4f96 Fix comment removal regex
The trailing comment removal pattern unnecessarily required that a leading
space is present in all trailing comments.

Also, the pattern didn't match if no line ending was included in the SQL
statement. The subject ending should be the third valid terminator in
addition to UNIX and Windows style line endings.
2017-12-27 17:21:42 +02:00
Markus Mäkelä
c6bc1f7327 MXS-1585: Add preliminary test case
The test case attempts to simulate the environment where the crash appears
to have happened. Local testing does not point out any problems.
2017-12-27 17:21:42 +02:00
Markus Mäkelä
3ca32457db Don't force verbose output
The tests shouldn't force verbose output.
2017-12-27 17:21:42 +02:00
Markus Mäkelä
3b7275ec41 Use default value for "smoke"
The values should only be updated if the environment variable is defined.
2017-12-27 17:21:42 +02:00
Johan Wikman
33b1c552e0 Load qc from build directory
The query classifier library will now be loaded from the build
directory and not from the installation directory.
2017-12-27 16:09:54 +02:00
Johan Wikman
c6e0d1f33c Fix canonizer test programs 2017-12-27 15:34:18 +02:00
Johan Wikman
1908faf150 MXS-1527 Add test case 2017-12-27 14:14:51 +02:00
Johan Wikman
ba9b4a3bf6 MXS-1527 Do not consider sysvars to be updated in SELECT
A statement like

    select if(@@hostname='box02','prod_mariadb02','n');

does not modify @@hostname. Hence the type mask should be
QUERY_TYPE_READ|QUERY_TYPE_SYSVAR_READ and NOT
QUERY_TYPE_READ|QUERY_TYPE_GSYSVAR_WRITE.
2017-12-27 11:09:36 +02:00
Markus Mäkelä
58373b3495 Fix template generation
The templates weren't generated for Galera nodes.
2017-12-27 09:42:21 +02:00
Timofey Turenko
a5d2dc5ac7
fix repositoy signature with sha256 (#154) 2017-12-19 23:31:18 +02:00
Timofey Turenko
e0c88a38ac
fix rsync source copying command to copy also .git (#153) 2017-12-19 23:30:01 +02:00
Markus Mäkelä
8509cf9725 MXS-1581: Add note to limitations
Added CREATE TABLE ... SELECT into the list of avrorouter related
limitations.
2017-12-19 21:14:15 +02:00
Timofey Turenko
1a63e5ec7e
2.1 fix restore (#151)
* refactor test backend fixing

* return comatibility with 5.5 for backend restore

* remove backend configuration scripts
2017-12-18 23:47:02 +02:00