a983df5a7e
Fix testlogthrottling compilation failure
...
The ifstream constructor for some reason doesn't understand strings.
2018-06-15 11:45:40 +03:00
4cc4deeaf1
MXS-1843: Test log throtting in a unique directory
...
This rules out external influence as a reason for the test failure.
2018-06-15 10:07:49 +03:00
c5345d34ca
MXS-1714 Use local_address also with MaxScale connections
...
If local address has been specified, then all connections created
using mxs_mysql_real_connect() will use that same local address as
well.
A system test has not been created as our VMs do not have more than
one usable IP-address. Locally it has been verified to work as
expected.
2018-03-12 11:35:46 +02:00
0416d66bcb
Set query classifier with an absolute path in tests
...
Setting the query classifier with an absolute path makes it easier to
manage test setup without having to manually resolve the relative path to
the query classifier from the test source directory.
2018-01-08 09:41:24 +02:00
579dca0750
Log to stdout in unit tests
...
The log manager will log to stdout to work around directory and file
permissions.
2018-01-05 16:12:54 +02:00
e5b5303137
Initialize the query classifier in tests
...
The test initialization function now loads the query classifier.
2018-01-05 12:57:09 +02:00
e9fceff8ce
Fix log manager race condition
...
The log manager could send two messages if a log message was posted soon
before the log manager was stopped. This caused a debug assertion which
then manifested as a deadlock inside the log manager.
2018-01-04 10:27:56 +02:00
33b1c552e0
Load qc from build directory
...
The query classifier library will now be loaded from the build
directory and not from the installation directory.
2017-12-27 16:09:54 +02:00
4220e3ca6a
MXS-1450 Add more string trimming functions
...
- trim_leading
- trim_trailing
Implemented trim in terms of trim_leading and trim_trailing
2017-09-26 13:36:10 +03:00
bb95074e88
MXS-1450 Add test case for trim
2017-09-26 13:19:09 +03:00
500f79a150
MXS-1296: Test that lc statements are parsed correctly
...
The transaction boundary parser - TrxBoundaryParser - must handle
upper and lowercase statements correctly.
2017-06-26 10:57:27 +03:00
8e2c7fd952
Merge branch '2.0' into 2.1
2017-05-10 09:12:42 +03:00
9e8ddc842c
Fix leaks in testconfig
2017-04-06 12:51:09 +03:00
15951423d8
Fix memory errors in test_poll and test_queuemanager
...
test_poll was calling poll_init() two times since it's already included in
init_test_env().
test_queuemanager was missing a bunch of frees. This doesn't fix it completely,
but removes most of the leaks and valgrind errors.
2017-04-05 17:37:21 +03:00
b1f66d21c8
Fix valgrind-errors in test_filter and test_modutil
...
Reduces valgrind clutter quite a bit.
2017-04-05 15:04:36 +03:00
2d987b25b2
Fix test_dcb
...
Set threadcount to one, don't check validity after freeing.
2017-04-05 10:49:43 +03:00
dca086571b
TestMaxScalePCRE2: Fix memory leaks
...
Not really leaks, but this reduces needless clutter in the valgrind
output.
2017-04-04 16:18:47 +03:00
8d2d6d8721
Join threads to prevent leaks
2017-04-03 14:20:54 +03:00
8284716e6a
Add test for gwbuf_clone to testbuffer.c
...
- Under valgrind, this test reveals the leak of gebuf_clone.
2017-03-30 22:14:58 +03:00
29fa4a6088
Fix testbuffer.c
...
Free memory allocated by tests, so that it is meaningful to run under
valgrind in order to check for GWBUF leaks.
2017-03-30 22:02:34 +03:00
7469c5be52
Add functionality for bypassing MySQL whitespace/comments
...
This functionality is needed both in the query classifier, where
it was first created, and in the cache.
2017-03-17 10:27:16 +02:00
5e39268e37
Remove support for TrxBoundaryMatcher
...
For the general case, regex matching simply will not do. The
regex becomes so hairy so it turns write-only, i.e. unmaintainable.
Regex matching is also slower than a handwritten custom parser.
2017-03-15 10:39:26 +02:00
1c8205e005
Add missing flag handling
2017-03-15 10:25:02 +02:00
96f0321b7e
Add program for profiling TrxBoundaryParser
2017-03-15 09:35:15 +02:00
9a33cf4d3e
Add smoke-test for qc_get_trx_type_mask_using
...
Use the query classifier test files and compare that the
result returned by qc_sqlite and the custom parser agree
for every statement.
2017-03-15 09:35:15 +02:00
c2add97e30
Recognise various autocommit syntaxes
...
set autocommit=1
set global autocommit=1
set session autocommit=1
set @@global.autocommit=1
set @@session.autocommit=1
2017-03-15 09:35:15 +02:00
470de51e22
Handle whitespace in TrxBoundaryParser
...
TheBoundaryMatcher is not updated as it is likely it will be removed
altogether. A regex that accepts comments in all relevant places becomes
so hairy it is unmaintainable. It seems that the only working solution
would be to first remove all comments and then perform the regex.
2017-03-15 09:35:15 +02:00
931f765df5
Enhance transaction tracking test
2017-03-15 09:35:15 +02:00
d5fc54a9de
Handle WITH CONSISTENT SNAPSHOT as well
...
TrsBoundaryParser now capable of parsing WITH CONSISTENT
SNAPSHOT transaction statements as well.
2017-03-15 09:35:15 +02:00
a85ce2e915
Take TrxBoundaryParser into use
2017-03-15 09:35:15 +02:00
8e81941058
Enable trx boundary detection using regexes
...
Transaction boundaries can now be detected using regexes.
All else being equal, it gives a 10% performance improvement
compared to qc-based detection.
In a subsequent change, mysql_client.c will be modified to use
qc_get_trx_type_mask() instead of qc_get_type_mask().
Currently the use of regex matching is turned on using an
environment variable. That will change.
2017-03-15 09:35:15 +02:00
20d89717c7
Remove unused headers
...
The my_config.h headers are not used.
2017-03-09 13:02:23 +02:00
e7b5731976
Fix internal test suite
...
Two of the tests didn't initialize the random number generator.
2017-03-06 11:06:33 +02:00
5648f708af
Update license to BSL 1.1
2017-02-14 21:42:28 +02:00
3b716bc707
Split queuemanager.h to public and core headers
...
Almost everything was moved to core.
2017-01-26 17:05:17 +02:00
74225daf46
Remove memlog and rdtsc
...
Neither of these were actively used, so they and any associated tests
were removed.
2017-01-26 13:16:51 +02:00
7d51864402
Clean config.h some more
...
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.
2017-01-25 16:05:51 +02:00
fe1863bb49
Remove bitmask.h & .c, since the container is no longer used
2017-01-24 14:28:28 +02:00
641896872e
Rename GW_AUTHENTICATOR and GW_BITMASK + cleanup
2017-01-24 10:03:36 +02:00
8cffa4ad58
Divide poll.h to core and public headers
...
Also some cleanup of other headers.
2017-01-20 17:15:27 +02:00
6e38276a20
Rename files, removing "gw"-prefix
...
Also gwdirs.h.in -> paths.h.in
2017-01-20 12:55:52 +02:00
eff34b91fb
Move modules.h to core/maxscale
...
Also remove some unnecessary includes + cleanup
2017-01-19 15:53:25 +02:00
7ed7f972b1
Divide monitor.h to internal and interface headers similar to filter.h
...
Definitions and function used by core are in
server/core/maxscale/monitor.h
Definitions and function used by plugins are in
include/maxscale/monitor.h
2017-01-19 09:50:48 +02:00
fb771c8a2e
Rename public types and constants in session.h
...
Preparing to split session.h into module and core sections.
2017-01-17 16:30:14 +02:00
0b6b9c3d81
Format core source code and headers
...
Formatted core source code and headers with Astyle.
2017-01-17 14:47:50 +02:00
c59711d04c
Add test for new module command options
...
The tests test the matching of domain names to module names.
2017-01-17 10:47:44 +02:00
7e65e1ae27
Fix internal test suite
...
The tests were broken by changes to the core.
2017-01-17 10:47:43 +02:00
265e5c0593
Rename FILTER_DEF to MXS_FILTER_DEF
...
Provide functions that allows the actual definition of MXS_FILTER_DEF
to be made private.
2017-01-13 14:30:11 +02:00
356690c0e5
Filter.h split into public and private parts
...
- include/maxscale/filter.h
- server/core/maxscale/filter.h
2017-01-13 12:57:40 +02:00
a1293fbd79
Add unique constraint to enumeration parameters
...
Enum parameters can now be declared unique. This prevents multiple values
for enumerations which only accept one value.
2017-01-10 16:52:29 +02:00