155 Commits

Author SHA1 Message Date
MassimilianoPinto
698af9d3b7 Send modules list into to Notification server
Send modules list into to Notification server

TODO: remove fprintf  in module_feedback_send and use log manager
instead
2015-03-05 13:20:22 +01:00
Markus Makela
880adca73e Merge branch 'develop' into MAX-324 2015-03-05 10:45:48 +02:00
MassimilianoPinto
bc5dfe82c2 merge from develop
merge from develop
2015-03-04 17:02:04 +01:00
Markus Makela
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
MassimilianoPinto
74e303f601 Fixed routine name
Fixed routine name
2015-03-02 17:36:00 +01:00
MassimilianoPinto
64c0b7b041 Notification service support
Notification service support
2015-03-02 17:15:31 +01:00
MassimilianoPinto
193fe22ef0 Addition of module_feedback_send
Addition of module_feedback_send.
Every 30 second data is sent to 127.0.0.1
Missing routines for configuration parameters and blocking the send
after successful completion
2015-02-26 17:47:01 +01:00
Markus Makela
9e7afeb302 Merge branch 'develop' into MAX-324
Conflicts:
	macros.cmake
	server/core/config.c
	server/core/service.c
	server/modules/routing/CMakeLists.txt
2015-02-24 06:26:55 +02:00
Markus Makela
57f89f5689 Small optimizations to session timeouts. 2015-02-23 19:59:36 +02:00
Markus Makela
56d810ff80 Merge branch 'develop' into timeout 2015-02-23 10:28:55 +02:00
Markus Makela
46c4fefb00 Fixes to coverity defects 87601 87557 87548 87547 87546 87545 87544 87536 87535 87529 87528 2015-02-22 22:29:30 +02:00
Markus Makela
1d74295e8c Moved a function around. 2015-02-22 21:52:53 +02:00
Markus Makela
c47d2f3791 Added session timeouts.
The parameter 'connection_timeout' for services takes a value as seconds.
All sessions that have been idle for longer than this will be disconnected.
2015-02-20 22:16:43 +02:00
Markus Makela
fc969acc73 Added optional stripping of escape characters from database names when laoding users. 2015-02-20 21:07:12 +02:00
Mark Riddoch
2f218cba3a Addition of maxinfo commands
show sessions
	show clients
	show listeners
	show services
	show servers
2015-02-19 12:55:39 +00:00
Mark Riddoch
3898a995ad Addition of show services command 2015-02-19 11:07:24 +00:00
Mark Riddoch
8e941f7523 Addition of the MaxInfo filter and the generic MaxScale resultset 2015-02-18 17:25:13 +00:00
Markus Makela
a2bff1dcea Merge branch 'develop' into MAX-324 2015-02-16 14:58:35 +02:00
Markus Makela
cd99d6c1dd Fixes to Coverity defects 87073, 87388. 2015-02-16 09:11:55 +02:00
Markus Makela
46ec9abe29 Added optional parameters for services that allow all servers to be used when building the list of users. 2015-02-09 07:19:13 +02:00
Mark Riddoch
ba0d4ae29e Addition of log message for zero users beign loaded. 2015-02-06 16:10:29 +00:00
Mark Riddoch
d4f5ca6bcb Merge branch 'blr' into develop
Addition of hashtable load and save. Caching of auth information
2015-02-06 11:52:51 +00:00
Mark Riddoch
bc0d303b27 Add saving of hashtables to a file
Cache the user information to file in order to allow authentication without backend databases
2015-02-06 11:44:29 +00:00
Mark Riddoch
0083e62c41 Merge branch 'blr' into develop 2015-02-03 17:19:06 +00:00
VilhoRaatikka
21bb341c7d Fix to bug #507, http://bugs.mariadb.com/show_bug.cgi?id=507
readwritesplit.c:get_route_target routed query to slave although query type was combined QUERY_TYPE_READ | QUERY_TYPE_MASTER_READ, where the latter is supposed to be routed to master.
2015-01-27 15:21:31 +02:00
VilhoRaatikka
5d1f029260 New fix candidate to bug #698, http://bugs.mariadb.com/show_bug.cgi?id=698
client/test/maxadmin_test.sh: added new cases for testing maxadmin
service.c:dListListeners:fixed NULL-pointer reference
debugcli.h: replaced magic number 80 with constant integer.
cli.c:execute:fixed command buffer overflow
debugcmd.c:convert_arg:restored return value to 0 in case of error
2015-01-19 17:55:02 +02:00
Mark Riddoch
613ed8bb61 Cleanup some log messages 2015-01-07 17:37:32 +00:00
Markus Makela
cd99849581 Fix #2 to bug 680: http://bugs.mariadb.com/show_bug.cgi?id=680"
When no users are loaded from backends, instead of counting it as a failure the service is started and the next time a client connects an attempt to load the users from the backends is made.
2015-01-05 17:38:45 +02:00
Markus Makela
6adccb3c17 Fix to bug 680: http://bugs.mariadb.com/show_bug.cgi?id=680
service.h:Added the 'serviceStartFailed' function which tries to start services with successfully started routers but no successfully started listeners.
mysql_mon.c:Added a call to ServiceStartFailed when servers come available.
2015-01-05 13:38:39 +02:00
Markus Makela
95cd0b93cb Fix to bug 679: http://bugs.mariadb.com/show_bug.cgi?id=679
Added server references to services instead of using a raw pointers to server instances.
Changed all references to service->database to service->dbref.
2015-01-02 20:55:38 +02:00
VilhoRaatikka
f4f537a3e2 Fix to bug #673, http://bugs.skysql.com/show_bug.cgi?id=673
dcb.c:dcb_hashtable_stats:division by zero
hashtable.c:hashtable_get_stats: NULL-pointer reference
service.c:serviceStartPort:set service->users NULL to avoid referring to freed memory
users.c:dcb_usersPrintf: NULL-pointer reference
debugcmd.c:convert_arg: changed return value to 1 in case of error, 0 (==NULL) is valid but it indicates that there are no users loaded.
	execute_cmd: fixed command handling
