Commit Graph

8235 Commits

Author SHA1 Message Date
61cfd92510 Stop replication before configuring binlogrouter
The replication needs to be stopped before the binlogrouter is started. If
the replication is stopped after this, it is possible that two servers
with the same value of server_id attempt to register as slaves which
causes the later of them to fail.
2017-07-06 13:54:59 +03:00
22d47aab52 Print the JSON in avro_alter
The test now prints the output in avro_alter. The replicate_from_master
function also stops maxscale before removing the files.
2017-07-06 13:31:38 +03:00
ef73f3e217 Merge branch '2.1' into develop 2017-07-06 11:25:36 +03:00
66048cf094 Add 2.1.5 release notes
Added release notes for 2.1.5.
2017-07-06 11:03:44 +03:00
9618e63b5f MXS-1310: Add deterministic conflict resolution
The schemarouter can now resolve database mapping conflicts in a
deterministic manner. This will fix the problem of central databases which
are replicated shards being assigned in a non-deterministic manner.
2017-07-05 19:19:49 +03:00
a23e81c438 Add test for MXS-1310
Added test that checks how the use of implicit databases is handled in
schemarouter.
2017-07-05 08:42:52 +03:00
0c33572a96 MXS-1310: Detect implicit database usage
When the current database is implicitly used in a query that also uses an
explicit database, it must be routed to the shard which has the current
database.

As cross-shard joins are not supported, the safest, and possibly the most
expected course of action to take, is to route it to the so-called default
shard. The default shard is the shard that contains the database that is
currently set as the active database with a COM_INIT_DB, a text protocol
USE <database> query or it was set at connection time.
2017-07-04 23:21:04 +03:00
c6b579619a MXS-1310: Route implicit table queries to the current shard
When a query that implicitly uses the current database is detected, it
will be routed to the shard which has the current database.
2017-07-04 23:04:27 +03:00
374c204a04 Only print text protocol statements in schemarouter
The schemarouter info level logging treated all queries as something that
contain SQL statements. This, for somewhat obvious reasons, cannot be
expected.
2017-07-04 22:26:24 +03:00
71bc67b694 Use unordered_map in schemarouter
The shard map doesn't have to be in order and an unordered map will do
just fine.
2017-07-04 13:01:04 +03:00
11d494ef33 Fix avro CREATE TABLE message
The string was assumed to be null-terminated when in reality it was not.
2017-07-04 12:40:22 +03:00
285086ba7c Fix ALTER TABLE regression in avrorouter
The avrorouter failed to detect ALTER TABLE statements which caused a
regression. Extended the alter table tests to parse the JSON for more
strict validation of test results.
2017-07-04 12:40:22 +03:00
26bbac6ea5 Add MXS-1308 to release notes
Added MXS-1308 to release notes.
2017-07-04 12:40:22 +03:00
412a6066dd Update release date 2017-07-04 12:40:22 +03:00
5f8c426578 MXS-1308: Fix crash with multimaster=true
The multimaster node detection uses stacks to sort the node groups. The
size of this stack was always assumed to be positive but it was possible
that it dropped down to -1 causing a crash when the stack was accessed
with the index number.
2017-07-04 12:40:22 +03:00
e39cbd8878 Fix connect_to_nonexisting_db
The test dropped the 'test' database which is heavily used both for
checking functionality and running tests. A better alternative is to use a
custom database that is only used by this test.
2017-07-04 12:40:22 +03:00
5ed6483f01 Fix avro CREATE TABLE message
The string was assumed to be null-terminated when in reality it was not.
2017-07-04 12:21:25 +03:00
5c50045227 Fix ALTER TABLE regression in avrorouter
The avrorouter failed to detect ALTER TABLE statements which caused a
regression. Extended the alter table tests to parse the JSON for more
strict validation of test results.
2017-07-04 09:31:11 +03:00
729e9dbbae Added FAKE_ROTATE event info log
Added FAKE_ROTATE event info log.

