97 Commits

Author SHA1 Message Date
Markus Makela
3bad5dc814 Fixes to Coverity defects 87308, 87307, 87306, 87074, 87068. 2015-02-14 07:54:17 +02:00
Markus Makela
32c9d39302 Fix to bug 771: http://bugs.mariadb.com/show_bug.cgi?id=711
SHOW GLOBAL STATUS was misclassified as a global system variable write and was being routed to all servers instead of being routed only to the master.
2015-02-05 18:31:01 +02:00
VilhoRaatikka
c5c9165a26 Merge branch 'develop' of https://github.com/mariadb-corporation/MaxScale into develop 2015-01-15 15:21:58 +02:00
VilhoRaatikka
39e4253c81 Fix to bug #694, http://bugs.mariadb.com/show_bug.cgi?id=694
query_classifier.cc: set_query_type lost previous query type if the new was more restrictive. Problem was that if query is both READ and SESSION_WRITE and configuration parameter use_sql_variables_in=all was set, routing target became ambiguous. Replaced call to set_query_type with simply adding new type to type (=bit field) and checking unsupported combinations in readwritesplit.c:get_route_target. If such a case is met, a detailed error is written to error log in readwritesplit.c. mysql_client.c sees the error code and sends an error to client. Then mysql_client.c calls router's handleError which ensures that there are enough backend servers so that the session can continue.
2015-01-15 15:16:22 +02:00
Markus Makela
533042b61a Fixes to coverity defects from 85514 up to 85529. 2015-01-15 14:09:11 +02:00
VilhoRaatikka
b3824a1eaf Clean up bits and pieces, removed some unnecessary checks. 2015-01-14 14:11:19 +02:00
Markus Makela
2b4e6bb594 Merge branch 'develop' into firewall
Conflicts:
	server/modules/filter/test/CMakeLists.txt
2015-01-13 07:48:43 +02:00
VilhoRaatikka
ee2876e9a4 Added parameter NULL checks to query_classifier.cc 2015-01-10 21:29:29 +02:00
Markus Makela
8729413655 Fixed build issues due to missing headers. 2015-01-05 11:37:37 +02:00
Markus Makela
ba009e5fd3 Fixes to Coverity defects 85010 84878 72752 72742 72719 and 73418.
skygw_utils.cc: Added function is_valid_posix_path that checks if a path is POSIX-compliant.
2015-01-05 06:05:56 +02:00
Markus Makela
1e43102eea Merge branch 'release-1.0GA' into firewall 2014-12-16 11:10:02 +02:00
Markus Makela
04a92e40df Fixes to Coverity defects 84879 84878 72752 72742 2014-12-15 06:28:47 +02:00
Markus Makela
f2cec6e51e Merge branch 'release-1.0GA' into firewall
Conflicts:
	query_classifier/query_classifier.cc
2014-12-09 14:23:07 +02:00
VilhoRaatikka
01b1b0a304 Fixes to Coverity issues 84388, 84386, 84385
mysql_mon.c: Added back server state logging to Debug build.
query_classifier.cc: removed some extra debug code, cleaned up a bit function documentation.
mysql_client_server_protocol.h, mysql_backend.c, mysql_common.c: changed some variables to signed ones to enable checking of calculations in the code.
skygw_utils.cc: removed erroneous debug assertion.
2014-12-05 23:39:14 +02:00
Markus Makela
12d6d81fa8 Merge branch 'release-1.0GA' into firewall
Conflicts:
	log_manager/log_manager.cc
2014-12-04 17:13:41 +02:00
VilhoRaatikka
b106560317 Fix to bug # 634, http://bugs.skysql.com/show_bug.cgi?id=634
COM_SHOW_SLAVE_STAT wasn't classified but it was treated as 'unknown' and thus routed to master.
2014-12-03 13:27:31 +02:00
Markus Makela
0900b5dbce Merge branch 'develop' into firewall
Conflicts:
	server/modules/filter/test/harness_common.c
2014-11-25 17:56:26 +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
Markus Makela
a5ece62327 Merge branch 'develop' into firewall
Conflicts:
	server/modules/filter/test/harness.h
	server/modules/filter/test/harness_common.c
2014-11-17 18:45:01 +02:00
VilhoRaatikka
6bda88f252 Addition to fix to bug #597, http://bugs.skysql.com/show_bug.cgi?id=597 2014-11-17 15:15:34 +02:00
VilhoRaatikka
1c4ffd2599 Fix to bug #597, http://bugs.skysql.com/show_bug.cgi?id=597
Changed the order of include directives in query_classifier.cc
2014-11-17 14:55:13 +02:00
Markus Makela
ca13e18f53 Added query operation type requirements on where clauses and fixed a bug with regex rules. 2014-11-14 16:28:20 +02:00
Markus Makela
9accebdc37 Merge branch 'develop' into firewall 2014-11-10 09:08:39 +02:00
Markus Makela
a4caac55c8 Fixes to Coverity errors:
72662
72702
72724
73397
73410
73414
73422
75424
75748
75789
75938
75939

