Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
While DbEntity has a 'catalog' property, we sort of ignore its presence, don't include catalogs in generated SQL, and advise users to enter it in the "schema" field. However there is a practical aspect of catalogs vs. schemas that became obvious when I started using 'cdbimport' with MySQL (see CAY-1759). MySQL only has a single notion of "database" as a table namespace unit within a given server instance. This maps to "catalog" in the MySQL JDBC driver (see [1], and [2] for explanation of schemas vs catalogs across DBs).
While using schema in place of catalog was fine with manual mapping, it became a problem with reverse-engineered DataMaps that left the schema empty. So all the generated SQL based on such DataMaps would use bare table names, and if the catalog is not a part of JDBC URL, a namespace conflict would occur.
So we need to :
1. honor catalog setting in generated SQL
2. add "default catalog" DataMap, and "catalog" to DbEntity fields in the Modeler
[1] http://forums.mysql.com/read.php?39,137564,137629#msg-137629
[2] http://stackoverflow.com/questions/7942520/relationship-between-catalog-schema-user-and-database-instance