111 Commits

Author SHA1 Message Date
MassimilianoPinto
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
MassimilianoPinto
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
MassimilianoPinto
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
Markus Mäkelä
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
MassimilianoPinto
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
MassimilianoPinto
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
MassimilianoPinto
23befe8380 Merge branch 'develop' into MXS-1266 2017-06-08 17:38:23 +02:00
MassimilianoPinto
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
MassimilianoPinto
887e511fc5 MXS-1266: cosmetic changes
MXS-1266: cosmetic changes
2017-06-08 14:00:36 +02:00
MassimilianoPinto
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
Johan Wikman
f546a17e77 Update change date of 2.2 2017-06-01 10:24:20 +03:00
MassimilianoPinto
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
MassimilianoPinto
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
MassimilianoPinto
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
MassimilianoPinto
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
MassimilianoPinto
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
MassimilianoPinto
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
MassimilianoPinto
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
MassimilianoPinto
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
MassimilianoPinto
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
MassimilianoPinto
adb2cc1517 MXS-1209: blr_slave_query cleanup
New routine: blr_handle_admin_stmt() is in use
2017-04-20 15:48:26 +02:00
MassimilianoPinto
371598fc8f MXS-1209: blr_slave_query cleanup
Added blr_handle_admin_stmt()
2017-04-20 15:19:49 +02:00
MassimilianoPinto
e4941044aa MXS-1209: blr_slave_query cleanup
New routine: blr_handle_set_stmt is in use
2017-04-19 18:04:41 +02:00
MassimilianoPinto
aa3559c6e9 MXS-1209: blr_slave_query cleanup
new routine: blr_handle_show_stmt
2017-04-19 16:02:07 +02:00
MassimilianoPinto
e09f1db4a6 MXS-1209: blr_slave_query cleanup
new routine: blr_handle_maxwell_stmt
2017-04-19 14:11:59 +02:00
MassimilianoPinto
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
Markus Mäkelä
ad1c05b015 Merge branch '2.1' into develop 2017-04-05 11:35:13 +03:00
Markus Mäkelä
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
MassimilianoPinto
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
MassimilianoPinto
a236b14eef MXS-1075: Sqlite db for GTID - file, pos mapping
Use sqlite3 database instead of hash tables for GTID - file, pos mapping
2017-03-28 10:23:09 +02:00
MassimilianoPinto
9388dff7cf Merge branch 'develop' into MXS-1075 2017-03-15 18:12:00 +01:00
Markus Mäkelä
147a1f88eb Merge branch '2.1-ipv6' into develop 2017-03-13 13:18:08 +02:00
Markus Mäkelä
37dd561470 Add support for IPv6
Both the listeners and servers now support IPv6 addresses.

The namedserverfilter does not yet use the new structures and needs to be
fixed in a following commit.
2017-03-13 10:45:55 +02:00
MassimilianoPinto
cb69b3cbca Merge branch 'develop' into MXS-1075 2017-03-09 15:08:04 +01:00
Markus Mäkelä
e1a1959bc2 Replace strerror_r with mxs_strerror
The mxs_strerror function requires no local buffer, thus making it simpler
and cleaner to use.
2017-03-09 09:36:57 +02:00
MassimilianoPinto
c1dc0e6f73 MXS-1075: simplify blr_slave_query: handle SELECT stmts
First simplification of blr_slave_query: SELECT stmts are handled by
blr_handle_select_smt()
2017-03-08 17:23:39 +01:00
MassimilianoPinto
670150c1c9 MXS-1075: added blr_fetch_mariadb_gtid() routine
Added generic blr_fetch_mariadb_gtid() routine

inst->binlog_name is now stored into MARIADB_GTID_INFO struct. (it was
missing)
2017-03-08 09:06:10 +01:00
MassimilianoPinto
656a38096c Revert "MXS-1075: added blr_fetch_mariadb_gtid() routine"
This reverts commit b0afff73a1b9b1eacc617408d92d5117b7676f0e.
2017-03-08 08:57:59 +01:00
MassimilianoPinto
b0afff73a1 MXS-1075: added blr_fetch_mariadb_gtid() routine
Added generic blr_fetch_mariadb_gtid() routine

inst->binlog_name is now stored into MARIADB_GTID_INFO struct. (it was
missing)
2017-03-08 08:51:19 +01:00
MassimilianoPinto
5ea049cffc MXS-1075: MariaDB 10 slave connecting with GTID
A MariaDB 10 slave connects to binlog server with GTID request
2017-03-06 14:41:24 +01:00
MassimilianoPinto
4e8bf1106b MXS-1075: MariaDB 10 Slave registration with GTID
New SQL commands are handled for MariaDB 10 slave registration with GTID
2017-03-06 08:56:26 +01:00
MassimilianoPinto
1061344de9 MXS-1075: save all received MariaDB GTIds
The GTID saving, which will allow slave to connect with GTID, is done
only with transaction_safety = on
2017-03-02 13:07:21 +01:00
MassimilianoPinto
304b5ced29 MXS-1075: MariaDB 10 GTID stored and shown only for transaction safety on
MariaDB 10 GTID is detected and stored only if transaction_safety
option is on.

SELECT @@gtid_current_pos and “maxadmin show service $service_name” can
return it
2017-02-28 15:19:57 +01:00
MassimilianoPinto
054ddcb3dd MXS-1075: pending_transaction struct added
New pending_transaction added and master_transaction_t values are now
used in all files
2017-02-28 13:50:38 +01:00
Markus Mäkelä
68f99ae305 Remove unused DCB callback code
The highwater and lowwater callbacks were never registered for the client
DCBs in the binlogrouter.

The DCB hangup callbacks were never called by the core and were replaced
with fake hangup events in an earlier version.
2017-02-27 09:25:15 +02:00
MassimilianoPinto
a0b599730c Detect and store MariaDB GTID
If Binlog Server is running with MariaDB 10 compatibility then the
found GTID is stored in router->mariadb_gtid
2017-02-15 08:29:38 +01:00
Johan Wikman
71707c8505 Merge branch '2.1' into develop 2017-02-15 08:48:36 +02:00
Johan Wikman
49cc2b52e3 Merge branch '2.1.0' into 2.1 2017-02-15 08:44:55 +02:00
Johan Wikman
5648f708af Update license to BSL 1.1 2017-02-14 21:42:28 +02:00
Johan Wikman
0838401b32 Merge branch '2.1' into develop 2017-02-14 17:54:27 +02:00