6731 Commits

Author SHA1 Message Date
Esa Korhonen
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
Markus Mäkelä
b923589222 Fix relaxed multi-statement mode
The relaxed mode for multi-statements wasn't working as it required the
configuration to be enabled.
2017-01-25 15:39:10 +02:00
MassimilianoPinto
a1f54366c0 Fix compilation error
Fix compilation error
2017-01-25 14:27:21 +01:00
MassimilianoPinto
be7344f747 MXS-185: "read-only" transactions detected in readwritesplit handleError
handleError can detect READ ONLY transaction set when problem_dcb ==
rses->forced_node->bref_dcb.

Session will be closed and rses->forced_node set to NULL
2017-01-25 12:58:10 +01:00
MassimilianoPinto
b23d3e6198 MXS-185: "read-only" transactions to be directed to the slaves by the readwritesplit router
START TRANSACTION READ ONLY
statements
COMMIT

All statements, including START … and COMMIT are routed to same slave
server
2017-01-25 11:43:17 +01:00
Markus Mäkelä
286f44ac80 Fix cdc add_user false error message
The success check was inverted for the adding of a user.
2017-01-25 11:11:42 +02:00
Markus Mäkelä
99f6d4678d Make COMMIT/ROLLBACK a part of the transaction
The transaction tracking now flags the transaction as open even when a
COMMIT/ROLLBACK is received. The next statement after the transaction is
closed resets the transaction state to inactive. This means that the end
of the transaction belongs in the transaction.

This allows all statements that belong to a transaction to be detected
with the transaction tracking functions provided by the core. With this,
the routing modules should have an easier time handling transactions.
2017-01-24 20:36:39 +02:00
Markus Mäkelä
c77bb502e9 Store transaction type bit on transaction end
When the transaction ends, it's good to know what type of a transaction
just ended. Currently, this will be used by readwritesplit to detect when
a read-only transaction ends.
2017-01-24 20:36:39 +02:00
Markus Mäkelä
81be935fa9 Track transaction end as well as start
The COMMIT and ROLLBACK are now detected. This can be used to route the
trailing end of a transaction to a specific server.
2017-01-24 20:36:39 +02:00
Markus Mäkelä
6bcf0b1fd6 Add build requirements to GSSAPI authenticator documentation
The GSSAPI authenticator documentation now lists the packages it requires
when it is being built.
2017-01-24 20:36:39 +02:00
Esa Korhonen
fe1863bb49 Remove bitmask.h & .c, since the container is no longer used 2017-01-24 14:28:28 +02:00
Esa Korhonen
b187afdcf4 Move config_runtime.h and externcmd.h to core
+ some cleanup
2017-01-24 13:05:21 +02:00
Esa Korhonen
641896872e Rename GW_AUTHENTICATOR and GW_BITMASK + cleanup 2017-01-24 10:03:36 +02:00
Johan Wikman
126d9be749 Remove noisy logging 2017-01-23 15:31:01 +02:00
Johan Wikman
72aebbdbb3 Add missing include file 2017-01-23 15:29:23 +02:00
Johan Wikman
47d21bd519 Masking: Change "rules_file" parameter to "rules"
The firewall filter and the cache have similar rules files and
they use "rules". To be consistent, the masking filter should
use "rules" as well.
2017-01-23 15:17:23 +02:00
Johan Wikman
ead0d4fe3e No point storing version info in transient storage
As the RocksDB storage is re-created at each startup it does not
make sense to store version information in it.
2017-01-23 15:09:13 +02:00
Johan Wikman
6a90b0c629 Ok to continue even if storage directory is created at startup
Due to some refactoring that possibility had been lost.
2017-01-23 15:08:57 +02:00
Esa Korhonen
9430da94b9 Further cleanup of monitor headers 2017-01-23 14:16:34 +02:00
Markus Mäkelä
7723641687 Ignore relay master and external slave state changes
When the relay master or external slave states change, they should be
ignored in the current implementation. When the relay master and slave of
external master events are added, the events can be enabled.
2017-01-23 13:38:56 +02:00
Markus Mäkelä
5cd347ff18 Add the expression to debug assertion log message
The actual expression that failed should help figure out what went wrong
from the logs alone.
2017-01-23 13:38:56 +02:00
MassimilianoPinto
4f03aa674c Named Server Filter documentation update
Named Server Filter can handle % wildcards in optional ‘source’
parameter
2017-01-23 11:47:50 +01:00
Johan Wikman
eb05132a5c Cache: Use MXS_MODULE_PARAM_SIZE 2017-01-23 11:01:57 +02:00
Johan Wikman
31227e526b Add reference to "sizes" documentation 2017-01-23 10:28:28 +02:00
Johan Wikman
806a25167a Add documentation on IEC and SI prefixes 2017-01-23 10:19:20 +02:00
Johan Wikman
105f626e76 IEC prefixes are matched case-insetensively
If the case of the initial character does not matter, then the case
of the following 'i' should not matter either.
2017-01-23 10:11:26 +02:00
Johan Wikman
d63f8727c2 Wrap Configuration-Guide.md
Lines wrapped at 80 chars. No other changes.
2017-01-23 10:05:31 +02:00
Johan Wikman
4d0854f4b0 Wrap binlog router documentation
Only wrapping at 80 chars per line, no change of contents.
A minor change will follow.
2017-01-23 09:55:59 +02:00
Markus Mäkelä
50f594fa4e Fix ccrfilter parameters
The filter used the value of `count` for the `time` parameter.

