Commit Graph

3016 Commits

Author SHA1 Message Date
a5a579ffce Rename BUILD_AVRO to BUILD_CDC
Using the broader CDC name instead of AVRO for the CMake variable name
makes more sense as there are modules other than the avrorouter.
2017-02-03 14:39:56 +02:00
2bb62a28cb MXS-109: added comments and minor improvements
Some minor improvements and freeing of info.cluster_uuid after
hashtable_add
2017-02-03 12:43:32 +01:00
6ee257dc5f Only log an error if the binlog file exists
The avrorouter logged an error every time it tried to open a file even if
the file doesn't exist.
2017-02-03 08:16:12 +02:00
f3cb0830e6 MXS-109: membership based on cluster_size
Monitored nodes could be part of different cluster UUIDs: select only
the ones belonging to UUID with more joined nodes.

In case of different UUIDs if the joined numbers is less than (n_nodes
/ 2 ) + 1 don’t consider any node part of the cluster
2017-02-02 14:53:36 +01:00
4ccfc35b00 Fix regression of MXS-1111
The function that was added to detect the commands that should always be
allowed wasn't used.
2017-02-02 13:50:44 +02:00
13997fc5b9 Fix prepared statements being rejected by dbfwfilter
The merge with 2.0 caused the dbfwfilter to reject all prepared statements
when they are supported in 2.1.
2017-02-02 13:34:57 +02:00
a2ffb0476f Fix insertstream value implicit insert detection
The pointer being at the end of the buffer was not checked.
2017-02-02 12:58:30 +02:00
3a447607a7 Move inserstream into the core
The filter is a part of 2.1 so it should be in the core.

Added a note into the documentation about the experimental status.
2017-02-01 21:08:25 +02:00
eeb3cc436e Remove wildcard domain name matching
This was buggy with the current user database implementation. Need
to think of some other way to implement this feature.
2017-02-01 19:30:42 +02:00
4ef4cb490b Cache: Use consistent naming
- snake_case
- member variables prefixed with m_
- static member variables prefixed with s_
- where prefixes are used (z,p,s), the following character
  is capitalized
2017-02-01 10:43:41 +02:00
f2da434b56 Fix merge problem with dbfwfilter
Code was duplicated in the merge and the old function names were used.
2017-02-01 09:58:38 +02:00
e64a641bcd Merge branch '2.0' into develop 2017-02-01 09:35:13 +02:00
2b950e60fd Monitor connect error is now logged
Monitor connect error is now logged
2017-01-31 15:42:05 +01:00
00f16e1fa5 Make parameters for command_is_mandatory const
The parameters can be const as they aren't modified.
2017-01-31 10:16:33 +02:00
b23649409f Add comment to GSSAPI insert string
The comment explain why the last two values have no quotes.
2017-01-30 22:41:37 +02:00
6cd16d26b8 Flush the producer after every new record
As the cdc_kafka_producer script is an example, it should flush the
producer after every new record. This should make it easier to see that
events from MaxScale are sent to Kafka.
2017-01-30 20:14:27 +02:00
fdee329198 MXS-1111: Allow COM_PING and other commands to pass the firewall
The firewall filter should allow COM_PING and other similar commands to
pass through as they are mainly used to check the status of the backend
server or to display statistics. The COM_PROCESS_KILL is the exception as
it affects the state of the backend server. This is better controlled with
permissions in the server than in the firewall filter.

Commands that require special grants aren't allowed to pass as they are
mainly for maintenance purposes and these should not be done through the
firewall.
2017-01-30 19:16:33 +02:00
122027e4a3 Fix binlogrouter test
The test used the wrong working directory. blr_slave.c didn't check the
input for NULL values.
2017-01-30 16:46:24 +02:00
03067b586c Cache: Install storage implementations as well
As the cache is marked as being core, the storage modules needs
to be marked as core as well.
2017-01-30 14:23:54 +02:00
7dc5698c90 Rename domain to module
The module commands now use the module name as the replacement for
domain. The domain itself wasn't any better when compared to the module
name.
2017-01-28 10:09:34 +02:00
5972d87fba Add missing principal name verification to GSSAPIAuth
The authenticator module did not compare the username with the principal
name that was given by the GSSAPI server.
2017-01-28 10:09:34 +02:00
e8c53e8aa5 Fix authenticator path in testbinlog.c
Added missing subdirectories in library path
2017-01-27 15:12:06 +01:00
1f9b18e3bc Split secrets.h to public and core + miscellaneous cleanup
Also, changed some function names to this_style from thisStyle. More of
this in later commits.
2017-01-27 15:33:52 +02:00
78545b2c5c Read complete lines with Kafka producer
There's no need to process the JSON twice as the Kafka producer is
expected to be used with the Python CDC client which already splits the
JSON with newlines.
2017-01-27 13:06:25 +02:00
50cffed5b2 Add readwritesplit options to diagnostic output
This helps detect the state of the loaded configuration.
2017-01-27 12:19:27 +02:00
4adc9d705b Build Jansson if library not found
If the Jansson JSON library is not found on the system, it is built from
source.
2017-01-27 12:19:27 +02:00
8a1a4c91e4 Enable disable_sescmd_history by default
The combination of the default values of `disable_sescmd_history=false`
and `max_slave_connections=100%` does not make sense as it is not possible
to find a replacement slave in case an active one fails.
2017-01-27 12:19:27 +02:00
8b83bf834e Clean up router.h
Nothing moved to core, just rename and cleanup.
2017-01-26 16:14: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
8d07604436 Split maxscale.h to public and private parts
This header defines some general functions and maxscale main() return
values. Most of it is still public, but there were some functions
which were moved to a core header.
2017-01-26 11:17:25 +02:00
5630afebff Fix typo in COM_SET_OPTION comment
The comment had the option meanings reversed.
2017-01-26 10:55:32 +02:00
84040be182 Add missing error handling to Avro file handling
Some of the JSON errors weren't handled which could cause problems when a
malformed schema definition is read.

Also added more error messages for situations when opening of the files
fails.
2017-01-26 10:23:26 +02:00
4b7f282f14 Handle COM_SET_OPTION in client protocol
The client protocol capability bytes are now updated when a COM_SET_OPTION
is executed.
2017-01-26 09:57:29 +02:00
3378edc4d3 Route COM_SET_OPTION to all servers
This fixes problems with multi-statement execution which is only enabled
when the corresponding option is present.
2017-01-26 09:57:29 +02:00
aa8851fbe1 Remove listmanager
The file wasn't used, so any traces of listmanager.h or .c have been
erased.
2017-01-25 16:11:12 +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
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
a1f54366c0 Fix compilation error
Fix compilation error
2017-01-25 14:27:21 +01:00
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
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
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
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
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
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
fe1863bb49 Remove bitmask.h & .c, since the container is no longer used 2017-01-24 14:28:28 +02:00
b187afdcf4 Move config_runtime.h and externcmd.h to core
+ some cleanup
2017-01-24 13:05:21 +02:00
641896872e Rename GW_AUTHENTICATOR and GW_BITMASK + cleanup 2017-01-24 10:03:36 +02:00
126d9be749 Remove noisy logging 2017-01-23 15:31:01 +02:00
72aebbdbb3 Add missing include file 2017-01-23 15:29:23 +02:00
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