Commit Graph

2405 Commits

Author SHA1 Message Date
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
b27774e674 Rename MAX_BUFFER_SIZE
MAX_BUFFER_SIZE, which is used for limiting the amount of the data
read from a socket renamed to MXS_MAX_NW_READ_BUFFER_SIZE and moved
from gw.h to limits.h.

Consider removing altogether. Difficult to justify since non-blocking
reads are used and the amount of available data is known.
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
b50e794be7 MXS-917: Only log an error if the master is in use
When the readwritesplit can't locate the master server when it's checking
the list of available servers, it logs an error if the original master
reference isn't in a valid state. This error should only be logged if the
server is in use but in an unexpected state.
2016-10-17 06:54:37 +03: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
0800bf4a59 Rename skygw_debug.h to debug.h
Also remove unneded includes in debug.h
2016-10-14 13:48:10 +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
d04cb54b9f maxscale/maxscale_pcre2.h renamed to maxscale/pcre2.h 2016-10-13 22:59:39 +03:00
76430e060f maxconfig.h renamed to config.h 2016-10-13 22:59:39 +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
1cc687a8c0 Merge branch 'binlog_server_wait_data' into binlog_server_waitdata_encryption 2016-10-05 18:25:43 +02:00
3957d8561e Merge branch 'develop' into binlog_server_wait_data 2016-10-05 18:25:15 +02: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
fbf5c331f1 Merge branch '2.0.1' into develop 2016-10-03 15:21:04 +03: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
6e69c783f3 Merge branch 'binlog_server_wait_data' into binlog_server_waitdata_encryption 2016-09-30 11:52:48 +02:00
3b95139fdd Merge branch 'develop' into binlog_server_wait_data 2016-09-30 11:52:09 +02:00
4658a28965 Fix out of bounds read in avro_client_process_command
When the last transaction was queried, it caused an out of bounds read
when strstr was used on the raw data of a GWBUF.
2016-09-29 15:28:57 +03:00
2ae4fb7745 Add missing comment blocks. 2016-09-28 09:33:28 +01:00
8f233d32cf Always update state of bref behind lock 2016-09-28 09:29:56 +03:00
ad86b16fa2 Encryption context code review update
Encryption context code review update
2016-09-26 09:54:57 +02:00
997fe6b90b Add a fail-safe for active operation counters
If a backend is not in use but it is waiting for a result, the state
should anyways be cleared to keep the operation counters correct.
2016-09-26 09:29:44 +03: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
b969b68562 Merge branch 'binlog_server_wait_data' into binlog_server_waitdata_encryption 2016-09-23 16:37:22 +02:00
8cb4c79c59 Merge branch 'develop' into binlog_server_wait_data 2016-09-23 16:36:50 +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
eaf43ca92d Merge branch '2.0' into develop-2.0-merge 2016-09-21 14:59:30 +03:00
578f21e757 MXS-874: Clear closed state before reconnecting to a server
The backend reference states should be cleared when a reconnection attempt
is made. Should the creation of a new DCB succeed, the backend should no
longer be closed.
2016-09-21 11:15:57 +03:00
ca9021b835 Merge branch '2.0' into develop 2016-09-21 02:51:27 +03:00
62ab834e8a Remove unused variables from readwritesplit
There were some unused variables in readwritesplit that caused builds to
fail.
2016-09-20 21:04:10 +03:00
dfec3c8552 Install maxbinlogcheck in the right place
Maxbinlogcheck was installed in the wrong place.
2016-09-20 16:32:21 +03:00
923761159f Move MXS-807 refactor read-write split into develop. 2016-09-20 11:55:02 +01:00
b1b2e5b770 Don't free the shared shard maps
When client sessions are closed, the shared shard maps should not be freed.
2016-09-20 11:33:09 +03: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