Changed: log of Request file and pos only if the binlog_name is not
empty (it can be empty when setting the GTID value before CHANGE MASTER
TO)
2017-07-03 18:14:20 +02:00
e181241f45 Print maxavrocheck errors to stderr
The errors should be printed to stderr to distinct them from actual
messages.
2017-07-03 17:08:39 +03:00
5a26d17fcf Fix master server version checks in tests
The master server version was not processed adequately and false positives
of old master versions were possible.
2017-07-03 17:08:39 +03:00
c952b6805e Add MXS-1308 to release notes
Added MXS-1308 to release notes.
2017-07-03 14:23:21 +03:00
d4a51a048a Update release date 2017-07-03 13:46:10 +03:00
ff22243955 MXS-1308: Fix crash with multimaster=true
The multimaster node detection uses stacks to sort the node groups. The
size of this stack was always assumed to be positive but it was possible
that it dropped down to -1 causing a crash when the stack was accessed
with the index number.
2017-07-03 02:44:37 +03:00
31504585fc Fix connect_to_nonexisting_db
The test dropped the 'test' database which is heavily used both for
checking functionality and running tests. A better alternative is to use a
custom database that is only used by this test.
2017-06-30 18:41:13 +03:00
f7bd195e9f MXS-1248: Add CTE tests
All cte tests from the server
2017-06-30 13:01:14 +02:00
d060320b36 MXS-1248: Further modifications for CTE
- Fields in CTEs are marked as being used in subselects.
- In qc_mysqlembedded all selects must be walked if CTE is present.
- In qc_sqlite unions need special handling.
2017-06-30 12:49:28 +02:00
b5d54292a4 Fix merge error 2017-06-30 11:07:00 +02:00
7297ae129c MXS-1248: Pointer value alone does not tell validity
The pointer pointing to a recursive select may be non-null even
if it is not valid. The specific boolean must be checked as well.
2017-06-30 11:05:15 +02:00
7913f0ddf1 Develop Merge
Develop Merge
2017-06-30 10:48:13 +02:00
086e7abe77 CentOS 6 compile issues fixed
CentOS 6 compile issues fixed
2017-06-30 10:45:30 +02:00
2c5aaeff0e Develop Merge
Develop Merge
2017-06-30 10:14:45 +02:00
44900882a5 Merge branch '2.1' into develop 2017-06-30 11:11:34 +03:00
ff278df3bd Call non_native_setup in scripts that use mysqltest
A few tests didn't call it explicitly and relied on the implicit
initialization that was done in the test driver.
2017-06-30 11:07:18 +03:00
674b3887c9 MXS-1301: function matches functionless queries in accept mode
A function type rule matches a query if the query uses a function defined
in the rule. This is the desired behavior for blacklist mode operation
with `action=block`.

When in whitelist mode, all queries must match a rule to be allowed
through. For function type rules, this fact is problematic as queries that
don't use functions are blocked. The desired behavior is to allow the use
of certain functions while preventing the use of others.

The allowed set of functions should always contain the "empty set" (no
functions are used) when the filter is in whitelist mode.
2017-06-30 11:07:18 +03:00
902013e4f8 Fix off-by-one false positive in maxavro
The float and double types were calculated to exceed the internal buffer
sizes even though the buffer was of the correct size.
2017-06-30 11:07:18 +03:00
809dea34e0 Fix overlap of router->binlog_name in blr_file_create
A call to strcpy was made in blr_file_create where the function was given
the same pointer as both parameters. To avoid this, the file name is now
copied to a local variable before the router variables are modified.
2017-06-30 11:07:18 +03:00
9a42709da4 Properly terminate 'ping' subcommand list
The 'ping' subcommand list was missing the terminating value of
`{EMPTY_OPTION}`.
2017-06-30 11:07:18 +03:00
308a7d63d4 Fix double initialization of tests
The tests that used the mysqltest driver were initialized twice.
2017-06-30 11:07:18 +03:00
a19d93380e Make block_size a size parameter
The block_size signifies a size in bytes so it makes sense to change it to
the size type.
2017-06-30 11:07:18 +03:00
25fd5a8a93 Fix crash on session allocation failure
The the return value was used before it was checked.
2017-06-30 11:07:18 +03:00
322fae8326 Add wrapper functions for buffer and original IV access
Added functions for accessing the buffer and original IV. This hides the
changes introduced in OpenSSL 1.1.
2017-06-30 10:46:05 +03:00
a47d4c40f5 Abstract EVP cipher context creation
The EVP_CIPHER_CTX is now created inside a wrapper function to add support
for OpenSSL 1.1. Also fixed improper use of the EVP_CIPHER_CTX internals
in binlogrouter.
2017-06-30 10:46:04 +03:00
469b432ebe Detect and handle OpenSSL 1.1
OpenSSL 1.1 supports most of the native threading libraries, including
pthread. This means that only versions before 1.1 need the thread handling
code.
2017-06-30 10:42:20 +03:00
f91df4617a MXS-1248: Add simple cte test 2017-06-30 08:36:19 +02:00
84c5aa9934 MXS-1248: Report fields from CTE expressions
Now field and function information of CTE expressions are
collected.
2017-06-30 08:36:19 +02:00
48a67eeef2 qc_mysqlembedded: Collect ... WHERE EXISTS ...
Information was not collected from the subselect in a situation
e.g. like

    SELECT ... WHERE NOT EXISTS (SELECT ...)
2017-06-30 08:36:19 +02:00
cb57e10761 Develop merge
Develop merge
2017-06-29 15:34:22 +02:00
5597db255b Add wrapper functions for buffer and original IV access
Added functions for accessing the buffer and original IV. This hides the
changes introduced in OpenSSL 1.1.
2017-06-29 15:55:44 +03:00
09fb336403 Abstract EVP cipher context creation
The EVP_CIPHER_CTX is now created inside a wrapper function to add support
for OpenSSL 1.1. Also fixed improper use of the EVP_CIPHER_CTX internals
in binlogrouter.
2017-06-29 15:55:44 +03:00