Changeset 7822


Ignore:
Timestamp:
Jun 8, 2020, 1:32:37 PM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #2214: Upgrade Hibernate and other 3-rd party components

Updated MySQL JDBC driver to 8.0.19. The 8.0.20 was also tested but there seems to be an issue with Date parameters in some queries: https://bugs.mysql.com/bug.php?id=99713

I have also changed the default configuration to use MySQL 8.

There was an issue with the TestChangeHistory.test_list_by_user() that sometimes worked and sometimes failed. The most likely reason is the filter on the current time which could be affected by rounding milliseconds up/down, so the timestamp used for filtering was modified by -1 second.

Location:
trunk
Files:
1 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/config/dist/base.config

    r7614 r7822  
    3636# MySQL
    3737# -----
    38 # db.dialect          = org.hibernate.dialect.MySQL5InnoDBDialect
    39 # db.url              = jdbc:mysql://localhost/base2?characterEncoding=UTF-8&useCursorFetch=true&defaultFetchSize=100&useServerPrepStmts=true
     38# db.dialect          = org.hibernate.dialect.MySQL8Dialect
     39# db.url              = jdbc:mysql://localhost/base2?characterEncoding=UTF-8&useCursorFetch=true&defaultFetchSize=100&useServerPrepStmts=true&sslMode=DISABLED
    4040# db.dynamic.catalog  = base2dynamic
    4141# db.queries          = /mysql-queries.xml
  • trunk/doc/3rd-party-components.txt

    r7821 r7822  
    106106needed if you are using MySQL as your database.
    107107
    108 More info : http://www.mysql.com/products/connector/
    109 Version   : 8.0.13
     108More info : https://dev.mysql.com/downloads/connector/j/
     109Version   : 8.0.19
    110110License   : GPLv2 (mysql-connector-LICENSE.txt)
    111 Jar files : mysql-connector-java-8.0.13.jar
     111Jar files : mysql-connector-java-8.0.19.jar
    112112
    113113
  • trunk/src/test/TestChangeHistory.java

    r7167 r7822  
    8686   
    8787    //LogManagerFactory old = set_log_manager(new DbLogManagerFactory());
    88     Date since = new Date();
     88    Date since = new Date(System.currentTimeMillis()-1000);
    8989    int bioSourceId = TestBioSource.test_create("Biosource 1", false);
    9090    int sampleId = TestSample.test_create(bioSourceId, "Sample 1", 0, false);
     
    181181      {
    182182        q.restrict(Restrictions.gteq(Hql.property("hst", "time"),
    183             Expressions.parameter("time", since)));
     183            Expressions.parameter("time", since, Type.TIMESTAMP)));
    184184      }
    185185      ItemResultList<ChangeHistory> l = q.list(dc);
Note: See TracChangeset for help on using the changeset viewer.