log_manager.cc:
Log manager handles cases where there are mismatch in user privileges.
Mark log files enabled in the global lm_enabled_logfiles_bitmask after initialization so that it reflects reality in error cases. In general, take into account the possibility that any phase in initialization may fail and read return values.
Replaced file_exists_and_is_writable to check_file_and_path which has a slightly different logic and which detects if file open fails for a few different reasons.
Improved logging (in stderr) in general in error cases.
gateway.c: Also check home directory accessibility in case when it is provided as a command-line argument. Added function check_dir_access to provide that function. Read return value of skysql_logmanager_init and exit (nicely) if it failed.
skygw_utils.cc: initialize mlist with version number 2, which indicates that object is initialized (different than zero) and that there are no active updates on the object (version%2==0).
Each monitor loops 10 times/second (sleep 100ms) and perform monitoring checks only when monitor's interval is spent. Monitors notice faster if the shutdown flag is set and thus overall shutdown is faster.
hint.c:added missing header
Changed interval from unsigned long to size_t which is guaranteed to be of same size also in windows (if possible).
1. in query_classifier.cc autocommit_enabled, and transaction_active variables maintained their values across different sessions. Now those values are stored in each router_client_ses object.
2. As a part of implementation of MAX-95 session variables were added to BACKEND struct which is shared with all sessions using the SERVICE which the particular BACKEND serves. Now each router_client_ses object has a backend reference struct which includes pointer to BACKEND, DCB and to session command cursor.
Added test - set_autocommit_disabled.sql, test_after_autocommit_disabled.sql - to check that session variable is discarded when session where it belongs terminates.
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.
external optind variable must be reset before using it because getopt may have been called earlier in the same process and without resetting argument parsing fails.
dcb.c
check dcb state before attempting to write to dcb in dcb_write
gateway.c
daemon_mode moved to global so that it can be taken into account when deciding where to print messages.
added get_config_filename by using home directory name given as a parameter. Returns absolute paths to config file and to home directory regardless of home directory argument was relative of absolute.
In main, arguments are parsed by using getopt.
Changed argument '-c' to specify home directory because MaxScale.cnf is always in <home>/etc/ directory.
Added argument '-m' to specify modules directory. Both arguments override any other settings.
skygw_types.h
Added PATH_MAX
Commented why spread-down logging is disabled.
In MaxScale start, log paths are printed in their complete form to make it easier to copy-paste the names.
gateway.c
Replaced print_signal_set_error with more general-purpose print_log_n_stderr which prints non-formatted messages to error log and to stderr to the point MaxScale switches to run in daemon process. After that only error log is printed.
skyge_utils.cc
polish