8466 Commits

Author SHA1 Message Date
Johan Wikman
ccbff0f6d4 Allow debugging of dcb event handling
Using DCB_LOG_EVENT_HANDLING is defined, a notice will be
logged for each event when it is handled.
2017-09-04 11:29:18 +03:00
Johan Wikman
1a468049b8 Overwrite dcb thread id at final close 2017-09-04 11:09:48 +03:00
MassimilianoPinto
0a1608d90d Log proper message in errorReply when master state is BLRM_SLAVE_STOPPED
Log proper message in errorReply when master state is BLRM_SLAVE_STOPPED
2017-09-01 16:48:20 +02:00
MassimilianoPinto
85f395394b Connection retry limit minor changes
Connection retry limit minor changes
2017-09-01 13:52:40 +02:00
MassimilianoPinto
9230420872 The blr_master_close() is now called in the main worker thread.
The blr_master_close() is now called in the main worker thread by:
blr_stop_slave() and blr_stop_start_master()
2017-09-01 11:49:27 +02:00
Johan Wikman
18cb61f7de Delay closing in dcb_close
If a dcb being closed is the dcb for which events are currently being
processed, the dcb is not closed immediately but only after all events
have been delivered.
2017-09-01 11:03:23 +03:00
MassimilianoPinto
cfe06a563e Remove saving/updating GTID repo when maxscale starts
Remove saving/updating GTID repo when maxscale starts.
The repo update slows down the maxscale startup.
The saving was added in order populate GTID repo with current file but
it costs extra time to event validation routine when current binlog has
many events and it has a big size.
2017-08-31 17:27:52 +02:00
Johan Wikman
d7b04fc451 Add static storage to anonymous unit/thread structures
Without static, CentOS6 complains about non-local variable
using anonymous type.
2017-08-31 12:45:16 +03:00
MassimilianoPinto
a0cf053102 MXS-1156: Documentation update
MXS-1156: Documentation update.
Some content removed: probably added by a previous merge.
2017-08-31 11:01:03 +02:00
MassimilianoPinto
e1efb91ea5 MXS-1156: MASTER_CONNECT_RETRY is a new option for CHANGE MASTER TO
MXS-1156: MASTER_CONNECT_RETRY is a new option for CHANGE MASTER TO.

The ‘connect_retry’, ‘master_retry_count’ options are now in use for
both service and
router_options.
2017-08-31 11:01:03 +02:00
MassimilianoPinto
42833386f5 MXS-1156: added configuration entry point for connection retry parameters.
MXS-1156: added configuration entry points for connection retry
parameters.

Variable names have been also changed.
2017-08-31 11:01:03 +02:00
MassimilianoPinto
c91187d4de MXS-1156: added limit to master connect retry
MXS-1156: added limit to master connect retry
2017-08-31 11:01:03 +02:00
MassimilianoPinto
3c7a0014a9 MXS-1156: Store master_heartbeat_period in master.ini
MXS-1156: Store master_heartbeat_period in master.ini
2017-08-31 11:01:03 +02:00
MassimilianoPinto
0f5f9f8228 MXS-1156: Disable heartbeat if value is set to 0
MXS-1156: Disable heartbeat if value is set to 0.

A warning log is written in maxscale log file when heartbeat is not set.
2017-08-31 11:01:03 +02:00
MassimilianoPinto
5b2cfac3cb MXS-1156: Added new option MASTER_HEARTBEAT_PERIOD to CHANGE MASTER TO
MXS-1156: Added new option MASTER_HEARTBEAT_PERIOD to CHANGE MASTER TO
2017-08-31 11:01:03 +02:00
Johan Wikman
68b7d88fa1 Check return value of freopen
Otherwise compilation fails in release mode.
2017-08-30 14:36:51 +03:00
Johan Wikman
63257f1b2a MXS-1378 Log session id
If the session id is known, it will be logged together with all
messages. If present, the session id appears, enclosed in paranthesis,
right after the message category. E.g.

    2017-08-30 12:20:49   warning: (4711) [masking] The rule ...
