Commit Graph

10302 Commits

Author SHA1 Message Date
01bf5cc8b0 MXS-1507: Add initial implementation of transaction replay
Added the initial implementation of transaction replay. Transactions are
only replayed if the master fails when no statement is being executed.

The validity of the replayed transaction is done by verifying that the
checksums of the returned results are equal.

Added a close function into the Trx class to make resetting its state
easier. Also changed the return type of the pop_stmt to GWBUF* as the
places where it is used expect a raw GWBUF pointer.
2018-04-26 13:44:25 +03:00
daecb6980b MXS-1507: Use same mechanism for all delayed routing
Passing the delay to the retry_query function allows the same function to
be used in all cases. This removes duplicate code.
2018-04-26 13:44:25 +03:00
92e0b944a9 MXS-1810: Create reset method for Checksum
Resetting checksum calculations avoids some unnecessary calculations when
the result is not needed.
2018-04-26 13:44:24 +03:00
050af8fb52 MXS-1810: Create Trx class
The class encapsulates the relevant information of a transaction.
2018-04-26 13:44:24 +03:00
94038933d8 MXS-1810: Store transaction contents
The queries that make up the transaction are now stored in the router
session while the transaction is in progress. For the time being, the
queries are only used to log extra information about the transaction
contents.
2018-04-26 13:44:24 +03:00
53a5685dc2 MXS-1810: Add transaction checksums
Readwritesplit now calculates checksums for all successful and failed
transactions. This checksum is not of any practical use until the
transaction replaying is implemented.
2018-04-26 13:44:23 +03:00
bb96c368c2 MXS-1810: Create generic Checksum class
The Checksum class defines an interface which the SHA1Checksum and
CRC32Checksum implement.