2014-12-31 21:06:28 +02:00
VilhoRaatikka
beacd524da Fix to bug #662, http://bugs.mariadb.com/show_bug.cgi?id=662
dbusers.c: Added function for setting read, write and connection timeout values. Set default timeouts for getUsers. Defaults are listed in service.c
gateway.c:shutdown_server is called whenever MaxScale is to be shut down. Added call for service_shutdown to shutdown_server.
service.c:service_alloc: replaced malloc with calloc and removed unnecessary zero/NULL initialization statements as a consequence.
	serviceStart: Exit serviceStartPort loop if shutdown flag is set for the service.
	serviceStartAll: Exit serviceStart loop if shutdown flag is set for the service.
service.c: Added service_shutdown which sets shutdown flag for each service found in allServices list.
service.h: Added prototype for service_shutdown
2014-12-29 13:45:24 +02:00
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
a655e394ac Merge branch 'blr' into release-1.0GA
Conflicts:
	server/core/service.c
2014-12-16 15:44:19 +00:00
VilhoRaatikka
0967a09b5c Added severity keyword to error log messages 2014-12-09 14:26:33 +02:00
Mark Riddoch
26e3486966 Fix for router instance creation failure 2014-12-09 09:54:04 +00:00
Markus Makela
8b51d4fee2 Fix to bug 640: http://bugs.mariadb.com/show_bug.cgi?id=640
Added a check for the case when createInstance returns NULL.
Added messages to error log if router instance creation fails or if the service fails to start for any reason.
2014-12-09 06:31:53 +02:00
Mark Riddoch
fdb9c5e6dc Switch to thread safe versions of localtime and asctime 2014-12-03 09:53:17 +00:00
VilhoRaatikka
83f7203213 Fix to unreported bug which printed result of getsockopt even in case when there was no socket error. 2014-11-27 15:37:13 +02: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
12b06a503e Removed NULL pointer printing
Removed NULL pointer printing
2014-11-13 17:15:17 +01:00
MassimilianoPinto
f466f86672 Added default NULL for users table
Added default NULL for users table
2014-11-10 11:10:32 +01:00
MassimilianoPinto
071e15048d Removed leak for service with more listeners
Removed leak for service with more listeners:

users are allocated once in service
2014-11-10 11:08:12 +01:00
Mark Riddoch
897fc3f117 Updated user relaod rate refresh and added checks for failed strdup 2014-11-06 09:53:05 +00:00
VilhoRaatikka
665315ea5c Fix to bug #612, http://bugs.mariadb.com/show_bug.cgi?id=612
Also added error logging in cases where memory allocation failed etc.
2014-11-05 22:04:36 +02:00
MassimilianoPinto
1d38095229 Added history
Added history
2014-10-23 17:45:39 +02:00
MassimilianoPinto
78227bbe30 Added routine documentation
Added routine documentation
2014-10-23 17:40:14 +02:00
MassimilianoPinto
3cdb1dc2ae Added db names as hashtable
Added db names as hashtable
2014-10-20 19:26:13 +02:00
MassimilianoPinto
2dfa01fccc MySQL Auth with dbname check
MySQL Auth with dbname check

Unknown database ‘xxxxx’ is returned to client

Proper error number is still missing and also com_change_user need to
be fixed
2014-10-16 19:17:15 +02:00
MassimilianoPinto
a437d089bb database names are loaded
database names are loaded
2014-10-16 17:49:57 +02:00