7591 Commits

Author SHA1 Message Date
Markus Mäkelä
66ec4792cd MXS-1575: Fix DATETIME handling
DATETIME values in old formats should always be 8 bytes long. This is how
MariaDB 10.2 stores them and only DATETIME2 values are stored with a
fractional part.
2018-01-30 15:59:05 +02:00
Markus Mäkelä
93923acafb MXS-1621: Skip unneeded ALTER TABLE operations
Some ALTER TABLE operations (e.g. ADD INDEX) are not useful to the
avrorouter. These need to be detected and skipped.
2018-01-30 15:59:05 +02:00
Markus Mäkelä
e14710ab2b Fix ALTER TABLE detection regex
The regular expression expected that the COLUMN keyword was always
present.
2018-01-30 15:59:05 +02:00
Markus Mäkelä
df86ee3579 Fix buffer overflow assertions
The buffer overflow assertions were off by one: The data pointer can be
equal to the end pointer when the last column of the row is processed.
2018-01-30 15:59:05 +02:00
Markus Mäkelä
9146a215f7 Fix DDL table identifier parsing
The parsing was inadequate and did not support all forms of quoted
identifiers.
2018-01-30 15:59:05 +02:00
Markus Mäkelä
b7e475f316 MXS-1621: Detect TABLE_MAP ↔ TABLE_CREATE column count mismatch
If the TABLE_MAP and TABLE_CREATE have different column counts, an error
is logged and the row events are skipped.
2018-01-30 15:59:05 +02:00
Markus Mäkelä
c000b3186c MXS-1575: Fix optional COLUMN keywork handling
The COLUMN keyword is optional and cannot be assumed to exist.
2018-01-30 15:59:05 +02:00
Markus Mäkelä
8dfb1d0113 MXS-1621: Add ALTER TABLE ... [FIRST | AFTER col ] parsing
The parser checks whether the FIRST or AFTER keywords are used and, if
AFTER is used, extracts the relevant column name.