Added test unit test cases to verify that the checksums work and perform
as expected.
2018-04-26 13:44:23 +03:00
602f977be6 MXS-1810: Add mxs::Checksum class
The class is a wrapper to the SHA1 function. This should make checksum
calculations over buffers easier.
2018-04-26 13:44:23 +03:00
755d080161 MXS-1810: Add C++ hex conversion functions
Added mxs::to_hex for uint8_t types and uint8_t containers.
2018-04-26 13:44:23 +03:00
640501c03a MXS-1810: Format utils.hh
Formatted utils.hh with Astyle.
2018-04-26 13:44:23 +03:00
fd9e5af849 Merge branch '2.2' into develop 2018-04-26 13:23:32 +03:00
9cf44b3092 MXS-1829 Recognise PREVIOUS in addition to NEXT
Earlier only "SELECT NEXT VALUE FOR SEQ" was parsed
properly, while "SELECT PREVIOUS VALUE FOR SEQ" was not.
Now the latter statement is also parsed properly.
2018-04-26 13:14:23 +03:00
b2cc9e5107 MXS-1829 Add test that reveals problem 2018-04-26 12:44:30 +03:00
7c933df56f MXS-1703 Remove support for MariaDB/MySQL versions less than 5.5
5.1 to 5.3 are officially not supported anymore, so support can be removed from
the monitor. This allows removing the config parameter "mysql51_replication".
2018-04-26 10:47:57 +03:00
8e3bec5d09 MXS-1703 Rename fields in SlaveStatus
Althought the fields are still public, having the 'm_' is clearer.
2018-04-26 10:47:57 +03:00
a28aac8de0 MXS-1703 Cleanup do_show_slave_status()
Slave_IO_Running is now properly parsed. Renamed class to SlaveStatus.
2018-04-26 10:47:57 +03:00
510ce38680 Update 2.2 version number in minor branch 2018-04-25 11:07:55 +03:00
d229980ea8 Merge branch '2.2' into develop 2018-04-25 10:59:33 +03:00
fb5a856cea MXS-1725 Use normal routing route when mocking
As results provided directly by filters are now delivered
properly, the functionality of the session must be used
also when mocking.
2018-04-25 10:58:45 +03:00
dee40a58f4 Update release date 2018-04-25 10:57:49 +03:00
2587227f10 Merge branch '2.2' into develop 2018-04-25 10:21:16 +03:00
d9e69413b4 Update MaxScale version
Updated version to 2.2.5.
2018-04-24 23:18:19 +03:00
cb0ac44e1f MXS-1758 Support anonymous user with proxy grant for PAM
This allows using user group mapping with PAM authenticator.
2018-04-24 15:22:01 +03:00
68a89f0a25 Merge branch '2.2' into develop 2018-04-24 14:50:14 +03:00
084c963081 MXS-1639 Update 2.2.5 release notes 2018-04-24 14:36:54 +03:00
4d4aaec52d Merge branch '2.2' into develop 2018-04-24 14:31:50 +03:00
c221e71582 Merge branch '2.1' into 2.2 2018-04-24 14:31:22 +03:00
caa964fa57 Merge branch '2.2' into develop 2018-04-24 13:57:50 +03:00
b401f83e10 Update 2.2.5 release notes 2018-04-24 13:52:26 +03:00
2a38902aa6 MXS-1639 Discard results when executing sql text files
This removes the limitation of not returning resultsets.
2018-04-24 13:21:44 +03:00
fa7cd9450a MXS-1639 Do not run demote_sql_file if the server already has a slave connection
In this case, the server was already a slave and is not being demoted. Also, the file may
contain queries which cannot be ran while a slave connection is running.
2018-04-24 13:21:44 +03:00
2aeed3ffab MXS-1639 Add documentation on promotion/demotion sql files 2018-04-24 13:21:44 +03:00
5dbdb8af8a Update 2.1.17 release notes. 2018-04-24 13:05:20 +03:00
5cf56c7c0f Merge branch '2.1' into 2.2 2018-04-24 12:39:22 +03:00
bafe8f5eeb MXS-1618 Use right type for the return value of getopt_long
getopt_long returns an 'int'. If 'char' is used on a big-endian
platform you'll end up with an infinite loop.
2018-04-24 12:31:08 +03:00
ce98831908 Start housekeeper before services
The housekeeper needs to be initialized before services are started.
2018-04-24 11:48:42 +03:00
a7df6b55d5 Merge branch '2.2' into develop 2018-04-24 11:02:02 +03:00
e81dd4ab24 Update 2.2.5 release notes 2018-04-24 10:33:19 +03:00
e0544c5d9c Update 2.2.5 release notes and change log 2018-04-24 10:18:19 +03:00
54b7dee0b0 Add release notes for 2.1.17
Update Changelog as well.
2018-04-24 10:18:19 +03:00
57cfb709b8 MXS-1819 Also log info messages to syslog
If info messages are enabled, they will be logged to syslog
just like any other messages.
2018-04-24 10:18:19 +03:00
70f3f61ac4 Update version number in 2.1 2018-04-24 10:18:19 +03:00
7a81f77649 Add release notes for 2.1.17
Update Changelog as well.
2018-04-24 10:12:29 +03:00
65260c365d MXS-1819 Also log info messages to syslog
If info messages are enabled, they will be logged to syslog
just like any other messages.
2018-04-24 10:02:47 +03:00
8f87f0fc6f Merge branch '2.2' into develop 2018-04-24 09:37:02 +03:00
627c1945bc Update version number in 2.1 2018-04-24 09:33:37 +03:00
7820158f93 Properly fix string truncation in snprint_timestamp
The length of the timestamp string had a practical meaning. The correct
fix was to always use the length passed as the parameter.
2018-04-23 18:21:58 +03:00
f4bdf3012d Merge branch '2.2' into develop 2018-04-23 14:20:32 +03:00
d67320e06a Fix more GCC 8 build failures
Fixed string truncation warnings by reducing max parameter lengths by one
where applicable. The binlogrouter filename lengths are slightly different
so using memcpy to work around the warnings is an adequate "solution"
until the root of the problem is solved.

Removed unnecessary CMake policy settings from qc_sqlite. Adding a
self-dependency on the source file of an external project has no effect
and only caused warnings to be logged.
2018-04-23 14:02:54 +03:00
8829e6d0c5 Reorder REST API configuration documentation
The REST API configuration documentation is now located after all other
global parameters in its own section. Added it to the ToC and put a link
to it into the REST API overview document.
2018-04-23 14:02:54 +03:00