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.
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.
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 MXS_MODULDE object now contains optinal pointers for functions
to be called att process and thread startup and shutdown. Since the
functions were added to the end, strictly speaking, all structures
would not have needed to have been modified, but better to be
explicit. In a subsequent change, these will be called.
C++ does not support flexible arrays, so for the time being C++
modules are restricted to 10 parameters. Better approach is to
factor out the parameters to a separate array and then just store
a pointer to that array in MXS_MODULE.
The MODULE_INFO is now the main object which is used by modules to convey
information to the MaxScale core. The MXS_MODULE name is more apt as it
now contains the actual module definition.
The old MODULES structure was moved into load_utils.c as an internal
implementation and was renamed so that it is not confused with the new
MODULE structure.
The modules are now declared with a common macro. This allows future
additions to the module loading process while also making the loaded
symbol name a constant.
This allows modules to only expose one entry point with a consistent
signature. In the future, this could be used to implement declarations of
module parameters.
- Rename session_getUser to session_get_user
- Change session_get_user and session_get_remote to take a const
SESSION* as argument and to return a const char*.
- Change server_get_persistent, so that user is passed as const.
- Update all users of these functions as appropriate.
The function is not capable of doing the right thing for an entire
account string, but only separately for user and host names, so the
function name should reflect that.
Function for removing MySQL quote characters surrounding a
string moved from Cache's rules.cc to common place and renamed.
The function was now moved to mysql_utils.[h|c], which is in
maxscale-common, and not to the perhaps more appropriate place
protocol/mysql.h, as the latter would have implied that MySQLCommon
would have to be linked to, which actually might be the right thing
to do. However, that has to wait until protocol/mysql.h gets an
overhaul.
The 0x0 detection handle_rows was added for MULTI result detection, now
moved in handle_expecting_response.
Additionally 0x0 conflicts with empty string data.
CLIENT_DEPRECATE_EOF is not supported right now