The `options` parameter used the old-style parsing of the options and the
`match` and `exclude` parameters didn't use config_copy_string.
2017-01-22 09:24:00 +02:00
Markus Mäkelä
03402a86ed Check that ccrfilter time is enabled before using it
The filter calculated a time difference which was negative if the filter
was not configured to use time intervals.

Added more info level logging to help determine how the filter behaves.
2017-01-22 09:24:00 +02:00
Markus Mäkelä
4e6fde8a23 Use query type instead of operation for ccrfilter
The query operation not being a select is too strict and not very
precise. Only queries that actually modify data should trigger the adding
of routing hints.
2017-01-22 09:24:00 +02:00
Esa Korhonen
8cffa4ad58 Divide poll.h to core and public headers
Also some cleanup of other headers.
2017-01-20 17:15:27 +02:00
Markus Mäkelä
468411250d Fix old header names in modules
Some of the modules still used the gw_authenticator.h name.
2017-01-20 16:57:04 +02:00
Markus Mäkelä
4ee7f4c91d Add some extra debug assertions
The debug assertions help catch false positives in server state change
logic.
2017-01-20 16:57:04 +02:00
MassimilianoPinto
7824c98dcc Maxrows filter is now the core 2017-01-20 15:46:03 +01:00
MassimilianoPinto
b4d7739bdc namedserverfilter.c: removed unused var
Removed unused var in namedserverfilter.c
2017-01-20 14:40:29 +01:00
Johan Wikman
d012f137c6 Update cache documentation 2017-01-20 14:02:32 +02:00
Johan Wikman
872bbd1ab3 Make cache part of the core 2017-01-20 13:30:00 +02:00
Johan Wikman
be1bdfaa92 Mark masking as part of the core 2017-01-20 13:30:00 +02:00
MassimilianoPinto
57b530a2e8 MXS-1065: add wildcards support to source option in namedfilter
It’s possible to add % wildcards in the ‘source’ option of
namedserverfilter.
Allowed values, for an IP address only are:

X.%.%.%
X.Y.%.%
X.Y.Z.%

The match any ‘%’ is not allowed
2017-01-20 12:15:20 +01:00
Esa Korhonen
6dc6d6280a Rename some .c-files, removing gw-prefix
May require reconfiguring the build. Some "gw":s are still
remaining, at least in test files.
2017-01-20 12:55:52 +02:00
Esa Korhonen
6e38276a20 Rename files, removing "gw"-prefix
Also gwdirs.h.in -> paths.h.in
2017-01-20 12:55:52 +02:00
Markus Mäkelä
568239d2b5 Ignore auxiliary server status bits for state changes
The auxiliary status bits for the server were treated as if they changed
the real state of the server. The stale status bits don't affect the real
state of the server so they should be ignored when monitors check for
state changes in servers.
2017-01-20 09:10:44 +02:00
Markus Mäkelä
ffc68a688f Fix mqfilter build failure
It called an internal session function for no real reason.
2017-01-20 09:09:56 +02:00
Markus Mäkelä
5a2a69b7be Make enum parameter values unsigned 64bit integers
Making the enum value relatively large removes the need to expand it if a
module requires a significant amount of enumeration values.
2017-01-19 16:03:05 +02:00
Markus Mäkelä
dbeb208a5c Remove unnecessary function from header
The function was only used in one place.

Also added a debug assertion for the monitor event detection mechanism.
2017-01-19 16:03:05 +02:00
Esa Korhonen
eff34b91fb Move modules.h to core/maxscale
Also remove some unnecessary includes + cleanup
2017-01-19 15:53:25 +02:00
Esa Korhonen
53c5b475ad More cleanup of monitor.h
Move some more functions into core header + miscellaneous cleanup
2017-01-19 15:32:40 +02:00
Esa Korhonen
02a8f7492e Divide session.h to internal and interface headers
Definitions and function used by core are in
server/core/maxscale/session.h
Definitions and function used by plugins are in
include/maxscale/session.h
2017-01-19 15:19:40 +02:00
Johan Wikman
c9a61fec6d Masking: Use common constants
- Response related constants moved from ComPacket to ComResponse
- Constants defined using defines from .../maxscale/protocol/mysql.h
2017-01-19 14:52:13 +02:00