f2f119f692Removed some dead code
vraatikka
2013-08-28 23:08:51 +03:00
9a8e271417client->data is copied to session->data already in session_alloc to ensure that authentication information is set when background connection is started to establish in concurrent thread.
vraatikka
2013-08-28 23:06:09 +03:00
786468fc5dAdded status checks, removed some dead code, changed macros to enumerated types, renamed variables to reflect better what they mean.
vraatikka
2013-08-28 22:59:53 +03:00
8c8475740aSwitched to booleans defined in stdbool.h
vraatikka
2013-08-28 22:49:27 +03:00
34b26ad85fChanged enum-type boolean to whta is defined in stdbool.h, and in practise replaced TRUEs and FALSEs with true, and false, respectively.
vraatikka
2013-08-28 22:47:14 +03:00
ff109c6319dcb->state set wheere missing or changed
Massimiliano Pinto
2013-08-27 10:52:43 +02:00
d0d68a69caAdded DCB_STATE_XXX in EPOLLIN/EPOLLOUT handlers and in accept()
Massimiliano Pinto
2013-08-27 10:08:03 +02:00
49036894f5In gw_connect_to_backend, first create socket, and establish socket connection, then in the end, dcb is added to epoll set.
vraatikka
2013-08-24 00:18:46 +03:00
df5f2f29b2Removed undefined function declaration. Added trace and error log.
vraatikka
2013-08-23 23:25:12 +03:00
c9ff06e0f5Increased maximum path length from 180 to 255, and replaced sprintf with snprintf to prevent buffer overflow.
vraatikka
2013-08-23 22:27:40 +03:00
52c30c3e58Removed dcb->state set after func.close()
Massimiliano Pinto
2013-08-23 14:17:00 +02:00
68a5a389eeRemoved SS_DEBUG macros around necessary include directives.
vraatikka
2013-08-23 13:42:10 +03:00
481096ccefAdded trace log to newSession and to closeSession.
vraatikka
2013-08-22 10:46:14 +03:00
0401290021Added spinlock ses_lock to struct SESSION to ensure that for each session closeSession is called only once. closeSession is called from mysql_backend.c:gw_read_backend_event, and from dcb.c:dcb_close.
vraatikka
2013-08-22 10:42:18 +03:00
4138281183setvbuf was called before testing whether file creation succeed. That caused server to fail if MAXSCALE_HOME was exceptionally long.
vraatikka
2013-08-22 00:32:49 +03:00
76de8f3758log manager now spreads log writings 'down' so that LOGFILE_ERROR logs are duplicated in LOGFILE_MESSAGE, and in LOGFILE_TRACE, and LOGFILE_MESSAGE logs are duplicated in LOGFILE_TRACE.
vraatikka
2013-08-20 10:43:54 +03:00
2ad0b12d79Check dcb->status and set new state with writeqlock on.
vraatikka
2013-08-19 19:41:47 +03:00
c5ed473ab7Check return value of ioctl in dcb_read and act accordingly.
vraatikka
2013-08-19 19:40:51 +03:00
ea79b38e4fCheck return value of dcb_read and if it failed, don't access head of linked list.
vraatikka
2013-08-19 19:39:47 +03:00
45ea459e20Check the return value of ioctl in dcb_read.
vraatikka
2013-08-19 17:09:33 +03:00
0021eddfeeBug 154 - Added warning if options are set for the read/write splitter and updated example config file.
Mark Riddoch
2013-08-19 15:53:08 +02:00
c119f7b7b8In dcb_close read and set dcb->state by holding dcb->writeqlock. This prevents simultaneous calls to closeSession.
vraatikka
2013-08-19 16:38:55 +03:00
05a3978442Modified gw_read_client_event so that it only calls mysql_send_ok after new sessions has been set up and initialized.
vraatikka
2013-08-19 13:02:04 +03:00
24367fb400Removed dcb->mutex since it didn't solve any problem.
vraatikka
2013-08-19 13:01:07 +03:00
a5dd900acbAdded test cases for speading log messages
vraatikka
2013-08-19 12:58:36 +03:00
4e63df8df8Disabled spreading of log writes temporarily.
vraatikka
2013-08-19 11:31:53 +03:00
c2743e7543Logfiles are ordered by their id as follows: LOGFILE_ERROR = 1 LOGFILE_MESSAGE = 2 LOGFILE_TRACE = 4
vraatikka
2013-08-19 10:28:28 +03:00
97b3da1d79Added simple_mutex_t dcb->mutex to DCB struct to protect processing of single dcb in poll.c:poll_waitevents. This is a coarse locking but seems to work with multiple threads at least with very simple load. Added trace logging to many locations.
vraatikka
2013-08-16 23:52:10 +03:00
7c0ed171a0Added trace log to event handling.
vraatikka
2013-08-15 22:45:11 +03:00
a1b05359acAdded trace log where epoll_wait returns and to where read fomr/write to socket decicion is made.
vraatikka
2013-08-15 20:16:23 +03:00
90e6e11923Added debug trace to socket read.
vraatikka
2013-08-15 11:13:34 +03:00
bed0206895If config file is specified in command-line argument, then it won't be searched from anywhere else. Earlier command-line argument was ignored if MAXSCALE_HOME was set.
vraatikka
2013-08-14 15:42:35 +03:00
eba81f0501Corrected comparison between strcmp and 0 so that threads configuration parameter value becomes effective.
vraatikka
2013-08-14 11:25:03 +03:00
b7d13af7f5Automatic merge
Jan Lindström
2013-08-14 06:33:16 +03:00
fbc311730cBug 124: Add log message when an invalid router option is supplied
Mark Riddoch
2013-08-13 15:14:32 +02:00
2e11a26f41Fixed bug on candidate selection. I misinterpreted count and n_connections variables. Thus, renamed count as current_connection_count to make it more understandable.
Jan Lindström
2013-08-13 12:12:19 +03:00
c1c8bf9fc5Removed 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.
Jan Lindström
2013-08-13 11:55:34 +03:00
8a31819d03Automatic merge
Jan Lindström
2013-08-13 09:33:49 +03:00
2d31d9ff5bInitialized addr length indicator in telnetd_accept
vraatikka
2013-08-12 21:06:44 +03:00
4360ae16b8Moved timestamp string creation to skygw_utils where it can be provide service for others too.
vraatikka
2013-08-12 13:09:29 +03:00
7522eb617dAdded enable/disable commands, now for log_witer only
Massimiliano Pinto
2013-08-09 15:12:23 +02:00
6c106bb9beRemoved #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.
vraatikka
2013-08-09 15:27:02 +03:00
a7f027090cMerge
Jan Lindström
2013-08-09 13:24:23 +03:00
dd4f5c88deFixed test compilation and small error.
Jan Lindström
2013-08-09 13:23:10 +03:00
0ad25ba3abAdded functions skygw_log_enable(logfile_id_t) and skygw_log_disable(logfile_id_t) to Log manager API. By calling them log writing to any of predefined log files can be switched on or off.
vraatikka
2013-08-08 23:38:00 +03:00
8a9d178785Fixed bug for invalid memory access in row[1]+1 when row[1] is ""
Massimiliano Pinto
2013-08-08 18:40:02 +02:00
1ab8420e91Added an example to user command : help show dbusers and removed erroneous complain about unknown subcommand if show dbusers is called without arguments.
vraatikka
2013-08-08 15:46:33 +03:00
1f3665c8b0Fixed compiler issue on connecting to server binlog using binlog position or gtid.
Jan Lindström
2013-08-08 10:32:08 +03:00
685f3b0bdaAutomatic merge
Jan Lindström
2013-08-08 08:30:01 +03:00
9b7f94da39test
Jan Lindström
2013-08-08 08:29:10 +03:00
4cf98bbb9fAdded more comments and test file.
Jan Lindström
2013-08-08 08:28:22 +03:00
d94153c29fIf maxscale is compiled with DEBUG=Y readconnrouter module writes slave selection info to trace log. Example:
vraatikka
2013-08-08 00:10:33 +03:00
f1498e4403Added log flusher thread, which flushes once per second.
vraatikka
2013-08-08 00:08:45 +03:00
a447583214If MaxScale.cnf exists, install takes a backup of it before overwriting it with version from maxscale/server.
vraatikka
2013-08-08 00:06:38 +03:00
dcc72f017euse ##VERSION_TAG## in .spec
ec2-user
2013-08-07 16:51:09 +02:00
719c8168e8fix .spec to work with Jenkins
ec2-user
2013-08-07 16:50:08 +02:00
75e7de182ffprintf debug for added backend connection is protected by if (backend->fd > 0)
Massimiliano Pinto
2013-08-07 09:39:29 +02:00
cd564b7628Merge
Jan Lindström
2013-08-06 20:09:50 +03:00
8f8798fa53Added a new directory structure and fixed boost compiler problems.
Jan Lindström
2013-08-06 20:07:45 +03:00
256b8e8013Added more test cases and reformatted output a bit.
vraatikka
2013-08-06 11:14:45 +03:00
30456115f7Memory used by user structure was not initialized. Changed malloc to calloc.
vraatikka
2013-08-05 18:21:08 +03:00
234b8c40a3Cleaned up some debug printings (to stdout).
vraatikka
2013-08-05 18:15:41 +03:00
13248c2a16Added server/core/test directory, makefile and testhash.c for testing hashtable implementation. In makefile, there is target all, which compiles and executes tests.
vraatikka
2013-08-05 18:04:02 +03:00
b852079631Enabled debug assertions for DEBUG=Y builds. Fixed one debug assertion in log manager.
vraatikka
2013-08-05 17:47:21 +03:00
bc6fe8f6efhashtable_add now checks input parameter and returns with zero (indicating that no elements were added) if hashsize is zero. Caused floating point exception.
vraatikka
2013-08-05 15:01:36 +03:00
ef1c514489Added creation of an empty depend.mk file to core directory.
vraatikka
2013-08-05 13:50:52 +03:00
401d4920e4Moved dcb_hashtable_stats from hastable.c to dcb.c to break dependency between hashtable and the rest of the maxscale. Added check fields to hashtable structure.
vraatikka
2013-08-05 11:51:10 +03:00
ee68633c22Removed unnecessary line
vraatikka
2013-08-05 10:25:45 +03:00
4cc301f415Fixed error on product build.
Jan Lindström
2013-08-05 07:32:47 +03:00
24337653f1Automatic merge.
Jan Lindström
2013-08-05 06:33:22 +03:00
cae4d38a7eRemoved unnecessary argument from log manager commands because it is not used and it is always NULL.
vraatikka
2013-08-04 23:30:47 +03:00