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:
@ -42,16 +42,6 @@ public:
|
||||
*/
|
||||
bool add_location(std::string db, SERVER* target);
|
||||
|
||||
/**
|
||||
* @brief Add a table location
|
||||
*
|
||||
* @param table table to add
|
||||
* @param target Target where database is located
|
||||
*
|
||||
* @return True if location was added
|
||||
*/
|
||||
bool add_table_location(std::string table, SERVER* target);
|
||||
|
||||
/**
|
||||
* @brief Retrieve the location of a database
|
||||
*
|
||||
@ -61,16 +51,6 @@ public:
|
||||
*/
|
||||
SERVER* get_location(std::string db);
|
||||
|
||||
/**
|
||||
* @brief Retrieve the location of a table
|
||||
*
|
||||
* @param table table to locate
|
||||
*
|
||||
* @return The server or NULL if no server contains the database
|
||||
*/
|
||||
SERVER* get_table_location(std::string table);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Change the location of a database
|
||||
*
|
||||
@ -95,8 +75,6 @@ public:
|
||||
*/
|
||||
bool empty() const;
|
||||
|
||||
bool tables_empty() const;
|
||||
|
||||
/**
|
||||
* @brief Retrieve all database to server mappings
|
||||
*
|
||||
@ -115,7 +93,6 @@ public:
|
||||
|
||||
private:
|
||||
ServerMap m_map;
|
||||
ServerMap m_table_map;
|
||||
time_t m_last_updated;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user