Commit Graph

82 Commits

Author SHA1 Message Date
c239477630 MXS-1387: checking slave connection in COM_BINLOG_DUMP phase
MXS-1387: checking slave connection in COM_BINLOG_DUMP phase
2017-09-06 15:09:50 +02:00
795722506b MXS-1387: check if MariaDB 10 Slave has GTID request set.
MXS-1387: check if the connecting MariaDB 10 Slave has the GTID request
set and return error code which stops replication.
2017-09-06 11:13:15 +02:00
ff94a39038 Binlog server: fix closing slave connections called by MySQL admin connection
Binlog server: fix closing slave connections called by MySQL admin
connection
2017-09-04 15:23:24 +02:00
9230420872 The blr_master_close() is now called in the main worker thread.
The blr_master_close() is now called in the main worker thread by:
blr_stop_slave() and blr_stop_start_master()
2017-09-01 11:49:27 +02:00
e1efb91ea5 MXS-1156: MASTER_CONNECT_RETRY is a new option for CHANGE MASTER TO
MXS-1156: MASTER_CONNECT_RETRY is a new option for CHANGE MASTER TO.

The ‘connect_retry’, ‘master_retry_count’ options are now in use for
both service and
router_options.
2017-08-31 11:01:03 +02:00
42833386f5 MXS-1156: added configuration entry point for connection retry parameters.
MXS-1156: added configuration entry points for connection retry
parameters.

Variable names have been also changed.
2017-08-31 11:01:03 +02:00
c91187d4de MXS-1156: added limit to master connect retry
MXS-1156: added limit to master connect retry
2017-08-31 11:01:03 +02:00
3c7a0014a9 MXS-1156: Store master_heartbeat_period in master.ini
MXS-1156: Store master_heartbeat_period in master.ini
2017-08-31 11:01:03 +02:00
0f5f9f8228 MXS-1156: Disable heartbeat if value is set to 0
MXS-1156: Disable heartbeat if value is set to 0.

A warning log is written in maxscale log file when heartbeat is not set.
2017-08-31 11:01:03 +02:00
5b2cfac3cb MXS-1156: Added new option MASTER_HEARTBEAT_PERIOD to CHANGE MASTER TO
MXS-1156: Added new option MASTER_HEARTBEAT_PERIOD to CHANGE MASTER TO
2017-08-31 11:01:03 +02:00
8927298abe MXS-1075: Avoid loops when missing binlog file is detected.
MXS-1075: Avoid loops when missing binlog file is detected.
2017-08-24 16:03:30 +02:00
1c4ae9f89a MXS-1344: Allow SET SQL_MODE='' statement from mysql monitor
When SET SQL_MODE='' statement is received from mysql monitor an OK
packet is sent.
2017-08-23 14:11:16 +02:00
965173dd88 MXS-1344: Binlog server reports real master id and its server id in monitor queries
MXS-1344: Binlog server reports the real master id in SHOW SLAVE STATUS
| SHOW ALL SLAVES STATUS, no matter the value of ‘master_id’ identity
parameter.

Binlog server report its own server id or the identity value of
‘master_id’ in MySQL monitor query SELECT @@global.server_id,
@@read_only;

Note: SELECT @@global.server_id (no other fields) still reports the
real master server id or the value set in ‘master_id’
2017-08-23 14:11:16 +02:00
655f8b9170 Close binlogrouter connections in thread 0
The internal connections of the binlogrouter should be closed in the same
thread that created them. This should be the "main" thread, i.e. thread 0,
that starts the original binlogrouter service.
2017-08-21 20:30:36 +03:00
b9588a89ac MXS-770: Removed support for PURGE BINARY LOGS without TO option.
PURGE BINARY LOGS doesn’t exist in MySQL/ MariaDB without options.

MaxScale binlog router supports only PURGE BINARY LOGS TO ‘file’
2017-08-08 10:02:48 +02:00
a9b0eb791b MXS-770: PURGE BINARY LOGS, minor improvements.
PURGE BINARY LOGS, minor improvements.
2017-08-07 10:26:28 +02:00
113d2ad87a MXS-770 Addition of PURGE BINARY LOGS feature
PURGE BINARY LOGS; deletes all files in binlogdir and GTID maps repo
but keeps current binlog file.

PURGE BINARY LOGS TO ‘file’; deletes all files in binlogdir and GTID
maps repo up to specified file.

mariadb10_slave_gtid=On option is needed in order to keep the list of
binlog files.
2017-08-07 10:26:28 +02:00
75b17151f3 Removed FULL option from SHOW BINARY LOGS
If option ‘binlog_structure’ is set to ‘tree’ then SHOW BINARY LOGS
displays the tree details of the binlog files.

