17 Commits

Author SHA1 Message Date
MassimilianoPinto
7454ef1d0b MXS-1064: Encryption options to "show service ..."
The binlog encryption options are reported by “show service
$service_name” of binlog router if the encryption is enabled.
2016-12-16 08:48:36 +01:00
MassimilianoPinto
7047cdf6c6 MXS-867: Key file Key Management for binlog encryption
Binlog server option ‘encryption_key_file=’ can now use the same key
file the MariaDB 10.1 server might have  in my.cnf:
‘file_key_management_filename=‘

Note: the file content must be in clear, no key encryption.
2016-12-13 15:51:43 +01:00
MassimilianoPinto
162ae04d20 MXS-867: Binlog server encryption key has same format as MariaDB key file
Default algorithm is now AES_CBC.
The MariaDB 10.1 key file cannot be read as it might contain more than
1 rows.
2016-12-12 14:01:54 +01:00
Markus Makela
5ccdfe54bd Hack binlogrouter to work with resultset buffering
The binlogrouter needs to manipulate the protocol structures in order for
the resultset buffering to work correctly. If the state isn't manipulated
for COM_QUERY statements, the resultsets aren't buffered and will be
routed in separate buffers.
2016-12-12 11:56:41 +02:00
Markus Makela
106f482f45 Add result set buffering to MySQLBackend
The backend MySQL protocol module now supports a new routing capability
which allows result sets to be gathered into one buffer before they are
routed onward. This should not be used by modules that expect large
result sets as the result set is buffered in memory.

Adding a limit on how large of a result set could be buffered would allow
relatively safe use of this routing capability without compromising the
stability of the system.
2016-12-12 10:48:53 +02:00
Markus Makela
585c4554c8 Fix binlogrouter regression
Non-replication events were implicitly ignored but this was removed in a
recent change. The code that wasn't previously used didn't break the
replication event handling loop.
2016-12-08 12:24:50 +02:00
Markus Makela
d9ced5bbab Fix binlogrouter build failure
The binlogrouter used the wrong variable name.
2016-12-08 10:11:55 +02:00
MassimilianoPinto
9444ded6da Binlog encryption is now working with events larger than 16MBytes
Events larger than 16MBytes are now encrypted when being saved.

Some changes to binlog event details report and maxbinlogcheck supports
-H option for replication header display
2016-12-07 12:17:22 +01:00
MassimilianoPinto
76a2475c33 Merge branch 'develop' into binlog_server_waitdata_encryption 2016-12-06 14:57:06 +01:00
MassimilianoPinto
9731bca42e Fix for rotate event
Fix for rotate event: missing offset results in wrong filename detection
2016-12-06 14:54:09 +01:00
Markus Makela
4ae85dc754 Merge branch '2.0' into develop 2016-12-05 21:19:59 +02:00
MassimilianoPinto
b2e8a2d8c5 Develop merge
Develop merge:
this includes the new handling of events larger than 16MBytes
2016-12-05 16:38:48 +01:00
Markus Makela
f5eb4e21dc Add more comments and clean up code
The binlog event processing code is now better commented and is slightly
easier to read.
2016-12-05 17:08:59 +02:00
Markus Makela
2f082cb7fb Store large events in memory
Storing the large events in memory allows checksum calculations to be done
in one step. This also makes the encryption of events easier as they
require the complete event in memory.
2016-12-05 17:08:59 +02:00
Markus Makela
83109a6e9e Use protocol module to process packets
The backend protocol module can be requested to provide complete and
contiguous packets to the router module. This removes the need to process
the packets in binlogrouter.
2016-12-05 17:08:59 +02:00
Markus Makela
d97e3587e0 MXS-878: Don't log an error for 10.1 slave connections
The error message was not needed as we know that the query is always
executed by 10.1 slaves.
2016-12-05 13:18:20 +02:00
Johan Wikman
aef6c7b099 Make directory name equal to the library name
* avro -> avrorouter
* binlog -> binlogrouter
2016-12-01 15:23:42 +02:00