Some platforms did not have the FindLua.cmake file which caused errors on
configuration. Moved the invocation of find_package to the filter CMakeLists.txt
so that it is only called if the luafilter is built.
Renamed is_mysql_comment_start to is_mysql_statement_end because it checks
whether a statement truly ends instead of just checking comment block starts.
The calculations for buffer length in readwritesplit now use the payload size
instead of the buffer size.
The C style comments were not ignored and the -- style comments
did not check for the trailing whitespace and made return values char*.
The creation of a stored procedure would prevent sessions from using
any of the slave servers because readwritesplit would interpret
the creation statement as a multi-statement query.
Parts of modutil and readwritesplit now compare pointers to pointers instead of
converting pointers to integers.
Added more documentation to functions about how, when and with what parameters
the Lua functions are called with. Also adjusted the module version to experimental.
With the linker flags "-Wl,-z,defs", all symbols used by a library
are resolved at link-time. Otherwise they will be resolved at runtime.
The use of these flags ensures that missing symbols are found as
early as possible.
Case in point, the binlog router test-cases failed, because the loading
of the binlog router failed due to missing symbols my_uuid_init and
my_uuid. The reason was that when maxscale no longer was linked with
the embedded library, those symbols were not available.
Now we know that the loading of the binlog router will not fail due
to missing symbols.
Binlog router uses my_uuid_init and my_uuid, which are non-public
functions available in the embedded library. Consequently, blr
must currently be linked with the embedded library.
A custom implementation of these functions should be provided, in
order to break that dependency.
Due to an include conflict between /usr/include/poll.h and
maxscale/server/include/poll.h the latter was moved to
maxscale/server/include/maxscale/poll.h.
Once 1.4 is out, all maxscale header files will be moved to that
same sub-directory. That will prevent include conflicts and also
make it easy to see which include files belong to maxscale and
which do not.
Whether all queries should be routed to the master after a multistatement
query is executed can now be controlled with the `strict_multi_stmt` option.
When the option is disabled queries executed after a multistatement query will
be routed normally.
This will prevent the routing of queries that modify data to the slaves.
In the future a more intricate solution can done where all the statements
are parsed and the destination is resolved based on the actual contents.
The caller DCB was used instead of the session client DCB. This caused
a crash when a backend DCB was getting the shared data since those DCBs
have a NULL data pointer.
The older versions of Bison use the deprecated versions of various options.
The automatic prefixing of tokens is not present in older versions so to
accommodate for this, all tokens were manually prefixed.
The change fixes a crash when no filebase parameter is given for the filter.
The instance creation functions of these filters had spossible memory leaks in
case errors in the configuration occurred. In addition to these, they would be
successfully created even if unexpected parameters were given.
The tee, qlafilter, namedserverfilter and topfilter now support the same filter
options: case, ignorecase and extended. The extended filter option enables
the Extended Regular Expression syntax for the filters which is used when
matching queries.
The lack of user definition lines in the dbfwfilter rule file was ignored
previously but this change makes the lack of users an error again. Also
added function documentation to some of the functions.
The real username and host is now logged in addition to the user definition
that it matched. The messages also have the service name to distinct
connections to two different services which both use the same filter.