Commit Graph

9853 Commits

Author SHA1 Message Date
fab8477c05 MXS-1776: Fix utility functions
The COM_STMT_FETCH command will create a response. This was a
readwritesplit-specific interpretation of the command and it was wrong.

Also record the currently executed command event for session commands.
2018-04-12 09:44:28 +03:00
ad5458f0e7 MXS-1776: Initialize RWBackend::m_command
The variable was not initialized which caused COM_CHANGE_USER to produce
unexpected behavior.
2018-04-12 09:43:38 +03:00
311adf817f MXS-1776: Handle recursive COM_STMT_EXECUTE commands
Readwritesplit would not handle multiple overlapping COM_STMT_EXECUTE
commands properly if they opened cursors. This was due to the fact that
the result would not be marked as complete and COM_STMT_FETCH commands
were executed as if they did not return results.

The correct implementation is to consider a COM_STMT_EXECUTE that opens a
cursor complete only when the first EOF packet is read (that is, when the
resultset header is read). This allows subsequent COM_STMT_FETCH commands
to be handled separately.

The separate COM_STMT_FETCH handling must count the number of packets that
are being fetched. This allows correct tracking of the state of a
COM_STMT_FETCH by checking that the number of packets is correct or the
second EOF/ERR packet is read.
2018-04-11 15:26:37 +03:00
252475cdc5 MXS-1776: Add test case
Added test case that reproduces the problem.
2018-04-11 15:13:20 +03:00
c0a3e6ba37 MXS-1773: Add test case
Added a test case that reproduces the problem and verifies that it is
fixed.
2018-04-11 09:45:13 +03:00
8e2208b957 Update limitations document
Removed old limitations from the document and cleaned up some of the text.
2018-04-11 09:25:29 +03:00
1eefb46e68 MXS-1773: Update internal state when LOAD DATA LOCAL INFILE fails
When a LOAD DATA LOCAL INFILE is actively rejected by the server, the
server sends an error to the client. This error was not detected and the
router was stuck in the special mode that handles LOAD DATA LOCAL INFILE.
2018-04-11 09:25:23 +03:00
e327282e82 Don't log warnings for valid SQL
The warnings are about what the parser expects, not something the end user
should know.
2018-04-10 21:39:46 +03:00
d28cf6b948 Merge branch '2.1' into 2.2 2018-04-10 15:27:20 +03:00
f94d1a9863 MXS-1767: Remove old debug assertion
The old assertion expected MaxScale to present the COMPRESS capability
which it doesn't support.
2018-04-10 15:24:57 +03:00
d22be5dd3e Fix build failure caused by merge from 2.1
The dcb->thread.id is dcb->poll.thread.id in 2.2.
2018-04-10 13:54:30 +03:00
fad4508fe2 Merge branch '2.1' into 2.2 2018-04-10 13:49:42 +03:00
b2ec8c95de MXS-1765: Cork query queue until server handshake is read
The internal client must not drain the query queue if the server handshake
has not yet been read.
2018-04-10 13:45:47 +03:00
1e3ab1fc7c MXS-1765: Update current command for KILL processing
The current command needs to be updated before the queries are actually
routed. This allows the KILL command detection and processing to correctly
work.
2018-04-10 13:45:47 +03:00
099219fa0f MXS-1767: Fix value assignment in ss_dassert
The value was updated for debug builds but not for release builds. This
caused debug builds to fail if special flags were requested.
2018-04-09 14:15:30 +03:00
cddf132d23 MXS-1762: Compare client IP when choosing a connection
When the connection pool is inspected, both the client username and IP
must match. This causes the pool to be partitioned by username and IP,
prevening unintentional sharing of connections between different users.
2018-04-09 13:21:18 +03:00
825d48fe05 MXS-1757: Fix build failure when libsnappy is installed
The Avro C API links against snappy if it is present on the system unless
SNAPPY_FOUND=N is defined. This is not exactly the cleanest way to disable
it but it is the only way to do it.
2018-04-04 19:43:47 +03:00
599f46ca7b Minor cleanup of different_size.cpp
Cleaned up the main testing function.
2018-04-04 19:43:47 +03:00
a2fcecd98f MXS-1743: Fix usage of both master and slave types
The use of `router_options=master,slave` was not working as expected. This
was mostly caused by the master bit checks using a bitwise AND instead of
comparing equality. In addition to this, the master would not be
considered a valid candidate if both slaves and masters were available.
2018-04-04 19:43:46 +03:00
4f8e1a99fc MXS-1743: Add test case
Added test case that reproduces the problem.
2018-04-04 19:43:46 +03:00
063aef09f6 Merge branch '2.1' into 2.2 2018-04-04 13:39:55 +03:00
45cc816b0f Update release date 2018-04-04 13:39:04 +03:00
6749c029ae Update Release Notes and ChangeLog
Also, the list of release notes have been removed from the upgrading
document. The referral to the ChangeLog remains. That way, the list
of release notes need not be maintained in several places.
2018-04-04 13:38:43 +03:00
d07d9d59df Update release date 2018-04-04 13:30:15 +03:00
d375733580 Update Release Notes and ChangeLog
Also, the list of release notes have been removed from the upgrading
document. The referral to the ChangeLog remains. That way, the list
of release notes need not be maintained in several places.
2018-04-03 14:15:22 +03:00
9291815bcd Wait for monitor to start in mxs1719
The test starts MaxScale and immediately connects to it. As the monitoring
is asynchronous, we need to give it a few seconds to stabilize.
2018-04-03 10:59:55 +03:00
f743e99795 Set internal DCB to NULL on close
The Backend::dcb() method gives the raw pointer to the internal DCB. This
pointer is used by at least readwritesplit to map raw DCB pointers to
backends. To prevent stale pointers from being returned, m_dcb needs to be
set to NULL after it has been closed.
2018-04-03 10:59:55 +03:00
177e3251ad Clarify retain_last_statements documentation
Added an explicit note about usage of the retain_last_statements parameter
and that it requires dump_last_statements to work.
2018-04-03 10:59:52 +03:00
4167e88719 MXS-1751: Fix crash with available_when_donor=true
The `MYSQL_ROW row` variable was being overwritten by the extra query done
by the SST method detection code. Moving it into its own function prevents
this and makes the code significantly easier to comprehend.

