9472 Commits

Author SHA1 Message Date
Markus Mäkelä
73f1005e7a Fix memory leak in test_users
Users were allocated but not freed. Same with the JSON objects.
2018-01-22 15:29:21 +02:00
Markus Mäkelä
bb1bfcb52b Fix memory leak in service parameter output
When the service parameters were converted into JSON, an array was created
that was not used.
2018-01-22 15:29:21 +02:00
Markus Mäkelä
3ade3f68a7 MXS-1538: Prevent double connecting
Connector::connect now checks whether a connection is already made before
attempting to create another one.
2018-01-22 15:29:21 +02:00
Markus Mäkelä
ef53ded057 Fix test_atomic
As the function documentation states, the expected value must be read
again after a call to atomic_cas_ptr. This is due to the fact that if the
values are not the same, the __atomic builtin version will store the
current value into the expected value.

The new value given to the atomic_cas_ptr function was the address of the
new value, not the new value itself. The behavior of the atomic_cas_ptr is
what caused the test to pass on systeems that implement the __atomic
builtins. On older systems that do not implement it, the expected value
was never modified which caused the test to hang.
2018-01-22 15:29:21 +02:00
Markus Mäkelä
ccebf38bc0 Update test configuration files
Updated the REST API and MaxCtrl configuration files with new object
names. Updated tests with new object names.
2018-01-22 15:29:21 +02:00
Markus Mäkelä
f204650bbb MXS-1538: Remove unnecessary copying of schema information
The schema related information was copied for each row. A shared pointer
to the data can be used to remove the repeated copying of the values.
2018-01-22 15:29:21 +02:00
Markus Mäkelä
070df73d99 MXS-1538: Integrate CDC-Connector into MaxScale
Added the files from the repository to MaxScale. Created a new CMake
function for installing development libraries.
2018-01-22 15:29:21 +02:00
Johan Wikman
b8e72c939d Be specific about the dangers of obfuscation 2018-01-22 13:19:03 +02:00
Markus Mäkelä
05402208a5 Merge branch '2.1' into 2.2 2018-01-19 11:47:13 +02:00
Markus Mäkelä
753b97303a MXS-1606: Create maxscale_schema database if missing
The monitor will now also create the database if it is missing. Since it
already creates the table, also creating the database is not a large
addition.

Cleaned up some of the related checking code and combined them into a
simple utility function.
2018-01-19 11:34:25 +02:00
Markus Mäkelä
bbe99e458d Fix test build failure
MXS-1543 test failed to build in 2.2.
2018-01-19 11:34:25 +02:00
Markus Mäkelä
40dfd1e070 MXS-1620: Fix RPM packaging scripts
Unconditionally replace the `strip` binary with a dummy executable.
2018-01-19 11:23:28 +02:00
Johan Wikman
7c7190e0c4 Fix index overflow in masking filter 2018-01-19 09:55:20 +02:00
Markus Mäkelä
d928f69cc7 Update and extend luafilter documentation
Fixed the exposed function name and added minimal configuration and script
examples.
2018-01-18 12:22:04 +02:00
Markus Mäkelä
8c0d519caa Update Connector-C to 3.0.3
Updated connector from 3.0.2 to 3.0.3.
2018-01-18 12:22:04 +02:00
Johan Wikman
beac04b8e7 MXS-1616 Also use 'value' in partial matching
As you can create regular expressions that have a fixed length,
e.g. "....$", it makes perfect sense to replace using 'value' if
the length of the string matches exactly.
2018-01-18 09:48:38 +02:00
Markus Mäkelä
47184ea46d Fix build failure on Ubuntu 17.10
The sprintf calls failed due to a warning about possible buffer
overflow. Curiously enough, the same warnings do appear on Fedora 26 but
only when the calls are changed to snprintf.
2018-01-17 14:06:19 +02:00
Johan Wikman
c02da103d7 MXS-1615 Fix access of wrong argument
- Wrong argument accessed at command invocation. In debug mode
  leads to crash, in release mode probably leads to crash.
- Log result of reload.
2018-01-17 13:59:00 +02:00
Esa Korhonen
a4f6176ced Fix bug in printing switchover/failover module command info
The string constant passed to the register-function went invalid
once CREATE_MODULE() completed, causing random characters to be
printed.
2018-01-17 12:01:00 +02:00
Esa Korhonen
ae949881a9 MXS-1511: Add documentation about new parameters 2018-01-17 10:21:50 +02:00
Esa Korhonen
b8e15d2bea Reformat and tune QLA filter documentation
No additions, just tidying up.
2018-01-17 10:21:50 +02:00
Markus Mäkelä
c4df28f64a MXS-1416: Skip directory creation with --config-check
The log and data directories aren't created or checked when the
--config-check option is given.
2018-01-17 09:56:50 +02:00
Esa Korhonen
23f2c3b980 Better failover timing and redirection success is tested
Works similar to switchover.
2018-01-16 18:05:12 +02:00
Johan Wikman
dbbeeac145 MXS-1596 Use non-privileged user for client
The pre-existing users in the MaxScale test environment have
the super privilege so they are not affected by the database
being set in read-only mode.

