13189 Commits

Author SHA1 Message Date
Markus Mäkelä
f2a837e2f1
Fix memory leak in throttlefilter
The filter would leak the buffer when it disconnects a client. This fixes
the throttlefilter test if it's run with ASAN or valgrind.
2020-07-15 15:35:12 +03:00
Markus Mäkelä
c4e79f4d3b
Prevent unwanted connection errors
The Connection class used the wrapper function when it could simply call
mysql_real_connect directly. This removes the unconditional error message
that would be printed even when a connection failure was expected.
2020-07-15 13:30:41 +03:00
Markus Mäkelä
fcb78108be
Make mxs548_short_session_change_user lighter
Removed the inserts from the test. They don't make any functional
difference and it only slows the whole system down.

Also reduced the number of threads doing the change user command. This
should reduce the CPU usage of the test.
2020-07-14 09:36:37 +03:00
Markus Mäkelä
268b684c01
Fix mxs2167_extra_port
The test only used legacy startup syntax.
2020-07-14 09:36:37 +03:00
Johan Wikman
64480c8268 Remove obsolete script
set-change-date is much better.
2020-07-10 09:51:46 +03:00
Johan Wikman
2b20b1ba6a Add script for setting MaxScale change date
Simply calls script/set-change-date providing as argument all
MaxScale directories containing files with Change Date.
2020-07-10 09:51:46 +03:00
Markus Mäkelä
c85638052e
Rerun failed tests
This should help stabilize the test set by making sure the test actually
fails twice. This'll still leave the output in the log so that the
problems that only occur on the first run can be eventually fixed.
2020-07-10 09:32:13 +03:00
Markus Mäkelä
af227cd8c5
Enable log_info for maxinfo_sql
This should help figure out why the test would hang.
2020-07-09 13:49:43 +03:00
Markus Mäkelä
6229d79681
Make the fwf on_queries test more robust
By waiting for a known period of time before and during the time window,
we get a higher chance of the test passing even if the system isn't fast.
2020-07-09 13:49:43 +03:00
Markus Mäkelä
f61c7728ab
Fix bug626 with MariaDB 10.4
The test used legacy SQL syntax for updating the password.
2020-07-09 13:49:43 +03:00
Johan Wikman
09ebffbb9e 2.3 Add script for setting change date
This script is capable of setting the change date and not just
updating a specific one.

It looks for " Change Date: .*" in the first 20 lines of file and
replaces whatever follows "Change Date: " with the specified change
date.

If provided with a directory, it will walk the directory hierarchy
and recursively set the change date in all files.
2020-07-09 10:15:45 +03:00
Johan Wikman
93e2aaeaf5 MXS-3031 Ensure backend ssl tests clean up after themselves
Presumably Mariadb_nodes::disable_ssl() should do that, but it
does not. So for the time being we create the default user anew.
2020-07-08 09:32:07 +03:00
Johan Wikman
9955f00bf5 MXS-3031 Add function for resetting users
With this function, a test that changes the default test users
on a node can reset the situation.
2020-07-08 09:31:42 +03:00
Markus Mäkelä
c9badcb09c
Fix installation order of signal handlers
The shutdown signal handlers were installed before the workers were
initialized and weren't removed before the workers were deleted. This
would lead to a debug assertion and an eventual crash when a SIGTERM
signal was received outside of the expected scope.

The proper way to do this is to install the handlers only after the system
is up and running and to disable them as soon as the shutdown process
starts.

This mostly happened with the mxs621_unreadable_cnf test as it seemed to
receive a SIGTERM during the execution of the at-exit handlers.
2020-07-02 10:33:18 +03:00
Markus Mäkelä
637bc6ff6d
Silence test errors about missing cores
`cp` and `ls` complain if the files do not exist, using `test` is more
appropriate to test whether the files exist.
2020-07-02 06:26:35 +03:00
Markus Mäkelä
1756857f5d
Fix galera initialization with 10.4
For whatever reason, galera complains on startup about
wsrep_cluster_address missing even when mysql_install_db is run. By making
sure that we configure it before we initialize the database, the problems
seem to go away.
2020-07-01 15:15:15 +03:00
Johan Wikman
9fb5336615 MXS-2996 Fix classification of "SELECT ... LOCK IN SHARE MODE"
And also of "SELECT ... FOR SHARE"
2020-06-18 10:17:08 +03:00
Johan Wikman
1dd06c3ebc MXS-2996 Add test that reveals problem
SELECT * FROM test LOCK IN SHARE MODE
  SELECT * FROM test FOR SHARE

