Not finished yet. There are e.g. a number of functions that are only used
by the log manager. They could just as well be moved as private functions
to log_manager.cc.
Slist removed from skygw_utils and added as a separate component.
Nobody seems to be using it, so it could also simply be removed.
Left in place for the time being.
The comments which do not alter the functionality of a query are now removed
from canonicalized queries.
Also fixed missing semicolon in the comment removal regex and added tests
for comment removal.
Fixed mistakes in the canonicalization regular expressions and altered the
functions to use a source and destination buffers. This reduces the amount
of memory allocations that take place.
Added more canonical query tests to the internal test suite.
The query does not need to be parsed for it to be canonicalized and the parsing
uses the PCRE2 library. The regular expressions were changed so that only one
call to the function which replaces literal unquoted values is made.
Currently the initialization function only prepares PCRE2 patterns for use.
Added the call to the new utils_init() function to MaxScale and all relevant
tests.
The replace_quoted now uses a shared PCRE2 pattern which should remove some
of the overhead of the function.
Since localtime is not thread-safe it should not be used in multithreaded
contexts. For this reason all calls to localtime were changed to localtime_r
in code where concurrency issues were possible.
Internal tests were left unchanged because they aren't multithreaded.
mysql_mon.c: Added back server state logging to Debug build.
query_classifier.cc: removed some extra debug code, cleaned up a bit function documentation.
mysql_client_server_protocol.h, mysql_backend.c, mysql_common.c: changed some variables to signed ones to enable checking of calculations in the code.
skygw_utils.cc: removed erroneous debug assertion.
When MaxScale starts it opens log file of each type and if there exist log files of same types in the same directory, it will try to reuse the file with largest sequence number in it. If there are no existing files, a file name with sequence number 1 will be created. If the file with largest sequence number is not writable, a new log file with larger sequence number will be created.