Uploaded image for project: 'DdlUtils'
  1. DdlUtils
  2. DDLUTILS-276

Impossible to use one DataSource to read/update 2 database models from the same DB server.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 1.0, 1.1
    • None
    • Core - MySql
    • None
    • Ubuntu 10.02, 64 bit, MySQL 5

    Description

      My jdbc URL does not contain catalog (database) name:
      jdbc:mysql://localhost:3306?autoReconnect=true&zeroDateTimeBehavior=convertToNull&characterEncoding=UTF8

      DBs test1 and test2 are located on the same server.

      I tried different hacks to make it working with the same DataSource.
      But it keeps throwing exception saying that database not selected, even though I am sending database name AND catalog.
      I am not sure why would you need two, but neither of them is switching current database anyway (at least not for MySQL).

      Database test1 = platform.readModelFromDatabase( "test1" );
      Database test2 = platform.readModelFromDatabase( "test2" );

      These two lines are not working also:
      Database test1 = platform.readModelFromDatabase( "test1", "test1", false, false );
      Database test2 = platform.readModelFromDatabase( "test2", "test2", false, false );

      Attachments

        Activity

          People

            tomdz Thomas Dudziak
            masker71 Masker71
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: