687 Commits

Author SHA1 Message Date
VilhoRaatikka
43b4224d2d Merge branch 'develop' of https://github.com/mariadb-corporation/MaxScale into develop 2014-11-05 14:43:22 +02:00
VilhoRaatikka
8b91a5f078 Fix to bug #610, http://bugs.mariadb.com/show_bug.cgi?id=610
Fixes to Coverity issues 72728, 72755, 72745
2014-11-05 14:41:04 +02:00
Markus Makela
699d07a613 Merge branch 'develop' of https://github.com/mariadb-corporation/MaxScale into develop 2014-11-05 14:22:46 +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
VilhoRaatikka
42fc241cb7 Added comment to server selection routine 2014-11-05 12:15:48 +02:00
VilhoRaatikka
3278be565a Fix to bug #609, http://bugs.mariadb.com/show_bug.cgi?id=609
If target can't be resolved, master is chosen. Bug cause master be chosen in most of the cases.
2014-11-05 11:18:25 +02:00
Markus Makela
a493a841d9 Fix to harness_common.c Coverity errors. 2014-11-04 18:21:31 +02:00
Markus Makela
1b9da8662d Fixed Coverity errors that were in harness_common.c 2014-11-04 11:37:26 +02:00
VilhoRaatikka
54d389e329 Fix to Coverity issue 72733 2014-11-01 21:16:03 +02:00
VilhoRaatikka
10f8d0535a Fixes to Coverity tasks 72734, 72717, 72700 2014-11-01 20:33:17 +02:00
VilhoRaatikka
9ccbab1899 poll.c:dcb_close Don't call poll_remove_dcb anymore if DCB has already been removed from poll set.
mysql_backend.c, mysql_client.c free error message GWBUF after calling handleError
readconnroute.c:handleError send error message to client before returning.
readwritesplit.c:handleError don't free error message buffer anymore since the caller of handleError frees it.
2014-11-01 20:00:59 +02:00
VilhoRaatikka
b6fe4e620a Fixed another leaking socket. Coverity 72706 2014-11-01 15:28:41 +02:00
VilhoRaatikka
f1c4c1dfb2 Fixed one more socket leak 2014-11-01 00:01:38 +02:00
VilhoRaatikka
8aff04b0e9 Fixed Coverity case 72706 2014-10-31 23:35:29 +02:00
VilhoRaatikka
deffd4a69f Fix to Coverity cases 73417, 73420, 72759, 72639 2014-10-31 23:11:19 +02:00
VilhoRaatikka
3f375e680a Fix to #590, http://bugs.mariadb.com/show_bug.cgi?id=590
gw_change_user returned error code in cases where authentication failed. That is not right behavior in that context. gw_change_user succeeds to route query and should return succees to router's routeQuery. Possible error is handled by creating error message and by feeding it to client DCB's event queue.
2014-10-31 20:09:43 +02:00
VilhoRaatikka
a342b453ac Fixed Coverity tasks : 72722, 72706 2014-10-31 15:55:13 +02:00
VilhoRaatikka
7615e9c0ac Merge branch 'develop' of https://github.com/mariadb-corporation/MaxScale into develop 2014-10-31 15:28:58 +02:00
VilhoRaatikka
00fded016b Fixes to Coverity tasks : 73267, 72686, 72672
Cleaned up warnings, and added checks to malloc return values and error log writes in case of failures.
2014-10-31 15:25:59 +02:00
MassimilianoPinto
09b3351427 Added mysqld_error.h in dbusers
Added mysqld_error.h in dbusers
2014-10-31 11:22:15 +01:00
VilhoRaatikka
848c7aa0b8 Fixes to Coverity cases 72678 (retry), 72693 2014-10-31 11:38:57 +02:00
VilhoRaatikka
0a6820c0f6 Merge branch 'develop' of https://github.com/mariadb-corporation/MaxScale into develop 2014-10-30 17:12:13 +02:00
VilhoRaatikka
60536f622e Fix to bug #590, http://bugs.mariadb.com/show_bug.cgi?id=590
Added function poll.c:poll_add_epollin_event_to_dcb which adds given event and related GWBUF to given DCB. The DCB is then added to event queue list so that its even becomes executed as soon as any of the threads start to process events next time.
The problem solved is case where COM_CHANGE_USER failed due to authentication failure. An error should be sent to the client but it was sent once per failed backend authentication instead of just once.
Thread which failed in authentication bypassed router and thus replies weren't filtered out. Solution adds an event and a GWBUF including error message to DCB and the DCB is then added to event queue. Thus the error message appeares like it was an incoming event and becomes processed properly.

An addition was made to mysql_backend.c:gw_read_backend_event so that self-generated event can be processed. Even if socket read doesn't manage to read anything, function proceeds if there is enough data in DCB's readqueue.