should be classified as QUERY_TYPE_WRITE.
2020-06-18 10:14:16 +03:00
Johan Wikman
3972e372ae MXS-3041 Fix 'SELECT handler FROM t FOR UPDATE'
Problem was that 'handler' is a keyword. To make it work,
the keyword must be listed as one of those that turns into
an id where it cannot be used as a keyword.
2020-06-18 08:40:22 +03:00
Johan Wikman
f96c8d3a97 MXS-3041 Add test that reveals problem 2020-06-18 08:35:33 +03:00
Johan Wikman
d78aa39765 Update release date 2020-06-05 09:31:45 +03:00
Johan Wikman
ddb4064563 Fix typo in documentation 2020-06-05 09:31:45 +03:00
Johan Wikman
aa11c960b1 2.3.20 Update change date 2020-06-05 09:31:45 +03:00
Johan Wikman
dcf0442127 2.3.20 Add release notes and update change log 2020-06-05 09:31:44 +03:00
Markus Mäkelä
d025f5123e
MXS-3023: Fix ID generator overflow
The result must always be non-negative.
2020-06-04 15:31:17 +03:00
Markus Mäkelä
5380bd65f1
Detect dropped system tables
If a test breaks the system by dropping a system database, the replication
check wouldn't detect it.
2020-06-03 10:39:36 +03:00
Johan Wikman
8f3a1228e6 2.3 Update maintenance release number 2020-06-02 10:50:30 +03:00
Markus Mäkelä
cb8b4546cb
Don't use client SHA1 for fake responses
When a fake handshake response is generated for a connection that hasn't
received the server's handshake, the client's SHA1 would be used with a
static scramble. This, in theory, would weaken the authentication to some
extend so to completely prevent this, a null password is used. This
removes any possibility of the password being exposed.
2020-06-02 10:17:40 +03:00
Markus Mäkelä
11960a1e93
Document transaction_replay_max_size inner workings
The documentation didn't explain how to estimate how much memory a
transaction takes and whether it was a global limit or a per session
limit.
2020-06-02 10:17:39 +03:00
Markus Mäkelä
2e1b0c5ddf
MXS-2984: Fix list listeners
Backported the changed from 2.5 to 2.3 and added a test case.
2020-06-01 12:26:26 +03:00
Markus Mäkelä
ce437bc779
MXS-3016: Rename --monitors to --monitor
Renamed the option and changed the type to a string argument. The alias
for --monitors still allows old code to use the same format.
2020-06-01 12:26:26 +03:00
Markus Mäkelä
0f1f9426c3
MXS-2983: Document list option formats
The options that take lists of objects as arguments did not properly
document the expected format.
2020-06-01 12:26:26 +03:00
Markus Mäkelä
c3dff9c60c
MXS-3014: Add missing global parameters to REST API
A few global parameters weren't included in the list of parameters. A few
non-parameter values that were in the parameter object were moved out into
the attributes object. Sorted the parameter alphabetically.
2020-05-29 08:32:39 +03:00
Markus Mäkelä
0907e0f0e5
Add BACKEND_SSL VM type
This is needed by tests that use add_test_executable_ex and require
backend SSL. Also fixed a problem in disable_ssl where an empty query was
executed instead of the query itself.
2020-05-27 14:06:51 +03:00
Markus Mäkelä
c211bf1a21
Remove old VERSION.cmake files 2020-05-25 09:06:43 +03:00
Markus Mäkelä
7c011b4081
MXS-2998: Fix key-value parsing
The code assumed that no value would hold an equals sign which is
wrong. Added a test case that reproduces the problem and verifies the fix.
2020-05-14 09:34:25 +03:00
Markus Mäkelä
481f6f1aea
Add missing operator=(Connection&&)
The move assignment should also be defined if the move construction is
defined.
2020-05-13 13:43:58 +03:00
Johan Wikman
b212117fd3 MXS-2990 Fix the problem, treat ! as not
If '!' is followed by '=' then it is NOT-EQUAL, otherwise it is
just NOT.
2020-05-13 10:38:07 +03:00
Johan Wikman
9999650bbe MXS-2990 Add test that reveals problem
Had to fix qc_mysqlembedded as well to work with 10.2.
2020-05-13 10:32:39 +03:00
Markus Mäkelä
73eba01ce9
Fix cluster sync documentation
The MaxScale instance isn't stopped if the synchronization fails. Added
missing documentation for the command argument.
2020-05-11 07:44:57 +03:00
Markus Mäkelä
b4108270dc
MXS-2982: Fix documetation link in --help output 2020-05-11 07:44:57 +03:00
Markus Mäkelä
a2b5a1aba3
MXS-2980: Forward options to the interactive mode
The --quiet option does not make sense in the interactive mode so it isn't
forwarded.

Added code that reports TLS certificate loading errors. The errors
themselves aren't very exact but at least they give a hint as to why it
failed.
2020-05-11 07:44:56 +03:00
Markus Mäkelä
0ddee9613b
MXS-2981: Treat missing TLS files as an error
Also treats partially defined TLS files as an error.
2020-05-11 07:44:56 +03:00
Esa Korhonen
c34b835c51 Build maxbase tests only if BUILD_TESTS in on 2020-04-30 17:55:23 +03:00
Johan Wikman
df01a6e9e0 Merge branch '2.3.19' into 2.3 2020-04-27 15:54:04 +03:00
Johan Wikman
5b33e03a64 2.3 Update maintenance version 2020-04-27 15:51:46 +03:00
Johan Wikman
25c5c91fea Update 2.3.19 release date 2020-04-27 15:36:04 +03:00
Markus Mäkelä
a38b475e90
Fix add_template
The path to the coniguration file must be an absolute path
(CMAKE_SOURCE_DIR) instead of a relative one
(CMAKE_CURRENT_SOURCE_DIR). This fixes cdc_datatypes.
2020-04-27 10:22:51 +03:00
Markus Mäkelä
87328228f8
Fix mxs922_monitor
The monitor needs to be unlinked from servers before it is destroyed.
2020-04-24 14:52:23 +03:00
Johan Wikman
c689aac939 2.3.19 Create release notes and update change log 2020-04-23 14:31:08 +03:00