Commit Graph

247 Commits

Author SHA1 Message Date
d3c8770852 Merge branch 'blr' into develop
Conflicts:
	client/maxadmin.c
	server/core/CMakeLists.txt
	server/core/dcb.c
	server/core/gateway.c
	server/core/poll.c
	server/core/test/CMakeLists.txt
	server/core/test/makefile
	server/include/poll.h
	server/modules/routing/debugcmd.c
2014-11-19 12:00:55 +00:00
ed461d58e2 Moved messages to message log
Moved messages to message log and others printed only with DEBUG mode
compile setting
2014-11-19 11:36:44 +01:00
fd11e6a7f5 Session-specific logging. Added functions
void session_enable_log(SESSION* ses, logfile_id_t id)
and
void session_disable_log(SESSION* ses, logfile_id_t id)

Which switch specific log type on/off if the log type in question is not generally enabled.

Each thread carries a thread-specific struct log_info_t which includes members for current session id and bitfield for enabled log types for the current session. That information is checked before actual log write functions are called.

Each file where session-specific logging is used, must include the following exports:

/** Defined in log_manager.cc */
extern int            lm_enabled_logfiles_bitmask;
extern size_t         log_ses_count[];
extern __thread log_info_t tls_log_info;
2014-11-19 00:08:59 +02:00
70eef7aaa8 Fix to bug #513, http://bugs.skysql.com/show_bug.cgi?id=513 2014-11-17 15:33:13 +02:00
b37fb35669 Removed PID print to stderr
Removed PID print to stderr. it’s already included id message log
2014-11-14 10:03:11 +01:00
9a5168c3e8 Put errors ganerating code behind FAKE_CODE macro, which is not defined by default in any build. 2014-11-10 15:22:08 +02:00
89355c6579 Merge branch 'develop' of github.com:skysql/MaxScale into develop 2014-11-07 13:18:13 +00:00
45005d9b35 Fix free of uninitialised pointers in case of failure. 2014-11-07 13:17:50 +00:00
3b1ca027ad Fixed MaxScale not starting if the log directory already existed. 2014-11-07 14:56:39 +02:00
474f018cee Fixes to minor Coverity errors:
75424
73422
72724
72702
72662
2014-11-07 11:12:26 +02:00
df9502bc38 Bug 591 - long option --nodaemon not working 2014-11-06 16:58:14 +00:00
d611622b23 Fix to Coverity issue 72738, passed NULL-pointer to a function which referenced it. 2014-11-05 15:21:17 +02:00
17f87e29af Fixes to some Coverity issues. 2014-11-05 11:57:42 +02:00
10f8d0535a Fixes to Coverity tasks 72734, 72717, 72700 2014-11-01 20:33:17 +02:00
a342b453ac Fixed Coverity tasks : 72722, 72706 2014-10-31 15:55:13 +02:00
6707d6d0cf Complamentatry fix to that of #575.
resolve_maxscale_homedir returned always false due to succp variable which wasn't updated in successful case.
2014-10-14 18:13:04 +03:00
726ab87f4b Fix to #575, http://bugs.mariadb.com/show_bug.cgi?id=575
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).
2014-10-14 13:22:16 +03:00
34400ee551 Fixed the use of nanosleep which removed a spinloop and degraded the performance dramatically. 2014-10-10 23:53:55 +03:00
ebb3b52fdb Included the my_config.h header before any system headers if mysql headers were used. 2014-10-10 12:30:21 +03:00
2bd93025a9 Fix to bug #558, http://bugs.mariadb.com/show_bug.cgi?id=558
Added #include <strings.h> and length indicator to strncasecmp call.
Fix to bug #513, http://bugs.mariadb.com/show_bug.cgi?id=513
Replaced usleep with nanosleep.
2014-10-09 15:51:46 +03:00
0bc47b90ff Move datadir passed to embedded library down one level so that $MAXSCALE_HOME may be read only 2014-10-02 13:22:00 +01:00
9186d3fa90 Fixes for blr_salve performanc issues, linking of embedded library,
housekeeper heartbeat addition and unloading of modules to allow
profiling of modules using LD_PROFILE environment variable and sprof
2014-10-01 18:30:13 +01:00
b0683d9b4d Updated the licensing year from 2013 to 2013-2014 2014-10-01 14:37:12 +03:00
0acb8fe05d Renaming missed SkySQL references. 2014-10-01 13:48:00 +03:00
0ef87e3cc1 Updates to slave catchup mode to use fake events
Addition of fake EPOLLOUT event mechanism