MySQL [(none)]> SHOW BINARY LOGS;
+--------------------------+-----------+
| Log_name                 | File_size |
+--------------------------+-----------+
| 0/10122/mysql-bin.000117 |      1167 |
| 0/10122/mysql-bin.000118 |       652 |
| 0/10124/foo-bin.000016   |      5082 |
| 0/10124/foo-bin.000017   |       491 |
+--------------------------+-----------+

With option set to ‘flat’ (which is the default) the output contains
only
names:

MySQL [(none)]> SHOW BINARY LOGS;
+------------------+-----------+
| Log_name         | File_size |
+------------------+-----------+
| mysql-bin.000110 |       425 |
| mysql-bin.000111 |     10409 |
| mysql-bin.000112 |      9659 |
+------------------+-----------+
2017-08-04 10:08:11 +02:00
ae5eb004fe SHOW [FULL] BINARY LOGS is now able to report the same log file in use with different server_ids
SHOW [FULL] BINARY LOGS is now able to report the same filename in use
with different server_ids: this can happen with binlog_structure=tree

example from SHOW FULL BINARY LOGS

0/10122/mysql-bin.000113
…
0/10122/mysql-bin.000116
…
0/5306/mysql-bin.000113

SHOW BINARY LOGS shows the same file twice:

mysql-bin.000113
…
mysql-bin.000116
…
mysql-bin.000113
2017-08-03 11:11:37 +02:00
d5de149e32 Update GTID repository while receiving ROTATE events and check the current file exists.
Update GTID repository while receiving ROTATE events and check the
current file exists.
2017-08-02 17:32:07 +02:00
0597b625d3 SHOW FULL BINARY LOGS reports domain_id/server_id prefix only if binlog_structure is TREE
SHOW FULL BINARY LOGS reports domain_id/server_id prefix only if
binlog_structure is TREE
2017-08-01 15:49:16 +02:00
f301c2ade1 The binary_logs_select_cb() returns now 0 after sending data to client
The binary_logs_select_cb() returns now 0 after sending data to client
2017-08-01 09:13:52 +02:00
39629c412d Binlog server: added prefix to last file in SHOW FULL BINARY LOGS
Binlog server: added prefix to last file in SHOW FULL BINARY LOGS
2017-07-31 10:27:18 +02:00
380fa35b4f Add Slave_pos for Using_Gtid in SHOW SLAVE STATUS only if Master GTID mode is set
Add Slave_pos for Using_Gtid in SHOW SLAVE STATUS only if Master GTID
mode is set
Possible output values are:

Default
   Using_gtid: No
or
   Using_gtid: Slave_pos
2017-07-27 10:13:25 +02:00
96b98845a2 Allow filters to be used with binlogrouter
Filters can now be used with the binlogrouter to modify the contents of
the binlog stream now that the correct function call is used.
2017-07-07 10:37:30 +03:00
4d78aaa3d8 MXS-1266: blr_slave_gtid_request() the file in slave registration request is checked whether it exists or not
MXS-1266:
blr_slave_gtid_request() the file in slave registration request is
checked whether it exists or not and GTID file info could e set instead.

Also addded:

blr_handle_simple_select_stmt(): only mariadb10_gtid_domain is checked
for SELECT @@GLOBAL.gtid_domain_id slave request
blr_start_master_registration(): only router->mariadb10_compat is
checked before sending SELECT @@GLOBAL.gtid_domain_id to master
blr_file_create calls mxs_mkdir_all()
2017-06-12 17:26:37 +02:00
2cb874e95f MXS-1266: Master GTID registration: MASTER_USE_GTID=Slave_pos
MASTER_USE_GTID=Slave_pos is now handled by CHANGE MASTER TO

If mariadb10_master_gtid is On

MASTER_LOG_FILE is no longer required, only MASTER_USE_GTID=Slave_pos

Slave_pos must be set before to empty value or request value:

set @@global.gtid_slave_pos = '0-10116-194';
2017-06-12 16:19:53 +02:00
23befe8380 Merge branch 'develop' into MXS-1266 2017-06-08 17:38:23 +02:00
c00d829d56 MXS-1266: add MariaDB GTID fields in SHOW SLAVE STATUS
MXS-1266: add MariaDB GTID fields in SHOW SLAVE STATUS
2017-06-08 17:35:01 +02:00
887e511fc5 MXS-1266: cosmetic changes
MXS-1266: cosmetic changes
2017-06-08 14:00:36 +02:00
8f94b27fd5 MXS-1266: Allow save and read binlog files from a binlog cache directory tree
MXS-1266: Allow save and read binlog files from a binlog cache
directory tree
2017-06-07 08:56:52 +02:00
f546a17e77 Update change date of 2.2 2017-06-01 10:24:20 +03:00
f66623c382 MXS-1266: files are saved in GTID repo at creation time
Files are saved in GTID repo at creation time: this allows to show
files without transactions via SHOW [FULL] BINARY LOGS