2017-08-30 13:58:42 +03:00
Johan Wikman
e7926d770e MXS-1378 Provide access to current session
Provide access to current session and session id. This will
be used by the logging mechanism for logging the session id
together with messages.
2017-08-30 13:58:42 +03:00
Johan Wikman
67efd1daea MXS-1378 Provide access to the current DCB
This will be used by a subsequent `session_get_current()` and
`session_get_current_id()` for obtaining the current SESSION and
session id, respectively. The latter of those will be used by the
logging mechanism for logging the session id in conjunction with
messages.
2017-08-30 13:58:42 +03:00
Markus Mäkelä
5455ffbb7f Update mxs729_maxadmin
The test now expects the correct output.
2017-08-30 13:07:46 +03:00
Markus Mäkelä
e6f78bfcb3 Pass modutil function state as a struct
This allows the type to change without changing it at the call sites.
2017-08-29 22:46:35 +03:00
Johan Wikman
2a346fd061 MXS-1376 Really close a DCB only at the end of event loop
When dcb_close() is called, the DCB is only marked for closing
and the actual closing takes place only after all event handlers
have been called. That way, the state of the DCB will not change
during event processing but only after.

From a handler perspective this should now be just like it was
when the zombie queue was present.

TODO: There are far too many state variables or variables akin to
      state variables - dcb_role, state, persistentstart, n_close -
      in DCB. A cleanup is warranted.
2017-08-29 15:44:50 +03:00
Esa Korhonen
08ae659310 Add Keepalived tutorial 2017-08-28 10:32:24 +03:00
Markus Mäkelä
13f7015e7b Fix EOF packet calculation for large rows
The EOF packet calculation function in modutil.cc didn't handle the case
where the payload exceeded maximum packet size and could mistake binary
data for a ERR packet.

The state of a multi-packet payload is now exposed by the
modutil_count_signal_packets function. This allows proper handling of
large multi-packet payloads.

Added minor improvements to mxs1110_16mb to handle testing of this change.
2017-08-25 17:00:42 +03:00
Johan Wikman
5832352a08 MXS-1376 DCBMM removed
Related to the zombie processing and as zombie processing is not
needed anymore, it can be removed.
2017-08-25 14:48:26 +03:00
Johan Wikman
9c25e6d995 MXS-1376 All zombie related code removed
As dcbs are now closed when dcb_close() is called and there is
no zombie queue, the zombie state can also be removed.
2017-08-25 14:48:16 +03:00
Johan Wikman
c11d8fa328 MXS-1376 Close a connection in dcb_close
As each client/server connection will be handled by a specific
thread, all closing activity can take place directly when the
connection is closed and not later when the zombie queue is
processed.

