5596 Commits

Author SHA1 Message Date
Markus Makela
40ffc10120 Merged documentation changes
Merged the documentation changes between the 1.4.1 and 1.4.2 releases from
MaxScale-Documentation.
2016-04-25 14:19:56 +03:00
Markus Makela
3046b4a46e Fatal errors are always printed to stdout
The daemon mode no longer controls which error messages are printed to stdout.
This will allow easier detection of configuration and other errors in MaxScale.
2016-04-25 11:12:02 +03:00
Markus Makela
7f18c579a4 MXS-684: Service permission checks use correct column names
The MySQL 5.7 `authentication_string` column caused all permission checks
to fail for services.
2016-04-25 11:08:45 +03:00
Johan Wikman
53fecdec6b qc_mysqlembedded: Return the actual name and not as-name
item->name contains the "final" name that due to the use of  AS can
be different than the actual name. Via item->full_name() we can get
hold of the actual name.
2016-04-22 08:45:38 +03:00
Johan Wikman
7b53f44ce3 qc_mysqlembedded: Look at all conditional items 2016-04-21 20:56:29 +03:00
Markus Makela
7bc7f2561b MXS-681: MySQL 5.7 user retrieval fails
The authentication query was truncated which caused errors on MySQL 5.7 when
the root user was not used in the usercount query.
2016-04-21 17:24:30 +03:00
Johan Wikman
d5d0547a57 MXS-680: qc_mysqlembedded does not look into functions
qc_mysqlembedded does not look into functions when collecting
the affected fields of a query. Therefore the affected fields
of a query like

    SELECT concat(a, "", "") from X where b = 1;

will be "b" and not "a b" as it should be.
2016-04-21 13:35:50 +03:00
Johan Wikman
eb1a30e9ac MXS-679: Correctly collect fields of WHERE
qc_mysqlembedded used Item::next for traversing the fields of WHERE.
That is not correct as next is not intended for that purpose:

  /**
     Intrusive list pointer for free list. If not null, points to the next
     Item on some Query_arena's free list. For instance, stored procedures
     have their own Query_arena's.

     @see Query_arena::free_list
   */
  Item *next;

In pratice this meant that the fields in the SELECT part were reported
twice and that, depending on the query, all fields of WHERE were *not*
reported. For instance, the result for

    SELECT a from X WHERE b = 1 and c = 2;

would correctly be "a b c" (in fact, it would be "a b c a"), but
the result for

    SELECT a from X WHERE b = 1 and c = 2 and d = 3;

