Commit Graph

8043 Commits

Author SHA1 Message Date
33fe89772a MXS-1249: Return service version
Since it is now a single value, the service version can be returned
as a return value instead of via an out-argument. More convenient to
use that way.
2017-06-21 13:28:59 +03:00
dcfe118457 MXS-1249: Qc, the server version is passed as a single integer
To be compatible with how the version is managed elsewhere.
2017-06-21 13:28:59 +03:00
997416ab82 MXS-1249: Server version stored as uint64_t value
That allows the version to be updated and read atomically. If
major/minor/patch are stored as separate variables, you can get an
inconsistent set. Now it may be out of date by the time it is used,
but it will never be internally inconsistent.
2017-06-21 13:28:59 +03:00
4e73aecdef MXS-1249: Modifications after rebase on develop 2017-06-21 13:28:59 +03:00
1034cc51be MXS-1249: Qc, allow setting the server version
In the case of qc_sqlite, the server version may affect how statements
are parsed.
2017-06-21 13:28:59 +03:00
3ef142bfe3 MXS-1249: Remove qc_dummy
Not used for anything and takes time and effort to keep up to date
with the query classifier API.
2017-06-21 13:28:59 +03:00
2a848a63c8 MXS-1249: Also use mxs_mysql_set_version in mmon.c 2017-06-21 13:28:59 +03:00
b8702b8d95 MXS-1249: Add function for getting the "version" of a service
The behaviour of the query classifier needs to change depending
on the version of the servers of a service. With this function
"some" version of the service can be obtained.
2017-06-21 13:28:59 +03:00
c94d9c76fb MXS-1249: Take mxs_mysql_set_server_version into use
The function should actually be in include/maxscale/protocol/mysql.h
and the implementation in MySQLCommon, but the monitors do not link
to that yet.

All MySQL related should be moved to MySQLCommon and the core
refactored so that no MySQL knowledge is needed there.
2017-06-21 13:28:59 +03:00
d927f1d3c6 MXS-1249: Add utility function for setting the server version
Add utility function for setting the server version from a
MySQL handle.
2017-06-21 13:28:59 +03:00
0d784da0ee MXS-1249: Prepare for storing version in server structure
The behaviour of the query classifier needs to be different
depending on the actual version of the server. There is already
a human readable string, but for programmatic use it needs to
be in a format that can easily be parsed.
2017-06-21 13:28:59 +03:00
4a298b4024 Return NULL if no regex parameter is defined
If no regex type parameters are defined and a compiled pattern is
requested, the function will return a NULL value. This allows code that
directly calls the config_get_compiled_regex function to work without
doing additional checks for the presence of optional parameters.
2017-06-21 10:13:47 +03:00
e7161d64b7 Update 2.2 version number 2017-06-20 11:11:18 +03:00
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