10501 Commits

Author SHA1 Message Date
Johan Wikman
db30ea96f2 MXS-1775 m_master is now a member variable of MonitorInstance 2018-05-18 16:00:05 +03:00
Johan Wikman
5aa30e8613 MXS-1775 AurorMon now hangs up as the other monitors do 2018-05-18 16:00:05 +03:00
Johan Wikman
6eef6f52db MXS-1775 Wait the same way in all monitors 2018-05-18 16:00:05 +03:00
Johan Wikman
2396b555f8 MXS-1775 Monitor loop and monitoring separated
In preparation for moving the monitor loop to MonitorInstance.
2018-05-18 16:00:05 +03:00
Johan Wikman
6fff5a4f23 MXS-1775 Preparatory work for moving main loop to MonitorInstance 2018-05-18 16:00:05 +03:00
Johan Wikman
6db4ce54a9 MXS-1775 MonitorInstance now calls mysql_thread_[init|finish]() 2018-05-18 16:00:05 +03:00
Johan Wikman
15e3a2887c MXS-1775 Move status management to MonitorInstance 2018-05-18 16:00:05 +03:00
Johan Wikman
1e084b78b1 MXS-1775 MonitorInstance::m_script is now a std::string 2018-05-18 16:00:05 +03:00
Johan Wikman
c7eb0a9958 MXS-1775 Thread starting is now handled by MonitorInstance 2018-05-18 16:00:05 +03:00
Johan Wikman
adb7f156d6 MXS-1775 Introduce MonitorInstance::has_sufficient_permissions()
With this function in place, it is now possible to move the thread
starting to MonitorInstance.
2018-05-18 16:00:05 +03:00
Johan Wikman
3606a5ed1c MXS-1775 Introduce MonitorInstance::configure() function
The configuring of the monitor instance is now performed in a
separate function. That is in preparation for the moving of the
start function to maxscale::MonitorInstance.
2018-05-18 16:00:05 +03:00
Johan Wikman
bcb7d09a15 MXS-1775 Monitor stopping moved to maxscale::MonitorInstance 2018-05-18 16:00:05 +03:00
Johan Wikman
1304fd6147 MXS-1775 Move thread main function to maxscale::MonitorInstance 2018-05-18 16:00:05 +03:00
Johan Wikman
3c277f4e5e MXS-1775 Introduce maxscale::MonitorInstance
- All monitors (but MariaDBMon for the time being) inherit
  from that.
- All common member variables moved to that class. Still
  manipulated in derived classes.

In subsequent commits common functionality will be moved to
that class.
2018-05-18 16:00:05 +03:00
Johan Wikman
787a0b50ef MXS-1775 Cleanup monitor class headers
- All classes now declared in separate header file
- Header files have .hh-suffix
2018-05-18 16:00:05 +03:00
Johan Wikman
90f1784d21 MXS-1775 Turn NDBC monitor into a class.
A mechanical change, without any functional modifications.
2018-05-18 16:00:05 +03:00
Johan Wikman
4b236a79db MXS-1775 Turn Galera monitor into a class.
A mechanical change, without any functional modifications.
2018-05-18 16:00:05 +03:00
Johan Wikman
cd233fe594 MXS-1775 Turn MM monitor into a class
A mechanical change, without any functional modifications.
2018-05-18 16:00:05 +03:00
Johan Wikman
cc7a154e7d MXS-1775 Turn Aurora monitor into a class.
A mechanical change, without any functional modifications.
2018-05-18 16:00:05 +03:00
Johan Wikman
d5871e48ae MXS-1775 Change assumption of Monitor::destroy() function
Used to be assumed to be a static member function, now assumed
to be a regular member function.
2018-05-18 16:00:05 +03:00
Esa Korhonen
a31549221b MXS-1845 Print all slave connections at 'show monitors'
The format has changed.
2018-05-18 13:48:08 +03:00
Esa Korhonen
45da5a08d9 MXS-1845 Cleanup monitor backend updating
Now detects errors and prints them.
2018-05-18 13:48:08 +03:00
Johan Wikman
765806a633 Merge branch '2.2' into develop 2018-05-18 13:40:27 +03:00
Timofey Turenko
7c0ea3220c set memory size for build VM to 4096 2018-05-18 12:51:33 +03:00
Markus Mäkelä
df7c46fbdd
Merge branch '2.2' into develop 2018-05-18 12:45:15 +03:00
Timofey Turenko
9d10642cd7 Merge branch '2.2' of github.com:mariadb-corporation/MaxScale into 2.2 2018-05-18 12:42:24 +03:00
Johan Wikman
001ae8e29a MXS-1874 Handle SET STATEMENT ... FOR ...
The SET STATEMENT ... FOR part can be ignored and the type
of the statement be whatever the type of the part following
FOR is.
2018-05-18 12:35:44 +03:00
Johan Wikman
b12f037b24 MXS-1874 Fix leak in qc_mysqlembedded 2018-05-18 12:35:44 +03:00
Johan Wikman
f665125f1c MXS-1874 Add test that reveals problem 2018-05-18 12:35:44 +03:00
Timofey Turenko
e911c897f6 fix cnf name in add_server_setting() 2018-05-18 12:32:23 +03:00
Markus Mäkelä
3cb389a3b5
MXS-1866: Add support for COM_STMT_BULK_EXECUTE
Readwritesplit now detects the COM_STMT_BULK_EXECUTE command and handles
it correctly.
2018-05-18 12:30:24 +03:00
Markus Mäkelä
4b8206ee1d
MXS-1873: Test large session commands
The test generates a large session command and makes sure queries after it
work correctly.
2018-05-18 12:29:47 +03:00
Markus Mäkelä
8067f312a1
MXS-1873: Collect results for all session commands
To work around the limitation in the session command handling and
multi-part results, all session commands are now treated as gathered
results. This allows session commands which return result sets to be used
with MaxScale.