Added a test case that checks that the parsing works and detects the
correct column names.
2018-01-30 15:59:05 +02:00
Timofey Turenko
f9cc2d5bbb
use 'mdbci destroy' instead of 'vagrant destroy' (#163)
use mdbci destroy instead of vagrant destroy
2018-01-30 15:48:05 +02:00
Markus Mäkelä
6068850b18 MXS-1627: Only load users that use default auth plugin
The list of users that is used for authentication shoudl only consist of
users that do not use an explicit authentication plugin. This way
authentication fails before any connections to the backend servers are
done.
2018-01-29 13:10:19 +02:00
Markus Mäkelä
4dc9b56d29 Fix check_backend
Fixed the core generation and removed obsolete files.
2018-01-26 10:41:34 +02:00
Markus Mäkelä
3da4aa1665 Remove trailing whitespace in check_backend
Removed trailing whitespace in check_backend
2018-01-26 10:23:05 +02:00
Timofey Turenko
4e9a5af926 add execution of add_core_conf.sh to 'check_backend' to set up core dump saving 2018-01-26 09:35:02 +02:00
Markus Mäkelä
653b8429d4 Extend cdc_datatypes test
The test now also checks DATE, DATETIME and TIMESTAMP types.
2018-01-23 10:50:39 +02:00
Markus Mäkelä
c85f83fa2b Fix strcpy overlap in binlogrouter
The source and destination buffers could overlap which is why an
intermediate buffer is required.
2018-01-23 09:26:22 +02:00
Markus Mäkelä
c893e354a9 Add missing variable
The numlocks variable is used when older OpenSSL versions are used.
2018-01-23 09:26:02 +02:00
Markus Mäkelä
40dfd1e070 MXS-1620: Fix RPM packaging scripts
Unconditionally replace the `strip` binary with a dummy executable.
2018-01-19 11:23:28 +02:00
Markus Mäkelä
c4df28f64a MXS-1416: Skip directory creation with --config-check
The log and data directories aren't created or checked when the
--config-check option is given.
2018-01-17 09:56:50 +02:00
Markus Mäkelä
5273cbada6 MXS-1600: Add case-insensitive matching to MySQLAuth
The authenticator now supports similar identifier matching as the MariaDB
server. The lower_case_table_names parameter explains its intended use
(case-insensitive identifier matching):
https://mariadb.com/kb/en/library/server-system-variables/#lower_case_table_names
2018-01-16 13:51:22 +02:00
Markus Mäkelä
76e53f2081 Make contribution instructions more concise
The instructions now separate the two parts more clearly so that bug fixes
are always done to the oldest possible version.
2018-01-16 09:37:20 +02:00
Dapeng Huang
454f195cb0 fix:cannot connect to maxinfo with python client 2018-01-16 09:02:03 +02:00
Dapeng Huang
2b653887a3 fix crash at execute empty flush command 2018-01-16 08:40:22 +02:00
Timofey Turenko
847dd2c120 fix typo in read_env() and set_env.sh 2018-01-15 16:47:15 +02:00
Markus Mäkelä
ab44a941ab MXS-1575: Fix large DECIMAL value handling
DECIMAL types that were larger than 8 bytes were not handled
correctly. The current implementation only prints the lowest 8 bytes of
the integer part of the decimal.
2018-01-15 16:15:20 +02:00
Markus Mäkelä
9ca6d586d1 MXS-1575: Fix Avro schema versioning
The versions were not updated if the table was dropped and created again.
2018-01-15 16:15:20 +02:00
Markus Mäkelä
dbad6b737d Detect redundant table map events
When two identical tables are mapped into the same slot, the newer one is
ignored.
2018-01-15 16:15:20 +02:00
Markus Mäkelä
5e4b7ae7c7 Fix memory leak in avrorouter
The TABLE_MAP freeing function leaked memory.
2018-01-15 16:15:20 +02:00
Markus Mäkelä
f2771d5ad8 Remove obsolete message
The warning that a schema already exists is obsolete as mapped tables are
now always opened instead of being reused. This causes the schema checks
to be done for each mapped table.
2018-01-15 16:15:19 +02:00
Johan Wikman
398dbbc66d Update 2.1 version number 2018-01-08 14:28:13 +02:00
Markus Mäkelä
a8876fbcb8 Add CONTRIBUTING document and pull request template
These templates allow for easier pull requests.
2018-01-08 14:07:31 +02:00
Markus Mäkelä
0416d66bcb Set query classifier with an absolute path in tests
Setting the query classifier with an absolute path makes it easier to
manage test setup without having to manually resolve the relative path to
the query classifier from the test source directory.
2018-01-08 09:41:24 +02:00
Markus Mäkelä
579dca0750 Log to stdout in unit tests
The log manager will log to stdout to work around directory and file
permissions.
2018-01-05 16:12:54 +02:00
Markus Mäkelä
3f78dbc923 Improve avrorouter assertion output
When an assertion fails due to an overflow of the event buffer, all
processed values for that event are dumped.

This commit also enables the assertions even for non-debug builds which
should speed up the elimination process for bugs in the avrorouter. The
overhead of doing this is minimal as the output is already gathered for
the INFO level logging.
2018-01-05 13:39:57 +02:00
Markus Mäkelä
e5b5303137 Initialize the query classifier in tests
The test initialization function now loads the query classifier.
2018-01-05 12:57:09 +02:00
Markus Mäkelä
ce1c45828a MXS-1575: Fix CREATE TABLE processing
The CREATE TABLE processing failed to identify the explicit database names
that were generated by mysqldump.
2018-01-05 12:50:39 +02:00
Markus Mäkelä
c64fd4f39f MXS-1543: Add test case
Added test case that checks that statement based replication is detected.
2018-01-05 12:50:39 +02:00
Markus Mäkelä
95ad3aa7df MXS-1543: Log a warning if STATEMENT or MIXED is used
If avrorouter suspects that statement based or mixed replication formats
are being used, it logs a warning.
2018-01-05 12:50:39 +02:00
Markus Mäkelä
e310bbbe53 Initialize query classifier in housekeeper thread
The query classifier was not initialized for the housekeeper thread. This
means that tasks could not use the query classifier and as the avro
conversion is done inside a task, it can't use it.
2018-01-05 12:50:39 +02:00
Markus Mäkelä
a732a4c9a2 Fix packaging when both RPM and DEB tools are installed
If both RPM and DEB tools are installed, only DEB packages should be
generated.
2018-01-05 12:50:39 +02:00
Johan Wikman
583c63e7e1 Merge branch '2.1.13' into 2.1 2018-01-05 09:49:39 +02:00
Johan Wikman
87d729a4f9 Update 2.1.13 release date 2018-01-05 09:48:37 +02:00
Timofey Turenko
1bd20cd2eb temopary disable snapshot revert due to Galera failures 2018-01-05 09:40:41 +02:00
Markus Mäkelä
e9fceff8ce Fix log manager race condition
The log manager could send two messages if a log message was posted soon
before the log manager was stopped. This caused a debug assertion which
then manifested as a deadlock inside the log manager.
2018-01-04 10:27:56 +02:00
Timofey Turenko
e0a584a626 add ulimit setting for tests 2018-01-03 14:12:43 +02:00
Markus Mäkelä
3bba88408c Remove random sleep interval from acquire_lock
The function caused problems with tests and the random sleep is truly not
needed (legacy code and it doesn't bring any visible benefits).
2018-01-03 13:08:46 +02:00
Markus Mäkelä
00ca809963 MXS-1542: Add test case
Added test case that checks whether UTF16 strings work. The test is
expected to fail.
2018-01-03 10:37:25 +02:00
Markus Mäkelä
b5914df4f9 Add documentation on how to reset the conversion process
The resetting of the conversion process is now documented.
2018-01-03 09:55:18 +02:00
Markus Mäkelä
f5484a1011 MXS-1576: Add purge command to avrorouter
The `purge` command can be used to reset the conversion
process. Currently, executing the `purge` module command and restarting
MaxScale is the only correct way to reset the conversion process.
2018-01-03 09:44:41 +02:00
Markus Mäkelä
a86b81824f MXS-1575: Add extra debug assertions
Added more debug assertions to JSON serialization of the Avro schema. Also
checked that the column count for the TABLE_CREATE object matches that of
the TABLE_MAP object.
2018-01-03 09:44:41 +02:00
Markus Mäkelä
5c624f9dda Print output for failed unit tests
Add arguments so that CTest prints the output of the test if it fails.
2018-01-03 09:44:17 +02:00