Binlog server: force fake Client DCB close in errorReply. This fixes an
issue when START SLAVE, with new config, is called after a previous one
with errors.
Remove saving/updating GTID repo when maxscale starts.
The repo update slows down the maxscale startup.
The saving was added in order populate GTID repo with current file but
it costs extra time to event validation routine when current binlog has
many events and it has a big size.
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.
The EOF packet calculation function in modutil.cc didn't handle the case
where the payload exceeded maximum packet size and could mistake binary
data for a ERR packet.
The state of a multi-packet payload is now exposed by the
modutil_count_signal_packets function. This allows proper handling of
large multi-packet payloads.
Added minor improvements to mxs1110_16mb to handle testing of this change.
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’
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.
The `add user` and `enable account` commands create fully privileged
administrative users like they did in 2.1. This makes the addition of
read-only users backwards compatible.
Updated and expanded the documentation on administrative interface
users. Added entries into the release notes as well as the upgrading
document about relevant changes between 2.1 and 2.2.
Routine blr_handle_missing_files() is called by
blr_handle_fake_rotate().
Field ‘filestem’ is updated in order to avoid wrong file name creation.
Additionally router is not creating any missing filenames if
router->binlog_name is empty (no previous binlog files)
Removing the last admin account is now forbidden. This should prevent most
cases where users could lock themselves out of the administrative
interface.
This change does allow a non-root network user to be the last admin
account. In practice this does not prevent the root user from gaining
access to maxadmin. Access can be gained by removing the users file and
restarting MaxScale or by editing the users file by hand.
MaxAdmin can now create basic users for both network and UNIX domain
socket use. Currently the basic and admin types have the same permissions
in maxadmin but for the REST API, only admin accounts can modify MaxScale.
The users are now stored as an array of JSON objects. Legacy users are
automatically upgraded once they are loaded and a backup of the original
users file is created.
Removed the password parameter from the `remove user` maxadmin command as
well as all of the relevant functions. Requiring that an administrator
knows the password of the account to be deleted is not a sound requirement
now that, at least in theory, two types of accounts can be created.
The connections for a router session can now be done without a constructed
router session. This simplifies the creation of new router session by
removing the need to handle memory allocations.
Readwritesplit router sessions are now created in the static `create`
function which handles the actual creation of the connections and
allocation of the session itself.
Moved the initialization of the router session's member variables into the
constructor. Changed two functions that calculated server counts into the
router instance as they don't relate to a particular session.
When a read was successfully retried, the original expected response was
not decremented from the reponse counter. This caused one extra response
to be expected for successfully retried reads which caused a hang after a
retried read.
When a session command was executed and the last slave that was executing
dies, readwritesplit would route any pending queries before closing the
slave connection. This could cause a hang if the routing logic decided to
pick the failed server as the target of the stored query.
This fixes the MXS-1323 related regression in the develop branch.
A new option ‘slave_hostname’ allows the setting of hostname in
COM_REGISTER_SLAVE.
SHOW SLAVES HOSTS; in master server can show the hostname set in binlog
router:
MariaDB [(none)]> SHOW SLAVE HOSTS;
+-----------+-----------------------------+------+-----------+
| Server_id | Host | Port | Master_id |
+-----------+-----------------------------+------+-----------+
| 93 | maxscale-blr-1.mydomain.net | 8808 | 10124 |
+-----------+-----------------------------+------+-----------+
If a destroyed monitor is created again, it will be reused. This should
prevent excessive memory growth when the same monitor is created and
destroyed again.
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.
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 |
+------------------+-----------+
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