169 Commits

Author SHA1 Message Date
Markus Makela
ebb3b52fdb Included the my_config.h header before any system headers if mysql headers were used. 2014-10-10 12:30:21 +03:00
counterpoint
e17607b0d3 Minor changes to tests; fix typo; tidy up. 2014-10-03 17:24:46 +01:00
Markus Makela
b0683d9b4d Updated the licensing year from 2013 to 2013-2014 2014-10-01 14:37:12 +03:00
Markus Makela
f4e591e382 Changed 'SkySQL Gateway' to 'MariaDB Corporation MaxScale' 2014-09-30 13:15:03 +03:00
Markus Makela
c344231f80 Renamed all occurences of SkySQL to MariaDB Corporation 2014-09-30 13:02:10 +03:00
Mark Riddoch
c4fb3e490b Bug 546 - use of weghtby causes entry in error log 2014-09-19 15:52:44 +01:00
MassimilianoPinto
7b115fed2b merge branch MAX-252 for bug-524
merge branch MAX-252 for bug-524
2014-09-12 17:41:37 +02:00
MassimilianoPinto
7108add6f5 code cleanup localhost_match_wildcard_host
code cleanup for localhost_match_wildcard_host
2014-09-12 17:21:34 +02:00
Mark Riddoch
46c4808c79 Bug 494 - remove error log report for missing servers for debugcli and cli router 2014-09-12 15:45:10 +01:00
MassimilianoPinto
8818f23176 Added localhost_match_wildcard_host parameter
Added localhost_match_wildcard_host parameter to service
2014-09-12 16:24:55 +02:00
MassimilianoPinto
3bb614d9eb brand release-1.0beta-refresh merged
brand release-1.0beta-refresh merged
2014-09-12 16:00:36 +02:00
Mark Riddoch
7069ee2549 Added checks to determine if servers in the servers= lists for services and
monitors exist in the configuration file.
2014-09-12 12:16:39 +01:00
MassimilianoPinto
8b5b4a17fe Merge from Z3
Merge from Z3
2014-09-11 12:51:16 +02:00
MassimilianoPinto
7245d1baa1 blr branch merge
blr branch merge
2014-09-11 12:20:42 +02:00
MassimilianoPinto
f15815c6bb New service parameter localhost_match_any
New service parameter ‘localhost_match_any’ allows localhost matching
the wildcard host.

Default value is 0, don’t match.
It may be changed if backend servers don’t have the anonymous user
‘’@localhost
2014-09-10 17:12:25 +02:00
VilhoRaatikka
025f920ddb Replaced RWSplit parameters write_ses_variables_to_all and read_ses_variables_from_slaves with
use_sql_variables_in=[master|all] (default all)
Modified MaxScale Configuration And Usage Scenarios-Z3.pdf and MaxScale_template.cnf accordingly.
Fixed typo in server/modules/routing/readwritesplit/test/rwsplit.sh
2014-09-10 11:32:53 +03:00
VilhoRaatikka
f74493d922 server/modules/filter/Makefile: Fixed problem which prevented cleaning and compiling hintfilter library.
server/core/config.c: Removed unused if..else block from config_get_valint. Changed it also to return value which indicates whether the operation succeed. Added config_get_valbool similar to config_get_valint.
service.c:Added typelib-like struct and array of valid boolean values. Fixed parameter type test in service_set_param_value. Completed boolean type parameter handling.
hintparser.c:Fixed error message for non-maxscale hints.
readwritesplit.c:Added loading of configuration parameters from service to instance and from instance to each new session. Fixed routing condition in get_route_target. Modified get_route_target so that it takes also rw_read_sesvars_from_slaves and rw_write_sesvars_to_all as parameters.
skygw_types.h: added array size counting macro.
2014-09-08 21:44:23 +03:00
VilhoRaatikka
92889ad216 config.c: Added configuration parameter processing for read_ses_variables_from_slaves and for write_ses_variables_to_all . The values are read from config file, qualified and stored to service. Values are loaded when instance is created. This is limitation in current implementation and will change so that configuration is dynamically changeable. 2014-09-07 23:48:16 +03:00
Mark Riddoch
a4ae7ea139 Fix for bug 493 - Multiple config file sections with the same name 2014-09-01 17:18:15 +01:00
MassimilianoPinto
63d267e5ef Fix for broken replication
Fix for broken replication has been added to mysql_monitor.
Both Slave_IO  and Slave_SQL threads must be running in order to assign
the SERVER_SLAVE status but If only Slave_IO is running let’s assign
the master_id to current server and continue building the replication
tree; if no slaves at all the master will be still available.
The “detect_stale_master” option has been added, its default is 0.
If set to 1 the monitor will keep the last detected master even if the
replication setup is completely not working, i.e. both Slave_IO  and
Slave_SQL threads are not running: this applies only to the server that
was master before.
After monitor or MaxScale are restarted and the replication is still
stopped or not configured there will be no master because it’s not
possible to compute the replication topology tree.
2014-09-01 11:18:57 +02:00
Mark Riddoch
81e1dd8719 Merge branch 'develop' into blr
Add instrumentation

