MXS-2690: Fix duplicate database detection
Empty duplicate databases are now correctly detected since the results will always return the database name combined with a trailing period.
This commit is contained in:
@ -1378,7 +1378,7 @@ void SchemaRouterSession::query_databases()
|
||||
m_state |= INIT_MAPPING;
|
||||
m_state &= ~INIT_UNINT;
|
||||
|
||||
GWBUF* buffer = modutil_create_query("SELECT schema_name FROM information_schema.schemata AS s "
|
||||
GWBUF* buffer = modutil_create_query("SELECT CONCAT(schema_name, '.') FROM information_schema.schemata AS s "
|
||||
"LEFT JOIN information_schema.tables AS t ON s.schema_name = t.table_schema "
|
||||
"WHERE t.table_name IS NULL "
|
||||
"UNION "
|
||||
|
||||
Reference in New Issue
Block a user