Commit Graph

95 Commits

Author SHA1 Message Date
f6916a23bd Move responsibility for closing DCB on error to router error handling. Check that routers remove or disable links to closed DCB. 2015-09-09 09:33:00 +01:00
2e50dfd484 Readjust indentation in handleError function of read connection router. 2015-09-09 08:37:40 +01:00
986c918d52 Remove ERRACT_RESET action from router error handler; remove sole call from mysql_client. Correct comments on parameters for router error handlers. 2015-09-09 08:31:59 +01:00
4a1ad3df69 Attempt solution to crash caused by leaving link to backend DCB in router session. 2015-09-05 08:53:19 +01:00
78eab19c62 Fixed compiler warnings. 2015-07-14 17:13:09 +03:00
6497350ab7 Merge branch 'release-1.2' into develop
Conflicts:
	server/core/adminusers.c
	server/modules/protocol/mysql_client.c
2015-07-11 17:12:48 +03:00
fb09cbf100 Fixed queries being routed when the session is already closing. 2015-07-07 13:15:23 +03:00
09fdb0a2c2 Hopefully final tidy up. 2015-06-23 14:58:53 +01:00
d0e92a15f8 Move decrement of server connections into zombie processing; introduce dcb_close_finish to be called either in dcb_close or when persistent dcb is discarded. 2015-06-09 11:41:43 +01:00
3fb59e020b Added more logging to trace log. 2015-04-09 22:07:53 +03:00
8c36a45c69 Updated some logging to be only done if the logfiles are enabled. 2015-03-25 11:18:46 +02:00
5c68782050 Added more trace logging to readcounnroute, schemarouter and tee. 2015-03-24 21:28:03 +02:00
3a50b308b0 Set CPack RPM packaging version to 1 and added a RUNNING option to readconnroute. 2015-03-19 20:11:22 +02:00
b4f5a4eb9f Fix to MXS-32: https://mariadb.atlassian.net/browse/MXS-32
readconnroute now accepts RUNNING as server status when no router_options are given.
2015-03-19 15:44:14 +02:00
113ea8381b Complamentary fix to #694, added error flag reset to readconnrouter as well. 2015-01-16 11:56:20 +02:00
b3d79f7273 Merge branch 'release-1.0GA' into bug_679_fix 2015-01-02 20:57:28 +02:00
95cd0b93cb Fix to bug 679: http://bugs.mariadb.com/show_bug.cgi?id=679
Added server references to services instead of using a raw pointers to server instances.
Changed all references to service->database to service->dbref.
2015-01-02 20:55:38 +02:00
6228be4284 Fix to bug #678, http://bugs.skysql.com/show_bug.cgi?id=678
tee.c:routeQuery cloned partial MySQL packets to be routed to child router. Problems were due to the use of gwbuf_clone and modutil_MySQL_query which clone/examine only the first buffer from the buffer list which composes GWBUF.
modutil.c: Added function modutil_MySQL_query_len which calculates MySQL packet length and the missing bytecount
2015-01-02 18:32:57 +02:00
b0c152b55c Fixed debug assertion and protected read of client DCB's state and consistency. 2014-12-30 10:55:53 +02:00
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
a199a32301 Addition to bug 658 fix: http://bugs.mariadb.com/show_bug.cgi?id=658
readconnroute.c:Added backend state change handling.
2014-12-23 13:16:24 +02:00
0ade57e56e Fix to bug 658: http://bugs.mariadb.com/show_bug.cgi?id=658
readconnroute.c:Added a check for server status before routing the query.
2014-12-23 11:14:19 +02:00
ce056dccd8 Update modue status of all GA modules 2014-12-08 09:19:35 +00:00
fd11e6a7f5 Session-specific logging. Added functions
void session_enable_log(SESSION* ses, logfile_id_t id)
and
void session_disable_log(SESSION* ses, logfile_id_t id)

Which switch specific log type on/off if the log type in question is not generally enabled.

Each thread carries a thread-specific struct log_info_t which includes members for current session id and bitfield for enabled log types for the current session. That information is checked before actual log write functions are called.

Each file where session-specific logging is used, must include the following exports:

