1161 Commits

Author SHA1 Message Date
MassimilianoPinto
3e83174cd8 Log messages updated for Replication heartbeat
Log messages updated for Replication heartbeat
2014-06-27 15:10:25 +02:00
MassimilianoPinto
111693775b master_id and node_id are long vars
master_id and node_id are long vars
2014-06-27 14:21:12 +02:00
MassimilianoPinto
96b6454e13 fix compile warnings
fix compile warnings
2014-06-27 14:11:57 +02:00
MassimilianoPinto
875b464c22 pending_status added to MONITOR_SERVERS
pending_status added to MONITOR_SERVERS
2014-06-27 14:04:02 +02:00
MassimilianoPinto
380f5b6bf3 Merge branch 'develop' into MAX-59 2014-06-27 13:58:12 +02:00
MassimilianoPinto
4f12e123c5 Removed SERVER parameter from dcb_call_foreach
Removed SERVER parameter from dcb_call_foreach
2014-06-27 13:51:40 +02:00
Timofey Turenko
475e408551 remove tmporal files from debian dir 2014-06-27 14:45:55 +03:00
Timofey Turenko
c2b20eab84 add debian files 2014-06-27 14:44:55 +03:00
MassimilianoPinto
fdcdc064b1 Added server pending states in monitor
server pending states are now saved and copied to server status before
monitor thread sleep
2014-06-27 13:38:35 +02:00
MassimilianoPinto
237bacd131 Merge branch 'develop' into MAX-59 2014-06-27 11:07:55 +02:00
Mark Riddoch
de5d4fda8b Merge of new user interface changes 2014-06-27 09:57:39 +01:00
Mark Riddoch
c824e9fad6 Merge branch 'develop' into MAX-111 2014-06-27 09:52:00 +01:00
Mark Riddoch
7cdef05710 Fix issue with OK being split across multiple reads 2014-06-27 09:27:43 +01:00
MassimilianoPinto
c13275c0e7 merge from develop
merge from develop
2014-06-26 21:27:22 +02:00
MassimilianoPinto
52646a9942 Fix compile warning
Fix compile warning
2014-06-26 21:22:33 +02:00
MassimilianoPinto
a351a5eb09 fix compile warning
fix compile warning
2014-06-26 21:17:49 +02:00
Timofey Turenko
1f77f37fbb fix type in path in .spec 2014-06-26 21:16:43 +03:00
Mark Riddoch
eb5912239a Documentation for MaxAdmin - rewrite of CLI command guide 2014-06-26 17:23:33 +01:00
MassimilianoPinto
f246219beb Fix compile errors and warnings
Fix compile errors and warnings
2014-06-26 18:20:33 +02:00
Mark Riddoch
ace2550d93 Merge branch 'develop' into MAX-111 2014-06-26 16:52:57 +01:00
Mark Riddoch
031294f655 Diagnostic update 2014-06-26 16:52:10 +01:00
Mark Riddoch
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
MassimilianoPinto
8808fd7e47 Some debug messages removed
Some debug messages removed
2014-06-26 17:18:53 +02:00
MassimilianoPinto
1dbb4b1780 removed duplicated routine code
removed duplicated routine code
2014-06-26 17:12:08 +02:00
MassimilianoPinto
1a33277f72 Merge from develop
Merge from develop
2014-06-26 17:08:21 +02:00
MassimilianoPinto
4d2e43a2d9 code cleanup and documentation
code cleanup and documentation
2014-06-26 16:56:21 +02:00
Timofey Turenko
10ac2cb6e6 add /etc/init.d/maxscale to the package 2014-06-26 15:23:22 +03:00
MassimilianoPinto
d8ac0467de Added comments for SHOW SLAVE STATUS
Added comments for SHOW SLAVE STATUS
2014-06-26 14:14:37 +02:00
MassimilianoPinto
dbf12f6183 Added new rules for Master selection
Added new rules for Master selection using replication tree
2014-06-25 18:38:33 +02:00
MassimilianoPinto
5a65bc2aaa get_root_master routine available
get_root_master routine available
2014-06-25 17:19:14 +02:00
Vilho Raatikka
22827e7c8d Merge pull request #6 from skysql/MAX-99
Max 99
2014-06-25 18:06:22 +03:00
VilhoRaatikka
1d1da398d4 Merge branch 'develop' into MAX-99
Conflicts:
	server/modules/routing/readwritesplit/readwritesplit.c
2014-06-25 17:50:29 +03:00
VilhoRaatikka
dff18bf9bb Necessary checks and macros for prepared statement support implementation. 2014-06-25 17:37:37 +03:00
VilhoRaatikka
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
MassimilianoPinto
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
VilhoRaatikka
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
VilhoRaatikka
d30ff534b9 In dcb.c:dcb_read if there is nothing anymore to read from socket, it wasn't caught anyway. Added test for that case and immediate exit in that case. 2014-06-25 15:37:44 +03:00
Mark Riddoch
fa08a141e4 Fix to reload dbusers
Tidyup show service output
2014-06-25 13:01:32 +01:00
Mark Riddoch
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
MassimilianoPinto
c14700fcff Added documentation to new routines
Added documentation to new routines
2014-06-25 10:21:30 +02:00
Mark Riddoch
e0596b7d72 Merge branch 'develop' into MAX-65 2014-06-25 08:28:17 +01:00
VilhoRaatikka
65c42b93cf If backend fails and sets session state to SESSION_STATE_STOPPING before session is in state SESSION_STATE_ROUTER_READY, sessoin.c:session_alloc overwrites the session state by SESSION_STATE_ROUTER_READY. Protected session state modification and added check before changing the state.
cloesSession was called in session.c:session_free if all DCBs had been removed their references to session. closeSession, however, is function which handles closing router. Router is responsible for closing all backend DCBs (=connections). Thus, calling sessionClose after all backend connections had been removed already is unnecessary and causes assertion traps.

Simply removed the call.
2014-06-24 21:59:42 +03:00
VilhoRaatikka
c30e270768 Removed dcb->command from DCB structure as it was used for session commands but not anymore.
Corrected debug assertion in dcb_final_free because DCB can be freed also when DCB is being created, that is, state is DCB_STATE_ALLOC.
2014-06-24 21:56:15 +03:00
VilhoRaatikka
442ac7fefb Added GWBUF type GWBUF_TYPE_SINGLE_STMT to indicate that buffer only includes single complete stmt. Added macro for checking the flag and changed existing routines as necessary. 2014-06-24 21:51:54 +03:00
VilhoRaatikka
619aeb4afa Query classifier can keep parse tree after the function that created it returns. Parse tree can then be queried from outside. Added skygw_query_classifier_get_stmtname which returns the name of statement, and skygw_query_classifier_free which frees mysql handle, parse tree and thread context (thd). 2014-06-24 21:45:00 +03:00
Mark Riddoch
a652e875b5 Support for multipacket statements
Remove double free in cloned DCB's
2014-06-24 17:59:29 +01:00
MassimilianoPinto
e1e172fe03 Fixed compile errors
Fixed compile errors
2014-06-24 18:37:17 +02:00
MassimilianoPinto
dfe3092dc5 Merge branch 'develop' into MAX-59 2014-06-24 18:21:09 +02:00
MassimilianoPinto
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
MassimilianoPinto
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