vraatikka
94a8ad68d3
Checked for bug #178 . Added error logs to suitabl places.
2013-08-29 09:50:16 +03:00
vraatikka
527df6c7f3
Merge, mostly.
2013-08-28 23:26:09 +03:00
vraatikka
48165bf5cd
Removed unused protocol_mutex and references to it.
2013-08-28 23:25:27 +03:00
vraatikka
134c33776e
Added consistency check fields, and switched macros to enumerated types.
2013-08-28 23:23:05 +03:00
vraatikka
50a3cfdf49
Commented out some dead code.
2013-08-28 23:17:18 +03:00
vraatikka
ae9fce8591
Added write and read lock to DCB to protect concurrent threads fro executing EPOLLIN and EPOLLOUT events on same descriptor, respectively. Added consistency checks and trace logging.
2013-08-28 23:09:37 +03:00
vraatikka
f2f119f692
Removed some dead code
2013-08-28 23:08:51 +03:00
vraatikka
9a8e271417
client->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.
2013-08-28 23:06:09 +03:00
vraatikka
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
vraatikka
8c8475740a
Switched to booleans defined in stdbool.h
2013-08-28 22:49:27 +03:00
vraatikka
34b26ad85f
Changed enum-type boolean to whta is defined in stdbool.h, and in practise replaced TRUEs and FALSEs with true, and false, respectively.
2013-08-28 22:47:14 +03:00
Massimiliano Pinto
ff109c6319
dcb->state set wheere missing or changed
2013-08-27 10:52:43 +02:00
Massimiliano Pinto
d0d68a69ca
Added DCB_STATE_XXX in EPOLLIN/EPOLLOUT handlers and in accept()
2013-08-27 10:08:03 +02:00
vraatikka
49036894f5
In gw_connect_to_backend, first create socket, and establish socket connection, then in the end, dcb is added to epoll set.
2013-08-24 00:18:46 +03:00
vraatikka
df5f2f29b2
Removed undefined function declaration. Added trace and error log.
2013-08-23 23:25:12 +03:00
vraatikka
e345b23bcf
Merge
2013-08-23 22:47:16 +03:00
vraatikka
6f0ccd7b42
Added static simple_mutex_t epoll_wait_mutex, which is acquired and released in poll_waitevents.
2013-08-23 22:45:06 +03:00
vraatikka
0a182913a1
in gw_MySQLAccept moved authentication packet send before adding new dcb to epoll set.
2013-08-23 22:39:42 +03:00
vraatikka
0612dae890
Added error log printing.
2013-08-23 22:31:08 +03:00
vraatikka
17975a1252
Fixed indentation.
2013-08-23 22:29:31 +03:00
vraatikka
c9ff06e0f5
Increased maximum path length from 180 to 255, and replaced sprintf with snprintf to prevent buffer overflow.
2013-08-23 22:27:40 +03:00
Massimiliano Pinto
52c30c3e58
Removed dcb->state set after func.close()
2013-08-23 14:17:00 +02:00
vraatikka
68a5a389ee
Removed SS_DEBUG macros around necessary include directives.
2013-08-23 13:42:10 +03:00
vraatikka
481096ccef
Added trace log to newSession and to closeSession.
2013-08-22 10:46:14 +03:00
vraatikka
0401290021
Added 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.
This is part of Bug #163 .
2013-08-22 10:42:18 +03:00
vraatikka
4138281183
setvbuf was called before testing whether file creation succeed. That caused server to fail if MAXSCALE_HOME was exceptionally long.
2013-08-22 00:32:49 +03:00
vraatikka
b18d89300d
Bug 179
2013-08-22 00:26:24 +03:00
vraatikka
8dfd5de923
Fix merge
2013-08-22 00:01:44 +03:00
vraatikka
76f31b6b08
Merge.
2013-08-21 23:34:56 +03:00
vraatikka
3cd5d7162a
ifndef $(MARIADB_SRC_PATH) is not effective so changed to format ifndef MARIADB_SRC_PATH.
2013-08-21 23:32:28 +03:00
Massimiliano Pinto
73ffa5a648
dcb->data is allocated before poll_add_dcb in httpd_accept()
...
This will prevent dcb->data to be NULL with threads
2013-08-20 11:37:57 +02:00
vraatikka
21dabda848
Removed redundant log writings.
2013-08-20 10:49:35 +03:00
vraatikka
76de8f3758
log 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.
2013-08-20 10:43:54 +03:00
vraatikka
2ad0b12d79
Check dcb->status and set new state with writeqlock on.
2013-08-19 19:41:47 +03:00
vraatikka
c5ed473ab7
Check return value of ioctl in dcb_read and act accordingly.
2013-08-19 19:40:51 +03:00
vraatikka
ea79b38e4f
Check return value of dcb_read and if it failed, don't access head of linked list.
2013-08-19 19:39:47 +03:00
vraatikka
d6432b1750
Merge
2013-08-19 17:10:33 +03:00
vraatikka
45ea459e20
Check the return value of ioctl in dcb_read.
2013-08-19 17:09:33 +03:00
Mark Riddoch
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
vraatikka
f750b8545a
Merge
2013-08-19 16:40:44 +03:00
vraatikka
c119f7b7b8
In dcb_close read and set dcb->state by holding dcb->writeqlock. This prevents simultaneous calls to closeSession.
2013-08-19 16:38:55 +03:00
Mark Riddoch
b1c398e944
Bug 145 - Silently ignore missing .secrets file
2013-08-19 15:36:26 +02:00
vraatikka
05a3978442
Modified gw_read_client_event so that it only calls mysql_send_ok after new sessions has been set up and initialized.
2013-08-19 13:02:04 +03:00
vraatikka
24367fb400
Removed dcb->mutex since it didn't solve any problem.
2013-08-19 13:01:07 +03:00
vraatikka
a5dd900acb
Added test cases for speading log messages
2013-08-19 12:58:36 +03:00
vraatikka
4e63df8df8
Disabled spreading of log writes temporarily.
2013-08-19 11:31:53 +03:00
vraatikka
c2743e7543
Logfiles are ordered by their id as follows:
...
LOGFILE_ERROR = 1
LOGFILE_MESSAGE = 2
LOGFILE_TRACE = 4
What is written to file n, will be written to all files m, m>n. Applies to user log writes. Some internal messages are such that they apply to one specific file, such as enable/disable notifications.
2013-08-19 10:28:28 +03:00
Jan Lindström
b6ba1954f5
Merge
2013-08-19 08:48:33 +03:00
Mark Riddoch
9fe7a83675
Fixes for resource leaks foudn with Coverity.
...
Bug 173, 174, 175, 176 and 177
2013-08-21 17:26:55 +02:00
Mark Riddoch
2135a76f7b
Bug 172 - Compile errors in Galera Monitor
2013-08-21 17:25:43 +02:00