6627 Commits

Author SHA1 Message Date
Esa Korhonen
c2e14161bd Documentation update regarding support for wildcard hostnames
Added short descriptions and some warnings to Release-Notes and
Limitations.
2017-01-16 16:28:04 +02:00
Esa Korhonen
936f8c438f Add support for wildcards in hostnames
MXS-391. The user hosts in the SQL backends can now contain wildcard
addresses (e.g.basicuser@%.com or someuser@myhost_.org). Authenticating
these types of users is rather heavy since it requires looking
up the client host name.
2017-01-16 16:10:44 +02:00
Johan Wikman
0ce7632f57 QC: Remove qc_is_real_query
Not used.
2017-01-16 14:17:56 +02:00
Esa Korhonen
cd147add5f Move note about MaxAdmin from Changelog to Release notes. 2017-01-16 13:48:27 +02:00
Markus Mäkelä
2cabcea211 Add definitions of MXS_MODULE_NAME to all modules
All modules now declare a name for the module. This is name is added as a
prefix to all messages logged by a module. The prefix should help
determine which part of the system logs a message.
2017-01-16 11:28:34 +02:00
Markus Mäkelä
d054bc9b04 Split config.h into external and internal parts
The external config.h header defined functions and structures that are
intended to be used by modules. The internal header contains functions
that are used only by the MaxScale core.
2017-01-16 11:02:34 +02:00
Markus Mäkelä
74c55e5c82 Remove qc_is_real_query use from mqfilter
The use of this function is not necessary as it is only done as an
optimization.
2017-01-16 10:56:33 +02:00
Markus Mäkelä
666d12f5fb Fix devel package
The moving of the header files to include/maxscale/ broke the devel
package.
2017-01-16 10:56:33 +02:00
Markus Mäkelä
cbdab48237 Remove unused functions from config.h
The header is divided into two parts, an external and an internal one. The
actual splitting is done in a later commit and this commit only prepares
the header for the split.
2017-01-16 10:56:33 +02:00
Markus Mäkelä
08b5d5c957 Detect redefined rules
If a rule is defined more than once, an error is logged and the parsing
fails.
2017-01-16 10:56:33 +02:00
Johan Wikman
c13a2eeb33 Hide definition of MXS_FILTER_DEF
MXS_FILTER_DEF is now private the MaxScale core.
2017-01-16 10:47:00 +02:00
Markus Mäkelä
41d2d65e71 Use new type names in insertstream
Use the renamed types and change numeric constants to defines.
2017-01-13 18:28:37 +02:00
Markus Mäkelä
a3a9edd3b6 Add insertstream documentation
The documentation explains how the filter works.
2017-01-13 17:39:27 +02:00
Markus Mäkelä
1911430e96 Clean up insertstream source documentation
Cleaned up code and source documentation.
2017-01-13 17:39:27 +02:00
Markus Mäkelä
4869eccdc4 Improve insert value checks in insertstream
The filter now checks that the fields are implicitly listed instead of
explicitly defined.
2017-01-13 17:39:27 +02:00
Markus Makela
95ffa1c689 Add insert streaming filter
The filter converts bulk inserts inside transactions into LOAD DATA LOCAL
INFILE statements. This allows multiple INSERT statements to be streamed
in a more efficient manner.

The module should be in the experimental package as it is still at an
experimental stage.
2017-01-13 17:39:27 +02:00
Markus Mäkelä
1f1abbb37b Make rule matching stricter
The rules are now matched even for trivial queries which don't target
actual tables.
2017-01-13 17:37:28 +02:00
Markus Mäkelä
de07f1d69d Fix luafilter build failure
The luafilter used old names.
2017-01-13 15:28:36 +02:00
Markus Mäkelä
7d91872924 Fix typo in qlafilter documentation
The parameter name was wrong.
2017-01-13 15:28:36 +02:00
Markus Mäkelä
60d4e17996 Allow restriction of module command arguments
The module commands now support an optional flag for arguments that when
enabled checks that the argument module name matches the registered domain
name. This can be used to enforce argument type validity for arguments
that are given to modules that expect objects of a certain type.

For example, this is used by the cache and dbfwfilter to prevent valid
filters but of the wrong type being given as arguments.
2017-01-13 15:28:36 +02:00
Johan Wikman
265e5c0593 Rename FILTER_DEF to MXS_FILTER_DEF
Provide functions that allows the actual definition of MXS_FILTER_DEF
to be made private.
2017-01-13 14:30:11 +02:00
Johan Wikman
affec5e388 Rename FILTER_VERSION to MXS_FILTER_VERSION 2017-01-13 14:28:20 +02:00
Johan Wikman
a41188bd5e Rename FILTER_VERSION to MXS_FILTER_VERSION 2017-01-13 14:26:45 +02:00
Johan Wikman
424849a9a2 Rename UPSTREAM to MXS_UPSTREAM
And DOWNSTREAM to MXS_DOWNSTREAM
2017-01-13 13:40:03 +02:00
Johan Wikman
356690c0e5 Filter.h split into public and private parts
- include/maxscale/filter.h
- server/core/maxscale/filter.h
2017-01-13 12:57:40 +02:00
Johan Wikman
3e5e1bda6a Tee: Remove obsolete struct member
Tee no longer uses the dummy_filterdef FILTER_DEF member, so
it can be removed. That means that filter_free() can be removed
from the public filter.h include.
2017-01-13 12:40:17 +02:00
Johan Wikman
ce182e3788 Introduce opaque type for filter session data 2017-01-13 11:03:43 +02:00
Johan Wikman
d0cc246b79 Rename FILTER to MXS_FILTER 2017-01-13 10:21:51 +02:00
Johan Wikman
e7b951c434 Rename FILTER_OBJECT to MXS_FILTER_OBJECT
Other clarifications to follow.
2017-01-13 10:03:23 +02:00
Johan Wikman
6248d2bb9f Change int to int32_t in plugin interfaces
Better to use types whose size is unquestionably unambiguous
in plugin interfaces.

