Commit Graph

12465 Commits

Author SHA1 Message Date
330719c8f9 MXS-2196: Store listener references in Service
By storing a shared pointer to the listeners in the services, they will be
available as long as the service using them exists. This enables clean
destruction of listeners that still have open sessions.

The listener creation code now separately creates the listener and links
it to the service. Also replaced relevant parts of the related code with
the listener implemented versions of it.
2018-12-04 11:39:52 +02:00
a6063b5e85 MXS-2196: Remove listen entry point from protocol
The entry point was useless as all of the modules called the same
function.
2018-12-04 11:39:52 +02:00
ae3763da92 MXS-2196: Replace listener_alloc with Listener::create 2018-12-04 11:39:52 +02:00
39f668ff3c MXS-2196: Rename SERV_LISTENER to Listener 2018-12-04 11:39:52 +02:00
8c847ec10d MXS-2196: Move listener functionality into member functions
Moved most of the listener related processing inside the SERV_LISTENER (to
be renamed into Listener) class.
2018-12-04 11:39:52 +02:00
67626d6c32 MXS-2196: Pass the SERVICE pointer when allocating a DCB
The value would otherwise be assigned outside of it and in some cases not
at all. Now all DCBs (apart from internal ones) have a valid SERVICE
pointer.

The SERV_LISTENER pointer should not be in the DCBs but in the
session. This way the listener is an attribute of a session instead of a
connection. If this is implemented, the authenticator data can be more
easily shared.
2018-12-04 11:39:51 +02:00
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
1c7d5f07c3 MXS-2196: Replace raw pointers with SListener references
Replaced raw pointers in function parameter with const SListener
references. This removes the need to pass raw pointers as arguments and
all access is done via smart pointers.
2018-12-04 11:39:51 +02:00
5247c152c2 MXS-2196: Replace listener iterator
The iteration of listeners is now done via the global list of
listeners. This removes the need to have a service before a listener is
accessed which also reflects how the actual configuration is laid out. It
also guarantees that any results returned by the find functions will be
valid as long as the results are used.
2018-12-04 11:39:51 +02:00
6f9b9f5e95 MXS-2196: Store listeners in a global list
The listeners are now stored in their own list which allows them to be a
component separate from the service. The next step is to remove the
listener iterator functionality and replace it with its STL counterpart.
2018-12-04 11:39:51 +02:00
5926ac2c3c MXS-2196: Move listener operations into listener sources
The operations that are done on a listener are now done in the correct
source file.
2018-12-04 11:39:51 +02:00
6c281d55e2 Merge branch '2.3' into develop 2018-12-04 11:23:56 +02:00
1a78f2ffbb Merge branch '2.2' into 2.3 2018-12-04 11:23:31 +02:00
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
87d2a45b20 MXS-2207 Fix the problem in qc_mysqlembedded 2018-12-03 16:03:51 +02:00
964180804c MXS-2207 Add test that reveals problem
With qc_mysqlembedded statements like

    SET STATEMENT ... FOR stmt;

are always classified as READ, although their type should be
that of stmt.
2018-12-03 15:59:43 +02:00
7872474595 Add missing bug fix to release notes 2018-12-03 15:30:47 +02:00
756593a718 MXS-2205 Combine maxscale/router.h with maxscale/router.hh 2018-12-03 15:28:06 +02:00
2dc5015499 MXS-2205 Convert readconnection.h to .hh 2018-12-03 15:28:06 +02:00
72d8ab5220 MXS-2205 Convert modules/include/cdc.h to .hh 2018-12-03 15:28:06 +02:00
df9fbdd31a MXS-2205 Convert modules/protocol/HTTPD/httpd.h to .hh 2018-12-03 15:28:06 +02:00
5f7211aac5 MXS-2205 Combine maxscale/filter.h with maxscale/filter.hh 2018-12-03 15:28:06 +02:00
8a570eb6a1 MXS-2205 Combine maxscale/monitor.h with maxscale/monitor.hh 2018-12-03 15:28:06 +02:00
97bb7e7e1a MXS-2205 Combine maxscale/modutil.h with maxscale/modutil.hh 2018-12-03 15:28:06 +02:00
49173bbe83 Merge branch '2.3' into develop 2018-12-03 15:21:24 +02:00
1f495dec99 Merge branch '2.3.2' into 2.3 2018-12-03 15:20:33 +02:00
cd95ca7092 Update 2.3.2 release date 2018-12-03 14:51:40 +02:00
35cdbc7220 MXS-2205 Convert modulecmd.h to .hh 2018-12-03 14:06:02 +02:00
3e5818fcb6 MXS-2205 Convert mysql_utils.h to .hh 2018-12-03 14:05:21 +02:00
1701f87f00 MXS-2205 Convert internal/maxscale.h and internal/dcb.h to .hh 2018-12-03 13:49:08 +02:00
cdf323384c MXS-2205 Combine internal/session.h with internal/session.hh 2018-12-03 13:47:39 +02:00
36792607d8 MXS-2205 Combine internal/modules.h with internal/modules.hh 2018-12-03 13:36:25 +02:00
b15f43bc81 MXS-2205 Convert config_runtime.h and externcmd.h to .hh 2018-12-03 13:34:33 +02:00
344c7dde4a MXS-2205 Combine internal monitor headers
Contents of monitor.h moved to monitor.hh
2018-12-03 13:32:09 +02:00
0f755adc78 MySQLAuth header to .hh 2018-12-03 11:00:29 +02:00
760f2ff34c Move alloc.cc to maxbase
Only renames the functions. Macro names are left as is to keep the diff
small.
2018-12-03 10:20:45 +02:00
0c7e737eb7 Move some mysql/mariadb utilities to maxutils
Can be used in system tests later on.
2018-11-30 13:03:37 +02:00
a6fe6a0463 Delete internal/worker.h
Was unused.
2018-11-30 12:22:51 +02:00
01e9f71af1 MXS-2197: Make SERV_LISTENER a C++ class
The class is still mostly the same as the old C version but it now uses
std::string instead of char pointers. Changed configuration default values
so that the parameters passed to the listener allocation are always valid.
2018-11-30 12:15:57 +02:00
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
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
cc52ffe768 MXS-2197: Remove C examples
The examples are obsolete.
2018-11-30 12:15:57 +02:00
3cb3676f3e Clean up CCRFilter
Rearranges code, renames fields, uses string instead of const char etc.
2018-11-30 12:12:21 +02:00
7d4f0483a9 Use filter template in CCRFilter
Minimal changes for now, cleanup in next commit.
2018-11-30 12:12:21 +02:00
d07bc9cd7c Merge branch '2.3' into develop 2018-11-30 12:06:11 +02:00
6f934cb9d4 Merge branch '2.3.2' into 2.3 2018-11-30 12:05:29 +02:00
95d8ee9305 Extend maxctrl system test
The test now executes all commands present in MaxCtrl.
2018-11-30 12:05:14 +02:00
17d46d9166 Compile maxkeys and maxpasswd as C++ 2018-11-30 10:59:32 +02:00
a1e1ac0012 Move string_printf to maxbase
Can be used in tests.
2018-11-29 12:21:40 +02:00
1126c687a4 Fix alloc-dealloc mismatch in qc_classify_as_json
The deleter for std::unique_ptr<GWBUF> was not included in that file which
caused it to be deleted with the default deleter. The same should apply to
std::unique_ptr<json_t> as well.
2018-11-29 11:25:28 +02:00