OpenJPA
  1. OpenJPA
  2. OPENJPA-933

Database version detection in MySQLDictionary is not reliable

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 1.3.0, 2.0.0-M2
    • Fix Version/s: 1.3.0, 2.0.0-M2
    • Component/s: jdbc, sql
    • Labels:
      None
    • Environment:
      MySQL 5.1.30, Linux

      Description

      The database version detection code assumes the version string always looks like "4.1.3-nt" whereas currently a MySQL on Linux reports itself as "5.1.30". This causes an exception catch and a fallback to default values (in particular supportsXMLColumn stays false). Also, the code could take advantage of JDBC 3 methods that return version numbers.

      I will provide a patch.

        Activity

        Milosz Tylenda created issue -
        Milosz Tylenda made changes -
        Field Original Value New Value
        Assignee Milosz Tylenda [ milosz ]
        Hide
        Milosz Tylenda added a comment -

        A patch applied to trunk and 1.3.x branch.

        Changes:

        • Corrected version parsing for non-JDBC 3 drivers
        • Version numbers are got from JDBC 3 methods if available
        • Removed driver version parsing, now uses metaData.getDriverMajorVersion() which is a pre-JDBC 3 method
        Show
        Milosz Tylenda added a comment - A patch applied to trunk and 1.3.x branch. Changes: Corrected version parsing for non-JDBC 3 drivers Version numbers are got from JDBC 3 methods if available Removed driver version parsing, now uses metaData.getDriverMajorVersion() which is a pre-JDBC 3 method
        Milosz Tylenda made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.3.0 [ 12313326 ]
        Fix Version/s 2.0.0 [ 12313483 ]
        Resolution Fixed [ 1 ]
        Donald Woods made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        56d 4h 35m 1 Milosz Tylenda 18/Apr/09 13:59
        Resolved Resolved Closed Closed
        325d 5h 31m 1 Donald Woods 09/Mar/10 18:31

          People

          • Assignee:
            Milosz Tylenda
            Reporter:
            Milosz Tylenda
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development