Commit Graph

10335 Commits

Author SHA1 Message Date
6d00dbfc92 Fix mxs2043_select_for_update
Explicitly define the host of the user being created and sync
replication after it.
2018-10-19 15:18:16 +03:00
f8cf5053bd MXS-2103: Fix CREATE TEMPORARY TABLE detection
The table creation was not detected as the function used to extract the
table name did not return the fully qualified names. Even if it did return
a fully qualified name, it wouldn't have been correctly processed.
2018-10-18 20:26:58 +03:00
457d0c21dd Document error code and SQL state for blocked queries
If the dbfwfilter blocks a query a specific error is returned. This was
not documented and is needed to detect errors sent by the filter.
2018-10-18 02:02:14 +03:00
230345c98c Fix on_queries documentation
The combination of values was not documented.
2018-10-18 02:02:14 +03:00
c3cd119454 Speed up mm test
The test did not use the wait_for_monitor function to sync with the
monitor. This function speeds up the testing greatly by removing
unnecessary sleeps from it.

Also reduced the amount of data inserted into the cluster. There's no real
need to test with large amounts of data as it is only a functional test.
2018-10-16 11:06:06 +03:00
92057f6ff9 Add more logging to readwritesplit
When a read-only transaction fails due to a connection error, no message
would be logged. Also added an info level message for the case when a
backend connection would get closed before the session is in the correct
state and a debug assertion that the router session should never be closed
when the handleError method is called.
2018-10-16 11:04:57 +03:00
de653437b2 Document server priority behavior
If all of the candidate servers have the same priority, the server that is
first listed in the servers parameter is chosen.
2018-10-16 11:04:57 +03:00
0a04cb2d48 Clarify namedserverfilter documentation
The example configuration had wrong server names.
2018-10-09 13:42:56 +03:00
74effa6e7f MXS-2054: Add test case
Add test case that emulates a hybrid cluster of MariaDB and ColumnStore
instances.
2018-10-04 10:52:40 +03:00
321435b80e Fix mysqlmon log copying
The backup file required superuser permissions.
2018-10-03 12:46:54 +03:00
dad4f55ee6 Save output of mysqlmon tests
Before the tests truncate the log, it can be copied to a backup file. This
allows the whole log to be inspected after the test is complete.
2018-10-02 09:44:02 +03:00
288fbc8c33 MXS-2075: Only enable stdout redirection for maxscale
The stdout redirection must not be enabled for the other programs as they
are not run as daemon processes.
2018-10-02 09:44:02 +03:00
048aee1fb7 Print output of failed Travis tests
If a unit test fails, print the output.
2018-10-02 09:44:02 +03:00
79d1eb19d7 Disable unit test leak checks for DEB packages
The unit tests themselves don't leak memory but some of the core
components of MaxScale do. To ignore this, ASAN_OPTIONS needs to be
defined.
2018-10-02 09:44:02 +03:00
62e5f988c5 MXS-2075: Redirect stdout and stderr to the log
If the log file is successfully opened, both stdout and stderr are
redirected to it. This helps catch ASAN reports without having to read the
system journal files.

As the output is redirected to a file, some of the output was made visible
only in non-daemon mode. This helps keep the log file clean and readable.
2018-10-02 09:44:02 +03:00
3fd0c2c407 Stop timeout during slave sync 2018-10-02 09:44:01 +03:00
7b5985d6be Add missing connect to mxs682_cyrillic
The connections were used without connecting.
2018-10-02 09:44:01 +03:00
c7fc00b3d8 Shorten mxs812_1
Three iterations should be adequate for most cases.
2018-10-02 09:44:01 +03:00
d87d462c76 MXS-2049: Update GSSAPI documentation
Corrected the documentation and provided more details on how to configure
the authenticator.
2018-10-02 09:44:01 +03:00
f65c890287 MXS-2049: Forward client credentials to backend server
Instead of requesting another set of credentials, the client credentials
are simply forwarded to the backend MariaDB server.
2018-10-02 09:44:01 +03:00
93d866c6a7 MXS-2073: Add missing TCP_NODELAY for client sockets
The client connections had the Nagle algorithm enabled which could cause
bad performance with smaller workloads. The common network configuration
code in utils.cc, currently used by the backend connections, sets it
properly.
2018-10-02 09:44:00 +03:00
ee45900648 Remove network variable export file after use
Otherwise the file is left in the current working directory.
2018-10-02 09:44:00 +03:00
809ab487b2 Update version number for 2.2 2018-10-01 13:13:40 +03:00
c58a461f87 Merge branch '2.2.15' into 2.2 2018-10-01 13:10:05 +03:00
03137428fa Update 2.2.15 release date
And add missing link in change log.
2018-10-01 13:01:56 +03:00
ceb763c9be Fix buffer size in cache rules
If a database, table and a column was defined, the null terminating
character would be written past the end of the buffer.
2018-09-30 22:35:13 +03:00
4554bd1743 Cherry-pick: Fix ASAN problems
Cherry-picking the commit from develop since it's also needed for 2.2.

