227 Commits

Author SHA1 Message Date
Markus Makela
a2bff1dcea Merge branch 'develop' into MAX-324 2015-02-16 14:58:35 +02:00
Markus Makela
14c510abef Added more doxygen documentation. 2015-02-13 10:18:54 +02:00
Mark Riddoch
faca6b6d76 Merge branch 'blr' into develop 2015-02-09 20:58:55 +00:00
Mark Riddoch
b58e09cdb7 Addition of some extra log messages and seconds behind master calcuation 2015-02-09 20:50:23 +00:00
Markus Makela
d455ec4c53 Added support for default databases. 2015-02-09 16:28:48 +02:00
Markus Makela
0d4761ade8 Merge branch 'develop' into MAX-324 2015-02-06 23:27:59 +02:00
Mark Riddoch
6da16c9958 Some tidy up of binlog rotuer code 2015-02-06 20:46:36 +00:00
Mark Riddoch
07536611d3 Add ability to extract values from the result set
Extract and action the @master_binlog_checksum value

Store master's uuid for use in show slave status

Support for MariaDB 5.5 masters
2015-02-04 15:59:28 +00:00
Markus Makela
86bed0541c Merge branch 'develop' into MAX-324 2015-02-04 13:01:43 +02:00
Mark Riddoch
0083e62c41 Merge branch 'blr' into develop 2015-02-03 17:19:06 +00:00
Markus Makela
7b8579163a Added dbshard technical documentation. 2015-02-03 11:26:53 +02:00
Markus Makela
b6cd0916a0 Fixed a deadlock when the same thread tried to route a reply and a query at the same time. 2015-02-01 21:39:35 +02:00
Markus Makela
a69e1d5f01 Added some error handling to shardrouter.
The shardrouter now handles situations where the subservice sessions have failed and returns an error if an attempt to
query such a service is made.
2015-01-30 22:28:01 +02:00
Mark Riddoch
0a9509168b Addition of cache for server responses. This allows cached responses to be sent
if there is no master avaiable when MaxScale starts
2015-01-28 08:44:13 +00:00
Markus Makela
08dd4d7053 First working implementation of the hierarchical router. 2015-01-25 21:24:22 +02:00
Markus Makela
8791cc455e Added the initial implementation of the shardrouter module. 2015-01-23 06:40:30 +02:00
Markus Makela
db1ea422a0 Merge branch 'develop' into MAX-324
Conflicts:
	server/core/modutil.c
2015-01-20 04:25:40 +02:00
VilhoRaatikka
5d1f029260 New fix candidate to bug #698, http://bugs.mariadb.com/show_bug.cgi?id=698
client/test/maxadmin_test.sh: added new cases for testing maxadmin
service.c:dListListeners:fixed NULL-pointer reference
debugcli.h: replaced magic number 80 with constant integer.
cli.c:execute:fixed command buffer overflow
debugcmd.c:convert_arg:restored return value to 0 in case of error
2015-01-19 17:55:02 +02:00
Markus Makela
f2ceaf166f Commented out old code and fixed a memory leak. 2015-01-16 07:41:10 +02:00
Markus Makela
c1ed24aa78 Initial implementation of session based sharding. 2015-01-14 10:47:04 +02:00
Mark Riddoch
af415f58c3 Add support for select @@max_allowed_packet 2015-01-07 17:38:41 +00:00
Markus Makela
fed828eb29 Merge branch 'release-1.0GA' into MAX-324
Conflicts:
	server/MaxScale_template.cnf
	server/core/service.c
2015-01-06 04:45:30 +02:00
VilhoRaatikka
635fcf708f Fix to bugs #665, and #664. Potentially to #649.
http://bugs.skysql.com/show_bug.cgi?id=665
http://bugs.skysql.com/show_bug.cgi?id=664
http://bugs.skysql.com/show_bug.cgi?id=649

dcb.c:dcb_final_free: (665):set dcb->session->client pointer to NULL so that it won't be read anymore and other threads won't try to close it.
	dcb_final_free:(664):don't free dcb->data, it is either freed in session_alloc if session creation fails or in session_free only.
session.c:if session creation fails, free dcb->data and remove links between client DCB and session.
mysql_backend.c:(665):gw_backend_close:check that session->client isn't NULL and that client DCB's state is still polling before calling dcb_close for it.
mysql_client.c:gw_mysql_do_authentication:if anything fails, and session_alloc won't be called, free dcb->data.
mysql_common.c:gw_send_authentication_to_backend:if session is already closing then return with error.
2014-12-29 20:19:01 +02:00
VilhoRaatikka
ff5fe23ce6 dcb.b:dcb_final_free:replaced ((dcb->flags & DCBF_CLONE)==0) with macro !DCB_IS_CLONE(dcb)
readwritesplit.h:Removed invalid macros which assumed that ROUTER_CLIENT_SES->rses_backend_ref always pointed to valid and used backend reference and thus included potential risk of NULL-pointer refernce.
mysql_backend.c and mysql_client.c:avoid executing CHK_PROTOCOL(p) after original DCB has been released the memory.
readwritesplit.c:Replaced RSES_CLEINT_DCB macro with a function which returns client DCB for a given router client session.
2014-12-23 16:10:27 +02:00
Mark Riddoch
a655e394ac Merge branch 'blr' into release-1.0GA
Conflicts:
	server/core/service.c
2014-12-16 15:44:19 +00:00
Mark Riddoch
909518fac7 Improved error messages
Support for running out of disk space in the binlog router

Support for COM_PING & COM_STATISTICS added in the binlog router

