Commit Graph

9936 Commits

Author SHA1 Message Date
dbbd0e957a MXS-1852: Close partially connected DCBs if killed
If a connection is killed but the backend DCBs have not yet received their
thread IDs, the connections can be forcibly closed. This removes the
possibility of stale connections caused by an unfortunately timed KILL
query to a session that has partially connected to some servers.
2018-05-10 14:05:55 +03:00
39789c19d3 MXS-1856 Do not set read_only OFF if join_cluster() fails
This could in some cases leave read_only OFF even if the target slave
begins replication.
2018-05-08 13:56:57 +03:00
7ede6b321c Merge branch '2.1' into 2.2 2018-05-08 13:35:08 +03:00
bcbb823ab3 MXS-1772 Document netmask limitations
Only mentioned in the MySQL authenticator section, although the limitation
is likely in all authenticators.
2018-05-07 16:37:43 +03:00
689c02d301 Send error on reauthentication failure
When the reauthentication of a client fails, the correct error should be
sent.
2018-05-07 09:57:09 +03:00
43cfa5eab5 Fix TSV output in MaxCtrl
The output in --tsv mode could break the TSV format if newlines or tabs
were included in the data.
2018-05-07 09:57:08 +03:00
2bb6c84be0 MXS-1847: Return value length in server_get_parameter
Returning the length of the value instead of a boolean allows the user to
know when the parameter value exceeded the buffer size passed as the
parameter.
2018-05-04 10:16:31 +03:00
8b5221e13a Fix error message when no command is given
The error message when no commad was given referred to the unknown command
[""]. Due to the way the command was printed, it was quite confusing.
2018-05-03 10:48:32 +03:00
42c468ff16 MXS-1847: Make server parameter updates atomic
The updates to server parameters are now performed in an atomic manner.
2018-05-03 09:50:52 +03:00
612b4e1a32 MXS-1847: Fix server_get_parameter
The function now takes an output buffer as a parameter. This prevents race
conditions by copying the parameter value into a local buffer.
2018-05-03 09:50:52 +03:00
e311b86800 MXS-1826: Respond with AuthSwitchRequest to COM_CHANGE_USER
To support a wider range of client connectors, MaxScale should respond
with an AuthSwitchRequest packet to all COM_CHANGE_USER commands. Only
MariaDB connectors understand the OK packet as the only response to a
COM_CHANGE_USER but all connectors understand the AuthSwitchRequest
packet.
2018-05-03 09:50:52 +03:00
66d7281d97 MXS-1846: Send correct packet number in errors
The mysql_create_standard_error function accepted a packet number as a
parameter but did not use it as the actual packet number. As the value it
used happened to coincide with 50% of the use-cases, it went unnoticed.

The remaining 50% occurred when a KILL command was executed with an
unknown connection ID.
2018-05-03 09:50:51 +03:00
e10b62e246 Add package-lock.json to maxctrl
The npm package-lock.json file locks down the dependencies to certain
versions.
2018-05-03 09:50:46 +03:00
bc21a28741 Add sum helper to api command
Calculating sums for values is useful for monitoring and scripting
purposes.
2018-05-03 09:50:45 +03:00
121d255780 Add protocol packet statistics to servers
The individual servers were missing a statistic that would give an
estimated query count. As there is no simple way to count queries for all
modules, counting the number of routed protocol packets is a suitable
substitute.
2018-05-03 09:50:45 +03:00
11e20f9cca Merge branch '2.1' of github.com:mariadb-corporation/MaxScale into 2.1 2018-05-02 11:33:13 +03:00
8c9aa82a69 Merge branch '2.1' into 2.2 2018-05-02 10:40:24 +03:00
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
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
e2b9e95e63 add libedit-dev build dependency to DEB-builds 2018-04-30 14:13:41 +03:00
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
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
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
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
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
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
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
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
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
260fcf85ec Remove false debug assertion
A prepared statement ID of 0 is allowed.
2018-04-26 16:02:09 +03:00
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
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
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
9cf44b3092 MXS-1829 Recognise PREVIOUS in addition to NEXT
Earlier only "SELECT NEXT VALUE FOR SEQ" was parsed
properly, while "SELECT PREVIOUS VALUE FOR SEQ" was not.
Now the latter statement is also parsed properly.
2018-04-26 13:14:23 +03:00
b2cc9e5107 MXS-1829 Add test that reveals problem 2018-04-26 12:44:30 +03:00
510ce38680 Update 2.2 version number in minor branch 2018-04-25 11:07:55 +03:00
dee40a58f4 Update release date 2018-04-25 10:57:49 +03:00
d9e69413b4 Update MaxScale version
Updated version to 2.2.5.
2018-04-24 23:18:19 +03:00
084c963081 MXS-1639 Update 2.2.5 release notes 2018-04-24 14:36:54 +03:00
c221e71582 Merge branch '2.1' into 2.2 2018-04-24 14:31:22 +03:00
b401f83e10 Update 2.2.5 release notes 2018-04-24 13:52:26 +03:00
2a38902aa6 MXS-1639 Discard results when executing sql text files
This removes the limitation of not returning resultsets.
2018-04-24 13:21:44 +03:00
fa7cd9450a MXS-1639 Do not run demote_sql_file if the server already has a slave connection
In this case, the server was already a slave and is not being demoted. Also, the file may
contain queries which cannot be ran while a slave connection is running.
2018-04-24 13:21:44 +03:00
2aeed3ffab MXS-1639 Add documentation on promotion/demotion sql files 2018-04-24 13:21:44 +03:00
5dbdb8af8a Update 2.1.17 release notes. 2018-04-24 13:05:20 +03:00
5cf56c7c0f Merge branch '2.1' into 2.2 2018-04-24 12:39:22 +03:00
bafe8f5eeb MXS-1618 Use right type for the return value of getopt_long
getopt_long returns an 'int'. If 'char' is used on a big-endian
platform you'll end up with an infinite loop.
2018-04-24 12:31:08 +03:00
e81dd4ab24 Update 2.2.5 release notes 2018-04-24 10:33:19 +03:00
e0544c5d9c Update 2.2.5 release notes and change log 2018-04-24 10:18:19 +03:00
54b7dee0b0 Add release notes for 2.1.17
Update Changelog as well.
2018-04-24 10:18:19 +03:00