/** Defined in log_manager.cc */
extern int            lm_enabled_logfiles_bitmask;
extern size_t         log_ses_count[];
extern __thread log_info_t tls_log_info;
2014-11-19 00:08:59 +02:00
62270412cf readwritesplit.c: prevent switching the master during session. Added logging to cases where master has changed.
Moved DCB's member errhandle_called behing DEBUG flags to Release build. It shows if handleError is called for a DCB and makes it possible to avoid redundant calls.
2014-11-10 14:15:32 +02:00
9ccbab1899 poll.c:dcb_close Don't call poll_remove_dcb anymore if DCB has already been removed from poll set.
mysql_backend.c, mysql_client.c free error message GWBUF after calling handleError
readconnroute.c:handleError send error message to client before returning.
readwritesplit.c:handleError don't free error message buffer anymore since the caller of handleError frees it.
2014-11-01 20:00:59 +02:00
00fded016b Fixes to Coverity tasks : 73267, 72686, 72672
Cleaned up warnings, and added checks to malloc return values and error log writes in case of failures.
2014-10-31 15:25:59 +02:00
aca8596efa mysql_client.c:gw_client_close didn't close client session in cases where session->state == SESSION_STATE_STOPPING. That is a bug and lead to situation where session wasn't closed at all.
Also changed 'authorization failed' to 'access denied'
mysql_common.c: fixed memory leak in gw_receive_backend_auth, and replaced error code '2800' with '28000'.
readconnroute.c:handleError didn't set *succp pointer so uninitialized value was used in caller's context.
makefile.inc: added -lm to linker flags
mysql_backend.c: added a few comments
2014-10-06 11:46:12 +03:00
b0683d9b4d Updated the licensing year from 2013 to 2013-2014 2014-10-01 14:37:12 +03:00
f4e591e382 Changed 'SkySQL Gateway' to 'MariaDB Corporation MaxScale' 2014-09-30 13:15:03 +03:00
c344231f80 Renamed all occurences of SkySQL to MariaDB Corporation 2014-09-30 13:02:10 +03:00
d5e2410fe6 Fix for zero wieght in readconnrouter 2014-09-15 14:53:08 +01:00
744892e47c Support for MySQL Cluster
Support for MySQL Cluster with ndbcluster monitor and readconnroute
with router_option=ndb
2014-07-30 09:41:03 +02:00
4af2e58c86 Update plugin status to BETA 2014-07-04 09:23:40 +01:00
e586efcaae Comments updated in get_root_master
Comments updated in get_root_master
2014-07-01 16:03:22 +02:00
794438a248 Bug fix in get_root_master
bug fix in get_root_master if there is a server outside of the
replication tree or not monitored
2014-07-01 12:31:42 +02:00
787483f71c Merge branch 'develop' into MAX-90 2014-06-30 16:20:11 +01:00
6c1960e53b Increase accuracy of percentages for connection distribution. 2014-06-30 16:16:27 +01:00
32526d31b6 code cleanup
code cleanup
2014-06-27 18:14:46 +02:00
5cbc7b9f7d root server IN_MAINT returns NULL to caller
the replication tree returns NULL if the root server is maintenance mode
2014-06-27 17:55:46 +02:00
a25b757134 Merge branch 'develop' into MAX-90
Conflicts:
	server/core/server.c
	server/include/server.h
	server/modules/routing/readconnroute.c
2014-06-27 16:04:39 +01:00
ce2d20b70c Fixed printf format 2014-06-27 15:52:57 +01:00
25d4f784bc Implementation of server routing generic functionality and for readconnrouter 2014-06-27 12:07:47 +01:00
c13275c0e7 merge from develop
merge from develop
2014-06-26 21:27:22 +02:00
52646a9942 Fix compile warning
Fix compile warning
2014-06-26 21:22:33 +02:00
a351a5eb09 fix compile warning
fix compile warning
2014-06-26 21:17:49 +02:00
f246219beb Fix compile errors and warnings
Fix compile errors and warnings
2014-06-26 18:20:33 +02:00
1a33277f72 Merge from develop
Merge from develop
2014-06-26 17:08:21 +02:00
5a65bc2aaa get_root_master routine available
get_root_master routine available
2014-06-25 17:19:14 +02:00
1d1da398d4 Merge branch 'develop' into MAX-99
Conflicts:
	server/modules/routing/readwritesplit/readwritesplit.c
2014-06-25 17:50:29 +03:00