10410 Commits

Author SHA1 Message Date
Markus Mäkelä
09b6668064
Ignore cleanup failures in sharding_load_data
The dropping of the database should be done directly on all nodes, the
same way it was created.
2018-05-03 09:46:45 +03:00
Markus Mäkelä
3030799ae1
Fix GTID updating for slaves
The updating of GTIDs was only considered successful if both the current
GTID position and binlog GTID positions were non-empty. If a slave has no
binlogged events, the GTID update would always fail.

This change in behavior caused the mysqlmon_failover_auto and
mysqlmon_failver_manual tests to break. The test disabled the binary log
on one of the servers which caused it to be left out from the rejoining
process.
2018-05-03 09:46:45 +03:00
Markus Mäkelä
8ad3b903f9
Fix hang with large COM_STMT_SEND_LONG_DATA
The router did not take large packets into account when determining
whether the server will respond. This caused the response counts to be off
by one for all large packets.
2018-05-03 09:46:40 +03:00
Timofey Turenko
11e20f9cca Merge branch '2.1' of github.com:mariadb-corporation/MaxScale into 2.1 2018-05-02 11:33:13 +03:00
Johan Wikman
64d84cf1e0 Merge branch '2.2' into develop 2018-05-02 10:45:59 +03:00
Johan Wikman
8c9aa82a69 Merge branch '2.1' into 2.2 2018-05-02 10:40:24 +03:00
Johan Wikman
b8bba93f08 MXS-1839 Do not leak memory from maxinfo "show sessions"
When there is nothing more to show, the resultset user data
must be freed.
2018-05-02 10:37:03 +03:00
Johan Wikman
3d8c447b3a MXS-1836 Do not store pointer to data on the stack
First the resultset objects is created, then then the iteration
is done. Consequently, the user data cannot refer to anything
on the stack.
2018-05-02 10:23:07 +03:00
Johan Wikman
7876c3c70f MXS-1835 Turn all protocol modules into C++ 2018-05-02 09:54:37 +03:00
Johan Wikman
da16ba538d MXS-1834 Compile all monitors as C++ 2018-05-02 09:51:16 +03:00
Timofey Turenko
e2b9e95e63 add libedit-dev build dependency to DEB-builds 2018-04-30 14:13:41 +03:00
Markus Mäkelä
490d8c0963
Merge branch '2.2' into develop 2018-04-30 12:38:19 +03:00
Markus Mäkelä
2f8bb71a58
MXS-1507: Test resultset checksum functionality
The test verifies that different results returned by the replayed
transaction cause the replaying to be aborted.
2018-04-30 12:31:51 +03:00
Markus Mäkelä
1e700ab9ba
MXS-1832: Return 1 on failure
If MaxScale responds with an error, MaxCtrl now returns 1.
2018-04-30 09:46:26 +03:00
Niclas Antti
02b6cd7004 MXS-173 Initial version of throttle filter 2018-04-30 08:51:50 +03:00
Markus Mäkelä
cca39b910d
MXS-1837: Fix typo in REST API documentation
The documentation now has correct resource definitions for stopping and
starting services.
2018-04-30 06:27:04 +03:00
Markus Mäkelä
452f2190ae
MXS-1826: Handle Authswitch packet for COM_CHANGE_USER
If the server responds with a COM_CHANGE_USER to the default
authentication plugin, the backend protocol will answer correctly.
2018-04-29 10:42:12 +03:00
Niclas Antti
62a3dd664d MXS-1755 Warn about unknown global configuration entries.
MXS_WARNING for unknown entries. Later to become an error (in 2.4).
2018-04-27 18:41:01 +03:00
Markus Mäkelä
34aefa55c8
Remove write permissions on scripts
Accidental modifications of scripts/programs are more likely if the owner
has write permissions on the file. In addition, they are not required and
thus can be removed.
2018-04-27 18:15:19 +03:00
Markus Mäkelä
cfa599aea8
MXS-1833: Force all maxinfo traffic to the main thread
The same problem that caused maxadmin to lock up was also what caused
maxinfo to lock up. The concurrent access to the legacy administrative
functions caused deadlocks.
2018-04-27 12:38:43 +03:00
Markus Mäkelä
6cebe67374
MXS-1831: Add test case
Added test case that reproduces the problem and verifies that it is fixed.
2018-04-27 12:38:42 +03:00
Markus Mäkelä
bbe59732d8
MXS-1831: Return error on invalid monitor parameter
If a parameter that is not declared by the monitor is altered, an error is
returned instead of it being silently added to the monitor parameters.
2018-04-27 12:38:42 +03:00
Markus Mäkelä
39ca403ffa
Deprecate mysql51_replication
Added back mysql51_replication and deprecated it. This allows old
configurations to be gracefully upgraded to 2.3 versions.
2018-04-27 12:34:37 +03:00
Markus Mäkelä
fd2d22eba6
Allow module level parameter deprecation
Parameter deprecation on the module level means that the parameter should
no longer be used but using it will not cause an error. If a deprecated
parameter is used, it will be removed from the configuration.
2018-04-27 12:32:33 +03:00
Markus Mäkelä
96af90628f
Add notes about experimental modules
Added a note to the documentation of experimental modules that explains
that the modules are distributed in a different package.
2018-04-27 12:31:53 +03:00
Markus Mäkelä
8b09ec56cf
Add resultset helper function to mariadb_func.h
Added a function that converts resultsets into matrices of strings.
2018-04-27 12:31:52 +03:00
Markus Mäkelä
9ba9322b9b
MXS-1752: Make cat experimental
The cat router is now a part of the experimental module package.
2018-04-27 12:31:52 +03:00
Markus Mäkelä
84ec46d6f0
MXS-1752: Warn that module is not GA
The module is not GA quality software so a warning should be given in the
documentation.
2018-04-27 12:31:52 +03:00
Markus Mäkelä
2cfa66ff7d
MXS-1752: Clarify router behavior
Amended the documentation to specify the exact behavior of the router when
non-resultset results are returned.
2018-04-27 12:31:52 +03:00
Markus Mäkelä
88ae276dd6
MXS-1752: Fail if no connections were created
If no backend connections were created, the CatSession will not be
created.
2018-04-27 12:31:49 +03:00
Markus Mäkelä
6cd75cc31c
MXS-1752: Add cat documentation
Added documentation for the `cat` router.
2018-04-27 12:31:49 +03:00
Markus Mäkelä
89df068ed5
MXS-1752: Remove EOF packet generation
The creation of the EOF packet is not needed as the last packet of a
result set is always guaranteed to be of the correct type. This also
allows non-resultsets to be correctly processed as the internal packet
number will be at 0 when the last result arrives.