As on current platforms sizeof(int32_t) == sizeof(int) plugins
need not immediately be changed to return int32_t:s instead of
int:s.
2017-01-13 09:55:40 +02:00
Markus Mäkelä
196d4ad840 Document module configuration directory
Added documentation for dbfwfilter and mentioned the new directory in the
release notes. The configuration guide also gives an example of how the
path parameters are resolved.
2017-01-12 18:24:14 +02:00
Markus Mäkelä
463b2fb468 Remove relative path processing from filters
The filters don't need to process relative paths as the core handles
that. All path parameters are interpreted as relative to the module
configuration directory, /etc/maxscale.modules.d/.
2017-01-12 15:33:48 +02:00
Markus Mäkelä
813704440a Add relative path parameters
The path parameters now support relative paths.
2017-01-12 15:33:48 +02:00
Markus Mäkelä
9168974882 Remove extra space after enum names
The monitor event enum values had an extra space which caused them to be
falsely classified as invalid parameters.
2017-01-12 15:33:48 +02:00
Markus Mäkelä
9e9582e71f Fix and install module configuration directory
The module configuration directory didn't have a value in the CMake
files. The directory is now also installed by both packages and local
installations.
2017-01-12 15:33:48 +02:00
Johan Wikman
e1a43c15c5 Masking: Add error handling
When receiving an error packet, we just abort whatever we were doing.
2017-01-12 14:44:04 +02:00
Johan Wikman
9a85b8eb06 Masking: Handle multi results 2017-01-12 14:44:04 +02:00
Johan Wikman
9a95e79dd6 Masking: Add parameter for warnings
The masking filter can now be instructed to warn in case a masking
rule matches a column of a type that is not masked.
2017-01-12 14:41:55 +02:00
Johan Wikman
e79e82b0a9 Update masking documentation 2017-01-12 14:41:55 +02:00
Johan Wikman
3acb43e2ed Address only specific type of columns when masking
Only columns that are of string kind are now subject to masking.
With a textual resultset it would be possible to mask anything the
same way, but with a binary resultset it is not. Thus, so that the
result is not dependent upon whether the resultset happens to be
textual or not, only string fields are accessed. Documentation to be
updated in a separate change.

The utility classes have now also been rearranged somewhat.
2017-01-12 14:41:55 +02:00
Johan Wikman
10ba67be3c Handle binary resultsets in maskingfilter 2017-01-12 14:40:16 +02:00
Johan Wikman
43c81baf70 Add utility classes for dealing with binary resultsets 2017-01-12 14:40:16 +02:00
Johan Wikman
2fa12f796b Rename MYSQL_GET_PACKET_LEN to MYSQL_GET_PAYLOAD_LEN
The function returns the length of the payload, not the length of
the entire packet.
2017-01-12 14:24:14 +02:00
MassimilianoPinto
77aff88ed7 Maxbinlogcheck gets stuck when binlog file is not existant/readable
Missing exit() caused maxbinlogcheck being stuck on log_manager call
when specified binlog file is not existed/redable
2017-01-11 15:30:57 +01:00
Markus Mäkelä
0865eada03 Add module configuration directory
This directory is intended to be the default working directory for
relative pathname resolution. The actual implementation for
MXS_MODULE_PARAM_PATH is done at a later step.
2017-01-11 14:24:26 +02:00
Markus Mäkelä
a196420c2d Move monitor script processing and launching into the core
This removes parts of the nearly identical code from all monitors.

The removal of monitor type specific event checking is done based on the
assumption that only the monitor that is monitoring the server can be the
cause for a state change. This removes the need to actually check that the
state change is relevant for each monitor and allows the event handling to
be moved into the core.
2017-01-11 14:21:57 +02:00
Markus Mäkelä
7ef5e4bfd9 Use module parameters in maskingfilter
The maskingfilter still does some processing due to the fact that it
accepts relative pathnames. This should ideally done by the core in a
controlled manner and for all path parameters.
2017-01-11 13:06:40 +02:00
Johan Wikman
8612561bbd Fix placement of default 2017-01-11 13:02:19 +02:00
Markus Mäkelä
0c6739ebd3 Use config_copy_string in luafilter
The function is intended to be used with string parameters that are
optional and are copied when defined. This removes the need to copy the
string to a local variable to perform checks on the value.
2017-01-10 20:50:12 +02:00
Markus Mäkelä
b39c47e4df Only try to install /var/lib/maxscale for core package
The only package that should even attempt to install the lib folder is the
main package.
2017-01-10 16:52:29 +02:00