This change should not cause problems with practical workloads as they
usually do not return massive resultsets for session commands.

The optimal way to handle the multi-part responses would be to integrate
it into the result completion tracking process. This would allow the
prepared statement IDs to be extracted while the command is being
processed.
2018-05-18 12:29:34 +03:00
Markus Mäkelä
91cc5b1e89
MXS-1828: Simplify LOAD DATA LOCAL INFILE handling
By relying on the server to tell us that it is requesting the loading of a
local infile, we can remove one state from the state machine that governs
the loading of local files. It also removes the need to handle error and
success cases separately.

A side-effect of this change is that execution of multi-statement LOAD
DATA LOCAL INFILE no longer hangs. This is done by checking whether the
completion of one command initiates a new load.

The current code recursively checks the reply state and clones the
buffers. Neither of these are required nor should they be done but
refactoring the code is to be done in a separate commit.

Added two helper functions that are used to detect requests for local
infiles and to extract the total packet length from a non-contiguous
GWBUF.
2018-05-18 09:46:07 +03:00
Markus Mäkelä
35f2382263
MXS-1828: Fix test case
The test case would fail due to a false positive if the query would be
routed to a slave.
2018-05-18 09:46:07 +03:00
Markus Mäkelä
051ed76d73
Merge branch '2.2' into develop 2018-05-17 11:23:03 +03:00
Markus Mäkelä
2a7f470b6b
Make test failure messages unique in mxs1824_double_cursor
Having the same error for two different failures makes it harder to figure
out which one of them fails.
2018-05-17 10:57:05 +03:00
Markus Mäkelä
135cd2e16a
Update readwritesplit limitations
The use of multiple cursors was fixed in 2.2.5 and the multi-statement
LOAD DATA LOCAL INFILE is fixed in 2.3.0.
2018-05-17 10:46:57 +03:00
Markus Mäkelä
bf933ecc22
Open all ports by default
The test now flushes the INPUT chain of iptables at the start of the
test. This should open all ports even if the OS by default defines some
rules that block ports.
2018-05-17 10:04:00 +03:00
Markus Mäkelä
4309d9b3a5
Change mxs1836_show_eventTimes port from 9003 to 4006
Port 9003 is not open by default in the test environment. Changing it to
port 4006, which is open, will work around this restriction.

Also added the mysql_error output to the error message when the querying
fails.
2018-05-17 09:50:37 +03:00
Markus Mäkelä
22d6687f9f
Fix paths in mxs1110_16mb
The paths that the test used assumed that the binary was built
in-source. This is a relic of the test refactoring and seems to have gone
unnoticed.
2018-05-17 09:39:19 +03:00
Markus Mäkelä
52e8c08a61
Disable warnings when dropping databases
Dropping a database with DROP DATABASE ... IF NOT EXISTS will cause
warnings to be logged if it doesn't exist. The masking_user test was
missing the part that disables these warnings.
2018-05-17 09:34:01 +03:00
Markus Mäkelä
8daf8418de
Fix release build failure
The pEnd variable was used but not defined in release builds.
2018-05-16 15:24:55 +03:00
Esa Korhonen
654b5f1958 MXS-1865 Wrong permissions on backends no longer cause monitor start to fail
The logic was weird, as the permission checking function assumes a disconnected
server as fine. The checking is now done when starting the main loop and lacking
grants print errors but does not stop the monitor.
2018-05-16 13:55:45 +03:00
Esa Korhonen
b71710e066 MXS-1865 Combine server version and type
Binlog server is now handled better.
2018-05-16 13:55:45 +03:00
Esa Korhonen
b29bae6e84 MXS-1865 Update server version only when (re)connecting
Updating it every iteration is needless.
2018-05-16 13:55:45 +03:00
Markus Mäkelä
95815df1db
Merge branch '2.2' into develop 2018-05-16 11:46:45 +03:00
Markus Mäkelä
bcc3312d8e
Merge branch '2.1' into 2.2 2018-05-16 11:45:48 +03:00
Markus Mäkelä
ca0f37a4c0
Document maxpasswd encryption algorithm
Documented the maxpasswd encryption algorithm in the configuration guide.
2018-05-16 11:13:36 +03:00
Markus Mäkelä
84ac115af8
MXS-1760: Add use_sql_variables_in test case
The test checks that both text protocol and binary protocol statements
produce the correct result.
2018-05-16 11:13:36 +03:00