43 Commits

Author SHA1 Message Date
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
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
MassimilianoPinto
9b833b9464 Added 'socket' to the parameter list and moved EPOLLERR and EPOLLHUP after processing of EPOLLIN and EPOLLOUT.
Added 'socket' to the parameter list and moved EPOLLERR and EPOLLHUP
after processing of EPOLLIN and EPOLLOUT.
2014-03-14 16:43:41 +01:00
MassimilianoPinto
9a11a3241b UNIX socket support
UNIX socket support
2014-03-11 13:00:34 +01:00
MassimilianoPinto
93fc31d9d9 enable_root_user option added to service_params list
enable_root_user option added to service_params list
2014-02-14 11:39:21 +01:00
Mark Riddoch
1742372dd5 Added support for defining a bind address in the listener config.
Also removed some compilation warnings.

See Bugzilla bug 150
2014-02-06 19:04:12 +01:00
MassimilianoPinto
e4876b3abb Enable/disable root user in services
Added support for enable/disable root user, this is currently used in
MySQL authentication
2014-02-06 15:58:37 +01:00
Mark Riddoch
fb8212543a Fixed issue with MaxScale crash if a configuration unknown section
without a type is added. This is Bgzilla bug 378.
2014-02-05 10:48:52 +01:00
vraatikka
d403018fd9 Surrounded every log writing command with LOGIF macro, which tests if the given logfile id matches with those enabled. The comparison is done against local variable and expensive function call is avoided. 2013-12-12 16:14:33 +02:00
Mark Riddoch
84fbf15bef Updates configuration for backward compatibility and improved error handling 2013-12-02 15:14:52 +00:00
vraatikka
4b1527b1c8 query_classifier.cc
Replaced fprintf's with log write commands, removed the second argument from call of mysql_reset_thd_for_next_command(thd) according to changes in mariadb/5.5/sql/sql_parse.c #rev 3958.

server/Makefile
	Instead of installing MaxScale.cnf (and overwriting previous config file), install MaxScale_template.cnf to DEST directory.

config.c
	Replace references to 'Gateway' with 'MaxScale', change configuration parameter 'auth' to 'passwd' as it is named in other instances where referenced to password.
2013-11-20 15:55:43 +02:00
vraatikka
836c7ad76d Removed erroneous Warning print. Monitor users and passwords are read in different place. 2013-11-12 15:20:04 +02:00
vraatikka
701830f0ab Logging related (mostly) sanity checks and fixes.
- Checked argument types and counts
- Removed trailing line feeds
- Removed thread ids from error logs (they are used in trace / debug log
- Added some state information to dcbs
- Added prefix 'Error' or 'Fatal' to error logs.
- Switches all error logs to use flushing log write.
2013-09-30 11:14:36 +03:00
Mark Riddoch
fe7d0477ba Improved configuration object checking 2013-09-26 10:37:55 +02:00
Mark Riddoch
947fc3509b Make configuration file reading more robust 2013-09-25 17:50:12 +02:00
Mark Riddoch
5d22884a9b Fixed NULL pointer issue 2013-09-25 16:36:54 +01:00
Mark Riddoch
ed7c32fb88 Bug 124 - config file validation 2013-09-25 16:25:12 +01:00
Mark Riddoch
a445b6ff37 Fixes for NULL test for function returns such as malloc() - as reported by Coverity 2013-08-29 13:34:21 +02:00
vraatikka
eba81f0501 Corrected comparison between strcmp and 0 so that threads configuration parameter value becomes effective. 2013-08-14 11:25:03 +03:00
vraatikka
cae4d38a7e Removed unnecessary argument from log manager commands because it is not used and it is always NULL. 2013-08-04 23:30:47 +03:00
Timofey Turenko
a7c82310f9 moving files to /server to make merge possible 2013-07-28 05:31:11 +00:00