Remove mutexes

Improve gwbuf_append performance

Conflicts:
	server/core/dcb.c
	server/modules/protocol/mysql_backend.c
2014-08-28 11:41:26 +01:00
Mark Riddoch
493feb49ba Fix for bug 410 - MaxScale.cnf server option is not parsed for spaces 2014-08-22 14:46:26 +01:00
VilhoRaatikka
8ffca16368 Added consistency check for detect_replication_lag and max_slave_replication_lag and router_options=slave_select_criteria=LEAST_BEHIND_MASTER
Fixed a bug in service_add_qualified_param which didn't handle param list correctly.
2014-07-01 16:54:16 +03:00
VilhoRaatikka
b875936a21 MAX-94, Added configuration parameter, max_slave_replication_lag=<longest allowed replication lag in seconds> to router section.
Parameter can be changed runtime but it requires reloading of config.
2014-06-30 22:35:27 +03:00
Mark Riddoch
25d4f784bc Implementation of server routing generic functionality and for readconnrouter 2014-06-27 12:07:47 +01:00
Mark Riddoch
9f6a1061c6 Config fix 2014-06-16 08:10:34 +01:00
Mark Riddoch
fda9b1c706 Merge branch 'develop' into blr
Conflicts:
	server/core/dcb.c
	server/modules/include/blr.h
	server/modules/routing/binlog/STATUS
	server/modules/routing/binlog/blr.c
	server/modules/routing/binlog/blr_file.c
	server/modules/routing/binlog/blr_master.c
	server/modules/routing/binlog/blr_slave.c
2014-06-08 00:50:36 +01:00
Mark Riddoch
13e95ffc53 Improved diagnostics
Added master reconnect on failure

Added EPOLLRDHUP events
2014-06-07 21:01:11 +01:00
VilhoRaatikka
047dd5f90e process_config_update didn't handle filter type which caused erroneous message being printed to error log. 2014-06-05 21:09:23 +03:00
Mark Riddoch
01af5d1aef Fix for config file ordering 2014-06-05 15:08:49 +01:00
Mark Riddoch
57e910ad3d Addition of the module utilities functions 2014-06-04 18:34:24 +01:00
Mark Riddoch
b764745fc3 Merge branch 'develop' into MAX-65
Conflicts:
	server/core/config.c
2014-06-02 18:07:09 +01:00
Mark Riddoch
589ed75d32 Addition of alternative truth values in the config file, on, off, true
or false can now be used as well as 0 and 1 when defining the
enable_root_user parameter.
2014-05-30 18:14:21 +01:00
Mark Riddoch
8d55be4b23 First working filters implementaton.
Only downstream filters are supported currently, i.e. no result
set filtering can be done.

