5865 Commits

Author SHA1 Message Date
Markus Mäkelä
de23297944 Speed up session_limits test
The test now waits for a shorter time. Also refactored the test to use
stack allocated objects.
2017-06-06 12:45:20 +03:00
Markus Mäkelä
8d5c6ca00f Disallow all prepared statement commands with dbfwfilter
All binary protocol prepared statements should be rejected by the
dbfwfilter in 2.0 as they aren't supported.
2017-06-06 12:34:46 +03:00
Markus Mäkelä
c3ffc0ba9c Improve cdc.py error handling
When the CDC service reponds with an error, the program prints the error
and exits.
2017-06-05 20:40:29 +03:00
Markus Mäkelä
d93edf02e2 Fix SQL tokenization in avrorouter
There were minor bugs in the token processing which caused ALTER TABLE
statements to be skipped.
2017-06-05 19:59:25 +03:00
Markus Mäkelä
e21bec2e14 Add test for ALTER TABLE with avrorouter
The test does a set of ALTER TABLE operations and checks that MaxScale
outputs the correct data.
2017-06-05 15:33:14 +03:00
Markus Mäkelä
808f1b34e1 Fix use of pcre2_substitute
The length parameter is not set to the required string length unless a
parameter is set. The previous length should be stored before calling
pcre2_substitute.
2017-06-05 14:43:08 +03:00
Markus Mäkelä
5964622839 Fix ALTER TABLE handling in avrorouter
The addition of field types and lengths wasn't added to the avrorouter
ALTER TABLE handler. This caused crashes when an alter table was done and
new rows were inserted afterwards.
2017-06-05 14:42:05 +03:00
Markus Mäkelä
d82890225d Disable Galera SSL load balancing test
The test is not stable as the amount of requests done varies greatly due
to some change in the connector.
2017-06-05 09:34:34 +03:00
Markus Mäkelä
d9a6b6f324 Fix avrorouter memory leaks
The loading of the JSON schemas leaked memory as functions that increment
the reference count were used.
2017-06-02 13:36:56 +03:00
Markus Mäkelä
4b6c5caa47 Fix avrorouter client counts
The avro client numbers were decremented twice for each client.
2017-06-02 10:55:33 +03:00
Markus Mäkelä
919d08af1e Fix avrorouter type and name handling
The type and name parsing functions could move outside of allocated memory
as they didn't check for the terminating null character. Also fixed the
printf format string used when the list of used tables is being created.

Fixed CDC testing connector to abort on error and added some extra output
to the cdc_datatypes test.
2017-06-02 10:26:12 +03:00
Markus Mäkelä
b504587870 Make avrorouter testing faster
The slave part of the binlogrouter replication can be ignored for
avrorouter tests. This will speed up the testing by skipping the
unnecessary restarting and configuration of slave servers.
2017-06-01 23:28:19 +03:00
Markus Mäkelä
f2ba9dbed8 Fix and disable 2.0 related tests
Fixed the expected script output for the script test.

The SSL load balancing test would fail due to a problem introduced in
connector-c 3.0 which is yet to be resolved. Due to this, the test is
disabled until an alternative way to test it is conceived.

