If there are several 'users' lines in a rule file, for a particular
user, the rules each matching line will be checked independently
until a rule match is found.
That is, the rules of each 'users' line are treated in an OR-fashion
with respect to each other.
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.
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 ",".
Make all modules lowercase and make module loading case
insensitive. Further, make command invocation case insensitive,
as far as the module name is conserned.
When the unit tests were run without installing the libraries in their
final locations, the loading of the modules would fail. Using locations
relative to the build directory allows unit testing without having to
install the libraries.
The internal header directory conflicted with in-source builds causing a
build failure. This is fixed by renaming the internal header directory to
something other than maxscale.
The renaming pointed out a few problems in a couple of source files that
appeared to include internal headers when the headers were in fact public
headers.
Fixed maxctrl in-source builds by making the copying of the sources
optional.
The utility and mock classes created for the testing of dbfwfilter
will be used for testing certain aspects of the cache filter.
Consequently better to move them somewhere outside dbfwfilter.
Sofar they will be built separately for each filter.
In 2.2 it is no longer possible to know where a particular column
appears. Hence the result when a column appears amongst the selected
columns and the where-clause must be the same.
This is the first in a series of commits that introduce components
that allow filters to be tested without MaxScale or backends.
Obviously the environment is not suited for all cases, but allow e.g.
the behaviour of the firewall filter to be tested in isolation.
The environment consists of helper classes loading and manipulating
modules and filters and mock-classes that provide the needed
scaffolding around a filter.
Currently all components exist under the test directory of the firewall
filter, but once proven they can be moved to a more general purpose
location.
By using an the value of a global incremented integer as the
initial version number of a Dbfw instance it is ensured that every
such instance does not "inherit" any rules from a previous instance
that happened to exist in the same place as the new instance to be
created.
Adds an option 'reply_time' to log_data. When enabled, query execution time
in milliseconds is logged. Execution time is measured as the time between
routeQuery and the first clientReply.
Only if the filter is in blocking mode, will a match cause an error
to be returned. Thus, no point in creating the error message unless
the filter is in blocking mode.
Whether or not a match causes the query to be blocked or to be allowed
depends on whether the filter is in white-listing or black-listing mode,
so better if the text is neutral.