Commit Graph

11761 Commits

Author SHA1 Message Date
9c3dc76fa9 Add format attribute to mxs_json_error_append 2018-08-30 10:57:27 +03:00
4c5e18b4f0 MXS-2033: Require only MASTER_SSL_CA
MASTER_SSL_CERT and MASTER_SSL_KEY are optional and should not be
required.
2018-08-30 00:30:46 +03:00
c554fd3417 Fix mxs1643_extra_events
The test expected the wrong results. Also updated the log message checks
to be server specific.
2018-08-29 18:36:34 +03:00
5f4aa46552 MXS-2027: Store LOAD DATA state inside MXS_SESSION
By storing the data gathere by readwritesplit inside the session, the
protocol will be aware of the state of the LOAD DATA LOCAL INFILE
execution. This prevents misinterpretation of the data which previously
led to closed connections, effectively rendering LOAD DATA LOCAL INFILE
unusable.

This change is a temporary solution to a problem that needs to be solved
at the protocol level. The changes required to implement this are too big
to add into a bug fix release.
2018-08-29 18:10:51 +03:00
e38e08089a Skip parsing during LOAD DATA LOCAL INFILE
The code parsed queries even when a LOAD DATA LOCAL INFILE was in
progress. This caused the data to be misinterpreted as actual commands.
2018-08-29 18:10:51 +03:00
e4fdaf0c50 MXS-1735: Clarify SSL documentation
Explicitly state that servers only require `ssl_ca_cert` and that
`ssl_cert` and `ssl_key` are optional in certain cases. Updated the
wording of all parameters and removed obsolete or false documentation.
2018-08-29 18:10:51 +03:00
c39177bc8d Relay log clear supports multiple slave connections
Now waits for the relay log of the correct slave connection.
2018-08-29 17:07:52 +03:00
85d8a85cde Update master failure detection from slaves
The detection now works with multiple slave connections.
2018-08-29 17:07:52 +03:00
a593d00c65 Simplify failed master detection
No longer depends on monitor events as the other operations do not
either. The active_event/new_event detection was removed, as these
only protect against a rare situation. A similar feature which
protects all the cluster modifications will be implemented later.
2018-08-29 17:04:05 +03:00
9e566bc619 A master that is down with no running slaves can be replaced
This should be a more general way to detect situations where a DBA
or another MaxScale performs a failover.
2018-08-29 16:41:20 +03:00
39016c410c use different hostname for second Maxscale VM 2018-08-29 12:00:52 +03:00
4fd6d075cb doc and astyle fixes 2018-08-29 12:00:52 +03:00
0ce183d7e3 stop monitor for all Maxscales in rw_slect_insert_test 2018-08-29 12:00:52 +03:00
4887bce398 use different way to get own IP in keepalive tests 2018-08-29 12:00:52 +03:00
7e5353dae8 copy maxscale_000_XX to maxscale_XX variables in set_env.sh 2018-08-29 12:00:52 +03:00
f4317121e1 fix galera nodes in twomaxscales_full template 2018-08-29 12:00:52 +03:00
90ca096bc8 add twomaxscales_full template 2018-08-29 12:00:52 +03:00
178d31af27 Fix binlogrouter deadlock on reconnect
The master reconnection in the binlogrouter used the housekeeper
recursively. This is no longer supported and the delayed worker call
mechanism should be used in its stead.
2018-08-29 11:23:00 +03:00
54dca0963a Only serialize active server parameters 2018-08-29 11:23:00 +03:00
73288829b5 Remove default values for protocol
The parameter is the module name so it needs to be in the configuration.
2018-08-29 11:23:00 +03:00
e260d493fd Disallow duplicate server parameters
By replacing server_add_parameter and server_update_parameter with a
single server_set_parameter function, duplication of parameters is
prevented.
2018-08-29 11:23:00 +03:00
b2047aaa80 Fix heap buffer overflow in blr
The name printing wrote past the end of the buffer.
2018-08-29 11:06:12 +03:00
d9ddf0f720 Reinstate implicit log initialization
As some of the functionality depends on the log being default initialized
in the case an error occurs, the code needed to be reinstated.
2018-08-29 11:06:12 +03:00
9adc08a686 Move log initialization into a function
This will be of help when the implicit log initialization is added back.
2018-08-29 11:06:11 +03:00
8b653133a7 Add shutdown detection
The maxscale_is_shutting_down function is used to detect when MaxScale
should stop. This fixes a race condition in the code where the workers has
not yet been initialized but a termination signal has been received. It
also replaces the misuse of the service_should_stop variable with a proper
function.
2018-08-29 11:06:11 +03:00
8f3eabb868 Add missing timeouts to mxs1929_start_from_scratch 2018-08-29 11:06:11 +03:00
a29851a42c MXS-2026 Use qc_init(...)/qc_end()
Use qc_init(...)/qc_end() for initializing QC in test-programs.
2018-08-29 09:47:13 +03:00
ce715e03aa MXS-2026 Make QC default initialization simpler
In test-programs and alike, QC can now be initialized with
one function instead of three.
2018-08-29 09:47:13 +03:00
5c1a1c2700 MXS-2026 Separate QC process and thread initialization
qc_thread_init() must now explicitly be called in every thread
and not just in other threads but the one where qc_process_init()
is called.

