Commit Graph

4766 Commits

Author SHA1 Message Date
25d4f784bc Implementation of server routing generic functionality and for readconnrouter 2014-06-27 12:07:47 +01:00
237bacd131 Merge branch 'develop' into MAX-59 2014-06-27 11:07:55 +02:00
c824e9fad6 Merge branch 'develop' into MAX-111 2014-06-27 09:52:00 +01:00
20637ee224 Removed unnecessary SERVER pointer from dcb.c:dcb_call_foreach(), changed declaration and call accordingly. 2014-06-27 10:54:11 +03:00
c13275c0e7 merge from develop
merge from develop
2014-06-26 21:27:22 +02:00
52646a9942 Fix compile warning
Fix compile warning
2014-06-26 21:22:33 +02:00
a351a5eb09 fix compile warning
fix compile warning
2014-06-26 21:17:49 +02:00
f246219beb Fix compile errors and warnings
Fix compile errors and warnings
2014-06-26 18:20:33 +02:00
ace2550d93 Merge branch 'develop' into MAX-111 2014-06-26 16:52:57 +01:00
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
8808fd7e47 Some debug messages removed
Some debug messages removed
2014-06-26 17:18:53 +02:00
1dbb4b1780 removed duplicated routine code
removed duplicated routine code
2014-06-26 17:12:08 +02:00
1a33277f72 Merge from develop
Merge from develop
2014-06-26 17:08:21 +02:00
4d2e43a2d9 code cleanup and documentation
code cleanup and documentation
2014-06-26 16:56:21 +02:00
d8ac0467de Added comments for SHOW SLAVE STATUS
Added comments for SHOW SLAVE STATUS
2014-06-26 14:14:37 +02:00
dbf12f6183 Added new rules for Master selection
Added new rules for Master selection using replication tree
2014-06-25 18:38:33 +02:00
5a65bc2aaa get_root_master routine available
get_root_master routine available
2014-06-25 17:19:14 +02:00
1d1da398d4 Merge branch 'develop' into MAX-99
Conflicts:
	server/modules/routing/readwritesplit/readwritesplit.c
2014-06-25 17:50:29 +03:00
7ff14e23a5 Support for prepared statement, namely support for following comands : COM_STMT_PREPARE, COM_STMT_EXECUTE, COM_STMT_SEND_LONG_DATA, COM_STMT_RESET, COM_STMT_CLOSE, SQLCOM_PREPARE, SQLCOM_EXECUTE, SQLCOM_DEALLOCATE_PREPARE (DEALLOCATE/DROP PREPARE stmt).
All prepare commands are executed in every backend server currently connected.

All executes are routed to master. If stmt type was recorded in prepare phase in rwsplit router, read-only stmts could be routed to slaves.

COM_STMT_PREPARE gets arbitrary number of response packets from backend database. Since statements are prepared in every backend server and only one multi-packet response can be replied to client, redundant multi-packet responses are discarded. This is done in router. Mechanisms from session command handling are utilized with little changes: router must identify when response consists of multiple packets so that it knows to calculate the number of packets in response and that it is able to discard correct number of packets.

Information to the reply-handling router is provided by backend protocol, which includes a ordered list of commands of commands sent to protocol-owning backend server. A command is stored to protocol struct in mysql_backend.c:gw_MySQLWrite_backend if the statement buffer's type has GWBUF_TYPE_SINGLE_STMT set in mysql_client.c:route_by_statement. GWBUF_TYPE_SINGLE_STATEMENT indicates that there is single statement in the buffer, as opposite to Read Connection router, which accepts streaming input from client.
2014-06-25 17:15:46 +03:00
2eafe15bca Added master_host update in the loop
Added master_host update in the loop, returns the right server in case
of multiple servers with same replication depth
2014-06-25 15:51:29 +02:00
2d128de85f Replaced MySQL command macros with enumerated type. Each command has prefix 'MYSQL_' otherwise they match with those listed in mariadb-5.5 mysql_com.h.
Added server command list structure which is included in MySQLProtocol. It holds command and number of response packets the command causes backend server to send as a response. Added set of functions related to protocol command and response packets counting etc.
2014-06-25 15:48:55 +03:00
fa08a141e4 Fix to reload dbusers
Tidyup show service output
2014-06-25 13:01:32 +01:00
792ae454f4 Add support for #!../maxadmin scripts
Add the --help option

