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.
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.
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.
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.
Moved the qlafilter parameters to module options. This removes the need to
parse the options in the filter.
Split the options into separate parameters. This allows common options to
be combined as enumerations under common parameters.
To test the configuration validation and default value generation, the
functions needed to be refactored to allow parameters to be passed
directly to the function.
Some uses of monitorStart didn't pass the monitor parameters to the
function call. This caused runtime configuration of monitors to not have
any parameters as they never got their parameters.
- All (but the printing/debug functions) are now in snake_case.
- Functions made const correct.
- All function prototypes now have named arguments.
Documentation still to be moved, and file possibly split into
include/mascale/server.h and server/core/maxscale/server.h
Previously, these were discarded. This patch adds a function to
"merge" the mask to the ip so that it's in the form which
normalize_hostname expects (using % as wildcard). Only simple masks
with 255:s and 0:s are accepted. Any other combinations may leave
the hostname in a garbled state which will cause it to be discarded
later.
This change now ties the pieces together and implements tha
functionality required of the masking filter. Note thought that
this is still work in progress and changes will follow.
- LEncInt : Class for dealing with length encoded integers
- LEncString : Class for dealing with length encoded strings
- ComPacket : Base-class for all packet classes.
- ComRequest : Base-class for all requests.
- ComResponse : Base-class for all responses.
- ComQueryResponse
- ComQueryResponse::ColumnDef
- ComQueryResponse::Row
Common to these all is that they are very thin, and basically only
make it easier to what anyway needs to be done, if the equivalent
is used by directly accessing the packet buffer.
Now these are private for the masking filter, but may be moved under
masxcale/include if/when the general usefulness has been established.
The setting up and the initialization of the query classifier has
now been separated. The gateway explicitly sets up the query
classifier (i.e. chooses which one to use and what arguments to
provide), but the actual initialization is performed as part of
the general module initialization.
The cache filter now uses the module parameters. Due to the relative path
support for the `rules` parameter, it is still manually parsed.
The `storage_options` list is also manually parsed. The core could
possible parse simple comma separated lists and return them as a string
array. This should be done in a later commit.
The filters should use the same configuration parameters as other modules
use. This allows them to use the common configuration management functions
to get values from it.
The schemarouter now accepts all router_options values as parameters.
Also fixed a mistake in the documentation where the router options section
was listed twice.
The parameters that readwritesplit uses now use the new system. This
removes the need for the qualified parameter processing found in config.c.
All values for router_options are now also accepted as parameters. The
router_options is deprecated and support for it will be removed in a
future version.