12329 Commits

Author SHA1 Message Date
Markus Mäkelä
92b50196ed
Merge branch '2.3.3' into 2.3 2019-01-17 10:49:37 +02:00
Markus Mäkelä
a469ef83b6
MXS-2217: Pick DCB owner before adding to epoll
There is a race condition between the addition of the DCB into epoll and
the execution of the event that initiates the protocol pointer for the DCB
and sends the handshake to the client. If a hangup event would occur
before the handshake would be sent, it would be possible that the DCB
would get freed before the code that sends the handshake is executed.

By picking the worker who owns the DCB before the DCB is placed into the
owner's epoll instance, we make sure no events arrive on the DCB while the
control is transferred from the accepting worker to the owning
worker.
2019-01-17 10:35:49 +02:00
Markus Mäkelä
ba393dbfb2
Merge branch '2.3.3' into 2.3 2019-01-16 16:23:56 +02:00
Markus Mäkelä
519cd7d889
Don't call python3 directly
Calling it directly from the script adds a dependency on it and we don't
what that.
2019-01-16 16:19:35 +02:00
Markus Mäkelä
68d33a3ae4
MXS-2266: Add test case
Extended the existing tests to cover MXS-2266.
2019-01-16 16:19:35 +02:00
Markus Mäkelä
317166540f
MXS-2266: Close prepared statements with internal ID
The ID used to store the prepared statements uses the internal ID and
using the external ID caused unwanted memory use and a false warning.
2019-01-16 16:19:35 +02:00
Markus Mäkelä
39dc83f13c
Don't call python3 directly
Calling it directly from the script adds a dependency on it and we don't
what that.
2019-01-16 16:00:32 +02:00
Markus Mäkelä
7181ea4083
MXS-2266: Add test case
Extended the existing tests to cover MXS-2266.
2019-01-16 12:22:06 +02:00
Markus Mäkelä
ba40916d4a
MXS-2266: Close prepared statements with internal ID
The ID used to store the prepared statements uses the internal ID and
using the external ID caused unwanted memory use and a false warning.
2019-01-16 12:22:06 +02:00
Markus Mäkelä
f5f6a12484
Start Galera correctly
The Galera documentation tells us to use the galera_new_cluster command to
start a new Galera cluster. This should prevent the problems of nodes
failing to join the cluster either on the initial startup or after a node
goes down.
2019-01-16 10:01:58 +02:00
Markus Mäkelä
511f01a28d
MXS-2252: Add test case
Added a test case that verifies the correct user is used.
2019-01-16 09:43:50 +02:00
Markus Mäkelä
db98ecbaa1
MXS-2259: Fix double addition of DCBs to worker list
When poll_add_dcb was called for a DCB that once was polling system but
was subsequently removed, the DCB would appear twice in the worker's list
of DCBs. This caused a hang when the DCB was the last one in the worker's
list and dcb_foreach_local would be called.

