6f24c04a4f
Compile core unit tests as C++
...
Since the core source is C++, the tests should also be C++.
2017-05-03 14:02:25 +03:00
1eb409a666
Add possibility to wait several times on a semaphore
2017-04-25 13:10:01 +03:00
19cf8c489e
Rename atomic store and load functions
...
The atomic store and load functions are now called atomic_store_X and
atomic_load_X where X is one of int32, int64 or uint64.
2017-04-24 16:11:34 +03:00
f91d415be1
Add simple test for atomic operations
...
The test runs some simple tests with the atomic operations in MaxScale.
2017-04-24 15:58:28 +03:00
b0922576be
Add Semaphore class
...
A simple Semaphore class that makes it simpler and less
erroprone to use a semaphore.
2017-04-23 18:54:18 +03:00
5138032fe5
Add shutdown support
...
The shutdown is now performed so that a shutdown message is
sent to all workers. When the workers receive that message, they
turn on a shutdown flag, which subsequently is checked in the poll
loop.
2017-04-20 13:51:16 +03:00
c3cfc86a7b
Merge branch '2.1' into develop
2017-04-19 18:19:13 +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
ad1c05b015
Merge branch '2.1' into develop
2017-04-05 11:35:13 +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
bb1b7f9755
Compile server, service and session as C++
2017-03-24 10:52:09 +02:00
96df523ce4
Compile load_utils.c as C++
2017-03-24 09:21:20 +02:00
74085978b4
Compile config.c as C++
2017-03-24 09:21:20 +02: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
180ed1616a
Add configuration test
...
The test validates, parses and creates configuration parameters for
modules.
2017-01-09 14:17:33 +02:00