Cleaned up some of the function names and changed the signatures to be
better suited for their use-cases.

Use angle bracket includes, combine some of the more unwieldly
conditionals into functions, added more comments.
2018-04-27 12:31:49 +03:00
Markus Mäkelä
4966fb9e96
MXS-1752: Add prototype concatenation router
The router concatenates multiple result sets.
2018-04-27 12:31:48 +03:00
Markus Mäkelä
e01cfe0fba
Remove avrorouter deadlock
The avrorouter would attempt to enable the conversion task from within the
conversion task itself. This caused a deadlock which led to test failures.
2018-04-27 12:00:38 +03:00
Markus Mäkelä
59165b8dd5
Simplify housekeeper shutdown
The two-part shutdown procedure for the housekeeper was not needed and
caused problems if SIGINT wasn't raised. Since the main thread returns to
the main function, a single shutdown function is all that the housekeeper
needs to function.

Moved all the shutdown related code into Housekeeper::stop to remove the
waiting for the thread in the destructor.
2018-04-27 12:00:38 +03:00
Markus Mäkelä
df1fc49ac3
Add config parameter removal
Config parameters can now be removed. Grouped the related functions closer
to each other in config.cc.
2018-04-27 12:00:33 +03:00
Esa Korhonen
5d010ff712 Cleanup SERVER struct
Removed one unused field. Rearranged others, clarified comments.
2018-04-27 10:48:56 +03:00
Esa Korhonen
ba4700a983 MXS-1745 Remove unused fields
The binlog file and position are no longer used. Gtid_IO_Pos can fulfill
the same purpose if needed.
2018-04-27 10:48:56 +03:00
Esa Korhonen
de1e299f3f MXS-1745 Save all rows from SHOW ALL SLAVES STATUS
The master down verification through slaves won't work with this commit. It needs to be
redesigned to handle multiple slave connections or removed. Also, only the first row of
slave status data is used by the monitor, so multiple slave connections are still
incorrectly handled.
2018-04-27 10:48:45 +03:00
Johan Wikman
5f7257f432 MXS-1401 Add test cases
Test that an array of rules is parsed and used properly.
2018-04-27 09:22:17 +03:00
Johan Wikman
a3a8b5523e MXS-1401 Support multiple cache rules
The possibility to have multiple cache rules in a cache
configuration file is now handled throughout the cache
filter.