The dbfwfilter duplicate rule detection is fixed in 2.1.
2017-05-31 09:25:24 +03:00
Markus Mäkelä
6bd19e5c64 Remove post-2.0 functionality testing
Removed more parts of tests that tested or expected post-2.0
functionality.
2017-05-30 16:03:39 +03:00
Markus Mäkelä
9d4e06c132 Wait for all connections to close
Added a small delay to tests that flood MaxScale with large amounts of
connections which then proceed to check whether MaxScale accepts
connections.
2017-05-30 15:48:23 +03:00
Markus Mäkelä
b0b8d000f8 Pass filename as maxpasswd argument
The 2.0 version of maxpasswd requires that the filename is given as the
first argument. Only 2.1 and newer versions check for the default key
file.
2017-05-30 15:42:09 +03:00
Markus Mäkelä
f4d97c3fbf MXS-1277: Improve maxadmin error messages
Maxadmin now reports if the default socket was found and suggests actions
to take.
2017-05-30 15:42:09 +03:00
Markus Mäkelä
d516fa21fa Bring galera template to the replication template
The only difference in the galera template is now in the monitor
definition and in the server address values. This fixes the unexpected
responses that some of the galera mysqltest cases suffer from.
2017-05-30 15:42:09 +03:00
Markus Mäkelä
313be69281 Disable MXS-781 test for 2.0
The bug is fixed in 2.1.
2017-05-30 15:42:09 +03:00
Markus Mäkelä
a3cfabf37b MXS-1271: Remove redundant JSON parsing
As the cdc.py script outputs newline delimited JSON, there's no need to
parse the JSON in the cdc_kafka_producer.py script.
2017-05-30 15:42:09 +03:00
Markus Mäkelä
ddc7b0fb09 Fix more galera test configurations
Some tests used galera options that aren't in 2.0 which caused the tests
to fail.

Also added an upper limit to some tests to reduce excessive execution
times.
2017-05-30 15:42:09 +03:00
Markus Mäkelä
20f31428ac Add missing CLI interface to configs
The regexfilter test was missing the CLI definition which slows down the
test.
2017-05-30 15:42:09 +03:00
Markus Mäkelä
a4802cdbd1 Disable parts of tests that don't work in 2.0
The configuration checking functionality doesn't detect bad router options
in 2.0.
2017-05-30 15:42:08 +03:00
Markus Mäkelä
ae444c214b Fix fwf_prepared_stmt expectations
The test should expect all prepared statements to fail. This needs to be
changed for 2.1 and newer versions.
2017-05-30 15:42:08 +03:00
Markus Mäkelä
45aa82b4eb Disable testing of features found in 2.1 and up
The tests can't pass as the functionality hasn't been implemented.
2017-05-30 15:42:07 +03:00
Markus Mäkelä
a57b9cf0b0 Disable tee tests for 2.0
The tee filter does not work correctly in 2.0.
2017-05-30 15:42:07 +03:00
Markus Mäkelä
819a0296ab Fix 2.0 tests
Altered some of the tests to look for less specific log entries. Removed
new options from galera configurations. Reduced log output of some tests.
2017-05-30 15:42:06 +03:00
Markus Mäkelä
42c85eb110 Download MariaDB Connector-J for testing
Instead of bundling the connector with the tests, it should be downloaded
at configuration time.
2017-05-30 15:42:05 +03:00
Timofey Turenko
3faad022ba working version of build scripts 2017-05-30 00:08:14 +03:00
Markus Mäkelä
d7d4ec29bb Add tests from develop
Added tests from develop. The test results need to be modified for 2.0.
2017-05-26 15:40:40 +03:00
Markus Mäkelä
ad109408b5 MXS-1216: Add real_type and length to cdc_schema.py
The schema generator program needs to add the real_type and length fields
if the data types define them.

Also fixed a bug where the real_type and length fields were checked for
generated fields.
2017-05-16 13:27:46 +03:00
Markus Mäkelä
5a0d2c54bd MXS-1216: Fix DATETIME(n) value interpretation
The DATETIME(n) values generated by a MariaDB 10.0 server were not
interpreted correctly as the wrong algorithm was used to extract the
values.

DATETIME(0) values still do not work properly and they require further
debugging and changes to the code.
2017-05-15 10:25:12 +03:00
Markus Mäkelä
a12d19591e MXS-1216: Store field real type and length in Avro schema
The avro schema allows custom properties to be defined for the schema
fields. The avrorouter stored extra information about the table into the
schema for later use.

