Commit Graph

511 Commits

Author SHA1 Message Date
7adf08f9e9 Fixed a wrong included file
Fixed a wrong included file
2016-11-15 15:08:19 +01:00
059f6d8b5f Develop branch update
Develop branch update
2016-11-15 14:54:21 +01:00
deda1c844e Develop branch update
Develop branch update
2016-11-14 17:44:39 +01:00
2b2d2cc679 Merge from develop
Merge from develop
2016-11-14 09:43:54 +01:00
08ebb88aec Make server creation simpler
Server creation and allocation are now the same apart from the fact that
allocation only adds the server to the running configuration where as the
creation of a server also persist it to disk.

The server serialization should not be seen through the server.h API. This
allows the serialization method to change without actually having to
change the interfaces.
2016-11-11 10:54:34 +02:00
12dba14c5c MXS-936: fixed compilation error with "debug" build
MXS-936: fixed compilation error with "debug" build
2016-11-10 13:22:26 +01:00
77946b6adc MXS-936: destroyInstance of binlog server is now updated
MXS-936: destroyInstance of binlog server was not updated: not it takes
the ROUTER * parameter.
2016-11-10 12:01:41 +01:00
de18f25cb8 MXS-936: add shutdown hooks
First part: add shutdown hooks for routers.

Binlog is the first one with a  destroyInstance() routine
2016-11-08 11:12:37 +01:00
a9f7e4ac6f Merge branch 'develop' into binlog_server_mariadb_master_encryption 2016-10-31 15:49:48 +01:00
3915b4e7c7 Exclude MXS_DEBUG in release builds
Now, MXS_DEBUG turns into a nop in release builds.
2016-10-24 14:00:51 +03:00
d961864635 Fix tests and limit internal test set size
Some of the tests depended on a working installation where modules are all
located at the default paths. These tests now explicitly set the module
directory which fixes the immediate problem.

Disabled the starting of services in the service test as this will fail
with real modules. The dummy internal modules aren't build and should be
removed in a later commit. In general, it might be better to do service
level testing outside the internal test suite.
2016-10-24 13:16:59 +03:00
db2cccbd8f Replace getCapabilities() with getCapabilities(void)
The latter means no args, the former means any args.
2016-10-24 11:19:43 +03:00
4e07c3313c Move dbusers.c out of the core
The dbusers.c was a MySQL protocol specific file which was used directly
by some of the modules.

Added a new return value for the loadusers authenticator entry point which
allows fatal failures to occur when users are loaded. Currently this is
only taken into notice when the service is first started. If a listener
later returns a fatal error, it is only logged but the service stays in
operation.

Moved the MySQLAuth authenticator sources and the tests that relate to
this module into a subdirectory in the authenticator
directory. Eventually, all authenticators could have a subdirectory of
their own.
2016-10-21 18:33:35 +03:00
fe689504b0 Move service user injection into MySQL authenticator
The MySQL authenticator now injects the service user into the list of
allowed users if loading of database users fails. This allows the removal
of common code in the binlogrouter and maxinfo modules.
2016-10-21 18:33:35 +03:00
6bcb3ce4dc Change capabilities to uint64_t
- Since the capabilities are a bitmask, it is better if an unsigned
  integral type is used.
- Since the function is part of an ABI, it is better if an explicit
  size is used.
- 64-bits so that there also is room for independent filter
  capabilities.