This change was caused by QC_INIT_SELF initialization actually
being performed in query_classifier.cc. Before this change, there
actually was a leak in the routing worker running in the main
thread, the query classification cache was created twice.
2018-08-29 09:47:13 +03:00
9a6f1b2044 Merge branch '2.2' into develop 2018-08-28 16:06:23 +03:00
51ade9e6fe Wait two monitor intervals in failover tests
Since the failover always takes two intervals, the test also needs to wait
two intervals.
2018-08-28 08:39:38 +03:00
a50e8e9ce6 MXS-2024: Prevent stack overflow
If a large packet is received, the stack would overflow when the username
size was determined from the packet size. The code must not assume
anything about the size of the packet being read.
2018-08-27 20:35:09 +03:00
2f7ed85b3f MXS-2026 Keep COM_QUERY and COM_STMT_PREPARE separate 2018-08-27 14:21:34 +03:00
cb6096f84d Provide std::default_delete<GWBUF*>
Now GWBUFs can be placed in std::unique_ptr:s.
2018-08-27 14:20:36 +03:00
25c0d3da14 Always treat unloadable modules as an error
When the loading of a module fails, be it due to a typo or a problem in
the library, the configuration is labeled as invalid.
2018-08-27 14:03:39 +03:00
c92aa02961 Don't use log before initialization
The print_log_n_stderr function used to implicitly initialize the log
manager. As this is no longer done, no logging must be done before the log
manager is initialized.
2018-08-27 14:03:39 +03:00
742ebd0437 Shorten cache tests
Reducint the time the load testing runs for seems to reduce the volume by
the same amount. Given that unit tests are good for catching obvious
mistakes, the test should still be adequate.
2018-08-27 14:02:12 +03:00
68b4f20436 Split schema and row processing
The recursive calls into `read` caused unnecessary slowness in the
connection phase. The actual first row should only be read when the data
is requested. This can possibly solve the false timeout errors caused by
slow sending of the first row of data.
2018-08-27 13:41:20 +03:00
69f53f886d Append received data to CDC::TIMEOUT errors
The extra output of received data should be added only to timeout errors,
not to all errors.
2018-08-27 12:31:02 +03:00
01e1c616ba Fix CDC error detection
The error detection assumed the buffer was null-terminated which was never
guaranteed.
2018-08-27 12:11:42 +03:00
02a65f311a Fix memory leak in cdc-connector
The Closer default value was wrong.
2018-08-27 12:00:28 +03:00
f60d1cd6b1 Handle ipv6 mapped ipv4 addresses.
In default case MaxScale uses ipv6 for all addresses also mapping ipv4
connections to ipv6. This caused NamedServerFilter to never match these
addresses to the ones defined in source parameter in ipv4 form.

These ipv6-mapped addresses are now transformed to ipv4 so they can be
checked against source parameter list.
2018-08-26 22:50:25 +03:00
faa65b70f9 MXS-1315 Accept hostnames as source parameters
If there are hostnames as source parameters client hostnames are
attempted to be resolved and checked against saved source hostnames.
2018-08-26 22:50:25 +03:00
1cb96e3152 Cleanup namedserverfilter
Use range-loops when possible and other small cleanup.
2018-08-26 22:50:25 +03:00
f18b6bc28c MXS-1315 Add support for multiple source addresses
Source parameter in NamedServerFilter can now contain a list of source
addresses seperated by comma. This parameter is parsed into a list of ip
addresses and checked against incoming client connections.
2018-08-26 22:50:25 +03:00
421ecdd86b Fix crash caused by wildcards in NamedServeFilter source parameter
Use the formated IP address instead of the one with wildcard symbols.
2018-08-26 22:46:40 +03:00
2c54f28fae MXS-2024: Validate COM_CHANGE_USER packet before use
The use of strcpy on data that is assumed to be null terminated causes
reads and writes past buffers.
2018-08-24 20:52:52 +03:00
4a637b024d Fix mysqlmon_failover_no_slaves
The current monitor detects the extra slave connection before
failover is launched, turning the entire feature off. That part of
the test has been removed.
2018-08-24 12:08:22 +03:00
13c7072da1 Separate CCRFFilter hints section from the main overview
The text changed subjects rather abruptly. Having the hint part of it
gives some context and appears to make the text flow nicer.
2018-08-23 23:52:42 +03:00
8cfc966561 MXS-1929: Update unit tests with monitor changes
The user is a mandatory parameter and needs to be passed when a monitor is
created.
2018-08-23 15:46:47 +03:00