To prevent the aforementioned problem, the DCBs are now added and removed
directly to and from the workers instead of indirectly via poll_add_dcb
and poll_remove_dcb.
2019-01-16 09:43:50 +02:00
Markus Mäkelä
57fe5ff56a
Fix error packet stringification function
The code read past the stack buffer.
2019-01-16 09:43:49 +02:00
Markus Mäkelä
021d48f94c
Log low-level reason and idle time on master failure
If the connection to the master is lost, knowing what type of an error
caused the call to handleError helps deduce what was the real reason for
it. Logging the idle time of the connection helps detect when the
wait_timeout of a connection is exceeded.
2019-01-16 09:43:49 +02:00
Esa Korhonen
8cef8b9472 Compile MariaDBMonitor unit tests only if flag is set 2019-01-15 15:44:21 +02:00
Esa Korhonen
1c8c222ad1 MXS-2112 Add python script for assembling support files
The script adds config and log files into a zip archive. Passwords in
config files are censored. Also attempts to read current status by calling
maxctrl. If core-file exists, runs gdb on it to gather call stack.
The script is installed to the binary file directory.
2019-01-14 16:34:30 +02:00
Johan Wikman
34359bdc83 Merge branch '2.2' into 2.3 2019-01-11 13:02:43 +02:00
Johan Wikman
9284e8e64c Merge branch '2.2.19' into 2.2 2019-01-11 13:02:05 +02:00
Johan Wikman
18c57dc6cc Update 2.2.19 release date 2019-01-11 12:58:33 +02:00
Markus Mäkelä
6eeb02d55d
Fix writeq_low_water documentation
The throttling is removed once the buffer size falls under
writeq_low_water, not writeq_high_water.
2019-01-11 10:27:11 +02:00
Markus Mäkelä
8ac786110e
MXS-2255: Fix COMMIT matching
The code used a rather questionable method for parsing SQL statements
instead of using the query classifier for detecting transaction start and
stop events.
2019-01-11 10:27:00 +02:00
Markus Mäkelä
4c61b646a4
Wait two intervals in mysqlmon_failover_rejoin_old_slave
The failover process takes at least two intervals to happen. With only a
single wait, it was down to luck whether the test would succeed.
2019-01-11 09:34:06 +02:00
Johan Wikman
2e1baae7f7 Update maintenance version in 2.2 minor branch 2019-01-10 12:43:31 +02:00
Markus Mäkelä
d3c7e4e23f
Update MaxCtrl packages
A library required the globby library but the version it required didn't
work. Also updated lodash and inquirer.
2019-01-10 11:23:13 +02:00
Johan Wikman
6977828f2d Update maintenance version in 2.2 minor branch 2019-01-10 10:04:20 +02:00
Markus Mäkelä
147f0bb656
Extend master failure error message
The error now describes the failure mode in more detail. This should make
post mortem analysis of failed connections a lot easier.
2019-01-09 20:05:38 +02:00
Johan Wikman
78ea12b4c1 Merge branch '2.2' into 2.3 2019-01-09 09:13:59 +02:00
Johan Wikman
27b3ab28e0 Update 2.2.19 release notes 2019-01-09 09:13:07 +02:00
Johan Wikman
e64b034334 MXS-2248 Add change that fixes the problem
Any kind of expression is legal after INTERVAL.
2019-01-09 09:11:49 +02:00
Johan Wikman
a456168fd0 MXS-2248 Add test that reveals problem 2019-01-09 09:11:49 +02:00
Markus Mäkelä
d9faea4979
Fix -Wshadow warnings
The cdc_connector.h won't built with -Wshadow if the variable and method
names match.
2019-01-09 09:00:00 +02:00
Markus Mäkelä
c0ebf663e3
Make the error message a const char* const
This prevents linker errors if the source files are used directly.
2019-01-09 08:59:49 +02:00
Johan Wikman
7a7545f8f7 Merge branch '2.2' into 2.3 2019-01-08 15:59:03 +02:00
Johan Wikman
9cba1bdc37 Update release notes 2019-01-08 15:58:20 +02:00
Johan Wikman
2895f361d9 MXS-2242 Add change that fixes the problem
A whole slew of missing builtin functions were added, not just the
ones directly relevant for MXS-2242.
2019-01-08 15:55:41 +02:00
Johan Wikman
f94ddadc18 MXS-2242 Add test that reveals problem 2019-01-08 15:55:41 +02:00
Johan Wikman
8ab5d79025 Merge branch '2.2' into 2.2.19 2019-01-08 15:55:21 +02:00
Oleksandr Kovtunenko
d569cff98f try to Fix MXS-2206 (#185)
* try to Fix MXS-2206

* use sort -v

* return empty line
2019-01-08 11:58:35 +02:00
Esa Korhonen
63358fb4c1 Add correct operator to comparison
The clause had a bitwise AND. The end result is likely the same.
2019-01-08 10:18:15 +02:00
Markus Mäkelä
5f83b07fc2
MXS-2241: Detect invalid readwritesplit configuration
master_reconnection and disable_sescmd_history are, in practice, mutually
exclusive settings.
2019-01-07 11:06:24 +02:00
Markus Mäkelä
0859f3caff
Merge branch '2.2' into 2.3 2019-01-07 10:33:34 +02:00
Markus Mäkelä
2172c4ca85
MXS-2048: Fix dbfwfilter module command documentation
Fixed the command names.
2019-01-06 13:17:32 +02:00
Markus Mäkelä
bc346422fb
Add minimal CDC client
Added a minimal CDC client application that uses the CDC connector
library. This is mainly intended for manual testing so it is built using
the accompanying Makefile instead of being a part of the CMake system.
2019-01-06 13:05:42 +02:00
Markus Mäkelä
46bea87ff6
MXS-2238: Fix reading of large Avro schemas
The schemas were read incorrectly which resulted in large schemas having
multiple newlines in them.
2019-01-06 13:05:42 +02:00
Markus Mäkelä
7b6ae4bc13
Add 2.2.19 release notes
Generated 2.2.9 release notes and added them to the changelog.
2019-01-06 13:05:42 +02:00
Markus Mäkelä
a4540b5cee
Add note about weightby deprecation
The documentation now states that the parameter was deprecated.
2019-01-06 13:01:37 +02:00
Markus Mäkelä
8c437c6440
Fix crash in galeramon
An std::string was assigned a null value which will cause a crash.
2019-01-04 12:00:48 +02:00
Markus Mäkelä
2fde4ba1b3
Fix MXS_ABORT_IF_FALSE macro
The macro needs parentheses around the expression, otherwise the negation
is applied in the wrong place.
2019-01-04 11:26:09 +02:00
Markus Mäkelä
fe4c848079
Use direct access into strings while canonicalizing
The process of appending to a std::string always includes a size check in
case the internal storage needs to expand. Given that we know a
canonicalized version of a query string is never larger than the original
string and that we pre-allocate enough memory to cope with the worst-case
scenario, the extra logic in std::string::push_back is unnecessary and an
extra cost. Writing directly into the string avoids this cost and improves
the performance.
2019-01-03 21:37:11 +02:00
Markus Mäkelä
ad5b244313
Optimize canonicalization code
Switched from default character type functions to ones that use lookup
tables. Eliminated the internal state and replaced with in-place iteration
of the query. Added code to allow single-lookup detection of normal
characters.
2019-01-03 21:37:11 +02:00