a61b70a810
Quick fix to see if we can overcome crash.
2016-02-24 15:18:44 +00:00
5122777829
Try to fix problem if balancing free client DCB and free session so that auth data is always available and client DCB is not freed until session is ready to be freed. Also fix problem in auth logic.
2016-02-24 10:00:45 +00:00
395cbdc103
Simplify handling of "client data" by having a pointer to it only in DCB and not in session structure. Change name of session->client to session->client_dcb for greater clarity. Temporary free of client data in DCB, to be moved to authenticator when it becomes a module. Fix incorrect name of listener_alloc.
2016-02-23 11:13:21 +00:00
ef8a20cceb
Fix silly mistakes.
2016-02-22 11:16:51 +00:00
5077933e41
Fix bug in mysql_client.c (over optimisation of protocol setting); various clarifications and improvements re code review.
2016-02-22 11:05:02 +00:00
866e91c088
Changes to improve robustness of SSL processing, separate it so far as possible from protocols. Separate the detailed mechanism of authentication from the MySQL protocol with a view to making it into a module later.
2016-02-15 09:29:07 +00:00
971d1d5de2
Redesign logic of SSL connections to work with status in client DCB instead of in the protocol. This eases the way to moving SSL logic out of a specific protocol (currently MySQL) so as to be available across any protocol. Also, some simplification.
2016-02-03 08:54:55 +00:00
05fa498dc0
Add an SSL header needed to support extra data in DCB.
2016-01-27 15:46:50 +00:00
8367d93746
Migrate SSL functionality out of service and into listener. Develop config handling accordingly, including making provision for SSL parameters in servers for future use in implementing SSL to backend servers. Some elements still to be tidied mainly in mysql_client.c - but that will be part of detaching the SSL authentication from the MySQL protocol.
2016-01-27 15:46:19 +00:00
e58148356d
Split off listener functionality and move SSL initiation from service to listener. Put GWPROTOCOL in its own header file.
2016-01-26 16:08:02 +00:00
1f241a5ed1
Rearrange libraries and build files.
...
This is the first change in an attempt to arrange the linking so that
more errors are detected at link-time.
- All files in server/core but for gateway.c are linked to one shared
library called maxscale-common.
- The files log_manager/log_manager.cc and utils/skygw_utils.cc are
built into maxscale-common as well.
- MaxScale itself consists now only of gateway.c and is linked with
maxscale-common.
- All plugins link with maxscale-common.
- All executables link in addition with {EMBEDDED_LIB}.
After this change, the change (MXS-517) where query_classifier is the
only component that uses ${EMBEDDED_LIB} and the rest mysqlclient can
be made much cleaner.
After a few additional steps, all shared libraries can be linked with
the linker flags "-Wl,-z,defs", which directs the linker to resolve
all symbols. That will require that all shared libraries list all the
libraries they need, but will at the same time ensure that any
missing symbols are detected at link-time and not at run-time.
2016-01-22 23:26:17 +02:00
a61cedb1aa
Fixed freeing of wrong pointer
...
The wrong pointer in server_free was used to clear the server parameters.
2016-01-22 18:55:54 +02:00
872d02db3e
Finalized configuration processing cleanup
...
All parts of the configuration processing are now in their own functions.
This allows new objects to be created after MaxScale has started.
2016-01-20 09:25:03 +02:00
508c91be32
Cleaned up monitor configuration processing
...
Moved the monitor configuration processing into its own function and cleaned
it up.
2016-01-19 14:23:44 +02:00
53ac88a1a1
Cleaned up the process of adding filters and servers to a service
...
Moved the adding of filters, servers and router options to its own function.
2016-01-19 14:23:44 +02:00
0aaba891a3
Cleaned up server configuration processing
...
Moved the creation of new servers into a separate function and cleaned up
the configuration processing.
2016-01-19 14:23:44 +02:00
c6dfcb66f5
Cleaned up service configuration processing
...
Moved the allocation and configuration of services into their own function.
Moved SSL parameter validation into a separate function.
2016-01-19 14:23:44 +02:00
f12be9fea2
MXS-549: Change MaxScale's working directory on startup
...
MaxScale now changes the working directory to the log directory when it is
started. If this fails, the file system root is used instead.
2016-01-19 13:59:38 +02:00
c2310327fc
Fixed idle session processing
...
The current implementation of idle connection timeouts is not safe. The sessions
are handled in a way which is not thread-safe and the checking is done from
a non-polling thread.
With this change, the checks for the session timeouts are done in one of the
polling threads in a thread-safe manner only if at least one service has enabled
the timing out of idle client connections.
2016-01-19 10:53:55 +02:00
cdeb921b1b
Added missing freeing of monitor resources
...
Monitor servers were not freed.
2016-01-15 21:38:40 +02:00
d41fe5b9c7
Added extra checks to readwritesplit
...
Added a check that the master server reference is actually in use before
doing anything with it. Also removed a false assertion.
2016-01-15 16:25:05 +02:00
c5947285cf
Added missing freeing of filter resources
...
Filters were not freeing their options or parameters.
2016-01-15 16:24:32 +02:00
1656840417
Added missing freeing of service resources
...
The service resources weren't freed when the service is freed.
2016-01-15 16:23:41 +02:00
a2bc15c870
Removed obsolete functions from dbfwfilter
...
The filter defined its own hashing and string comparison functions even though
there are common functions for both.
2016-01-15 16:22:18 +02:00
47f6c6613e
Added missing freeing of server resources
...
The server did not release the parameters or the slave ID list.
2016-01-15 12:42:12 +02:00
5515c71988
Reapply MXS-504 changes subsequent to optimisation changes. Merge SSL processing into non-SSL processing so far as possible, correct usage of OpenSSL, simplify where possible.
2016-01-13 10:08:37 +00:00
d13bec0647
Reformat testprotocol.c
2016-01-12 15:52:29 +02:00
183202466d
Reformat telnetd.c
2016-01-12 15:49:09 +02:00
fd9698e705
Reformat mysql_common.c
2016-01-12 15:43:33 +02:00
da29ee0f4a
Reformat mysql_client.c
2016-01-12 15:21:33 +02:00
244d7ee86c
Reformat mysql_backend.c
2016-01-12 14:57:26 +02:00
1b94c5b519
Reformat mascaled.c
2016-01-12 14:20:11 +02:00
018b87d304
Reformat httpd.c
2016-01-12 14:14:40 +02:00
040c67127a
Reindent schemarouter.c
...
- Untabify
- 4 space indent
- Allman + other style issues.
2016-01-12 13:54:23 +02:00
0a3e6b4352
MXS-498: Username and source address added to QLA filter output
...
The filter now logs the username and remote address of each client. This will
make tracking of users and their queries a lot easier.
2016-01-12 09:30:03 +02:00
b01e8b2eec
Added utils library initialization function and improved replace_quoted
...
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.
2016-01-11 17:04:39 +02:00
23a7562d3a
Replace skygw_ type prefix with qc_.
...
- skygw_query_type_t renamed to qc_query_type_t.
- skygw_query_op_t renamed to qc_query_op_t.
2016-01-11 12:06:21 +02:00
2f42246880
Rename query classifier functions consistently.
...
All public query classifier functions now have the prefix qc_.
2016-01-11 12:04:52 +02:00
ec281849aa
Remove explicit calls to parse_query.
...
Now that all query classifier functions parse the query if it
has not been parsed, there is no reason for any module to call
parse_query explicitly.
2016-01-11 10:15:13 +02:00
23ebd581dc
Fix mistake in optimise-core branch, dcb.c.
2016-01-08 14:11:50 +00:00
bd02835139
Fiddle around with spaces.
2016-01-08 13:47:34 +00:00
fb5fdb17db
Switch bitmask_clear to be locking and offer bitmask_clear_without_spinlock for non-locking version, in response to review comments. Revert poll.c to use bitmask_clear (with locking) and amend dcb.c to use the non-locking version and to take advantage of the return of an indication of whether the whole bitmask is then clearn.
2016-01-08 13:47:34 +00:00
4461cd9398
Streamline modutil_get_complete_packets code. No external impact.
2016-01-08 13:47:34 +00:00
aa79e61aac
Various optimisations of bitmask processing. External change is that bitmask_clear() does not apply a spinlock, so must be called with exclusive access to the bitmask. This affects the call in shutdown processing in poll management. The call from DCB processing is safe because zombie processing has exclusive access to DCBs.
2016-01-08 13:47:34 +00:00
78b363aec7
Enhance buffer handling by changing gwbuf_free to free the whole list of buffers (although it could contain only one buffer). Add gwbuf_count to give number of buffers in a buffer list (for convenience in debugging). Add gwbuf_alloc_and_load to simplify putting data into a new buffer.
2016-01-08 13:47:34 +00:00
57b79fc663
Remove unecessary calls to query_is_parsed/parse_query.
...
query_classifier_get_operation() parsed the query if it has not
yet been parsed. In the other places, the query need not be
parsed.
2016-01-08 11:52:20 +02:00
97282fca97
Make lines of mqfilter.c less that 110 characters long.
...
Untabified as well.
2016-01-08 11:43:05 +02:00
cba190f84c
Checks for temporary tables are only done if they have been created
...
Previously all queries were inspected for CREATE, DROP and SELECT statements
which targeted temporary tables even if they haven't been created.
2016-01-08 11:16:43 +02:00
b84e739cfa
All queries related to prepared statement are sent to the master
...
The preparation and closing of prepared statements was sent to all servers
even though the execution was always sent to the master. With this change,
all queries which interact with prepared statements are only sent to the master.
The sending of statement preparations to all servers is a problem when a
statement which depends on a database or a table is created and the DDL
statement which created that table has not yet been replicated to the
slaves.
In addition to fixing the aforementioned problem, this change should also
reduce unnecessary network traffic to slaves and improve the overall
performance of the prepared statements.
2016-01-08 11:16:30 +02:00
40cfe1a864
Merge branch 'release-1.3.0' into develop
2016-01-08 11:14:02 +02:00