MXS-1398: Clean up mysql.h header

Cleaned up the MaxScale version of the mysql.h header by removing all
unused includes. This revealed a large amount of dependencies on these
removed includes in other files which needed to be fixed.

Also sorted all includes in changed files by type and alphabetical
order. Removed explicit revision history from modified files.
This commit is contained in:
Markus Mäkelä 2017-09-08 11:43:07 +03:00
parent f07cc2b3ef
commit 3676dcebb1
29 changed files with 194 additions and 315 deletions

View File

@ -36,12 +36,8 @@
#include <sys/un.h>
#include <unistd.h>
#include <maxscale/housekeeper.h>
#include <maxscale/poll.h>
#include <maxscale/router.h>
#include <maxscale/service.h>
#include <maxscale/users.h>
#include <maxscale/utils.h>
#include <maxscale/dcb.h>
#include <maxscale/session.h>
#include <maxscale/version.h>
MXS_BEGIN_DECLS

View File

@ -22,10 +22,11 @@
#include <signal.h>
#include <string.h>
#include <algorithm>
#include <map>
#include <new>
#include <string>
#include <map>
#include <vector>
#include <maxscale/alloc.h>
#include <maxscale/log_manager.h>
#include <maxscale/modinfo.h>
@ -33,6 +34,8 @@
#include <maxscale/platform.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/query_classifier.h>
#include <maxscale/utils.h>
#include "builtin_functions.h"
using std::vector;

View File

@ -13,27 +13,18 @@
/**
* @file modutil.c - Implementation of useful routines for modules
*
* @verbatim
* Revision History
*
* Date Who Description
* 04/06/14 Mark Riddoch Initial implementation
* 24/10/14 Massimiliano Pinto Added modutil_send_mysql_err_packet, modutil_create_mysql_err_msg
* 04/01/16 Martin Brampton Streamline code in modutil_get_complete_packets
*
* @endverbatim
*/
#include <string.h>
#include <strings.h>
#include <maxscale/buffer.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/alloc.h>
#include <maxscale/poll.h>
#include <maxscale/buffer.h>
#include <maxscale/modutil.h>
#include <maxscale/platform.h>
#include <maxscale/poll.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/utils.h>
/** These are used when converting MySQL wildcards to regular expressions */
static SPINLOCK re_lock = SPINLOCK_INIT;

View File

@ -14,16 +14,16 @@
#include <maxscale/secrets.h>
#include <ctype.h>
#include <time.h>
#include <sys/stat.h>
#include <openssl/aes.h>
#include <sys/stat.h>
#include <time.h>
#include <maxscale/alloc.h>
#include <maxscale/log_manager.h>
#include <maxscale/paths.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/random_jkiss.h>
#include <maxscale/utils.h>
#include "maxscale/secrets.h"

View File

@ -13,14 +13,19 @@
#define MXS_MODULE_NAME "GSSAPIAuth"
#include <maxscale/authenticator.h>
#include <maxscale/cdefs.h>
#include <maxscale/alloc.h>
#include <maxscale/authenticator.h>
#include <maxscale/dcb.h>
#include <maxscale/log_manager.h>
#include <maxscale/mysql_utils.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/secrets.h>
#include <maxscale/mysql_utils.h>
#include <maxscale/service.h>
#include <maxscale/sqlite3.h>
#include <maxscale/users.h>
#include "../gssapi_auth.h"
/**

View File

@ -13,11 +13,13 @@
#define MXS_MODULE_NAME "GSSAPIBackendAuth"
#include <maxscale/authenticator.h>
#include <maxscale/alloc.h>
#include <maxscale/authenticator.h>
#include <maxscale/dcb.h>
#include <maxscale/log_manager.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/server.h>
#include "../gssapi_auth.h"
/**

View File

@ -17,21 +17,21 @@
#include "mysql_auth.h"
#include <stdio.h>
#include <ctype.h>
#include <mysql.h>
#include <netdb.h>
#include <stdio.h>
#include <maxscale/alloc.h>
#include <maxscale/dcb.h>
#include <maxscale/log_manager.h>
#include <maxscale/mysql_utils.h>
#include <maxscale/paths.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/router.h>
#include <maxscale/secrets.h>
#include <maxscale/service.h>
#include <maxscale/users.h>
#include <maxscale/log_manager.h>
#include <maxscale/secrets.h>
#include <maxscale/protocol/mysql.h>
#include <mysqld_error.h>
#include <maxscale/mysql_utils.h>
#include <maxscale/alloc.h>
#include <maxscale/paths.h>
#include <maxscale/utils.h>
/** Don't include the root user */
#define USERS_QUERY_NO_ROOT " AND user.user NOT IN ('root')"

