5122777829
Try to fix problem if balancing free client DCB and free session so that auth data is always available and client DCB is not freed until session is ready to be freed. Also fix problem in auth logic.
2016-02-24 10:00:45 +00:00
866e91c088
Changes to improve robustness of SSL processing, separate it so far as possible from protocols. Separate the detailed mechanism of authentication from the MySQL protocol with a view to making it into a module later.
2016-02-15 09:29:07 +00:00
971d1d5de2
Redesign logic of SSL connections to work with status in client DCB instead of in the protocol. This eases the way to moving SSL logic out of a specific protocol (currently MySQL) so as to be available across any protocol. Also, some simplification.
2016-02-03 08:54:55 +00:00
8367d93746
Migrate SSL functionality out of service and into listener. Develop config handling accordingly, including making provision for SSL parameters in servers for future use in implementing SSL to backend servers. Some elements still to be tidied mainly in mysql_client.c - but that will be part of detaching the SSL authentication from the MySQL protocol.
2016-01-27 15:46:19 +00:00
e58148356d
Split off listener functionality and move SSL initiation from service to listener. Put GWPROTOCOL in its own header file.
2016-01-26 16:08:02 +00:00
5515c71988
Reapply MXS-504 changes subsequent to optimisation changes. Merge SSL processing into non-SSL processing so far as possible, correct usage of OpenSSL, simplify where possible.
2016-01-13 10:08:37 +00:00
2afe60dd0e
Reindent server/core/dcb.c
2015-11-30 12:42:13 +02:00
6e9a2a89eb
Add dcb_hangup_foreach to DCB header.
2015-10-17 20:09:05 +01:00
12922225b8
Remove redundant DCB state DCB_STATE_FREED, remove obsolete assertion from poll.c, tidy up.
2015-08-25 09:11:44 +01:00
65c42e2d80
Move removal of closing DCB from poll list to the kill zombies processing, rather than immediately on close; modify persistent connections to obtain candidates for the pool from the kill zombies processing to be sure that they really are finished all previous processing.
2015-08-24 16:19:25 +01:00
4f5de063eb
Merged dcb_read and dcb_read_n into a single function (dcb_read with an extra parameter).
2015-07-10 15:12:22 +01:00
ba417ef633
Merge remote-tracking branch 'origin/develop' into MXS-122
...
Conflicts:
server/core/dcb.c
2015-07-08 14:54:22 +01:00
fffd8fb73a
Unify DCB close processing to single function dcb_close. Remove dcb_add_to_zombieslist (incorporating logic into dcb_close). Alter logic so that DCB that is just allocated will still go to zombie list if dcb->fd is not closed.
2015-07-07 16:57:12 +01:00
18a95eeb71
Simplify adding and removing DCBs from polling, improve error handling. Remove dcb_set_state functions as not adding value.
2015-07-07 16:57:12 +01:00
a72f462e2d
Fixes for MXS-196 and other related problems.
2015-07-07 16:57:12 +01:00
b880350cf3
Complete merge of latest develop branch
2015-06-22 10:39:13 +01:00
4c38e2224b
Merge remote-tracking branch 'origin/develop' into MXS-122
...
Conflicts:
server/core/CMakeLists.txt
server/core/dcb.c
server/include/dcb.h
server/include/server.h
server/modules/protocol/mysql_backend.c
2015-06-19 23:12:54 +01:00
267e702dcd
Various fixes and code tidying.
2015-06-10 11:28:25 +01:00
de2910f75b
Fixed SSL_accept failing if the GWBUF with the initial MySQL auth packet contains some of the SSL authentication data.
2015-06-09 22:27:15 +03:00
99e9987f9b
Clear persistent pool DCBs when server freed.
2015-06-09 08:26:14 +01:00
e395ab1442
Provide explicit time checking for age of persistent DCBs.
2015-06-03 16:47:02 +01:00
1a76fc141d
Add configuration capabilities for persistent connections.
2015-06-02 15:44:57 +01:00
fc8918b1f2
Added a dcb_connect_SSL function which starts a client SSL connection.
2015-06-02 09:15:08 +03:00
d7232d8b6e
Moved SSL structure to the DCB instead of the MySQL protocol.
...
This allows for non-MySQL SSL connections.
2015-06-01 20:51:26 +03:00
0f814d3e73
Added SSL write and read functions.
2015-05-29 13:00:37 +03:00
23e9a7b4e2
Try out some more changes.
2015-05-27 16:41:06 +01:00
6c5e6a5959
Move code around to fix headers problem etc.
2015-05-27 10:17:35 +01:00
fccb9df817
Add more status information to maxadmin displays
2015-05-26 14:54:32 +01:00
d7cd40e5a5
Bug fixes and improvements.
2015-05-22 15:53:54 +01:00
6f31357372
Initial changes for persistent connections - add some basic functionality.
2015-05-20 18:15:11 +01:00
5fb9353b47
Added session idle time and user name the client is connecting with to the dprintSession and dprintAllSessions functions. Also changed last_read from time_t to unsigned long to match the hkheartbeat.
2015-03-13 08:49:34 +02:00
1b0fd4576a
Merge branch 'maxinfo' into develop
...
Conflicts:
server/core/service.c
server/core/session.c
server/include/session.h
2015-03-04 11:33:00 +02:00
c47d2f3791
Added session timeouts.
...
The parameter 'connection_timeout' for services takes a value as seconds.
All sessions that have been idle for longer than this will be disconnected.
2015-02-20 22:16:43 +02:00
8eb14235d1
Addition of DCB and Poll statistics in show status output
2015-02-20 10:05:50 +00:00
da029140cd
dcb_call_foreach now only calls the callbacks for those DCBs that are connected to the server.
2015-02-18 05:36:39 +02:00
98cbc34c6c
Fix for bug #714
...
Fix for bug #714
2015-02-06 11:26:48 +01:00
e6607dca40
tee.c:
...
Added clientReply and setUpstream entry points
Tee filter now waits for the branch session to be replied to and if the reply isn't received in five seconds it closes the branch session.
dcb.h:
Added the DCBF_REPLIED flag that is currently only set in dcb_null_write
dcb.c:
The DCBF_REPLIED flag is now set in dcb_null_write
2014-12-30 17:40:47 +02:00
f0d8ed0cf2
Fix to #657 , http://bugs.mariadb.com/show_bug.cgi?id=657
...
session.c:session_free:if session is child of another service (tee in this case), it is the parent which releases child's allocated memory back to the system. This now also includes the child router session.
dcb.h: Added DCB_IS_CLONE macro
tee.c:freeSession:if parent session triggered closing of tee, then child session may not be closed yet. In that case free the child session first and only then free child router session and release child session's memory back to system.
tee.c:routeQuery: only route if child session is ready for routing. Log if session is not ready for routing and set tee session inactive
mysql_client.c:gw_client_close:if DCB is cloned one don't close the protocol because they it is shared with the original DCB.
2014-12-23 00:26:57 +02:00
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
43ed77b52b
Bug 515 Conditional arguemnt to gw_write
2014-11-19 16:43:21 +00:00
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
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
a30fc0c787
MAX-328, Add session identifier to trace log entries. Session id is given to session in session_alloc and stored to thread's local storage variable when thread picks a new event from epoll_wait.
2014-11-17 23:27:14 +02:00
9a5168c3e8
Put errors ganerating code behind FAKE_CODE macro, which is not defined by default in any build.
2014-11-10 15:22:08 +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
9e0a8a0eee
Addition of show eventstats
2014-10-23 13:38:46 +01:00
e729a17fd4
Addition of new tuning parameters for epoll spins and wait time
2014-10-17 12:28:27 +01:00
9186d3fa90
Fixes for blr_salve performanc issues, linking of embedded library,
...
housekeeper heartbeat addition and unloading of modules to allow
profiling of modules using LD_PROFILE environment variable and sprof
2014-10-01 18:30:13 +01:00
c4ca1ddb13
Updated non-source files with new company name.
2014-10-01 15:21:47 +03:00
b0683d9b4d
Updated the licensing year from 2013 to 2013-2014
2014-10-01 14:37:12 +03:00