Esa Korhonen
3b55893a20
Combine maxscale/buffer.h with maxscale/buffer.hh
2019-01-17 12:37:40 +02:00
Esa Korhonen
d4674faa7d
Convert maxscale/query_classifier.h to .hh
...
The header was not merged with queryclassifier.hh since the latter
does not include the former.
2019-01-15 18:18:39 +02:00
Markus Mäkelä
f38ee85d5b
Allocate match_data only when necessary
...
If the session doesn't match the required username or remote address, the
match data is not allocated. This also doubles as a replacement of the
active member variable.
2019-01-15 14:10:55 +02:00
Markus Mäkelä
38879e6d0f
Move active PCRE2 data structures into RegexSession
...
The match_data object should not be used by multiple threads at the same
time as it stores the offsets into the query string for matches.
2019-01-15 14:10:55 +02:00
Markus Mäkelä
f9704bda9b
Rename regexfilter structures
2019-01-15 14:10:54 +02:00
Johan Wikman
07cbda7771
Merge branch '2.3' into develop
2019-01-11 13:06:16 +02:00
Markus Mäkelä
8ac786110e
MXS-2255: Fix COMMIT matching
...
The code used a rather questionable method for parsing SQL statements
instead of using the query classifier for detecting transaction start and
stop events.
2019-01-11 10:27:00 +02:00
Johan Wikman
29b6e53eb8
MXS-2218 Replace mq housekeeper task with delayed call
2019-01-08 16:01:36 +02:00
Esa Korhonen
d5c78eb31f
MXS-2220 Move more server functions inside class
2019-01-08 15:12:47 +02:00
Esa Korhonen
40485d746c
MXS-2220 Change server name to constant string
2019-01-03 12:13:15 +02:00
Esa Korhonen
405b4de1dd
MXS-2220 Move MxsDiskSpaceThreshold definition to SERVER
...
Reduces include-clutter a bit.
2018-12-14 10:32:25 +02:00
Markus Mäkelä
20fe9b9dca
MXS-2196: Rename session states
...
Minor renaming of the session state enum values. Also exposed the session
state stringification function in the public header and removed the
stringification macro.
2018-12-13 13:27:45 +02:00
Johan Wikman
c7d5794953
Load storage library from build location during test
...
Without this change, the storage library is not found unless
MaxScale has been installed.
2018-12-12 13:38:53 +02:00
Johan Wikman
08ed764675
MXS-2197 Rename all .h files under server to .hh
2018-12-10 13:07:23 +02:00
Johan Wikman
0927a0b938
MXS-2197 Remove most includes of maxscale/log.hh
...
All cc-files should include maxscale/ccdefs.hh, which includes
maxscale/log.hh. Consequently it need not be included again.
2018-12-10 13:07:23 +02:00
Johan Wikman
dc8c2f27f7
MXS-2197 Rename all module include files from .h to .hh
2018-12-10 13:00:46 +02:00
Johan Wikman
c0c9a9858d
MXS-2197 Rename maxscale/log.h to maxscale/log.hh
...
In files either include maxscale/log.hh or remove include entirelly
as maxscale/ccdefs.hh includes it.
2018-12-10 12:58:17 +02:00
Johan Wikman
1b5b789342
MXS-2208 Move trim-functions from maxscale to maxbase
...
log.h now includes string.hh, which is conceptually wrong, but
log.h will shortly disappear and be superceded by log.hh.
2018-12-10 12:50:07 +02:00
Johan Wikman
d44cf7b20e
MXS-2208 Allow dbfw parser to be compiled as C
...
maxsbase/log.h will turn into C++, but the flex and bison
generated files are by default C.
2018-12-10 12:50:07 +02:00
Markus Mäkelä
77477d9648
MXS-2196: Rename dcb_role_t to DCB::Role
2018-12-05 15:30:44 +02:00
Esa Korhonen
9f721f725e
MXS-2205 Convert maxscale/protocol/mysql.h to .hh
2018-12-05 11:12:20 +02:00
Esa Korhonen
d96a7dedc5
MXS-2205 Convert maxscale/poll.h to .hh
2018-12-04 14:51:02 +02:00
Markus Mäkelä
ceb6094623
MXS-2196: Fix filter unit tests
...
Fixed the use of DCBs and sessions in the mock testing framework and
adapted them to the changes done to the objects in question. Extended the
testing utility functions to allow preloading modules as well as making it
possible to only partially initialize the query classifier.
2018-12-04 11:50:43 +02:00
Markus Mäkelä
43c33e9f4a
MXS-2196: Allocate a session before allocating DCBs
...
Allocating the session before a DCB guarantees that at no point will a DCB
have a null session. This further clarifies the concept of the session and
also allows the listener reference to be moved there.
Ideally, the session itself would allocate and assign the client DCB but
since the Listener is the only one who does it, it's acceptable for now.
2018-12-04 11:50:43 +02:00
Markus Mäkelä
692127a2cb
MXS-2196: Remove the dummy session
...
As each connection now immediately gets a session the dummy session is no
longer required. The next step would be to combine parts of the session
and the client DCB into one entity. This would prevent the possibility of
a client DCB with no associated session. Backend DCBs are different as
they can move from one session to another when the persistent connection
pool is in use.
2018-12-04 11:50:43 +02:00
Markus Mäkelä
694d4a4003
MXS-2196: Make DCB a C++ struct
...
Allocating DCB with new allows the use of C++ objects in the DCB
struct. Also the explicit poll field can be replaced by inheriting from
MXB_POLL_DATA.
2018-12-04 11:50:43 +02:00
Markus Mäkelä
ad12ff6d06
MXS-2196: Rename dcb.h to dcb.hh
2018-12-04 11:50:43 +02:00
Markus Mäkelä
3b5e45ceee
MXS-2196: Combine session.h and session.hh
...
Combined the public session headers into one.
2018-12-04 11:43:38 +02:00
Markus Mäkelä
bb295b5cbe
MXS-2196: Remove listeners from services
...
All access to the listeners of a service are done via the listener
functions.
2018-12-04 11:39:51 +02:00
Esa Korhonen
d9ae298102
MXS-2205 Combine maxscale/server.h with maxscale/server.hh
...
The server-struct is still used in several .h-files.
2018-12-03 16:47:27 +02:00
Esa Korhonen
5f7211aac5
MXS-2205 Combine maxscale/filter.h with maxscale/filter.hh
2018-12-03 15:28:06 +02:00
Esa Korhonen
97bb7e7e1a
MXS-2205 Combine maxscale/modutil.h with maxscale/modutil.hh
2018-12-03 15:28:06 +02:00
Esa Korhonen
35cdbc7220
MXS-2205 Convert modulecmd.h to .hh
2018-12-03 14:06:02 +02:00
Esa Korhonen
3e5818fcb6
MXS-2205 Convert mysql_utils.h to .hh
2018-12-03 14:05:21 +02:00
Esa Korhonen
36792607d8
MXS-2205 Combine internal/modules.h with internal/modules.hh
2018-12-03 13:36:25 +02:00
Markus Mäkelä
77585bdb8c
MXS-2197: Make config.h and service.h C++ headers
...
This is the first step into converting the other headers into C++.
2018-11-30 12:15:57 +02:00
Markus Mäkelä
fb533df22e
MXS-2197: Compile all cache parts as C++
...
This is required if all headers are converted into C++ as it includes
MaxScale headers.
2018-11-30 12:15:57 +02:00
Esa Korhonen
3cb3676f3e
Clean up CCRFilter
...
Rearranges code, renames fields, uses string instead of const char etc.
2018-11-30 12:12:21 +02:00
Esa Korhonen
7d4f0483a9
Use filter template in CCRFilter
...
Minimal changes for now, cleanup in next commit.
2018-11-30 12:12:21 +02:00
Johan Wikman
32f2e769f4
MXS-1780 Make retain_last_statements service specific
2018-11-08 12:08:42 +02:00
Markus Mäkelä
4daffb5e2f
MXS-2147: Fix luafilter includes
...
The filter now correctly includes C headers.
2018-11-06 21:35:53 +02:00
Markus Mäkelä
11a756a028
Detect undefined references at link time
...
Instruct the linker to make sure all symbols are resolved at link time.
2018-11-06 21:34:28 +02:00
Markus Mäkelä
c10f56bea1
Fix binlogfilter build failure
...
The macros weren't apparently included so swapped them to explicit format
strings.
2018-10-05 11:00:08 +03:00
Markus Mäkelä
75ea1b6ea1
Fix formatting of new(std::nothrow)
...
The code previously formatted everything as `new( std::nothrow)`.
2018-10-04 21:50:44 +03:00
Johan Wikman
dbbadf1f53
Merge branch '2.2' into develop
2018-10-01 13:10:41 +03:00
Niclas Antti
c65edd1298
Enhance StopWatch
...
Clean up, comments and enhancements. StopWatch lap() didn't mean lap-time, but elapsed time. Changed meaning to lap-time and added split() for split-time.
2018-10-01 09:30:24 +03:00
Markus Mäkelä
ceb763c9be
Fix buffer size in cache rules
...
If a database, table and a column was defined, the null terminating
character would be written past the end of the buffer.
2018-09-30 22:35:13 +03:00
Markus Mäkelä
77b53b0889
MXS-2067: Fix build failures
...
The luafilter didn't include the <mutex> header and mqfilter used the
wrong lock type.
2018-09-30 19:37:12 +03:00
Markus Mäkelä
9278da1f54
MXS-2067: Remove spinlock.h
...
Removed the spinlock.h header and replaced with plain pthread types and
functions.
2018-09-28 12:18:24 +03:00
Markus Mäkelä
ab4f870927
MXS-2067: Replace most SPINLOCKs
...
Replaced SPINLOCK with std::mutex where possible, leaving out the more
complex cases. The big offenders remaining are the binlogrouter and the
gateway.cc OpenSSL locks.
2018-09-28 12:18:23 +03:00