Commit Graph

7830 Commits

Author SHA1 Message Date
46a04773a4 Merge branch '2.1' into develop 2017-06-20 11:01:08 +03:00
d546d77401 Fix debug assert when closing internal DCB
Internal DCBs don't have file descriptors so the debug assertion needs to
be altered.
2017-06-20 10:46:33 +03:00
b29cda10a2 Merge branch '2.0' into 2.1 2017-06-20 10:45:02 +03:00
469ed1de1b MXS-1271: Remove unnecessary encode call
The trailing newline can be removed from the string without encoding it
first.
2017-06-20 10:40:22 +03:00
d68d3072a8 Make atomic_load_-functions const correct 2017-06-19 14:37:20 +03:00
3e39ec906e Change server version from char pointer to char array
With this change, it is no longer possible that the server version
is deallocated at the very moment it is read. There is still a race,
but it's mostly harmless.
2017-06-19 14:05:26 +03:00
32cd28daf2 Rename MAX_SERVER_NAME_LEN to MAX_SERVER_ADDRESS_LEN 2017-06-19 14:05:26 +03:00
b7a6e4b7b0 Fix HintParser line break detection
The HintParser wrongly ignored linebreaks, causing parsing faults
e.g. parsing too far or accepting invalid comments. Now, the parser
detects a line break and terminates comments unless they started with
'/*'. Also, fixed a memory leak when parsing parameter-value-combinations.
2017-06-19 10:49:47 +03:00
2f090a22fe Fix debug assertion on slave recovery
The amount of expected responses wasn't incremented when the session
command history was replayed on the new slave.
2017-06-17 09:38:46 +03:00
9b556ed160 Enable parts of mxs722 for 2.2
A part of the 2.2 test was disabled even though the functionality can be
tested with 2.2.
2017-06-17 09:38:46 +03:00
729d0a51d9 Fix qlafilter module entry linkage
The module declaration needs to have C linkage. Added the missing
cppdefs.hh include as the first header included by the module.
2017-06-17 09:38:46 +03:00
80103c5a40 Fix test configuration object names for 2.2
The 2.2 object names are converted to hyphen separated forms to make them
REST API conforming.
2017-06-17 09:38:46 +03:00
5351c6c4a9 Fix test compile warnings
A const char pointer was passed as a parameter to a function that used
char pointers.
2017-06-17 08:55:09 +03:00
567fbce735 MXS-1287: Assign Slave status for all external slaves
Whenever a server which is a slave of an external master is detected, it
will be assigned the slave status. This will allow the status to be used
the way it was intended to be used.
2017-06-16 22:26:33 +03:00
77a692e0c3 Set minimun VLA size to 1 2017-06-16 10:17:27 +03:00
7e59254454 Change modutil_get_SQL() to modutil_extract_SQL() + length limit
The modutil_get_SQL()-function allocates storage, while
modutil_extract_SQL() does not. The strings given by the latter
are not 0-terminated so require a length limit when matched using
regexec().

This commit changes the used function in those cases where the
sql-string is not modified nor is the pointer saved for later use.
2017-06-16 10:07:27 +03:00
9058b89c28 Update Release Notes and Configuration Guide on MXS_MODULE_PARAM_REGEX
Also added a new Upgrading-To-file with a note on the change.
2017-06-15 15:38:45 +03:00
3260069ed8 Fix compile error on Centos7 2017-06-15 15:17:33 +03:00
81eeed55aa Add generic debug flag to MaxScale
MXS-1282. The flags "-g=arglist" or "--debug=arglist" activate
the debug settings specified in the comma-separated list arglist.
Currently, the setting "disable-module-unloading", which prevents
modules (.so-files) from being unloaded at exit, is supported. This
allows Valgrind to produce line numbers for leak reports when the
memory was allocated in a module. The setting "enable-module-unloading"
is also available, but this is activated by default.

