NullFilter is a filter module that does nothing, except reports
capabilities as defined in the configuration file. It's purpose
is only to make it simple to benchmark the performance impact
various routing capabilities have.
Note that since getCapabilities() currently does *not* take an
instance pointer as parameter, all NullFilter instances will
report the same capabilities, the ones specified for the last
filter to have been loaded.
Removed unused spinlocks from DCBs, sessions and the MySQL protocol
structs. They were used in a context where only one thread has access to
the structure.
Removed unused member variables from DCBs.
For instance, if bob is returned an error because he does not have
the required grants, then if the error were cached, alice would
receive bob's error reply even if she has the required grants.
- snake_case
- member variables prefixed with m_
- static member variables prefixed with s_
- where prefixes are used (z,p,s), the following character
is capitalized
The firewall filter should allow COM_PING and other similar commands to
pass through as they are mainly used to check the status of the backend
server or to display statistics. The COM_PROCESS_KILL is the exception as
it affects the state of the backend server. This is better controlled with
permissions in the server than in the firewall filter.
Commands that require special grants aren't allowed to pass as they are
mainly for maintenance purposes and these should not be done through the
firewall.
Moved some typedefs to router.h and server.h, changed a few
constants to these enums. Renamed some types in config.h to
remove "Gateway".
There are still some functions in the public header which are
only used in core, but they seem to fit the theme of public functions
so were not moved.
The filter used the value of `count` for the `time` parameter.
The `options` parameter used the old-style parsing of the options and the
`match` and `exclude` parameters didn't use config_copy_string.
The filter calculated a time difference which was negative if the filter
was not configured to use time intervals.
Added more info level logging to help determine how the filter behaves.
The query operation not being a select is too strict and not very
precise. Only queries that actually modify data should trigger the adding
of routing hints.
It’s possible to add % wildcards in the ‘source’ option of
namedserverfilter.
Allowed values, for an IP address only are:
X.%.%.%
X.Y.%.%
X.Y.Z.%
The match any ‘%’ is not allowed
When processing the response to a COM_QUERY, the rows will be
terminated by an EOF packet. However, as the type byte of an
EOF packet is 0xFE and the identifying byte of an 8 byte length
encoded integer is also 0xFE it is not possible to distinguish
the two except by also looking at packet length.
The masking filter will assume payloads less than 2^24 - 1. The
behaviour if payloads larger than than are encountered can be
configured.
The actual implementation follows in a subsequent change.
Now that the query classifier can be given COM_STMT_PREPARE packets
in addition to COM_QUERY packets, binary prepared statements will
be subject to the same analyses as any other statement.