Currently, this information is only generated by the avrorouter
itself. Further improvements to the schema generator scripts need to be
done.
2017-05-15 10:25:12 +03:00
Markus Mäkelä
6b6a7fa4a1 Do checkpoint processing at end of binlog
When the binlog has been read, it needs to be treated as if the
transaction or row limit has been hit. This will cause all tables to be
flushed to disk before the files are indexed.
2017-05-15 10:25:11 +03:00
Markus Mäkelä
8a288110a9 Rename conflicting Avro fields
When a user defined field conflicts with an internal MaxScale field, the
field is suffixed with an underscore.
2017-05-15 10:25:11 +03:00
Markus Mäkelä
926930e241 MXS-1216: Correct CHAR(n) handling
The field length was wrongly compared to less than 255 for two byte field
lengths. In addition to that, the metadata was interpreted in the wrong
way.
2017-05-15 10:25:09 +03:00
Markus Mäkelä
c988735a03 MXS-1216: Fix crash on MariaDB 10.0 DATETIME(n)
When a MariaDB 10.0 DATETIME field with a custom length was defined, the
field offsets weren't calculated properly.

As there is no metadata for pre-10.1 DATETIME types with decimal
precision, the metadata (i.e. decimal count) needs to be gathered from the
CREATE TABLE statement. This information is then used to calculate the
correct field length when the value is decoded.

This change does not fix the incorrect interpretation of the old DATETIME
value. The converted values are still garbled due to the fact that the
value needs to be shifted out of the decimal format before it can be
properly converted.
2017-05-15 10:25:06 +03:00
Markus Mäkelä
898bc3444e MXS-1216: Fix processing of long fixed strings
The fixed length string processing assumed that the string lengths were
contained in the first byte. This is not true for large fixed length
strings that take more than 255 bytes to store. This consists of
multi-byte character strings that can take up to 1024 bytes to store.
2017-05-09 14:46:39 +03:00
MassimilianoPinto
ade2cef852 MXS-1244: added 'detect_stale_slave' in monitor params
'detect_stale_slave' added to monitor params
2017-04-24 10:34:13 +02:00
MassimilianoPinto
e6b34ea85c Added depth and SERVER_SLAVE_OF_EXTERNAL_MASTER for build_mysql51_replication_tree
Now build_mysql51_replication_tree assigns depth and handles
SERVER_SLAVE_OF_EXTERNAL_MASTER status
2017-04-21 17:09:28 +02:00
MassimilianoPinto
6b9a2cd0b5 MXS-1244: MySQL monitor "detect_replication_lag=true" doesn't work with "mysql51_replication=true"
Added the missing handle->master assignment
2017-04-21 16:11:30 +02:00
Esa Korhonen
a418387d0a MXS-1218 Poll statistics changed to 64bit to avoid looparound
Statistics calculation, printing and MaxInfo are modified.
n_fds remains 32bit.
2017-04-18 13:14:47 +03:00
MassimilianoPinto
496189dd59 MXS-1221: Nagios plugin scripts does not process -S option properly
Nagios plugin scripts does not process -S option properly
2017-04-18 10:18:15 +02:00
Markus Mäkelä
41a9663611 MXS-1191: Fix crash on column drop
When a column is dropped from a table with a schema that has more columns
than the row event has, avrorouter will crash.
2017-04-04 17:08:07 +03:00
Markus Mäkelä
c67894b011 Add Avro schema generator Python script
The script is the Python version of the cdc_schema.go application.
2017-04-04 16:42:39 +03:00
Johan Wikman
cda5bb7935 Merge branch '2.0.5' into 2.0 2017-04-04 14:32:57 +03:00
Johan Wikman
e1e7137a68 Remove references to old release notes 2017-03-22 12:58:44 +02:00
Markus Mäkelä
7d7d8a0560 Print all output as raw bytes
Printing all output as raw bytes allows MaxScale to control the formatting
process. This also removes the need to convert the bytes to Python strings
and the need to parse the JSON.
2017-03-20 11:10:28 +02:00
Johan Wikman
7c2070171f Merge branch '2.0.5' into 2.0 2017-03-20 09:40:10 +02:00
Johan Wikman
5ea4f44aa2 Remove all but 2.0 release notes from 2.0 branch 2017-03-20 09:29:16 +02:00