The debug arguments and their actions are defined in a structure
array, so adding more is straightforward.
2017-06-15 11:23:34 +03:00
ce8d712b46 Add version to VERSION.cmake filename
The VERSION.cmake file now includes the major and minor versions in the
filename. This will prevent merge conflicts when merging changes upstream.
2017-06-15 10:13:19 +03:00
49556d07b1 Merge branch '2.0' into 2.1 2017-06-15 10:03:49 +03:00
673eb3d500 Update 2.0.6 version number 2017-06-15 08:48:18 +03:00
a72d73fa3b Always build Jansson
The library is now built even if the system has some version of Jansson.
2017-06-14 14:36:30 +03:00
17c0bf7dec Merge branch '2.1' into develop 2017-06-14 13:59:18 +03:00
4c9fc1a39e Merge branch '2.0' into 2.1 2017-06-14 13:36:40 +03:00
9285283ac5 Update release date of maxscale-2.0.6 2017-06-14 11:05:41 +03:00
9889889221 remove gnutls and gcrypt from install_build_deps.sh 2017-06-13 10:14:43 +03:00
6381dd0703 MXS-1281: Add password to grant example
The CREATE USER statement in the example document now also has a
password. This should make it more obvious that the same credentials must
work from all hosts.
2017-06-12 18:24:05 +03:00
121284df46 Compile QLA-filter as C++ 2017-06-12 17:38:19 +03:00
509c6d25f9 QLA-filter cleanup
Changed some literal strings to constants + other cleanup.
Removed/shortened some unnecessary comments.
2017-06-12 17:29:10 +03:00
4db6712b66 Use MXS_MODULE_PARAM_REGEX in QLA-filter
The QLA filter now uses the automatically compiled regex parameter type.
Regex matching now prints errors. Some minor refactoring.
2017-06-12 15:40:06 +03:00
39c6328e9b Refactor config_get_compiled_regex_capcount()
The function now returns the compiled code or null or error. Also,
instead of capcount, it writes the ovector size. The ovector pointer
can be null. Removed the other config_get_compiled_regex()-function
and replaced it with the refactored function since they are almost
identical.
2017-06-12 10:56:00 +03:00
bff5e96b1a Query hint to influence Consistent Critical Read Filter
MXS-1067. The CCRFilter will now look at the hints in a write-type
query. The parameter-value combinations "ccr=match" and "ccr=ignore"
are recognized and will override any regex match and ignore settings.

For the hints to work, the HintFilter needs to be present in the filter
chain before the CCRFilter.

Also ran astyle and updated documentation.
2017-06-12 10:51:41 +03:00
2778056212 MXS-1220: Enable admin authentication by default
The admin interface now uses HTTP BA authentication by default. This will
prevent unrestricted access to the REST API but the authentication is by
no means secure and the HTTPS mode for the REST API should be enabled for
all production systems.
2017-06-12 10:08:25 +03:00
53d7c57982 MXS-1220: Add error descriptions to REST API module commands
The module command calls that fail can now display additional information
in the form of an error object.
2017-06-12 10:08:25 +03:00
45afbda100 Add descriptions to module commands
Each module command has to describe what it does. This should make module
commands self-documenting to some degree.
2017-06-12 10:08:25 +03:00
06995837cf MXS-1220: Use JSON output in dbfwfilter module commands
Added a new module command to the dbfwfilter to allow printing of rules
via the REST API. The old module command, `rules`, is now deprecated.
2017-06-12 10:08:25 +03:00
b3c1e15f22 MXS-1220: Add output for module commands
The module commands can now produce JSON formatted output which is passed
to the caller. The output should conform to the JSON API as closely as
possible.

Currently, the REST API wraps all JSON produced by module commands inside
a meta-object of the following type:

  {
    "meta": <output of module command>
  }

This allows the output to be JSON API conformant without modifying the
modules and allows incremental updates to code.
2017-06-12 10:08:25 +03:00
66a45fc37e MXS_MODULE_PARAM_REGEX and QUOTED_STRING now accept non-enclosed values
This is for backwards compatibility to allow current modules to use
the automatically compiled regex parameters. The enforcement should
be restored in a later version. A warning is output for every non-
enclosed regex.

Similar changes are also applied for QUOTED_STRING.
2017-06-09 12:59:11 +03:00
2c8b666ac6 Add MaxScale 2.0.6 release notes 2017-06-07 14:22:50 +03:00
9c0bb4ae29 fix avro install script 2017-06-07 11:34:42 +03:00
92fa613f93 Use worker messages for fake events
Fake events now use worker messages to trigger execution of the events.
2017-06-07 10:36:26 +03:00
2ab4a4fd20 Stop timeout before fixing replication
The timeout is hit very often if the cluster fixing takes some time. This
causes false positives so the timeout should be stopped before attempting
to fix the cluster.
2017-06-06 23:40:54 +03:00
943662d2b5 Rewrite temporary table test
Use stack allocated test class and use const char pointers for const
functions. Simplify the test and improve error messages.
2017-06-06 22:45:19 +03:00
fa99b97dbd MXS-1267: Add note about tee filter in release notes
The release notes now mention that the tee filter has been rewritten and
it requires some extra configuration.
2017-06-06 15:49:51 +03:00
dc67f3e4f3 MXS-1273: Use default engine for replication_heartbeat table
The MySQL monitor replication_heartbeat table now uses the default storage
engine of the database when creating the table. Most of the time the
default is InnoDB which makes the table crash-safe.
2017-06-06 15:49:21 +03:00
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
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
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
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