Commit Graph

896 Commits

Author SHA1 Message Date
4f136fa4d2 Fixed backend selection logic in get_dcb. If slave is not found write a warning to error log and fall through to master selection. If master has changed or previous master's state has changed, routing fails. 2014-11-15 23:57:09 +02:00
8c1e7172f3 Added debug logging for #615 2014-11-14 20:48:33 +02:00
89713f8bcb Merge branch 'develop' of https://github.com/mariadb-corporation/MaxScale into develop 2014-11-14 13:08:48 +02:00
77aa9827fe Fix candidate to bug #615, http://bugs.skysql.com/show_bug.cgi?id=615 2014-11-14 13:06:35 +02:00
d090eee09b Messages moved from stderr to MESSAGE log
Messages moved from stderr to MESSAGE log
2014-11-14 10:19:04 +01:00
949bbc99d9 Messages moved from stderr to MESSAGE log
Messages moved from stderr to MESSAGE log
2014-11-14 10:11:15 +01:00
9edee192a8 Merge branch 'develop' of https://github.com/mariadb-corporation/MaxScale into develop 2014-11-13 18:00:43 +02:00
175711a1bc Fix to #601, http://bugs.skysql.com/show_bug.cgi?id=601
if (func.auth ==)gw_change_user->gw_send_change_user_to_backend is called before backend has its scramble, auth packet is set to backend's delauqueue instead of writing it to backend. When backend_write_delayqueue is called COM_CHANGE_USER packets are rewritten with backend's current data.
2014-11-13 17:55:29 +02:00
fe20698fb0 Fixed a bug in httpd.c 2014-11-13 13:33:14 +02:00
59b587462a Fix to Coverity defects 72714 75940 75941 2014-11-13 09:09:11 +02:00
aaa9bfd5c2 Fixes to Coverity defects 78241 78242 78243 78244 78245 2014-11-13 08:56:02 +02:00
fc5c3943e8 Fixes to Coverity defects:
72643
72645
72655
72656
72657
72658
72664
72698
72712
2014-11-12 19:02:37 +02:00
0ea4dd63a9 Merge branch 'develop' of https://github.com/mariadb-corporation/MaxScale into develop 2014-11-11 14:25:49 +02:00
128d5e3f48 Addition to previous fix 2014-11-11 14:25:34 +02:00
061fa62d29 Fixes to Coverity issues 77197 (mysql_common.c, dcb.c, mysql_client.c, skygw_debug.h), 72654 (poll.c), 72756 (mysql_backend.c), 72744 (mysql_backend.c), 77197 (mysql_common.c), 72746 (mysql_common.c), 72676 (mysql_common.c), 72705 (readwritesplit.c), 72697 (readwritesplit.c), 72652 (skygw_debug.h) 2014-11-11 14:10:06 +02:00
39b04682ea COM_CHANGE_USER honours charset change
COM_CHANGE_USER honours charset change
2014-11-10 17:06:14 +01:00
49d28bc1f3 MySQL connect: charset flag is stored
MySQL connect: charset flag is stored and passed to backend
2014-11-10 16:09:55 +01:00
9a5168c3e8 Put errors ganerating code behind FAKE_CODE macro, which is not defined by default in any build. 2014-11-10 15:22:08 +02:00
a3675e9098 Merge branch 'develop' of https://github.com/mariadb-corporation/MaxScale into develop 2014-11-10 14:18:43 +02:00
3b07449daa Fix to bug #614, http://bugs.skysql.com/show_bug.cgi?id=614
Added protected state check to mysql_client.c, fixed locking in session.c
2014-11-10 14:07:51 +02:00
e86b51865c Fixes to Coverity errors 72653, 72685, 72707, 73391, 73393, 73394, 73410 and 73414. 2014-11-10 13:51:21 +02:00
44771dbc51 readwritesplit.c:handleError is meant to handle backend errors. Removed one call from mysql_client.c and only send error message to client instead.
Added checks to debug build to ensure that handleError is called before backend DCB is closed.
2014-11-07 17:55:05 +02:00
4b98c472a8 Fixed a comment 2014-11-06 16:12:01 +02:00
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
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
b6fe4e620a Fixed another leaking socket. Coverity 72706 2014-11-01 15:28:41 +02:00
f1c4c1dfb2 Fixed one more socket leak 2014-11-01 00:01:38 +02:00
8aff04b0e9 Fixed Coverity case 72706 2014-10-31 23:35:29 +02:00
deffd4a69f Fix to Coverity cases 73417, 73420, 72759, 72639 2014-10-31 23:11:19 +02:00
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
a342b453ac Fixed Coverity tasks : 72722, 72706 2014-10-31 15:55:13 +02:00
7615e9c0ac Merge branch 'develop' of https://github.com/mariadb-corporation/MaxScale into develop 2014-10-31 15:28:58 +02:00
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
09b3351427 Added mysqld_error.h in dbusers
Added mysqld_error.h in dbusers
2014-10-31 11:22:15 +01:00
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
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
7b5d2df7a6 mysql_send_custom_error returns write operation
mysql_send_custom_error returns write operation
2014-10-24 17:21:07 +02:00
970511a275 Update for message errors in DB authentication
Update for message errors in DB authentication
2014-10-24 12:20:50 +02:00
35996a40cb Reply messages for failed db authentication
Reply messages for failed db authentication
2014-10-23 19:36:25 +02:00
8dd20a10e6 reload users with db auth failed
reload users with db auth failed
2014-10-22 17:56:40 +02:00
a1f621da30 MySQL authentication with db name
MySQL authentication with db name
2014-10-21 16:46:52 +02:00
3cdb1dc2ae Added db names as hashtable
Added db names as hashtable
2014-10-20 19:26:13 +02:00
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
c54e087d3e Merge from develop
Merge from develop
2014-10-20 09:03:11 +02:00
319dd4b3e6 Fix for no db in change_user
Fix for no db in change_user
2014-10-20 09:01:13 +02:00
b8f590e67f Added database errmsg to change_user
Added database errmsg to change_user
2014-10-17 19:02:19 +02:00
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
f2362c3359 Auth error message fix for using password: YES,NO
Auth error message fix for using password: YES,NO
This applies to a “not found user” trying to authenticate with or
without password
2014-10-16 12:50:14 +02:00
0769deed7f MySQL Authentication with DBname
MySQL Authentication with DBname
2014-10-15 17:26:46 +02:00
9212effb86 memory leak fixed
memory leak fixed
2014-10-14 12:46:15 +02:00