The major difference is that while you earlier directly
queried the Cache whether data should be stored to the
cache and whether data in the cache should be used, you
now query the Cache whether data should be stored to the
cache and, if so, get a CacheRules object from which you
subsequently query whether data from the cache should
be used.
2018-04-27 09:22:17 +03:00
Johan Wikman
605f771518 MXS-1401 Extend rule parsing to handle array of rule objects
It's now possible to have a rules file with an array of rule
objects, e.g.

  [
    {
      store: [ ... ],
      use: [ ... ]
    },
    {
      store: [ ... ],
      use: [ ... ]
    }
  ]

This commit only contains the low-level modifications for
supporting that; the upper-level modifications are made in
another commit.
2018-04-27 09:22:17 +03:00
Markus Mäkelä
880e0fb74e
Merge branch '2.2' into develop 2018-04-26 16:39:00 +03:00
Markus Mäkelä
6f80e11f1d
Fix sequence test
The test did not set SQL_MODE to ORACLE before using the Oracle syntax.
2018-04-26 16:02:09 +03:00
Markus Mäkelä
c97d2c94eb
MXS-1825: Fix PS output parameter tracking for MySQL variants
The resultset processing for MySQL requires some extra work as it lacks
the proper SERVER_MORE_RESULTS_EXIST flag in the last EOF packet. Instead,
the first EOF packet has the SERVER_PS_OUT_PARAMS flag which needs to be
interpreted as a SERVER_MORE_RESULTS_EXIST flag for the second EOF packet.

Also corrected the EOF packet handling to do the flag checks in the code
that deals with the EOF packets.

As the modutil_state parameter is now used for more than large packet
tracking, the correct solution is to store this state object in the
readwritesplit session instead of interpreting it to a boolean value.
2018-04-26 16:02:09 +03:00
Markus Mäkelä
260fcf85ec
Remove false debug assertion
A prepared statement ID of 0 is allowed.
2018-04-26 16:02:09 +03:00
Markus Mäkelä
a155d1085c
MXS-1824: Add test case
Added a test case that reproduces the problem and verifies that it is
fixed.
2018-04-26 16:02:09 +03:00
Markus Mäkelä
0df326d581
MXS-1824: Track only the opening of cursors
Whether a cursor is open or not does not matter as long as the attempt to
open a cursor is detected.
2018-04-26 16:02:09 +03:00
Johan Wikman
5c534acf6b MXS-1830 Remove erroneous free
The libdir is set elsewhere as well, which causes the set
buffer to be freed. Consequently it cannot be freed.
2018-04-26 15:46:51 +03:00
Johan Wikman
08230ef24c MXS-1830 Remove erroneous free
The libdir is set elsewhere as well, which causes the set
buffer to be freed. Consequently it cannot be freed.
2018-04-26 15:21:16 +03:00