View File

@ -20,20 +20,14 @@
* The "heavy lifting" of the authentication is done by the protocol module so
* the only thing left for this module is to read the final OK packet from the
* server.
*
* @verbatim
* Revision History
* Date Who Description
* 27/09/2016 Markus Makela Initial version
*
* @endverbatim
*/
#define MXS_MODULE_NAME "MySQLBackendAuth"
#include <maxscale/alloc.h>
#include <maxscale/authenticator.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/alloc.h>
#include <maxscale/server.h>
#include <maxscale/utils.h>
/** Authentication states */

View File

@ -13,12 +13,15 @@
#define MXS_MODULE_NAME "cache"
#include "cachefilter.hh"
#include <maxscale/alloc.h>
#include <maxscale/paths.h>
#include <maxscale/jansson.hh>
#include <maxscale/modulecmd.h>
#include <maxscale/paths.h>
#include <maxscale/utils.h>
#include "cachemt.hh"
#include "cachept.hh"
#include "maxscale/jansson.hh"
using std::auto_ptr;
using std::string;

View File

@ -13,8 +13,11 @@
#define MXS_MODULE_NAME "cache"
#include "cachept.hh"
#include <maxscale/atomic.h>
#include <maxscale/config.h>
#include <maxscale/platform.h>
#include "cachest.hh"
#include "storagefactory.hh"

View File

@ -13,16 +13,20 @@
#define MXS_MODULE_NAME "cache"
#include "rules.h"
#include <errno.h>
#include <stdio.h>
#include <new>
#include <maxscale/alloc.h>
#include <maxscale/config.h>
#include <maxscale/modutil.h>
#include <maxscale/mysql_utils.h>
#include <maxscale/platform.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/query_classifier.h>
#include <maxscale/session.h>
#include "cachefilter.h"
static int next_thread_id = 0;

View File

@ -11,13 +11,15 @@
* Public License.
*/
#include <stdlib.h>
#include "rules.h"
#include <maxscale/alloc.h>
#include <maxscale/paths.h>
#include <maxscale/config.h>
#include <maxscale/log_manager.h>
#include <maxscale/query_classifier.h>
#include <maxscale/paths.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/query_classifier.h>
#if !defined(SS_DEBUG)
#define SS_DEBUG
#endif

View File

@ -12,12 +12,16 @@
*/
#include <maxscale/cppdefs.hh>
#include <stdlib.h>
#include <iostream>
#include <maxscale/alloc.h>
#include <maxscale/paths.h>
#include <maxscale/log_manager.h>
#include <maxscale/paths.h>
#include <maxscale/query_classifier.h>
#include <maxscale/utils.h>
#include "storagefactory.hh"
#include "teststorage.hh"

View File

@ -13,8 +13,11 @@
#define MXS_MODULE_NAME "masking"
#include "maskingfilter.hh"
#include <maxscale/paths.h>
#include <maxscale/modulecmd.h>
#include <maxscale/paths.h>
#include <maxscale/utils.h>
#include "maskingrules.hh"
using std::auto_ptr;

View File

@ -13,11 +13,15 @@
#define MXS_MODULE_NAME "masking"
#include "maskingfiltersession.hh"
#include <sstream>
#include <maxscale/buffer.hh>
#include <maxscale/filter.hh>
#include <maxscale/mysql_utils.h>
#include <maxscale/poll.h>
#include <maxscale/protocol/mysql.h>
#include "maskingfilter.hh"
#include "mysql.hh"