2016-10-20 20:14:59 +03:00
8d92e295d8 Fixed wrong constant name
Fixed wrong constant name
2016-10-17 15:29:20 +02:00
cf3be88c75 Merge branch 'develop' into binlog_server_mariadb_master_encryption 2016-10-17 12:20:23 +02:00
15de0a0fb3 COM_QUIT handler in binlog server now returns 1
COM_QUIT handler in binlog server now returns 1.
2016-10-17 12:16:47 +02:00
f0cf391c18 include/maxscale/gw.h removed.
In a subsequent change, the includes of server/core/*.c will be
cleaned up, and if there is a common set of include files, needed
by most, then a server/core/maxscale/core.h that includes those
will be introduced.
2016-10-17 12:17:09 +03:00
3ce501a975 Merge branch 'develop' into binlog_server_mariadb_master_encryption 2016-10-17 10:32:41 +02:00
1333da0712 Remove skygw_utils.h
The general purpose stuff in skygw_utils.h was moved to utils.h
and the corresponding implementation from skygw_utils.cc to utils.c.
Includes updated accordingly.

Skygw_utils.h is now only used by log_manager and by mlist, which
is only used by log_manager. Consequently, skygw_utils.h was moved
to server/maxscale.

Utils.h needs a separate overhaul.
2016-10-14 19:50:54 +03:00
a9e00473c1 Merge branch 'develop' into binlog_server_mariadb_master_encryption 2016-10-14 15:48:22 +02:00
ba97361c02 Hole detection code review update
Hole detection code review update
2016-10-14 15:46:25 +02:00
03dbc6df80 Remove dependency on skygw_utils.h
- STRERROR_BUFLEN moved to cdefs.h and renamed to MXS_STRERROR_BUFLEN.
  Better would be to provide a 'const char* mxs_strerror(int errno)'
  that would have a thread specific buffer for the error message.
- MIN and MAX also moved to defs.h as MXS_MIN and MXS_MAX.
- Now only mlist.h of the headers depend upon skygw_utils.h.
2016-10-14 15:42:02 +03:00
bff2cfb7e5 Remove skygw_types.h
Some stuff moved to maxscale/utils.h. Further cleanup still needed.
2016-10-14 14:24:31 +03:00
a30782227b Hole detection while receiving events and maxbinlogcheck support for encrypted binlog files
When a hole is detected while receiving events an ignorable event is
written in maxscale binlog. Such event is not sent ti slave servers.

Maxbinlogcheck can now check encrypted binlog files without decrypting
them
2016-10-14 12:20:57 +02:00
c03b8079fd Move @file comment
Where it exists, the @file comment has now been moved to be
consistently right after the license blurb.
2016-10-14 13:20:52 +03:00
1a978be6b6 Cleanup header files
- All now include maxscale/cdefs.h as the very first file.
- MXS_[BEGIN|END]_DECLS added to all C-headers.
  Strictly speaking not necessary for private headers, but
  does not hurt either.
- Include guards moved to the very top of the file.
- #pragma once added.
2016-10-14 11:54:37 +03:00
3a18b64bdd mysql_client_server_protocol.h moved.
Moved to include/maxscale/protocol/mysql.h
2016-10-13 22:59:39 +03:00
c433d11b39 Module private headers moved to modules 2016-10-13 22:59:39 +03:00
e41589be10 Move headers from server/include to include/maxscale
- Headers now to be included as <maxscale/xyz.h>
- First step, no cleanup of headers has been made. Only moving
  from one place to another + necessary modifications.
2016-10-13 16:19:20 +03:00
9d8c5cd410 MXS-862: Add authenticator options and instances
Authenticators now have a similar mechanism to the `router_options`
parameter which enables configurable authentication.

The authenticators also have a new initialize entry point which is similar
to the createInstance entry point of the filters and routers. The value of
`authenticator_options` is passed as a parameter to this function. The
return vaulue of the `initialize` entry point is passed to the `create`
entry point.
2016-10-13 15:58:18 +03:00
4c82dd5032 Code review update
Code review update
2016-10-05 18:11:13 +02:00
d8f09ab4d4 Encryption context is passed to blr_read_binlog()
Encryption context has been removed from BLFILE struct and is now
passed to blr_read_binlog()
2016-10-04 17:32:06 +02:00
e5b34e30ae Code review update
Code review update
2016-10-04 09:20:03 +02:00
dcc38b44a9 The first_enc_event_pos was not set in one case
The first_enc_event_pos was not set in one case
2016-10-03 11:41:57 +02:00
d9bcf6a775 Binlog files have 15 bytes of header XORed with IV
Events saved and read have 15 bytes of header XORed with IV.

Partial events are still not handled.

Next implementation will encrypt the whole event instead of 15 bytes XOR
2016-10-03 09:39:22 +02:00
ad86b16fa2 Encryption context code review update
Encryption context code review update
2016-09-26 09:54:57 +02:00
56d345e833 Encryption Context and Encryption Setup have been added
Encryption Context and Encryption Setup structures have been added to
ROUTER_INSTANCE

Replication doesn’t start if binlog file has START_ENCRYPTION_EVENT but
router_option ‘encrypt_binlog’ is Off
2016-09-23 17:58:33 +02:00
23c0e2795c START_ENCRYPTION_EVENT in maxbinlogcheck review
START_ENCRYPTION_EVENT in maxbinlogcheck  review
2016-09-22 13:38:07 +02:00
b6efb81fa8 maxbinlogcheck detects START_ENCRYPTION_EVENT
maxbinlogcheck now detects the START_ENCRYPTION_EVENT found in MariaDB
binlog file and in the maxscale binlog
2016-09-22 11:00:42 +02:00
d9238afe58 Code review for Start_encryption_event
Code review for Start_encryption_event.
blr_read_events_all_events() uses new added defines and new comments
added as well
2016-09-21 16:55:17 +02:00
883c581d25 Addition of START_ENCRYPTION_EVENT
Addition of START_ENCRYPTION_EVENT when encrypt_binlog=1 in Binlog
Server option.
Event is not sent to any slave.
MaxBinlogCheck understands the new event added in MariaDB 10.1.7: the
number of events = 164 as reported by FormatDescriptionEvent
2016-09-19 17:43:47 +02:00
695fed4912 Code review update for Ignorable events
Code review update for Ignorable events
2016-09-19 11:07:17 +02:00
26f87c2bd8 An IGNORABLE event is added into binlog when a gap between two events is detected
An IGNORABLE event is added into binlog when a gap between two events
is detected.

New routines create and write special events.

Special events are not sent to slaves.
2016-09-16 14:55:37 +02:00
8e5fa51efa Addition of MARIADB10_START_ENCRYPTION_EVENT
Addition of MARIADB10_START_ENCRYPTION_EVENT and its description in
event_names_mariadb10 array
2016-09-16 09:49:17 +02:00
874e32edc9 Develop merge
Develop merge
2016-09-08 08:53:32 +02:00
8ac9ecdf07 Compilation error fix
Compilation error fix
2016-09-01 17:59:04 +02:00
4e1cb56710 Added support for ANNOTATE_ROWS_EVENT in COM_BINLOG_DUMP
Now registration with MariaDB server supports ANNOTATE_ROWS_EVENT.
Request flag is in COM_BINLOG_DUMP packet
2016-09-01 17:44:41 +02:00
099263709e Allow routers to control when users are loaded
The binlogrouter requires that users are not loaded at startup. This
allows it to inject the service user into the list of valid MySQL users so
that the binlogrouter can be controlled via the listeners.
2016-08-31 07:02:30 +03:00