Added a test case that reproduced the problem (MaxScale crashed) and
verifies that the patch fixes the problem.
2018-03-31 20:21:07 +03:00
b11fb53b95 Merge branch '2.2' of github.com:mariadb-corporation/MaxScale into 2.2 2018-03-29 15:51:52 +03:00
fa41ca28e2 remove trailing whitespaces from MDBCI scripts 2018-03-29 15:51:36 +03:00
01b04094a6 Only check for cores at root level
The previous core check would pick up any file in /tmp/ that would start
with the `core` prefix. This included some npm generated files which are
created if MaxCtrl is built on the MaxScale machine.
2018-03-29 14:25:19 +03:00
7be55a77bb add several attempts to connect in upgrade test 2018-03-29 14:16:26 +03:00
3d92042362 Merge branch '2.2.4' into 2.2 2018-03-29 13:01:58 +03:00
bd77de118f Add missing documentation link 2018-03-29 12:56:45 +03:00
eca77fb4c9 Improve core dump detection
The core dump detection now properly distinguishes core dumps and ssh
failures.
2018-03-28 16:50:27 +03:00
6d4691617c Update 2.2.4 release date. 2018-03-28 13:17:55 +03:00
b51e6d4030 Update 2.2.4 release date. 2018-03-28 13:13:17 +03:00
7209080236 MXS-1747 Improve error messages of rejoin operations
Now states which query caused the error.
2018-03-28 12:39:10 +03:00
6c32c7421b MXS-1746 Query global gtid_domain_id instead of session-specific value
The monitor queried the session-specific domain id, which does not follow the global
value while the session is alive. This caused the monitor to follow the wrong gtid
domain if the domain was changed after MaxScale was started. This patch modifies the
query to read the global value instead. Even this is not fool-proof, as existing
sessions can issue writes with the old domain, confusing the gtid-parsing.
2018-03-28 12:23:57 +03:00
3be2ee8b28 Merge branch '2.1' into 2.2 2018-03-28 09:19:22 +03:00
7df28f330b Update ChangeLog and Release Notes 2018-03-27 13:58:01 +03:00
e921298af9 add Maxscale stop into test init procedure 2018-03-27 12:58:05 +03:00
de768469b9 Fix hanging of mxs1585
The test appears to hang when the `SET sql_log_bin = 0` statement is
executed. Removing this seems to fix it and is OK as that's not what the
test aims to check.
2018-03-27 11:50:30 +03:00
be0587e195 MXS-1734 Add documentation
And update the release notes.
2018-03-27 09:35:35 +03:00
4b282920ae MXS-1734 Remove command line flag retain-last-statements
From a practical perspective it makes no relevant difference
whether you have to add an entry to the config file and restart
maxscale or if you have to restart maxscale and provide a specific
command line, so better to provide just either possiblity.

More important would be to provide a way for turning this feature
on and off at runtime.
2018-03-27 09:35:35 +03:00
3d45d452eb MXS-1734 Add possibility to instruct when to dump statements
With the configuration entry

dump_last_statements=[never|on_close|on_error]

you can now specify when and if to dump the last statements
of of a session.
2018-03-27 09:35:35 +03:00
6d599395d4 MXS-1734 Add statement dumping mechanism
With the configuration entry

   retain_last_statements=<unsigned>

or the debug flag '--debug=retain-last-statements=<unsigned>',
MaxScale will store the specified number of last statements
for each session. By calling

    session_dump_statements(session);

MaxScale will dump the last statements as NOTICE messages.
For debugging purposes.
2018-03-27 09:35:35 +03:00
6e859fcf02 Merge branch '2.1' into 2.2 2018-03-27 07:25:00 +03:00
801d7ccdc7 Add sleep to pers_02
Adding a short sleep before the second attempt at connection creation is
done seems to significantly improve the reliability of the test.
2018-03-27 07:24:30 +03:00