56 Commits

Author SHA1 Message Date
VilhoRaatikka
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
Mark Riddoch
fdb9c5e6dc Switch to thread safe versions of localtime and asctime 2014-12-03 09:53:17 +00:00
VilhoRaatikka
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
MassimilianoPinto
9967a45379 Disable Master failback in Galera Monitor
Disable Master failback in Galera Monitor
2014-10-30 18:41:30 +01:00
counterpoint
e8758d3678 Fix problems in tests, fix issue in server.c (bug 581) 2014-10-17 10:57:17 +01:00
counterpoint
d5071267e7 More tests; minor fixes. 2014-10-08 18:04:28 +01:00
Markus Makela
b0683d9b4d Updated the licensing year from 2013 to 2013-2014 2014-10-01 14:37:12 +03:00
Markus Makela
f4e591e382 Changed 'SkySQL Gateway' to 'MariaDB Corporation MaxScale' 2014-09-30 13:15:03 +03:00
Markus Makela
c344231f80 Renamed all occurences of SkySQL to MariaDB Corporation 2014-09-30 13:02:10 +03:00
Mark Riddoch
440f88491b Fixed missue \n in list servers command 2014-09-12 17:32:31 +01:00
Mark Riddoch
d1b4852d29 Addition of server "Auth Error" status 2014-09-12 08:55:32 +01:00
MassimilianoPinto
63a7ccf520 Merge branch 'MAX-232' into 232-bis
Conflicts:
	server/core/server.c
	server/include/server.h
2014-09-04 09:23:29 +02:00
MassimilianoPinto
63d267e5ef Fix for broken replication
Fix for broken replication has been added to mysql_monitor.
Both Slave_IO  and Slave_SQL threads must be running in order to assign
the SERVER_SLAVE status but If only Slave_IO is running let’s assign
the master_id to current server and continue building the replication
tree; if no slaves at all the master will be still available.
The “detect_stale_master” option has been added, its default is 0.
If set to 1 the monitor will keep the last detected master even if the
replication setup is completely not working, i.e. both Slave_IO  and
Slave_SQL threads are not running: this applies only to the server that
was master before.
After monitor or MaxScale are restarted and the replication is still
stopped or not configured there will be no master because it’s not
possible to compute the replication topology tree.
2014-09-01 11:18:57 +02:00
VilhoRaatikka
4a30626974 Merge branch 'Z2' of https://github.com/skysql/MaxScale into Z2
Conflicts:
	client/Makefile
	server/core/buffer.c
	server/core/test/makefile
	server/include/buffer.h
	server/modules/filter/Makefile
	server/modules/routing/webserver.c
2014-08-29 16:21:08 +03:00
Mark Riddoch
d6a2ef6996 Misc fixes to doxygen comments 2014-08-19 13:22:40 +01:00
VilhoRaatikka
cf38dad43a Merge branch 'Z2' of https://github.com/skysql/MaxScale into Z2
Conflicts:
	server/core/modutil.c
2014-08-05 18:26:55 +03:00
MassimilianoPinto
744892e47c Support for MySQL Cluster
Support for MySQL Cluster with ndbcluster monitor and readconnroute
with router_option=ndb
2014-07-30 09:41:03 +02:00
Mark Riddoch
87e66a0ea8 Revert "Implementation of HTTPD protocol, gwbuf properties and a dmeo web application"
This reverts commit 6fd5dff34902051f38932947493280e1e62dbeb1.
2014-07-15 17:53:39 +01:00
Mark Riddoch
6fd5dff349 Implementation of HTTPD protocol, gwbuf properties and a dmeo web application
interface to test the new httpd.
2014-07-15 17:39:31 +01:00
Vilho Raatikka
248b479bb6 Merge pull request #9 from skysql/MAX-90
Addition of server weighting to the read/write splitter
2014-07-01 16:04:52 +03:00
Mark Riddoch
eaaac58b44 Addition of server weighting to the read/write splitter
Tidy up the output of show server and show servers so that columsn align
2014-07-01 11:06:28 +01:00
MassimilianoPinto
37eaf7b455 Replication Lag default is now -2
Replication Lag default is now -2

-1 will be used for no information available from slaves
2014-07-01 10:21:24 +02:00
VilhoRaatikka
0b89245a4b Merge branch 'develop' into MAX-167
Conflicts:
	server/modules/monitor/mysql_mon.c
	server/modules/routing/readwritesplit/readwritesplit.c
