23 Commits

Author SHA1 Message Date
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