View File

@ -13,11 +13,14 @@
*/
#include <maxscale/cppdefs.hh>
#include <memory>
#include <tr1/memory>
#include <string>
#include <tr1/memory>
#include <vector>
#include <jansson.h>
#include <maxscale/jansson.h>
#include <maxscale/pcre2.h>
#include "mysql.hh"
/**

View File

@ -13,37 +13,28 @@
/**
* @file maxrows.c - Result set limit Filter
* @verbatim
*
*
* The filter returns a void result set if the number of rows in the result set
* from backend exceeds the max_rows parameter.
*
* Date Who Description
* 26/10/2016 Massimiliano Pinto Initial implementation
* 04/11/2016 Massimiliano Pinto Addition of SERVER_MORE_RESULTS_EXIST flag (0x0008)
* detection in handle_expecting_rows().
* 07/11/2016 Massimiliano Pinto handle_expecting_rows renamed to handle_rows
* 20/12/2016 Massimiliano Pinto csdata->res.n_rows counter works with MULTI_RESULT
* and large packets (> 16MB)
*
* @endverbatim
*/
#define MXS_MODULE_NAME "maxrows"
#include <maxscale/cdefs.h>
#include <stdbool.h>
#include <stdint.h>
#include <maxscale/alloc.h>
#include <maxscale/buffer.h>
#include <maxscale/debug.h>
#include <maxscale/filter.h>
#include <maxscale/paths.h>
#include <maxscale/log_manager.h>
#include <maxscale/modinfo.h>
#include <maxscale/modutil.h>
#include <maxscale/mysql_utils.h>
#include <maxscale/query_classifier.h>
#include <stdbool.h>
#include <stdint.h>
#include <maxscale/buffer.h>
#include <maxscale/paths.h>
#include <maxscale/poll.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/debug.h>
#include <maxscale/query_classifier.h>
#include "maxrows.h"
static MXS_FILTER *createInstance(const char *name,

View File

@ -13,15 +13,16 @@
#define MXS_MODULE_NAME "MySQLBackend"
#include <maxscale/protocol/mysql.h>
#include <maxscale/alloc.h>
#include <maxscale/limits.h>
#include <maxscale/log_manager.h>
#include <maxscale/modutil.h>
#include <maxscale/utils.h>
#include <mysqld_error.h>
#include <maxscale/alloc.h>
#include <maxscale/modinfo.h>
#include <maxscale/modutil.h>
#include <maxscale/poll.h>
#include <maxscale/protocol.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/router.h>
#include <maxscale/utils.h>
/*
* MySQL Protocol module for handling the protocol between the gateway

View File

@ -15,24 +15,27 @@
#define MXS_MODULE_NAME "MySQLClient"
#include <maxscale/cppdefs.hh>
#include <inttypes.h>
#include <limits.h>
#include <netinet/tcp.h>
#include <sys/stat.h>
#include <maxscale/protocol.h>
#include <netinet/tcp.h>
#include <sys/stat.h>
#include <maxscale/alloc.h>
#include <maxscale/authenticator.h>
#include <maxscale/log_manager.h>
#include <maxscale/modinfo.h>
#include <maxscale/modutil.h>
#include <maxscale/poll.h>
#include <maxscale/protocol.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/query_classifier.h>
#include <maxscale/router.h>
#include <maxscale/session.h>
#include <maxscale/worker.h>
#include <maxscale/ssl.h>
#include <maxscale/utils.h>
#include <maxscale/worker.h>
#include "setsqlmodeparser.hh"
/** Return type of process_special_commands() */

View File

@ -17,12 +17,13 @@
#include <netinet/tcp.h>
#include <maxscale/utils.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/alloc.h>
#include <maxscale/hk_heartbeat.h>
#include <maxscale/log_manager.h>
#include <maxscale/modutil.h>
#include <maxscale/mysql_utils.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/utils.h>
uint8_t null_client_sha1[MYSQL_SCRAMBLE_LEN] = "";

View File

@ -14,45 +14,35 @@
/**
* @file avro.c - Avro router, allows MaxScale to act as an intermediary for
* MySQL replication binlog files and AVRO binary files
*
* @verbatim
* Revision History
*
* Date Who Description
* 25/02/2016 Massimiliano Pinto Initial implementation
*
* @endverbatim
*/
#include "avrorouter.h"
#include <avro/errors.h>
#include <ctype.h>
#include <ini.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <maxscale/service.h>
#include <maxscale/server.h>
#include <maxscale/router.h>
#include <maxscale/atomic.h>
#include <maxscale/spinlock.h>
#include <maxscale/dcb.h>
#include <maxscale/spinlock.h>
#include <maxscale/housekeeper.h>
#include <time.h>
#include <maxscale/log_manager.h>
#include <maxscale/protocol/mysql.h>
#include <ini.h>
#include <sys/stat.h>
#include <time.h>
#include <maxscale/random_jkiss.h>
#include <binlog_common.h>
#include <avro/errors.h>
#include <maxscale/alloc.h>
#include <maxscale/atomic.h>
#include <maxscale/dcb.h>
#include <maxscale/housekeeper.h>
#include <maxscale/log_manager.h>
#include <maxscale/modulecmd.h>
#include <maxscale/paths.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/random_jkiss.h>
#include <maxscale/router.h>
#include <maxscale/server.h>
#include <maxscale/service.h>
#include <maxscale/spinlock.h>
#include <maxscale/utils.h>
#ifndef BINLOG_NAMEFMT
#define BINLOG_NAMEFMT "%s.%06d"

View File

@ -20,27 +20,21 @@
*
* Parts of this file have been copied from blr_file.c and modified for other
* uses.
*
* @verbatim
* Revision History
*
* Date Who Description
* 25/02/2016 Markus Mäkelä Initial implementation
*
* @endverbatim
*/
#include "avrorouter.h"
#include <binlog_common.h>
#include <blr_constants.h>
#include <sys/stat.h>
#include <maxscale/log_manager.h>
#include <maxscale/pcre2.h>
#include <glob.h>
#include <ini.h>
#include <stdlib.h>
#include <glob.h>
#include <sys/stat.h>
#include <maxscale/alloc.h>
#include <maxscale/log_manager.h>
#include <maxscale/pcre2.h>
#include <maxscale/utils.h>
static const char *statefile_section = "avro-conversion";
static const char *ddl_list_name = "table-ddl.list";

View File

@ -22,71 +22,34 @@
* The current prototype implement is designed to support MySQL 5.6 and has
* a number of limitations. This prototype is merely a proof of concept and
* should not be considered production ready.
*
* @verbatim
* Revision History
*
* Date Who Description
* 02/04/2014 Mark Riddoch Initial implementation
* 17/02/2015 Massimiliano Pinto Addition of slave port and username in diagnostics
* 18/02/2015 Massimiliano Pinto Addition of dcb_close in closeSession
* 07/05/2015 Massimiliano Pinto Addition of MariaDB 10 compatibility support
* 12/06/2015 Massimiliano Pinto Addition of MariaDB 10 events in diagnostics()
* 29/06/2015 Massimiliano Pinto Addition of master.ini for easy startup configuration
* If not found router goes into BLRM_UNCONFIGURED state.
* Cache dir is 'cache' under router->binlogdir.
* 07/08/2015 Massimiliano Pinto Addition of binlog check at startup if trx_safe is on
* 21/08/2015 Massimiliano Pinto Added support for new config options:
* master_uuid, master_hostname, master_version
* If set those values are sent to slaves instead of
* saved master responses
* 23/08/2015 Massimiliano Pinto Added strerror_r
* 09/09/2015 Martin Brampton Modify error handler
* 30/09/2015 Massimiliano Pinto Addition of send_slave_heartbeat option
* 23/10/2015 Markus Makela Added current_safe_event
* 27/10/2015 Martin Brampton Amend getCapabilities to return RCAP_TYPE_NO_RSESSION
* 19/04/2016 Massimiliano Pinto UUID generation now comes from libuuid
* 05/07/2016 Massimiliano Pinto errorReply now handles error message in SHOW SLAVE STATUS
* for connection error and authentication failure.
* 11/07/2016 Massimiliano Pinto Added SSL backend support
* 22/07/2016 Massimiliano Pinto Added semi_sync replication support
* 24/08/2016 Massimiliano Pinto Added slave notification via CS_WAIT_DATA new state
* 26/08/2016 Massimiliano Pinto Addition of Start Encription Event description
* 29/08/2016 Massimiliano Pinto Addition of encrypt_binlog option
* 08/11/2016 Massimiliano Pinto Added destroyInstance()
* 24/11/2016 Massimiliano Pinto Addition of encryption options:
* encryption_algorithm and encryption_key_file
*
* @endverbatim
*/
#include "blr.h"
#include <ctype.h>
#include <ini.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <maxscale/service.h>
#include <maxscale/server.h>
#include <maxscale/router.h>
#include <maxscale/atomic.h>
#include <maxscale/utils.h>
#include <maxscale/secrets.h>
#include <maxscale/spinlock.h>
#include <maxscale/dcb.h>
#include <maxscale/spinlock.h>
#include <maxscale/housekeeper.h>
#include <maxscale/worker.h>
#include <time.h>
#include <maxscale/log_manager.h>
#include <maxscale/protocol/mysql.h>
#include <ini.h>
#include <sys/stat.h>
#include <time.h>
#include <uuid/uuid.h>
#include <maxscale/alloc.h>
#include <inttypes.h>
#include <maxscale/atomic.h>
#include <maxscale/dcb.h>
#include <maxscale/housekeeper.h>
#include <maxscale/log_manager.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/router.h>
#include <maxscale/secrets.h>
#include <maxscale/server.h>
#include <maxscale/service.h>
#include <maxscale/spinlock.h>
#include <maxscale/users.h>
#include <maxscale/utils.h>
#include <maxscale/worker.h>
/* The router entry points */
static MXS_ROUTER *createInstance(SERVICE *service, char **options);

View File

@ -16,48 +16,24 @@
/**
* @file blr.h - The binlog router header file
*
* @verbatim
* Revision History
*
* Date Who Description
* 02/04/14 Mark Riddoch Initial implementation
* 25/05/15 Massimiliano Pinto Added BLRM_SLAVE_STOPPED state
* 05/06/15 Massimiliano Pinto Addition of m_errno, m_errmsg fields
* 08/06/15 Massimiliano Pinto Modification of MYSQL_ERROR_CODE and MYSQL_ERROR_MSG
* 11/05/15 Massimiliano Pinto Added mariadb10_compat to master and slave structs
* 12/06/15 Massimiliano Pinto Added mariadb10 new events
* 23/06/15 Massimiliano Pinto Addition of MASTER_SERVER_CFG struct
* 24/06/15 Massimiliano Pinto Added BLRM_UNCONFIGURED state
* 05/08/15 Massimiliano Pinto Initial implementation of transaction safety
* 23/10/15 Markus Makela Added current_safe_event
* 26/04/16 Massimiliano Pinto Added MariaDB 10.0 and 10.1 GTID event flags detection
* 11/07/16 Massimiliano Pinto Added SSL backend support
* 22/07/16 Massimiliano Pinto Added Semi-Sync replication support
* 24/08/16 Massimiliano Pinto Added slave notification state CS_WAIT_DATA.
* State CS_UPTODATE removed.
* 01/09/2016 Massimiliano Pinto Added support for ANNOTATE_ROWS_EVENT in COM_BINLOG_DUMP
* 16/09/2016 Massimiliano Pinto Addition of MARIADB10_START_ENCRYPTION_EVENT 0xa4
* 19/09/2016 Massimiliano Pinto Added encrypt_binlog=0|1 option
*
* @endverbatim
*/
#define MXS_MODULE_NAME "binlogrouter"
#include <maxscale/cdefs.h>
#include <stdint.h>
#include <openssl/aes.h>
#include <pthread.h>
#include <stdint.h>
#include <zlib.h>
#include <maxscale/dcb.h>
#include <maxscale/buffer.h>
#include <maxscale/thread.h>
#include <maxscale/dcb.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/secrets.h>
#include <maxscale/service.h>
#include <maxscale/sqlite3.h>
#include <maxscale/thread.h>
MXS_BEGIN_DECLS

View File

@ -13,66 +13,33 @@
/**
* @file blr_file.c - contains code for the router binlog file management
*
*
* @verbatim
* Revision History
*
* Date Who Description
* 14/04/2014 Mark Riddoch Initial implementation
* 07/05/2015 Massimiliano Pinto Added MAX_EVENT_TYPE_MARIADB10
* 08/06/2015 Massimiliano Pinto Addition of blr_cache_read_master_data()
* 15/06/2015 Massimiliano Pinto Addition of blr_file_get_next_binlogname()
* 23/06/2015 Massimiliano Pinto Addition of blr_file_use_binlog, blr_file_create_binlog
* 29/06/2015 Massimiliano Pinto Addition of blr_file_write_master_config()
* Cache directory is now 'cache' under router->binlogdir
* 05/08/2015 Massimiliano Pinto Initial implementation of transaction safety
* 24/08/2015 Massimiliano Pinto Added strerror_r
* 26/08/2015 Massimiliano Pinto Added MariaDB 10 GTID event check with flags = 0
* This is the current supported condition for detecting
* MariaDB 10 transaction start point.
* It's no longer using QUERY_EVENT with BEGIN
* 23/10/2015 Markus Makela Added current_safe_event
* 26/04/2016 Massimiliano Pinto Added MariaDB 10.0 and 10.1 GTID event flags detection
* 11/07/2016 Massimiliano Pinto Added SSL backend support
* 16/09/2016 Massimiliano Pinto Addition of IGNORABLE_EVENT in case of a missing event
* detected from master binlog stream
* 19/09/2016 Massimiliano Pinto START_ENCRYPTION_EVENT is detected by maxbinlocheck.
* 21/09/2016 Massimiliano Pinto Addition of START_ENCRYPTION_EVENT: new event is written
* 25/11/2016 Massimiliano Pinto Binlog files can be encrypted with specified AES key
* and AES algorithm (Only AES_CTR right now).
* Events are decrypted before being sent to slaves.
* Events larger than 16MBytes are currently not suitable
* for ecryption/decryption.
* 29/11/2016 Massimiliano Pinto Binlog files can be encrypted with AES_CBC
*
* @endverbatim
*/
#include "blr.h"
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <fcntl.h>
#include <sys/types.h>
#include <unistd.h>
#include <maxscale/service.h>
#include <maxscale/server.h>
#include <maxscale/router.h>
#include <maxscale/atomic.h>
#include <maxscale/spinlock.h>
#include <maxscale/dcb.h>
#include <maxscale/spinlock.h>
#include <maxscale/paths.h>
#include <maxscale/log_manager.h>
#include <maxscale/alloc.h>
#include <inttypes.h>
#include <maxscale/secrets.h>
#include <maxscale/atomic.h>
#include <maxscale/dcb.h>
#include <maxscale/encryption.h>
#include <maxscale/log_manager.h>
#include <maxscale/paths.h>
#include <maxscale/router.h>
#include <maxscale/secrets.h>
#include <maxscale/server.h>
#include <maxscale/service.h>
#include <maxscale/spinlock.h>
#include <maxscale/utils.h>
/**
* AES_CTR handling

View File

@ -25,58 +25,32 @@
* The current prototype implement is designed to support MySQL 5.6 and has
* a number of limitations. This prototype is merely a proof of concept and
* should not be considered production ready.
*
* @verbatim
* Revision History
*
* Date Who Description
* 02/04/2014 Mark Riddoch Initial implementation
* 07/05/2015 Massimiliano Pinto Added MariaDB 10 Compatibility
* 25/05/2015 Massimiliano Pinto Added BLRM_SLAVE_STOPPED state
* 08/06/2015 Massimiliano Pinto Added m_errno and m_errmsg
* 23/06/2015 Massimiliano Pinto Master communication goes into BLRM_SLAVE_STOPPED state
* when an error is encountered in BLRM_BINLOGDUMP state.
* Server error code and msg are reported via SHOW SLAVE STATUS
* 03/08/2015 Massimiliano Pinto Initial implementation of transaction safety
* 13/08/2015 Massimiliano Pinto Addition of heartbeat check
* 23/08/2015 Massimiliano Pinto Added strerror_r
* 26/08/2015 Massimiliano Pinto Added MariaDB 10 GTID event check with flags = 0
* This is the current supported condition for detecting
* MariaDB 10 transaction start point.
* It's no longer using QUERY_EVENT with BEGIN
* 25/09/2015 Massimiliano Pinto Addition of lastEventReceived for slaves
* 23/10/2015 Markus Makela Added current_safe_event
* 26/04/2016 Massimiliano Pinto Added MariaDB 10.0 and 10.1 GTID event flags detection
* 22/07/2016 Massimiliano Pinto Added semi_sync replication support
* 24/08/2016 Massimiliano Pinto Added slave notification and blr_distribute_binlog_record removed
* 01/09/2016 Massimiliano Pinto Added support for ANNOTATE_ROWS_EVENT in COM_BINLOG_DUMP
* 11/11/2016 Massimiliano Pinto Encryption context is freed and set to null a new binlog file
* is being created due to ROTATE event.
*
* @endverbatim
*/
#include "blr.h"
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <maxscale/service.h>
#include <maxscale/server.h>
#include <maxscale/router.h>
#include <maxscale/atomic.h>
#include <maxscale/session.h>
#include <maxscale/dcb.h>
#include <maxscale/spinlock.h>
#include <maxscale/housekeeper.h>
#include <maxscale/buffer.h>
#include <maxscale/worker.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <maxscale/log_manager.h>
#include <maxscale/thread.h>
#include <maxscale/protocol/mysql.h>
#include <sys/types.h>
#include <maxscale/alloc.h>
#include <inttypes.h>
#include <maxscale/atomic.h>
#include <maxscale/buffer.h>
#include <maxscale/dcb.h>
#include <maxscale/housekeeper.h>
#include <maxscale/log_manager.h>
#include <maxscale/protocol/mysql.h>
#include <maxscale/router.h>
#include <maxscale/server.h>
#include <maxscale/service.h>
#include <maxscale/session.h>
#include <maxscale/spinlock.h>
#include <maxscale/thread.h>
#include <maxscale/utils.h>
#include <maxscale/worker.h>
static GWBUF *blr_make_query(DCB *dcb, char *query);
static GWBUF *blr_make_registration(ROUTER_INSTANCE *router);

View File

@ -14,22 +14,22 @@
#include "readwritesplit.hh"
#include <inttypes.h>
#include <stdio.h>
#include <strings.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <cmath>
#include <new>
#include <maxscale/router.h>
#include <maxscale/log_manager.h>
#include <maxscale/query_classifier.h>
#include <maxscale/alloc.h>
#include <maxscale/dcb.h>
#include <maxscale/spinlock.h>
#include <maxscale/log_manager.h>
#include <maxscale/modinfo.h>
#include <maxscale/modutil.h>
#include <maxscale/alloc.h>
#include <maxscale/query_classifier.h>
#include <maxscale/router.h>
#include <maxscale/spinlock.h>
#include "rwsplit_internal.hh"
#include "rwsplitsession.hh"

View File

@ -14,14 +14,15 @@
#include "readwritesplit.hh"
#include "rwsplit_internal.hh"
#include <strings.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <maxscale/alloc.h>
#include <maxscale/router.h>
#include <maxscale/hk_heartbeat.h>
#include <maxscale/modutil.h>
#include <maxscale/router.h>
/**
* The functions that support the routing of queries to back end

View File

@ -18,8 +18,9 @@
#include <inttypes.h>
#include <maxscale/alloc.h>
#include <maxscale/query_classifier.h>
#include <maxscale/modutil.h>
#include <maxscale/poll.h>
#include <maxscale/query_classifier.h>
namespace schemarouter
{