Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-7488

MySQLMetaDataDialect wrong attempt to get table metadata

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 3.2.0.Beta2
    • 3.2.0.Beta1
    • hibernate
    • None

    Description

      MySQLMetaDataDialect uses "schema" instead of "catalog" name when try to execute "show table status ...". But "catalog" represents db_name.
      See MySQLMetaDataDialect #getSuggestedPrimaryKeyStrategyName(...)
      Test case:
      1. Create several dbs in MySQL Server
      2. Create console configuration with url jdbc:mysql://localhost:3306/?nullCatalogMeansCurrent=false
      3. Open Console Configuration/Database
      OBSERVE: all databases retrieved sucessfully, but
      FAILURE:
      java.sql.SQLException: No database selected
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648)
      at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077)
      at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2228)
      at org.hibernate.cfg.reveng.dialect.MySQLMetaDataDialect.getSuggestedPrimaryKeyStrategyName(MySQLMetaDataDialect.java:29)

      Attachments

        Issue Links

          Activity

            People

              dgeraskov Dmitry Geraskov (Inactive)
              dgeraskov Dmitry Geraskov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: