ac97fcd764Removed redundancy from error and message logs. server.c: Added new member to SERVER->master_err_is_logged. It is used if server loses master status. It causes error log print in readwritesplit router's eror handling. Initial value is false and it is set always to false when server's status is set to master. Added message log printing to mysql monitor, if master status changes to something else. It is not warning or error but only information which probably interests the user.
VilhoRaatikka
2014-12-18 19:12:01 +02:00
4d21e901efPackage building now requires CMake version 2.8.12 or greater.
Markus Makela
2014-12-18 15:27:37 +02:00
58f25fdf9bRevert "Disabled NDBMoniton for GA."
Markus Makela
2014-12-18 13:43:16 +02:00
a55e40bd58Disabled NDBMoniton for GA.
Markus Makela
2014-12-18 13:20:35 +02:00
a7d1a865deUpdates to how shards are discovered while the module is running SHOW DATABASES now takes notice of the state of the backends Added scripts for sharding test preparation and local port blocking
Markus Makela
2014-12-17 16:22:52 +02:00
e6fca9b50dAdded a simple test for dbshard router. The test sets a session variable and queries a union of this variable and a value in each of the databases.
Markus Makela
2014-12-17 13:44:44 +02:00
a655e394acMerge branch 'blr' into release-1.0GA
Mark Riddoch
2014-12-16 15:44:19 +00:00
203e83d508Update to COM_STATISTICS to show master connection state
Mark Riddoch
2014-12-16 15:35:39 +00:00
5ef7ddfe1fBug 653 - Memory overwrite
Mark Riddoch
2014-12-16 15:34:06 +00:00
e4042019e1Fixed client session termination due to wrong packet sequence numbers.
Markus Makela
2014-12-16 14:33:05 +02:00
f861d67b7fRemoved all references to use_sql_variables_in variable where it is used in dbshard. Commented out dead code. Fixed some indentations.
VilhoRaatikka
2014-12-16 14:14:57 +02:00
909518fac7Improved error messages
Mark Riddoch
2014-12-16 10:38:09 +00:00
1e43102eeaMerge branch 'release-1.0GA' into firewall
Markus Makela
2014-12-16 11:10:02 +02:00
ef94b7ee54dbshard.c:get_shard_route_target global system variables weren't routed to all servers because an invalid variable was used determine whether statement should be routed to all or to master only.
VilhoRaatikka
2014-12-15 23:31:07 +02:00
8f570082ebpoll.c:poll_add_event_to_dcb didn't update pollStats.evq_pending when added event became pending. That may cause threads to run in poll loop with minimal timeout infinitely. Added counter update.
VilhoRaatikka
2014-12-15 22:21:23 +02:00
7fed679f40poll.c:poll_add_event_to_dcb did not increase the pollStats.evq_pending counter which caused it to go negative, which, inturn caused all threads to spinloop with minimal timeout.
VilhoRaatikka
2014-12-15 22:09:23 +02:00
319b9150dcFixed missing ignore_databases causing a false warning.
Markus Makela
2014-12-15 16:24:18 +02:00
3dd1f70109Added a function that generates a custom result set for SHOW DATABASES. Fixed SHOW TABLES not using the current database.
Markus Makela
2014-12-15 14:12:04 +02:00
4dd6f1b9c0Added comment to assertion regarding to bref->bref_pending_cmd which is a one-slot buffer for database query. If sessoin command cursor is active when query is routed, instead of routing the query to backend it is stored to bref_pending_cmd to wait until previous (session) command is completed. The assertion traps if there is a command already in the bref_pending_cmd.
VilhoRaatikka
2014-12-15 11:35:07 +02:00
04a92e40dfFixes to Coverity defects 84879 84878 72752 72742
Markus Makela
2014-12-15 06:12:40 +02:00
a4968f2521Complete fix candidate for #645, http://bugs.skysql.com/show_bug.cgi?id=645 and #648, http://bugs.skysql.com/show_bug.cgi?id=648 tee.c:closeSession removed unnecessary dcb_free, router/service closes all backend DCBs and the client DCB, and client DCB is the one that was tried to free in closeSession. readwritesplit.c:routeQuery now handles untyped and typed GWBUFs. Untyped means that read buffer may consist of incomplete and multiple MySQL packets. Typed buffer always consists of a single MySQL packet (which can be split to many buffers inside GWBUF). Fixed Coverity cases #84840 and #84841
VilhoRaatikka
2014-12-14 11:26:15 +02:00
a91845b324Re-enabled the ignore list, it uses the parameter 'ignore databases=<list of db names>'. Added routing of trivial queries and ignored databases to the first available backend.
Markus Makela
2014-12-13 07:47:46 +02:00
573cf6040cCheck for the duplciate service being the same as the service that is using the tee filter. I.e. trap simple recursive definitions.
Mark Riddoch
2014-12-11 13:45:21 +00:00
8b51d4fee2Fix to bug 640: http://bugs.mariadb.com/show_bug.cgi?id=640 Added a check for the case when createInstance returns NULL. Added messages to error log if router instance creation fails or if the service fails to start for any reason.
Markus Makela
2014-12-09 06:31:53 +02:00
cf40cbfbf0Aadded some of the code from routeQuery to its own function, change_current_db, which extracts db name, tests if the name can be found among cached database names (hashtable) and if it does, change the db. Otherwise create an error message and add it to poll eventqueue like it was sent from some of the backends.
VilhoRaatikka
2014-12-08 23:37:21 +02:00
8fed527ac9Merge branch 'release-1.0GA' into blr
Mark Riddoch
2014-12-08 09:21:38 +00:00
ce056dccd8Update modue status of all GA modules
Mark Riddoch
2014-12-08 09:19:35 +00:00
e76215bf07Added detection of COM_INIT_DB
Markus Makela
2014-12-08 11:15:10 +02:00
4c1ed65617Added dbshard template to MaxScale_template.cnf Added NULL-check to createInstance to avoid NULL-pointer reference if user/pwd is missing from config. Removed unnecessary code, added error messages, fixed intendation.
VilhoRaatikka
2014-12-07 23:34:47 +02:00
0348df5147Fixed databases being queried without a username or password and ignored the default databases when checking for shards.
Markus Makela
2014-12-07 13:14:34 +02:00
15a96f037dMerge remote-tracking branch 'origin/MAX-324' into MAX-324
Markus Makela
2014-12-07 06:11:24 +02:00
68fc849c6equery_classifier.cc:cleaned up some intendentions and brackets. dbshard.h:removed unnecessary code dbshard.c:removed unnecessary code, cleaned up a bit and made some required changes readwritesplit.c:removed two unnecessary variable assignments.
VilhoRaatikka
2014-12-07 00:34:23 +02:00
a580799eb2Added messages about missing usernames and passwords for servers.
Markus Makela
2014-12-07 00:07:58 +02:00
06578c95a5Updates to dbshard router: Added a parsing function to query classifier that returns an array of database names the query uses. Added a check if the query targets a sharded database. If so, a hint is added that routes the query to the named server.
Markus Makela
2014-12-06 11:30:07 +02:00