2014-06-30 14:17:00 +03:00
VilhoRaatikka
fcf67716fd Added mechanism for choosing slave for a query based on the current load in all connected slaves. Counting operations is not correctly done here. Reading values and choosing accordingly is done.
Fixed several things in session command reply processing.
2014-06-29 22:21:30 +03:00
Mark Riddoch
a25b757134 Merge branch 'develop' into MAX-90
Conflicts:
	server/core/server.c
	server/include/server.h
	server/modules/routing/readconnroute.c
2014-06-27 16:04:39 +01:00
Mark Riddoch
eee2ad7143 Merge branch 'develop' into MAX-90
Conflicts:
	server/core/service.c
2014-06-27 12:15:30 +01:00
Mark Riddoch
25d4f784bc Implementation of server routing generic functionality and for readconnrouter 2014-06-27 12:07:47 +01:00
MassimilianoPinto
237bacd131 Merge branch 'develop' into MAX-59 2014-06-27 11:07:55 +02:00
Mark Riddoch
f96b762478 User interface improvements
Addition of enable/disable heartbeat, enable/disable root, list monitors,
show monitors

Better filter diagnostic output
2014-06-26 16:46:19 +01:00
MassimilianoPinto
4d2e43a2d9 code cleanup and documentation
code cleanup and documentation
2014-06-26 16:56:21 +02:00
MassimilianoPinto
7ba64875ad master_id, depth, slaves default values
master_id, depth, slaves default values
2014-06-23 09:51:50 +02:00
MassimilianoPinto
38fd7b0844 master_id set by monitor
master_id set by monitor and printed via dprint* routines
2014-06-17 16:10:11 +02:00
Mark Riddoch
850603171b Improvements to CLI commands and client 2014-06-16 07:57:12 +01:00
Mark Riddoch
719503e471 Addition of new client utility, maxadmin.
Supporting protocol for the admin interface

New routing module, cli, which shares source with debugcli

Tidyup output of lsit commands
2014-06-13 23:40:07 +01:00
Mark Riddoch
1ebf27eab3 Add server maintenance mode.
Maintenance mode prevents a server from having new connections made
to it and stops MaxScale from monitoring a server. It is designed
to allow a server to be taken out of an active cluster for maintenance.
It prevents new connections and allowsg existing connections to
drain away prior to performaing maintenance on the server.
2014-06-03 09:25:09 +01:00
MassimilianoPinto
d19aedeb2c Merge branch 'develop' into feature-MAX-60 2014-05-29 12:12:05 +02:00
Mark Riddoch
b761c798ca Merge branch 'develop' of github.com:skysql/MaxScale into develop 2014-05-29 09:01:44 +01:00
MassimilianoPinto
4127c5397f Merge branch 'develop' into feature-MAX-60 2014-05-29 09:08:23 +02:00
MassimilianoPinto
b710025a8e printed message modified
printed message modified
2014-05-29 09:07:59 +02:00
Mark Riddoch
797f044cf9 Addition of the list command to the debugcli to list servers,
services, listeners and sessions
2014-05-28 23:25:47 +01:00
MassimilianoPinto
b1e933f7ef Replication Lag in server diagnostics
Replication Lag in server diagnostics
2014-05-28 18:36:52 +02:00
MassimilianoPinto
77b790efbf Replication lag support in server struct
Replication lag support in server struct and configuration
2014-05-28 14:47:35 +02:00
MassimilianoPinto
f985e1cac5 server_id for MySQL replication set for each node
server_id for MySQL replication is now set for each node and
dprintServer* routines can print it as well
2014-05-28 10:43:01 +02:00
MassimilianoPinto
a45e009dfe Merge branch 'feature-MAX-58' into develop
Merge branch 'feature-MAX-58' into develop
2014-05-28 09:31:29 +02:00
MassimilianoPinto
933025b017 Update
Update
2014-05-26 16:49:10 +02:00
MassimilianoPinto
375121aec7 Merge from feature-MAX-98
Merge from feature-MAX-98
2014-05-26 12:50:29 +02:00
MassimilianoPinto
bf00ca8aba GaleraHA support - R/W Splitting with Galera
GaleraHA support - R/W Splitting with Galera
2014-05-26 10:29:34 +02:00
MassimilianoPinto
cde204db47 MariaDB 10 Replication support
MariaDB 10 Replication support
2014-05-26 10:09:01 +02:00
Mark Riddoch
c1d39999ff Improvements to debug interface & blr updates 2014-05-21 17:25:21 +01:00
vraatikka
d403018fd9 Surrounded every log writing command with LOGIF macro, which tests if the given logfile id matches with those enabled. The comparison is done against local variable and expensive function call is avoided. 2013-12-12 16:14:33 +02:00