New memlog feature for debugging purposes
2014-09-30 13:25:45 +01:00
f4e591e382 Changed 'SkySQL Gateway' to 'MariaDB Corporation MaxScale' 2014-09-30 13:15:03 +03:00
c344231f80 Renamed all occurences of SkySQL to MariaDB Corporation 2014-09-30 13:02:10 +03:00
3430fc99d2 Shutdown fix in housekeeper
In memory logging in blr_master
2014-09-26 12:36:59 +01:00
45f8585804 Fix to bug #549, http://bugs.skysql.com/show_bug.cgi?id=549
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).
2014-09-23 11:26:15 +03:00
503b942b5c bug 506 - add command line option (-l --log=file) to log to file or
shared memory. Only affects trace and debug logs.
2014-09-19 18:24:11 +01:00
fd92b60336 Merge branch 'hholzgra-hartmut-getopt_long' into release-1.0beta-refresh
Conflicts:
	client/maxadmin.c

Resolved
2014-09-19 17:43:41 +01:00
8b5b4a17fe Merge from Z3
Merge from Z3
2014-09-11 12:51:16 +02:00
7245d1baa1 blr branch merge
blr branch merge
2014-09-11 12:20:42 +02:00
59251ec878 added signal handler for fatal signals like SIGSEGV
that tries to write a call trace to error log
(or if that fails to stderr) before triggering
a core dump
2014-09-09 11:44:47 +02:00
6a03976e4f support --long options with getopt_long() 2014-09-03 01:03:10 +02:00
0fed5c2c5b Fix to bug #510, http://bugs.skysql.com/show_bug.cgi?id=510, made every MaxScale thread to call mysql_thread_init() before entering poll_waitevents. Also main thread does this before starting services. Removed all calls to mysql_thread_init() and to mysql_thread_end() from elsewhere than from poll.c:poll_waitevents and from gateway.c:main
skygw_utils.cc: replace_literal: fixed memory leak
2014-09-01 19:37:31 +03:00
877442c941 Addition of periodic task execution via the housekeeper thread
Addition of 15, 5 and 1 minute load averages in poll
2014-08-29 16:53:05 +01:00
ee582bf2b2 write MaxScale PID into pidfile
write MaxScale PID into pidfile
2014-06-29 17:53:25 +02:00
189793f992 Clean up some compiler warnings 2014-06-16 08:40:04 +01:00
c927057b5c Fixed two bugs of which one was older.
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.
2014-04-28 23:33:49 +03:00
2fcc371606 Added back --skip-innodb to a call argument for libmysqld 2014-04-15 19:22:46 +03:00
2c17dc3edf Bug #418, added functions to query classifier to detect if SET autocommit is called.
Note: this compiles but doesn't work yet properly.
2014-04-09 23:43:03 +03:00
5e3ec5b3c8 Added "--no-defaults" to arguments that are passed to mysql_library_init. It tells to embedded server not to use any external my.cnf configuration file. 2014-03-29 12:27:02 +02:00
4150b124a4 Bug # 397
http://bugs.skysql.com/show_bug.cgi?id=397

Avoid calling free with NULL pointer.
2014-02-07 12:47:07 +02:00
1e25d304e7 Add check that the argument to the -c option is a directory. 2014-02-06 13:46:07 +01:00
e97ab93966 Tidy up of the exit status based on the issues founf during startup.
See Bugzilla 370.
2014-02-05 12:20:53 +01:00
fa79a121e6 Updated server version added to the prompt and in the log files.
See Bugzilla bug 376.
2014-02-05 11:29:20 +01:00
97bc1ed042 Fixed comments to be compatible with doxygen 2013-12-13 19:11:10 +02:00
d700754baa log_manager.cc
Bug #372, http://bugs.skysql.com/show_bug.cgi?id=372
	Do not exceed the buffer capacity in log writing. Now longer strings are cut to fit to the buffer.
2013-12-13 15:21:48 +02:00
4ce4423b3e Made comments doxygen compatible. 2013-12-13 10:52:34 +02:00