would also be "a b c".
2016-04-21 13:35:32 +03:00
Markus Makela
9224249ae5 Incremented version number
The version is now set to 1.4.2.
2016-04-18 09:53:55 +03:00
Markus Makela
3f99be54e7 Transaction safety is again disabled by default
The transaction safety was enabled due to a merge. The feature should be
disabled for the 1.4 releases.
2016-04-16 07:45:15 +03:00
Markus Makela
a59bece943 MXS-661: Only COM_QUERY packets are parsed
Parsing on non-COM_QUERY packets caused errors in the parsing of the
queries. Only valid packets should be parsed.
2016-04-15 11:36:40 +03:00
Markus Makela
fb6b3e6702 MXS-656: Galera nodes with index 0 can be master again
The index calculation falsely ignored nodes with node index 0 when errno
was non-zero.
2016-04-15 11:35:53 +03:00
Markus Makela
bda0c0b013 Fixed dbfwfilter rule parser build failure
The rule parser used old log manager initialization calls
and looked for the source files in the wrong place.
2016-04-15 11:35:00 +03:00
Markus Makela
b683a5dcf4 Fixed typo in dbfwfilter's CMakeLists.txt
`mesage` was used instead of `message`.
2016-04-15 11:34:08 +03:00
Markus Makela
affba3cd65 Merge branch '1.2.1-binlog_router_trx' into release-1.4.2 2016-04-15 11:15:01 +03:00
Markus Makela
2855389fe2 Non-critical errors in binlogrouter are now properly logged as warnings
The event distribution error messages were not truly errors but only rare
corner cases that usually don't happen. This doesn't mean that they should
be treated as errors and treating them as warnings is more helpful.
2016-04-15 10:37:21 +03:00
Markus Makela
aabcc4fb12 Added clarifying comments to event distribution code
When a slave transitions from catchup mode to up-to-date mode, it is possible
that events are being distributed and the slave appears to be lagging behind.
The added comment explain why it happens and how it is handled to make the code
clearer.
2016-04-15 10:18:50 +03:00
Markus Makela
312c825b4e Added client IP address to authentication error messages
Client authentication problems are easier to solve when the client IP is logged
in case a failed authentication attempt is made. This will also make it easier
to detect possible security problems.
2016-04-14 20:55:08 +03:00
Markus Makela
a0d027a513 MXS-621: Message logged before the log manager is initialized are now properly logged
The log manager wasn't initialized implicitly when a log message was written.
This caused all logged messages to be ignored before the log manager was
initialized.
2016-04-14 19:31:16 +03:00
Markus Makela
1fc27b39af MXS-662: Service protocol check no longer ignores bind
The address of a listener was ignored when service protocols were compared.
2016-04-14 19:04:54 +03:00
Markus Makela
25f4238231 Merge branch '1.2.1-binlog_router_trx' into release-1.4.2 2016-04-14 18:52:36 +03:00
Markus Makela
edb1c18e83 Added missing check for error packets
A missing else branch caused the binlogrouter to crash when it
requests non-existent binlog file.
2016-04-14 17:51:42 +03:00
Markus Makela
bb2d549a00 Slaves that are behind the master no longer cause an error to be logged
When a slave transitions from catchup mode to up-to-date mode, an error
message is logged because the slave is at an unexpected position. This
error message should not be logged because it is a possible and an expected
situation.
2016-04-14 12:01:02 +03:00
Markus Makela
6988c0bfed Fixed rotate events never being distributed
The check for rotate event conditions was wrong which led to false error
message about unexpected binlog file and position combinations.

The position of the last event was reset every time a file was opened which
caused problems when the binlog file was rotated. The slave's current positions
were compared to the position where the last event started and because the
last_event_pos variable didn't point to the rotate event of the previous binlog,
the slave's never got the rotate event.
2016-04-14 11:02:03 +03:00
Markus Makela
440bc049c0 Added more information to binlogrouter error messages
The name of the binlog file was added to the log message where a slave
is behind the master but the same file is used. This makes debugging the problem
a bit easier.
2016-04-14 11:02:03 +03:00
Markus Makela
df9f8eba82 Improved binlogrouter event distribution error messages
Added master position and current safe event to log messages about unexpected
slave binlog file positions.
2016-04-14 11:02:03 +03:00
MassimilianoPinto
335b1e095f Added master pos to log message
Added master pos to log message
2016-04-14 11:02:03 +03:00
Markus Makela
52ef8987cb Made sending of events more strict
The decision to send an event to a slave can now only be made in one place.
This will force all events to pass the same checks before they are sent to
the slaves.
2016-04-14 11:02:03 +03:00
Markus Makela
aa7e3461c8 Fixed event position updating
The position of the next event to be written was used as the position
of the current event. This caused the checks for the position of the current
safe event to fail and the non-transaction safe version was used.

This only happened with events that are not done inside a transaction i.e.
DDL statements.
2016-04-14 11:02:03 +03:00
Markus Makela
cf62ac0e6c Added more information to the incomplete transaction error message
The error message now logs the caller role, current safe event and the event
type.
2016-04-14 11:02:01 +03:00
Markus Makela
fe84f9599b Removed messages about incomplete transaction events
The message is logged when a DDL statement is executed. It should not be
logged if trx_safe is on since the current_safe_event should always point
at the event we are sending. The current_safe_event is set to the wrong value
which causes this message to be logged.

