Commit Graph

431 Commits

Author SHA1 Message Date
5fba84a4ee poll.c : forgot from previous commit
debugcmd.c : cannot compile.
2013-09-17 00:16:06 +03:00
8bf73ea154 Replaced write system function with wrapper gw_write. It allows for generating failures by using telnet commands, fail backendfd, fail clientfd, which are available in debug build only. 2013-09-17 00:07:56 +03:00
c3fba63b45 Added break in routeQuery switch, avoiding the execution of default.
This was noticed during PHP tests with mysql_change_user


This bug is related to recent code modification in readconnroute.c, revno > 362

Now fixed
2013-09-13 19:17:20 +02:00
bbc9dcc9a3 poll.c: added maxscale thread id to log
session.c: Replaced free(session->router_sesision) with call to freeSession callback
users.c: Removed reference to uninitialized variable.
router.h: Added freeSession callback to function block.
mysql_backend.c: try to ensure that client dcb is still listening in epoll_wait when writing reply to it.
mysql_common.c: assert debug build is mysql_protocol_init is called with dcb == NULL
readconnroute.c, readwritesplit.c, debugcli.c and testroute.c : Added freeSession to function block and an inmplementation of it.
2013-09-12 22:17:11 +03:00
83a7479236 Removed free(router_session) from closeSession. Router session is free in session.c:session_free. 2013-09-09 14:51:15 +03:00
189fdf35b8 Major changes: Removed NULL-pointer assignment after the call of backend_dcb->func.close because backend_dcb->func.close calls gw_client_close which _always_ returns true. Thus, its return value can't be used for deciding whether backend_dcb pointer can be set to NULL. There are typically multiple threads executing backend dcb. Setting NULL here will cause next caller to refer to NULL pointer, which makes maxscale to fail.
Removed freeing router session object because it is not know at this phase whether session is really closed or not. Router session can be freed only when session is.
2013-09-08 23:59:00 +03:00
b01cf2365e Added log error or ss_dassert instead of silent returning 2013-09-04 15:31:04 +02:00
8debc4433c Added a client NULL check in clientReply 2013-09-04 11:37:56 +02:00
ce0085a078 Clean up. 2013-09-01 00:37:49 +03:00
786468fc5d Added status checks, removed some dead code, changed macros to enumerated types, renamed variables to reflect better what they mean. 2013-08-28 22:59:53 +03:00
0612dae890 Added error log printing. 2013-08-23 22:31:08 +03:00
481096ccef Added trace log to newSession and to closeSession. 2013-08-22 10:46:14 +03:00
4e41fc49f5 Bug 166 - NULL pointer dereferenced if candidate server is NULL 2013-08-21 12:08:41 +02:00
0021eddfee Bug 154 - Added warning if options are set for the read/write splitter and updated example config file. 2013-08-19 15:53:08 +02:00
fbc311730c Bug 124: Add log message when an invalid router option is supplied 2013-08-13 15:14:32 +02:00
2e11a26f41 Fixed bug on candidate selection. I misinterpreted count and n_connections variables. Thus, renamed count as current_connection_count to make it more understandable. 2013-08-13 12:12:19 +03:00
c1c8bf9fc5 Removed unnecessary loop of servers. Now we loop over all the servers, if running server is found and candidate is not set we set that server as candidate. If candidate is set and we find any that have fewer connections than our candidate server. If a server has less connections than the current candidate we mark this as the new candidate to connect to. If a server has the same number of connections currently as the candidate and has had less connections over time than the candidate it will also become the new candidate. This has the effect of spreading the connections over different servers during periods of very low load. 2013-08-13 11:55:34 +03:00
7522eb617d Added enable/disable commands, now for log_witer only 2013-08-09 15:12:23 +02:00
6c106bb9be Removed #if defined(SS_DEBUG) macros around trace log print commands. Trace log is disabled by default but it is meant to be possible to enable it with other than debug build only. 2013-08-09 15:27:02 +03:00
1ab8420e91 Added an example to user command : help show dbusers and removed erroneous complain about unknown subcommand if show dbusers is called without arguments. 2013-08-08 15:46:33 +03:00
d94153c29f If maxscale is compiled with DEBUG=Y readconnrouter module writes slave selection info to trace log. Example:
SkySQL MaxScale Thu Aug  8 00:01:08 2013
------------------------------------------
2013 08/08 00:01:17  Selected server in port 3003 to as candidate. Connections : 0 
2013 08/08 00:01:17  Examine server in port 3002 with 0 connections. Status is 5, inst->bitvalue is 6
2013 08/08 00:01:17  Examine server in port 3001 with 0 connections. Status is 5, inst->bitvalue is 6
2013 08/08 00:01:17  Examine server in port 3000 with 0 connections. Status is 3, inst->bitvalue is 6
2013 08/08 00:01:17  Final selection is server in port 3003. Connections : 1 
2013 08/08 00:01:22  Selected server in port 3003 to as candidate. Connections : 1 
2013 08/08 00:01:22  Examine server in port 3002 with 0 connections. Status is 5, inst->bitvalue is 6
2013 08/08 00:01:22  Examine server in port 3001 with 0 connections. Status is 5, inst->bitvalue is 6
2013 08/08 00:01:22  Examine server in port 3000 with 0 connections. Status is 3, inst->bitvalue is 6
2013 08/08 00:01:22  Final selection is server in port 3002. Connections : 1
2013-08-08 00:10:33 +03:00
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
b3302b1bad Renamed reload users to reload dbusers. 2013-08-03 23:29:45 +03:00
26e4422c4d Removed shutdown gateway command from debug commands 2013-08-03 23:21:21 +03:00
ca3638ae2c Added 'remove user' to client API. New functions are
debugcmd.c : telnetdRemoveUser
adminusers.c : admin_remove_user

Also renamed admin_test_user to admin_search_user .
2013-08-02 23:03:43 +03:00
3357748aad Some typos fixed 2013-08-02 10:00:56 +02:00
ce8ce5b8fd Added a check for candidate server, if NULL return 2013-07-31 16:18:45 +02:00
b71b22b18a Removed dependency files because they are now created as a part of makefile processing. 2013-07-30 15:07:50 +03:00
f3cf1d703e Removed depend.mk files. Added command 'touch depend.mk' to each Makefile which attempts to include depend.mk. That is for the makefile process phase where only the existence of depend.mk is checked. Later the real file is created in 'depend' target. 2013-07-30 11:43:39 +03:00
636e5b619c fix Makefile to comply with new dirs 2013-07-29 09:39:46 +03:00
a7c82310f9 moving files to /server to make merge possible 2013-07-28 05:31:11 +00:00