dcb.c:dcb_write accept also dcb state DCB_STATE_NOPOLLING since it only means that dcb has been removed from epoll set but it is still possible to write to it.
Bug #384http://bugs.skysql.com/show_bug.cgi?id=384
session.h:added new state for SESSION, SESSION_STATE_ROUTER_READY which follows SESSION_STATE_READY. The difference is that ROUTER_READY is set only after router session is successfully created while READY means that session still lacks router.
session.c:set SESSION_STATE_ROUTER_READY when router is created.
mysql_backend.c:gw_read_backend_event, added SESSION_STATE_ROUTER_READY check before router session is closed. Changed chec kso that it doesn't block in infinite loop (although it shouldn't be possible anyway).
mysql_backend.c:gw_error_backend_event, added similar check before session is closed.
If backend authentication fails, wait until session has created router_client_session before reading the session->router_session pointer value. There should only be one case where this situation occurs : when session is being initialized concurrently with authentication. Only consequence is to close router_client_session immediately after session initialization is completed.
With the routines for key/value copy and free it is possible to
duplicate or free different data types in the hash tables.
The user_alloc() routine is the first example.
if ioctl() return 0 bytes, recv(..., MSG_PEEK) is called, reading 1 byte.
if recv returns 0 or -1 the socket is closed and dcb->func.close(dcb) is called.
Client, session and backend connections will be closed
Tested with 4 MaxScale running threads
Added macros which allow for testing locally if log is enabled or not.
server/Makefile
Added directory creation command to Makefile. This fixes problem where errmsg.sys was copied to MaxScale/mysql instead of MaxScale/mysql/errmsg.sys
dcb.b
Added external variable which carries the information of enabled logs from log_manager.cc
gateway.c
Tuned logging.
Removed MARIADB_SRC_PATH
Added MYSQL_ROOT - root directory where MariaDB headers are installed
Added MYSQL_HEADERS - -I notation for three header directories
Added EMBEDDED_LIB - for embedded library directory
Added ERRMSG - for errmsg.sys file
log_manager.cc
Little fixes
log_manager/makefile
Updated header include directive
makefile.inc
Removed DEBUGGER and BACKGR as unnecessary
Added LIB for embedded library file name
query_classifier/makefile
Updated header include directives and embedded library directory
query_classifier/query_classifier.cc
clean up
server/core/Makefile
Updated header include directives and embedded library directory
Added libaio and install of errmsg.sys
server/core/dcb.c
clean up
server/core/gateway.c
Added --language and --skip-innodb to mysql_library_init command-line arguments list
clean up
server/core/load_utils.c
clean up
server/modules/monitor/Makefile
server/modules/routing/readwritesplit/Makefile
Updated header include directives and embedded library directory
utils/skygw_debug.h
http://bugs.skysql.com/show_bug.cgi?id=369
utils/skygw_types.h
utils/skygw_utils.cc
clean up
Added global variable lm_enabled_logfiles_bitmask which holds a bit for each enbaled logfile. It is updated when situation changes.
gateway.c
Changed gateway.c:main so that command-line argument -f specifies either the name of config file in $MAXSCALE_HOME/etc or exact location and name of it. Updated README correspondingly.
Added eternal variable lm_enabled_logfiles_bitmask to be used for quick check before calling logging library functions.
Added following static functions:
bool file_is_readable(char*)
bool file_is_writable(char)
void usage(void)
char* get_expanded_pathname(char*, char*, char*)
void print_log_n_stderr(bool, bool, char*, char*, int)
bool resolve_maxscale_conf_fname(char**, char*, char*)
bool resolve_maxscale_homedir(char**)
Added new command-line argument '-f' which allows the user for specifying relative, or absolute pathname for configuration file. It is also possible to specify only a file name which will be concatenated to path held in MAXSCALE_HOME environment variable.
Old command-line parameter '-c' allow the user for specifying MaxScale home directory also as relative or absolute path. Relative path will be expanded before tested for readability and for writeability.
renamed file_exists to file_exists_and_is_writable, added missing file open flags.
gateway.c
Removed command-line parameter '-m' because setting LD_LIBRARY_PATH after the program has started has no effect.
Corrected some comments.