Fix ti bug #602, http://bugs.mariadb.com/show_bug.cgi?id=602
Added function sescmd_response_complete which checks if the read data completes session command response packet(s). Function is called only if there's a sessoin command being executed.
2014-10-30 16:54:27 +02:00
MassimilianoPinto
f787077bc5 Removing two monitor consecutive events
Removing two monitor consecutive events
2014-10-27 16:24:35 +01:00
MassimilianoPinto
4576ae6613 Fixed query buffer length in mysql_mon
Fixed query buffer length in mysql_mon
2014-10-27 11:17:16 +01:00
VilhoRaatikka
16f2c39bea Fine tuning of log print. 2014-10-25 00:28:48 +03:00
VilhoRaatikka
236a72a6b6 Fix to bug #590, http://bugs.mariadb.com/show_bug.cgi?id=590
mysql_common.c:gw_send_change_user_to_backend creates new authentication message which is to be sent to backend. GWBUG type flags were not copied from original GWBUF to new one. Thus the information that this is a session command was lost and it was processed in a wrong way. Especially replies were all routed back to client which caused misbehavior.
2014-10-25 00:19:31 +03:00
VilhoRaatikka
18ec838ba7 Merge branch 'develop' of https://github.com/mariadb-corporation/MaxScale into develop 2014-10-24 18:34:55 +03:00
VilhoRaatikka
89c7b907a3 Addition to Fix of bug #585, http://bugs.mariadb.com/show_bug.cgi?id=585
regexfilter.c:routeQuery called modutil_replace_SQL which resulted in multiple buffers in query GWBUF. Those weren't handled properly later. Added call for gwbug_make_contiguous.
2014-10-24 18:30:53 +03:00
MassimilianoPinto
7b5d2df7a6 mysql_send_custom_error returns write operation
mysql_send_custom_error returns write operation
2014-10-24 17:21:07 +02:00
MassimilianoPinto
970511a275 Update for message errors in DB authentication
Update for message errors in DB authentication
2014-10-24 12:20:50 +02:00
MassimilianoPinto
48423f75f6 Merge branch 'develop' into MAX-309 2014-10-24 09:39:42 +02:00
MassimilianoPinto
35996a40cb Reply messages for failed db authentication
Reply messages for failed db authentication
2014-10-23 19:36:25 +02:00
VilhoRaatikka
b320b4df43 Merge branch 'develop' of https://github.com/mariadb-corporation/MaxScale into develop 2014-10-23 18:58:36 +03:00
VilhoRaatikka
7a1b35dc88 Fix to bug #590, http://bugs.mariadb.com/show_bug.cgi?id=590
readwritesplit.c:execute_sescmd_in_backend didn't set GWBUF_TYPE_SESCMD type to GWBUF the command is in. Thus reply wasn't processed properly. Instead all replies were sent to client.
2014-10-23 18:56:27 +03:00
Markus Makela
b5388956d8 Changed the order of linking in test_mysql_users and removed references to non-existing directories in test.inc 2014-10-23 15:24:59 +03:00
MassimilianoPinto
8dd20a10e6 reload users with db auth failed
reload users with db auth failed
2014-10-22 17:56:40 +02:00
VilhoRaatikka
287bc90465 Fix to bug #585, http://bugs.mariadb.com/show_bug.cgi?id=585
buffer.c:gwbuf_make_contiguous: when new buffer is created, copy original buffer's type to new buffer
modutil.c:modutil_replace_SQL: when new bugger is added to GWBUF, copy original buffer's type to new buffer
In all filters, merge all buffers of GWBUF to one before calling modutil:extract_SQL
2014-10-21 21:13:21 +03:00
MassimilianoPinto
e910099586 Merge branch 'develop' into MAX-309
Merge branch 'develop' into MAX-309
2014-10-21 18:00:16 +02:00
MassimilianoPinto
a1f621da30 MySQL authentication with db name
MySQL authentication with db name
2014-10-21 16:46:52 +02:00
VilhoRaatikka
d065be4824 readwritesplit.c:get_dcb assumed thet get_root_master_bref always returns non-null pointer. Changed it so that get_dcb_returns if it doesn't get master bref pointer. 2014-10-20 22:41:10 +03:00
MassimilianoPinto
3cdb1dc2ae Added db names as hashtable
Added db names as hashtable
2014-10-20 19:26:13 +02:00
VilhoRaatikka
4daf255d60 Fixed use of uninitialized variable. 2014-10-20 13:20:53 +03:00
MassimilianoPinto
220e1d9505 local authentication with db name for change_user
local authentication with db name for change_user
2014-10-20 10:26:00 +02:00
VilhoRaatikka
ebd92c8741 readwritesplit.c:routeQuery if target is master but it is found out when get_dcb returns that master DCB has changed, routeQuery fails and logs to trace that master changed. 2014-10-20 10:40:32 +03:00
MassimilianoPinto
c54e087d3e Merge from develop
Merge from develop
2014-10-20 09:03:11 +02:00
MassimilianoPinto
319dd4b3e6 Fix for no db in change_user
Fix for no db in change_user
2014-10-20 09:01:13 +02:00
MassimilianoPinto
b8f590e67f Added database errmsg to change_user
Added database errmsg to change_user
2014-10-17 19:02:19 +02:00
VilhoRaatikka
6041a7e12f Added server state information to trace log printing 2014-10-17 09:44:52 +03: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