FindASAN did not look for so version 5 and TSAN referred to ASAN. Disable
leak checks for unit tests as some objects always leak, namely servers.
2018-09-30 20:12:35 +03:00
104a6d1bfb Explicitly link against ASAN libraries
Some systems (Ubuntu Trusty) require explicit linking against ASAN
libraries.
2018-09-28 11:05:51 +03:00
5b644a785b Refactor mxs682_cyrillic
Use stack allocated objects and do general cleanup. Increased timeouts to
be a bit more forgiving.
2018-09-28 09:24:48 +03:00
afd3eae65b Add more output to mxs1743_rconn_bitmask
The test times out but it doesn't tell where it times out.
2018-09-28 09:15:02 +03:00
62ce6c15dc Add 2.2.15 release note and update change log 2018-09-27 10:35:43 +03:00
6e380d541b MXS-2043 Add system test 2018-09-27 10:17:47 +03:00
2aca6226d9 MXS-2043 Classify SELECT ... FOR UPDATE as QUERY_TYPE_WRITE
SELECT...FOR UPDATE locks the rows for update, but only if
autocommit==0 or a transaction is active, so in principle even if
it were classified as READ it'd still be sent to master when it
actually matters.

However, even if autocommit==1 and/or no transaction is active, a
slave in read only mode will reject the statement if the user is
subject to the read only restriction (a user with super privileges
is not), which might be considered a server bug. By classifying the
statement as a write, it'll be sent to master and always succeed.
2018-09-27 10:17:47 +03:00
743daa5755 MXS-2043 Create test that exposes problem
A statement like

    SELECT a FROM tbl FOR UPDATE;

should be classified like QUERY_TYPE_WRITE so as to be sent
to master.
2018-09-27 10:17:47 +03:00
e73301ad71 Update NPM packages
Updated packages for MaxCtrl and the REST API tests.
2018-09-26 11:08:24 +03:00
32fbd59f85 Add ASAN options into systemd service files
By default ASAN only reports the errors and doesn't cause the program to
crash. By forcing a SIGABRT, the process will generate a core dump which
causes the test to fail.

Although the act of placing environment variables inside the systemd
service file might seem intrusive, they have no effect on non-ASAN
builds. This appears to be the most convenient and straightforward way of
changing ASAN behavior for testing.
2018-09-26 11:08:23 +03:00
7d2a5b2c13 Fix readwritesplit debug assertion
The debug assertion is wrong as the code was changed to prioritize hints
over the router target selection. Also removed the superficial check for
master, slave and relay master states as they are implied by the fact that
the connection is in use.
2018-09-26 11:08:23 +03:00
1a41f1a8e2 Add more timeouts to mxs1743_rconn_bitmask
The test timed out on a few test runs which means that there is a problem
in the areas where timeouts weren't present.
2018-09-26 11:08:12 +03:00
e54a44d56a Extend MDEV-13453 workaround explanations
The example SQL now shows the extra grant required for 10.2 versions. Also
removed duplicate user creation examples from the tutorials.
2018-09-26 09:39:59 +03:00
e5739c4e00 Merge branch '2.1' into 2.2 2018-09-25 22:29:41 +03:00
6d9d046bcf MXS-2051: Remove REST API from 2.1 2018-09-25 13:59:58 +03:00
d55c07dc2e MXS-2066: Reset resultset collection by default
The collection of resultsets needs to be disabled by default when a
response is received to cover the cases where an error is returned.

The collection of results should also not be set for queries that do not
generate any responses.
2018-09-21 11:14:45 +03:00
60915f847f MXS-2064: Log workaround for grant problems with MariaDB 10.2.10
When the 10.2 users query is executed with a MariaDB server older than
10.2.11, the query will fail due to inadequate grants on the 'users' table
generated as a part of the CTE. To work around the issue, a SELECT grant
on the whole mysql database is required. Logging the server where the
query fails also helps resolve the problem by pointing out where the grant
needs to be added.
2018-09-21 11:14:45 +03:00
e888bcac3b MXS-2045: Update avrorouter tutorial
Removed unnecessary sections and updated some of the text to be more
specific. Expanded the explanations on where the replication starts and
how the avrorouter needs to be configured. Added example output from the
cdc.py client and removed the relatively useless maxavrocheck section.
2018-09-21 11:14:45 +03:00
1689fe7f48 Update user documentation
The documentation mentions a bug in MariaDB 10.2.9 that causes problems
with the new users query.
2018-09-20 13:04:54 +03:00
8c2f6aafcc MXS-2060: Load users from only valid servers
Users should only be loaded from a server if it is running and not in
maintenance.
2018-09-19 20:32:39 +03:00
40c4614ed1 Update mocha
Updated mocha to latest version for maxctrl and REST API test suites.
2018-09-19 20:32:39 +03:00
800c9e1c9e Backport NPM test fixes
Backported to 2.2.
2018-09-19 20:32:39 +03:00
f29d3d5588 MXS-2055: Fix monitor REST API documentation
Fixed the endpoint documentation.
2018-09-19 20:32:39 +03:00
8a3376767a use different server id for Galera test nodes 2018-09-19 15:03:48 +03:00