Commit Graph

95 Commits

Author SHA1 Message Date
ab6dae897d Removed unnecessary locking when modifying server status
Server lock was used when the server status was modified even though only
one thread should ever be modifying the server status.
2015-11-16 13:02:17 +02:00
44df53d846 LOGIF and skygw_write_log removed from server/core/*.c
LOGIF and skygw_write_log removed from server/core/*.c and
replaced with calls to MXS_(ERROR|WARNING|NOTICE|INFO|DEBUG).
This is a mechanism change, no updating of the actual message
has been performed.

Currently this causes a very small performance hit, since the
check whether the priority is enabled or not is performed in
the function that is called and not before the function is called.
Once all LOGIFs and skygw_write_logs have been replaced, the
behaviour will be altered back to what it was.
2015-11-16 09:49:12 +02:00
6b88b6b17f Merge branch 'develop' into MXS-329-develop-20151111 2015-11-13 07:48:59 +02:00
5efd564573 Fix to MXS-288: https://mariadb.atlassian.net/browse/MXS-288 Added MySQL 5.7 authentication
The change to the mysql.user table in MySQL 5.7 caused MaxScale to stop
working with it. This commit adds functionality that checks which version of
the user data query should be made. It also moves common code related to
server version strings to server.c
2015-11-12 15:24:27 +02:00
2d600868f5 Added argument substitution to monitor scripts 2015-11-11 21:19:07 +02:00
9ab5326960 Fix to MXS-438: https://mariadb.atlassian.net/browse/MXS-438
Maxinfo now supports the shutdown command which shuts down a service, monitor
or MaxScale itself and the restart command which restarts a stopped monitor
or service.
2015-11-11 18:59:39 +02:00
3ea55e3b50 Fix to MXS-437: https://mariadb.atlassian.net/browse/MXS-437
Maxinfo now allows users to flush logs and change the server status
through the MySQL interface.
2015-11-11 18:57:19 +02:00
dee20fe077 Merge remote-tracking branch 'origin/develop' into MXS-329-develop-20151111
# Conflicts:
#	server/core/CMakeLists.txt
#	server/core/buffer.c
#	server/core/service.c
#	server/modules/filter/tee.c
#	server/modules/monitor/mysql_mon.c
#	server/modules/routing/binlog/blr.c
#	server/modules/routing/binlog/blr_slave.c
#	server/modules/routing/debugcmd.c
#	server/modules/routing/readwritesplit/readwritesplit.c
#	utils/skygw_utils.cc

- resolved.
2015-11-11 11:08:02 +00:00
834a88aeda Log variables moved to log_manager.h
The log manager variables lm_enabled_log_files_bitmask, log_ses_count
and tls_log_info that earlier were declared separately in every
c-file are now declared in the log_manager.h header.
2015-11-04 14:26:53 +02:00
b8af047a25 Remove excessively tight conditions for selecting persistent connections, add more information to debug output when connection is rejected. 2015-09-18 11:03:23 +01:00
61c47375d5 Merge branch 'develop' into 1.2.1-binlog_router
Conflicts:
	server/core/server.c
	server/include/server.h
	server/modules/include/blr.h
	server/modules/routing/binlog/blr.c
	server/modules/routing/binlog/blr_file.c
	server/modules/routing/binlog/blr_master.c
	server/modules/routing/binlog/blr_slave.c
2015-08-04 07:59:44 -04:00
6a92a419ff Remove function declaration - moved to header. Implement spin_reporter in server.c, required for correct compilation when SPINLOCK_PROFILE is defined true. 2015-07-27 09:01:20 +01:00
8376bbf3e6 Fix mismatch of int sizes; move calculation of maximum size of persistent pool to a better location. 2015-07-09 08:37:20 +01:00
ce879b65c2 Fix wrong debug message; add maxadmin info for actual max size of persistent pool. 2015-07-08 16:03:50 +01:00
09fdb0a2c2 Hopefully final tidy up. 2015-06-23 14:58:53 +01:00
b880350cf3 Complete merge of latest develop branch 2015-06-22 10:39:13 +01:00
4c38e2224b Merge remote-tracking branch 'origin/develop' into MXS-122
Conflicts:
	server/core/CMakeLists.txt
	server/core/dcb.c
	server/include/dcb.h
	server/include/server.h
	server/modules/protocol/mysql_backend.c
2015-06-19 23:12:54 +01:00
b1c657c2eb Add another debug output; fix bug; clarify variable names. 2015-06-19 20:51:22 +01:00
033080e11e Fix bugs 2015-06-19 15:31:34 +01:00
ef428b9229 Added debug messages for persistent connections; additional information via maxadmin re persistent connections. 2015-06-19 15:01:57 +01:00
84d5af1e00 Throw away poll events that occur for persistent pool DCBs with no related session; fix typos. 2015-06-14 18:19:30 +01:00
99e9987f9b Clear persistent pool DCBs when server freed. 2015-06-09 08:26:14 +01:00
e395ab1442 Provide explicit time checking for age of persistent DCBs. 2015-06-03 16:47:02 +01:00
18a39e6c64 Addition of server_update_address/port 2015-06-03 10:24:35 +02:00
72d14f8894 Addition of server_update_address/port 2015-06-03 10:15:54 +02:00
1a76fc141d Add configuration capabilities for persistent connections. 2015-06-02 15:44:57 +01:00
739ea82e36 Clean up modifications. 2015-06-01 14:05:31 +01:00
6c5e6a5959 Move code around to fix headers problem etc. 2015-05-27 10:17:35 +01:00
8964e76f84 Improve messages 2015-05-26 17:03:13 +01:00
d90ea82aaa Try different code, continue polling while not in use. 2015-05-26 16:31:52 +01:00
1e700ea85b Fix bugs 2015-05-26 11:32:13 +01:00
d7cd40e5a5 Bug fixes and improvements. 2015-05-22 15:53:54 +01:00
b51c5f52ef Fix problems in knowing user for persistent connections. 2015-05-22 14:23:14 +01:00
462bfe677b Fix some bugs; add info for maxadmin. 2015-05-22 11:17:17 +01:00
6f31357372 Initial changes for persistent connections - add some basic functionality. 2015-05-20 18:15:11 +01:00
1b0fd4576a Merge branch 'maxinfo' into develop
Conflicts:
	server/core/service.c
	server/core/session.c
	server/include/session.h
2015-03-04 11:33:00 +02:00
2f218cba3a Addition of maxinfo commands
show sessions
	show clients
	show listeners
	show services
	show servers
2015-02-19 12:55:39 +00:00
b8b75b604f Make JSON output valid 2015-02-19 13:55:29 +01:00
e047247200 Add command to print all servers in JSON format 2015-02-19 10:07:31 +01:00
ac97fcd764 Removed redundancy from error and message logs.
server.c: Added new member to SERVER->master_err_is_logged. It is used if server loses master status. It causes error log print in readwritesplit router's eror handling. Initial value is false and it is set always to false when server's status is set to master.
Added message log printing to mysql monitor, if master status changes to something else. It is not warning or error but only information which probably interests the user.

readwritesplit.c:Muted warnings and error printings in cases if slaves are not found if it is allowed to have a master only.
readwritesplit.c:Corrected error log printing in case where master lost its status. REdundant prints are removed.
2014-12-18 19:12:01 +02:00
fdb9c5e6dc Switch to thread safe versions of localtime and asctime 2014-12-03 09:53:17 +00: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
9967a45379 Disable Master failback in Galera Monitor
Disable Master failback in Galera Monitor
2014-10-30 18:41:30 +01:00
e8758d3678 Fix problems in tests, fix issue in server.c (bug 581) 2014-10-17 10:57:17 +01:00
d5071267e7 More tests; minor fixes. 2014-10-08 18:04:28 +01:00
b0683d9b4d Updated the licensing year from 2013 to 2013-2014 2014-10-01 14:37:12 +03: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
440f88491b Fixed missue \n in list servers command 2014-09-12 17:32:31 +01:00
d1b4852d29 Addition of server "Auth Error" status 2014-09-12 08:55:32 +01:00