Addition of binlogdir router option
2014-12-16 10:38:09 +00:00
VilhoRaatikka
a4968f2521 Complete fix candidate for #645, http://bugs.skysql.com/show_bug.cgi?id=645 and #648, http://bugs.skysql.com/show_bug.cgi?id=648
tee.c:closeSession removed unnecessary dcb_free, router/service closes all backend DCBs and the client DCB, and client DCB is the one that was tried to free in closeSession.
readwritesplit.c:routeQuery now handles untyped and typed GWBUFs. Untyped means that read buffer may consist of incomplete and multiple MySQL packets. Typed buffer always consists of a single MySQL packet (which can be split to many buffers inside GWBUF).
Fixed Coverity cases #84840 and #84841
2014-12-14 11:26:15 +02:00
Markus Makela
a91845b324 Re-enabled the ignore list, it uses the parameter 'ignore databases=<list of db names>'.
Added routing of trivial queries and ignored databases to the first available backend.
2014-12-13 07:47:46 +02:00
Markus Makela
a7cc40dc6a Added error message generation for non-existent databases and backend status checks. 2014-12-11 11:45:40 +02:00
Mark Riddoch
df1ff25be4 Changes for file system full detection 2014-12-10 09:07:14 +00:00
Markus Makela
78d09c35cb Added functions for shard runtime updating. 2014-12-09 14:12:12 +02:00
VilhoRaatikka
bc104c0ef1 Merge branch 'release-1.0GA' into MAX-324 2014-12-08 22:37:15 +02:00
Markus Makela
e76215bf07 Added detection of COM_INIT_DB 2014-12-08 11:15:10 +02:00
Markus Makela
0348df5147 Fixed databases being queried without a username or password and ignored the default databases when checking for shards. 2014-12-07 13:16:53 +02:00
VilhoRaatikka
68fc849c6e query_classifier.cc:cleaned up some intendentions and brackets.
dbshard.h:removed unnecessary code
dbshard.c:removed unnecessary code, cleaned up a bit and made some required changes
readwritesplit.c:removed two unnecessary variable assignments.
2014-12-07 00:34:23 +02:00
VilhoRaatikka
b1eaaea961 Merge branch 'release-1.0GA' of https://github.com/mariadb-corporation/MaxScale into release-1.0GA 2014-12-05 23:57:02 +02:00
VilhoRaatikka
01b1b0a304 Fixes to Coverity issues 84388, 84386, 84385
mysql_mon.c: Added back server state logging to Debug build.
query_classifier.cc: removed some extra debug code, cleaned up a bit function documentation.
mysql_client_server_protocol.h, mysql_backend.c, mysql_common.c: changed some variables to signed ones to enable checking of calculations in the code.
skygw_utils.cc: removed erroneous debug assertion.
2014-12-05 23:39:14 +02:00
Mark Riddoch
e102d56e69 Merge branch 'blr' into release-1.0GA
Conflicts:
	server/modules/protocol/mysql_backend.c
	server/modules/routing/binlog/blr_master.c
2014-12-05 11:42:02 +00:00
Mark Riddoch
2b998eb17f Merging binlog router into beta refresh 2014-12-05 11:30:03 +00:00
VilhoRaatikka
7079cb4749 Cleaned a bit 2014-12-03 10:35:34 +02:00
MassimilianoPinto
33f77303f7 Backend failed handshake is now a detected
Backend failed handshake is now a detected and MYSQL_HANDSHAKE_FAILED s
set.

Reload users from backend is now restricted to MYSQL_AUTH_FAILED only
2014-12-03 09:11:26 +01:00
VilhoRaatikka
ef4f9aac4f Merge branch 'MAX-324' of https://github.com/mariadb-corporation/MaxScale into MAX-324
Conflicts:
	server/modules/include/dbshard.h
	server/modules/routing/dbshard/dbshard.c
2014-12-01 19:34:20 +02:00
VilhoRaatikka
dd600d025a Added dbshard.h 2014-12-01 15:53:48 +02:00
Markus Makela
66164aa664 Added functions that query backend servers for database names 2014-12-01 14:27:33 +02:00
Mark Riddoch
863a30c969 Merge branch 'blr' of https://github.com/mariadb-corporation/MaxScale into blr
Conflicts:
	server/core/gateway.c
2014-11-26 08:47:50 +00:00
Mark Riddoch
ba44605cb0 Changes for FDE events 2014-11-21 15:01:38 +00:00
Mark Riddoch
d3c8770852 Merge branch 'blr' into develop
Conflicts:
	client/maxadmin.c
	server/core/CMakeLists.txt
	server/core/dcb.c
	server/core/gateway.c
	server/core/poll.c
	server/core/test/CMakeLists.txt
	server/core/test/makefile
	server/include/poll.h
	server/modules/routing/debugcmd.c
2014-11-19 12:00:55 +00:00
VilhoRaatikka
c9b679359f Made RWSplit to use slave selection criteria also during client session. Previously the criteria was use when slaves were selected for use of client session. 2014-11-17 13:40:18 +02:00
VilhoRaatikka
175711a1bc Fix to #601, http://bugs.skysql.com/show_bug.cgi?id=601
if (func.auth ==)gw_change_user->gw_send_change_user_to_backend is called before backend has its scramble, auth packet is set to backend's delauqueue instead of writing it to backend. When backend_write_delayqueue is called COM_CHANGE_USER packets are rewritten with backend's current data.
2014-11-13 17:55:29 +02:00
MassimilianoPinto
49d28bc1f3 MySQL connect: charset flag is stored
MySQL connect: charset flag is stored and passed to backend
2014-11-10 16:09:55 +01:00