Add quoting for executing command with arguments that contain whitespace
2014-06-25 10:00:59 +01:00
c14700fcff Added documentation to new routines
Added documentation to new routines
2014-06-25 10:21:30 +02:00
a652e875b5 Support for multipacket statements
Remove double free in cloned DCB's
2014-06-24 17:59:29 +01:00
e1e172fe03 Fixed compile errors
Fixed compile errors
2014-06-24 18:37:17 +02:00
dfe3092dc5 Merge branch 'develop' into MAX-59 2014-06-24 18:21:09 +02:00
f09368924b Added depth level 0 for each cluster node
Added depth level 0 for each cluster node, this way the algorithm for
root master selection will the same as in mysql replication:

the root master is server at lowest replication depth  with MASTER bit
set

Here for Galera we assume all the servers are at the same level, that’s
0
2014-06-24 17:58:29 +02:00
52ef3b6718 New rules for selecting Master/Slaves
New rules for selecting Master/Slaves are based on MySQL depth in the
replication tree.
The only Master is the root server with SERVER_MASTER bit set
All other servers even with both SLAVE and MASTER bit will be selected
as slaves
2014-06-24 15:44:14 +02:00
584d8867bc Replication tree is now a routine
Replication tree is now a routine
2014-06-24 11:18:59 +02:00
d36100a99f Replication consistency with replication tree
Added replication consistency after replication tree computation
2014-06-23 13:12:26 +02:00
51d47accf7 Added replication consistency routines
Added replication consistency routines
2014-06-23 12:56:01 +02:00
d42469c6cc Merge branch 'develop' into MAX-59 2014-06-23 12:42:32 +02:00
e650930487 Cleanup up branch session on close. 2014-06-23 10:10:04 +01:00
7067e43b44 Core changes to support tee filter. 2014-06-20 17:49:40 +01:00
e98b5d411e Addition of tee filter 2014-06-20 11:47:07 +01:00
c759767a91 Use new session entry points to get remote and user rather than dereference
the DCB directly.
2014-06-19 16:07:21 +01:00
058d553973 Addition of user and source to all filter
Bug fix in timestamp for topfilter
2014-06-19 14:02:41 +01:00
2a1688bb3d get level 0 for the first master
get level 0 for the first master
2014-06-18 18:57:09 +02:00
4d257897d3 Merge branch 'develop' of github.com:skysql/MaxScale into develop
Conflicts:
	server/core/session.c
	server/modules/protocol/mysql_backend.c
	server/modules/routing/readwritesplit/readwritesplit.c

Resolved.

Addition of user in topfilter report and general tidyup
2014-06-18 17:45:57 +01:00
1b6a5efb64 merge from develop
merge from develop
2014-06-18 11:51:47 +02:00
b2d7d28b10 fix for slave set with mariadb 10 replication
fix for slave set with mariadb 10 replication
2014-06-18 11:46:29 +02:00
6bb7aa4311 first implementation for depth of replication
first implementation for depth of replication for nodes
2014-06-17 18:16:45 +02:00
751b81a3b6 getServerByNodeId added
getServerByNodeId added
2014-06-17 18:07:30 +02:00
38fd7b0844 master_id set by monitor
master_id set by monitor and printed via dprint* routines
2014-06-17 16:10:11 +02:00
e7fa80a591 Code clean up 2014-06-17 16:15:19 +03:00
49163a4c43 Merge branch 'develop' into MAX-11 2014-06-16 19:53:19 +03:00
4f03c775e5 sescmd_cursor_reset didn't reset cursor's property pointer which made reset ineffective. 2014-06-16 13:40:45 +03:00
70ba1f028a Fixed bug in generation of execution time in report 2014-06-15 23:03:41 +01:00
0200ca4e24 Some things weren't switched off from product build. 2014-06-16 00:31:14 +03:00