Consequently, a custom user without the super privilege must
be used by the client threads.
2018-01-16 16:08:13 +02:00
Esa Korhonen
71f74ea0d2 Add warning about SUPER-users to Switchover Limitations documentation 2018-01-16 15:59:39 +02:00
Esa Korhonen
1d211ecee2 MXS-1511: QLA-Filter replace newlines in SQL-queries with custom strings
The config parameter 'newline_replacement' (defaults to 1 space " ") now defines
what to write to the log file when the sql-query has a newline sequence (\n, \r or
\r\n). If 'newline_replacement' is the empty string "", no replacing is done and
newlines are printed to file.

Also, adds the config parameter 'separator', which defines the string
printed between elements. Default value is ",".
2018-01-16 14:25:19 +02:00
Markus Mäkelä
5273cbada6 MXS-1600: Add case-insensitive matching to MySQLAuth
The authenticator now supports similar identifier matching as the MariaDB
server. The lower_case_table_names parameter explains its intended use
(case-insensitive identifier matching):
https://mariadb.com/kb/en/library/server-system-variables/#lower_case_table_names
2018-01-16 13:51:22 +02:00
Esa Korhonen
c2c898ee93 Fix formatting in MariaDB Monitor 2018-01-16 13:27:20 +02:00
Esa Korhonen
ff2ad05d0a Add manual rejoin command to MariaDB Monitor
The rejoin command takes as parameters the monitor name and
name of server to rejoin.

This change required refactoring the rejoin code.
2018-01-16 13:20:35 +02:00
Johan Wikman
bf02571f45 MXS-1596 Test switchover under stress
- Start 4 threads where each thread sits in a loop and performs
  20% updates and 80% selects. Each thread has a table of its own.
- The main thread executes the following in a loop.
- Perform a switchover from the current master to the next (which is
  simply the next node % all nodes).
- Keep on doing that for 1.5 minutes.

The expectation is that the switchover will succeed, that is, after the
operation there will be a new master.
2018-01-16 10:31:27 +02:00
Markus Mäkelä
0afe10ffb9 Merge branch '2.1' into 2.2 2018-01-16 09:47:49 +02:00
Markus Mäkelä
76e53f2081 Make contribution instructions more concise
The instructions now separate the two parts more clearly so that bug fixes
are always done to the oldest possible version.
2018-01-16 09:37:20 +02:00
Dapeng Huang
454f195cb0 fix:cannot connect to maxinfo with python client 2018-01-16 09:02:03 +02:00
Dapeng Huang
2b653887a3 fix crash at execute empty flush command 2018-01-16 08:40:22 +02:00
Timofey Turenko
8dfc1a141d fix typo in read_env() and set_env.sh 2018-01-15 17:17:44 +02:00
Timofey Turenko
847dd2c120 fix typo in read_env() and set_env.sh 2018-01-15 16:47:15 +02:00
Markus Mäkelä
ab44a941ab MXS-1575: Fix large DECIMAL value handling
DECIMAL types that were larger than 8 bytes were not handled
correctly. The current implementation only prints the lowest 8 bytes of
the integer part of the decimal.
2018-01-15 16:15:20 +02:00
Markus Mäkelä
9ca6d586d1 MXS-1575: Fix Avro schema versioning
The versions were not updated if the table was dropped and created again.
2018-01-15 16:15:20 +02:00
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
Markus Mäkelä
a44e352f4f Fix default protocol module names for objects
If either a server or a listener was created at runtime, it would use the
old protocol module name and log a warning.
2018-01-15 16:14:50 +02:00
Markus Mäkelä
f167bc5f02 Update example configuration
Updated links and module names in the configuration. Also changed object
names so that they don't produce warnings. Removed redundant parameters
and tuned default monitor_interval to a slightly more reasonable 2000
milliseconds. Enabled automatic thread number configuration.
2018-01-15 16:14:50 +02:00
Markus Mäkelä
f6f34ad7e5 Fix debug build failure on CentOS 6
The build failed due to a comparison between signed and unsigned integers.
2018-01-15 16:14:50 +02:00
Esa Korhonen
14f1bbed51 NamedServerFilter: Deprecate message for legacy parameter use 2018-01-15 15:30:38 +02:00
Johan Wikman
ad634fe31e MXS-1596 Stress test for failover
- Start 4 threads where each thread sits in a loop and performs
  20% updates and 80% selects. Each thread has a table of its own.
- The main thread executes the following in a loop.
  - Take down the current master and wait a while (failover assumed
    to happen).
  - Put up the old master node and wait a while.

Keep on doing that for 1.5 minutes.

At the end check that:
- There is one 'Master'.
- The other nodes are either
  - 'Slave' or
  - 'Running' in which case it is checked it is because the node could
    not be rejoined.
2018-01-12 15:56:52 +02:00
Johan Wikman
1e5125015e Add convenience functions to TestConnections 2018-01-11 10:33:57 +02:00
Johan Wikman
da428f325c Update release date of 2.2.1 2018-01-11 10:30:57 +02:00
Esa Korhonen
eda8288161 Rename and fix test
Test now tries to reset the servers when successful.
Still seems to rarely fail.
2018-01-10 15:25:58 +02:00
Markus Mäkelä
96a8d20439 Reduce binlog_change_master output
The output was very verbose and did not provide a lot of information. This
made it hard to see what is going on in the test.
2018-01-10 15:08:06 +02:00