Commit Graph

10447 Commits

Author SHA1 Message Date
ceb4a18f59 Enable query_retries for mxs1961_standalone_rejoin
This should help prevent network disconnections and make the test more
stable. If the connection is lost, the automatic failover is disabled and
the test will fail.
2018-10-30 18:43:37 +02:00
d972c1cd37 Fix replication before syncing slaves in mxs1743_rconn_bitmask
This might help solve the problem where the test hangs when the slaves are
synced.
2018-10-30 18:43:37 +02:00
471cd8f0ef Increase timeouts for mxs431
The test appears to have timed out a few times when creating the
databases.
2018-10-30 18:43:37 +02:00
31859ee486 Remove ses_bigmem test
The test doesn't work when ASAN is used as it increases the memory use of
the process. With the addition of more caches in 2.3, the test is also
more likely to fail. Due to the test being quite useless with ASAN, it is
better to remove it.
2018-10-30 18:43:37 +02:00
ec69a52c1e Update 2.2 release notes and change log 2018-10-30 14:22:20 +02:00
91c5f8580c MXS-2119: Fix file permissions
The admin files are now created with 640 permissions and automatically
created directories now properly set the permissions for the group as
well. All files and directories created by avrorouter and binlogrouter
also now correctly limit the read and write permissions only to the owner
and the group.
2018-10-30 12:45:36 +02:00
eb10b723dd MXS-2117: Fall back to old style query with 10.2.11
If a 10.2.11 or older server without a grant on all mysql tables is found,
the authenticator now falls back to the 10.1 behavior that uses subqueries
instead of CTEs. This is a more user friendly way of working around
MDEV-13453 that causes the problem as all functionality except the support
for composite roles is retained.
2018-10-30 12:45:36 +02:00
93b9ed744f MXS-2111: Use authentication_string when password is empty
If the password field in mysql.user is empty, it is possible that the
actual password is stored in the authentication_string field. Most of the
time this happens due to MDEV-16774 which causes the password to be stored
in the authentication_string field.

Also added a test case that verifies the problem and that it is fixed by
this commit.
2018-10-30 12:45:36 +02:00
2594a0d913 Improve detection of problems caused by MDEV-13453
Instead of looking at the server version, the actual error message should
be inspected. This guarantees that the correct error message is logged
even with custom builds.
2018-10-30 12:45:36 +02:00
7e21e3aedd MXS-2115: Fix handshake version string
The intention was to send the lowest backend version string automatically
to the client instead of the default handshake version. This did not work
as the service version string was used instead of the server version.
2018-10-30 12:45:23 +02:00
262f1d7e47 Fix build failures
The freopen return value caused warnings.
2018-10-19 15:20:34 +03:00
192563a947 MXS-2108: Fix open connection calculation
When a connection to a server is lost and the session command history is
disabled, the session will continue as long as at least one connection is
open. Previously the open connection calculation used the same code that
was used when a new session was created which only inspected the
configured server count instead of the actual open connection count.
2018-10-19 15:20:34 +03:00
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