Commit Graph

177 Commits

Author SHA1 Message Date
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
12c862a2c2 MXS-1266: saving GTID, part1: SQL statements review
Saving GTID: SQL statements review in  blr_load_last_mariadb_gtid and
blr_fetch_mariadb_gtid
2017-05-19 10:44:23 +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
2d7df3eb89 Merge branch 'develop' into MXS-1209 2017-05-15 10:39:07 +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
18ca4189f0 Fix testbinlogrouter
The test used service credentials directly instead of copying them.
2017-05-09 09:53:02 +03: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
63caab2ece MXS-1209: var name fix
var name fix
2017-05-07 12:19:31 +02:00
ab89685075 MXS-1209: added blr_handle_fake_gtid_list
New routine blr_handle_fake_gtid_list added for fake GTID_LIST_EVENT.

blr_file_append O_APPEND is set only if mariadb10_master_gtid is not
set.

blr_file_append() routine could change name in next commits
2017-05-05 15:42:23 +02:00
1eaed91867 Merge branch 'develop' into MXS-1209 2017-05-05 15:10:04 +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
e62be5034a Use constant sized arrays for some service strings
The `user`, `password`, `version_string` and `weightby` values should be
allocated as a part of the service structure. This allows them to be
modified at runtime without having to worry about memory allocation
problems.

Although this removes the problem of reallocation, it still does not make
the updating of the strings thread-safe. This can cause invalid values to
be read from the service strings.
2017-05-04 09:17:48 +03:00
fc887c7f5f MXS-1220: Add old router diagnostic interface
Added back the old diagnostic entry point to the router interface.
2017-05-04 09:17:42 +03:00
076599ee5e MXS-1220: Make the parameters of the diagnostic entry points const
The diagnostic entry points should not modify the state of the object
being diagnosed.
2017-05-04 09:14:03 +03:00
bc3cfe0221 MXS-1220: Fix memory leaks
Some of the JSON objects created in the diagnostic functions leaked
memory.
2017-05-04 09:14:03 +03:00
ec6f3d566b MXS-1220: Implement JSON diagnostics in binlogrouter
The binlogrouter now implements the JSON diagnistics entry point.
2017-05-04 09:12:16 +03:00
eb3ff1cc7b MXS-1220: Implement JSON diagnostics for most routers
All routers except the binlogrouter now fully implement the JSON
diagnostic entry point. The binlogrouter needs to be handled in a separate
commit as it produces a large amount of diagnostic output.
2017-05-04 09:12:15 +03: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
6c7013ab00 MXS-1209: blr_start_master_registration() handles the replication protocol registration
New routine blr_start_master_registration() handles the replication
protocol registration
2017-05-03 08:40:49 +02:00
b0837dc635 MXS-1209: added blr_register_cache_response
New routine blr_register_cache_response() in use.
2017-05-03 08:30:05 +02:00
1b5bf65260 MXS-1209: blr_register_send_command() in use for all registration phases
blr_register_send_command() in use for all registration phases
2017-05-02 11:10:55 +02:00
3c6006a010 MXS-1209: added blr_register_send_command()
MXS-1209: added blr_register_send_command()
2017-05-02 09:11:15 +02:00
5cef78b7d4 MXS-1209: blr_master.c cleanup
Further optimisations will come with new registration phases
2017-04-28 18:08:33 +02:00
1203a8211a MXS-1209: blr_master.c cleanup
blr_master.c cleanup continues
2017-04-28 11:40:11 +02:00
9a34aa5c7f Fprintf removed
Fprintf removed
2017-04-27 18:03:34 +02:00
a4f9beb1ad MXS-1209: Ensure master is connected to in main worker 2017-04-27 11:00:07 +03:00
1e98de7b15 Added extra debug fprintf
Added extra debug fprintf
2017-04-27 09:15:32 +02:00
de8febf9a9 Binlogrouter: set poll.thread.id from mxs_worker_get_current_id()
As 'client' is the fake DCB that emulates a client session,
poll.thread.id for the "dummy client" must be set to the current
thread_id that calls blr_start_master()

This affects both startup and START SLAVE (via mysql client)
2017-04-26 17:38:22 +02:00
2428468f47 MXS-1209: blr_master.c cleanup
blr_master.c cleanup continues
2017-04-26 16:06:42 +02:00
870027dffe MXS-1209: Cleaning up Master registration phase
Master registration phase is using new routines
2017-04-26 08:14:26 +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
5704ae5ffd Allow paths to be created if they don't exist
A module can now declare a path parameter for a directory that does not
yet exist. If the directory does not exist, MaxScale will create the
directory with the requested permissions.
2017-04-20 13:26:16 +03: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
509a5c6ed3 Fix error handling for binlogrouter
The binlogrouter error handling closed the DCB twice. This was caused by
the change in the way the DCB error handling is done.

The protocol modules now also call the error handling routine even if the
router session is NULL. This enables the binlogrouter to manage
authentication failures correctly instead of trying to reconnect again.
2017-03-31 14:11:46 +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
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