Markus Makela
8791cc455e
Added the initial implementation of the shardrouter module.
2015-01-23 06:40:30 +02:00
Markus Makela
f2ceaf166f
Commented out old code and fixed a memory leak.
2015-01-16 07:41:10 +02:00
Markus Makela
f54d4a76aa
Final implementation of client session based sharding.
2015-01-15 20:24:01 +02:00
Markus Makela
c1ed24aa78
Initial implementation of session based sharding.
2015-01-14 10:47:04 +02:00
Markus Makela
aa60e02697
Fix to session variables not being written to all backends when USE DATABASE is used.
2015-01-08 14:08:49 +02:00
Markus Makela
6e17bf5ec1
Updated dbshard with the new server reference changes.
2015-01-06 05:01:37 +02:00
Markus Makela
ce53159e7d
Moved dbshard tests to a separate cmake file
2014-12-19 17:23:26 +02:00
Markus Makela
a7d1a865de
Updates 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
2014-12-17 16:22:52 +02:00
Markus Makela
e6fca9b50d
Added 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.
2014-12-17 14:06:34 +02:00
Markus Makela
6013009c13
Merge branch 'MAX-324' of https://github.com/mariadb-corporation/MaxScale into MAX-324
2014-12-16 14:34:06 +02:00
Markus Makela
e4042019e1
Fixed client session termination due to wrong packet sequence numbers.
2014-12-16 14:33:05 +02:00
VilhoRaatikka
f861d67b7f
Removed all references to use_sql_variables_in variable where it is used in dbshard.
...
Commented out dead code.
Fixed some indentations.
2014-12-16 14:14:57 +02:00
VilhoRaatikka
ef94b7ee54
dbshard.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.
2014-12-15 23:31:07 +02:00
VilhoRaatikka
7271586701
Merge branch 'MAX-324' of https://github.com/mariadb-corporation/MaxScale into MAX-324
...
Conflicts:
server/modules/routing/dbshard/dbshard.c
2014-12-15 15:24:56 +02:00
Markus Makela
3dd1f70109
Added a function that generates a custom result set for SHOW DATABASES.
...
Fixed SHOW TABLES not using the current database.
2014-12-15 15:06:06 +02:00
Markus Makela
a91845b324
Re-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.
2014-12-13 07:47:46 +02:00
VilhoRaatikka
600d29a6d1
Merge branch 'MAX-324' of https://github.com/mariadb-corporation/MaxScale into MAX-324
...
Conflicts:
server/modules/routing/dbshard/dbshard.c
2014-12-12 21:08:21 +02:00
VilhoRaatikka
52db8ce15e
Removed useless comments
2014-12-12 21:06:59 +02:00
Markus Makela
175756c478
Fixed some missing return values and added database change routing to right shard.
2014-12-12 16:25:19 +02:00
Markus Makela
a7cc40dc6a
Added error message generation for non-existent databases and backend status checks.
2014-12-11 11:45:40 +02:00
Markus Makela
78d09c35cb
Added functions for shard runtime updating.
2014-12-09 14:12:12 +02:00
VilhoRaatikka
cf40cbfbf0
Aadded 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.
2014-12-08 23:37:21 +02:00
Markus Makela
2ff3939ba2
Active databases are only updated if they are found in the router's hashtable.
2014-12-08 16:35:47 +02:00
Markus Makela
e76215bf07
Added detection of COM_INIT_DB
2014-12-08 11:15:10 +02:00
VilhoRaatikka
4c1ed65617
Added 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.
2014-12-07 23:34:47 +02:00
Markus Makela
0348df5147
Fixed databases being queried without a username or password and ignored the default databases when checking for shards.
2014-12-07 13:16:53 +02:00
Markus Makela
15a96f037d
Merge remote-tracking branch 'origin/MAX-324' into MAX-324
...
Conflicts:
server/modules/routing/dbshard/dbshard.c
2014-12-07 06:11:24 +02:00
VilhoRaatikka
68fc849c6e
query_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.
2014-12-07 00:34:23 +02:00
Markus Makela
a580799eb2
Added messages about missing usernames and passwords for servers.
2014-12-07 00:07:58 +02:00
VilhoRaatikka
94b6fc8ff1
Merge branch 'MAX-324' of https://github.com/mariadb-corporation/MaxScale into MAX-324
2014-12-06 12:48:37 +02:00
Markus Makela
06578c95a5
Updates 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.
2014-12-06 11:30:07 +02:00
VilhoRaatikka
7079cb4749
Cleaned a bit
2014-12-03 10:35:34 +02:00
VilhoRaatikka
ed8404d9c7
Fixed some of compiler errors
2014-12-02 11:05:14 +02:00
VilhoRaatikka
83477042a1
Merge branch 'MAX-324' of https://github.com/mariadb-corporation/MaxScale into MAX-324
2014-12-02 10:37:53 +02:00
VilhoRaatikka
ef4f9aac4f
Merge branch 'MAX-324' of https://github.com/mariadb-corporation/MaxScale into MAX-324
...
Conflicts:
server/modules/include/dbshard.h
server/modules/routing/dbshard/dbshard.c
2014-12-01 19:34:20 +02:00
VilhoRaatikka
a78ac19a87
Added createInstance and newSession, cleaned up things related to other routers.
2014-12-01 15:52:00 +02:00
Markus Makela
1135b2c23f
Removed 'information_schema' from the sharding checks and set the default weights of the backend to 1.
2014-12-01 15:02:44 +02:00
Markus Makela
66164aa664
Added functions that query backend servers for database names
2014-12-01 14:27:33 +02:00
VilhoRaatikka
43d348e3ac
Place holders for dbshard.c
2014-12-01 09:58:46 +02:00