Also includes a fix to a bug caused by a previous Coverity error change in canonizer.c
2014-11-07 11:52:40 +02:00
VilhoRaatikka
e7b6ec644c Fix to Coverity issue 72741 2014-11-05 16:05:35 +02:00
Markus Makela
4f5bda7a8b Merge branch 'develop' into firewall 2014-11-05 15:28:22 +02:00
Markus Makela
36c6a61330 Fixes to coverity bugs:
72670: query_classifier/query_classifier.cc
72682: server/modules/filter/qlafilter.c
72679: server/modules/filter/tee.c
72716: server/modules/protocol/maxscaled.c
72694: server/modules/protocol/telnetd.c
71743: server/modules/routing/readwritesplit/readwritesplit.c
2014-11-05 14:18:38 +02:00
Markus Makela
b7f9819407 Merge branch 'develop' into firewall 2014-11-03 09:26:31 +02:00
VilhoRaatikka
5a2d492fe8 Fixed use of uninitialized memory. 2014-10-31 23:47:33 +02:00
Markus Makela
effe8f3297 Switched over to hashtables for users and columns. 2014-10-15 15:23:14 +03:00
Markus Makela
9abe270da8 added checking for where clause on queries 2014-10-13 13:48:07 +03:00
Markus Makela
e02bed1f14 Initial implementation of the firewall filter. 2014-10-09 13:22:38 +03:00
Markus Makela
52c0d0c768 Merge remote-tracking branch 'origin/develop' into header_rename 2014-10-01 05:24:02 +03:00
VilhoRaatikka
c055a3c0d2 Addition to fix of #557, Removal of confusing and erroneous log message. 2014-09-30 17:04:43 +03:00
VilhoRaatikka
ca7ae0bb64 Fix to bug #557, http://bugs.mariadb.com/show_bug.cgi?id=557
query_classifier.cc: added function for printing combined query type from a bit field.
query_classifier.h: identify query types SHOW DATABASE, and SHOW TABLES to make log entries more understandable.
mysql_common.c: moved some trace log commands to debug log.
readwritesplit.c: moved some trace logs to debug log, added trace log commands to gather routing, query type and session information to one log entry.
skygw_debug.h: added string macros for several query and hint types.
2014-09-30 16:31:30 +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
VilhoRaatikka
2b147a9ea4 Monitors waited monitor check interval time before checking backend servers for the first time. Removed wait for the first check.
Added extra debugging to query_classifier to assist in issue resolution regarding to optimized MaxScale builds and pthread_mutex_lock in sql/sql_class.h
2014-09-24 12:03:04 +03:00
VilhoRaatikka
a41a8d6060 Fix to bug #543, http://bugs.skysql.com/show_bug.cgi?id=543
All counters are now updated in routeQuery
Fix to bug #545, http://bugs.skysql.com/show_bug.cgi?id=545
All sql variable and session modification statements, such as autocommit-, and set <db> commands are routed to all nodes.
2014-09-15 19:01:04 +03:00
VilhoRaatikka
d799331c50 Added support for fine-grained query classification which is needed for configurable support for user- and system variable execution. This is partial implementation to task MAX-242. Tests passed with make -C server/modules/routing/readwritesplit/test but this is intermediate commit. 2014-09-05 22:50:35 +03:00
Markus Makela
c00e51fd00 Merge branch 'Z3' into Z3_rabbit_partial
Conflicts:
	server/modules/routing/readwritesplit/readwritesplit.c
2014-09-04 13:52:12 +03:00
Markus Makela
4e11ea9b06 Merged some of the rabbitmq branch changes
query_classifier.cc: updated skygw_get_table_names to allow for partial or full table names
readwritesplit.c: transferred temporary table detection to separate functions
2014-09-04 13:31:20 +03:00
VilhoRaatikka
7fcf950f8f Merge branch 'Z3' of https://github.com/skysql/MaxScale into Z3
Conflicts:
	server/modules/routing/readwritesplit/readwritesplit.c
2014-09-03 22:54:32 +03:00
VilhoRaatikka
cda39a62fb Fixes to
Includes imprvements to hints processing. If hint can't be followed query is routed possibly to slave, and eventually to master if other attempts fail.
2014-09-03 22:09:50 +03:00
VilhoRaatikka
5e5c59d322 Merge branch 'MAX-237' into Z3 2014-09-03 17:50:56 +03:00
Markus Makela
cc5922b218 Merge branch 'MAX-237' into Z3 2014-09-02 16:58:20 +03:00
Markus Makela
52f3adbf20 fixed temporary tables looking for database drops instead of table drops 2014-09-01 19:50:25 +03:00
VilhoRaatikka
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
VilhoRaatikka
3c1abf4b64 Cleanup 2014-09-01 13:57:31 +03:00
Markus Makela
0e53633a37 Merge remote-tracking branch 'origin/Z3' into MAX-237 2014-09-01 13:44:24 +03:00