A crude QLA (Query Log All) filter is included as a test harness only
2014-05-30 16:45:39 +01:00
MassimilianoPinto
71bc2ba3ee set maxscale_id updated
set maxscale_id updated
2014-05-29 09:43:21 +02:00
MassimilianoPinto
5899fe0000 new parameters added for monitors
new parameters added for monitors
2014-05-28 18:11:07 +02:00
MassimilianoPinto
d0a30748ab Branch update
Branch update
2014-05-28 14:52:04 +02:00
MassimilianoPinto
77b790efbf Replication lag support in server struct
Replication lag support in server struct and configuration
2014-05-28 14:47:35 +02:00
MassimilianoPinto
f80f8ce26d monitorID and monitor_interval
monitorID and monitor_interval
2014-05-28 10:06:49 +02:00
MassimilianoPinto
378d00983d merge from branch 'cenh'
merge from branch ‘cenh’
2014-05-26 12:15:34 +02:00
MassimilianoPinto
3c66c9c764 update
update
2014-05-26 11:39:10 +02:00
MassimilianoPinto
38401bbd2c update
update
2014-05-26 11:36:46 +02:00
Mark Riddoch
c1d39999ff Improvements to debug interface & blr updates 2014-05-21 17:25:21 +01:00
Mark Riddoch
9777e83a5a Merge branch 'master' into blr 2014-05-19 13:46:47 +01:00
VilhoRaatikka
25cb08cc29 Return value of service_alloc wasn't read and caused MaxScale to fail if module load failed. 2014-05-12 16:59:19 +03:00
VilhoRaatikka
b7ae1c1784 Added router_option slave_selection_criteria=[LEAST_GLOBAL_CONNECTIONS(default)|LEAST_BEHIND_MASTER] to readwritesplit section.
The option is reloadable in the same way as max_slave_connections parameter. Option value determines which sort function is called before to sort backend server pointers before selecting them and establishing connections to backends.
2014-05-11 23:59:16 +03:00
MassimilianoPinto
e228baf256 version_string is a new service parameter
version_string is a new service parameter.

Documentation updated and current release is now 0.6.0
2014-05-09 20:13:45 +02:00
VilhoRaatikka
a1361d9c9e Related to MAX-95, added code which makes it possible to change max_slave_connections parameter value during run time of MaxScale. The change will be effective in rwsplit sessions created after the configuration modification and reload. Note that in order to config modification to be effective, the user must connect the debug interface of MaxScale (telnet) and execute 'reload config'.
In practice, 'reload config' reads config file and updates config parameters of rwsplit router service. In addition to that there is a version number indicating what generation of configuration service holds. When router instance is created (when MaxScale is started) service's config version is copied to router intance. Whenever new client connection (rwsplit session) is started, router instance's config version is checked against that of service's. If versions differ, service's config data is copied to router instance. New session will be started with router instance's config values.
2014-05-02 16:35:40 +03:00
VilhoRaatikka
b5e9428ff7 log_manager.cc fixed memory leak, block buffer mutex names weren't freed.
query_classifier.cc use of uninitialized value in skygw_stmt_causes_implicit_commit
config.c crashed if module load failed, use of unitialized value
load_utils.c pretty-printed error
service.c use of uninitialized value in service_add_qualified_param
modules.h function prototype
readwritesplit.c memory leaks
2014-04-29 14:50:09 +03:00
VilhoRaatikka
28bc3509cc Added new parameter RW Split Router.max_slave_connections=[<int>|<int>%] which specifies the maximum number of slaves which read/write split router connects in each routing session.
Parameter it read from config file to CONFIG_CONTEXT's parameter list. It is qualified in service.c:service_set_slave_conn_limit and if qualified, the qualified integer value and the value type are copied to the CONFIG_PARAMETER structure.

This CONFIG_PARAMETER struct is cloned (=copied to different memory area) and linked to RW Split SERVICE struct.

When RW Split router_instance is created in readwritesplit.c:createInstance, the value is copied to (new) rwsplit_config_t structure from SERVICE's parameter list.

When new routing session is created in readwritesplit.c:newSession, the rwsplit_config_t structure is copied to ROUTER_CLIENT_SES struct and the actual max_nslaves value is calculated from the config value (if percentage is used).

Tests and many error handling branches are missing but functionality seems to be working.
2014-04-24 22:05:26 +03:00