In a subsequent commit the zombie queue will be removed.
2017-08-25 14:48:16 +03:00
Johan Wikman
170e03fd23 MXS-1376 Update DCB structure documentation 2017-08-25 14:48:16 +03:00
Markus Mäkelä
42efe0549a Add error messages and increse to max_allowed_packet in mxs1110_16mb
The test now logs why it fails to perform some action in addition to
setting max_allowed_packet to both master-slave and Galera clusters.
2017-08-25 13:54:10 +03:00
Markus Mäkelä
c2a9c4bfc1 Create admin user files if they don't exist
The default users are now inserted into the admin users files if no
existing files are found. This removes the hard-coded checks for admin
user names and simplifies the admin user logic.
2017-08-25 13:54:10 +03:00
Markus Mäkelä
0e89e445f2 Bind admin interface to IPv4 if IPv6 fails
The default interface for the admin interface is the IPv6 address '::'
which corresponds to the IPv4 address '0.0.0.0'. If the system doesn't
support IPv6, then an attempt to bind on IPv4 should be made.
2017-08-25 13:54:10 +03:00
Markus Mäkelä
894ef3d3a9 MXS-1346: Compile dbfwfilter as C++
Compile the dbfwfilter as C++ to allow STL container usage.
2017-08-25 13:54:10 +03:00
MassimilianoPinto
8927298abe MXS-1075: Avoid loops when missing binlog file is detected.
MXS-1075: Avoid loops when missing binlog file is detected.
2017-08-24 16:03:30 +02:00
Timofey Turenko
8a99997bdf add gnutls installation for Wheezy and and lzma-dev (#140) 2017-08-24 15:57:28 +03:00
Timofey Turenko
cbe878409a Fix kerberos test (#139)
* add 'maxscale' and 'node_xxx' names to /etc/hosts and add 'yum clean all'

* add forgotten 'node_xxx' names to /etc/hosts
2017-08-24 12:40:31 +03:00
Timofey Turenko
c794af1f47 Mxs 1355 (#138)
* add binlog test with gtid

* removing ;

* restore test to initial state with check_sha1()

* remove reset master

* make no_vm_revert true by dafault
2017-08-24 12:21:29 +03:00
MassimilianoPinto
8285801fa6 MXS-1344: Documentation update for MySQL Monitor and Binlog Server
MXS-1344: Documentation update for MySQL Monitor and Binlog Server
2017-08-24 09:14:34 +02:00
Johan Wikman
ad4e8dad94 MXS-1364 Drop the usage field
But for the most trivial statements did not really provide
useful information.

The arguments of the "function" '=' are now reported.
2017-08-24 09:58:18 +03:00
Johan Wikman
4c100a305e MXS-1364 Simplify grammar rules 2017-08-24 09:58:18 +03:00
Johan Wikman
bea56f40b2 MXS-1364 Disable irrelevant tests that do not pass 2017-08-24 09:58:18 +03:00
Johan Wikman
2d6ac6c682 MXS-1364 Collect columns referred to by group_concat 2017-08-24 09:58:18 +03:00
Johan Wikman
83ae19cd68 MXS-1364 Collect field usage of CASE and BETWEEN 2017-08-24 09:58:18 +03:00
Johan Wikman
72831c86ac DCBEVENTQ removed
No longer used for anything
2017-08-24 09:57:42 +03:00
Johan Wikman
11dffd0d93 Remove unused variables 2017-08-24 09:57:42 +03:00
Markus Mäkelä
64642a4d6d MXS-1346: Add new rule to dbfwfilter documentation
Added the new rule to the documentation and mentioned it in the release
notes.
2017-08-24 09:46:03 +03:00
Markus Mäkelä
c05bb3593a MXS-1346: Take the new query classifier features into use
The function usage by column is now used by the dbfwfilter. This finishes
the implementation of blocking function usage per column.
2017-08-24 09:46:03 +03:00
Markus Mäkelä
da74ebb959 Add error string helper function to dbfwfilter
The helper function is a wrapper for snprintf and strdup which removes
some of the redundant code in dbfwfilter.
2017-08-24 09:46:02 +03:00
Markus Mäkelä
ae2b9fd30d Fix hang with queries larger than 2^24 bytes
Readwritesplit didn't track multi-packet queries which resulted in them
being confused for pipelined queries.
2017-08-24 09:46:02 +03:00
Markus Mäkelä
2ef9fbc47a MXS-1346: Add uses_function type rule
The uses_function type rule matches when any of the columns given as
values uses a function. With this, columns can be denied from being used
with a function.
2017-08-24 09:46:02 +03:00
MassimilianoPinto
0aa1b8a4d0 MXS-1344: MySQL monitor detects MaxScale Binlog Server
If MaxScale Binlog Server is detected by MySQL monitor, then Server
status is ‘Relay Master, Running’ without ‘Slave’: this way Binlog
Server cannot be used by any statement routing.
Additionally SELECT for replication lag is skipped as well.
2017-08-23 14:11:17 +02:00