The FULL keywords add domain_id and server id to the output as file
prefix: 0/10122/mysql-bin.000080
2017-05-29 10:58:02 +02:00
ea82e6632d MXS-1266: SELECT @@server_id, @@read_only and SHOW ALL SLAVES STATUS are now handled
SELECT @@server_id, @@read_only and SHOW ALL SLAVES STATUS are now
handled: this means binlog server can be monitored by MaxScale mysql_mon
2017-05-29 10:35:58 +02:00
f0bb2425aa MXS-1266: added SHOW BINARY LOGS
SHOW BINARY LOGS new query shows binary logs which have GTID saved in
gtid_maps

These feature requires the ‘mariadb10_slave_gtid’ option
2017-05-22 16:26:05 +02:00
362824579d MXS-1266: Standalone events in transaction (no COMMIT event) are now handled
Standalone events in transaction (no COMMIT event) are now handled:

the GTID is saved to gtid_maps storage.

Transaction detection assumes there is only one query_event after GTID
event with MARIADB_FL_STANDALONE flag set.
2017-05-19 11:43:43 +02:00
6c86e1ef2f MXS-1266: saving GTID components into gtid_maps storage. part1
Saving GTID components into gtid_maps storage will allow to create a
hiearchical binlog cache dir.

Empty GTID  for master registration can be specified with SET
@@global.gtid_slave_pos = ‘’
2017-05-19 10:23:35 +02:00
2c346ffc1b MXS-1209: MariaDB GTID registration: handling of skipped binlog files from a Fake ROTATE_EVENT
MariaDB GTID Master registration:
creating missing binlog files (with 4 byes) between current one and the
filename coming from ROTATE_EVENT.

blr_slave_binlog_dump() is also checking possible empty files.
2017-05-12 17:18:38 +02:00
61ffd3e0f0 MXS-1209: Master GTID Registration, part1
New option ‘mariadb10_master_gtid’ in use.
Only MariaDB 10 Slaves with GTID request can register if the option is
set.
When receiving a Master reply to a GTID request and the GTID_LIST is
seen, an IGNORABLE event could be written at the end of file if
GTID_LIST next_pos is beyond that EOF
2017-05-09 08:25:44 +02:00
28e05d44ad Added mariadb10_slave_gtid and mariadb10_master_gtid options
The “mariadb_gtid” parameter is no longer available:
“mariadb10_slave_gtid” is the new one.

Another parameter “mariadb10_master_gtid” enable GTID registration.

The latter set to On forces option “mariadb10_slave_gtid” to be On
2017-05-04 10:54:33 +02:00
f13410bae9 MXS-1209: added SELECT @@GLOBAL.gtid_domain_id for Master GTID registration
Master GTID registration: added first step: support for “SELECT
@@GLOBAL.gtid_domain_id”
2017-05-03 14:46:41 +02:00
adb2cc1517 MXS-1209: blr_slave_query cleanup
New routine: blr_handle_admin_stmt() is in use
2017-04-20 15:48:26 +02:00
371598fc8f MXS-1209: blr_slave_query cleanup
Added blr_handle_admin_stmt()
2017-04-20 15:19:49 +02:00
e4941044aa MXS-1209: blr_slave_query cleanup
New routine: blr_handle_set_stmt is in use
2017-04-19 18:04:41 +02:00
aa3559c6e9 MXS-1209: blr_slave_query cleanup
new routine: blr_handle_show_stmt
2017-04-19 16:02:07 +02:00
e09f1db4a6 MXS-1209: blr_slave_query cleanup
new routine: blr_handle_maxwell_stmt
2017-04-19 14:11:59 +02:00
e0a12820b6 Binlogserver sends GTID_LIST Fake Event when a MariaDB 10 slave connects with GTID
Now sending GTID_LIST Fake Event when a MariaDB10 Slave connects with
GTID
2017-04-06 09:04:19 +02:00
ad1c05b015 Merge branch '2.1' into develop 2017-04-05 11:35:13 +03:00
cbc1e864d9 Use RFC 3986 compliant addresses in log messages
When log messages are written with both address and port information, IPv6
addresses can cause confusion if the normal address:port formatting is
used. The RFC 3986 suggests that all IPv6 addresses are expressed as a
bracket enclosed address optionally followed by the port that is separate
from the address by a colon.

In practice, the "all interfaces" address and port number 3306 can be
written in IPv4 numbers-and-dots notation as 0.0.0.0:3306 and in IPv6
notation as [::]:3306. Using the latter format in log messages keeps the
output consistent with all types of addresses.

The details of the standard can be found at the following addresses:

     https://www.ietf.org/rfc/rfc3986.txt

     https://www.rfc-editor.org/std/std66.txt
2017-03-31 14:12:58 +03:00
d8c048e47d MXS-1075: GTID slave request cleanup
GTID slave request routine cleanup and general cleanup as well
2017-03-29 09:28:52 +02:00