Due to the false positives caused by this, the message is removed.
2016-04-07 12:51:38 +03:00
Markus Makela
bb94ffb9ea Added more information to duplicate event error message
The message now states the location where it was called from and the amount
of events received from the master. In addition to this, new logging was
added when unsafe events are sent to slaves when transaction safety is enabled.
2016-04-06 17:30:25 +03:00
Markus Makela
0ce48474eb Added logging for safe event and current event mismatch
If the position being currently processed is not the current safe event,
a log message is written.
2016-04-05 16:57:39 +03:00
Markus Makela
ed9356562c Added DCB write queue to error message
The duplicate event error message now logs the length of the slave's
write queue. This will tell how much data is still buffered inside MaxScale
when duplicate events are detected.
2016-04-05 15:01:30 +03:00
Johan Wikman
0493196ecc Disconnect slave if duplicate event detected
If a duplicate event is detected the state of the slave is set
to BLRS_ERRORED and the connection is closed. That way the
duplicate event will not break the slave, and it will pick
up its state when it reconnects.
2016-03-31 10:57:23 +03:00
Johan Wikman
51e60000dd Add duplicate event detection & logging.
When an event is sent to a slave, we store information about the
event and who sent it, so that we can detect if the same event is
sent twice. If a duplicate event is detected, we log information
about it.
2016-03-31 10:50:47 +03:00
Markus Makela
5219e94af7 Removed beta from MaxScale version string
MaxScale 1.4.1 is a GA release.
2016-03-29 09:38:38 +03:00
Markus Makela
89e71717c9 Added a note about PCRE2 in the dbfwfilter documentation
The syntax of the regular expression was not clearly stated.
2016-03-24 09:43:50 +02:00
Johan Wikman
74df62f352 Update 1.4.1 Upgrading 2016-03-23 19:07:25 +02:00
Johan Wikman
57301af9ce Add 1.4.1 ChangeLog 2016-03-23 19:02:47 +02:00
Johan Wikman
7c5c365a84 Add 1.4.1 release notes 2016-03-23 17:45:30 +02:00
Johan Wikman
d85598d342 Update VERSION 2016-03-23 14:16:28 +02:00
Markus Makela
3c8bba26c9 MXS-646: Namedserverfilter ignores user and source
The namedserverfilter did not check if it was active for the session
before adding a routing hint to it.
2016-03-23 14:00:55 +02:00
Markus Makela
80807097b1 Added notes about default values to ReadWriteSplit documentation
Not all default values were stated.
2016-03-23 14:00:55 +02:00
Markus Makela
4defd5df74 Added missing default value documentation.
The auth_*_timeout value defaults were not documented.
2016-03-23 09:46:54 +02:00
Johan Wikman
8ced59c48e Merge commit 'd5af608fe58ff9ed8f77021424708ae8a71fc53c' into release-1.4.1
Pulled updates from MaxScale-Documentation.
2016-03-23 09:44:34 +02:00
Markus Makela
e445bb981e Added missing check for SELECT privilege on mysql.tables_priv
The service permission checks did not check for SELECT privileges on
mysql.tables_priv which caused confusing error messages. The database
grant erros also did not log the MySQL error message which is often very
helpful when resolving permission errors.
2016-03-22 08:08:46 +02:00
Markus Makela
d71d088c00 MXS-630: Added missing tables_priv documentation
The new requirements were not documented in the upgrading document.
2016-03-21 21:45:33 +02:00
Markus Makela
f0e6748949 Added missing pathname prefix
The postinst script was looking for Nagios files in the wrong directory.
2016-03-21 16:28:20 +02:00
Markus Makela
19016f4a9b Removed false debug assertion in readwritesplit
The readwritesplit assumed that the execution of a session command would
always succeed. This is not the case when a write to the backend server
fails and it is not something that shouldn't happen.
2016-03-21 14:04:13 +02:00