MXS-1849 Combine table and database mapping

Previously schemarouter only mapped databases to the servers
they were resided on. Now all the tables are also mapped to allow the
router to route queries to the right server based on the tables used in
that query.
This commit is contained in:
Marko
2018-06-24 22:17:22 +03:00
parent b38cac4939
commit f308dd281a
4 changed files with 101 additions and 266 deletions

View File

@ -140,6 +140,7 @@ private:
/** Shard mapping functions */
bool send_databases();
bool send_shards();
bool send_tables(std::string db);
void query_databases();
int inspect_mapping_states(SSRBackend& bref, GWBUF** wbuf);
enum showdb_response parse_mapping_response(SSRBackend& bref, GWBUF** buffer);
@ -147,13 +148,6 @@ private:
void synchronize_shards();
void handle_mapping_reply(SSRBackend& bref, GWBUF** pPacket);
/** Table mapping functions */
void query_tables();
bool send_tables();
enum showdb_response parse_table_mapping_response(SSRBackend& bref, GWBUF** buffer);
/** Member variables */
bool m_closed; /**< True if session closed */
DCB* m_client; /**< The client DCB */